зеркало из https://github.com/mozilla/pjs.git
fixing various fun regressions from blake's earlier landing, rs=hyatt
This commit is contained in:
Родитель
c7b8a35c1d
Коммит
a4f3ed989c
|
@ -87,7 +87,7 @@ function Startup()
|
|||
gDialog.AddJSEAttributeNameList = document.getElementById("AddJSEAttributeNameList");
|
||||
gDialog.AddJSEAttributeValueInput = document.getElementById("AddJSEAttributeValueInput");
|
||||
gDialog.AddJSEAttributeTree = document.getElementById("JSEATree");
|
||||
gDialog.okButton = document.getElementById("ok");
|
||||
gDialog.okButton = document.documentElement.getButton("accept");
|
||||
|
||||
// build the attribute trees
|
||||
BuildHTMLAttributeTable();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorPageProperties.dtd">
|
||||
<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorPageProperties.dtd">
|
||||
|
||||
<dialog title="&windowTitle.label;"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
|
|
|
@ -1,432 +0,0 @@
|
|||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
||||
*
|
||||
* 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 imitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is International
|
||||
* Business Machines Corporation. Portions created by IBM
|
||||
* Corporation are Copyright (C) 2000 International Business
|
||||
* Machines Corporation. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): IBM Corporation.
|
||||
*
|
||||
*/
|
||||
|
||||
function Startup() {
|
||||
DoEnableService();
|
||||
DoEnableSettings();
|
||||
}
|
||||
|
||||
function DoEnableService() {
|
||||
var enable_setting = document.getElementById( "P3PServiceEnabled" );
|
||||
var warn0_setting = document.getElementById( "P3PWarningNotPrivate" );
|
||||
var warn1_setting = document.getElementById( "P3PWarningPartialPrivacy" );
|
||||
var warn2_setting = document.getElementById( "P3PWarningPostToNotPrivate" );
|
||||
var warn3_setting = document.getElementById( "P3PWarningPostToBrokenPolicy" );
|
||||
var warn4_setting = document.getElementById( "P3PWarningPostToNoPolicy" );
|
||||
|
||||
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
|
||||
if (enable_setting.checked) {
|
||||
warn0_setting.removeAttribute( "disabled" );
|
||||
warn1_setting.removeAttribute( "disabled" );
|
||||
warn2_setting.removeAttribute( "disabled" );
|
||||
warn3_setting.removeAttribute( "disabled" );
|
||||
warn4_setting.removeAttribute( "disabled" );
|
||||
|
||||
// Look for the warning settings. If not defined then an exception will occur.
|
||||
// If exception occurs then set the checkbox.
|
||||
try {
|
||||
pref.getBoolPref( "P3P.warningnotprivate" );
|
||||
}
|
||||
catch (ex) {
|
||||
warn0_setting.setAttribute("checked", "true");
|
||||
}
|
||||
|
||||
try {
|
||||
pref.getBoolPref( "P3P.warningpartialprivacy" );
|
||||
}
|
||||
catch (ex) {
|
||||
warn1_setting.setAttribute("checked", "true");
|
||||
}
|
||||
|
||||
try {
|
||||
pref.getBoolPref( "P3P.warningposttonotprivate" );
|
||||
}
|
||||
catch (ex) {
|
||||
warn2_setting.setAttribute("checked", "true");
|
||||
}
|
||||
|
||||
try {
|
||||
pref.getBoolPref( "P3P.warningposttobrokenpolicy" );
|
||||
}
|
||||
catch (ex) {
|
||||
warn3_setting.setAttribute("checked", "true");
|
||||
}
|
||||
|
||||
try {
|
||||
pref.getBoolPref( "P3P.warningposttonopolicy" );
|
||||
}
|
||||
catch (ex) {
|
||||
warn4_setting.setAttribute("checked", "true");
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
warn0_setting.setAttribute( "disabled", "true" );
|
||||
warn1_setting.setAttribute( "disabled", "true" );
|
||||
warn2_setting.setAttribute( "disabled", "true" );
|
||||
warn3_setting.setAttribute( "disabled", "true" );
|
||||
warn4_setting.setAttribute( "disabled", "true" );
|
||||
}
|
||||
|
||||
// Allow other settings to be updated
|
||||
DoEnableSettings();
|
||||
}
|
||||
|
||||
function DoEnableSettings() {
|
||||
var enable_service = document.getElementById( "P3PServiceEnabled" );
|
||||
var level_setting = document.getElementById( "P3PLevel" );
|
||||
|
||||
if (enable_service.checked) {
|
||||
// Service is enabled...
|
||||
EnableTree(level_setting);
|
||||
|
||||
try {
|
||||
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
|
||||
var level = pref.getIntPref( "P3P.level" );
|
||||
}
|
||||
catch (ex) {
|
||||
level_setting.setAttribute( "data", "0" );
|
||||
}
|
||||
|
||||
DoMapLevel();
|
||||
}
|
||||
else {
|
||||
// Service is not enabled... disable all controls
|
||||
DisableTree(level_setting);
|
||||
}
|
||||
}
|
||||
|
||||
function EnableTree(item) {
|
||||
item.removeAttribute( "disabled" );
|
||||
|
||||
for( var i = 0; i < item.childNodes.length; i++ ) {
|
||||
EnableTree(item.childNodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function DisableTree(item) {
|
||||
item.setAttribute( "disabled", "true" );
|
||||
|
||||
for( var i = 0; i < item.childNodes.length; i++ ) {
|
||||
DisableTree(item.childNodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
var settingIDs = ["P3PPhysicalAdmin", "P3PPhysicalHistorical",
|
||||
"P3PPhysicalDevelop", "P3PPhysicalPseudo-analysis",
|
||||
"P3PPhysicalIndividual-analysis", "P3PPhysicalCustomization",
|
||||
"P3PPhysicalTailoring", "P3PPhysicalPseudo-decision",
|
||||
"P3PPhysicalIndividual-decision", "P3PPhysicalCurrent",
|
||||
"P3PPhysicalContact", "P3PPhysicalTelemarketing",
|
||||
"P3PPhysicalOther-purpose", "P3PPhysicalSharing",
|
||||
|
||||
"P3PLocationAdmin", "P3PLocationHistorical",
|
||||
"P3PLocationDevelop", "P3PLocationPseudo-analysis",
|
||||
"P3PLocationIndividual-analysis", "P3PLocationCustomization",
|
||||
"P3PLocationTailoring", "P3PLocationPseudo-decision",
|
||||
"P3PLocationIndividual-decision", "P3PLocationCurrent",
|
||||
"P3PLocationContact", "P3PLocationTelemarketing",
|
||||
"P3PLocationOther-purpose", "P3PLocationSharing",
|
||||
|
||||
"P3POnlineAdmin", "P3POnlineHistorical",
|
||||
"P3POnlineDevelop", "P3POnlinePseudo-analysis",
|
||||
"P3POnlineIndividual-analysis", "P3POnlineCustomization",
|
||||
"P3POnlineTailoring", "P3POnlinePseudo-decision",
|
||||
"P3POnlineIndividual-decision", "P3POnlineCurrent",
|
||||
"P3POnlineContact", "P3POnlineTelemarketing",
|
||||
"P3POnlineOther-purpose", "P3POnlineSharing",
|
||||
|
||||
"P3PComputerAdmin", "P3PComputerHistorical",
|
||||
"P3PComputerDevelop", "P3PComputerPseudo-analysis",
|
||||
"P3PComputerIndividual-analysis", "P3PComputerCustomization",
|
||||
"P3PComputerTailoring", "P3PComputerPseudo-decision",
|
||||
"P3PComputerIndividual-decision", "P3PComputerCurrent",
|
||||
"P3PComputerContact", "P3PComputerTelemarketing",
|
||||
"P3PComputerOther-purpose", "P3PComputerSharing",
|
||||
|
||||
"P3PStateAdmin", "P3PStateHistorical",
|
||||
"P3PStateDevelop", "P3PStatePseudo-analysis",
|
||||
"P3PStateIndividual-analysis", "P3PStateCustomization",
|
||||
"P3PStateTailoring", "P3PStatePseudo-decision",
|
||||
"P3PStateIndividual-decision", "P3PStateCurrent",
|
||||
"P3PStateContact", "P3PStateTelemarketing",
|
||||
"P3PStateOther-purpose", "P3PStateSharing",
|
||||
|
||||
"P3PUniqueIDAdmin", "P3PUniqueIDHistorical",
|
||||
"P3PUniqueIDDevelop", "P3PUniqueIDPseudo-analysis",
|
||||
"P3PUniqueIDIndividual-analysis", "P3PUniqueIDCustomization",
|
||||
"P3PUniqueIDTailoring", "P3PUniqueIDPseudo-decision",
|
||||
"P3PUniqueIDIndividual-decision", "P3PUniqueIDCurrent",
|
||||
"P3PUniqueIDContact", "P3PUniqueIDTelemarketing",
|
||||
"P3PUniqueIDOther-purpose", "P3PUniqueIDSharing",
|
||||
|
||||
"P3PGovernmentAdmin", "P3PGovernmentHistorical",
|
||||
"P3PGovernmentDevelop", "P3PGovernmentPseudo-analysis",
|
||||
"P3PGovernmentIndividual-analysis", "P3PGovernmentCustomization",
|
||||
"P3PGovernmentTailoring", "P3PGovernmentPseudo-decision",
|
||||
"P3PGovernmentIndividual-decision", "P3PGovernmentCurrent",
|
||||
"P3PGovernmentContact", "P3PGovernmentTelemarketing",
|
||||
"P3PGovernmentOther-purpose", "P3PGovernmentSharing",
|
||||
|
||||
"P3PPurchaseAdmin", "P3PPurchaseHistorical",
|
||||
"P3PPurchaseDevelop", "P3PPurchasePseudo-analysis",
|
||||
"P3PPurchaseIndividual-analysis", "P3PPurchaseCustomization",
|
||||
"P3PPurchaseTailoring", "P3PPurchasePseudo-decision",
|
||||
"P3PPurchaseIndividual-decision", "P3PPurchaseCurrent",
|
||||
"P3PPurchaseContact", "P3PPurchaseTelemarketing",
|
||||
"P3PPurchaseOther-purpose", "P3PPurchaseSharing",
|
||||
|
||||
"P3PFinancialAdmin", "P3PFinancialHistorical",
|
||||
"P3PFinancialDevelop", "P3PFinancialPseudo-analysis",
|
||||
"P3PFinancialIndividual-analysis", "P3PFinancialCustomization",
|
||||
"P3PFinancialTailoring", "P3PFinancialPseudo-decision",
|
||||
"P3PFinancialIndividual-decision", "P3PFinancialCurrent",
|
||||
"P3PFinancialContact", "P3PFinancialTelemarketing",
|
||||
"P3PFinancialOther-purpose", "P3PFinancialSharing",
|
||||
|
||||
"P3PHealthAdmin", "P3PHealthHistorical",
|
||||
"P3PHealthDevelop", "P3PHealthPseudo-analysis",
|
||||
"P3PHealthIndividual-analysis", "P3PHealthCustomization",
|
||||
"P3PHealthTailoring", "P3PHealthPseudo-decision",
|
||||
"P3PHealthIndividual-decision", "P3PHealthCurrent",
|
||||
"P3PHealthContact", "P3PHealthTelemarketing",
|
||||
"P3PHealthOther-purpose", "P3PHealthSharing",
|
||||
|
||||
"P3PPoliticalAdmin", "P3PPoliticalHistorical",
|
||||
"P3PPoliticalDevelop", "P3PPoliticalPseudo-analysis",
|
||||
"P3PPoliticalIndividual-analysis", "P3PPoliticalCustomization",
|
||||
"P3PPoliticalTailoring", "P3PPoliticalPseudo-decision",
|
||||
"P3PPoliticalIndividual-decision", "P3PPoliticalCurrent",
|
||||
"P3PPoliticalContact", "P3PPoliticalTelemarketing",
|
||||
"P3PPoliticalOther-purpose", "P3PPoliticalSharing",
|
||||
|
||||
"P3PNavigationAdmin", "P3PNavigationHistorical",
|
||||
"P3PNavigationDevelop", "P3PNavigationPseudo-analysis",
|
||||
"P3PNavigationIndividual-analysis", "P3PNavigationCustomization",
|
||||
"P3PNavigationTailoring", "P3PNavigationPseudo-decision",
|
||||
"P3PNavigationIndividual-decision", "P3PNavigationCurrent",
|
||||
"P3PNavigationContact", "P3PNavigationTelemarketing",
|
||||
"P3PNavigationOther-purpose", "P3PNavigationSharing",
|
||||
|
||||
"P3PInteractiveAdmin", "P3PInteractiveHistorical",
|
||||
"P3PInteractiveDevelop", "P3PInteractivePseudo-analysis",
|
||||
"P3PInteractiveIndividual-analysis", "P3PInteractiveCustomization",
|
||||
"P3PInteractiveTailoring", "P3PInteractivePseudo-decision",
|
||||
"P3PInteractiveIndividual-decision", "P3PInteractiveCurrent",
|
||||
"P3PInteractiveContact", "P3PInteractiveTelemarketing",
|
||||
"P3PInteractiveOther-purpose", "P3PInteractiveSharing",
|
||||
|
||||
"P3PDemographicAdmin", "P3PDemographicHistorical",
|
||||
"P3PDemographicDevelop", "P3PDemographicPseudo-analysis",
|
||||
"P3PDemographicIndividual-analysis", "P3PDemographicCustomization",
|
||||
"P3PDemographicTailoring", "P3PDemographicPseudo-decision",
|
||||
"P3PDemographicIndividual-decision", "P3PDemographicCurrent",
|
||||
"P3PDemographicContact", "P3PDemographicTelemarketing",
|
||||
"P3PDemographicOther-purpose", "P3PDemographicSharing",
|
||||
|
||||
"P3PPreferenceAdmin", "P3PPreferenceHistorical",
|
||||
"P3PPreferenceDevelop", "P3PPreferencePseudo-analysis",
|
||||
"P3PPreferenceIndividual-analysis", "P3PPreferenceCustomization",
|
||||
"P3PPreferenceTailoring", "P3PPreferencePseudo-decision",
|
||||
"P3PPreferenceIndividual-decision", "P3PPreferenceCurrent",
|
||||
"P3PPreferenceContact", "P3PPreferenceTelemarketing",
|
||||
"P3PPreferenceOther-purpose", "P3PPreferenceSharing",
|
||||
|
||||
"P3PContentAdmin", "P3PContentHistorical",
|
||||
"P3PContentDevelop", "P3PContentPseudo-analysis",
|
||||
"P3PContentIndividual-analysis", "P3PContentCustomization",
|
||||
"P3PContentTailoring", "P3PContentPseudo-decision",
|
||||
"P3PContentIndividual-decision", "P3PContentCurrent",
|
||||
"P3PContentContact", "P3PContentTelemarketing",
|
||||
"P3PContentOther-purpose", "P3PContentSharing",
|
||||
|
||||
"P3POtherAdmin", "P3POtherHistorical",
|
||||
"P3POtherDevelop", "P3POtherPseudo-analysis",
|
||||
"P3POtherIndividual-analysis", "P3POtherCustomization",
|
||||
"P3POtherTailoring", "P3POtherPseudo-decision",
|
||||
"P3POtherIndividual-decision", "P3POtherCurrent",
|
||||
"P3POtherContact", "P3POtherTelemarketing",
|
||||
"P3POtherOther-purpose", "P3POtherSharing"];
|
||||
|
||||
// It is imperitive that the order in the following matrix arrays be maintained with the order in the settingIDs array above.
|
||||
|
||||
// admin historical develop pseudo- individual- customization tailoring pseudo- individual- current contact telemarketing other- Sharing
|
||||
// analysis analysis decision decision purpose
|
||||
|
||||
var low_matrix = [ true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Physical
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Location
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Online
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Computer
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // State
|
||||
false, false, false, false, false, false, false, false, false, true, false, false, false, false, // UniqueID
|
||||
false, false, false, false, false, false, false, false, false, true, false, false, false, false, // Government
|
||||
false, false, false, false, false, false, false, false, false, true, false, false, false, false, // Purchase
|
||||
false, false, false, false, false, false, false, false, false, true, false, false, false, false, // Financial
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Health
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Political
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Navigation
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Interactive
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Demographic
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Preference
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, true, // Content
|
||||
false, false, false, false, false, false, false, false, false, true, false, false, false, false // Other
|
||||
];
|
||||
|
||||
// admin historical develop pseudo- individual- customization tailoring pseudo- individual- current contact telemarketing other- Sharing
|
||||
// analysis analysis decision decision purpose
|
||||
|
||||
var medium_matrix = [ true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Physical
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Location
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Online
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Computer
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // State
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // UniqueID
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Government
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Purchase
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Financial
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Health
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Political
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Navigation
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Interactive
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Demographic
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Preference
|
||||
true, true, true, true, true, true, true, true, true, true, true, true, false, false, // Content
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false // Other
|
||||
];
|
||||
|
||||
// admin historical develop pseudo- individual- customization tailoring pseudo- individual- current contact telemarketing other- Sharing
|
||||
// analysis analysis decision decision purpose
|
||||
|
||||
var high_matrix = [ false, false, false, false, false, false, false, false, false, true, false, false, false, false, // Physical
|
||||
false, false, false, false, false, false, false, false, false, true, false, false, false, false, // Location
|
||||
false, false, false, false, false, false, false, false, false, true, false, false, false, false, // Online
|
||||
true, true, true, false, false, true, true, true, true, true, false, false, false, false, // Computer
|
||||
true, true, true, false, false, true, true, true, true, true, false, false, false, false, // State
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // UniqueID
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Government
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Purchase
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Financial
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Health
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Political
|
||||
true, true, true, false, false, true, true, true, true, true, false, false, false, false, // Navigation
|
||||
true, true, true, false, false, true, true, true, true, true, false, false, false, false, // Interactive
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Demographic
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Preference
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false, // Content
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false // Other
|
||||
];
|
||||
|
||||
function DoMapLevel() {
|
||||
var level = document.getElementById( "P3PLevel" );
|
||||
|
||||
if (level.data != "3") {
|
||||
|
||||
var custradio = document.getElementById( "custradio" );
|
||||
custradio.setAttribute("disabled", "true");
|
||||
|
||||
for (var i = 0; i < settingIDs.length; i++) {
|
||||
var element = document.getElementById( settingIDs[i] );
|
||||
|
||||
if (level.data == "0") {
|
||||
element.checked = low_matrix[i];
|
||||
}
|
||||
else if (level.data == "1") {
|
||||
element.checked = medium_matrix[i];
|
||||
}
|
||||
else if (level.data == "2") {
|
||||
element.checked = high_matrix[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function doCustomize() {
|
||||
// Save the current settings so that we can check if the customize window changed
|
||||
// any of them.
|
||||
var savedSettings = [false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false, false, false, false, false, false, false];
|
||||
|
||||
for (var i = 0; i < settingIDs.length; i++) {
|
||||
savedSettings[i] = document.getElementById( settingIDs[i] ).checked;
|
||||
}
|
||||
|
||||
// Open the customize window.
|
||||
|
||||
window.openDialog("chrome://communicator/content/pref/pref-P3Pcust.xul","P3Pcust","modal=yes,chrome,resizable=yes",
|
||||
"custombox");
|
||||
|
||||
// Check if any settings were changed.
|
||||
var settingChanged = false;
|
||||
for (var i = 0; (i < settingIDs.length) && !settingChanged; i++) {
|
||||
settingChanged = savedSettings[i] != document.getElementById( settingIDs[i] ).checked;
|
||||
}
|
||||
|
||||
// If any of the settings changed, enable and set the "Custom" radio button
|
||||
// (uncheck the current radio button first).
|
||||
if (settingChanged) {
|
||||
|
||||
// Rather than try to figure out which radio button is currently checked in
|
||||
// order to uncheck it, we just get all the radio buttons in the group and uncheck them all.
|
||||
var level = document.getElementById( "P3PLevel" );
|
||||
var groupElements = document.getElementsByAttribute( "group", "P3PLevel" );
|
||||
for( var i = 0; i < groupElements.length; i++ ) {
|
||||
if( groupElements[i] != level && groupElements[i].checked ) {
|
||||
groupElements[i].checked = false;
|
||||
groupElements[i].removeAttribute( "checked" );
|
||||
}
|
||||
}
|
||||
|
||||
// Enable the "Custom" radio button and check it.
|
||||
var custradio = document.getElementById( "custradio" );
|
||||
custradio.removeAttribute("disabled");
|
||||
custradio.setAttribute("checked", "true");
|
||||
|
||||
// Set the radio group's data index to the one for the custom button.
|
||||
level.setAttribute( "data", "3" );
|
||||
}
|
||||
}
|
||||
|
||||
function initCustomize() {
|
||||
var tree = document.getElementById( 'categoryTree' );
|
||||
var defaultItem = document.getElementById( 'defaultItem' );
|
||||
tree.selectItem( defaultItem );
|
||||
}
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
<!-- CHANGE THIS WHEN MOVING FILES -->
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!-- CHANGE THIS WHEN MOVING FILES -->
|
||||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/wallet/CookieViewer.dtd" >
|
||||
|
|
|
@ -188,7 +188,7 @@ function noteSelectionChange(radioItemId)
|
|||
{
|
||||
var checkedElem = document.getElementById(radioItemId);
|
||||
var modeValue = checkedElem.getAttribute("value");
|
||||
var radioGroup = checkedElem.getAttribute("group");
|
||||
var radioGroup = checkedElem.radioGroup.getAttribute("id");
|
||||
switch (radioGroup)
|
||||
{
|
||||
case "doFcc" :
|
||||
|
|
|
@ -40,12 +40,13 @@ function onInit() {
|
|||
// this is a total hack.
|
||||
// select the first radio button, assuming the wizard hasn't
|
||||
// already selected one for us. The wizard can get in this wierd state
|
||||
var elements = document.getElementsByAttribute("group", "acctyperadio");
|
||||
var rg = document.getElementById("acctyperadio");
|
||||
var elements = rg.getElementsByTagName("radio");
|
||||
var topItem = elements[0];
|
||||
for (var i=0; i < elements.length; i++)
|
||||
if (elements[i].checked) topItem = elements[i];
|
||||
|
||||
document.getElementById("acctyperadio").selectedItem = topItem;
|
||||
rg.selectedItem = topItem;
|
||||
}
|
||||
|
||||
function onUnload() {
|
||||
|
|
|
@ -27,7 +27,6 @@ Contributors:
|
|||
<?xml-stylesheet href="chrome://messenger/skin/folderPane.css" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://messenger/content/mailWindowOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://messenger/locale/msgSynchronize.dtd" >
|
||||
<dialog xmlns:nc="http://home.netscape.com/NC-rdf#"
|
||||
|
@ -37,7 +36,9 @@ Contributors:
|
|||
title="&MsgSelect.label;"
|
||||
width="450" height="400"
|
||||
persist="width height"
|
||||
onload="selectOnLoad();">
|
||||
onload="selectOnLoad();"
|
||||
ondialogaccept="return selectOkButton();"
|
||||
ondialogcancel="return selectCancelButton();">
|
||||
|
||||
<script src="chrome://global/content/strres.js"/>
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/mailWindowOverlay.js"/>
|
||||
|
|
|
@ -104,8 +104,6 @@ function selectCancelButton()
|
|||
|
||||
function selectOnLoad()
|
||||
{
|
||||
doSetOKCancel(selectOkButton,selectCancelButton);
|
||||
|
||||
gMsgWindow = Components.classes[msgWindowContractID].createInstance(Components.interfaces.nsIMsgWindow);
|
||||
gMsgWindow.SetDOMWindow(window);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ function onLoad()
|
|||
|
||||
dialog = {};
|
||||
|
||||
dialog.OKButton = document.getElementById("ok");
|
||||
dialog.OKButton = document.documentElement.getButton("accept");
|
||||
|
||||
dialog.nameField = document.getElementById("name");
|
||||
dialog.nameField.focus();
|
||||
|
|
|
@ -30,7 +30,7 @@ function onLoad()
|
|||
|
||||
dialog = {};
|
||||
|
||||
dialog.OKButton = document.getElementById("ok");
|
||||
dialog.OKButton = document.documentElement.getButton("accept");
|
||||
|
||||
dialog.nameField = document.getElementById("name");
|
||||
dialog.nameField.value = arguments.name;
|
||||
|
|
|
@ -43,7 +43,7 @@ Rights Reserved.
|
|||
<treechildren flex="1" id="addressWidgetBody">
|
||||
<treeitem>
|
||||
<treerow>
|
||||
<treecell class="treecell-addressingWidget" allowevents="true">
|
||||
<treecell class="treecell-addressingWidget" allowevents="true" align="stretch">
|
||||
<menulist id="msgRecipientType#1" class="aw-menulist menulist-compact" flex="1"
|
||||
onclick="awNotAnEmptyArea(event)" disableonsend="true"
|
||||
oncommand="awSetAutoComplete(this.id.slice(this.id.lastIndexOf('#') + 1));">
|
||||
|
@ -57,8 +57,8 @@ Rights Reserved.
|
|||
</menupopup>
|
||||
</menulist>
|
||||
</treecell>
|
||||
<treecell class="treecell-addressingWidget" autostretch="never">
|
||||
<textbox id="msgRecipient#1" class="textbox-addressingWidget"
|
||||
<treecell class="treecell-addressingWidget">
|
||||
<textbox id="msgRecipient#1" class="plain textbox-addressingWidget"
|
||||
type="autocomplete" allowevents="true" flex="1"
|
||||
searchSessions="addrbook" timeout="300" maxrows="4"
|
||||
autoFill="true" autoFillAfterMatch="true" forceComplete="true"
|
||||
|
|
|
@ -148,7 +148,7 @@ function Startup()
|
|||
|
||||
//change the button label
|
||||
var buttonlabels = document.getElementById("okCancelButtons");
|
||||
element = document.getElementById("ok");
|
||||
element = document.documentElement.getButton("accept");
|
||||
element.setAttribute("label", buttonlabels.getAttribute("button1Label"));
|
||||
element = document.getElementById("cancel");
|
||||
element.setAttribute("label", buttonlabels.getAttribute("button2Label"));
|
||||
|
|
|
@ -75,7 +75,7 @@ function OnLoad()
|
|||
// this is not i18n friendly, fix this
|
||||
var infotext = downloadHeadersInfoText1 + " " + args.articleCount + " " + downloadHeadersInfoText2;
|
||||
setText('info',infotext);
|
||||
var okbutton = document.getElementById("ok");
|
||||
var okbutton = document.documentElement.getButton("accept");
|
||||
okbutton.setAttribute("label", okButtonText);
|
||||
setText("newsgroupLabel", args.groupName);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
|
||||
<window
|
||||
id="profileWindow"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
class="color-dialog non-resizable"
|
||||
title="&windowtitle.label;"
|
||||
|
@ -69,9 +68,9 @@
|
|||
|
||||
<!-- instructions -->
|
||||
<deck id="prattle">
|
||||
<html id="intro" style="width: 17em;border:1px solid transparent;" flex="1">&introgeneral.label;</html>
|
||||
<description id="intro" style="width: 17em;border:1px solid transparent;" flex="1">&introgeneral.label;</description>
|
||||
<vbox id="manager">
|
||||
<html style="width: 17em;" class="label">&pmTextA.label;</html>
|
||||
<description style="width: 17em;" class="label">&pmTextA.label;</description>
|
||||
<separator/>
|
||||
<hbox>
|
||||
<vbox flex="1" id="managebuttons">
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://navigator/skin/turbo.css" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % turboDialogDTD SYSTEM "chrome://navigator/locale/turboDialog.dtd" >
|
||||
%turboDialogDTD;
|
||||
|
@ -34,10 +34,9 @@
|
|||
%brandDTD;
|
||||
]>
|
||||
|
||||
<dialog id="turboDialog"
|
||||
<dialog id="turboDialog" buttons="accept" buttonpack="center"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&exitWarningTitle.label;"
|
||||
onload="document.getElementById('okButton').focus();"
|
||||
onunload="SetTurboPref();">
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
|
@ -79,12 +78,4 @@
|
|||
</vbox>
|
||||
</hbox>
|
||||
|
||||
<separator class="thin"/>
|
||||
<separator class="thin"/>
|
||||
<hbox>
|
||||
<spacer flex="1"/>
|
||||
<button id="okButton" label="&okButton.label;" oncommand="window.close();" default="true"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
|
||||
</window>
|
||||
</dialog>
|
||||
|
|
|
@ -41,7 +41,7 @@ function onLoad() {
|
|||
args.zoomOK = false;
|
||||
|
||||
dialog = {};
|
||||
dialog.OKButton = document.getElementById("ok");
|
||||
dialog.OKButton = document.documentElement.getButton("accept");
|
||||
|
||||
dialog.input = document.getElementById("zoomValue");
|
||||
dialog.input.value = args.value;
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="askViewZoom"
|
||||
title="&askViewZoom.title;"
|
||||
ondialogaccept="return onAccept();"
|
||||
onload="onLoad();">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/askViewZoom.js"/>
|
||||
|
|
|
@ -35,7 +35,7 @@ try {
|
|||
function onLoad()
|
||||
{
|
||||
dialog.input = document.getElementById("dialog.input");
|
||||
dialog.open = document.getElementById("ok");
|
||||
dialog.open = document.documentElement.getButton("accept");
|
||||
dialog.openAppList = document.getElementById("openAppList");
|
||||
dialog.openTopWindow = document.getElementById("currentWindow");
|
||||
dialog.openEditWindow = document.getElementById("editWindow");
|
||||
|
@ -68,9 +68,6 @@ function onLoad()
|
|||
// change OK button text to 'open'
|
||||
dialog.open.label = dialog.bundle.getString("openButtonLabel");
|
||||
|
||||
doSetOKCancel(open, 0, 0, 0);
|
||||
|
||||
dialog.input.focus();
|
||||
if (pref) {
|
||||
try {
|
||||
var value = pref.getIntPref("general.open_location.last_window_choice");
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
|
@ -39,6 +38,7 @@
|
|||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&caption.label;"
|
||||
onload="onLoad()"
|
||||
ondialogaccept="open()"
|
||||
style="width: 40em;"
|
||||
persist="screenX screenY"
|
||||
screenX="24" screenY="24">
|
||||
|
@ -59,8 +59,7 @@
|
|||
<hbox align="center">
|
||||
<textbox id="dialog.input" flex="1" type="autocomplete"
|
||||
searchSessions="history" timeout="50" maxrows="6"
|
||||
oninput="doEnabling();" ontextcommand="if (userAction == 'scrolling' ||
|
||||
userAction == 'typing') open();">
|
||||
oninput="doEnabling();">
|
||||
<menupopup id="ubhist-popup" class="autocomplete-history-popup"
|
||||
popupalign="topleft" popupanchor="bottomleft"
|
||||
onpopupshowing="createUBHistoryMenu(event.target);"
|
||||
|
|
|
@ -44,7 +44,7 @@ function filepickerLoad() {
|
|||
gFilePickerBundle = document.getElementById("bundle_filepicker");
|
||||
|
||||
textInput = document.getElementById("textInput");
|
||||
okButton = document.getElementById("ok");
|
||||
okButton = document.documentElement.getButton("accept");
|
||||
outlinerView = new nsFileView();
|
||||
outlinerView.selectionCallback = onSelect;
|
||||
|
||||
|
@ -104,7 +104,6 @@ function filepickerLoad() {
|
|||
}
|
||||
|
||||
// setup the dialogOverlay.xul button handlers
|
||||
doSetOKCancel(selectOnOK, onCancel);
|
||||
retvals.buttonStatus = nsIFilePicker.returnCancel;
|
||||
|
||||
var outliner = document.getElementById("directoryOutliner");
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
<?xml-stylesheet href="chrome://communicator/skin/"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/prefpanels.css" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-applications-edit.dtd">
|
||||
|
||||
<dialog id="pickAppHandler"
|
||||
|
@ -35,9 +33,11 @@
|
|||
title="&editType.label;"
|
||||
onload="Startup();"
|
||||
ondialogaccept="return onAccept();">
|
||||
|
||||
<stringbundle id="bundle_prefApplications"
|
||||
src="chrome://communicator/locale/pref/pref-applications.properties"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
|
||||
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
var gExtensionLabel = null;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/sidebar/customize.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/dialogOverlay.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-charset.dtd" >
|
||||
|
||||
|
|
|
@ -58,8 +58,6 @@ function GetBundles()
|
|||
|
||||
function Init()
|
||||
{
|
||||
doSetOKCancel(AddAvailableLanguage);
|
||||
|
||||
try {
|
||||
GetBundles();
|
||||
}
|
||||
|
|
|
@ -90,10 +90,6 @@ nsHelperAppLauncherDialog.prototype= {
|
|||
html.childNodes[ 0 ].nodeValue = text;
|
||||
}
|
||||
|
||||
// Set up dialog button callbacks.
|
||||
var object = this;
|
||||
doSetOKCancel( function () { return object.onOK(); },
|
||||
function () { return object.onCancel(); } );
|
||||
moveToAlertPosition();
|
||||
},
|
||||
|
||||
|
@ -117,8 +113,6 @@ nsHelperAppLauncherDialog.prototype= {
|
|||
} catch (exception) {
|
||||
}
|
||||
}
|
||||
|
||||
window.close();
|
||||
},
|
||||
|
||||
// If the user presses cancel, tell the app launcher and close the dialog...
|
||||
|
@ -128,9 +122,6 @@ nsHelperAppLauncherDialog.prototype= {
|
|||
this.appLauncher.Cancel();
|
||||
} catch( exception ) {
|
||||
}
|
||||
|
||||
// Close up dialog by returning true.
|
||||
return true;
|
||||
},
|
||||
|
||||
// Enable pick app button if the user chooses that option.
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
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): Dan Rosen <dr@netscape.com>
|
||||
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % helperAppLauncherDTD SYSTEM "chrome://global/locale/helperAppLauncher.dtd" >
|
||||
%helperAppLauncherDTD;
|
||||
]>
|
||||
|
||||
<dialog id="helperAppLaunchConfirmation"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&caption.label;"
|
||||
onload="window.dialog = new nsHelperAppLauncherDialog()"
|
||||
style="width: 40em;"
|
||||
persist="screenX screenY"
|
||||
screenX="24" screenY="24">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/helperAppLauncher.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/utilityOverlay.js"/>
|
||||
|
||||
<hbox>
|
||||
<vbox>
|
||||
<image class="question-icon"/>
|
||||
<spacer flex="1"/>
|
||||
</vbox>
|
||||
<separator orient="vertical" class="thin"/>
|
||||
<vbox flex="1">
|
||||
<description id="intro">&intro.label;</description>
|
||||
<separator class="thin"/>
|
||||
<radiogroup id="mode" oncommand="window.dialog.toggleChoice()">
|
||||
<vbox>
|
||||
<hbox align="center">
|
||||
<radio id="runApp"
|
||||
label="&runApp.label;"
|
||||
accesskey="&runApp.accesskey;"/>
|
||||
</hbox>
|
||||
<hbox class="indent">
|
||||
<textbox id="appName" readonly="true" flex="1"/>
|
||||
<button id="chooseApp"
|
||||
label="&chooseApp.label;"
|
||||
accesskey="&chooseApp.accesskey;"
|
||||
oncommand="dialog.chooseApp()"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<hbox align="center">
|
||||
<radio id="saveToDisk"
|
||||
label="&saveToDisk.label;"
|
||||
accesskey="&saveToDisk.accesskey;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</radiogroup>
|
||||
<separator class="thin"/>
|
||||
<hbox align="center">
|
||||
<checkbox id="alwaysAskMe" label="&alwaysAskMe.label;" accesskey="&alwaysAskMe.accesskey;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
<separator class="groove"/>
|
||||
|
||||
</dialog>
|
|
@ -53,7 +53,7 @@ function initDialog()
|
|||
dialog.caseSensitive = document.getElementById("dialog.caseSensitive");
|
||||
dialog.wrap = document.getElementById("dialog.wrap");
|
||||
dialog.searchBackwards = document.getElementById("dialog.searchBackwards");
|
||||
dialog.find = document.getElementById("ok");
|
||||
dialog.find = document.documentElement.getButton("accept");
|
||||
dialog.cancel = document.getElementById("cancel");
|
||||
|
||||
dialog.fileLabel = document.getElementById("fileLabel");
|
||||
|
@ -99,7 +99,7 @@ function initDialog()
|
|||
dialog.fileInput = document.getElementById("fileInput");
|
||||
dialog.chooseButton = document.getElementById("chooseFile");
|
||||
|
||||
dialog.print = document.getElementById("ok");
|
||||
dialog.print = document.documentElement.getButton("accept");
|
||||
|
||||
dialog.enabled = false;
|
||||
}
|
||||
|
|
|
@ -23,12 +23,12 @@ Contributor(s): Masaki Katakai <katakai@japan.sun.com>
|
|||
Dan Rosen <dr@netscape.com>
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<!DOCTYPE window SYSTEM "chrome://global-platform/locale/printdialog.dtd">
|
||||
|
||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="onLoad();"
|
||||
onaccept="return onAccept();"
|
||||
ondialogaccept="return onAccept();"
|
||||
title="&printDialog.title;"
|
||||
persist="screenX screenY"
|
||||
screenX="24" screenY="24">
|
||||
|
|
Загрузка…
Ссылка в новой задаче