diff --git a/mailnews/base/prefs/resources/content/AccountManager.js b/mailnews/base/prefs/resources/content/AccountManager.js index 1ecde3bf536..f4cd0e4ffa2 100644 --- a/mailnews/base/prefs/resources/content/AccountManager.js +++ b/mailnews/base/prefs/resources/content/AccountManager.js @@ -61,6 +61,7 @@ var setDefaultButton; // called when the whole document loads // perform initialization here function onLoad() { + dump("accountmanager on load\n"); accountArray = new Array; RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(Components.interfaces.nsIRDFService); @@ -356,16 +357,17 @@ function showDeckPage(deckBoxId) { /* bring the deck to the front */ var deckBox = top.document.getElementById(deckBoxId); - var deck = deckBox.parentNode; - var children = deck.childNodes; + if (deckBox) { + var deck = deckBox.parentNode; + var children = deck.childNodes; - // search through deck children, and find the index to load - for (var i=0; i + + + diff --git a/mailnews/base/prefs/resources/content/MANIFEST b/mailnews/base/prefs/resources/content/MANIFEST index c92f635422e..81f9ccfaf6f 100644 --- a/mailnews/base/prefs/resources/content/MANIFEST +++ b/mailnews/base/prefs/resources/content/MANIFEST @@ -24,6 +24,7 @@ AccountManager.xul AccountManager.js am-main.xul am-server.xul +am-serverwithnoidentities.xul am-server.js am-server-top.xul am-copies.xul diff --git a/mailnews/base/prefs/resources/content/Makefile.in b/mailnews/base/prefs/resources/content/Makefile.in index 4fec2c26f0f..a532e65db1c 100644 --- a/mailnews/base/prefs/resources/content/Makefile.in +++ b/mailnews/base/prefs/resources/content/Makefile.in @@ -33,6 +33,8 @@ EXPORT_RESOURCE_SAMPLES = \ AccountManager.js \ am-main.xul \ am-server.xul \ + am-serverwithnoidentities.xul \ + am-serverwithnoidentities.js \ am-server.js \ am-server-top.xul \ am-copies.xul \ @@ -54,6 +56,7 @@ EXPORT_RESOURCE_SAMPLES = \ aw-identity.xul \ aw-identity.js \ aw-server.xul \ + am-serverwithnoidentity.xul \ aw-server.js \ aw-login.xul \ aw-login.js \ diff --git a/mailnews/base/prefs/resources/content/am-serverwithnoidentities.js b/mailnews/base/prefs/resources/content/am-serverwithnoidentities.js new file mode 100644 index 00000000000..7543bd12190 --- /dev/null +++ b/mailnews/base/prefs/resources/content/am-serverwithnoidentities.js @@ -0,0 +1,22 @@ +/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998-1999 Netscape Communications Corporation. All + * Rights Reserved. + */ + +function onInit() { +} diff --git a/mailnews/base/prefs/resources/content/am-serverwithnoidentities.xul b/mailnews/base/prefs/resources/content/am-serverwithnoidentities.xul new file mode 100644 index 00000000000..4bb1c72c3d7 --- /dev/null +++ b/mailnews/base/prefs/resources/content/am-serverwithnoidentities.xul @@ -0,0 +1,27 @@ + + + + + + + + + + &accountTitle.label; + + &accountSettingsDesc.label; + + &accountName.label; + + + + + + + &localPath.label; + + + diff --git a/mailnews/base/prefs/resources/content/makefile.win b/mailnews/base/prefs/resources/content/makefile.win index c43883cb81f..234841e32d6 100644 --- a/mailnews/base/prefs/resources/content/makefile.win +++ b/mailnews/base/prefs/resources/content/makefile.win @@ -28,6 +28,7 @@ install:: $(MAKE_INSTALL) AccountManager.js $(DIST)\bin\chrome\messenger\content\default $(MAKE_INSTALL) am-main.xul $(DIST)\bin\chrome\messenger\content\default $(MAKE_INSTALL) am-server.xul $(DIST)\bin\chrome\messenger\content\default + $(MAKE_INSTALL) am-serverwithnoidentities.xul $(DIST)\bin\chrome\messenger\content\default $(MAKE_INSTALL) am-server.js $(DIST)\bin\chrome\messenger\content\default $(MAKE_INSTALL) am-server-top.xul $(DIST)\bin\chrome\messenger\content\default $(MAKE_INSTALL) am-copies.xul $(DIST)\bin\chrome\messenger\content\default @@ -60,6 +61,7 @@ clobber:: rm -f $(DIST)\chrome\messenger\content\default\AccountManager.js rm -f $(DIST)\chrome\messenger\content\default\am-main.xul rm -f $(DIST)\chrome\messenger\content\default\am-server.xul + rm -f $(DIST)\chrome\messenger\content\default\am-serverwithnoidentities.xul rm -f $(DIST)\chrome\messenger\content\default\am-server.js rm -f $(DIST)\chrome\messenger\content\default\am-server-top.xul rm -f $(DIST)\chrome\messenger\content\default\am-copies.xul diff --git a/mailnews/base/prefs/resources/locale/en-US/MANIFEST b/mailnews/base/prefs/resources/locale/en-US/MANIFEST index a494eeda513..50c72d96ec4 100644 --- a/mailnews/base/prefs/resources/locale/en-US/MANIFEST +++ b/mailnews/base/prefs/resources/locale/en-US/MANIFEST @@ -41,3 +41,4 @@ am-copies.dtd am-main.dtd am-server-top.dtd prefs.properties +am-serverwithnoidentities.dtd diff --git a/mailnews/base/prefs/resources/locale/en-US/Makefile.in b/mailnews/base/prefs/resources/locale/en-US/Makefile.in index 4f58a2f662f..1f24c84327c 100644 --- a/mailnews/base/prefs/resources/locale/en-US/Makefile.in +++ b/mailnews/base/prefs/resources/locale/en-US/Makefile.in @@ -50,6 +50,7 @@ EXPORT_RESOURCE_SAMPLES = \ am-main.dtd \ am-server-top.dtd \ prefs.properties \ + am-serverwithnoidentities.dtd \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/mailnews/base/prefs/resources/locale/en-US/am-serverwithnoidentities.dtd b/mailnews/base/prefs/resources/locale/en-US/am-serverwithnoidentities.dtd new file mode 100644 index 00000000000..121754ba84c --- /dev/null +++ b/mailnews/base/prefs/resources/locale/en-US/am-serverwithnoidentities.dtd @@ -0,0 +1,4 @@ + + + + diff --git a/mailnews/base/prefs/resources/locale/en-US/makefile.win b/mailnews/base/prefs/resources/locale/en-US/makefile.win index 2a040c8e803..1ef2875d7d5 100644 --- a/mailnews/base/prefs/resources/locale/en-US/makefile.win +++ b/mailnews/base/prefs/resources/locale/en-US/makefile.win @@ -47,6 +47,7 @@ install:: $(MAKE_INSTALL) am-main.dtd $(DISTBROWSER) $(MAKE_INSTALL) am-server-top.dtd $(DISTBROWSER) $(MAKE_INSTALL) prefs.properties $(DISTBROWSER) + $(MAKE_INSTALL) am-serverwithnoidentities.dtd $(DISTBROWSER) clobber:: rm -f $(DIST)\bin\chrome\messenger\locale\en-US\custreceipt.dtd @@ -70,3 +71,4 @@ clobber:: rm -f $(DIST)\bin\chrome\messenger\locale\en-US\am-main.dtd rm -f $(DIST)\bin\chrome\messenger\locale\en-US\am-server-top.dtd rm -f $(DIST)\bin\chrome\messenger\locale\en-US\prefs.properties + rm -f $(DIST)\bin\chrome\messenger\locale\en-US\am-serverwithnoidentities.dtd diff --git a/mailnews/base/src/nsMsgAccountManagerDS.cpp b/mailnews/base/src/nsMsgAccountManagerDS.cpp index a0e888cb138..99a883073be 100644 --- a/mailnews/base/src/nsMsgAccountManagerDS.cpp +++ b/mailnews/base/src/nsMsgAccountManagerDS.cpp @@ -259,8 +259,20 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source, str = "am-advanced.xul"; else if (source == kNC_PageTitleSMTP) str = "am-smtp.xul"; - else + else { str = "am-main.xul"; + + /* if this is a server, with no identities, then we show a special panel */ + nsCOMPtr server; + rv = getServerForFolderNode(source, getter_AddRefs(server)); + if (server) { + PRBool hasIdentities; + rv = serverHasIdentities(server, &hasIdentities); + if (NS_SUCCEEDED(rv) && !hasIdentities) { + str = "am-serverwithnoidentities.xul"; + } + } + } } // handle sorting of servers