Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: chrome/browser/resources/settings/languages_page/edit_dictionary_page.html

Issue 2792463002: [MD settings] set scroll target for custom word spellings subpage (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/settings/languages_page/edit_dictionary_page.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-list/iron-list.htm l"> 4 <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/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-input/paper-input .html"> 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html">
8 <link rel="import" href="../global_scroll_target_behavior.html">
8 <link rel="import" href="../prefs/prefs.html"> 9 <link rel="import" href="../prefs/prefs.html">
9 <link rel="import" href="../prefs/prefs_behavior.html"> 10 <link rel="import" href="../prefs/prefs_behavior.html">
10 <link rel="import" href="../settings_shared_css.html"> 11 <link rel="import" href="../settings_shared_css.html">
11 12
12 <dom-module id="settings-edit-dictionary-page"> 13 <dom-module id="settings-edit-dictionary-page">
13 <template> 14 <template>
14 <style include="settings-shared"> 15 <style include="settings-shared">
15 :host { 16 :host {
16 display: flex; 17 display: flex;
17 flex-direction: column; 18 flex-direction: column;
18 } 19 }
19 20
20 #newWord { 21 #newWord {
21 width: var(--paper-input-max-width); 22 width: var(--paper-input-max-width);
22 } 23 }
23 24
24 iron-list {
25 /* TODO(michaelpg): Size to fit the viewport. */
26 height: 300px;
27 }
28
29 iron-list .word { 25 iron-list .word {
30 flex: 1; 26 flex: 1;
31 } 27 }
32 28
33 paper-button { 29 paper-button {
34 -webkit-margin-start: 16px; 30 -webkit-margin-start: 16px;
35 } 31 }
36 </style> 32 </style>
37 <div class="settings-box first"> 33 <div class="settings-box first">
38 <iron-a11y-keys id="keys" keys="enter esc" 34 <iron-a11y-keys id="keys" keys="enter esc"
39 on-keys-pressed="onKeysPress_"></iron-a11y-keys> 35 on-keys-pressed="onKeysPress_"></iron-a11y-keys>
40 <div class="start"> 36 <div class="start">
41 <paper-input id="newWord" no-label-float value="{{newWordValue_}}" 37 <paper-input id="newWord" no-label-float value="{{newWordValue_}}"
42 label="$i18n{addDictionaryWordLabel}"></paper-input> 38 label="$i18n{addDictionaryWordLabel}"></paper-input>
43 </div> 39 </div>
44 <paper-button class="secondary-button" on-tap="onAddWordTap_" 40 <paper-button class="secondary-button" on-tap="onAddWordTap_"
45 disabled="[[!validateWord_(newWordValue_)]]" id="addWord"> 41 disabled="[[!validateWord_(newWordValue_)]]" id="addWord">
46 $i18n{addDictionaryWordButton} 42 $i18n{addDictionaryWordButton}
47 </paper-button> 43 </paper-button>
48 </div> 44 </div>
49 <div class="settings-box continuation block"> 45 <div class="settings-box continuation block">
50 <h2>$i18n{customDictionaryWords}</h2> 46 <h2>$i18n{customDictionaryWords}</h2>
51 <div class="list-frame"> 47 <div class="list-frame">
52 <template is="dom-if" if="[[hasWords_(words_.length)]]"> 48 <template is="dom-if" if="[[hasWords_(words_.length)]]">
53 <iron-list id="list" items="{{words_}}"> 49 <iron-list id="list" items="{{words_}}"
50 scroll-target="[[subpageScrollTarget]]">
54 <template> 51 <template>
55 <div class="list-item"> 52 <div class="list-item">
56 <div class="word text-elide">[[item]]</div> 53 <div class="word text-elide">[[item]]</div>
57 <paper-icon-button icon="cr:clear" on-tap="onRemoveWordTap_" 54 <paper-icon-button icon="cr:clear" on-tap="onRemoveWordTap_"
58 tabindex$="[[tabIndex]]"> 55 tabindex$="[[tabIndex]]">
59 </paper-icon-button> 56 </paper-icon-button>
60 </div> 57 </div>
61 </template> 58 </template>
62 </iron-list> 59 </iron-list>
63 </template> 60 </template>
64 <template is="dom-if" if="[[!hasWords_(words_.length)]]"> 61 <template is="dom-if" if="[[!hasWords_(words_.length)]]">
65 <div id="noWordsLabel" class="list-item"> 62 <div id="noWordsLabel" class="list-item">
66 $i18n{noCustomDictionaryWordsFound} 63 $i18n{noCustomDictionaryWordsFound}
67 </div> 64 </div>
68 </template> 65 </template>
69 </div> 66 </div>
70 </div> 67 </div>
71 </template> 68 </template>
72 <script src="edit_dictionary_page.js"></script> 69 <script src="edit_dictionary_page.js"></script>
73 </dom-module> 70 </dom-module>
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/languages_page/edit_dictionary_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698