From 1c9b2e75fdba6ee7e269f0389f3207c1b36f464d Mon Sep 17 00:00:00 2001 From: "hangas%netscape.com" Date: Sat, 11 Sep 1999 02:05:26 +0000 Subject: [PATCH] More cleanup for address book. Notes area in address book card is now multiple lines. --- .../addrbook/resources/content/abAddressBookNameDialog.js | 5 +++++ mailnews/addrbook/resources/content/abCardOverlay.js | 8 +++++++- mailnews/addrbook/resources/content/abCardOverlay.xul | 2 +- mailnews/addrbook/resources/content/abCardViewOverlay.xul | 2 +- mailnews/addrbook/resources/content/abCommon.js | 7 ++++++- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/mailnews/addrbook/resources/content/abAddressBookNameDialog.js b/mailnews/addrbook/resources/content/abAddressBookNameDialog.js index be69a061fa8..17702f3391f 100644 --- a/mailnews/addrbook/resources/content/abAddressBookNameDialog.js +++ b/mailnews/addrbook/resources/content/abAddressBookNameDialog.js @@ -17,6 +17,11 @@ function abNameOnLoad() if ( window.arguments[0].okCallback ) top.okCallback = window.arguments[0].okCallback; } + + // focus on input + var name = document.getElementById('name'); + if ( name ) + name.focus(); } function abNameOKButton() diff --git a/mailnews/addrbook/resources/content/abCardOverlay.js b/mailnews/addrbook/resources/content/abCardOverlay.js index d071c0bad7b..b779c126814 100644 --- a/mailnews/addrbook/resources/content/abCardOverlay.js +++ b/mailnews/addrbook/resources/content/abCardOverlay.js @@ -110,7 +110,13 @@ function NewCardOKButton() if ( popup ) { var uri = popup.value; - + + // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template + // should be able to just remove this if we are not seeing blank lines in the ab popup + if ( !uri ) + return false; // don't close window + // ----- + var cardproperty = Components.classes["component://netscape/addressbook/cardproperty"].createInstance(); cardproperty = cardproperty.QueryInterface(Components.interfaces.nsIAbCard); diff --git a/mailnews/addrbook/resources/content/abCardOverlay.xul b/mailnews/addrbook/resources/content/abCardOverlay.xul index fc0eea23004..0ef3a5c4a70 100644 --- a/mailnews/addrbook/resources/content/abCardOverlay.xul +++ b/mailnews/addrbook/resources/content/abCardOverlay.xul @@ -273,7 +273,7 @@ Rights Reserved. - + diff --git a/mailnews/addrbook/resources/content/abCardViewOverlay.xul b/mailnews/addrbook/resources/content/abCardViewOverlay.xul index 9c251428c07..ac2f16bfe85 100644 --- a/mailnews/addrbook/resources/content/abCardViewOverlay.xul +++ b/mailnews/addrbook/resources/content/abCardViewOverlay.xul @@ -33,7 +33,7 @@ Rights Reserved. + style="overflow:auto; background-color:#dddddd; padding-left:5px; padding-right:5px"> * diff --git a/mailnews/addrbook/resources/content/abCommon.js b/mailnews/addrbook/resources/content/abCommon.js index 32f4613e6fa..bb47a475807 100644 --- a/mailnews/addrbook/resources/content/abCommon.js +++ b/mailnews/addrbook/resources/content/abCommon.js @@ -83,6 +83,12 @@ function SelectFirstAddressBook() function ChangeDirectoryByDOMNode(dirNode) { + // FIX ME - deselect the items in the resutls pane to work around tree bug + var resultsTree = document.getElementById('resultsTree'); + if ( resultsTree ) + resultsTree.clearItemSelection(); + // ---- + var uri = dirNode.getAttribute('id'); dump("uri = " + uri + "\n"); @@ -104,7 +110,6 @@ function ResultsPaneSelectionChange() else ClearCardViewPane(); } - } function SortResultPane(column, sortKey)