Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | |
| 1 <link rel="import" href="chrome://resources/html/md_select_css.html"> | 2 <link rel="import" href="chrome://resources/html/md_select_css.html"> |
| 2 <link rel="import" href="chrome://resources/html/polymer.html"> | 3 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> | |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button-light.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button-light.html"> |
| 7 <link rel="import" href="/controls/settings_checkbox.html"> | |
| 8 <link rel="import" href="/icons.html"> | |
| 9 <link rel="import" href="/i18n_setup.html"> | |
| 5 <link rel="import" href="/route.html"> | 10 <link rel="import" href="/route.html"> |
| 6 <link rel="import" href="/search_engines_page/search_engines_page.html"> | 11 <link rel="import" href="/search_engines_page/search_engines_page.html"> |
| 7 <link rel="import" href="/search_engines_page/search_engines_browser_proxy.html" > | 12 <link rel="import" href="/search_engines_page/search_engines_browser_proxy.html" > |
| 8 <link rel="import" href="/settings_page/settings_animated_pages.html"> | 13 <link rel="import" href="/settings_page/settings_animated_pages.html"> |
| 9 <link rel="import" href="/settings_page/settings_subpage.html"> | 14 <link rel="import" href="/settings_page/settings_subpage.html"> |
| 10 <link rel="import" href="/settings_shared_css.html"> | 15 <link rel="import" href="/settings_shared_css.html"> |
| 11 <link rel="import" href="/settings_vars_css.html"> | 16 <link rel="import" href="/settings_vars_css.html"> |
| 12 | 17 |
| 13 <dom-module id="settings-search-page"> | 18 <dom-module id="settings-search-page"> |
| 14 <template> | 19 <template> |
| 15 <style include="settings-shared md-select"></style> | 20 <style include="settings-shared md-select"> |
| 21 iron-icon { | |
| 22 -webkit-padding-end: 16px; | |
| 23 } | |
| 24 | |
| 25 .indented { | |
| 26 -webkit-margin-start: 36px; | |
| 27 } | |
| 28 </style> | |
| 16 <settings-animated-pages id="pages" section="search"> | 29 <settings-animated-pages id="pages" section="search"> |
| 17 <neon-animatable route-path="default"> | 30 <neon-animatable route-path="default"> |
| 31 <!-- Omnibox search engine --> | |
| 18 <div class="settings-box first"> | 32 <div class="settings-box first"> |
| 19 <p class="start">$i18n{searchExplanation}</p> | 33 <p class="start">$i18n{searchExplanation}</p> |
| 20 <div> | 34 <div> |
| 21 <select class="md-select" on-change="onChange_"> | 35 <select class="md-select" on-change="onChange_"> |
| 22 <template is="dom-repeat" items="[[searchEngines_]]"> | 36 <template is="dom-repeat" items="[[searchEngines_]]"> |
| 23 <option selected$="[[item.default]]">[[item.name]]</option> | 37 <option selected$="[[item.default]]">[[item.name]]</option> |
| 24 </template> | 38 </template> |
| 25 </select> | 39 </select> |
| 26 <span class="md-select-underline"></span> | 40 <span class="md-select-underline"></span> |
| 27 </div> | 41 </div> |
| 28 </div> | 42 </div> |
| 43 | |
| 44 <template is="dom-if" if="[[hotwordInfo_.allowed]]"> | |
| 45 <!-- Hotword (OK Google) --> | |
| 46 <div class="settings-box two-line"> | |
| 47 <settings-checkbox id="hotwordSearchEnable" class="start" | |
| 48 label="$i18n{searchOkGoogleLabel}" | |
| 49 sub-label="[[getHotwordSearchEnableSubLabel_( | |
| 50 hotwordInfo_.alwaysOn)]]" | |
| 51 pref="{{hotwordSearchEnablePref_}}" | |
| 52 on-change="onHotwordSearchEnableChange_"> | |
| 53 <a href="$i18nRaw{hotwordLearnMoreUrl}" target="_blank" | |
| 54 on-tap="doNothing_"> | |
| 55 $i18n{learnMore}. | |
|
michaelpg
2016/11/27 22:25:36
"." should be part of i18n if it's required. "Lear
stevenjb
2016/11/28 20:53:36
Switched to a hotword specific string.
| |
| 56 </a> | |
| 57 </settings-checkbox> | |
| 58 <div class="secondary-action" | |
| 59 hidden$="[[!getShowHotwordSearchRetrain_(hotwordInfo_.*)]]"> | |
| 60 <paper-button on-tap="onRetrainTap_" class="secondary-button"> | |
| 61 $i18n{searchOkGoogleRetrain} | |
| 62 </paper-button> | |
| 63 </div> | |
| 64 </div> | |
| 65 | |
| 66 <template is="dom-if" | |
| 67 if="[[getShowHotwordError_(hotwordInfo_.*, | |
| 68 hotwordSearchEnablePref_)]]"> | |
| 69 <div class="settings-box continuation indented"> | |
| 70 <iron-icon icon="settings:warning"></iron-icon> | |
| 71 <div inner-h-t-m-l="[[hotwordInfo_.errorMessage]]"</div> | |
|
michaelpg
2016/11/27 22:25:35
missing >
stevenjb
2016/11/28 20:53:36
<grumble>sloppy html parsing</grumble>
Done.
| |
| 72 </div> | |
| 73 </template> | |
| 74 | |
| 75 <template is="dom-if" if="[[hotwordInfo_.historyEnabled]]"> | |
| 76 <div class="settings-box two-line continuation indented" | |
| 77 on-tap="onManageAudioHistoryTap_" actionable> | |
| 78 <div class="start"> | |
| 79 <div>[[i18n('searchOkGoogleAudioHistoryLabel', | |
|
michaelpg
2016/11/27 22:25:34
nit: if [[]] has to break, can those be separate l
stevenjb
2016/11/28 20:53:36
Done.
| |
| 80 hotwordInfo_.userName)]]</div> | |
| 81 <div class="secondary">$i18n{searchOkGoogleAudioHistorySubtext} | |
| 82 </div> | |
| 83 </div> | |
| 84 <button class="icon-external" is="paper-icon-button-light"> | |
| 85 </button> | |
| 86 </div> | |
| 87 </template> | |
| 88 </template> | |
| 89 | |
| 90 <!-- Manage search engines --> | |
| 29 <div id="subpage-trigger" class="settings-box two-line" | 91 <div id="subpage-trigger" class="settings-box two-line" |
| 30 on-tap="onManageSearchEnginesTap_" actionable> | 92 on-tap="onManageSearchEnginesTap_" actionable> |
| 31 <div class="start"> | 93 <div class="start"> |
| 32 $i18n{searchEnginesManage} | 94 $i18n{searchEnginesManage} |
| 33 <div class="secondary"> | 95 <div class="secondary"> |
| 34 $i18n{searchEnginesManageDescription} | 96 $i18n{searchEnginesManageDescription} |
| 35 </div> | 97 </div> |
| 36 </div> | 98 </div> |
| 37 <button class="subpage-arrow" is="paper-icon-button-light"></button> | 99 <button class="subpage-arrow" is="paper-icon-button-light"></button> |
| 38 </div> | 100 </div> |
| 39 </neon-animatable> | 101 </neon-animatable> |
| 40 <template is="dom-if" route-path="/searchEngines"> | 102 <template is="dom-if" route-path="/searchEngines"> |
| 41 <settings-subpage | 103 <settings-subpage |
| 42 associated-control="[[$$('#subpage-trigger')]]" | 104 associated-control="[[$$('#subpage-trigger')]]" |
| 43 page-title="$i18n{searchEnginesManage}"> | 105 page-title="$i18n{searchEnginesManage}"> |
| 44 <settings-search-engines-page></settings-search-engines-page> | 106 <settings-search-engines-page></settings-search-engines-page> |
| 45 </settings-subpage> | 107 </settings-subpage> |
| 46 </template> | 108 </template> |
| 47 </settings-animated-pages> | 109 </settings-animated-pages> |
| 48 </template> | 110 </template> |
| 49 <script src="search_page.js"></script> | 111 <script src="search_page.js"></script> |
| 50 </dom-module> | 112 </dom-module> |
| OLD | NEW |