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

Side by Side Diff: chrome/browser/resources/settings/internet_page/network_proxy.html

Issue 2605373002: MD Settings: Internet: Fix Proxy UI (Closed)
Patch Set: Rebase, Fix comments / formatting Created 3 years, 11 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
OLDNEW
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/network/cr_onc_types.htm l"> 2 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm l">
3 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _behavior.html"> 3 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _behavior.html">
4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _indicator.html"> 4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _indicator.html">
5 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> 5 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
6 <link rel="import" href="chrome://resources/html/md_select_css.html"> 6 <link rel="import" href="chrome://resources/html/md_select_css.html">
7 <link rel="import" href="chrome://resources/html/polymer.html"> 7 <link rel="import" href="chrome://resources/html/polymer.html">
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html">
10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html"> 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html">
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 no-set-pref label="$i18n{networkProxyAllowShared}" 84 no-set-pref label="$i18n{networkProxyAllowShared}"
85 on-change="onAllowSharedProxiesChange_"> 85 on-change="onAllowSharedProxiesChange_">
86 </settings-checkbox> 86 </settings-checkbox>
87 </div> 87 </div>
88 88
89 <!-- Proxy type dropdown --> 89 <!-- Proxy type dropdown -->
90 <div class="settings-box continuation"> 90 <div class="settings-box continuation">
91 <div class="start">$i18n{networkProxyConnectionType}</div> 91 <div class="start">$i18n{networkProxyConnectionType}</div>
92 <div class="md-select-wrapper"> 92 <div class="md-select-wrapper">
93 <select id="proxyType" class="md-select" on-change="onTypeChange_" 93 <select id="proxyType" class="md-select" on-change="onTypeChange_"
94 value="[[proxy.Type]]" 94 value="[[proxy_.Type]]"
95 disabled="[[!isProxyEditable_(networkProperties, editable, 95 disabled="[[!isEditable_('Type', networkProperties, editable,
96 useSharedProxies_)]]"> 96 useSharedProxies_)]]">
97 <template is="dom-repeat" items="[[proxyTypes_]]"> 97 <template is="dom-repeat" items="[[proxyTypes_]]">
98 <option value="[[item]]">[[getProxyTypeDesc_(item)]]</option> 98 <option value="[[item]]">[[getProxyTypeDesc_(item)]]</option>
99 </template> 99 </template>
100 </select> 100 </select>
101 <span class="md-select-underline"></span> 101 <span class="md-select-underline"></span>
102 </div> 102 </div>
103 </div> 103 </div>
104 104
105 <!-- Autoconfiguration (PAC) --> 105 <!-- Autoconfiguration (PAC) -->
106 <div class="settings-box continuation indent" 106 <div class="settings-box continuation indent"
107 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.PAC)]]"> 107 hidden$="[[!matches_(proxy_.Type, ProxySettingsType_.PAC)]]">
108 <div>$i18n{networkProxyAutoConfig}</div> 108 <div>$i18n{networkProxyAutoConfig}</div>
109 <paper-input no-label-float class="middle" value="{{proxy.PAC}}" 109 <paper-input no-label-float class="middle flex" value="{{proxy_.PAC}}"
110 disabled="[[!isEditable_(networkProperties.ProxySettings.PAC, 110 disabled="[[!isEditable_('PAC', networkProperties, editable,
111 useSharedProxies_)]]" 111 useSharedProxies_)]]"
112 on-blur="onProxyInputChange_"> 112 on-blur="onPACChange_">
113 </paper-input> 113 </paper-input>
114 </div> 114 </div>
115 115
116 <!-- Web Proxy Auto Discovery (WPAD) --> 116 <!-- Web Proxy Auto Discovery (WPAD) -->
117 <div class="settings-box continuation indent" 117 <div class="settings-box continuation indent"
118 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.WPAD)]]"> 118 hidden$="[[!matches_(proxy_.Type, ProxySettingsType_.WPAD)]]">
119 <div>$i18n{networkSectionWpad}</div> 119 <div>$i18n{networkSectionWpad}</div>
120 <div class="middle">[[WPAD]]</div> 120 <div class="middle flex">[[WPAD_]]</div>
121 </div> 121 </div>
122 122
123 <!-- Manual --> 123 <!-- Manual -->
124 <div id="proxyDiv" class="settings-box continuation single-column indent" 124 <div id="proxyDiv" class="settings-box continuation single-column indent"
125 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.MANUAL)]]"> 125 hidden$="[[!matches_(proxy_.Type, ProxySettingsType_.MANUAL)]]">
126 <paper-checkbox checked="{{useSameProxy_}}" 126 <paper-checkbox checked="{{useSameProxy_}}"
127 disabled="[[!isProxyEditable_(networkProperties, editable, 127 disabled="[[!isEditable_('Type', networkProperties, editable,
128 useSharedProxies_)]]"> 128 useSharedProxies_)]]">
129 $i18n{networkProxyUseSame} 129 $i18n{networkProxyUseSame}
130 </paper-checkbox> 130 </paper-checkbox>
131 <div hidden$="[[!useSameProxy_]]" class="layout vertical"> 131 <div hidden$="[[!useSameProxy_]]" class="layout vertical">
132 <network-proxy-input 132 <network-proxy-input
133 on-proxy-change="onProxyInputChange_" 133 on-proxy-change="onProxyInputChange_"
134 editable="[[isEditable_( 134 editable="[[isEditable_('Manual.HTTPProxy.Host', networkProperties,
135 networkProperties.ProxySettings.Manual.HTTPProxy.Host,
136 editable, useSharedProxies_)]]" 135 editable, useSharedProxies_)]]"
137 value="{{proxy.Manual.HTTPProxy}}" 136 value="{{proxy_.Manual.HTTPProxy}}"
138 label="$i18n{networkProxy}"> 137 label="$i18n{networkProxy}">
139 </network-proxy-input> 138 </network-proxy-input>
140 </div> 139 </div>
141 <div hidden$="[[useSameProxy_]]" class="layout vertical"> 140 <div hidden$="[[useSameProxy_]]" class="layout vertical">
142 <network-proxy-input 141 <network-proxy-input
143 on-proxy-change="onProxyInputChange_" 142 on-proxy-change="onProxyInputChange_"
144 editable="[[isEditable_( 143 editable="[[isEditable_('Manual.HTTPProxy.Host', networkProperties,
145 networkProperties.ProxySettings.Manual.HTTPProxy.Host,
146 editable, useSharedProxies_)]]" 144 editable, useSharedProxies_)]]"
147 value="{{proxy.Manual.HTTPProxy}}" 145 value="{{proxy_.Manual.HTTPProxy}}"
148 label="$i18n{networkProxyHttp}"> 146 label="$i18n{networkProxyHttp}">
149 </network-proxy-input> 147 </network-proxy-input>
150 <network-proxy-input 148 <network-proxy-input
151 on-proxy-change="onProxyInputChange_" 149 on-proxy-change="onProxyInputChange_"
152 editable="[[isEditable_( 150 editable="[[isEditable_('Manual.SecureHTTPProxy.Host',
153 networkProperties.ProxySettings.Manual.SecureHTTPProxy.Host, 151 networkProperties, editable, useSharedProxies_)]]"
154 editable, useSharedProxies_)]]" 152 value="{{proxy_.Manual.SecureHTTPProxy}}"
155 value="{{proxy.Manual.SecureHTTPProxy}}"
156 label="$i18n{networkProxyShttp}"> 153 label="$i18n{networkProxyShttp}">
157 </network-proxy-input> 154 </network-proxy-input>
158 <network-proxy-input 155 <network-proxy-input
159 on-proxy-change="onProxyInputChange_" 156 on-proxy-change="onProxyInputChange_"
160 editable="[[isEditable_( 157 editable="[[isEditable_('Manual.FTPProxy.Host', networkProperties,
161 networkProperties.ProxySettings.Manual.FTPProxy.Host,
162 editable, useSharedProxies_)]]" 158 editable, useSharedProxies_)]]"
163 value="{{proxy.Manual.FTPProxy}}" 159 value="{{proxy_.Manual.FTPProxy}}"
164 label="$i18n{networkProxyFtp}"> 160 label="$i18n{networkProxyFtp}">
165 </network-proxy-input> 161 </network-proxy-input>
166 <network-proxy-input 162 <network-proxy-input
167 on-proxy-change="onProxyInputChange_" 163 on-proxy-change="onProxyInputChange_"
168 editable="[[isEditable_( 164 editable="[[isEditable_('Manual.SOCKS.Host', networkProperties,
169 networkProperties.ProxySettings.Manual.SOCKS.Host,
170 editable, useSharedProxies_)]]" 165 editable, useSharedProxies_)]]"
171 value="{{proxy.Manual.SOCKS}}" 166 value="{{proxy_.Manual.SOCKS}}"
172 label="$i18n{networkProxySocks}"> 167 label="$i18n{networkProxySocks}">
173 </network-proxy-input> 168 </network-proxy-input>
174 </div> 169 </div>
175 170
176 <div id="exceptionsDiv" 171 <div id="exceptionsDiv"
177 hidden="[[!isProxyEditable_(networkProperties, editable, 172 hidden="[[!isEditable_('Type', networkProperties, editable,
178 useSharedProxies_)]]"> 173 useSharedProxies_)]]">
179 <div>$i18n{networkProxyExceptionList}</div> 174 <div>$i18n{networkProxyExceptionList}</div>
180 <network-proxy-exclusions on-proxy-change="onProxyExclusionsChange_" 175 <network-proxy-exclusions on-proxy-change="onProxyExclusionsChange_"
181 exclusions="{{proxy.ExcludeDomains}}"> 176 exclusions="{{proxy_.ExcludeDomains}}">
182 </network-proxy-exclusions> 177 </network-proxy-exclusions>
183 <div class="layout horizontal"> 178 <div class="layout horizontal">
184 <paper-input-container no-label-float class="flex"> 179 <paper-input-container no-label-float class="flex">
185 <input id="proxyExclusion" is="iron-input"> 180 <input id="proxyExclusion" is="iron-input">
186 </paper-input-container> 181 </paper-input-container>
187 <paper-button on-tap="onAddProxyExclusionTap_"> 182 <paper-button on-tap="onAddProxyExclusionTap_">
188 $i18n{networkProxyAddException} 183 $i18n{networkProxyAddException}
189 </paper-button> 184 </paper-button>
190 </div> 185 </div>
191 </div> 186 </div>
187
188 <paper-button id="saveManualProxy"
189 on-tap="onSaveProxyTap_" class="action-button"
190 disabled="[[!isSaveManualProxyEnabled_(networkProperties,
191 proxyModified_, proxy_.*)]]">
192 $i18n{save}
193 </paper-button>
192 </div> 194 </div>
193 195
194 <!-- Confirm Allow shared proxies dialog --> 196 <!-- Confirm Allow shared proxies dialog -->
195 <dialog is="cr-dialog" id="confirmAllowSharedDialog" 197 <dialog is="cr-dialog" id="confirmAllowSharedDialog"
196 on-cancel="onAllowSharedDialogCancel_"> 198 on-cancel="onAllowSharedDialogCancel_">
197 <div class="title">$i18n{networkProxyAllowSharedWarningTitle}</div> 199 <div class="title">$i18n{networkProxyAllowSharedWarningTitle}</div>
198 <div class="body">$i18n{networkProxyAllowSharedWarningMessage}</div> 200 <div class="body">$i18n{networkProxyAllowSharedWarningMessage}</div>
199 <div class="button-container"> 201 <div class="button-container">
200 <paper-button class="cancel-button" 202 <paper-button class="cancel-button"
201 on-tap="onAllowSharedDialogCancel_"> 203 on-tap="onAllowSharedDialogCancel_">
202 $i18n{cancel} 204 $i18n{cancel}
203 </paper-button> 205 </paper-button>
204 <paper-button class="action-button" 206 <paper-button class="action-button"
205 on-tap="onAllowSharedDialogConfirm_"> 207 on-tap="onAllowSharedDialogConfirm_">
206 $i18n{confirm} 208 $i18n{confirm}
207 </paper-button> 209 </paper-button>
208 </div> 210 </div>
209 </dialog> 211 </dialog>
210 </template> 212 </template>
211 <script src="network_proxy.js"></script> 213 <script src="network_proxy.js"></script>
212 </dom-module> 214 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698