Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: ui/file_manager/gallery/js/slide_mode.js

Issue 1173863004: Revert of Move overwrite original checkbox and saved label to bottom toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/slide_mode.js
diff --git a/ui/file_manager/gallery/js/slide_mode.js b/ui/file_manager/gallery/js/slide_mode.js
index 4443fe855e3ef1d47475f957cc57d615a6516c3a..21d986caae3d10953ad0ab6b0ba15042b9cb7d07 100644
--- a/ui/file_manager/gallery/js/slide_mode.js
+++ b/ui/file_manager/gallery/js/slide_mode.js
@@ -226,30 +226,34 @@
* @private
* @const
*/
- this.options_ = queryRequiredElement(this.bottomToolbar_, '.options');
-
- /**
- * @type {!HTMLElement}
- * @private
- * @const
- */
- this.savedLabel_ = queryRequiredElement(this.options_, '.saved');
-
- /**
- * @type {!HTMLElement}
- * @private
- * @const
- */
- this.overwriteOriginalBox_ = queryRequiredElement(
- this.options_, '.overwrite-original');
-
- /**
- * @type {!HTMLElement}
- * @private
- * @const
- */
- this.overwriteOriginal_ = queryRequiredElement(
- this.overwriteOriginalBox_, '#overwrite-checkbox')
+ this.options_ = util.createChild(queryRequiredElement(
+ this.topToolbar_, '.filename-spacer'), 'options');
+
+ /**
+ * @type {!HTMLElement}
+ * @private
+ * @const
+ */
+ this.savedLabel_ = util.createChild(this.options_, 'saved');
+ this.savedLabel_.textContent = this.displayStringFunction_('GALLERY_SAVED');
+
+ /**
+ * @type {!HTMLElement}
+ * @private
+ * @const
+ */
+ this.overwriteOriginalBox_ = util.createChild(
+ this.options_, 'overwrite-original');
+
+ /**
+ * @type {!HTMLElement}
+ * @private
+ * @const
+ */
+ this.overwriteOriginal_ = util.createChild(
+ this.overwriteOriginalBox_, '', 'input');
+ this.overwriteOriginal_.type = 'checkbox';
+ this.overwriteOriginal_.id = 'overwrite-checkbox';
chrome.storage.local.get(SlideMode.OVERWRITE_KEY, function(values) {
var value = values[SlideMode.OVERWRITE_KEY];
// Out-of-the box default is 'true'
@@ -258,6 +262,16 @@
}.bind(this));
this.overwriteOriginal_.addEventListener('click',
this.onOverwriteOriginalClick_.bind(this));
+
+ /**
+ * @type {!HTMLElement}
+ * @const
+ */
+ var overwriteLabel = util.createChild(
+ this.overwriteOriginalBox_, '', 'label');
+ overwriteLabel.textContent =
+ this.displayStringFunction_('GALLERY_OVERWRITE_ORIGINAL');
+ overwriteLabel.setAttribute('for', 'overwrite-checkbox');
/**
* @type {!HTMLElement}
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698