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

Side by Side Diff: chrome/browser/resources/md_downloads/toolbar.js

Issue 2271513002: MD Downloads: fix 'More actions...' menu in RTL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('downloads', function() { 5 cr.define('downloads', function() {
6 var Toolbar = Polymer({ 6 var Toolbar = Polymer({
7 is: 'downloads-toolbar', 7 is: 'downloads-toolbar',
8 8
9 attached: function() {
10 // isRTL() only works after i18n_template.js runs to set <html dir>.
11 this.overflowAlign_ = isRTL() ? 'left' : 'right';
12 },
13
14 properties: { 9 properties: {
15 downloadsShowing: { 10 downloadsShowing: {
16 reflectToAttribute: true, 11 reflectToAttribute: true,
17 type: Boolean, 12 type: Boolean,
18 value: false, 13 value: false,
19 observer: 'downloadsShowingChanged_', 14 observer: 'downloadsShowingChanged_',
20 }, 15 },
21
22 overflowAlign_: {
23 type: String,
24 value: 'right',
25 },
26 }, 16 },
27 17
28 listeners: { 18 listeners: {
29 'paper-dropdown-close': 'onPaperDropdownClose_', 19 'paper-dropdown-close': 'onPaperDropdownClose_',
30 'paper-dropdown-open': 'onPaperDropdownOpen_', 20 'paper-dropdown-open': 'onPaperDropdownOpen_',
31 }, 21 },
32 22
33 /** @return {boolean} Whether removal can be undone. */ 23 /** @return {boolean} Whether removal can be undone. */
34 canUndo: function() { 24 canUndo: function() {
35 return this.$['search-input'] != this.shadowRoot.activeElement; 25 return this.$['search-input'] != this.shadowRoot.activeElement;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 92
103 /** @private */ 93 /** @private */
104 updateClearAll_: function() { 94 updateClearAll_: function() {
105 this.$$('#actions .clear-all').hidden = !this.canClearAll(); 95 this.$$('#actions .clear-all').hidden = !this.canClearAll();
106 this.$$('paper-menu .clear-all').hidden = !this.canClearAll(); 96 this.$$('paper-menu .clear-all').hidden = !this.canClearAll();
107 }, 97 },
108 }); 98 });
109 99
110 return {Toolbar: Toolbar}; 100 return {Toolbar: Toolbar};
111 }); 101 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/toolbar.html ('k') | chrome/browser/resources/md_downloads/vulcanized.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698