2006-05-17 02:22:45 +00:00
|
|
|
function showManualProxyConfig()
|
|
|
|
{
|
|
|
|
var manualRow = document.getElementById("manual-proxy");
|
2006-05-17 02:28:44 +00:00
|
|
|
var prefutilitiesBundle = document.getElementById("bundle_prefutilities");
|
2006-05-17 02:22:45 +00:00
|
|
|
var viewHideButton = document.getElementById("viewhideManual");
|
|
|
|
if( manualRow.style.display == "none" ) {
|
2006-05-17 02:28:44 +00:00
|
|
|
viewHideButton.value = prefutilitiesBundle.getString("hiderow");
|
2006-05-17 02:22:45 +00:00
|
|
|
manualRow.style.display = "inherit";
|
|
|
|
}
|
|
|
|
else {
|
2006-05-17 02:28:51 +00:00
|
|
|
viewHideButton.label = prefutilitiesBundle.getString("viewrow");
|
|
|
|
manualRow.style.display = "none";
|
2006-05-17 02:22:45 +00:00
|
|
|
}
|
2006-05-17 02:23:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function Startup()
|
|
|
|
{
|
|
|
|
DoEnabling();
|
|
|
|
}
|
|
|
|
|
|
|
|
function DoEnabling()
|
|
|
|
{
|
2006-05-17 02:26:09 +00:00
|
|
|
var i;
|
2006-05-17 02:23:05 +00:00
|
|
|
var ftp = document.getElementById("networkProxyFTP");
|
|
|
|
var ftpPort = document.getElementById("networkProxyFTP_Port");
|
2006-05-17 02:28:43 +00:00
|
|
|
var gopher = document.getElementById("networkProxyGopher");
|
|
|
|
var gopherPort = document.getElementById("networkProxyGopher_Port");
|
2006-05-17 02:23:05 +00:00
|
|
|
var http = document.getElementById("networkProxyHTTP");
|
|
|
|
var httpPort = document.getElementById("networkProxyHTTP_Port");
|
2006-05-17 02:25:30 +00:00
|
|
|
var ssl = document.getElementById("networkProxySSL");
|
|
|
|
var sslPort = document.getElementById("networkProxySSL_Port");
|
2006-05-17 02:26:08 +00:00
|
|
|
var socks = document.getElementById("networkProxySOCKS");
|
|
|
|
var socksPort = document.getElementById("networkProxySOCKS_Port");
|
2006-05-17 02:23:05 +00:00
|
|
|
var noProxy = document.getElementById("networkProxyNone");
|
|
|
|
var autoURL = document.getElementById("networkProxyAutoconfigURL");
|
|
|
|
var autoReload = document.getElementById("autoReload");
|
|
|
|
|
|
|
|
// convenience arrays
|
2006-05-17 02:28:43 +00:00
|
|
|
var manual = [ftp, ftpPort, gopher, gopherPort, http, httpPort, ssl, sslPort, socks, socksPort, noProxy];
|
2006-05-17 02:23:05 +00:00
|
|
|
var auto = [autoURL, autoReload];
|
2006-05-17 02:28:51 +00:00
|
|
|
|
2006-05-17 02:23:05 +00:00
|
|
|
// radio buttons
|
2006-05-17 02:24:52 +00:00
|
|
|
var radiogroup = document.getElementById("networkProxyType");
|
|
|
|
|
2006-05-17 02:28:51 +00:00
|
|
|
switch ( radiogroup.value ) {
|
|
|
|
case "0":
|
|
|
|
for (i = 0; i < manual.length; i++)
|
2006-05-17 02:24:52 +00:00
|
|
|
manual[i].setAttribute( "disabled", "true" );
|
2006-05-17 02:28:51 +00:00
|
|
|
for (i = 0; i < auto.length; i++)
|
2006-05-17 02:24:52 +00:00
|
|
|
auto[i].setAttribute( "disabled", "true" );
|
|
|
|
break;
|
|
|
|
case "1":
|
2006-05-17 02:28:51 +00:00
|
|
|
for (i = 0; i < auto.length; i++)
|
2006-05-17 02:24:52 +00:00
|
|
|
auto[i].setAttribute( "disabled", "true" );
|
2006-05-17 02:28:51 +00:00
|
|
|
for (i = 0; i < manual.length; i++)
|
2006-05-17 02:24:52 +00:00
|
|
|
manual[i].removeAttribute( "disabled" );
|
|
|
|
break;
|
|
|
|
case "2":
|
|
|
|
default:
|
2006-05-17 02:28:51 +00:00
|
|
|
for (i = 0; i < manual.length; i++)
|
2006-05-17 02:24:52 +00:00
|
|
|
manual[i].setAttribute( "disabled", "true" );
|
2006-05-17 02:28:51 +00:00
|
|
|
for (i = 0; i < auto.length; i++)
|
2006-05-17 02:24:52 +00:00
|
|
|
auto[i].removeAttribute( "disabled" );
|
|
|
|
break;
|
2006-05-17 02:23:05 +00:00
|
|
|
}
|
2006-05-17 02:26:08 +00:00
|
|
|
}
|