http://bugzilla.mozilla.org/show_bug.cgi?id=214259 Firebird Download System Upgrades. components/prefwindow/content/pref-connection.js components/prefwindow/content/pref-connection.xul components/prefwindow/locale/pref-connection.dtd components/prefwindow/content/pref-fonts.js components/prefwindow/content/pref-fonts.xul components/prefwindow/content/pref-features.js components/prefwindow/content/pref-features.xul components/prefwindow/locale/pref-features.dtd components/prefwindow/content/pref-navigator.js components/prefwindow/content/pref-navigator.xul components/prefwindow/locale/pref-navigator.dtd components/prefwindow/locale/pref.dtd - Update Connection and Fonts panel to be sub-dialogs
105 lines
3.9 KiB
JavaScript
105 lines
3.9 KiB
JavaScript
# The contents of this file are subject to the Netscape Public
|
|
# License Version 1.1 (the "License"); you may not use this file
|
|
# except in compliance with the License. You may obtain a copy of
|
|
# the License at http://www.mozilla.org/NPL/
|
|
#
|
|
# Software distributed under the License is distributed on an "AS
|
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
# implied. See the License for the specific language governing
|
|
# rights and limitations under the License.
|
|
#
|
|
# The Original Code is Mozilla Communicator client code, released
|
|
# March 31, 1998.
|
|
#
|
|
# The Initial Developer of the Original Code is Netscape
|
|
# Communications Corporation. Portions created by Netscape are
|
|
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
|
# Rights Reserved.
|
|
#
|
|
# Contributor(s):
|
|
|
|
var _elementIDs = ["networkProxyType",
|
|
"networkProxyFTP", "networkProxyFTP_Port",
|
|
"networkProxyGopher", "networkProxyGopher_Port",
|
|
"networkProxyHTTP", "networkProxyHTTP_Port",
|
|
"networkProxySOCKS", "networkProxySOCKS_Port",
|
|
"networkProxySOCKSVersion",
|
|
"networkProxySSL", "networkProxySSL_Port",
|
|
"networkProxyNone", "networkProxyAutoconfigURL"];
|
|
|
|
function Startup()
|
|
{
|
|
DoEnabling();
|
|
}
|
|
|
|
function DoEnabling()
|
|
{
|
|
var i;
|
|
var ftp = document.getElementById("networkProxyFTP");
|
|
var ftpPort = document.getElementById("networkProxyFTP_Port");
|
|
var gopher = document.getElementById("networkProxyGopher");
|
|
var gopherPort = document.getElementById("networkProxyGopher_Port");
|
|
var http = document.getElementById("networkProxyHTTP");
|
|
var httpPort = document.getElementById("networkProxyHTTP_Port");
|
|
var socks = document.getElementById("networkProxySOCKS");
|
|
var socksPort = document.getElementById("networkProxySOCKS_Port");
|
|
var socksVersion = document.getElementById("networkProxySOCKSVersion");
|
|
var socksVersion4 = document.getElementById("networkProxySOCKSVersion4");
|
|
var socksVersion5 = document.getElementById("networkProxySOCKSVersion5");
|
|
var ssl = document.getElementById("networkProxySSL");
|
|
var sslPort = document.getElementById("networkProxySSL_Port");
|
|
var noProxy = document.getElementById("networkProxyNone");
|
|
var autoURL = document.getElementById("networkProxyAutoconfigURL");
|
|
var autoReload = document.getElementById("autoReload");
|
|
|
|
// convenience arrays
|
|
var manual = [ftp, ftpPort, gopher, gopherPort, http, httpPort, socks, socksPort, socksVersion, socksVersion4, socksVersion5, ssl, sslPort, noProxy];
|
|
var auto = [autoURL, autoReload];
|
|
|
|
// radio buttons
|
|
var radiogroup = document.getElementById("networkProxyType");
|
|
|
|
switch ( radiogroup.value ) {
|
|
case "0":
|
|
for (i = 0; i < manual.length; i++)
|
|
manual[i].setAttribute( "disabled", "true" );
|
|
for (i = 0; i < auto.length; i++)
|
|
auto[i].setAttribute( "disabled", "true" );
|
|
break;
|
|
case "1":
|
|
for (i = 0; i < auto.length; i++)
|
|
auto[i].setAttribute( "disabled", "true" );
|
|
if (!radiogroup.disabled)
|
|
for (i = 0; i < manual.length; i++)
|
|
manual[i].removeAttribute( "disabled" );
|
|
break;
|
|
case "2":
|
|
default:
|
|
for (i = 0; i < manual.length; i++)
|
|
manual[i].setAttribute( "disabled", "true" );
|
|
if (!radiogroup.disabled)
|
|
for (i = 0; i < auto.length; i++)
|
|
auto[i].removeAttribute( "disabled" );
|
|
break;
|
|
}
|
|
}
|
|
|
|
const nsIProtocolProxyService = Components.interfaces.nsIProtocolProxyService;
|
|
const kPROTPROX_CID = '{e9b301c0-e0e4-11D3-a1a8-0050041caf44}';
|
|
|
|
function ReloadPAC()
|
|
{
|
|
var autoURL = document.getElementById("networkProxyAutoconfigURL");
|
|
var pps = Components.classesByID[kPROTPROX_CID]
|
|
.getService(nsIProtocolProxyService);
|
|
pps.configureFromPAC(autoURL.value);
|
|
}
|
|
|
|
function onConnectionsDialogOK()
|
|
{
|
|
window.opener.top.hPrefWindow.wsm.savePageData(window.location.href, window);
|
|
|
|
return true;
|
|
}
|
|
|