OLD | NEW |
---|---|
1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-input/iron-input.h tml"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-input/iron-input.h tml"> |
3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html"> |
5 <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_searc h_field_behavior.html"> | 5 <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_searc h_field_behavior.html"> |
6 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 6 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
7 | 7 |
8 <dom-module id="cr-toolbar-search-field"> | 8 <dom-module id="cr-toolbar-search-field"> |
9 <template> | 9 <template> |
10 <style> | 10 <style> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 | 75 |
76 /* Any layout, search open. */ | 76 /* Any layout, search open. */ |
77 :host([showing-search]) { | 77 :host([showing-search]) { |
78 width: 100%; | 78 width: 100%; |
79 } | 79 } |
80 | 80 |
81 :host([narrow][showing-search]) #icon { | 81 :host([narrow][showing-search]) #icon { |
82 -webkit-margin-start: 18px; | 82 -webkit-margin-start: 18px; |
83 } | 83 } |
84 </style> | 84 </style> |
85 <paper-icon-button id="icon" icon="cr:search" | 85 <paper-icon-button id="icon" icon="cr:search" title="[[label]]" |
86 title="[[label]]"> | 86 tabindex$="[[computeIconTabIndex_(narrow)]]"> |
87 </paper-icon-button> | 87 </paper-icon-button> |
88 <paper-input-container on-search="onSearchTermSearch_" | 88 <paper-input-container on-search="onSearchTermSearch_" |
89 on-keydown="onSearchTermKeydown_" no-label-float> | 89 on-keydown="onSearchTermKeydown_" on-keypress="onSearchTermKeypress_" |
dpapad
2016/05/31 18:57:58
It is confusing that onSearchTermKeydown_ is a ref
tsergeant
2016/06/01 01:20:49
Good point, done.
| |
90 no-label-float> | |
90 <label id="prompt" for="searchInput">[[label]]</label> | 91 <label id="prompt" for="searchInput">[[label]]</label> |
91 <input is="iron-input" id="searchInput" type="search" | 92 <input is="iron-input" id="searchInput" type="search" |
92 on-blur="onInputBlur_" incremental></input> | 93 on-blur="onInputBlur_" incremental></input> |
93 </paper-input-container> | 94 </paper-input-container> |
94 <paper-icon-button icon="cr:cancel" id="clearSearch" | 95 <paper-icon-button icon="cr:cancel" id="clearSearch" |
95 title="[[clearLabel]]" hidden$="[[!hasSearchText]]" | 96 title="[[clearLabel]]" hidden$="[[!hasSearchText]]" |
96 on-tap="hideSearch_"> | 97 on-tap="hideSearch_"> |
97 </paper-icon-button> | 98 </paper-icon-button> |
98 </template> | 99 </template> |
99 <script src="cr_toolbar_search_field.js"></script> | 100 <script src="cr_toolbar_search_field.js"></script> |
100 </dom-module> | 101 </dom-module> |
OLD | NEW |