| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 2 <link rel="import" href="chrome://resources/html/polymer.html"> | 2 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys/iron-a11
y-keys.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys/iron-a11
y-keys.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> |
| 6 <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-button/paper-butt
on.html"> |
| 7 <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-icon-button/paper
-icon-button.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> |
| 9 <link rel="import" href="/settings_shared_css.html"> | 9 <link rel="import" href="/settings_shared_css.html"> |
| 10 | 10 |
| 11 <dom-module id="settings-edit-dictionary-page"> | 11 <dom-module id="settings-edit-dictionary-page"> |
| 12 <template> | 12 <template> |
| 13 <style include="settings-shared"> | 13 <style include="settings-shared"> |
| 14 :host { | 14 :host { |
| 15 display: flex; | 15 display: flex; |
| 16 flex-direction: column; | 16 flex-direction: column; |
| 17 } | 17 } |
| 18 | 18 |
| 19 #addWordRow { | |
| 20 display: flex; | |
| 21 } | |
| 22 | |
| 23 #newWord { | 19 #newWord { |
| 24 flex: .5; | 20 flex: .5; |
| 25 } | 21 } |
| 26 | 22 |
| 27 iron-list { | 23 iron-list { |
| 28 /* TODO(michaelpg): Size to fit the viewport. */ | 24 /* TODO(michaelpg): Size to fit the viewport. */ |
| 29 height: 300px; | 25 height: 300px; |
| 30 } | 26 } |
| 31 | 27 |
| 32 iron-list .word { | 28 iron-list .word { |
| 33 flex: 1; | 29 flex: 1; |
| 34 } | 30 } |
| 31 |
| 32 paper-button { |
| 33 -webkit-margin-start: 16px; |
| 34 } |
| 35 </style> | 35 </style> |
| 36 <div class="settings-box block"> | 36 <div class="settings-box"> |
| 37 <div id="addWordRow"> | 37 <iron-a11y-keys id="keys" keys="enter esc" |
| 38 <iron-a11y-keys id="keys" keys="enter esc" | 38 on-keys-pressed="onKeysPress_"></iron-a11y-keys> |
| 39 on-keys-pressed="onKeysPress_"></iron-a11y-keys> | 39 <paper-input id="newWord" no-label-float |
| 40 <paper-input id="newWord" no-label-float | 40 label="$i18n{addDictionaryWordLabel}"></paper-input> |
| 41 label="$i18n{addDictionaryWordLabel}"></paper-input> | 41 <paper-button on-tap="onAddWordTap_"> |
| 42 <paper-button on-tap="onAddWordTap_"> | 42 $i18n{addDictionaryWordButton} |
| 43 $i18n{addDictionaryWordButton} | 43 </paper-button> |
| 44 </paper-button> | |
| 45 </div> | |
| 46 </div> | 44 </div> |
| 47 <div class="settings-box block"> | 45 <div class="settings-box block"> |
| 48 <h2>$i18n{customDictionaryWords}</h2> | 46 <h2>$i18n{customDictionaryWords}</h2> |
| 49 <div class="list-frame"> | 47 <div class="list-frame"> |
| 50 <iron-list id="list" items="{{words_}}"> | 48 <iron-list id="list" items="{{words_}}"> |
| 51 <template> | 49 <template> |
| 52 <div class="list-item"> | 50 <div class="list-item"> |
| 53 <div class="word">[[item]]</div> | 51 <div class="word">[[item]]</div> |
| 54 <paper-icon-button icon="cr:clear" on-tap="onRemoveWordTap_"> | 52 <paper-icon-button icon="cr:clear" on-tap="onRemoveWordTap_"> |
| 55 </paper-icon-button> | 53 </paper-icon-button> |
| 56 </div> | 54 </div> |
| 57 </template> | 55 </template> |
| 58 </iron-list> | 56 </iron-list> |
| 59 </div> | 57 </div> |
| 60 </div> | 58 </div> |
| 61 </template> | 59 </template> |
| 62 <script src="edit_dictionary_page.js"></script> | 60 <script src="edit_dictionary_page.js"></script> |
| 63 </dom-module> | 61 </dom-module> |
| OLD | NEW |