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

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

Issue 2284463002: MD Downloads: fix search spinner when terms are the same (Closed)
Patch Set: tsergeant@ review / test fix Created 4 years, 3 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 properties: { 9 properties: {
10 downloadsShowing: { 10 downloadsShowing: {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 this.boundClose_ = this.boundClose_ || this.closeMoreActions_.bind(this); 80 this.boundClose_ = this.boundClose_ || this.closeMoreActions_.bind(this);
81 window.addEventListener('resize', this.boundClose_); 81 window.addEventListener('resize', this.boundClose_);
82 }, 82 },
83 83
84 /** 84 /**
85 * @param {!CustomEvent} event 85 * @param {!CustomEvent} event
86 * @private 86 * @private
87 */ 87 */
88 onSearchChanged_: function(event) { 88 onSearchChanged_: function(event) {
89 var actionService = downloads.ActionService.getInstance(); 89 var actionService = downloads.ActionService.getInstance();
90 actionService.search(/** @type {string} */ (event.detail)); 90 if (actionService.search(/** @type {string} */ (event.detail)))
91 this.spinnerActive = actionService.isSearching(); 91 this.spinnerActive = actionService.isSearching();
92 this.updateClearAll_(); 92 this.updateClearAll_();
93 }, 93 },
94 94
95 /** @private */ 95 /** @private */
96 onOpenDownloadsFolderTap_: function() { 96 onOpenDownloadsFolderTap_: function() {
97 downloads.ActionService.getInstance().openDownloadsFolder(); 97 downloads.ActionService.getInstance().openDownloadsFolder();
98 }, 98 },
99 99
100 /** @private */ 100 /** @private */
101 updateClearAll_: function() { 101 updateClearAll_: function() {
102 this.$$('paper-menu .clear-all').hidden = !this.canClearAll(); 102 this.$$('paper-menu .clear-all').hidden = !this.canClearAll();
103 }, 103 },
104 }); 104 });
105 105
106 return {Toolbar: Toolbar}; 106 return {Toolbar: Toolbar};
107 }); 107 });
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