Simplify abNew[Edit]CardDialog
patch by Sebastian@SSpaeth.de
neil.parkwaycc.co.uk: review+
bienvenu: superreview+
This commit is contained in:
cbiesinger%web.de 2003-09-19 17:20:26 +00:00
Родитель c02b615f54
Коммит 2bf7621023
3 изменённых файлов: 11 добавлений и 55 удалений

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

@ -45,8 +45,6 @@ function OnLoadNewCard()
{
InitEditCard();
doSetOKCancel(NewCardOKButton, 0);
var cardproperty = Components.classes["@mozilla.org/addressbook/cardproperty;1"].createInstance(Components.interfaces.nsIAbCard);
editCard.card = cardproperty;
@ -205,25 +203,10 @@ function EditCardOKButton()
return true; // close the window
}
function OnNewCardEnter()
{
if (NewCardOKButton())
window.close();
}
function OnEditCardEnter()
{
if (EditCardOKButton())
window.close();
}
function OnLoadEditCard()
{
InitEditCard();
doSetOKCancel(EditCardOKButton, 0);
editCard.titleProperty = "editCardTitle";
if (window.arguments && window.arguments[0])
@ -502,16 +485,6 @@ function CleanUpWebPage(webPage)
}
function NewCardCancelButton()
{
top.window.close();
}
function EditCardCancelButton()
{
top.window.close();
}
function GenerateDisplayName()
{
if ( editCard.generateDisplayName )

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

@ -19,25 +19,16 @@ Communications Corporation. Portions created by Netscape are
Rights Reserved.
-->
<?xml-stylesheet href="chrome://messenger/skin/dialogs.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/addressbook/abCardOverlay.xul"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="abcardWindow"
onload="OnLoadEditCard()"
class="dialog">
<keyset id="editCardDialogKeys">
<key keycode="VK_ENTER" oncommand="OnEditCardEnter();"/>
<key keycode="VK_RETURN" oncommand="OnEditCardEnter();"/>
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
</keyset>
buttonpack="center"
ondialogaccept="return EditCardOKButton();">
<stringbundleset id="stringbundleset"/>
<vbox id="editcard"/>
<hbox id="okCancelButtons"/>
</window>
</dialog>

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

@ -19,29 +19,23 @@ Communications Corporation. Portions created by Netscape are
Rights Reserved.
-->
<?xml-stylesheet href="chrome://messenger/skin/dialogs.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/addressbook/abCardOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/addressbook/abNewCardDialog.dtd">
<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/abNewCardDialog.dtd">
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
id="abcardWindow"
title="&editcardWindow.title;"
onload="OnLoadNewCard()"
class="dialog">
buttonpack="center"
ondialogaccept="return NewCardOKButton();">
<stringbundleset id="stringbundleset"/>
<keyset id="newCardDialogKeys">
<key keycode="VK_ENTER" oncommand="OnNewCardEnter();"/>
<key keycode="VK_RETURN" oncommand="OnNewCardEnter();"/>
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
</keyset>
<hbox align="center" valign="center">
<label control="abPopup" value="&chooseAddressBook.label;" accesskey="&chooseAddressBook.accesskey;"/>
@ -68,7 +62,5 @@ Rights Reserved.
<spacer style="height:1em"/>
<vbox id="editcard"/>
<hbox id="okCancelButtons"/>
</window>
</dialog>