зеркало из https://github.com/mozilla/gecko-dev.git
rearrange resource files in extensions/wallet to clean up the duplicate files and general mess that
various folk have made of it. (no names here, move along) some files were moved in the cvs repo, but others were manually copied, and thus I will own blame for them. to find old blame info for the respective files, look in the appropriate attic for these locations: mozilla/extensions/wallet/cookieviewer/CookieViewer.js mozilla/extensions/wallet/cookieviewer/CookieViewer.xul mozilla/extensions/wallet/cookieviewer/CookieViewer.properties mozilla/extensions/wallet/cookieviewer/CookieViewer.dtd mozilla/extensions/wallet/editor/WalletEditor.properties mozilla/extensions/wallet/editor/WalletEditor.dtd mozilla/extensions/wallet/signonviewer/SignonViewer.js mozilla/extensions/wallet/signonviewer/SignonViewer.xul mozilla/extensions/wallet/signonviewer/SignonViewer.properties mozilla/extensions/wallet/signonviewer/SignonViewer.dtd mozilla/extensions/wallet/src/wallet.properties mozilla/extensions/wallet/walletpreview/WalletPreview.js mozilla/extensions/wallet/walletpreview/WalletPreview.xul b=26020 (yeah that old!), r=timeless, sr=heikki, and props to leaf for moving stuff around the cvs repo.
This commit is contained in:
Родитель
e699ffca12
Коммит
622efa3ebd
|
@ -1 +1,550 @@
|
|||
Dummy placeholder until these directories are hooked up correctly.
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ben Goodger
|
||||
*/
|
||||
|
||||
var kObserverService;
|
||||
|
||||
// interface variables
|
||||
var cookiemanager = null; // cookiemanager interface
|
||||
var permissionmanager = null; // permissionmanager interface
|
||||
var popupmanager = null; // popup manager
|
||||
var gDateService = null;
|
||||
|
||||
// cookies and permissions list
|
||||
var cookies = [];
|
||||
var permissions = [];
|
||||
var deletedCookies = [];
|
||||
var deletedPermissions = [];
|
||||
|
||||
// differentiate between cookies, images, and popups
|
||||
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
|
||||
const cookieType = "cookie";
|
||||
const imageType = "image";
|
||||
const popupType = "popup";
|
||||
|
||||
var dialogType = cookieType;
|
||||
if (window.arguments[0] == "imageManager")
|
||||
dialogType = imageType;
|
||||
else if (window.arguments[0] == "popupManager")
|
||||
dialogType = popupType;
|
||||
|
||||
var cookieBundle;
|
||||
|
||||
function Startup() {
|
||||
|
||||
// arguments passed to this routine:
|
||||
// cookieManager
|
||||
// cookieManagerFromIcon
|
||||
// imageManager
|
||||
|
||||
// xpconnect to cookiemanager/permissionmanager/popupmanager interfaces
|
||||
cookiemanager = Components.classes["@mozilla.org/cookiemanager;1"].getService();
|
||||
cookiemanager = cookiemanager.QueryInterface(Components.interfaces.nsICookieManager);
|
||||
permissionmanager = Components.classes["@mozilla.org/permissionmanager;1"].getService();
|
||||
permissionmanager = permissionmanager.QueryInterface(Components.interfaces.nsIPermissionManager);
|
||||
popupmanager = Components.classes["@mozilla.org/PopupWindowManager;1"].getService();
|
||||
popupmanager = popupmanager.QueryInterface(Components.interfaces.nsIPopupWindowManager);
|
||||
|
||||
// intialize gDateService
|
||||
if (!gDateService) {
|
||||
const nsScriptableDateFormat_CONTRACTID = "@mozilla.org/intl/scriptabledateformat;1";
|
||||
const nsIScriptableDateFormat = Components.interfaces.nsIScriptableDateFormat;
|
||||
gDateService = Components.classes[nsScriptableDateFormat_CONTRACTID]
|
||||
.getService(nsIScriptableDateFormat);
|
||||
}
|
||||
|
||||
// intialize string bundle
|
||||
cookieBundle = document.getElementById("cookieBundle");
|
||||
|
||||
// label the close button
|
||||
document.documentElement.getButton("accept").label = cookieBundle.getString("close");
|
||||
|
||||
// determine if labelling is for cookies or images
|
||||
try {
|
||||
var tabBox = document.getElementById("tabbox");
|
||||
var element;
|
||||
if (dialogType == cookieType) {
|
||||
element = document.getElementById("cookiesTab");
|
||||
tabBox.selectedTab = element;
|
||||
} else if (dialogType == imageType) {
|
||||
element = document.getElementById("cookieviewer");
|
||||
element.setAttribute("title", cookieBundle.getString("imageTitle"));
|
||||
element = document.getElementById("permissionsTab");
|
||||
element.label = cookieBundle.getString("tabBannedImages");
|
||||
tabBox.selectedTab = element;
|
||||
element = document.getElementById("permissionsText");
|
||||
element.value = cookieBundle.getString("textBannedImages");
|
||||
element = document.getElementById("cookiesTab");
|
||||
element.hidden = "true";
|
||||
} else {
|
||||
element = document.getElementById("cookieviewer");
|
||||
element.setAttribute("title", cookieBundle.getString("popupTitle"));
|
||||
element = document.getElementById("permissionsTab");
|
||||
element.label = cookieBundle.getString("tabBannedPopups");
|
||||
tabBox.selectedTab = element;
|
||||
element = document.getElementById("permissionsText");
|
||||
element.value = cookieBundle.getString("textBannedPopups");
|
||||
element = document.getElementById("cookiesTab");
|
||||
element.hidden = "true";
|
||||
}
|
||||
} catch(e) {
|
||||
}
|
||||
|
||||
// load in the cookies and permissions
|
||||
cookiesTree = document.getElementById("cookiesTree");
|
||||
permissionsTree = document.getElementById("permissionsTree");
|
||||
if (dialogType == cookieType) {
|
||||
loadCookies();
|
||||
}
|
||||
loadPermissions();
|
||||
|
||||
// be prepared to reload the display if anything changes
|
||||
kObserverService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
||||
kObserverService.addObserver(cookieReloadDisplay, "cookieChanged", false);
|
||||
kObserverService.addObserver(cookieReloadDisplay, "perm-changed", false);
|
||||
}
|
||||
|
||||
function Shutdown() {
|
||||
kObserverService.removeObserver(cookieReloadDisplay, "cookieChanged");
|
||||
kObserverService.removeObserver(cookieReloadDisplay, "perm-changed");
|
||||
}
|
||||
|
||||
var cookieReloadDisplay = {
|
||||
observe: function(subject, topic, state) {
|
||||
if (topic == "cookieChanged") {
|
||||
if (state == "cookies") {
|
||||
cookies.length = 0;
|
||||
if (lastCookieSortColumn == "rawHost") {
|
||||
lastCookieSortAscending = !lastCookieSortAscending; // prevents sort from being reversed
|
||||
}
|
||||
loadCookies();
|
||||
}
|
||||
} else if (topic == "perm-changed") {
|
||||
permissions.length = 0;
|
||||
if (lastPermissionSortColumn == "rawHost") {
|
||||
lastPermissionSortAscending = !lastPermissionSortAscending; // prevents sort from being reversed
|
||||
}
|
||||
loadPermissions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*** =================== COOKIES CODE =================== ***/
|
||||
|
||||
const nsICookie = Components.interfaces.nsICookie;
|
||||
|
||||
var cookiesTreeView = {
|
||||
rowCount : 0,
|
||||
setTree : function(tree){},
|
||||
getImageSrc : function(row,column) {},
|
||||
getProgressMode : function(row,column) {},
|
||||
getCellValue : function(row,column) {},
|
||||
getCellText : function(row,column){
|
||||
var rv="";
|
||||
if (column=="domainCol") {
|
||||
rv = cookies[row].rawHost;
|
||||
} else if (column=="nameCol") {
|
||||
rv = cookies[row].name;
|
||||
} else if (column=="statusCol") {
|
||||
rv = GetStatusString(cookies[row].status);
|
||||
}
|
||||
return rv;
|
||||
},
|
||||
isSeparator : function(index) {return false;},
|
||||
isSorted: function() { return false; },
|
||||
isContainer : function(index) {return false;},
|
||||
cycleHeader : function(aColId, aElt) {},
|
||||
getRowProperties : function(row,column,prop){},
|
||||
getColumnProperties : function(column,columnElement,prop){},
|
||||
getCellProperties : function(row,prop){}
|
||||
};
|
||||
var cookiesTree;
|
||||
|
||||
function Cookie(number,name,value,isDomain,host,rawHost,path,isSecure,expires,
|
||||
status,policy) {
|
||||
this.number = number;
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.isDomain = isDomain;
|
||||
this.host = host;
|
||||
this.rawHost = rawHost;
|
||||
this.path = path;
|
||||
this.isSecure = isSecure;
|
||||
this.expires = expires;
|
||||
this.status = status;
|
||||
this.policy = policy;
|
||||
}
|
||||
|
||||
function loadCookies() {
|
||||
// load cookies into a table
|
||||
var enumerator = cookiemanager.enumerator;
|
||||
var count = 0;
|
||||
var showPolicyField = false;
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var nextCookie = enumerator.getNext();
|
||||
if (!nextCookie) break;
|
||||
nextCookie = nextCookie.QueryInterface(Components.interfaces.nsICookie);
|
||||
var host = nextCookie.host;
|
||||
if (nextCookie.policy != nsICookie.POLICY_UNKNOWN) {
|
||||
showPolicyField = true;
|
||||
}
|
||||
cookies[count] =
|
||||
new Cookie(count++, nextCookie.name, nextCookie.value, nextCookie.isDomain, host,
|
||||
(host.charAt(0)==".") ? host.substring(1,host.length) : host,
|
||||
nextCookie.path, nextCookie.isSecure, nextCookie.expires,
|
||||
nextCookie.status, nextCookie.policy);
|
||||
}
|
||||
cookiesTreeView.rowCount = cookies.length;
|
||||
|
||||
// sort and display the table
|
||||
cookiesTree.treeBoxObject.view = cookiesTreeView;
|
||||
if (window.arguments[0] == "cookieManagerFromIcon") { // came here by clicking on cookie icon
|
||||
|
||||
// turn off the icon
|
||||
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
||||
observerService.notifyObservers(null, "cookieIcon", "off");
|
||||
|
||||
// unhide the status column and sort by reverse order on that column
|
||||
// Note that the sort routine normally does an ascending sort. The only
|
||||
// exception is if you sort on the same column more than once in a row.
|
||||
// In that case, the subsequent sorts will be the reverse of the previous ones.
|
||||
// So we are now going to force an initial reverse sort by fooling the sort routine
|
||||
// into thinking that it previously sorted on the status column and in ascending
|
||||
// order.
|
||||
document.getElementById("statusCol").removeAttribute("hidden");
|
||||
lastCookieSortAscending = true; // force order to have blanks last instead of vice versa
|
||||
lastCookieSortColumn = 'status';
|
||||
CookieColumnSort('status');
|
||||
|
||||
} else {
|
||||
// sort by host column
|
||||
CookieColumnSort('rawHost');
|
||||
}
|
||||
|
||||
// disable "remove all cookies" button if there are no cookies
|
||||
if (cookies.length == 0) {
|
||||
document.getElementById("removeAllCookies").setAttribute("disabled","true");
|
||||
} else {
|
||||
document.getElementById("removeAllCookies").removeAttribute("disabled");
|
||||
}
|
||||
|
||||
// show policy field if at least one cookie has a policy
|
||||
if (showPolicyField) {
|
||||
document.getElementById("policyField").removeAttribute("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
function GetExpiresString(expires) {
|
||||
if (expires) {
|
||||
var date = new Date(1000*expires);
|
||||
return gDateService.FormatDateTime("", gDateService.dateFormatLong,
|
||||
gDateService.timeFormatSeconds, date.getFullYear(),
|
||||
date.getMonth()+1, date.getDate(), date.getHours(),
|
||||
date.getMinutes(), date.getSeconds());
|
||||
}
|
||||
return cookieBundle.getString("AtEndOfSession");
|
||||
}
|
||||
|
||||
function GetStatusString(status) {
|
||||
switch (status) {
|
||||
case nsICookie.STATUS_ACCEPTED:
|
||||
return cookieBundle.getString("accepted");
|
||||
case nsICookie.STATUS_FLAGGED:
|
||||
return cookieBundle.getString("flagged");
|
||||
case nsICookie.STATUS_DOWNGRADED:
|
||||
return cookieBundle.getString("downgraded");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function GetPolicyString(policy) {
|
||||
switch (policy) {
|
||||
case nsICookie.POLICY_NONE:
|
||||
return cookieBundle.getString("policyUnstated");
|
||||
case nsICookie.POLICY_NO_CONSENT:
|
||||
return cookieBundle.getString("policyNoConsent");
|
||||
case nsICookie.POLICY_IMPLICIT_CONSENT:
|
||||
return cookieBundle.getString("policyImplicitConsent");
|
||||
case nsICookie.POLICY_EXPLICIT_CONSENT:
|
||||
return cookieBundle.getString("policyExplicitConsent");
|
||||
case nsICookie.POLICY_NO_II:
|
||||
return cookieBundle.getString("policyNoIICollected");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function CookieSelected() {
|
||||
var selections = GetTreeSelections(cookiesTree);
|
||||
if (selections.length) {
|
||||
document.getElementById("removeCookie").removeAttribute("disabled");
|
||||
} else {
|
||||
ClearCookieProperties();
|
||||
return true;
|
||||
}
|
||||
|
||||
var idx = selections[0];
|
||||
if (idx >= cookies.length) {
|
||||
// Something got out of synch. See bug 119812 for details
|
||||
dump("Tree and viewer state are out of sync! " +
|
||||
"Help us figure out the problem in bug 119812");
|
||||
return;
|
||||
}
|
||||
|
||||
var props = [
|
||||
{id: "ifl_name", value: cookies[idx].name},
|
||||
{id: "ifl_value", value: cookies[idx].value},
|
||||
{id: "ifl_isDomain",
|
||||
value: cookies[idx].isDomain ?
|
||||
cookieBundle.getString("domainColon") : cookieBundle.getString("hostColon")},
|
||||
{id: "ifl_host", value: cookies[idx].host},
|
||||
{id: "ifl_path", value: cookies[idx].path},
|
||||
{id: "ifl_isSecure",
|
||||
value: cookies[idx].isSecure ?
|
||||
cookieBundle.getString("yes") : cookieBundle.getString("no")},
|
||||
{id: "ifl_expires", value: GetExpiresString(cookies[idx].expires)},
|
||||
{id: "ifl_policy", value: GetPolicyString(cookies[idx].policy)}
|
||||
];
|
||||
|
||||
var value;
|
||||
var field;
|
||||
for (var i = 0; i < props.length; i++)
|
||||
{
|
||||
field = document.getElementById(props[i].id);
|
||||
if ((selections.length > 1) && (props[i].id != "ifl_isDomain")) {
|
||||
value = ""; // clear field if multiple selections
|
||||
} else {
|
||||
value = props[i].value;
|
||||
}
|
||||
field.value = value;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function ClearCookieProperties() {
|
||||
var properties =
|
||||
["ifl_name","ifl_value","ifl_host","ifl_path","ifl_isSecure","ifl_expires","ifl_policy"];
|
||||
for (var prop=0; prop<properties.length; prop++) {
|
||||
document.getElementById(properties[prop]).value = "";
|
||||
}
|
||||
}
|
||||
|
||||
function DeleteCookie() {
|
||||
DeleteSelectedItemFromTree(cookiesTree, cookiesTreeView,
|
||||
cookies, deletedCookies,
|
||||
"removeCookie", "removeAllCookies");
|
||||
if (!cookies.length) {
|
||||
ClearCookieProperties();
|
||||
}
|
||||
FinalizeCookieDeletions();
|
||||
}
|
||||
|
||||
function DeleteAllCookies() {
|
||||
ClearCookieProperties();
|
||||
DeleteAllFromTree(cookiesTree, cookiesTreeView,
|
||||
cookies, deletedCookies,
|
||||
"removeCookie", "removeAllCookies");
|
||||
FinalizeCookieDeletions();
|
||||
}
|
||||
|
||||
function FinalizeCookieDeletions() {
|
||||
for (var c=0; c<deletedCookies.length; c++) {
|
||||
cookiemanager.remove(deletedCookies[c].host,
|
||||
deletedCookies[c].name,
|
||||
deletedCookies[c].path,
|
||||
document.getElementById("checkbox").checked);
|
||||
}
|
||||
deletedCookies.length = 0;
|
||||
}
|
||||
|
||||
function HandleCookieKeyPress(e) {
|
||||
if (e.keyCode == 46) {
|
||||
DeleteCookie();
|
||||
}
|
||||
}
|
||||
|
||||
var lastCookieSortColumn = "";
|
||||
var lastCookieSortAscending = false;
|
||||
|
||||
function CookieColumnSort(column) {
|
||||
lastCookieSortAscending =
|
||||
SortTree(cookiesTree, cookiesTreeView, cookies,
|
||||
column, lastCookieSortColumn, lastCookieSortAscending);
|
||||
lastCookieSortColumn = column;
|
||||
}
|
||||
|
||||
/*** =================== PERMISSIONS CODE =================== ***/
|
||||
|
||||
var permissionsTreeView = {
|
||||
rowCount : 0,
|
||||
setTree : function(tree){},
|
||||
getImageSrc : function(row,column) {},
|
||||
getProgressMode : function(row,column) {},
|
||||
getCellValue : function(row,column) {},
|
||||
getCellText : function(row,column){
|
||||
var rv="";
|
||||
if (column=="siteCol") {
|
||||
rv = permissions[row].rawHost;
|
||||
} else if (column=="statusCol") {
|
||||
rv = permissions[row].capability;
|
||||
}
|
||||
return rv;
|
||||
},
|
||||
isSeparator : function(index) {return false;},
|
||||
isSorted: function() { return false; },
|
||||
isContainer : function(index) {return false;},
|
||||
cycleHeader : function(aColId, aElt) {},
|
||||
getRowProperties : function(row,column,prop){},
|
||||
getColumnProperties : function(column,columnElement,prop){},
|
||||
getCellProperties : function(row,prop){}
|
||||
};
|
||||
var permissionsTree;
|
||||
|
||||
function Permission(number, host, rawHost, type, capability) {
|
||||
this.number = number;
|
||||
this.host = host;
|
||||
this.rawHost = rawHost;
|
||||
this.type = type;
|
||||
this.capability = capability;
|
||||
}
|
||||
|
||||
function loadPermissions() {
|
||||
// load permissions into a table
|
||||
var enumerator = permissionmanager.enumerator;
|
||||
var count = 0;
|
||||
var contentStr;
|
||||
var canStr, cannotStr;
|
||||
if (dialogType == cookieType) {
|
||||
canStr="can";
|
||||
cannotStr="cannot";
|
||||
} else if (dialogType == imageType) {
|
||||
canStr="canImages";
|
||||
cannotStr="cannotImages";
|
||||
} else {
|
||||
canStr="canPopups";
|
||||
cannotStr="cannotPopups";
|
||||
}
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var nextPermission = enumerator.getNext();
|
||||
nextPermission = nextPermission.QueryInterface(Components.interfaces.nsIPermission);
|
||||
if (nextPermission.type == dialogType) {
|
||||
var host = nextPermission.host;
|
||||
var capability = ( nextPermission.capability == nsIPermissionManager.ALLOW_ACTION ) ? true : false;
|
||||
permissions[count] =
|
||||
new Permission(count++, host,
|
||||
(host.charAt(0)==".") ? host.substring(1,host.length) : host,
|
||||
nextPermission.type,
|
||||
cookieBundle.getString(capability?canStr:cannotStr));
|
||||
}
|
||||
}
|
||||
permissionsTreeView.rowCount = permissions.length;
|
||||
|
||||
// sort and display the table
|
||||
permissionsTree.treeBoxObject.view = permissionsTreeView;
|
||||
PermissionColumnSort('rawHost', false);
|
||||
|
||||
// disable "remove all" button if there are no cookies/images
|
||||
if (permissions.length == 0) {
|
||||
document.getElementById("removeAllPermissions").setAttribute("disabled","true");
|
||||
} else {
|
||||
document.getElementById("removeAllPermissions").removeAttribute("disabled");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function PermissionSelected() {
|
||||
var selections = GetTreeSelections(permissionsTree);
|
||||
if (selections.length) {
|
||||
document.getElementById("removePermission").removeAttribute("disabled");
|
||||
}
|
||||
}
|
||||
|
||||
function DeletePermission() {
|
||||
DeleteSelectedItemFromTree(permissionsTree, permissionsTreeView,
|
||||
permissions, deletedPermissions,
|
||||
"removePermission", "removeAllPermissions");
|
||||
FinalizePermissionDeletions();
|
||||
}
|
||||
|
||||
function DeleteAllPermissions() {
|
||||
DeleteAllFromTree(permissionsTree, permissionsTreeView,
|
||||
permissions, deletedPermissions,
|
||||
"removePermission", "removeAllPermissions");
|
||||
FinalizePermissionDeletions();
|
||||
}
|
||||
|
||||
function FinalizePermissionDeletions() {
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
|
||||
for (var p=0; p<deletedPermissions.length; p++) {
|
||||
if (deletedPermissions[p].type == popupType) {
|
||||
// we lost the URI's original scheme, but this will do because the scheme
|
||||
// is stripped later anyway.
|
||||
var uri = ioService.newURI("http://"+deletedPermissions[p].host, null, null);
|
||||
popupmanager.remove(uri);
|
||||
} else
|
||||
permissionmanager.remove(deletedPermissions[p].host, deletedPermissions[p].type);
|
||||
}
|
||||
deletedPermissions.length = 0;
|
||||
}
|
||||
|
||||
function HandlePermissionKeyPress(e) {
|
||||
if (e.keyCode == 46) {
|
||||
DeletePermission();
|
||||
}
|
||||
}
|
||||
|
||||
var lastPermissionSortColumn = "";
|
||||
var lastPermissionSortAscending = false;
|
||||
|
||||
function PermissionColumnSort(column, updateSelection) {
|
||||
lastPermissionSortAscending =
|
||||
SortTree(permissionsTree, permissionsTreeView, permissions,
|
||||
column, lastPermissionSortColumn, lastPermissionSortAscending,
|
||||
updateSelection);
|
||||
lastPermissionSortColumn = column;
|
||||
}
|
||||
|
||||
/*** ============ CODE FOR HELP BUTTON =================== ***/
|
||||
|
||||
function getSelectedTab()
|
||||
{
|
||||
var selTab = document.getElementById('tabbox').selectedTab;
|
||||
var selTabID = selTab.getAttribute('id');
|
||||
if (selTabID == 'cookiesTab') {
|
||||
key = "cookies_stored";
|
||||
} else {
|
||||
key = "cookie_sites";
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
function doHelpButton() {
|
||||
if (dialogType == imageType) {
|
||||
openHelp("image_mgr");
|
||||
} else {
|
||||
var uri = getSelectedTab();
|
||||
openHelp(uri);
|
||||
}
|
||||
// XXX missing popup help
|
||||
}
|
||||
|
|
|
@ -1 +1,180 @@
|
|||
Dummy placeholder until these directories are hooked up correctly.
|
||||
<?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):
|
||||
Ben Goodger
|
||||
-->
|
||||
|
||||
<!-- CHANGE THIS WHEN MOVING FILES -->
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
|
||||
<!-- CHANGE THIS WHEN MOVING FILES -->
|
||||
<!DOCTYPE dialog SYSTEM "chrome://communicator/locale/wallet/CookieViewer.dtd" >
|
||||
|
||||
<dialog id="cookieviewer"
|
||||
buttons="accept,help"
|
||||
title="&windowtitle.label;"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
windowtype="mozilla:cookieviewer"
|
||||
style="width: 30em;"
|
||||
onload="Startup()"
|
||||
onunload="Shutdown()"
|
||||
ondialoghelp="doHelpButton();"
|
||||
persist="screenX screenY width height">
|
||||
|
||||
<script src="chrome://communicator/content/wallet/CookieViewer.js"/>
|
||||
<script src="chrome://global/content/strres.js"/>
|
||||
<script src="chrome://communicator/content/wallet/nsWalletTreeUtils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js" />
|
||||
|
||||
<keyset id="dialogKeys"/>
|
||||
<stringbundle id="cookieBundle"
|
||||
src="chrome://communicator/locale/wallet/CookieViewer.properties"/>
|
||||
|
||||
<tabbox id="tabbox" flex="1">
|
||||
<tabs>
|
||||
<tab id="cookiesTab" label="&tab.cookiesonsystem.label;"/>
|
||||
<tab id="permissionsTab" label="&tab.bannedservers.label;"/>
|
||||
</tabs>
|
||||
<tabpanels id="panel" flex="1">
|
||||
<vbox class="tabpanel" id="system" flex="1">
|
||||
<label value="&div.cookiesonsystem.label;"/>
|
||||
<separator class="thin"/>
|
||||
<tree id="cookiesTree" flex="1" style="height: 10em;"
|
||||
onkeypress="HandleCookieKeyPress(event)"
|
||||
onselect="CookieSelected();">
|
||||
<treecols>
|
||||
<treecol id="domainCol" label="&treehead.cookiedomain.label;" flex="6"
|
||||
onclick="CookieColumnSort('rawHost', true);"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="nameCol" label="&treehead.cookiename.label;" flex="14"
|
||||
onclick="CookieColumnSort('name', true);"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="statusCol" label="&treehead.cookiestatus.label;" flex="1"
|
||||
hidden="true" onclick="CookieColumnSort('status', true);"/>
|
||||
</treecols>
|
||||
<treechildren/>
|
||||
</tree>
|
||||
<groupbox>
|
||||
<caption label="&treehead.infoselected.label;"/>
|
||||
<!-- labels -->
|
||||
<grid flex="1">
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
|
||||
<row align="center">
|
||||
<hbox align="center" pack="end">
|
||||
<label value="&props.name.label;"/>
|
||||
</hbox>
|
||||
<textbox id="ifl_name" readonly="true" class="plain"/>
|
||||
</row>
|
||||
|
||||
<row align="center">
|
||||
<hbox align="center" pack="end">
|
||||
<label value="&props.value.label;"/>
|
||||
</hbox>
|
||||
<textbox id="ifl_value" readonly="true" class="plain"/>
|
||||
</row>
|
||||
|
||||
<row align="center">
|
||||
<hbox align="center" pack="end">
|
||||
<label id="ifl_isDomain" value="&props.domain.label;"/>
|
||||
</hbox>
|
||||
<textbox id="ifl_host" readonly="true" class="plain"/>
|
||||
</row>
|
||||
|
||||
<row align="center">
|
||||
<hbox align="center" pack="end">
|
||||
<label value="&props.path.label;"/>
|
||||
</hbox>
|
||||
<textbox id="ifl_path" readonly="true" class="plain"/>
|
||||
</row>
|
||||
|
||||
<row align="center">
|
||||
<hbox align="center" pack="end">
|
||||
<label value="&props.secure.label;"/>
|
||||
</hbox>
|
||||
<textbox id="ifl_isSecure" readonly="true" class="plain"/>
|
||||
</row>
|
||||
|
||||
<row align="center">
|
||||
<hbox align="center" pack="end">
|
||||
<label value="&props.expires.label;"/>
|
||||
</hbox>
|
||||
<textbox id="ifl_expires" readonly="true" class="plain"/>
|
||||
</row>
|
||||
|
||||
<row align="center" id="policyField" hidden="true">
|
||||
<hbox align="center" pack="end">
|
||||
<label value="&props.policy.label;"/>
|
||||
</hbox>
|
||||
<textbox id="ifl_policy" readonly="true" class="plain"/>
|
||||
</row>
|
||||
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
<hbox>
|
||||
<button id="removeCookie" disabled="true"
|
||||
label="&button.removecookie.label;"
|
||||
oncommand="DeleteCookie();"/>
|
||||
<button id="removeAllCookies"
|
||||
label="&button.removeallcookies.label;"
|
||||
oncommand="DeleteAllCookies();"/>
|
||||
<!-- todo: <button id="restoreCookies" class="dialog push" disabled="true" label="&button.restorecookie.label;" oncommand="RestoreCookies();"/> -->
|
||||
</hbox>
|
||||
<separator class="thin"/>
|
||||
<hbox align="start">
|
||||
<checkbox id="checkbox" label="&checkbox.label;" />
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<vbox id="servers" flex="1">
|
||||
<description id="permissionsText" value="&div.bannedservers.label;"/>
|
||||
<separator class="thin"/>
|
||||
<tree id="permissionsTree" flex="1" style="height: 10em;"
|
||||
hidecolumnpicker="true"
|
||||
onkeypress="HandlePermissionKeyPress(event)"
|
||||
onselect="PermissionSelected();">
|
||||
<treecols>
|
||||
<treecol id="siteCol" label="&treehead.sitename.label;" flex="5"
|
||||
onclick="PermissionColumnSort('rawHost', true);"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="statusCol" label="&treehead.status.label;" flex="5"
|
||||
onclick="PermissionColumnSort('capability', true);"/>
|
||||
</treecols>
|
||||
<treechildren/>
|
||||
</tree>
|
||||
<hbox>
|
||||
<button id="removePermission" disabled="true"
|
||||
label="&removepermission.label;"
|
||||
oncommand="DeletePermission();"/>
|
||||
<button id="removeAllPermissions"
|
||||
label="&removeallpermissions.label;"
|
||||
oncommand="DeleteAllPermissions();"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</dialog>
|
||||
|
|
|
@ -1 +1,35 @@
|
|||
Dummy placeholder until these directories are hooked up correctly.
|
||||
<!ENTITY tab.cookiesonsystem.label "Stored Cookies">
|
||||
<!ENTITY tab.bannedservers.label "Cookie Sites">
|
||||
<!ENTITY div.bannedservers.label "Sites that can and cannot store cookies on your computer.">
|
||||
<!ENTITY div.cookiesonsystem.label "View and remove cookies that are stored on your computer.">
|
||||
<!ENTITY treehead.cookiename.label "Cookie Name">
|
||||
<!ENTITY treehead.cookiedomain.label "Site">
|
||||
<!ENTITY treehead.cookiestatus.label "Status">
|
||||
<!ENTITY treehead.infoselected.label "Information about the selected Cookie">
|
||||
<!ENTITY button.removecookie.label "Remove Cookie">
|
||||
<!ENTITY button.removeallcookies.label "Remove All Cookies">
|
||||
|
||||
<!ENTITY props.name.label "Name:">
|
||||
<!ENTITY props.value.label "Content:">
|
||||
<!ENTITY props.domain.label "Host:">
|
||||
<!ENTITY props.path.label "Path:">
|
||||
<!ENTITY props.secure.label "Server Secure:">
|
||||
<!ENTITY props.expires.label "Expires:">
|
||||
<!ENTITY props.policy.label "Policy:">
|
||||
|
||||
<!ENTITY treehead.sitename.label "Site">
|
||||
<!ENTITY treehead.status.label "Status">
|
||||
<!ENTITY windowtitle.label "Cookie Manager">
|
||||
|
||||
<!ENTITY addpermission.label "New Site">
|
||||
<!ENTITY removepermission.label "Remove Site">
|
||||
<!ENTITY removeallpermissions.label "Remove All Sites">
|
||||
<!ENTITY removeimage.label "Remove Site">
|
||||
<!ENTITY removeallimages.label "Remove All Sites">
|
||||
|
||||
<!ENTITY canSet.label "can set cookies">
|
||||
<!ENTITY cannotSet.label "cannot set cookies">
|
||||
<!ENTITY canLoad.label "can load images">
|
||||
<!ENTITY cannotLoad.label "cannot load images">
|
||||
|
||||
<!ENTITY checkbox.label "Don't allow sites that set removed cookies to set future cookies">
|
||||
|
|
|
@ -1 +1,50 @@
|
|||
Dummy placeholder until these directories are hooked up correctly.
|
||||
# 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.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Ben Goodger
|
||||
|
||||
# note this section of the code may require some tinkering in other languages =(
|
||||
# format in dialog: site [can/cannot] set cookies
|
||||
can=site can set cookies
|
||||
cannot=site cannot set cookies
|
||||
canImages=site can load images
|
||||
cannotImages=site cannot load images
|
||||
canPopups=site can show popups
|
||||
cannotPopups=site cannot show popups
|
||||
domain=Domain for which this cookie applies:
|
||||
host=Server which set the cookie:
|
||||
imageTitle=Image Manager
|
||||
popupTitle=Pop-up Manager
|
||||
hostColon=Host:
|
||||
domainColon=Domain:
|
||||
yes=yes
|
||||
no=no
|
||||
AtEndOfSession = at end of session
|
||||
tabBannedImages=Image Sites
|
||||
tabBannedPopups=Pop-up Sites
|
||||
textBannedImages=Sites from which images are or are not loaded.
|
||||
textBannedPopups=Sites from which pop-up windows are or are not allowed.
|
||||
accepted=accepted
|
||||
downgraded=session
|
||||
flagged=flagged
|
||||
policyUnstated = no policy about storing identifiable information
|
||||
policyNoConsent = stores identifiable information without any user consent
|
||||
policyImplicitConsent = stores identifiable information unless user opts out
|
||||
policyExplicitConsent = stores identifiable information if user opts in
|
||||
policyNoIICollected = does not store identifiable information
|
||||
close=Close
|
||||
|
|
Загрузка…
Ссылка в новой задаче