summaryrefslogtreecommitdiffstats
path: root/ui/file_manager
diff options
context:
space:
mode:
authoryawano <yawano@chromium.org>2016-02-18 22:54:27 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-19 06:55:13 +0000
commit71bebceb12e139ce8838bd8d6dd2fc1b771fc33d (patch)
treed2b1c4615896feb21e431795a48d60c2079cb6e4 /ui/file_manager
parenta7d87a39dd8cddc64ead9ffa1f60f79ec6776bd9 (diff)
downloadchromium_src-71bebceb12e139ce8838bd8d6dd2fc1b771fc33d.zip
chromium_src-71bebceb12e139ce8838bd8d6dd2fc1b771fc33d.tar.gz
chromium_src-71bebceb12e139ce8838bd8d6dd2fc1b771fc33d.tar.bz2
Remove close button from confirm dialog and alert dialog.
BUG=584592 TEST=For confirm dialog, manually tested as described in the issue. For alert dialog, none. Review URL: https://codereview.chromium.org/1690503003 Cr-Commit-Position: refs/heads/master@{#376411}
Diffstat (limited to 'ui/file_manager')
-rw-r--r--ui/file_manager/file_manager/foreground/css/common.css10
-rw-r--r--ui/file_manager/file_manager/foreground/js/compiled_resources.gyp2
-rw-r--r--ui/file_manager/file_manager/foreground/js/main_scripts.js2
-rw-r--r--ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js12
-rw-r--r--ui/file_manager/file_manager/foreground/js/ui/files_alert_dialog.js24
-rw-r--r--ui/file_manager/file_manager/foreground/js/ui/files_confirm_dialog.js24
-rw-r--r--ui/file_manager/gallery/js/compiled_resources.gyp1
-rw-r--r--ui/file_manager/gallery/js/gallery.js3
-rw-r--r--ui/file_manager/gallery/js/gallery_scripts.js1
9 files changed, 71 insertions, 8 deletions
diff --git a/ui/file_manager/file_manager/foreground/css/common.css b/ui/file_manager/file_manager/foreground/css/common.css
index 6b14673..42d67c4 100644
--- a/ui/file_manager/file_manager/foreground/css/common.css
+++ b/ui/file_manager/file_manager/foreground/css/common.css
@@ -320,6 +320,16 @@ html[dir='rtl'] .cr-dialog-close {
opacity: 1;
}
+.files-alert-dialog .cr-dialog-close,
+.files-confirm-dialog .cr-dialog-close {
+ display: none;
+}
+
+.files-alert-dialog .cr-dialog-text,
+.files-confirm-dialog .cr-dialog-text {
+ font-size: 14px;
+}
+
/* Minor tweak of vertical position for texts which need to be vertically
* aligned with corresponding file-type icons. */
.tree-row > .label,
diff --git a/ui/file_manager/file_manager/foreground/js/compiled_resources.gyp b/ui/file_manager/file_manager/foreground/js/compiled_resources.gyp
index 0417450..38abceb 100644
--- a/ui/file_manager/file_manager/foreground/js/compiled_resources.gyp
+++ b/ui/file_manager/file_manager/foreground/js/compiled_resources.gyp
@@ -133,6 +133,8 @@
'./ui/file_manager_ui.js',
'./ui/file_table.js',
'./ui/file_table_list.js',
+ './ui/files_alert_dialog.js',
+ './ui/files_confirm_dialog.js',
'./ui/files_menu.js',
'./ui/gear_menu.js',
'./ui/list_container.js',
diff --git a/ui/file_manager/file_manager/foreground/js/main_scripts.js b/ui/file_manager/file_manager/foreground/js/main_scripts.js
index e61c262..e826ffd 100644
--- a/ui/file_manager/file_manager/foreground/js/main_scripts.js
+++ b/ui/file_manager/file_manager/foreground/js/main_scripts.js
@@ -150,6 +150,8 @@
//<include src="ui/file_list_selection_model.js">
//<include src="ui/file_table.js">
//<include src="ui/file_table_list.js">
+//<include src="ui/files_alert_dialog.js">
+//<include src="ui/files_confirm_dialog.js">
//<include src="ui/files_menu.js">
//<include src="ui/gear_menu.js">
//<include src="ui/list_container.js">
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
index cecc345..8f4db8a 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
@@ -42,24 +42,24 @@ function FileManagerUI(providersModel, element, launchParam) {
/**
* Alert dialog.
- * @type {!cr.ui.dialogs.AlertDialog}
+ * @type {!FilesAlertDialog}
* @const
*/
- this.alertDialog = new cr.ui.dialogs.AlertDialog(this.element);
+ this.alertDialog = new FilesAlertDialog(this.element);
/**
* Confirm dialog.
- * @type {!cr.ui.dialogs.ConfirmDialog}
+ * @type {!FilesConfirmDialog}
* @const
*/
- this.confirmDialog = new cr.ui.dialogs.ConfirmDialog(this.element);
+ this.confirmDialog = new FilesConfirmDialog(this.element);
/**
* Confirm dialog for delete.
- * @type {!cr.ui.dialogs.ConfirmDialog}
+ * @type {!FilesConfirmDialog}
* @const
*/
- this.deleteConfirmDialog = new cr.ui.dialogs.ConfirmDialog(this.element);
+ this.deleteConfirmDialog = new FilesConfirmDialog(this.element);
this.deleteConfirmDialog.setOkLabel(str('DELETE_BUTTON_LABEL'));
/**
diff --git a/ui/file_manager/file_manager/foreground/js/ui/files_alert_dialog.js b/ui/file_manager/file_manager/foreground/js/ui/files_alert_dialog.js
new file mode 100644
index 0000000..3c1d404
--- /dev/null
+++ b/ui/file_manager/file_manager/foreground/js/ui/files_alert_dialog.js
@@ -0,0 +1,24 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * Alert dialog.
+ * @param {!HTMLElement} parentNode
+ * @constructor
+ * @extends {cr.ui.dialogs.AlertDialog}
+ */
+var FilesAlertDialog = function(parentNode) {
+ cr.ui.dialogs.AlertDialog.call(this, parentNode);
+};
+
+FilesAlertDialog.prototype.__proto__ = cr.ui.dialogs.AlertDialog.prototype;
+
+/**
+ * @private
+ * @override
+ */
+FilesAlertDialog.prototype.initDom_ = function() {
+ cr.ui.dialogs.AlertDialog.prototype.initDom_.call(this);
+ this.frame_.classList.add('files-alert-dialog');
+};
diff --git a/ui/file_manager/file_manager/foreground/js/ui/files_confirm_dialog.js b/ui/file_manager/file_manager/foreground/js/ui/files_confirm_dialog.js
new file mode 100644
index 0000000..85e0346
--- /dev/null
+++ b/ui/file_manager/file_manager/foreground/js/ui/files_confirm_dialog.js
@@ -0,0 +1,24 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * Confirm dialog.
+ * @param {!HTMLElement} parentNode
+ * @constructor
+ * @extends {cr.ui.dialogs.ConfirmDialog}
+ */
+var FilesConfirmDialog = function(parentNode) {
+ cr.ui.dialogs.ConfirmDialog.call(this, parentNode);
+};
+
+FilesConfirmDialog.prototype.__proto__ = cr.ui.dialogs.ConfirmDialog.prototype;
+
+/**
+ * @private
+ * @override
+ */
+FilesConfirmDialog.prototype.initDom_ = function() {
+ cr.ui.dialogs.ConfirmDialog.prototype.initDom_.call(this);
+ this.frame_.classList.add('files-confirm-dialog');
+};
diff --git a/ui/file_manager/gallery/js/compiled_resources.gyp b/ui/file_manager/gallery/js/compiled_resources.gyp
index 6a32842..781e4dd 100644
--- a/ui/file_manager/gallery/js/compiled_resources.gyp
+++ b/ui/file_manager/gallery/js/compiled_resources.gyp
@@ -104,6 +104,7 @@
'../../file_manager/foreground/js/share_client.js',
'../../file_manager/foreground/js/thumbnail_loader.js',
'../../file_manager/foreground/js/ui/file_manager_dialog_base.js',
+ '../../file_manager/foreground/js/ui/files_confirm_dialog.js',
'../../file_manager/foreground/js/ui/share_dialog.js',
'../../file_manager/foreground/js/volume_manager_wrapper.js',
'../../file_manager/background/js/volume_manager.js',
diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js
index ae0f21f..3447acc 100644
--- a/ui/file_manager/gallery/js/gallery.js
+++ b/ui/file_manager/gallery/js/gallery.js
@@ -660,8 +660,7 @@ Gallery.prototype.delete_ = function() {
this.document_.body.addEventListener('keydown', this.keyDownBound_);
}.bind(this);
-
- var confirm = new cr.ui.dialogs.ConfirmDialog(this.container_);
+ var confirm = new FilesConfirmDialog(this.container_);
confirm.setOkLabel(str('DELETE_BUTTON_LABEL'));
confirm.show(strf(plural ?
'GALLERY_CONFIRM_DELETE_SOME' : 'GALLERY_CONFIRM_DELETE_ONE', param),
diff --git a/ui/file_manager/gallery/js/gallery_scripts.js b/ui/file_manager/gallery/js/gallery_scripts.js
index 4871df5..ccdd008 100644
--- a/ui/file_manager/gallery/js/gallery_scripts.js
+++ b/ui/file_manager/gallery/js/gallery_scripts.js
@@ -57,6 +57,7 @@
//<include src="../../file_manager/foreground/js/share_client.js">
//<include src="../../file_manager/foreground/js/thumbnail_loader.js">
//<include src="../../file_manager/foreground/js/ui/file_manager_dialog_base.js">
+//<include src="../../file_manager/foreground/js/ui/files_confirm_dialog.js">
//<include src="../../file_manager/foreground/js/ui/share_dialog.js">
//<include src="../../file_manager/foreground/js/volume_manager_wrapper.js">