Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 Polymer({ | |
| 6 is: 'cr-toolbar', | |
| 7 | |
| 8 behaviors: [CrSearchFieldBehavior], | |
| 9 | |
| 10 properties: { | |
| 11 // Name to display in the toolbar, in titlecase. | |
| 12 pageName: String, | |
| 13 // Prompt text to display in the search field. | |
| 14 searchPrompt: String, | |
| 15 // Tooltip to display on the clear search button. | |
| 16 clearLabel: String, | |
| 17 }, | |
| 18 | |
| 19 onInputBlur_: function(e) { | |
| 20 if (!this.hasSearchText_) | |
| 21 this.showingSearch_ = false; | |
| 22 }, | |
| 23 | |
| 24 showSearch_: function(e) { | |
| 25 if (e.target != this.$['clear-search']) | |
|
dpapad
2016/05/18 23:39:13
Nit (optional): Change id to clearSearch, such tha
tsergeant
2016/05/19 07:11:55
I was sticking with the style used in cr-search-fi
| |
| 26 this.showingSearch_ = true; | |
| 27 }, | |
| 28 | |
| 29 computeLowerPageName_: function(name) { | |
|
dpapad
2016/05/18 23:39:14
Type annotations for parameter and return value mi
tsergeant
2016/05/19 07:11:55
oops, that function is dead code. So, uh
Done.
| |
| 30 return name.toLowerCase(); | |
| 31 } | |
| 32 }); | |
| OLD | NEW |