mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-22 12:04:38 +00:00
Bug #302486 --> Port the Firefox changes for: PAC edit box plays games with URI fixup as you type
to Thunderbird.
This commit is contained in:
parent
e39bb24871
commit
2290538cdc
@ -39,6 +39,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;
|
||||
|
||||
@ -58,6 +63,7 @@ var gConnectionsDialog = {
|
||||
proxyPortPref.value = httpProxyPortPref.value;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
@ -147,17 +153,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 ()
|
||||
|
@ -157,8 +157,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" label="&reload.label;" accesskey="&reload.accesskey;"
|
||||
oncommand="gConnectionsDialog.reloadPAC();"
|
||||
preference="pref.advanced.proxies.disable_button.reload"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user