commit card to database when notifying the save listener, if there are any save listeners.

we need to do this because the save listeners might have added / modified some values.
see bugscape bug #11851.  r/sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2002-02-06 06:26:28 +00:00
Родитель 386c1bd3bd
Коммит 0a5fbbc9b6
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -85,7 +85,7 @@ function OnLoadNewCard()
if ("displayName" in window.arguments[0]) {
editCard.card.displayName = window.arguments[0].displayName;
// if we've got a display name, don't generate
// a display name (and over right the current display name)
// a display name (and stomp on the existing display name)
// when the user types a first or last name
if (editCard.card.displayName.length)
editCard.generateDisplayName = false;
@ -193,6 +193,12 @@ function NotifySaveListeners()
{
for ( var i = 0; i < gOnSaveListeners.length; i++ )
gOnSaveListeners[i]();
if (gOnSaveListeners.length) {
// the save listeners might have tweaked the card
// in which case we need to commit it.
editCard.card.editCardToDatabase(editCard.abURI);
}
}
function InitEditCard()