fix for bug 60629 javascript strict warnings in abCardOverlay.js

patch by maolson@earthlink.net r=timeless a=alecf
This commit is contained in:
timeless%mac.com 2001-01-25 06:51:19 +00:00
parent 9329f79447
commit b0d1ab49ed

View File

@ -38,18 +38,18 @@ function OnLoadNewCard()
editCard.okCallback = 0;
editCard.titleProperty = "newCardTitle"
if (window.arguments && window.arguments[0])
if ("arguments" in window && window.arguments[0])
{
if ( window.arguments[0].selectedAB )
if ("selectedAB" in window.arguments[0])
editCard.selectedAB = window.arguments[0].selectedAB;
else
editCard.selectedAB = "abdirectory://abook.mab";
// we may have been given properties to pre-initialize the window with....
// we'll fill these in here...
if (window.arguments[0].primaryEmail)
if ("primaryEmail" in window.arguments[0])
editCard.card.primaryEmail = window.arguments[0].primaryEmail;
if (window.arguments[0].displayName)
if ("displayName" in window.arguments[0])
editCard.card.displayName = window.arguments[0].displayName;
}
@ -71,6 +71,12 @@ function OnLoadNewCard()
}
}
}
else {
// Default to the first valid addressbook when none is
// selected. (the 0th is an empty/invalid entry)
abPopup.value = menupopup.childNodes[1].getAttribute('value');
abPopup.data = menupopup.childNodes[1].getAttribute('data');
}
}
GetCardValues(editCard.card, document);
@ -196,7 +202,7 @@ function EditCardOKButton()
CallSaveListeners();
// callback to allow caller to update
if ( editCard.okCallback )
if ("okCallback" in editCard)
editCard.okCallback();
return true; // close the window