Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html"> | |
| 5 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm l"> | 6 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm l"> |
| 6 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _behavior.html"> | 7 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _behavior.html"> |
| 7 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _indicator.html"> | 8 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _indicator.html"> |
| 9 <link rel="import" href="internet_shared_css.html"> | |
| 8 <link rel="import" href="network_property_list.html"> | 10 <link rel="import" href="network_property_list.html"> |
| 9 <link rel="import" href="network_proxy_input.html"> | 11 <link rel="import" href="network_proxy_input.html"> |
| 10 <link rel="import" href="network_proxy_exclusions.html"> | 12 <link rel="import" href="network_proxy_exclusions.html"> |
| 11 | 13 |
| 12 <dom-module id="network-proxy"> | 14 <dom-module id="network-proxy"> |
| 13 <template> | 15 <template> |
| 14 <style> | 16 <style include="internet-shared"> |
| 15 :host { | 17 cr-policy-network-indicator { |
| 16 display: inline-block; | 18 -webkit-margin-end: 10px; |
| 17 } | 19 } |
| 18 | 20 |
| 19 #selectTypeDiv { | 21 #proxyDiv paper-checkbox { |
| 22 padding: 10px 0; | |
| 23 } | |
| 24 | |
| 25 #exceptionsDiv { | |
| 26 padding: 10px 0; | |
| 27 } | |
| 28 | |
| 29 #exceptionsDiv network-proxy-exclusions { | |
| 20 margin: 10px 0; | 30 margin: 10px 0; |
| 21 } | 31 } |
| 22 | |
| 23 select { | |
| 24 padding: 5px; | |
| 25 } | |
| 26 | |
| 27 span { | |
| 28 margin: 5px; | |
| 29 } | |
| 30 | |
| 31 cr-policy-network-indicator { | |
| 32 -webkit-margin-end: 10px; | |
| 33 mwrgin-bottom: 5px; | |
| 34 } | |
| 35 | |
| 36 paper-checkbox { | |
| 37 margin-bottom: 10px; | |
| 38 } | |
| 39 | |
| 40 paper-input { | |
| 41 margin: -9px 5px 0; | |
| 42 } | |
| 43 </style> | 32 </style> |
| 44 <div id="outer" class="layout vertical flex"> | 33 <!-- Policy indicator --> |
| 45 <!-- TODO(stevenjb): Use cr-dropdown-menu once available. --> | 34 <div class="settings-box first single-column" |
| 46 <div class="layout horizontal center" hidden$= | 35 hidden$="[[!isNetworkPolicyControlled( |
| 47 "[[!isNetworkPolicyControlled(networkProperties.ProxySettings.Type)]]" > | 36 networkProperties.ProxySettings.Type)]]"> |
| 37 <div class="layout horizontal center"> | |
| 48 <cr-policy-network-indicator | 38 <cr-policy-network-indicator |
| 49 property="[[networkProperties.ProxySettings.Type]]"> | 39 property="[[networkProperties.ProxySettings.Type]]"> |
| 50 </cr-policy-network-indicator> | 40 </cr-policy-network-indicator> |
| 51 <span>This proxy is enforced by your administrator.</span> | 41 <div>This proxy is enforced by your administrator.</div> |
| 42 </div> | |
| 43 </div> | |
| 44 | |
| 45 <!-- Proxy type dropdown --> | |
| 46 <div class="settings-box continuation"> | |
|
dschuyler
2016/07/29 19:27:01
If line 46 and 43 are removed, does this work
the
stevenjb
2016/07/29 19:41:41
Did you miss the hidden$= ?
dschuyler
2016/07/29 20:21:37
Yes, I did.
| |
| 47 <div class="start">Connection type</div> | |
| 48 <paper-dropdown-menu vertical-align="auto" no-label-float> | |
| 49 <paper-listbox class="dropdown-content" on-iron-activate="onTypeChange_" | |
| 50 selected="[[proxy.Type]]" attr-for-selected="value"> | |
| 51 <template is="dom-repeat" items="[[proxyTypes_]]"> | |
| 52 <button class="dropdown-item" role="option" value="[[item]]"> | |
| 53 [[proxyTypeDesc_(item)]] | |
| 54 </button> | |
| 55 </template> | |
| 56 </paper-listbox> | |
| 57 </paper-dropdown-menu> | |
| 58 </div> | |
| 59 | |
| 60 <!-- Autoconfiguration (PAC) --> | |
| 61 <div class="settings-box continuation indented" | |
| 62 hidden$="[[!matches_(proxy.Type, ProxySettingsType.PAC)]]"> | |
| 63 <div class="start">Autoconfiguration URL:</div> | |
| 64 <paper-input no-label-float class="flex" value="{{proxy.PAC}}" | |
| 65 disabled="[[isNetworkPolicyEnforced( | |
| 66 networkProperties.ProxySettings.PAC)]]" | |
| 67 on-blur="onProxyInputChange_"> | |
| 68 </paper-input> | |
| 69 </div> | |
| 70 | |
| 71 <!-- Web Proxy Auto Discovery (WPAD) --> | |
| 72 <div class="settings-box continuation indented" | |
| 73 hidden$="[[!matches_(proxy.Type, ProxySettingsType.WPAD)]]"> | |
| 74 <div class="start">Web Proxy Auto Discovery URL:</div> | |
| 75 <div>[[WPAD]]</div> | |
| 76 </div> | |
| 77 | |
| 78 <!-- Manual --> | |
| 79 <div id="proxyDiv" class="settings-box continuation single-column indented" | |
| 80 hidden$="[[!matches_(proxy.Type, ProxySettingsType.MANUAL)]]"> | |
| 81 <paper-checkbox checked="{{useSameProxy}}"> | |
| 82 Use the same proxy for all protocols | |
| 83 </paper-checkbox> | |
| 84 <div hidden$="[[!useSameProxy]]" class="layout vertical"> | |
| 85 <network-proxy-input on-proxy-change="onProxyInputChange_" | |
| 86 editable="[[isPropertyEditable_(editable, networkProperties, | |
| 87 'ProxySettings.Manual.HTTPProxy')]]" | |
| 88 value="{{proxy.Manual.HTTPProxy}}" label="Proxy"> | |
| 89 </network-proxy-input> | |
| 90 </div> | |
| 91 <div hidden$="[[useSameProxy]]" class="layout vertical"> | |
| 92 <network-proxy-input on-proxy-change="onProxyInputChange_" | |
| 93 editable="[[isPropertyEditable_(editable, networkProperties, | |
| 94 'ProxySettings.Manual.HTTPProxy)')]]" | |
| 95 value="{{proxy.Manual.HTTPProxy}}" label="HTTP Proxy"> | |
| 96 </network-proxy-input> | |
| 97 <network-proxy-input | |
| 98 editable="[[isPropertyEditable_(editable, networkProperties, | |
| 99 'ProxySettings.Manual.SecureHTTPProxy)')]]" | |
| 100 value="{{proxy.Manual.SecureHTTPProxy}}" | |
| 101 label="Secure HTTP Proxy" on-proxy-change="onProxyInputChange_"> | |
| 102 </network-proxy-input> | |
| 103 <network-proxy-input on-proxy-change="onProxyInputChange_" | |
| 104 editable="[[isPropertyEditable_(editable, networkProperties, | |
| 105 'ProxySettings.Manual.FTPProxy)')]]" | |
| 106 value="{{proxy.Manual.FTPProxy}}" label="FTP Proxy"> | |
| 107 </network-proxy-input> | |
| 108 <network-proxy-input on-proxy-change="onProxyInputChange_" | |
| 109 editable="[[isPropertyEditable_(editable, networkProperties, | |
| 110 'ProxySettings.Manual.SOCKS)')]]" | |
| 111 value="{{proxy.Manual.SOCKS}}" label="SOCKS host"> | |
| 112 </network-proxy-input> | |
| 52 </div> | 113 </div> |
| 53 | 114 |
| 54 <div id="selectTypeDiv"> | 115 <div id="exceptionsDiv"> |
| 55 <select id="selectType" on-change="onTypeChange_" | 116 <div>Do not use the proxy settings for these hosts and domains:</div> |
| 56 disabled$="[[isNetworkPolicyEnforced(networkProperties.ProxySettings .Type)]]"> | 117 <network-proxy-exclusions on-proxy-change="onProxyExclusionsChange_" |
| 57 <template is="dom-repeat" items="[[proxyTypes_]]"> | 118 exclusions="{{proxy.ExcludeDomains}}"> |
| 58 <option value="[[item]]">[[proxyTypeDesc_(item)]]</option> | |
| 59 </template> | |
| 60 </select> | |
| 61 </div> | |
| 62 | |
| 63 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.PAC)]]" | |
| 64 class="layout horizontal"> | |
| 65 <span>Autoconfiguration URL:</span> | |
| 66 <paper-input no-label-float class="flex" value="{{proxy.PAC}}" | |
| 67 disabled="[[isNetworkPolicyEnforced(networkProperties.ProxySettings. PAC)]]"> | |
| 68 on-blur="onProxyInputChange_"> | |
| 69 </paper-input> | |
| 70 </div> | |
| 71 | |
| 72 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.WPAD)]]" | |
| 73 class="layout horizontal"> | |
| 74 <span>Web Proxy Auto Discovery URL:</span><span>[[WPAD]]</span> | |
| 75 </div> | |
| 76 | |
| 77 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.MANUAL)]]" | |
| 78 class="layout vertical"> | |
| 79 <paper-checkbox id="useUrl" checked="{{useSameProxy}}"> | |
| 80 Use the same proxy for all protocols | |
| 81 </paper-checkbox> | |
| 82 <div hidden$="[[!useSameProxy]]" class="layout vertical"> | |
| 83 <network-proxy-input | |
| 84 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox ySettings.Manual.HTTPProxy')]]" | |
| 85 value="{{proxy.Manual.HTTPProxy}}" | |
| 86 label="Proxy" on-proxy-change="onProxyInputChange_"> | |
| 87 </network-proxy-input> | |
| 88 </div> | |
| 89 <div hidden$="[[useSameProxy]]" class="layout vertical"> | |
| 90 <network-proxy-input | |
| 91 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox ySettings.Manual.HTTPProxy)')]]" | |
| 92 value="{{proxy.Manual.HTTPProxy}}" | |
| 93 label="HTTP Proxy" on-proxy-change="onProxyInputChange_"> | |
| 94 </network-proxy-input> | |
| 95 <network-proxy-input | |
| 96 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox ySettings.Manual.SecureHTTPProxy)')]]" | |
| 97 value="{{proxy.Manual.SecureHTTPProxy}}" | |
| 98 label="Secure HTTP Proxy" on-proxy-change="onProxyInputChange_"> | |
| 99 </network-proxy-input> | |
| 100 <network-proxy-input | |
| 101 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox ySettings.Manual.FTPProxy)')]]" | |
| 102 value="{{proxy.Manual.FTPProxy}}" | |
| 103 label="FTP Proxy" on-proxy-change="onProxyInputChange_"> | |
| 104 </network-proxy-input> | |
| 105 <network-proxy-input | |
| 106 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox ySettings.Manual.SOCKS)')]]" | |
| 107 value="{{proxy.Manual.SOCKS}}" | |
| 108 label="SOCKS host" on-proxy-change="onProxyInputChange_"> | |
| 109 </network-proxy-input> | |
| 110 </div> | |
| 111 | |
| 112 <span>Do not use the proxy settings for these hosts and domains:</span> | |
| 113 <network-proxy-exclusions exclusions="{{proxy.ExcludeDomains}}" | |
| 114 on-proxy-change="onProxyExclusionsChange_"> | |
| 115 </network-proxy-exclusions> | 119 </network-proxy-exclusions> |
| 116 <div class="layout horizontal baseline"> | 120 <div class="layout horizontal"> |
| 117 <paper-input id="proxyExclusion" class="flex" no-label-float> | 121 <paper-input-container no-label-float class="flex"> |
| 118 </paper-input> | 122 <input id="proxyExclusion" is="iron-input"> |
| 123 </paper-input-container> | |
| 119 <paper-button on-tap="onAddProxyExclusionTap_"> | 124 <paper-button on-tap="onAddProxyExclusionTap_"> |
| 120 Add Exception | 125 Add Exception |
| 121 </paper-button> | 126 </paper-button> |
| 122 </div> | 127 </div> |
| 123 </div> | 128 </div> |
| 124 </div> | 129 </div> |
| 125 </template> | 130 </template> |
| 126 <script src="network_proxy.js"></script> | 131 <script src="network_proxy.js"></script> |
| 127 </dom-module> | 132 </dom-module> |
| OLD | NEW |