fix signonviewer bugs 14703 and 14916, approved chofmann

This commit is contained in:
morse%netscape.com 1999-09-26 09:51:20 +00:00
Родитель f3c248ff76
Коммит 6a164cc520
10 изменённых файлов: 411 добавлений и 547 удалений

Просмотреть файл

@ -1369,6 +1369,7 @@ sub MakeResourceAliases()
_InstallResources(":mozilla:extensions:wallet:src:MANIFEST_PROPERTIES", "$wallet_chrome_dir:locale:en-US:", 0); _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: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"; my($pref_chrome_dir) = "$chrome_dir" . "Pref";

Просмотреть файл

@ -1 +0,0 @@
SignonViewer.properties

Просмотреть файл

Просмотреть файл

@ -40,5 +40,6 @@ include $(topsrcdir)/config/rules.mk
install:: $(TARGETS) install:: $(TARGETS)
$(INSTALL) $(srcdir)/SignonViewer.xul $(srcdir)/SignonViewer.js $(DIST)/bin/chrome/wallet/content/default $(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 */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
var Bundle = srGetStrBundle("chrome://wallet/locale/SignonViewer.properties"); *
var logonsSavedTab = Bundle.GetStringFromName("logonsSavedTab"); * The contents of this file are subject to the Netscape Public License
var logonsNotSavedTab = Bundle.GetStringFromName("logonsNotSavedTab"); * Version 1.0 (the "License"); you may not use this file except in
var formsNotPreviewedTab = Bundle.GetStringFromName("formsNotPreviewedTab"); * compliance with the License. You may obtain a copy of the License at
var formsNotSavedTab = Bundle.GetStringFromName("formsNotSavedTab"); * http://www.mozilla.org/NPL/
var logonsSaved = Bundle.GetStringFromName("logonsSaved"); *
var siteUsername = Bundle.GetStringFromName("siteUsername"); * Software distributed under the License is distributed on an "AS IS"
var logonsNotSaved = Bundle.GetStringFromName("logonsNotSaved"); * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
var formsNotPreviewed = Bundle.GetStringFromName("formsNotPreviewed"); * License for the specific language governing rights and limitations
var formsNotSaved = Bundle.GetStringFromName("formsNotSaved"); * under the License.
var removeCmdLabel = Bundle.GetStringFromName("removeCmdLabel"); *
var okCmdLabel = Bundle.GetStringFromName("okCmdLabel"); * The Original Code is Mozilla Communicator client code, released March
var cancelCmdLabel = Bundle.GetStringFromName("cancelCmdLabel"); * 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 = // globals
Components.classes var signonviewer = null;
["component://netscape/signonviewer/signonviewer-world"].createInstance();
signonviewer = signonviewer.QueryInterface(Components.interfaces.nsISignonViewer);
function DoGetSignonList()
{
return signonviewer.GetSignonValue();
}
function DoGetRejectList()
{
return signonviewer.GetRejectValue();
}
function DoGetNopreviewList()
{
return signonviewer.GetNopreviewValue();
}
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 signonList = [];
var rejectList = []; var rejectList = [];
var nopreviewList = []; var nopreviewList = [];
var nocaptureList = []; var nocaptureList = [];
deleted_signons = new Array; var goneSS = ""; // signon
deleted_rejects = new Array; var goneIS = ""; // ignored site
deleted_nopreviews = new Array; var goneFR = ""; // form preview
deleted_nocaptures = new Array; var goneNC = ""; // nocapture
function DeleteItemSelected() { // function : <SignonViewer.js>::Startup();
if (signon_mode == 0) { // purpose : initialises interface, calls init functions for each page
DeleteSignonSelected(); function Startup()
} else if (signon_mode == 1) { {
DeleteRejectSelected(); signonviewer = Components.classes["component://netscape/signonviewer/signonviewer-world"].createInstance();
} else if (signon_mode == 2) { signonviewer = signonviewer.QueryInterface(Components.interfaces.nsISignonViewer);
DeleteNopreviewSelected();
} else if (signon_mode == 3) { doSetOKCancel(onOK, null); // init ok event handler
DeleteNocaptureSelected();
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);
} }
} }
function DeleteSignonSelected() { /*** =================== IGNORED SIGNONS CODE =================== ***/
selname = top.frames[list_frame].document.fSelectSignon.selname;
goneS = top.frames[button_frame].document.buttons.goneS; // function : <SignonViewer.js>::LoadReject();
var p; // purpose : reads rejected sites from interface and loads into tree
var i; function LoadReject()
for (i=selname.options.length; i>0; i--) { {
if (selname.options[i-1].selected) { rejectList = signonviewer.GetRejectValue();
selname.options[i-1].selected = 0; var delim = rejectList[0];
goneS.value = goneS.value + selname.options[i-1].value + ","; rejectList = rejectList.split(delim);
deleted_signons[selname.options[i-1].value] = 1; for(var i = 1; i < rejectList.length; i++)
selname.remove(i-1); {
} 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);
} }
} }
function DeleteRejectSelected() { /*** =================== NO PREVIEW FORMS CODE =================== ***/
selname = top.frames[list_frame].document.fSelectReject.selname;
goneR = top.frames[button_frame].document.buttons.goneR; // function : <SignonViewer.js>::LoadNopreview();
var p; // purpose : reads non-previewed forms from interface and loads into tree
var i; function LoadNopreview()
for (i=selname.options.length; i>0; i--) { {
if (selname.options[i-1].selected) { nopreviewList = signonviewer.GetNopreviewValue();
selname.options[i-1].selected = 0; var delim = nopreviewList[0];
goneR.value = goneR.value + selname.options[i-1].value + ","; nopreviewList = nopreviewList.split(delim);
deleted_rejects[selname.options[i-1].value] = 1; for(var i = 1; i < nopreviewList.length; i++)
selname.remove(i-1); {
} 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 DeleteNopreviewSelected() { function onOK()
selname = top.frames[list_frame].document.fSelectNopreview.selname; {
goneP = top.frames[button_frame].document.buttons.goneP; var result = "|goneS|"+goneSS+"|goneR|"+goneIS;
var p; result += "|goneC|"+goneNC+"|goneP|"+goneFR+"|";
var i; signonviewer.SetValue(result, window);
for (i=selname.options.length; i>0; i--) { return true;
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() { /*** =================== UTILITY FUNCTIONS =================== ***/
selname = top.frames[list_frame].document.fSelectNocapture.selname;
goneC = top.frames[button_frame].document.buttons.goneC; // function : <SignonViewer.js>::RemoveHTMLFormatting();
var p; // purpose : removes HTML formatting from input stream
var i; function RemoveHTMLFormatting(which)
for (i=selname.options.length; i>0; i--) { {
if (selname.options[i-1].selected) { var ignoreon = false;
selname.options[i-1].selected = 0; var rv = "";
goneC.value = goneC.value + selname.options[i-1].value + ","; for(var i = 0; i < which.length; i++)
deleted_nocaptures[selname.options[i-1].value] = 1; {
selname.remove(i-1); if(which.charAt(i) == "<")
ignoreon = true;
if(which.charAt(i) == ">") {
ignoreon = false;
continue;
} }
if(ignoreon)
continue;
rv += which.charAt(i);
} }
return rv;
} }
function loadSignons(){ /*** =================== TREE MANAGEMENT CODE =================== ***/
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>&nbsp;&nbsp;&nbsp;</td>" +
"</tr>" +
"</table>" +
"</body>"
);
top.frames[index_frame].document.close();
top.frames[title_frame].document.open(); // function : <SignonViewer.js>::AddItem();
top.frames[title_frame].document.write // purpose : utility function for adding items to a tree.
("&nbsp;" + logonsSaved + ""); function AddItem(children,cells,prefix,idfier)
top.frames[title_frame].document.close(); {
var kids = document.getElementById(children);
loadSignonsList(); 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 loadSignonsList(){ // function : <SignonViewer.js>::DeleteItemSelected();
top.frames[list_frame].document.open(); // purpose : deletes all the signons that are selected
top.frames[list_frame].document.write( function DeleteItemSelected(tree, prefix, kids) {
"<form name='fSelectSignon'>" + var delnarray = [];
"<p>" + var rv = "";
"<b>" + siteUsername + "</b>" + var cookietree = document.getElementById(tree);
"<table border='0'>" + selitems = cookietree.selectedItems;
"<tr>" + for(var i = 0; i < selitems.length; i++)
"<td width='100%' valign='top'>" + {
"<center>" + delnarray[i] = document.getElementById(selitems[i].getAttribute("id"));
"<p>" + var itemid = parseInt(selitems[i].getAttribute("id").substring(prefix.length,selitems[i].getAttribute("id").length));
"<select name='selname' size='10' multiple='multiple'> " rv += (itemid + ",");
);
for (i=1; !(i>=signonList.length); i++) {
if (!deleted_signons[i-1]) {
top.frames[list_frame].document.write(signonList[i]);
} }
for(var i = 0; i < delnarray.length; i++)
{
document.getElementById(kids).removeChild(delnarray[i]);
} }
top.frames[list_frame].document.write( return rv;
"</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>&nbsp;&nbsp;&nbsp;</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>&nbsp;&nbsp;&nbsp;</td>" +
"</tr>" +
"</table>" +
"</body>"
);
top.frames[index_frame].document.close();
top.frames[title_frame].document.open();
top.frames[title_frame].document.write
("&nbsp;" + 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>&nbsp;&nbsp;&nbsp;</td>" +
"</tr>" +
"</table>" +
"</body>"
);
top.frames[index_frame].document.close();
top.frames[title_frame].document.open();
top.frames[title_frame].document.write
("&nbsp;" + 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>&nbsp;&nbsp;&nbsp;</td>" +
"</tr>" +
"</table>" +
"</body>"
);
top.frames[index_frame].document.close();
top.frames[title_frame].document.open();
top.frames[title_frame].document.write
("&nbsp;" + 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/>" +
"&nbsp;" +
"<button onclick='top.DeleteItemSelected();'>" + removeCmdLabel + "</button>" +
"<div align='right'>" +
"<button onclick='parent.Save();'>" + okCmdLabel + "</button>" +
" &nbsp;&nbsp;" +
"<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);
} }

Просмотреть файл

@ -1,49 +1,128 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE window> <!--
<xul:window xmlns="http://www.w3.org/TR/REC-html40" The contents of this file are subject to the Netscape Public
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 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/
<script src="chrome://global/content/strres.js"/> Software distributed under the License is distributed on an "AS
<script src="SignonViewer.js"/> 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
-->
<?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)\lib\$(LIBRARY_NAME).lib
rm -f $(DIST)\bin\chrome\wallet\content\default\SignonViewer.xul 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\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.properties
rm -f $(DIST)\bin\chrome\wallet\locale\en-US\SignonViewer.dtd
install:: $(DLL) install:: $(DLL)
$(MAKE_INSTALL) SignonViewer.xul $(DIST)\bin\chrome\wallet\content\default $(MAKE_INSTALL) SignonViewer.xul $(DIST)\bin\chrome\wallet\content\default
$(MAKE_INSTALL) SignonViewer.js $(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.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 NS_IMETHODIMP
SignonViewerImpl::SetValue(const char* aValue, nsIDOMWindow* win) 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 */ /* process the value */
NS_PRECONDITION(aValue != nsnull, "null ptr"); NS_PRECONDITION(aValue != nsnull, "null ptr");
if (! aValue) { if (! aValue) {