Commit eb625ae7 authored by Stuart Langley's avatar Stuart Langley Committed by Commit Bot

Make files app dialogs have affirmative actions on the right.

- For cr-dialog-button (e.g. delete file dialog) use css to set the
  order so that the ok button is on the right of the cancel button.
- For the dialog footer just modify the html so that the ok button
  comes after the cancel button.

Tested visually as there are no automated tests for style.

Bug: 844168
Change-Id: Ia6eb652928cba50dd30cb8324b9c33ac13d46df2
Reviewed-on: https://chromium-review.googlesource.com/c/1341283Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Stuart Langley <slangley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609192}
parent 8fcafe0e
......@@ -146,10 +146,12 @@ cr-menu.chrome-menu > [checked]::before {
.cr-dialog-buttons > button.cr-dialog-ok {
background-color: rgb(51, 103, 214);
color: white;
order: 1;
}
.cr-dialog-buttons > button.cr-dialog-cancel {
color: rgb(100, 100, 100);
order: 0;
}
.cr-dialog-buttons > button.cr-dialog-cancel:hover {
......
......@@ -529,13 +529,13 @@
<div class="progress-bar"><div class="progress-track"></div></div>
</div>
<div class="right buttonbar">
<button id="ok-button" class="ok primary" disabled tabindex="6">
<button id="cancel-button" class="cancel secondary" tabindex="6">
<paper-ripple fit></paper-ripple>
<span></span>
<span i18n-content="CANCEL_LABEL"></span>
</button>
<button id="cancel-button" class="cancel secondary" tabindex="7">
<button id="ok-button" class="ok primary" disabled tabindex="7">
<paper-ripple fit></paper-ripple>
<span i18n-content="CANCEL_LABEL"></span>
<span></span>
</button>
</div>
</div>
......
......@@ -305,10 +305,11 @@ testcase.tabindexOpenDialogDownloads = function() {
return remoteCall.callRemoteTestUtil(
'selectFile', appId, ['hello.txt']);
},
['#ok-button:not([disabled])'],
['ok-button', 'cancel-button', 'breadcrumb-path-0', 'search-button',
'view-button', 'sort-button', 'gear-button', 'directory-tree',
'file-list']));
['#ok-button:not([disabled])'], [
'cancel-button', 'ok-button', 'breadcrumb-path-0', 'search-button',
'view-button', 'sort-button', 'gear-button', 'directory-tree',
'file-list'
]));
};
/**
......@@ -321,9 +322,10 @@ testcase.tabindexOpenDialogDrive = function() {
return remoteCall.callRemoteTestUtil(
'selectFile', appId, ['hello.txt']);
},
['#ok-button:not([disabled])'],
['ok-button', 'cancel-button', 'search-button', 'view-button',
'sort-button', 'gear-button', 'directory-tree', 'file-list']));
['#ok-button:not([disabled])'], [
'cancel-button', 'ok-button', 'search-button', 'view-button',
'sort-button', 'gear-button', 'directory-tree', 'file-list'
]));
};
/**
......@@ -335,11 +337,12 @@ testcase.tabindexSaveFileDialogDownloads = function() {
type: 'saveFile',
suggestedName: 'hoge.txt' // Prevent showing a override prompt
},
'downloads', BASIC_LOCAL_ENTRY_SET, null,
['#ok-button:not([disabled])'],
['ok-button', 'cancel-button', 'breadcrumb-path-0', 'search-button',
'view-button', 'sort-button', 'gear-button', 'directory-tree',
'file-list', 'new-folder-button', 'filename-input-textbox']));
'downloads', BASIC_LOCAL_ENTRY_SET, null, ['#ok-button:not([disabled])'],
[
'cancel-button', 'ok-button', 'breadcrumb-path-0', 'search-button',
'view-button', 'sort-button', 'gear-button', 'directory-tree',
'file-list', 'new-folder-button', 'filename-input-textbox'
]));
};
/**
......@@ -351,9 +354,9 @@ testcase.tabindexSaveFileDialogDrive = function() {
type: 'saveFile',
suggestedName: 'hoge.txt' // Prevent showing a override prompt
},
'drive', BASIC_DRIVE_ENTRY_SET, null,
['#ok-button:not([disabled])'],
['ok-button', 'cancel-button', 'search-button', 'view-button',
'sort-button', 'gear-button', 'directory-tree', 'file-list',
'new-folder-button', 'filename-input-textbox']));
'drive', BASIC_DRIVE_ENTRY_SET, null, ['#ok-button:not([disabled])'], [
'cancel-button', 'ok-button', 'search-button', 'view-button',
'sort-button', 'gear-button', 'directory-tree', 'file-list',
'new-folder-button', 'filename-input-textbox'
]));
};
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