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/cr_scrollable_behavior.h
tml"> | 2 <link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.h
tml"> |
3 <link rel="import" href="chrome://resources/html/cr.html"> | 3 <link rel="import" href="chrome://resources/html/cr.html"> |
4 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | 4 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
5 <link rel="import" href="chrome://resources/html/md_select_css.html"> | 5 <link rel="import" href="chrome://resources/html/md_select_css.html"> |
6 <link rel="import" href="chrome://resources/html/polymer.html"> | 6 <link rel="import" href="chrome://resources/html/polymer.html"> |
7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys/iron-a11
y-keys.html"> | |
8 <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"> |
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-texta
rea.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-texta
rea.html"> |
10 <link rel="import" href="../settings_shared_css.html"> | 9 <link rel="import" href="../settings_shared_css.html"> |
11 <link rel="import" href="../settings_vars_css.html"> | 10 <link rel="import" href="../settings_vars_css.html"> |
12 | 11 |
13 <dom-module id="settings-address-edit-dialog"> | 12 <dom-module id="settings-address-edit-dialog"> |
14 <template> | 13 <template> |
15 <style include="settings-shared md-select"> | 14 <style include="settings-shared md-select"> |
16 :host { | 15 :host { |
17 --iron-autogrow-textarea: { | 16 --iron-autogrow-textarea: { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 .long { | 51 .long { |
53 width: var(--paper-input-max-width); | 52 width: var(--paper-input-max-width); |
54 } | 53 } |
55 | 54 |
56 #saveButton { | 55 #saveButton { |
57 -webkit-margin-start: 8px; | 56 -webkit-margin-start: 8px; |
58 } | 57 } |
59 | 58 |
60 #dialog { | 59 #dialog { |
61 --cr-dialog-body-container: { | 60 --cr-dialog-body-container: { |
62 max-height: 450px; | 61 max-height: 450px; |
63 }; | 62 }; |
64 } | 63 } |
65 | 64 |
66 @media all and (max-height: 714px) { | 65 @media all and (max-height: 714px) { |
67 #dialog { | 66 #dialog { |
68 --cr-dialog-body-container: { | 67 --cr-dialog-body-container: { |
69 max-height: 270px; | 68 max-height: 270px; |
70 }; | 69 }; |
71 } | 70 } |
72 } | 71 } |
73 | 72 |
74 paper-textarea { | 73 paper-textarea { |
75 /** | 74 /** |
76 * Workaround for iron-autogrow-textarea's display:inline-block creating | 75 * Workaround for iron-autogrow-textarea's display:inline-block creating |
77 * too much vertical space than intended. | 76 * too much vertical space than intended. |
78 */ | 77 */ |
79 --layout-relative : { | 78 --layout-relative : { |
(...skipping 13 matching lines...) Expand all Loading... |
93 value="{{item.value}}" on-value-changed="updateCanSave_" | 92 value="{{item.value}}" on-value-changed="updateCanSave_" |
94 class$="address-column [[long_(item)]]" always-float-label | 93 class$="address-column [[long_(item)]]" always-float-label |
95 autofocus> | 94 autofocus> |
96 </paper-textarea> | 95 </paper-textarea> |
97 </template> | 96 </template> |
98 <template is="dom-if" if="[[!item.isTextArea]]"> | 97 <template is="dom-if" if="[[!item.isTextArea]]"> |
99 <paper-input type="text" label="[[item.component.fieldName]]" | 98 <paper-input type="text" label="[[item.component.fieldName]]" |
100 always-float-label autofocus value="{{item.value}}" | 99 always-float-label autofocus value="{{item.value}}" |
101 on-value-changed="updateCanSave_" | 100 on-value-changed="updateCanSave_" |
102 class$="address-column [[long_(item)]]"> | 101 class$="address-column [[long_(item)]]"> |
103 <iron-a11y-keys keys="enter" | |
104 on-keys-pressed="onSaveButtonTap_"> | |
105 </iron-a11y-keys> | |
106 </paper-input> | 102 </paper-input> |
107 </template> | 103 </template> |
108 </template> | 104 </template> |
109 </div> | 105 </div> |
110 </template> | 106 </template> |
111 <div id="select-row" class="address-row"> | 107 <div id="select-row" class="address-row"> |
112 <div id="select-label">$i18n{addressCountry}</div> | 108 <div id="select-label">$i18n{addressCountry}</div> |
113 <span class="md-select-wrapper"> | 109 <span class="md-select-wrapper"> |
114 <select class="md-select address-column long" | 110 <select class="md-select address-column long" |
115 value="[[countryCode_]]" on-change="onCountryChange_"> | 111 value="[[countryCode_]]" on-change="onCountryChange_"> |
116 <option value=""></option> | 112 <option value=""></option> |
117 <template is="dom-repeat" items="[[countries_]]"> | 113 <template is="dom-repeat" items="[[countries_]]"> |
118 <option value="[[getCode_(item)]]" | 114 <option value="[[getCode_(item)]]" |
119 disabled="[[isDivision_(item)]]"> | 115 disabled="[[isDivision_(item)]]"> |
120 [[getName_(item)]] | 116 [[getName_(item)]] |
121 </option> | 117 </option> |
122 </template> | 118 </template> |
123 </select> | 119 </select> |
124 <span class="md-select-underline"></span> | 120 <span class="md-select-underline"></span> |
125 </span> | 121 </span> |
126 </div> | 122 </div> |
127 <div class="address-row"> | 123 <div class="address-row"> |
128 <iron-a11y-keys keys="enter" on-keys-pressed="onSaveButtonTap_"> | |
129 </iron-a11y-keys> | |
130 <paper-input id="phoneInput" type="text" label="$i18n{addressPhone}" | 124 <paper-input id="phoneInput" type="text" label="$i18n{addressPhone}" |
131 always-float-label class="address-column" | 125 always-float-label class="address-column" |
132 on-value-changed="updateCanSave_" value="{{phoneNumber_}}"> | 126 on-value-changed="updateCanSave_" value="{{phoneNumber_}}"> |
133 </paper-input> | 127 </paper-input> |
134 <paper-input id="emailInput" type="text" label="$i18n{addressEmail}" | 128 <paper-input id="emailInput" type="text" label="$i18n{addressEmail}" |
135 on-value-changed="updateCanSave_" always-float-label | 129 on-value-changed="updateCanSave_" always-float-label |
136 class="address-column long" value="{{email_}}"> | 130 class="address-column long" value="{{email_}}"> |
137 </paper-input> | 131 </paper-input> |
138 </div> | 132 </div> |
139 </div> | 133 </div> |
140 <div class="button-container"> | 134 <div class="button-container"> |
141 <paper-button id="cancelButton" class="cancel-button" | 135 <paper-button id="cancelButton" class="cancel-button" |
142 on-tap="onCancelTap_"> | 136 on-tap="onCancelTap_"> |
143 $i18n{cancel} | 137 $i18n{cancel} |
144 </paper-button> | 138 </paper-button> |
145 <paper-button id="saveButton" class="action-button" | 139 <paper-button id="saveButton" class="action-button" |
146 disabled="[[!canSave_]]" on-tap="onSaveButtonTap_"> | 140 disabled="[[!canSave_]]" on-tap="onSaveButtonTap_"> |
147 $i18n{save} | 141 $i18n{save} |
148 </paper-button> | 142 </paper-button> |
149 </div> | 143 </div> |
150 </dialog> | 144 </dialog> |
151 </template> | 145 </template> |
152 <script src="address_edit_dialog.js"></script> | 146 <script src="address_edit_dialog.js"></script> |
153 </dom-module> | 147 </dom-module> |
OLD | NEW |