зеркало из https://github.com/mozilla/pjs.git
fix signonviewer bugs 14703 and 14916, approved chofmann
This commit is contained in:
Родитель
f3c248ff76
Коммит
6a164cc520
|
@ -1369,6 +1369,7 @@ sub MakeResourceAliases()
|
|||
_InstallResources(":mozilla:extensions:wallet:src:MANIFEST_PROPERTIES", "$wallet_chrome_dir:locale:en-US:", 0);
|
||||
|
||||
_InstallResources(":mozilla:extensions:wallet:cookieviewer:MANIFEST_SKIN", "$wallet_chrome_dir:skin:default:", 0);
|
||||
_InstallResources(":mozilla:extensions:wallet:signonviewer:MANIFEST_SKIN", "$wallet_chrome_dir:skin:default:", 0);
|
||||
|
||||
{
|
||||
my($pref_chrome_dir) = "$chrome_dir" . "Pref";
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
SignonViewer.properties
|
|
@ -40,5 +40,6 @@ include $(topsrcdir)/config/rules.mk
|
|||
|
||||
install:: $(TARGETS)
|
||||
$(INSTALL) $(srcdir)/SignonViewer.xul $(srcdir)/SignonViewer.js $(DIST)/bin/chrome/wallet/content/default
|
||||
$(INSTALL) $(srcdir)/SignonViewer.properties $(DIST)/bin/chrome/wallet/locale/en-US
|
||||
$(INSTALL) $(srcdir)/SignonViewer.properties $(srcdir)/SignonViewer.dtd $(DIST)/bin/chrome/wallet/locale/en-US
|
||||
$(INSTALL) $(srcdir)/SignonViewer.css $(DIST)/bin/chrome/wallet/skin/default
|
||||
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
window {
|
||||
min-width: 400px;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
box.tabpanel {
|
||||
border: 1px outset #CCCCDD;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
tab {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
treehead > treerow > treecell {
|
||||
border: 1px outset #CCCCDD;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
background-color: #CCCCDD;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
treechildren > treeitem > treerow > treecell {
|
||||
border-right: 1px solid #CCCCDD;
|
||||
border-bottom: 1px solid #CCCCDD;
|
||||
color: inherit;
|
||||
padding-left: 10px;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
treechildren > treeitem > treerow > treecell.fieldcell {
|
||||
border-right: 1px solid #CCCCDD;
|
||||
border-bottom: 1px solid #CCCCDD;
|
||||
color: inherit;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
|
||||
treechildren > treeitem > treerow [selectedrow ~= false] {
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
treechildren > treeitem > treerow [selectedrow ~= true] {
|
||||
background-color: #666699;
|
||||
color: white;
|
||||
}
|
||||
|
||||
tree#infotree treechildren > treeitem > treerow [selectedrow ~= false] {
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
tree#infotree treechildren > treeitem > treerow [selectedrow ~= true] {
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
tree {
|
||||
border: 1px inset #CCCCDD;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0000FF;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #FF0000;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
tree treechildren > treeitem > treerow[selectedrow=true] > treecell > a:link {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
tree treechildren > treeitem > treerow[selectedrow ~= true] > treecell > a:hover {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
input.dispcell {
|
||||
border: none;
|
||||
background-color: #CCCCDD;
|
||||
height: 12px;
|
||||
font-family: tahoma;
|
||||
font-size: 10px;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
<!ENTITY windowtitle.label "Signon Viewer">
|
||||
<!ENTITY tab.signonsstored.label "Signons Saved">
|
||||
<!ENTITY tab.signonsnotstored.label "Signons Not Saved">
|
||||
<!ENTITY tab.nopreview.label "Forms not Previewed">
|
||||
|
||||
<!ENTITY spiel.signonsstored.label "Communicator has saved login information for the following sites:">
|
||||
<!ENTITY spiel.signonsnotstored.label "Communicator will not save login information for the following sites:">
|
||||
<!ENTITY spiel.nopreview.label "Communicator will not preview the following forms before filling them for you:">
|
||||
|
||||
<!ENTITY treehead.signonsite.label "Site">
|
||||
<!ENTITY treehead.signonusername.label "Username">
|
||||
<!ENTITY treehead.nopreviewforms.label "Form">
|
||||
<!ENTITY remove.label "Remove">
|
|
@ -1,490 +1,180 @@
|
|||
/* for localization */
|
||||
var Bundle = srGetStrBundle("chrome://wallet/locale/SignonViewer.properties");
|
||||
var logonsSavedTab = Bundle.GetStringFromName("logonsSavedTab");
|
||||
var logonsNotSavedTab = Bundle.GetStringFromName("logonsNotSavedTab");
|
||||
var formsNotPreviewedTab = Bundle.GetStringFromName("formsNotPreviewedTab");
|
||||
var formsNotSavedTab = Bundle.GetStringFromName("formsNotSavedTab");
|
||||
var logonsSaved = Bundle.GetStringFromName("logonsSaved");
|
||||
var siteUsername = Bundle.GetStringFromName("siteUsername");
|
||||
var logonsNotSaved = Bundle.GetStringFromName("logonsNotSaved");
|
||||
var formsNotPreviewed = Bundle.GetStringFromName("formsNotPreviewed");
|
||||
var formsNotSaved = Bundle.GetStringFromName("formsNotSaved");
|
||||
var removeCmdLabel = Bundle.GetStringFromName("removeCmdLabel");
|
||||
var okCmdLabel = Bundle.GetStringFromName("okCmdLabel");
|
||||
var cancelCmdLabel = Bundle.GetStringFromName("cancelCmdLabel");
|
||||
/* -*- 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.0 (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
|
||||
*/
|
||||
|
||||
/* for xpconnect */
|
||||
/*** =================== INITIALISATION CODE =================== ***/
|
||||
|
||||
var signonviewer =
|
||||
Components.classes
|
||||
["component://netscape/signonviewer/signonviewer-world"].createInstance();
|
||||
signonviewer = signonviewer.QueryInterface(Components.interfaces.nsISignonViewer);
|
||||
// globals
|
||||
var signonviewer = null;
|
||||
var signonList = [];
|
||||
var rejectList = [];
|
||||
var nopreviewList = [];
|
||||
var nocaptureList = [];
|
||||
var goneSS = ""; // signon
|
||||
var goneIS = ""; // ignored site
|
||||
var goneFR = ""; // form preview
|
||||
var goneNC = ""; // nocapture
|
||||
|
||||
function DoGetSignonList()
|
||||
{
|
||||
return signonviewer.GetSignonValue();
|
||||
// function : <SignonViewer.js>::Startup();
|
||||
// purpose : initialises interface, calls init functions for each page
|
||||
function Startup()
|
||||
{
|
||||
signonviewer = Components.classes["component://netscape/signonviewer/signonviewer-world"].createInstance();
|
||||
signonviewer = signonviewer.QueryInterface(Components.interfaces.nsISignonViewer);
|
||||
|
||||
doSetOKCancel(onOK, null); // init ok event handler
|
||||
|
||||
LoadSignons();
|
||||
LoadReject();
|
||||
LoadNopreview();
|
||||
}
|
||||
|
||||
/*** =================== SAVED SIGNONS CODE =================== ***/
|
||||
|
||||
// function : <SignonViewer.js>::LoadSignons();
|
||||
// purpose : reads signons from interface and loads into tree
|
||||
function LoadSignons()
|
||||
{
|
||||
signonList = signonviewer.GetSignonValue();
|
||||
var delim = signonList[0];
|
||||
signonList = signonList.split(delim);
|
||||
for(var i = 1; i < signonList.length; i++)
|
||||
{
|
||||
var currSignon = TrimString(signonList[i]);
|
||||
// TEMP HACK until morse fixes signon viewer functions
|
||||
currSignon = RemoveHTMLFormatting(currSignon);
|
||||
var site = currSignon.substring(0,currSignon.lastIndexOf(":"));
|
||||
var user = currSignon.substring(currSignon.lastIndexOf(":")+1,currSignon.length);
|
||||
AddItem("savesignonlist",[site,user],"signon_",i-1);
|
||||
}
|
||||
}
|
||||
|
||||
/*** =================== IGNORED SIGNONS CODE =================== ***/
|
||||
|
||||
// function : <SignonViewer.js>::LoadReject();
|
||||
// purpose : reads rejected sites from interface and loads into tree
|
||||
function LoadReject()
|
||||
{
|
||||
rejectList = signonviewer.GetRejectValue();
|
||||
var delim = rejectList[0];
|
||||
rejectList = rejectList.split(delim);
|
||||
for(var i = 1; i < rejectList.length; i++)
|
||||
{
|
||||
var currSignon = TrimString(rejectList[i]);
|
||||
// TEMP HACK until morse fixes signon viewer functions
|
||||
currSignon = RemoveHTMLFormatting(currSignon);
|
||||
var site = currSignon.substring(0,currSignon.lastIndexOf(":"));
|
||||
var user = currSignon.substring(currSignon.lastIndexOf(":")+1,currSignon.length);
|
||||
AddItem("ignoredlist",[site,user],"reject_",i-1);
|
||||
}
|
||||
}
|
||||
|
||||
/*** =================== NO PREVIEW FORMS CODE =================== ***/
|
||||
|
||||
// function : <SignonViewer.js>::LoadNopreview();
|
||||
// purpose : reads non-previewed forms from interface and loads into tree
|
||||
function LoadNopreview()
|
||||
{
|
||||
nopreviewList = signonviewer.GetNopreviewValue();
|
||||
var delim = nopreviewList[0];
|
||||
nopreviewList = nopreviewList.split(delim);
|
||||
for(var i = 1; i < nopreviewList.length; i++)
|
||||
{
|
||||
var currSignon = TrimString(nopreviewList[i]);
|
||||
// TEMP HACK until morse fixes signon viewer functions
|
||||
currSignon = RemoveHTMLFormatting(currSignon);
|
||||
var form = currSignon.substring(currSignon.lastIndexOf(":")+1,currSignon.length);
|
||||
AddItem("nopreviewlist",[form],"nopreview_",i-1);
|
||||
}
|
||||
}
|
||||
|
||||
function onOK()
|
||||
{
|
||||
var result = "|goneS|"+goneSS+"|goneR|"+goneIS;
|
||||
result += "|goneC|"+goneNC+"|goneP|"+goneFR+"|";
|
||||
signonviewer.SetValue(result, window);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*** =================== UTILITY FUNCTIONS =================== ***/
|
||||
|
||||
// function : <SignonViewer.js>::RemoveHTMLFormatting();
|
||||
// purpose : removes HTML formatting from input stream
|
||||
function RemoveHTMLFormatting(which)
|
||||
{
|
||||
var ignoreon = false;
|
||||
var rv = "";
|
||||
for(var i = 0; i < which.length; i++)
|
||||
{
|
||||
if(which.charAt(i) == "<")
|
||||
ignoreon = true;
|
||||
if(which.charAt(i) == ">") {
|
||||
ignoreon = false;
|
||||
continue;
|
||||
}
|
||||
if(ignoreon)
|
||||
continue;
|
||||
rv += which.charAt(i);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
function DoGetRejectList()
|
||||
{
|
||||
return signonviewer.GetRejectValue();
|
||||
}
|
||||
/*** =================== TREE MANAGEMENT CODE =================== ***/
|
||||
|
||||
function DoGetNopreviewList()
|
||||
{
|
||||
return signonviewer.GetNopreviewValue();
|
||||
}
|
||||
// function : <SignonViewer.js>::AddItem();
|
||||
// purpose : utility function for adding items to a tree.
|
||||
function AddItem(children,cells,prefix,idfier)
|
||||
{
|
||||
var kids = document.getElementById(children);
|
||||
var item = document.createElement("treeitem");
|
||||
var row = document.createElement("treerow");
|
||||
for(var i = 0; i < cells.length; i++)
|
||||
{
|
||||
var cell = document.createElement("treecell");
|
||||
var text = document.createTextNode(cells[i]);
|
||||
cell.appendChild(text);
|
||||
row.appendChild(cell);
|
||||
}
|
||||
item.appendChild(row);
|
||||
item.setAttribute("id",prefix + idfier);
|
||||
kids.appendChild(item);
|
||||
}
|
||||
|
||||
function DoGetNocaptureList()
|
||||
{
|
||||
return signonviewer.GetNocaptureValue();
|
||||
}
|
||||
|
||||
function DoSave(value)
|
||||
{
|
||||
signonviewer.SetValue(value, window);
|
||||
}
|
||||
|
||||
/* end of xpconnect stuff */
|
||||
|
||||
index_frame = 0;
|
||||
title_frame = 1;
|
||||
spacer1_frame = 2;
|
||||
list_frame = 3;
|
||||
spacer2_frame = 4;
|
||||
button_frame = 5;
|
||||
|
||||
var signon_mode;
|
||||
var signonList = [];
|
||||
var rejectList = [];
|
||||
var nopreviewList = [];
|
||||
var nocaptureList = [];
|
||||
deleted_signons = new Array;
|
||||
deleted_rejects = new Array;
|
||||
deleted_nopreviews = new Array;
|
||||
deleted_nocaptures = new Array;
|
||||
|
||||
function DeleteItemSelected() {
|
||||
if (signon_mode == 0) {
|
||||
DeleteSignonSelected();
|
||||
} else if (signon_mode == 1) {
|
||||
DeleteRejectSelected();
|
||||
} else if (signon_mode == 2) {
|
||||
DeleteNopreviewSelected();
|
||||
} else if (signon_mode == 3) {
|
||||
DeleteNocaptureSelected();
|
||||
}
|
||||
}
|
||||
|
||||
function DeleteSignonSelected() {
|
||||
selname = top.frames[list_frame].document.fSelectSignon.selname;
|
||||
goneS = top.frames[button_frame].document.buttons.goneS;
|
||||
var p;
|
||||
var i;
|
||||
for (i=selname.options.length; i>0; i--) {
|
||||
if (selname.options[i-1].selected) {
|
||||
selname.options[i-1].selected = 0;
|
||||
goneS.value = goneS.value + selname.options[i-1].value + ",";
|
||||
deleted_signons[selname.options[i-1].value] = 1;
|
||||
selname.remove(i-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DeleteRejectSelected() {
|
||||
selname = top.frames[list_frame].document.fSelectReject.selname;
|
||||
goneR = top.frames[button_frame].document.buttons.goneR;
|
||||
var p;
|
||||
var i;
|
||||
for (i=selname.options.length; i>0; i--) {
|
||||
if (selname.options[i-1].selected) {
|
||||
selname.options[i-1].selected = 0;
|
||||
goneR.value = goneR.value + selname.options[i-1].value + ",";
|
||||
deleted_rejects[selname.options[i-1].value] = 1;
|
||||
selname.remove(i-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DeleteNopreviewSelected() {
|
||||
selname = top.frames[list_frame].document.fSelectNopreview.selname;
|
||||
goneP = top.frames[button_frame].document.buttons.goneP;
|
||||
var p;
|
||||
var i;
|
||||
for (i=selname.options.length; i>0; i--) {
|
||||
if (selname.options[i-1].selected) {
|
||||
selname.options[i-1].selected = 0;
|
||||
goneP.value = goneP.value + selname.options[i-1].value + ",";
|
||||
deleted_nopreviews[selname.options[i-1].value] = 1;
|
||||
selname.remove(i-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DeleteNocaptureSelected() {
|
||||
selname = top.frames[list_frame].document.fSelectNocapture.selname;
|
||||
goneC = top.frames[button_frame].document.buttons.goneC;
|
||||
var p;
|
||||
var i;
|
||||
for (i=selname.options.length; i>0; i--) {
|
||||
if (selname.options[i-1].selected) {
|
||||
selname.options[i-1].selected = 0;
|
||||
goneC.value = goneC.value + selname.options[i-1].value + ",";
|
||||
deleted_nocaptures[selname.options[i-1].value] = 1;
|
||||
selname.remove(i-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function loadSignons(){
|
||||
signon_mode = 0;
|
||||
top.frames[index_frame].document.open();
|
||||
top.frames[index_frame].document.write(
|
||||
"<body bgcolor='#c0c0c0'>" +
|
||||
"<table border=0 width='100%'>" +
|
||||
"<tr>" +
|
||||
"<td align='center' valign='middle' bgcolor='#ffffff'>" +
|
||||
"<font size='2' color='#666666'>" +
|
||||
"<b>" + logonsSavedTab + "</b>" +
|
||||
"</font>" +
|
||||
"</td>" +
|
||||
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
"<a onclick='top.loadRejects();' href=''>" +
|
||||
"<font size='2'>" + logonsNotSavedTab + "</font>" +
|
||||
"</a>" +
|
||||
"</td>" +
|
||||
// "</tr>" +
|
||||
// "<tr>" +
|
||||
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
"<a onclick='top.loadNopreviews();' href=''>" +
|
||||
"<font size='2'>" + formsNotPreviewedTab + "</font>" +
|
||||
"</a>" +
|
||||
"</td>" +
|
||||
// "<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
// "<a onclick='top.loadNocaptures();' href=''>" +
|
||||
// "<font size='2'>" + formsNotSavedTab + "</font>" +
|
||||
// "</a>" +
|
||||
// "</td>" +
|
||||
"<td> </td>" +
|
||||
"</tr>" +
|
||||
"</table>" +
|
||||
"</body>"
|
||||
);
|
||||
top.frames[index_frame].document.close();
|
||||
|
||||
top.frames[title_frame].document.open();
|
||||
top.frames[title_frame].document.write
|
||||
(" " + logonsSaved + "");
|
||||
top.frames[title_frame].document.close();
|
||||
|
||||
loadSignonsList();
|
||||
}
|
||||
|
||||
function loadSignonsList(){
|
||||
top.frames[list_frame].document.open();
|
||||
top.frames[list_frame].document.write(
|
||||
"<form name='fSelectSignon'>" +
|
||||
"<p>" +
|
||||
"<b>" + siteUsername + "</b>" +
|
||||
"<table border='0'>" +
|
||||
"<tr>" +
|
||||
"<td width='100%' valign='top'>" +
|
||||
"<center>" +
|
||||
"<p>" +
|
||||
"<select name='selname' size='10' multiple='multiple'> "
|
||||
);
|
||||
for (i=1; !(i>=signonList.length); i++) {
|
||||
if (!deleted_signons[i-1]) {
|
||||
top.frames[list_frame].document.write(signonList[i]);
|
||||
}
|
||||
}
|
||||
top.frames[list_frame].document.write(
|
||||
"</select>" +
|
||||
"</p>" +
|
||||
"</center>" +
|
||||
"</td>" +
|
||||
"</tr>" +
|
||||
"</table>" +
|
||||
"</p>" +
|
||||
"</form>"
|
||||
);
|
||||
top.frames[list_frame].document.close();
|
||||
}
|
||||
|
||||
function loadRejects(){
|
||||
signon_mode = 1;
|
||||
top.frames[index_frame].document.open();
|
||||
top.frames[index_frame].document.write(
|
||||
"<body bgcolor='#c0c0c0'>" +
|
||||
"<table border='0' width='100%'>" +
|
||||
"<tr>" +
|
||||
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
"<a onclick='top.loadSignons();' href=''>" +
|
||||
"<font size='2'>" + logonsSavedTab + "</font>" +
|
||||
"</a>" +
|
||||
"</td>" +
|
||||
"<td align='center' valign='middle' bgcolor='#ffffff'>" +
|
||||
"<font size='2' color='#666666'>" +
|
||||
"<b>" + logonsNotSavedTab + "</b>" +
|
||||
"</font>" +
|
||||
"</td>" +
|
||||
"<td> </td>" +
|
||||
// "</tr>" +
|
||||
// "<tr>" +
|
||||
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
"<a onclick='top.loadNopreviews();' href=''>" +
|
||||
"<font size='2'>" + formsNotPreviewedTab + "</font>" +
|
||||
"</a>" +
|
||||
"</td>" +
|
||||
// "<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
// "<a onclick='top.loadNocaptures();' href=''>" +
|
||||
// "<font size='2'>" + formsNotSavedTab + "</font>" +
|
||||
// "</a>" +
|
||||
// "</td>" +
|
||||
"<td> </td>" +
|
||||
"</tr>" +
|
||||
"</table>" +
|
||||
"</body>"
|
||||
);
|
||||
top.frames[index_frame].document.close();
|
||||
|
||||
top.frames[title_frame].document.open();
|
||||
top.frames[title_frame].document.write
|
||||
(" " + logonsNotSaved + "");
|
||||
top.frames[title_frame].document.close();
|
||||
|
||||
loadRejectsList();
|
||||
}
|
||||
|
||||
function loadRejectsList(){
|
||||
top.frames[list_frame].document.open();
|
||||
top.frames[list_frame].document.write(
|
||||
"<form name='fSelectReject'>" +
|
||||
"<p>" +
|
||||
"<table border='0'>" +
|
||||
"<tr>" +
|
||||
"<td width='100%' valign='top'>" +
|
||||
"<center>" +
|
||||
"<p>" +
|
||||
"<select name='selname' size='10' multiple='multiple'> "
|
||||
);
|
||||
for (i=1; !(i>=rejectList.length); i++) {
|
||||
if (!deleted_rejects[i-1]) {
|
||||
top.frames[list_frame].document.write(rejectList[i]);
|
||||
}
|
||||
}
|
||||
top.frames[list_frame].document.write(
|
||||
"</select>" +
|
||||
"</p>" +
|
||||
"</center>" +
|
||||
"</td>" +
|
||||
"</tr>" +
|
||||
"</table>" +
|
||||
"</p>" +
|
||||
"</form>"
|
||||
);
|
||||
top.frames[list_frame].document.close();
|
||||
}
|
||||
|
||||
function loadNopreviews(){
|
||||
signon_mode = 2;
|
||||
top.frames[index_frame].document.open();
|
||||
top.frames[index_frame].document.write(
|
||||
"<body bgcolor='#c0c0c0'>" +
|
||||
"<table border='0' width='100%'>" +
|
||||
"<tr>" +
|
||||
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
"<a onclick='top.loadSignons();' href=''>" +
|
||||
"<font size='2'>" + logonsSavedTab + "</font>" +
|
||||
"</a>" +
|
||||
"</td>" +
|
||||
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
"<a onclick='top.loadRejects();' href=''>" +
|
||||
"<font size='2'>" + logonsNotSavedTab + "</font>" +
|
||||
"</a>" +
|
||||
"</td>" +
|
||||
// "</tr>" +
|
||||
// "<tr>" +
|
||||
"<td align='center' valign='middle' bgcolor='#ffffff'>" +
|
||||
"<font size='2' color='#666666'>" +
|
||||
"<b>" + formsNotPreviewedTab + "</b>" +
|
||||
"</font>" +
|
||||
"</td>" +
|
||||
// "<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
// "<a onclick='top.loadNocaptures();' href=''>" +
|
||||
// "<font size='2'>" + formsNotSavedTab + "</font>" +
|
||||
// "</a>" +
|
||||
// "</td>" +
|
||||
"<td> </td>" +
|
||||
"</tr>" +
|
||||
"</table>" +
|
||||
"</body>"
|
||||
);
|
||||
top.frames[index_frame].document.close();
|
||||
|
||||
top.frames[title_frame].document.open();
|
||||
top.frames[title_frame].document.write
|
||||
(" " + formsNotPreviewed + "");
|
||||
top.frames[title_frame].document.close();
|
||||
|
||||
loadNopreviewsList();
|
||||
}
|
||||
|
||||
function loadNopreviewsList(){
|
||||
top.frames[list_frame].document.open();
|
||||
top.frames[list_frame].document.write(
|
||||
"<form name='fSelectNopreview'>" +
|
||||
"<p>" +
|
||||
"<table border='0'>" +
|
||||
"<tr>" +
|
||||
"<td width='100%' valign='top'>" +
|
||||
"<center>" +
|
||||
"<p>" +
|
||||
"<select name='selname' size='10' multiple='multiple'> "
|
||||
);
|
||||
for (i=1; !(i>=nopreviewList.length); i++) {
|
||||
if (!deleted_nopreviews[i-1]) {
|
||||
top.frames[list_frame].document.write(nopreviewList[i]);
|
||||
}
|
||||
}
|
||||
top.frames[list_frame].document.write(
|
||||
"</select>" +
|
||||
"</p>" +
|
||||
"</center>" +
|
||||
"</td>" +
|
||||
"</tr>" +
|
||||
"</table>" +
|
||||
"</p>" +
|
||||
"</form>"
|
||||
);
|
||||
top.frames[list_frame].document.close();
|
||||
}
|
||||
|
||||
function loadNocaptures(){
|
||||
signon_mode = 3;
|
||||
top.frames[index_frame].document.open();
|
||||
top.frames[index_frame].document.write(
|
||||
"<body bgcolor='#c0c0c0'>" +
|
||||
"<table border='0' width='100%'>" +
|
||||
"<tr>" +
|
||||
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
"<a onclick='top.loadSignons();' href=''>" +
|
||||
"<font size='2'>" + logonsSavedTab + "</font>" +
|
||||
"</a>" +
|
||||
"</td>" +
|
||||
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
"<a onclick='top.loadRejects();' href=''>" +
|
||||
"<font size='2'>" + logonsNotSavedTab + "</font>" +
|
||||
"</a>" +
|
||||
"</td>" +
|
||||
"</tr>" +
|
||||
"<tr>" +
|
||||
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
||||
"<a onclick='top.loadNopreviews();' href=''>" +
|
||||
"<font size='2'>" + formsNotPreviewedTab + "</font>" +
|
||||
"</a>" +
|
||||
"</td>" +
|
||||
"<td align='center' valign='middle' bgcolor='#ffffff'>" +
|
||||
"<font size='2' color='#666666'>" +
|
||||
"<b>" + formsNotSavedtab + "</b>" +
|
||||
"</font>" +
|
||||
"</td>" +
|
||||
"<td> </td>" +
|
||||
"</tr>" +
|
||||
"</table>" +
|
||||
"</body>"
|
||||
);
|
||||
top.frames[index_frame].document.close();
|
||||
|
||||
top.frames[title_frame].document.open();
|
||||
top.frames[title_frame].document.write
|
||||
(" " + formsNotSaved + "");
|
||||
top.frames[title_frame].document.close();
|
||||
|
||||
loadNocapturesList();
|
||||
}
|
||||
|
||||
function loadNocapturesList(){
|
||||
top.frames[list_frame].document.open();
|
||||
top.frames[list_frame].document.write(
|
||||
"<form name='fSelectNocapture'>" +
|
||||
"<p>" +
|
||||
"<table border='0'>" +
|
||||
"<tr>" +
|
||||
"<td width='100%' valign='top'>" +
|
||||
"<center>" +
|
||||
"<p>" +
|
||||
"<select name='selname' size='10' multiple='multiple'> "
|
||||
);
|
||||
for (i=1; !(i>=nocaptureList.length); i++) {
|
||||
if (!deleted_nocaptures[i-1]) {
|
||||
top.frames[list_frame].document.write(nocaptureList[i]);
|
||||
}
|
||||
}
|
||||
top.frames[list_frame].document.write(
|
||||
"</select>" +
|
||||
"</p>" +
|
||||
"</center>" +
|
||||
"</td>" +
|
||||
"</tr>" +
|
||||
"</table>" +
|
||||
"</p>" +
|
||||
"</form>"
|
||||
);
|
||||
top.frames[list_frame].document.close();
|
||||
}
|
||||
|
||||
function loadButtons(){
|
||||
top.frames[button_frame].document.open();
|
||||
top.frames[button_frame].document.write(
|
||||
"<form name='buttons'>" +
|
||||
"<br/>" +
|
||||
" " +
|
||||
"<button onclick='top.DeleteItemSelected();'>" + removeCmdLabel + "</button>" +
|
||||
"<div align='right'>" +
|
||||
"<button onclick='parent.Save();'>" + okCmdLabel + "</button>" +
|
||||
" " +
|
||||
"<button onclick='parent.Cancel();'>" + cancelCmdLabel + "</button>" +
|
||||
"</div>" +
|
||||
"<input type='hidden' name='goneS' value='' size='-1'/>" +
|
||||
"<input type='hidden' name='goneR' value='' size='-1'/>" +
|
||||
"<input type='hidden' name='goneP' value='' size='-1'/>" +
|
||||
"<input type='hidden' name='goneC' value='' size='-1'/>" +
|
||||
"<input type='hidden' name='signonList' value='' size='-1'/>" +
|
||||
"<input type='hidden' name='rejectList' value='' size='-1'/>" +
|
||||
"</form>"
|
||||
);
|
||||
top.frames[button_frame].document.close();
|
||||
}
|
||||
|
||||
function loadFrames(){
|
||||
list = DoGetSignonList();
|
||||
BREAK = list[0];
|
||||
signonList = list.split(BREAK);
|
||||
list = DoGetRejectList();
|
||||
BREAK = list[0];
|
||||
rejectList = list.split(BREAK);
|
||||
list = DoGetNopreviewList();
|
||||
BREAK = list[0];
|
||||
nopreviewList = list.split(BREAK);
|
||||
list = DoGetNocaptureList();
|
||||
BREAK = list[0];
|
||||
nocaptureList = list.split(BREAK);
|
||||
loadSignons();
|
||||
loadButtons();
|
||||
}
|
||||
|
||||
function Save(){
|
||||
var goneS = top.frames[button_frame].document.buttons.goneS;
|
||||
var goneR = top.frames[button_frame].document.buttons.goneR;
|
||||
var goneP = top.frames[button_frame].document.buttons.goneP;
|
||||
var goneC = top.frames[button_frame].document.buttons.goneC;
|
||||
var result = "|goneS|"+goneS.value+"|goneR|"+goneR.value;
|
||||
result += "|goneC|"+goneC.value+"|goneP|"+goneP.value+"|";
|
||||
DoSave(result);
|
||||
}
|
||||
|
||||
function Cancel(){
|
||||
var result = "|goneS||goneR||goneC||goneP||";
|
||||
DoSave(result);
|
||||
}
|
||||
// function : <SignonViewer.js>::DeleteItemSelected();
|
||||
// purpose : deletes all the signons that are selected
|
||||
function DeleteItemSelected(tree, prefix, kids) {
|
||||
var delnarray = [];
|
||||
var rv = "";
|
||||
var cookietree = document.getElementById(tree);
|
||||
selitems = cookietree.selectedItems;
|
||||
for(var i = 0; i < selitems.length; i++)
|
||||
{
|
||||
delnarray[i] = document.getElementById(selitems[i].getAttribute("id"));
|
||||
var itemid = parseInt(selitems[i].getAttribute("id").substring(prefix.length,selitems[i].getAttribute("id").length));
|
||||
rv += (itemid + ",");
|
||||
}
|
||||
for(var i = 0; i < delnarray.length; i++)
|
||||
{
|
||||
document.getElementById(kids).removeChild(delnarray[i]);
|
||||
}
|
||||
return rv;
|
||||
}
|
|
@ -1,49 +1,128 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE window>
|
||||
<xul:window xmlns="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<!--
|
||||
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
|
||||
-->
|
||||
|
||||
<script src="chrome://global/content/strres.js"/>
|
||||
<script src="SignonViewer.js"/>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<!-- CHANGE THIS WHEN MOVING FILES -->
|
||||
<?xml-stylesheet href="chrome://wallet/skin/SignonViewer.css" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!-- CHANGE THIS WHEN MOVING FILES -->
|
||||
<!DOCTYPE window SYSTEM "chrome://wallet/locale/SignonViewer.dtd" >
|
||||
|
||||
<window id="signonviewer"
|
||||
width="400" height="420"
|
||||
title="&windowtitle.label;"
|
||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
align="vertical"
|
||||
onload="Startup()">
|
||||
|
||||
<html:script src="SignonViewer.js"/>
|
||||
<html:script language="javascript" src="chrome://global/content/strres.js" />
|
||||
<html:script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js"/>
|
||||
|
||||
<tabcontrol flex="100%" align="vertical">
|
||||
<tabbox>
|
||||
<tab>&tab.signonsstored.label;</tab>
|
||||
<tab>&tab.signonsnotstored.label;</tab>
|
||||
<tab>&tab.nopreview.label;</tab>
|
||||
</tabbox>
|
||||
<tabpanel align="horizontal" style="width: 400px;">
|
||||
<!-- saved signons -->
|
||||
<box class="tabpanel" id="savedsignons" flex="100%" align="vertical">
|
||||
<box><html:div>&spiel.signonsstored.label;</html:div></box>
|
||||
<spring style="height: 10px;"/>
|
||||
<html:div style="width: 380px;">
|
||||
<tree id="signonstree" style="height: 280px; width: 380px;" align="vertical">
|
||||
<treecol width="45%"/>
|
||||
<treecol width="55%"/>
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell>&treehead.signonsite.label;</treecell>
|
||||
<treecell>&treehead.signonusername.label;</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
<treechildren id="savesignonlist"/>
|
||||
</tree>
|
||||
</html:div>
|
||||
<spring style="height: 5px;"/>
|
||||
<box align="horizontal">
|
||||
<titledbutton value="&remove.label;" onclick="goneSS += DeleteItemSelected('signonstree','signon_','savesignonlist');"/>
|
||||
</box>
|
||||
<spring style="height: 5px;"/>
|
||||
</box>
|
||||
<!-- ignored signon sites -->
|
||||
<box class="tabpanel" id="ignoredsites" flex="100%" align="vertical">
|
||||
<html:div>&spiel.signonsnotstored.label;</html:div>
|
||||
<spring style="height: 10px;"/>
|
||||
<html:div flex="100%">
|
||||
<tree id="ignoretree" style="height: 280px; width: 380px;" align="vertical">
|
||||
<treecol width="45%"/>
|
||||
<treecol width="55%"/>
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell>&treehead.signonsite.label;</treecell>
|
||||
<treecell>&treehead.signonusername.label;</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
<treechildren id="ignoredlist"/>
|
||||
</tree>
|
||||
</html:div>
|
||||
<spring style="height: 5px;"/>
|
||||
<box align="horizontal">
|
||||
<titledbutton value="&remove.label;" onclick="goneIS += DeleteItemSelected('ignoretree','reject_','ignoredlist');"/>
|
||||
</box>
|
||||
<spring style="height: 5px;"/>
|
||||
</box>
|
||||
<!-- do not preview panel -->
|
||||
<box class="tabpanel" id="nopreviewforms" flex="100%" align="vertical">
|
||||
<html:div>&spiel.nopreview.label;</html:div>
|
||||
<spring style="height: 10px;"/>
|
||||
<html:div flex="100%">
|
||||
<tree id="nopreviewtree" style="height: 280px; width: 380px;" align="vertical">
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell>&treehead.nopreviewforms.label;</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
<treechildren id="nopreviewlist"/>
|
||||
</tree>
|
||||
</html:div>
|
||||
<spring style="height: 5px;"/>
|
||||
<box align="horizontal">
|
||||
<titledbutton value="&remove.label;" onclick="goneFR += DeleteItemSelected('nopreviewtree','nopreview_','nopreviewlist');"/>
|
||||
</box>
|
||||
<spring style="height: 5px;"/>
|
||||
</box>
|
||||
</tabpanel>
|
||||
</tabcontrol>
|
||||
|
||||
<!-- from dialogOverlay.xul -->
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<box id="okCancelButtons"/>
|
||||
</box>
|
||||
|
||||
</window>
|
||||
|
||||
<frameset rows = "15,10,125,50" border="0" framespacing="0" onload="loadFrames();">
|
||||
<frame src="about:blank"
|
||||
id="index_frame"
|
||||
scrolling="no"
|
||||
marginwidth="1"
|
||||
marginheight="1"
|
||||
noresize="noresize"/>
|
||||
<frame src="about:blank"
|
||||
id="title_frame"
|
||||
scrolling="no"
|
||||
marginwidth="1"
|
||||
marginheight="1"
|
||||
noresize="noresize"/>
|
||||
<frameset cols="5,*,5" border="0" framespacing="0">
|
||||
<frame src="about:blank"
|
||||
id="spacer1_frame"
|
||||
scrolling="AUTO"
|
||||
marginwidth="0"
|
||||
marginheight="0"
|
||||
noresize="noresize"/>
|
||||
<frame src="about:blank"
|
||||
id="list_frame"
|
||||
scrolling="auto"
|
||||
marginwidth="0"
|
||||
marginheight="0"
|
||||
noresize="noresize"/>
|
||||
<frame src="about:blank"
|
||||
id="spacer2_frame"
|
||||
scrolling="auto"
|
||||
marginwidth="0"
|
||||
marginheight="0"
|
||||
noresize="noresize"/>
|
||||
</frameset>
|
||||
<frame src="about:blank"
|
||||
id="button_frame"
|
||||
scrolling="no"
|
||||
marginwidth="1"
|
||||
marginheight="1"
|
||||
noresize="noresize"/>
|
||||
</frameset>
|
||||
</xul:window>
|
||||
|
|
|
@ -51,9 +51,13 @@ clobber::
|
|||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
rm -f $(DIST)\bin\chrome\wallet\content\default\SignonViewer.xul
|
||||
rm -f $(DIST)\bin\chrome\wallet\content\default\SignonViewer.js
|
||||
rm -f $(DIST)\bin\chrome\wallet\skin\default\SignonViewer.css
|
||||
rm -f $(DIST)\bin\chrome\wallet\locale\en-US\SignonViewer.properties
|
||||
rm -f $(DIST)\bin\chrome\wallet\locale\en-US\SignonViewer.dtd
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) SignonViewer.xul $(DIST)\bin\chrome\wallet\content\default
|
||||
$(MAKE_INSTALL) SignonViewer.js $(DIST)\bin\chrome\wallet\content\default
|
||||
$(MAKE_INSTALL) SignonViewer.css $(DIST)\bin\chrome\wallet\skin\default
|
||||
$(MAKE_INSTALL) SignonViewer.properties $(DIST)\bin\chrome\wallet\locale\en-US
|
||||
$(MAKE_INSTALL) SignonViewer.dtd $(DIST)\bin\chrome\wallet\locale\en-US
|
||||
|
|
|
@ -172,22 +172,6 @@ static void DOMWindowToWebShellWindow(
|
|||
NS_IMETHODIMP
|
||||
SignonViewerImpl::SetValue(const char* aValue, nsIDOMWindow* win)
|
||||
{
|
||||
/* close the window */
|
||||
if (!win) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsIDOMWindow* top;
|
||||
win->GetTop(&top);
|
||||
if (!top) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsIWebShellWindow> parent;
|
||||
DOMWindowToWebShellWindow(top, &parent);
|
||||
if (parent) {
|
||||
parent->Close();
|
||||
}
|
||||
NS_IF_RELEASE(win);
|
||||
|
||||
/* process the value */
|
||||
NS_PRECONDITION(aValue != nsnull, "null ptr");
|
||||
if (! aValue) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче