diff --git a/editor/jar.mn b/editor/jar.mn
index c2d40d204b0..1b9943b1ac1 100644
--- a/editor/jar.mn
+++ b/editor/jar.mn
@@ -36,6 +36,7 @@ comm.jar:
content/editor/editorPrefsOverlay.xul (ui/composer/content/editorPrefsOverlay.xul)
content/editor/editorNavigatorOverlay.xul (ui/composer/content/editorNavigatorOverlay.xul)
content/editor/editorMailOverlay.xul (ui/composer/content/editorMailOverlay.xul)
+ content/editor/editorTasksOverlay.xul (ui/composer/content/editorTasksOverlay.xul)
content/editor/editorApplicationOverlay.js (ui/composer/content/editorApplicationOverlay.js)
content/editor/images/tag-anchor.gif (ui/composer/content/images/tag-anchor.gif)
content/editor/images/tag-abr.gif (ui/composer/content/images/tag-abr.gif)
diff --git a/editor/ui/composer/content/MANIFEST b/editor/ui/composer/content/MANIFEST
index 6d56813a055..e52941183fe 100644
--- a/editor/ui/composer/content/MANIFEST
+++ b/editor/ui/composer/content/MANIFEST
@@ -40,6 +40,7 @@ EditorParagraphMarks.css
EditorContent.css
editorOverlay.js
editorOverlay.xul
+editorTasksOverlay.xul
composerOverlay.xul
sidebar-editor.rdf
sidebar-editor.xul
diff --git a/editor/ui/composer/content/contents.rdf b/editor/ui/composer/content/contents.rdf
index ae7d5008cc1..743b8cbd190 100644
--- a/editor/ui/composer/content/contents.rdf
+++ b/editor/ui/composer/content/contents.rdf
@@ -18,12 +18,18 @@
+
+
+
+ chrome://editor/content/editorTasksOverlay.xul
+
+
chrome://editor/content/editorPrefsOverlay.xul
diff --git a/editor/ui/composer/content/editorApplicationOverlay.js b/editor/ui/composer/content/editorApplicationOverlay.js
index fbb9a5f37d7..2978d692a3b 100644
--- a/editor/ui/composer/content/editorApplicationOverlay.js
+++ b/editor/ui/composer/content/editorApplicationOverlay.js
@@ -144,14 +144,6 @@ function editPage(url, launchWindow, delay)
} catch(e) {}
}
-// This used to be BrowserNewEditorWindow in navigator.js
-function NewEditorWindow()
-{
- // Open editor window with blank page
- // Kludge to leverage openDialog non-modal!
- window.openDialog( "chrome://editor/content", "_blank", "chrome,all,dialog=no", "about:blank");
-}
-
function NewEditorFromTemplate()
{
// XXX not implemented
diff --git a/editor/ui/composer/content/editorTasksOverlay.xul b/editor/ui/composer/content/editorTasksOverlay.xul
new file mode 100644
index 00000000000..8d3b70907b8
--- /dev/null
+++ b/editor/ui/composer/content/editorTasksOverlay.xul
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/editor/ui/composer/content/makefile.win b/editor/ui/composer/content/makefile.win
index 403f9ecf27a..e69de29bb2d 100644
--- a/editor/ui/composer/content/makefile.win
+++ b/editor/ui/composer/content/makefile.win
@@ -1,171 +0,0 @@
-#!nmake
-#
-# 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.org code.
-#
-# 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.
-#
-# Contributor(s):
-
-DEPTH=..\..\..\..
-
-CHROME_DIR = packages/core
-CHROME_CONTENT_DIR=editor/content
-CHROME_MISC_DIR=editor/content/images
-
-CHROME_CONTENT = \
- .\editor.xul \
- .\TextEditorAppShell.xul \
- .\editor.js \
- .\publish.js \
- .\publishprefs.js \
- .\ComposerCommands.js \
- .\EditorCommandsDebug.js \
- .\EditorContextMenu.js \
- .\EditorContextMenuOverlay.xul \
- .\EditorInitPage.html \
- .\EditorInitPagePlain.html \
- .\EditorExtra.css \
- .\EditorContent.css \
- .\EditorAllTags.css \
- .\EditorOverride.css \
- .\EditorParagraphMarks.css \
- .\sidebar-editor.rdf \
- .\sidebar-editor.xul \
- .\sb-bookmarks-panel.xul \
- .\sb-bookmarks.js \
- .\sb-file-contextMenu.js \
- .\sb-file-panel.js \
- .\sb-file-panel.xul \
- .\sb-FileWidgetFileHandler.js \
- .\editorOverlay.xul \
- .\editorOverlay.js \
- .\composerOverlay.xul \
- .\pref-editing.xul \
- .\pref-publish.xul \
- .\pref-composer.js \
- .\pref-composer.xul \
- .\editorPrefsOverlay.xul \
- .\editorUtilities.js \
- $(NULL)
-
-CHROME_MISC = \
- .\images\tag-anchor.gif \
- .\images\tag-abr.gif \
- .\images\tag-acr.gif \
- .\images\tag-adr.gif \
- .\images\tag-ara.gif \
- .\images\tag-bas.gif \
- .\images\tag-blq.gif \
- .\images\tag-bsf.gif \
- .\images\tag-btn.gif \
- .\images\tag-cit.gif \
- .\images\tag-clg.gif \
- .\images\tag-cod.gif \
- .\images\tag-cpt.gif \
- .\images\tag-ctr.gif \
- .\images\tag-fld.gif \
- .\images\tag-fnt.gif \
- .\images\tag-for.gif \
- .\images\tag-frm.gif \
- .\images\tag-fst.gif \
- .\images\tag-ifr.gif \
- .\images\tag-inp.gif \
- .\images\tag-lbl.gif \
- .\images\tag-lgn.gif \
- .\images\tag-lnk.gif \
- .\images\tag-lst.gif \
- .\images\tag-men.gif \
- .\images\tag-nfr.gif \
- .\images\tag-nsc.gif \
- .\images\tag-opg.gif \
- .\images\tag-opt.gif \
- .\images\tag-prm.gif \
- .\images\tag-scr.gif \
- .\images\tag-slc.gif \
- .\images\tag-sml.gif \
- .\images\tag-smp.gif \
- .\images\tag-spn.gif \
- .\images\tag-stk.gif \
- .\images\tag-stl.gif \
- .\images\tag-stn.gif \
- .\images\tag-tbd.gif \
- .\images\tag-tbl.gif \
- .\images\tag-tft.gif \
- .\images\tag-thd.gif \
- .\images\tag-hed.gif \
- .\images\tag-isx.gif \
- .\images\tag-met.gif \
- .\images\tag-ttl.gif \
- .\images\tag-pln.gif \
- .\images\tag-xmp.gif \
- .\images\tag-txt.gif \
- .\images\tag-a.gif \
- .\images\tag-app.gif \
- .\images\tag-b.gif \
- .\images\tag-bdo.gif \
- .\images\tag-big.gif \
- .\images\tag-body.gif \
- .\images\tag-br.gif \
- .\images\tag-col.gif \
- .\images\tag-dd.gif \
- .\images\tag-del.gif \
- .\images\tag-dfn.gif \
- .\images\tag-dir.gif \
- .\images\tag-div.gif \
- .\images\tag-dl.gif \
- .\images\tag-dt.gif \
- .\images\tag-em.gif \
- .\images\tag-h1.gif \
- .\images\tag-h2.gif \
- .\images\tag-h3.gif \
- .\images\tag-h4.gif \
- .\images\tag-h5.gif \
- .\images\tag-h6.gif \
- .\images\tag-hr.gif \
- .\images\tag-html.gif \
- .\images\tag-i.gif \
- .\images\tag-img.gif \
- .\images\tag-ins.gif \
- .\images\tag-kbd.gif \
- .\images\tag-li.gif \
- .\images\tag-map.gif \
- .\images\tag-obj.gif \
- .\images\tag-ol.gif \
- .\images\tag-p.gif \
- .\images\tag-pre.gif \
- .\images\tag-q.gif \
- .\images\tag-s.gif \
- .\images\tag-sub.gif \
- .\images\tag-sup.gif \
- .\images\tag-td.gif \
- .\images\tag-th.gif \
- .\images\tag-tr.gif \
- .\images\tag-tt.gif \
- .\images\tag-u.gif \
- .\images\tag-ul.gif \
- .\images\tag-var.gif \
- .\images\tag-userdefined.gif \
- .\images\smile.gif \
- .\images\smile_active.gif \
- .\images\smile_disabled.gif \
- .\images\smile_hover.gif \
- .\images\frown.gif \
- .\images\wink.gif \
- .\images\sick.gif \
- $(NULL)
-
-include <$(DEPTH)\config\rules.mak>
-
diff --git a/mailnews/base/resources/content/mailTasksOverlay.xul b/mailnews/base/resources/content/mailTasksOverlay.xul
index 46d09ee129b..bf089a90917 100644
--- a/mailnews/base/resources/content/mailTasksOverlay.xul
+++ b/mailnews/base/resources/content/mailTasksOverlay.xul
@@ -62,12 +62,14 @@
+
diff --git a/xpfe/communicator/resources/content/tasksOverlay.js b/xpfe/communicator/resources/content/tasksOverlay.js
index 7740eee5f1b..28448e3d8f6 100644
--- a/xpfe/communicator/resources/content/tasksOverlay.js
+++ b/xpfe/communicator/resources/content/tasksOverlay.js
@@ -38,7 +38,8 @@
function toNavigator()
{
- CycleWindow('navigator:browser', getBrowserURL());
+ if (!CycleWindow("navigator:browser"))
+ OpenBrowserWindow();
}
// Set up a lame hack to avoid opening two bookmarks.
@@ -147,21 +148,7 @@ function OpenBrowserWindow()
}
}
-function newWindowOfType( aType )
-{
- switch (aType) {
- case "navigator:browser":
- OpenBrowserWindow();
- break;
- case "composer:html":
- NewEditorWindow();
- break;
- default:
- break;
- }
-}
-
-function CycleWindow( aType, aChromeURL )
+function CycleWindow( aType )
{
var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService();
var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);
@@ -170,29 +157,30 @@ function CycleWindow( aType, aChromeURL )
var topWindow = windowManagerInterface.getMostRecentWindow( null );
if ( topWindowOfType == null )
- newWindowOfType( aType );
- else if ( topWindowOfType != topWindow )
- topWindowOfType.focus();
- else {
- var enumerator = windowManagerInterface.getEnumerator( aType );
- var firstWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );
- var iWindow = firstWindow; // ;-)
- while ( iWindow != topWindow && enumerator.hasMoreElements() )
- iWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );
-
- var desiredWindow = firstWindow;
- if ( enumerator.hasMoreElements() )
- desiredWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );
- if ( desiredWindow == topWindow ) // Only one window, open a new one
- newWindowOfType( aType );
- else
- desiredWindow.focus();
- }
-}
+ return null;
-function toEditor()
-{
- CycleWindow('composer:html', 'chrome://editor/content/editor.xul');
+ if ( topWindowOfType != topWindow ) {
+ topWindowOfType.focus();
+ return topWindowOfType;
+ }
+
+ var enumerator = windowManagerInterface.getEnumerator( aType );
+ var firstWindow = windowManagerInterface.convertISupportsToDOMWindow(enumerator.getNext());
+ var iWindow = firstWindow;
+ while (iWindow != topWindow && enumerator.hasMoreElements())
+ iWindow = windowManagerInterface.convertISupportsToDOMWindow(enumerator.getNext());
+
+ if (enumerator.hasMoreElements()) {
+ iWindow = windowManagerInterface.convertISupportsToDOMWindow(enumerator.getNext());
+ iWindow.focus();
+ return iWindow;
+ }
+
+ if (firstWindow == topWindow) // Only one window
+ return null;
+
+ firstWindow.focus();
+ return firstWindow;
}
function ShowWindowFromResource( node )
diff --git a/xpfe/communicator/resources/content/tasksOverlay.xul b/xpfe/communicator/resources/content/tasksOverlay.xul
index 99d8c9bdbc2..377da0cf422 100644
--- a/xpfe/communicator/resources/content/tasksOverlay.xul
+++ b/xpfe/communicator/resources/content/tasksOverlay.xul
@@ -17,14 +17,12 @@
-
-
@@ -42,7 +40,6 @@