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

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

Issue 2004263002: [Do not commit] MD History: Experimentally implement cr-toolbar using cr-search-field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 properties: {
9 // Name to display in the toolbar, in titlecase.
10 pageName: String,
11 // Prompt text to display in the search field.
12 searchPrompt: String,
13 // Tooltip to display on the clear search button.
14 clearLabel: String,
15
16 showingSearch_: {
17 type: Boolean,
18 reflectToAttribute: true
19 }
20 },
21
22 /** @private */
23 onInputBlur_: function() {
24 if (!this.hasSearchText_)
25 this.showingSearch_ = false;
26 },
27
28 /** @private */
29 onMenuClick_: function(e) {
30 this.fire('cr-toolbar-menu-click');
31 },
32
33 /**
34 * @param {Event} e
35 * @private
36 */
37 showSearch_: function(e) {
38 if (e.target != this.$.clearSearch)
39 this.showingSearch_ = true;
40 }
41 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698