| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html
"> | 1 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html
"> |
| 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 2 <link rel="import" href="chrome://resources/html/polymer.html"> | 3 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 4 <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/iron-list/iron-list.htm
l"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> |
| 4 <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/iron-icon/iron-icon.htm
l"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch
eckbox.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch
eckbox.html"> |
| 6 <link rel="import" href="languages.html"> | 8 <link rel="import" href="languages.html"> |
| 7 <link rel="import" href="../settings_shared_css.html"> | 9 <link rel="import" href="../settings_shared_css.html"> |
| 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
| 11 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
-container.html"> |
| 8 | 12 |
| 9 <dom-module id="settings-add-languages-dialog"> | 13 <dom-module id="settings-add-languages-dialog"> |
| 10 <template> | 14 <template> |
| 11 <style include="settings-shared"> | 15 <style include="settings-shared"> |
| 12 dialog { | 16 dialog { |
| 13 display: flex; | 17 display: flex; |
| 14 flex-direction: column; | 18 flex-direction: column; |
| 15 } | 19 } |
| 16 | 20 |
| 17 .body { | 21 .body { |
| 22 -webkit-padding-end: 0 !important; |
| 18 display: flex; | 23 display: flex; |
| 19 flex-direction: column; | 24 flex-direction: column; |
| 20 max-height: 250px; | 25 max-height: 250px; |
| 21 overflow: auto; | 26 overflow: auto; |
| 22 } | 27 } |
| 23 | 28 |
| 29 paper-input-container { |
| 30 -webkit-padding-end: 24px; |
| 31 padding-top: 4px; |
| 32 } |
| 33 |
| 24 .ripple-padding { | 34 .ripple-padding { |
| 25 /* Create a little extra space for checkbox ink ripple to flow into. */ | 35 /* Create a little extra space for checkbox ink ripple to flow into. */ |
| 26 -webkit-padding-start: 20px; | 36 -webkit-padding-start: 20px; |
| 27 } | 37 } |
| 28 </style> | 38 </style> |
| 29 <dialog is="cr-dialog" id="dialog" close-text="$i18n{close}"> | 39 <dialog is="cr-dialog" id="dialog" close-text="$i18n{close}"> |
| 30 <div class="title">$i18n{addLanguagesDialogTitle}</div> | 40 <div class="title">$i18n{addLanguagesDialogTitle}</div> |
| 31 <div class="body"> | 41 <div class="body"> |
| 32 <!-- TODO(michaelpg): Dynamic language search/filtering. --> | 42 <paper-input-container no-label-float> |
| 33 <iron-list class="ripple-padding" scroll-target="[[$$('.body')]]" | 43 <iron-icon id="searchIcon" icon="cr:search" prefix></iron-icon> |
| 44 <input is="iron-input" bind-value="{{filterValue_}}"></input> |
| 45 </paper-input-container> |
| 46 <iron-list class="ripple-padding" |
| 47 scroll-target="[[$$('.ripple-padding')]]" |
| 34 items="[[getAvailableLanguages_( | 48 items="[[getAvailableLanguages_( |
| 35 languages.supported, languages.enabled.*)]]"> | 49 languages.supported, languages.enabled.*, filterValue_)]]"> |
| 36 <template> | 50 <template> |
| 37 <paper-checkbox class="list-item" checked="[[willAdd_(item.code)]]" | 51 <paper-checkbox class="list-item" checked="[[willAdd_(item.code)]]" |
| 38 title$="[[item.nativeDisplayName]]" | 52 title$="[[item.nativeDisplayName]]" |
| 39 on-change="onLanguageCheckboxChange_" | 53 on-change="onLanguageCheckboxChange_" |
| 40 tabindex$="[[tabIndex]]"> | 54 tabindex$="[[tabIndex]]"> |
| 41 [[item.displayName]] | 55 [[item.displayName]] |
| 42 </paper-checkbox> | 56 </paper-checkbox> |
| 43 </template> | 57 </template> |
| 44 </iron-list> | 58 </iron-list> |
| 45 </div> | 59 </div> |
| 46 <div class="button-container"> | 60 <div class="button-container"> |
| 47 <div class="action-buttons"> | 61 <div class="action-buttons"> |
| 48 <paper-button class="cancel-button" on-tap="onCancelButtonTap_"> | 62 <paper-button class="cancel-button" on-tap="onCancelButtonTap_"> |
| 49 $i18n{cancel} | 63 $i18n{cancel} |
| 50 </paper-button> | 64 </paper-button> |
| 51 <paper-button class="action-button" on-tap="onActionButtonTap_" | 65 <paper-button class="action-button" on-tap="onActionButtonTap_" |
| 52 disabled="[[disableActionButton_]]"> | 66 disabled="[[disableActionButton_]]"> |
| 53 $i18n{add} | 67 $i18n{add} |
| 54 </paper-button> | 68 </paper-button> |
| 55 </div> | 69 </div> |
| 56 </div> | 70 </div> |
| 57 </dialog> | 71 </dialog> |
| 58 </template> | 72 </template> |
| 59 <script src="add_languages_dialog.js"></script> | 73 <script src="add_languages_dialog.js"></script> |
| 60 </dom-module> | 74 </dom-module> |
| OLD | NEW |