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

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

Issue 1385113002: MD Downloads: a step toward better RTL support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/resources/md_downloads/toolbar.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Polymer = {dom: 'shadow'}; 5 Polymer = {dom: 'shadow'};
6 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 6 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
7 // Use of this source code is governed by a BSD-style license that can be 7 // Use of this source code is governed by a BSD-style license that can be
8 // found in the LICENSE file. 8 // found in the LICENSE file.
9 9
10 /** 10 /**
(...skipping 15327 matching lines...) Expand 10 before | Expand all | Expand 10 after
15338 }); 15338 });
15339 // Copyright 2015 The Chromium Authors. All rights reserved. 15339 // Copyright 2015 The Chromium Authors. All rights reserved.
15340 // Use of this source code is governed by a BSD-style license that can be 15340 // Use of this source code is governed by a BSD-style license that can be
15341 // found in the LICENSE file. 15341 // found in the LICENSE file.
15342 15342
15343 cr.define('downloads', function() { 15343 cr.define('downloads', function() {
15344 var Toolbar = Polymer({ 15344 var Toolbar = Polymer({
15345 is: 'downloads-toolbar', 15345 is: 'downloads-toolbar',
15346 15346
15347 attached: function() { 15347 attached: function() {
15348 // isRTL() only works after i18n_template.js runs to set <html dir>.
15349 this.overflowAlign_ = isRTL() ? 'left' : 'right';
15350
15348 /** @private {!SearchFieldDelegate} */ 15351 /** @private {!SearchFieldDelegate} */
15349 this.searchFieldDelegate_ = new ToolbarSearchFieldDelegate(this); 15352 this.searchFieldDelegate_ = new ToolbarSearchFieldDelegate(this);
15350 this.$['search-input'].setDelegate(this.searchFieldDelegate_); 15353 this.$['search-input'].setDelegate(this.searchFieldDelegate_);
15351 }, 15354 },
15352 15355
15353 properties: { 15356 properties: {
15354 downloadsShowing: { 15357 downloadsShowing: {
15355 reflectToAttribute: true, 15358 reflectToAttribute: true,
15356 type: Boolean, 15359 type: Boolean,
15357 value: false, 15360 value: false,
15358 observer: 'onDownloadsShowingChange_', 15361 observer: 'onDownloadsShowingChange_',
15359 }, 15362 },
15363
15364 overflowAlign_: {
15365 type: String,
15366 value: 'right',
15367 },
15360 }, 15368 },
15361 15369
15362 /** @return {boolean} Whether removal can be undone. */ 15370 /** @return {boolean} Whether removal can be undone. */
15363 canUndo: function() { 15371 canUndo: function() {
15364 return this.$['search-input'] != this.shadowRoot.activeElement; 15372 return this.$['search-input'] != this.shadowRoot.activeElement;
15365 }, 15373 },
15366 15374
15367 /** @return {boolean} Whether "Clear all" should be allowed. */ 15375 /** @return {boolean} Whether "Clear all" should be allowed. */
15368 canClearAll: function() { 15376 canClearAll: function() {
15369 return !this.$['search-input'].getValue() && this.downloadsShowing; 15377 return !this.$['search-input'].getValue() && this.downloadsShowing;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
15635 }; 15643 };
15636 15644
15637 Manager.onLoad = function() { 15645 Manager.onLoad = function() {
15638 document.querySelector('downloads-manager').onLoad_(); 15646 document.querySelector('downloads-manager').onLoad_();
15639 }; 15647 };
15640 15648
15641 return {Manager: Manager}; 15649 return {Manager: Manager};
15642 }); 15650 });
15643 15651
15644 window.addEventListener('load', downloads.Manager.onLoad); 15652 window.addEventListener('load', downloads.Manager.onLoad);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/md_downloads/toolbar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698