Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!-- TODO(crbug.com/603217): Use i18n instead of string literals. Figure out | 1 <!-- TODO(crbug.com/603217): Use i18n instead of string literals. Figure out |
| 2 what i18n to use for keypad, ie, does 1 ABC make | 2 what i18n to use for keypad, ie, does 1 ABC make |
| 3 sense in every scenario? --> | 3 sense in every scenario? --> |
| 4 | 4 |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/paper-styl es.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/paper-styl es.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h tml"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h tml"> |
| 9 | 9 |
| 10 <dom-module id="pin-keyboard"> | 10 <dom-module id="pin-keyboard"> |
|
xiyuan
2016/06/21 20:16:24
Can we add some document for this polymer element?
jdufault
2016/06/22 22:58:53
Done.
| |
| 11 <template> | 11 <template> |
| 12 <style> | 12 <style> |
| 13 #root { | 13 #root { |
| 14 display: flex; | 14 display: flex; |
| 15 } | 15 } |
| 16 | 16 |
| 17 /* TODO(jdufault): Remove this CSS once we inline the PIN element with the | 17 /* TODO(jdufault): Remove this CSS once we inline the PIN element with the |
| 18 * user-pod. */ | 18 * user-pod. */ |
| 19 #container-constrained-width { | 19 #container-constrained-width { |
| 20 -webkit-tap-highlight-color: transparent; | 20 -webkit-tap-highlight-color: transparent; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 * simplifies the event handler code. */ | 91 * simplifies the event handler code. */ |
| 92 paper-button * { | 92 paper-button * { |
| 93 pointer-events: none; | 93 pointer-events: none; |
| 94 } | 94 } |
| 95 </style> | 95 </style> |
| 96 | 96 |
| 97 <div id="root"> | 97 <div id="root"> |
| 98 <div id="container-constrained-width"> | 98 <div id="container-constrained-width"> |
| 99 <div class="row horizontal-center"> | 99 <div class="row horizontal-center"> |
| 100 <input id="pin-input" type="number" placeholder="Enter PIN" | 100 <input id="pin-input" type="number" placeholder="Enter PIN" |
| 101 value="{{value::input}}" | |
| 101 on-keydown="onInputKeyDown_"></input> | 102 on-keydown="onInputKeyDown_"></input> |
| 102 </div> | 103 </div> |
| 103 | 104 |
| 104 <div class="row keyboard"> | 105 <div class="row keyboard"> |
| 105 <paper-button class="digit-button" on-tap="onNumberTap_" value="1"> | 106 <paper-button class="digit-button" on-tap="onNumberTap_" value="1"> |
| 106 <inner-text>1</inner-text> | 107 <inner-text>1</inner-text> |
| 107 </paper-button> | 108 </paper-button> |
| 108 <paper-button class="digit-button" on-tap="onNumberTap_" value="2"> | 109 <paper-button class="digit-button" on-tap="onNumberTap_" value="2"> |
| 109 <inner-text>2<subhead>ABC</subhead></inner-text> | 110 <inner-text>2<subhead>ABC</subhead></inner-text> |
| 110 </paper-button> | 111 </paper-button> |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 134 <inner-text>9<subhead>WXYZ</subhead></inner-text> | 135 <inner-text>9<subhead>WXYZ</subhead></inner-text> |
| 135 </paper-button> | 136 </paper-button> |
| 136 </div> | 137 </div> |
| 137 <div class="row keyboard"> | 138 <div class="row keyboard"> |
| 138 <div class="digit-button"></div> | 139 <div class="digit-button"></div> |
| 139 <paper-button class="digit-button" on-tap="onNumberTap_" value="0"> | 140 <paper-button class="digit-button" on-tap="onNumberTap_" value="0"> |
| 140 <inner-text>0</inner-text> | 141 <inner-text>0</inner-text> |
| 141 </paper-button> | 142 </paper-button> |
| 142 <div class="digit-button"> | 143 <div class="digit-button"> |
| 143 <paper-icon-button class="digit-button submit-button" | 144 <paper-icon-button class="digit-button submit-button" |
| 144 icon="icons:check" on-tap="onPinSubmit_"> | 145 icon="icons:check" on-tap="firePinSubmitEvent_"> |
| 145 </paper-icon-button> | 146 </paper-icon-button> |
| 146 </div> | 147 </div> |
| 147 </div> | 148 </div> |
| 148 </div> | 149 </div> |
| 149 </div> | 150 </div> |
| 150 </template> | 151 </template> |
| 151 <script src="pin_keyboard.js"></script> | 152 <script src="pin_keyboard.js"></script> |
| 152 </dom-module> | 153 </dom-module> |
| OLD | NEW |