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

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

Issue 1255143003: Gallery.app: make edit button toggleable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failed test cases. Created 5 years, 5 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') | ui/file_manager/integration_tests/gallery/photo_editor.js » ('j') | 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 3b8137648aea94f4fe20b11b6f2d7e2702f9fdac..42dac3fdbdb3aaf96451d683ed261e328eb321b9 100644
--- a/ui/file_manager/gallery/js/slide_mode.js
+++ b/ui/file_manager/gallery/js/slide_mode.js
@@ -338,7 +338,7 @@ function SlideMode(container, content, topToolbar, bottomToolbar, prompt,
* @const
*/
var slideShowButton = queryRequiredElement(this.topToolbar_,
- '.button.slideshow');
+ 'paper-button.slideshow');
slideShowButton.addEventListener('click',
this.startSlideshow.bind(this, SlideMode.SLIDESHOW_INTERVAL_FIRST));
@@ -359,15 +359,23 @@ function SlideMode(container, content, topToolbar, bottomToolbar, prompt,
* @private
* @const
*/
- this.editButton_ = queryRequiredElement(this.topToolbar_, '.button.edit');
+ this.editButton_ = queryRequiredElement(this.topToolbar_, 'button.edit');
this.editButton_.addEventListener('click', this.toggleEditor.bind(this));
/**
+ * @private {!FilesToggleRipple}
+ * @const
+ */
+ this.editButtonToggleRipple_ = /** @type {!FilesToggleRipple} */
+ (assert(this.editButton_.querySelector('files-toggle-ripple')));
+
+ /**
* @type {!HTMLElement}
* @private
* @const
*/
- this.printButton_ = queryRequiredElement(this.topToolbar_, '.button.print');
+ this.printButton_ = queryRequiredElement(
+ this.topToolbar_, 'paper-button.print');
this.printButton_.addEventListener('click', this.print_.bind(this));
/**
@@ -1524,6 +1532,7 @@ SlideMode.prototype.toggleEditor = function(opt_event) {
this.stopSlideshow_();
ImageUtil.setAttribute(this.container_, 'editing', !this.isEditing());
+ this.editButtonToggleRipple_.activated = this.isEditing();
if (this.isEditing()) { // isEditing has just been flipped to a new value.
// Reset zoom.
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/integration_tests/gallery/photo_editor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698