bug 302486 - PAC edit box plays games with URI fixup as you type, r=vlad, a=caillon
git-svn-id: svn://10.0.0.236/trunk@179097 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
a97654d8d3
commit
d8e845335b
@ -38,6 +38,11 @@ var gConnectionsDialog = {
|
||||
beforeAccept: function ()
|
||||
{
|
||||
var proxyTypePref = document.getElementById("network.proxy.type");
|
||||
if (proxyTypePref.value == 2) {
|
||||
this.doAutoconfigURLFixup();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (proxyTypePref.value != 1)
|
||||
return true;
|
||||
|
||||
@ -57,6 +62,7 @@ var gConnectionsDialog = {
|
||||
proxyPortPref.value = httpProxyPortPref.value;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
@ -146,17 +152,15 @@ var gConnectionsDialog = {
|
||||
pps.configureFromPAC(autoURL.value);
|
||||
},
|
||||
|
||||
writeAutoconfigURL: function ()
|
||||
doAutoconfigURLFixup: function ()
|
||||
{
|
||||
var autoURL = document.getElementById("networkProxyAutoconfigURL");
|
||||
var autoURLPref = document.getElementById("network.proxy.autoconfig_url");
|
||||
var URIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
|
||||
.getService(Components.interfaces.nsIURIFixup);
|
||||
try {
|
||||
return URIFixup.createFixupURI(autoURL.value, 0).spec;
|
||||
}
|
||||
catch(ex) {
|
||||
}
|
||||
return undefined;
|
||||
autoURLPref.value = autoURL.value = URIFixup.createFixupURI(autoURL.value, 0).spec;
|
||||
} catch(ex) {}
|
||||
},
|
||||
|
||||
readHTTPProxyServer: function ()
|
||||
|
||||
@ -196,8 +196,7 @@
|
||||
</grid>
|
||||
<radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;"/>
|
||||
<hbox class="indent" flex="1" align="center">
|
||||
<textbox id="networkProxyAutoconfigURL" flex="1" preference="network.proxy.autoconfig_url"
|
||||
onsynctopreference="return gConnectionsDialog.writeAutoconfigURL();"/>
|
||||
<textbox id="networkProxyAutoconfigURL" flex="1" preference="network.proxy.autoconfig_url"/>
|
||||
<button id="autoReload" icon="refresh"
|
||||
label="&reload.label;" accesskey="&reload.accesskey;"
|
||||
oncommand="gConnectionsDialog.reloadPAC();"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user