зеркало из https://github.com/mozilla/pjs.git
[prefwindow] proxy panel cleanup
This commit is contained in:
Родитель
507c2f8e50
Коммит
37258744ab
|
@ -11,4 +11,48 @@ function showManualProxyConfig()
|
|||
viewHideButton.value = bundle.GetStringFromName("viewrow");
|
||||
manualRow.style.display = "none"
|
||||
}
|
||||
}
|
||||
|
||||
function Startup()
|
||||
{
|
||||
DoEnabling();
|
||||
}
|
||||
|
||||
function DoEnabling()
|
||||
{
|
||||
var ftp = document.getElementById("networkProxyFTP");
|
||||
var ftpPort = document.getElementById("networkProxyFTP_Port");
|
||||
var http = document.getElementById("networkProxyHTTP");
|
||||
var httpPort = document.getElementById("networkProxyHTTP_Port");
|
||||
var noProxy = document.getElementById("networkProxyNone");
|
||||
var autoURL = document.getElementById("networkProxyAutoconfigURL");
|
||||
var autoReload = document.getElementById("autoReload");
|
||||
|
||||
// convenience arrays
|
||||
var manual = [ftp, ftpPort, http, httpPort, noProxy];
|
||||
var auto = [autoURL, autoReload];
|
||||
|
||||
// radio buttons
|
||||
var radio0 = document.getElementById("networkProxyType0");
|
||||
var radio1 = document.getElementById("networkProxyType1");
|
||||
var radio2 = document.getElementById("networkProxyType2");
|
||||
|
||||
if( radio0.checked ) {
|
||||
for( var i = 0; i < manual.length; i++ )
|
||||
manual[i].setAttribute( "disabled", "true" );
|
||||
for( var i = 0; i < auto.length; i++ )
|
||||
auto[i].setAttribute( "disabled", "true" );
|
||||
}
|
||||
else if ( radio1.checked ) {
|
||||
for( var i = 0; i < auto.length; i++ )
|
||||
auto[i].setAttribute( "disabled", "true" );
|
||||
for( var i = 0; i < manual.length; i++ )
|
||||
manual[i].removeAttribute( "disabled" );
|
||||
}
|
||||
else if ( radio2.checked ) {
|
||||
for( var i = 0; i < manual.length; i++ )
|
||||
manual[i].setAttribute( "disabled", "true" );
|
||||
for( var i = 0; i < auto.length; i++ )
|
||||
auto[i].removeAttribute( "disabled" );
|
||||
}
|
||||
}
|
|
@ -45,6 +45,7 @@
|
|||
<box>
|
||||
<html:div>
|
||||
<html:input name="directManualOrAuto" type="radio" id="networkProxyType0"
|
||||
onclick="DoEnabling();"
|
||||
pref="true" preftype="int" prefindex="0" prefstring="network.proxy.type"/>
|
||||
</html:div>
|
||||
<html:label for="networkProxyType0" accesskey="d" tabindex="0">
|
||||
|
@ -54,13 +55,14 @@
|
|||
<box align="horizontal" flex="100%" style="width: 100%">
|
||||
<html:div>
|
||||
<html:input name="directManualOrAuto" type="radio" id="networkProxyType1"
|
||||
onclick="DoEnabling();"
|
||||
pref="true" preftype="int" prefindex="1" prefstring="network.proxy.type"/>
|
||||
</html:div>
|
||||
<html:label for="networkProxyType1" accesskey="m" tabindex="0">
|
||||
&manualTypeRadio.label;
|
||||
</html:label>
|
||||
<spring flex="100%"/>
|
||||
<titledbutton id="viewhideManual" class="dialog push" value="&view.label;" onclick="showManualProxyConfig();"/>
|
||||
<!--<titledbutton id="viewhideManual" class="dialog push" value="&view.label;" onclick="showManualProxyConfig();"/>-->
|
||||
</box>
|
||||
<html:div align="horizontal" id="manual-proxy" style="display: block; padding-left: 21px">
|
||||
<html:table width="100%">
|
||||
|
@ -133,10 +135,11 @@
|
|||
-->
|
||||
<box align="horizontal">
|
||||
<html:div>
|
||||
<html:input name="directManualOrAuto" type="radio" id="networkProxyType"
|
||||
<html:input name="directManualOrAuto" type="radio" id="networkProxyType2"
|
||||
onclick="DoEnabling();"
|
||||
pref="true" preftype="int" prefindex="2" prefstring="network.proxy.type"/>
|
||||
</html:div>
|
||||
<html:label for="networkProxyType" accesskey="a" tabindex="0">&autoTypeRadio.label;</html:label>
|
||||
<html:label for="networkProxyType2" accesskey="a" tabindex="0">&autoTypeRadio.label;</html:label>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
&configAutoconfigText.label;
|
||||
|
@ -145,7 +148,7 @@
|
|||
<spring flex="25%"/>
|
||||
<html:input name="" type="text" flex="100%" id="networkProxyAutoconfigURL"
|
||||
pref="true" preftype="string" prefstring="network.proxy.autoconfig_url"/>
|
||||
<titledbutton class="dialog push" value="&reload.label;"/>
|
||||
<titledbutton class="dialog push" id="autoReload" value="&reload.label;"/>
|
||||
</box>
|
||||
</html:fieldset>
|
||||
</box>
|
||||
|
|
Загрузка…
Ссылка в новой задаче