Bug 1143808 - 'New contact' button for adding new card works after first selecting an addressbook. r=mkmelin
This commit is contained in:
Родитель
c6d579e244
Коммит
2575e1a539
|
@ -282,6 +282,7 @@ function CommandUpdate_AddressBook()
|
|||
goUpdateCommand('button_delete');
|
||||
goUpdateCommand('cmd_properties');
|
||||
goUpdateCommand('cmd_newlist');
|
||||
goUpdateCommand('cmd_newCard');
|
||||
goUpdateCommand('cmd_chatWithCard');
|
||||
}
|
||||
|
||||
|
|
|
@ -368,6 +368,7 @@ var ResultsPaneController =
|
|||
case "button_delete":
|
||||
case "cmd_properties":
|
||||
case "cmd_newlist":
|
||||
case "cmd_newCard":
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -419,13 +420,16 @@ var ResultsPaneController =
|
|||
return (GetNumSelectedCards() == 1);
|
||||
case "cmd_newlist":
|
||||
var selectedDir = GetSelectedDirectory();
|
||||
if (selectedDir && (selectedDir != kAllDirectoryRoot + "?")) {
|
||||
if (selectedDir && (selectedDir != (kAllDirectoryRoot + "?"))) {
|
||||
var abDir = GetDirectoryFromURI(selectedDir);
|
||||
if (abDir) {
|
||||
return abDir.supportsMailingLists;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case "cmd_newCard":
|
||||
var selectedDir = GetSelectedDirectory();
|
||||
return (selectedDir && selectedDir != (kAllDirectoryRoot + "?"));
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -448,6 +452,9 @@ var ResultsPaneController =
|
|||
case "cmd_newlist":
|
||||
AbNewList();
|
||||
break;
|
||||
case "cmd_newCard":
|
||||
AbNewCard();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче