Bug 1143812 - Always allow creating new contacts and lists after opening addressbook by using Personal Addressbook when a usable AB is not selected. r=mkmelin, r=IanN
This commit is contained in:
Родитель
7d0255a3f7
Коммит
3ed2f9ca4a
|
@ -92,7 +92,8 @@ function OnLoadNewCard()
|
|||
{
|
||||
gEditCard.selectedAB = kPersonalAddressbookURI;
|
||||
|
||||
if ("selectedAB" in window.arguments[0]) {
|
||||
if ("selectedAB" in window.arguments[0] &&
|
||||
(window.arguments[0].selectedAB != kAllDirectoryRoot + "?")) {
|
||||
// check if selected ab is a mailing list
|
||||
var abURI = window.arguments[0].selectedAB;
|
||||
|
||||
|
|
|
@ -108,17 +108,8 @@ var DirPaneController =
|
|||
case "cmd_properties":
|
||||
return (GetSelectedDirectory() != null);
|
||||
case "cmd_newlist":
|
||||
selectedDir = GetSelectedDirectory();
|
||||
if (selectedDir && selectedDir != (kAllDirectoryRoot + "?")) {
|
||||
var abDir = GetDirectoryFromURI(selectedDir);
|
||||
if (abDir) {
|
||||
return abDir.supportsMailingLists;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case "cmd_newCard":
|
||||
selectedDir = GetSelectedDirectory();
|
||||
return (selectedDir && selectedDir != (kAllDirectoryRoot + "?"));
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -213,7 +213,8 @@ function delayedOnLoadAddressBook()
|
|||
|
||||
// Focus the searchbox as we think the user will want to do that
|
||||
// with the highest probability.
|
||||
QuickSearchFocus();
|
||||
// Bug 1143812: This is disabled for now to keep the New Contact command enabled.
|
||||
// QuickSearchFocus();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -180,10 +180,10 @@ function OnLoadNewMailList()
|
|||
|
||||
InitCommonJS();
|
||||
|
||||
if (window.arguments && window.arguments[0])
|
||||
if ("arguments" in window && window.arguments[0])
|
||||
{
|
||||
var abURI = window.arguments[0].selectedAB;
|
||||
if (abURI) {
|
||||
if (abURI && abURI != kAllDirectoryRoot + "?") {
|
||||
var directory = GetDirectoryFromURI(abURI);
|
||||
if (directory.isMailList) {
|
||||
var parentURI = GetParentDirectoryFromMailingListURI(abURI);
|
||||
|
|
|
@ -419,17 +419,8 @@ var ResultsPaneController =
|
|||
// only enable "Properties" button for single selection; then fix bug 119999.
|
||||
return (GetNumSelectedCards() == 1);
|
||||
case "cmd_newlist":
|
||||
var selectedDir = GetSelectedDirectory();
|
||||
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 + "?"));
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,8 @@ function OnLoadNewCard()
|
|||
{
|
||||
gEditCard.selectedAB = kPersonalAddressbookURI;
|
||||
|
||||
if ("selectedAB" in window.arguments[0]) {
|
||||
if ("selectedAB" in window.arguments[0] &&
|
||||
(window.arguments[0].selectedAB != kAllDirectoryRoot + "?")) {
|
||||
// check if selected ab is a mailing list
|
||||
var abURI = window.arguments[0].selectedAB;
|
||||
|
||||
|
|
|
@ -93,14 +93,7 @@ var DirPaneController =
|
|||
case "cmd_properties":
|
||||
return (GetSelectedDirectory() != null);
|
||||
case "cmd_newlist":
|
||||
selectedDir = GetSelectedDirectory();
|
||||
if (selectedDir) {
|
||||
var abDir = GetDirectoryFromURI(selectedDir);
|
||||
if (abDir) {
|
||||
return abDir.supportsMailingLists;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче