summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhirono@chromium.org <hirono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-18 06:04:57 +0000
committerhirono@chromium.org <hirono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-18 06:04:57 +0000
commit56809fd32771a5e04e9a833222c04cbd1b08246c (patch)
tree429dfab8deb6b47a2a915000b49ba6337b87c39f
parent727423c1506263223c15305f48c88a37b1502333 (diff)
downloadchromium_src-56809fd32771a5e04e9a833222c04cbd1b08246c.zip
chromium_src-56809fd32771a5e04e9a833222c04cbd1b08246c.tar.gz
chromium_src-56809fd32771a5e04e9a833222c04cbd1b08246c.tar.bz2
Currently the design of conflict dialog box is not consistent with other dialog
boxes in Files.app. This CL update the design for consistency. BUG=317925 TEST=manually Review URL: https://codereview.chromium.org/70783002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235636 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd3
-rw-r--r--chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc2
-rw-r--r--chrome/browser/resources/file_manager/foreground/css/file_manager.css13
-rw-r--r--chrome/browser/resources/file_manager/foreground/js/ui/conflict_dialog.js9
4 files changed, 12 insertions, 15 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index d259f6a..2a87fbd 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -12573,9 +12573,6 @@ Some features may be unavailable. Please check that the profile exists and you
Recovered files from Google Drive
</message>
- <message name="IDS_FILE_BROWSER_CONFLICT_DIALOG_TITLE" desc="Title of the conflict dialog shown when a file transfer operation is conflicted.">
- Conflict
- </message>
<message name="IDS_FILE_BROWSER_CONFLICT_DIALOG_MESSAGE" desc="Message of the conflict dialog shown when a file transfer operation is conflicted.">
A file named "<ph name="FILENAME">$1<ex>photo.jpg</ex></ph>" already exists. What do you want to do?
</message>
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc
index 823f106..262e0e0 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc
@@ -240,8 +240,6 @@ bool FileBrowserPrivateGetStringsFunction::RunImpl() {
SET_STRING("PHOTO_IMPORT_MY_PHOTOS_DIRECTORY_NAME",
IDS_FILE_BROWSER_PHOTO_IMPORT_MY_PHOTOS_DIRECTORY_NAME);
- SET_STRING("CONFLICT_DIALOG_TITLE",
- IDS_FILE_BROWSER_CONFLICT_DIALOG_TITLE);
SET_STRING("CONFLICT_DIALOG_MESSAGE",
IDS_FILE_BROWSER_CONFLICT_DIALOG_MESSAGE);
SET_STRING("CONFLICT_DIALOG_KEEP_BOTH",
diff --git a/chrome/browser/resources/file_manager/foreground/css/file_manager.css b/chrome/browser/resources/file_manager/foreground/css/file_manager.css
index 4c0d034..4fb2f77 100644
--- a/chrome/browser/resources/file_manager/foreground/css/file_manager.css
+++ b/chrome/browser/resources/file_manager/foreground/css/file_manager.css
@@ -1921,15 +1921,20 @@ menuitem#thumbnail-view[lead]:not([disabled]) {
display: none;
}
-#conflict-confirm-dialog .apply-all-line {
- margin: 8px;
- text-align: end;
+#conflict-confirm-dialog .cr-dialog-buttons {
+ align-items: baseline;
+ display: flex;
}
-#conflict-confirm-dialog input {
+#conflict-confirm-dialog input[type=checkbox] {
+ -webkit-margin-start: -2px;
width: auto;
}
+#conflict-confirm-dialog label {
+ flex: 1 0 auto;
+}
+
/* Progress center */
#progress-center {
diff --git a/chrome/browser/resources/file_manager/foreground/js/ui/conflict_dialog.js b/chrome/browser/resources/file_manager/foreground/js/ui/conflict_dialog.js
index 9bbd39a..8aecd73 100644
--- a/chrome/browser/resources/file_manager/foreground/js/ui/conflict_dialog.js
+++ b/chrome/browser/resources/file_manager/foreground/js/ui/conflict_dialog.js
@@ -37,10 +37,6 @@ function ConflictDialog(parentNode) {
var applyAllLabel = parentNode.ownerDocument.createElement('label');
applyAllLabel.textContent = str('CONFLICT_DIALOG_APPLY_TO_ALL');
applyAllLabel.setAttribute('for', this.applyAllCheckbox_.id);
- var applyAllLine = parentNode.ownerDocument.createElement('div');
- applyAllLine.className = 'apply-all-line';
- applyAllLine.appendChild(this.applyAllCheckbox_);
- applyAllLine.appendChild(applyAllLabel);
/**
* Element of the keep both button.
@@ -66,12 +62,13 @@ function ConflictDialog(parentNode) {
// Buttons line.
var buttons = this.okButton_.parentNode;
+ buttons.insertBefore(this.applyAllCheckbox_, this.okButton_);
+ buttons.insertBefore(applyAllLabel, this.okButton_);
buttons.replaceChild(this.keepBothButton_, this.okButton_);
buttons.appendChild(this.replaceButton_);
// Frame
this.frame_.id = 'conflict-confirm-dialog';
- this.frame_.insertBefore(applyAllLine, buttons);
}
/**
@@ -105,7 +102,7 @@ ConflictDialog.prototype.show = function(fileName, callback) {
this.callback_ = callback;
FileManagerDialogBase.prototype.showOkCancelDialog.call(
this,
- str('CONFLICT_DIALOG_TITLE'),
+ '', // We dont't show the title for the dialog.
strf('CONFLICT_DIALOG_MESSAGE', fileName));
return true;
};