fix for #115906. when typing in notes, enter should not close the edit / new card dialog.

also, fix the buttons on the edit card dialog to match the spec.
r=racham, sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2002-05-04 18:01:06 +00:00
Родитель 574469f3d4
Коммит f384d2947d
4 изменённых файлов: 31 добавлений и 7 удалений

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

@ -153,10 +153,24 @@ function EditCardOKButton()
}
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])

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

@ -140,7 +140,7 @@ var abDirTreeObserver = {
}
var row = {}, col = {}, obj = {};
dirTree.view.treeBoxObject.getCellAt(aEvent.clientX, aEvent.clientY, row, col, obj);
dirTree.treeBoxObject.getCellAt(aEvent.clientX, aEvent.clientY, row, col, obj);
if (row.value >= dirTree.view.rowCount || row.value < 0) return;
var item = dirTree.contentView.getItemAtIndex(row.value);

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

@ -25,13 +25,19 @@ Rights Reserved.
<?xul-overlay href="chrome://messenger/content/addressbook/abCardOverlay.xul"?>
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="abcardWindow"
ondialogaccept="return EditCardOKButton();"
onload="OnLoadEditCard()">
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>
<stringbundleset id="stringbundleset"/>
<vbox id="editcard"/>
</dialog>
<hbox id="okCancelButtons"/>
</window>

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

@ -36,7 +36,11 @@ Rights Reserved.
<stringbundleset id="stringbundleset"/>
<keyset id="dialogKeys"/>
<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">