diff --git a/mozilla/mailnews/addrbook/resources/content/addressbook.js b/mozilla/mailnews/addrbook/resources/content/addressbook.js
index 572b585f33d..5bd932c0a58 100644
--- a/mozilla/mailnews/addrbook/resources/content/addressbook.js
+++ b/mozilla/mailnews/addrbook/resources/content/addressbook.js
@@ -2,7 +2,9 @@ function AbNewCardDialog()
{
var dialog = window.openDialog("chrome://addressbook/content/newcardDialog.xul",
"abNewCard",
- "chrome");
+ "chrome",
+ {abURI:GetResultTreeDirectory()});
+
return dialog;
}
@@ -11,7 +13,8 @@ function AbEditCardDialog(card, okCallback)
var dialog = window.openDialog("chrome://addressbook/content/editcardDialog.xul",
"abEditCard",
"chrome",
- {card:card, okCallback:okCallback});
+ {abURI:GetResultTreeDirectory(),
+ card:card, okCallback:okCallback});
return dialog;
}
diff --git a/mozilla/mailnews/addrbook/resources/content/addressbook.xul b/mozilla/mailnews/addrbook/resources/content/addressbook.xul
index c79aaf3ff2b..7ceee1f6c6d 100644
--- a/mozilla/mailnews/addrbook/resources/content/addressbook.xul
+++ b/mozilla/mailnews/addrbook/resources/content/addressbook.xul
@@ -252,7 +252,7 @@
-
+
diff --git a/mozilla/mailnews/addrbook/resources/content/editcard.js b/mozilla/mailnews/addrbook/resources/content/editcard.js
index 4880effc91e..d70b99aa95a 100644
--- a/mozilla/mailnews/addrbook/resources/content/editcard.js
+++ b/mozilla/mailnews/addrbook/resources/content/editcard.js
@@ -1,12 +1,19 @@
var card;
var newCard = -1;
var okCallback;
+var abURI;
var editCardTitlePrefix = "Card for ";
function OnLoadNewCard()
{
top.card = newCard;
top.okCallback = 0;
+
+ if (window.arguments && window.arguments[0])
+ {
+ if ( window.arguments[0].abURI )
+ top.abURI = window.arguments[0].abURI;
+ }
}
@@ -19,11 +26,13 @@ function OnLoadEditCard()
top.card = window.arguments[0].card;
if ( window.arguments[0].okCallback )
top.okCallback = window.arguments[0].okCallback;
-
- GetCardValues(top.card, frames["browser.editcard"].document);
-
- //top.window.setAttribute('title', editCardTitlePrefix + top.card.DisplayName);
+ if ( window.arguments[0].abURI )
+ top.abURI = window.arguments[0].abURI;
}
+
+ GetCardValues(top.card, frames["editcard"].document);
+
+ //top.window.setAttribute('title', editCardTitlePrefix + top.card.DisplayName);
}
@@ -35,9 +44,9 @@ function NewCardOKButton()
if ( cardproperty )
{
- SetCardValues(cardproperty, frames["browser.newcard"].document);
+ SetCardValues(cardproperty, frames["editcard"].document);
- cardproperty.AddCardToDatabase();
+ cardproperty.AddCardToDatabase();// Candice pass top.abURI this is the var containing GetResultTreeDirectory()
}
top.window.close();
@@ -46,9 +55,9 @@ function NewCardOKButton()
function EditCardOKButton()
{
- SetCardValues(top.card, frames["browser.editcard"].document);
+ SetCardValues(top.card, frames["editcard"].document);
- top.card.EditCardToDatabase();
+ top.card.EditCardToDatabase();// Candice pass top.abURI this is the var containing GetResultTreeDirectory()
// callback to allow caller to update
if ( top.okCallback )
diff --git a/mozilla/mailnews/addrbook/resources/content/editcardDialog.xul b/mozilla/mailnews/addrbook/resources/content/editcardDialog.xul
index 7da8baf848a..6cc3908bb5f 100644
--- a/mozilla/mailnews/addrbook/resources/content/editcardDialog.xul
+++ b/mozilla/mailnews/addrbook/resources/content/editcardDialog.xul
@@ -19,7 +19,7 @@
diff --git a/mozilla/mailnews/addrbook/resources/content/newcardDialog.xul b/mozilla/mailnews/addrbook/resources/content/newcardDialog.xul
index db73cb5ecd8..c6f4e880a57 100644
--- a/mozilla/mailnews/addrbook/resources/content/newcardDialog.xul
+++ b/mozilla/mailnews/addrbook/resources/content/newcardDialog.xul
@@ -34,7 +34,7 @@
diff --git a/mozilla/mailnews/addrbook/resources/content/selectaddress.js b/mozilla/mailnews/addrbook/resources/content/selectaddress.js
index 88096648b1b..e755dd6ebef 100644
--- a/mozilla/mailnews/addrbook/resources/content/selectaddress.js
+++ b/mozilla/mailnews/addrbook/resources/content/selectaddress.js
@@ -39,7 +39,7 @@ function AddAddressFromComposeWindow(addresses, prefix)
{
if ( addresses )
{
- var bucketDoc = frames["browser.addressbucket"].document;
+ var bucketDoc = frames["addressbucket"].document;
var addressArray = addresses.split(",");
for ( var index = 0; index < addressArray.length; index++ )
@@ -56,7 +56,7 @@ function AddAddressFromComposeWindow(addresses, prefix)
function SelectAddressOKButton()
{
- var bucketDoc = frames["browser.addressbucket"].document;
+ var bucketDoc = frames["addressbucket"].document;
var body = bucketDoc.getElementById('bucketBody');
var item, row, cell, text, colon;
var toAddress="", ccAddress="", bccAddress="";
@@ -123,7 +123,7 @@ function saChangeDirectoryByDOMNode(dirNode)
function saChangeDirectoryByURI(uri)
{
- var tree = frames["browser.selAddrResultPane"].document.getElementById('resultTree');
+ var tree = frames["resultsFrame"].document.getElementById('resultTree');
//dump("tree = " + tree + "\n");
var treechildrenList = tree.getElementsByTagName('treechildren');
@@ -160,7 +160,7 @@ function SelectAddressEditButton()
var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
- var resultsDoc = frames["browser.selAddrResultPane"].document;
+ var resultsDoc = frames["resultsFrame"].document;
var selArray = resultsDoc.getElementsByAttribute('selected', 'true');
if ( selArray && selArray.length == 1 )
@@ -175,8 +175,8 @@ function SelectAddressEditButton()
function AddSelectedAddressesIntoBucket(prefix)
{
var item, uri, rdf, cardResource, card, address;
- var resultsDoc = frames["browser.selAddrResultPane"].document;
- var bucketDoc = frames["browser.addressbucket"].document;
+ var resultsDoc = frames["resultsFrame"].document;
+ var bucketDoc = frames["addressbucket"].document;
rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
@@ -212,7 +212,7 @@ function AddAddressIntoBucket(doc, address)
function RemoveSelectedFromBucket()
{
- var bucketDoc = frames["browser.addressbucket"].document;
+ var bucketDoc = frames["addressbucket"].document;
var body = bucketDoc.getElementById("bucketBody");
var selArray = body.getElementsByAttribute('selected', 'true');
diff --git a/mozilla/mailnews/addrbook/resources/content/selectaddress.xul b/mozilla/mailnews/addrbook/resources/content/selectaddress.xul
index 0a16e0f01d3..69a42e2a277 100644
--- a/mozilla/mailnews/addrbook/resources/content/selectaddress.xul
+++ b/mozilla/mailnews/addrbook/resources/content/selectaddress.xul
@@ -115,7 +115,7 @@ Rights Reserved.
@@ -137,7 +137,7 @@ Rights Reserved.