Commit ebf70947 authored by fukino's avatar fukino Committed by Commit bot

Files.app: Re-design dialog footer.

BUG=402344
TEST=compared with the design spec manually.

Review URL: https://codereview.chromium.org/937083002

Cr-Commit-Position: refs/heads/master@{#317030}
parent 62e7de9a
...@@ -115,39 +115,6 @@ input.common[type='checkbox']::after { ...@@ -115,39 +115,6 @@ input.common[type='checkbox']::after {
opacity: 0.7; opacity: 0.7;
} }
.buttonbar {
display: flex;
height: 31px;
}
.buttonbar button:active img {
opacity: 1.0;
}
.buttonbar button:hover img {
opacity: 0.72;
}
.buttonbar button[disabled] img {
opacity: 0.9;
}
.buttonbar button img {
display: inline-block;
margin: -3px 0 0;
opacity: 0.55;
vertical-align: middle;
}
.buttonbar button.menubutton span.disclosureindicator {
-webkit-transform: rotate(90deg);
float: right;
margin-left: 7px;
margin-top: 10px;
opacity: .8;
transition: none;
}
span.disclosureindicator { span.disclosureindicator {
background-image: -webkit-image-set( background-image: -webkit-image-set(
url(../images/common/disclosure_arrow_dk_grey.png) 1x, url(../images/common/disclosure_arrow_dk_grey.png) 1x,
......
...@@ -659,7 +659,98 @@ body.selecting #search-box { ...@@ -659,7 +659,98 @@ body.selecting #search-box {
flex: none; flex: none;
flex-direction: row; flex-direction: row;
outline: none; outline: none;
padding: 10px; padding: 8px 4px;
}
.dialog-footer .buttonbar {
display: flex;
height: 32px;
}
/* Copy style from paper-button for buttons on the footer. */
.dialog-footer button {
-webkit-user-select: none;
background: transparent;
border: 0;
border-image: none;
border-radius: 3px;
box-sizing: border-box;
cursor: pointer;
margin: 0 0.29em;
min-width: 5.14em;
outline: none;
text-align: center;
text-transform: uppercase;
z-index: 0;
}
.dialog-footer button:hover {
border-image: none; /* Overrides the definition of common.css. */
}
.dialog-footer paper-button,
.dialog-footer button {
height: 32px;
margin: 0 4px;
min-width: 92px;
}
.dialog-footer paper-button[disabled],
.dialog-footer paper-button[disabled]:hover,
.dialog-footer button[disabled],
.dialog-footer button[disabled]:hover {
background-color: rgb(234, 234, 234);
color: rgb(168, 168, 168);
}
.dialog-footer .primary,
.dialog-footer .primary:hover {
background-color: rgb(27, 168, 243);
color: white;
}
.dialog-footer .secondary,
.dialog-footer .secondary:hover {
color: rgb(27, 168, 243);
}
.dialog-footer input {
color: red;
margin: 3px 0 !important;
}
.dialog-footer paper-input-decorator {
color: rgb(51, 51, 51);
padding: 4px 0;
width: 100%;
}
.dialog-footer paper-input-decorator /deep/ .unfocused-underline {
background-color: rgb(207, 207, 207);
}
.dialog-footer paper-input-decorator /deep/ .focused-underline {
background-color: rgb(27, 168, 243);
}
.dialog-footer select {
-webkit-appearance: none;
background: -webkit-image-set(
url(../images/common/disclosure_arrow_dk_grey_down.png) 1x,
url(../images/common/2x/disclosure_arrow_dk_grey_down.png) 2x) no-repeat
right transparent;
border: 0;
border-bottom: 1px solid rgb(207, 207, 207);
border-radius: 0;
color: rgb(51, 51, 51);
cursor: pointer;
margin: 0 32px 0 36px;
outline: none;
padding: 0 12px 0 0;
}
.dialog-footer select:hover {
border-image: none;
} }
.progressable:not([progress]) .progress-bar, .progressable:not([progress]) .progress-bar,
...@@ -731,14 +822,6 @@ html[dir='rtl'] .breadcrumbs .separator { ...@@ -731,14 +822,6 @@ html[dir='rtl'] .breadcrumbs .separator {
-webkit-transform: scaleX(-1); -webkit-transform: scaleX(-1);
} }
#filename-input-box input {
border: 1px solid #c8c8c8;
border-radius: 1px;
box-sizing: border-box;
height: 31px; /* border-box */
margin-right: 30px;
}
.filelist-panel { .filelist-panel {
display: flex; display: flex;
flex: auto; flex: auto;
...@@ -1135,6 +1218,7 @@ li[renaming=''] .badge { ...@@ -1135,6 +1218,7 @@ li[renaming=''] .badge {
} }
.dialog-footer > .right { .dialog-footer > .right {
align-items: center;
flex: none; flex: none;
justify-content: flex-end; justify-content: flex-end;
} }
...@@ -1314,18 +1398,6 @@ li[renaming=''] .badge { ...@@ -1314,18 +1398,6 @@ li[renaming=''] .badge {
flex: auto; flex: auto;
} }
#filename-input-box input {
flex: auto;
padding: 1px 2px;
}
#filename-input-box .filename-label {
background-color: white;
color: #333;
flex: none;
padding-right: 4px;
}
body:not([type='saveas-file']) #filename-input-box { body:not([type='saveas-file']) #filename-input-box {
display: none; display: none;
} }
......
...@@ -454,13 +454,16 @@ ...@@ -454,13 +454,16 @@
<div class="dialog-footer progressable" tabindex="-1" <div class="dialog-footer progressable" tabindex="-1"
visibleif="saveas-file open-file open-multi-file folder upload-folder"> visibleif="saveas-file open-file open-multi-file folder upload-folder">
<div class="left"> <div class="left">
<button id="new-folder-button" i18n-content="NEW_FOLDER_BUTTON_LABEL" <!-- TODO(fukino): Turn this button into paper-button when the CommandButton supports paper-button. -->
<button id="new-folder-button" class="primary"
i18n-content="NEW_FOLDER_BUTTON_LABEL"
visibleif="saveas-file folder" command="#new-folder" visibleif="saveas-file folder" command="#new-folder"
tabindex="4"> tabindex="4" disabled>
</button> </button>
<div id="filename-input-box" visibleif="saveas-file"> <div id="filename-input-box" visibleif="saveas-file">
<div class="filename-label" i18n-content="FILENAME_LABEL"></div> <paper-input-decorator i18n-values="label:FILENAME_LABEL">
<input class="entry-name" type="text" spellcheck="false" tabindex="1"> <input is="core-input" class="entry-name" type="text" spellcheck="false" tabindex="1">
</paper-input-decorator>
</div> </div>
<div class="preparing-label" i18n-content="PREPARING_LABEL"></div> <div class="preparing-label" i18n-content="PREPARING_LABEL"></div>
<div class="progress-bar" visibleif="saveas-file"> <div class="progress-bar" visibleif="saveas-file">
...@@ -469,8 +472,8 @@ ...@@ -469,8 +472,8 @@
</div> </div>
<div class="right buttonbar"> <div class="right buttonbar">
<select class="file-type" hidden></select> <select class="file-type" hidden></select>
<button class="ok" disabled tabindex="2"></button> <paper-button class="cancel secondary" i18n-content="CANCEL_LABEL" tabindex="3"></paper-button>
<button class="cancel" i18n-content="CANCEL_LABEL" tabindex="3"></button> <paper-button class="ok primary" disabled tabindex="2"></paper-button>
</div> </div>
</div> </div>
<div id="drag-container"></div> <div id="drag-container"></div>
......
...@@ -76,12 +76,12 @@ function openFileDialog(volumeName, expectedSet) { ...@@ -76,12 +76,12 @@ function openFileDialog(volumeName, expectedSet) {
expectedSet, expectedSet,
function(windowId) { function(windowId) {
return remoteCall.waitForElement(windowId, return remoteCall.waitForElement(windowId,
'.button-panel button.cancel'). '.button-panel paper-button.cancel').
then(function() { then(function() {
return remoteCall.callRemoteTestUtil( return remoteCall.callRemoteTestUtil(
'fakeEvent', 'fakeEvent',
windowId, windowId,
['.button-panel button.cancel', 'click']); ['.button-panel paper-button.cancel', 'click']);
}); });
}); });
}).then(function(result) { }).then(function(result) {
...@@ -109,12 +109,13 @@ function openFileDialog(volumeName, expectedSet) { ...@@ -109,12 +109,13 @@ function openFileDialog(volumeName, expectedSet) {
volumeName, volumeName,
expectedSet, expectedSet,
function(windowId) { function(windowId) {
return remoteCall.waitForElement(windowId, '.button-panel button.ok'). return remoteCall.waitForElement(windowId,
'.button-panel paper-button.ok').
then(function() { then(function() {
return remoteCall.callRemoteTestUtil( return remoteCall.callRemoteTestUtil(
'fakeEvent', 'fakeEvent',
windowId, windowId,
['.button-panel button.ok', 'click']); ['.button-panel paper-button.ok', 'click']);
}); });
}); });
}).then(function(result) { }).then(function(result) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment