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

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

Issue 2626973004: Fix the tooltip for thumbnail view option in gallery on tabbing (Closed)
Patch Set: Fix the tooltip for second review iteration Created 3 years, 11 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/gallery.html ('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/gallery.js
diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js
index 1bbde3214667fb4923938b0c8da90762a0dce4e4..79cae82a7e9e5005d5cdd7197ff033f1f57fe77e 100644
--- a/ui/file_manager/gallery/js/gallery.js
+++ b/ui/file_manager/gallery/js/gallery.js
@@ -506,6 +506,7 @@ Gallery.prototype.setCurrentMode_ = function(mode) {
this.container_.setAttribute('mode', this.currentMode_.getName());
this.updateSelectionAndState_();
+ this.updateModeButtonAttribute_();
};
/**
@@ -538,6 +539,17 @@ Gallery.prototype.onChangeToSlideMode_ = function() {
};
/**
+ * Update attributes of slide/thumbnail toggle button
+ * @private
+ */
+Gallery.prototype.updateModeButtonAttribute_ = function() {
+ if (this.currentMode_ === this.slideMode_)
+ this.modeSwitchButton_.setAttribute("aria-label", str("GALLERY_THUMBNAIL"));
+ else
+ this.modeSwitchButton_.setAttribute("aria-label", str("GALLERY_SLIDE"));
+};
+
+/**
* Change current mode.
* @param {!(SlideMode|ThumbnailMode)} mode Target mode.
* @param {Event=} opt_event Event that caused this call.
« no previous file with comments | « ui/file_manager/gallery/gallery.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698