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

Side by Side Diff: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.js

Issue 1963503002: MD WebUI: Add shared cr-toolbar element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor tweaks Created 4 years, 7 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
(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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698