clear card pane if selecting a directory with no cards,
compose not working if you select a directory with now cards I thought this was a problem with nsOutlinerSelection, but it was really a problem with my js, selecting the first card even when there wasn't one. git-svn-id: svn://10.0.0.236/branches/AB_OUTLINER_BRANCH@110027 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -297,8 +297,10 @@ function GetSelectedAddresses()
|
||||
var selectedAddresses = "";
|
||||
|
||||
var cards = GetSelectedAbCards();
|
||||
var count = cards.length;
|
||||
if (!cards)
|
||||
return selectedAddresses;
|
||||
|
||||
var count = cards.length;
|
||||
for (var i = 0; i < count; i++) {
|
||||
var generatedAddress = GenerateAddressFromCard(cards[i]);
|
||||
|
||||
@@ -501,8 +503,14 @@ function ChangeDirectoryByDOMNode(dirNode)
|
||||
|
||||
UpdateSortIndicators(actualSortColumn, sortDirection);
|
||||
|
||||
setTimeout('SelectFirstCard();',0);
|
||||
|
||||
// only select the first card if there is a first card
|
||||
if (gAbView && gAbView.getCardFromRow(0)) {
|
||||
SelectFirstCard();
|
||||
}
|
||||
else {
|
||||
// the selection changes if we were switching directories.
|
||||
ResultsPaneSelectionChanged()
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -195,8 +195,8 @@ function AddSelectedAddressesIntoBucket(prefix)
|
||||
|
||||
for (var i = 0; i < count; i++) {
|
||||
AddCardIntoBucket(prefix, cards[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function AddCardIntoBucket(prefix, card)
|
||||
{
|
||||
@@ -368,7 +368,6 @@ function DropOnBucketPane(event)
|
||||
if (!address)
|
||||
continue;
|
||||
|
||||
//dump(" Address #" + i + " = " + address + "\n");
|
||||
AddAddressIntoBucket(prefixTo + address, address);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user