copy http proxy settings to ftp,ssl,gopher proxies

see bugzilla bug 50380, patch by jerry.tan@sun.com
r=neil sr=bryner
This commit is contained in:
jerry.tan%sun.com 2006-05-17 02:36:20 +00:00
parent ead7dea937
commit 6b54d1176f
3 changed files with 33 additions and 2 deletions

View File

@ -22,9 +22,10 @@ function DoEnabling()
var noProxy = document.getElementById("networkProxyNone");
var autoURL = document.getElementById("networkProxyAutoconfigURL");
var autoReload = document.getElementById("autoReload");
var copyButton = document.getElementById("reuseProxy");
// convenience arrays
var manual = [ftp, ftpPort, gopher, gopherPort, http, httpPort, socks, socksPort, socksVersion, socksVersion4, socksVersion5, ssl, sslPort, noProxy];
var manual = [ftp, ftpPort, gopher, gopherPort, http, httpPort, socks, socksPort, socksVersion, socksVersion4, socksVersion5, ssl, sslPort, noProxy, copyButton];
var auto = [autoURL, autoReload];
// radio buttons
@ -70,5 +71,27 @@ function ReloadPAC() {
var pps = Components.classesByID[kPROTPROX_CID]
.getService(nsIProtocolProxyService);
pps.configureFromPAC(autoURL.value);
}
}
function DoProxyCopy()
{
var http = document.getElementById("networkProxyHTTP");
var httpPort = document.getElementById("networkProxyHTTP_Port");
var httpValue = http.value;
var httpPortValue = httpPort.value;
if (httpValue && httpPortValue && parseInt(httpPortValue) > 0) {
var ftp = document.getElementById("networkProxyFTP");
var gopher = document.getElementById("networkProxyGopher");
var ssl = document.getElementById("networkProxySSL");
var ftpPort = document.getElementById("networkProxyFTP_Port");
var gopherPort = document.getElementById("networkProxyGopher_Port");
var sslPort = document.getElementById("networkProxySSL_Port");
ftp.value = httpValue;
gopher.value = httpValue;
ssl.value = httpValue;
ftpPort.value = httpPortValue;
gopherPort.value = httpPortValue;
sslPort.value = httpPortValue;
}
}

View File

@ -72,6 +72,12 @@
size="5"/>
</hbox>
</row>
<row>
<spacer/>
<hbox align="center">
<button id="reuseProxy" label="&reuseProxy.label;" accesskey="&reuseProxy.accesskey;" oncommand="DoProxyCopy();" />
</hbox>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&ssl.label;" accesskey="&ssl.accesskey;" control="networkProxySSL"/>

View File

@ -19,6 +19,8 @@
<!ENTITY gopher.accesskey "g">
<!ENTITY http.label "HTTP Proxy:">
<!ENTITY http.accesskey "x">
<!ENTITY reuseProxy.label "Use these settings for SSL, FTP and Gopher">
<!ENTITY reuseProxy.accesskey "e">
<!ENTITY ssl.label "SSL Proxy:">
<!ENTITY ssl.accesskey "s">
<!ENTITY socks.label "SOCKS Host:">