From e88e6c5f2b5c3597de282afd59958b3444dbc882 Mon Sep 17 00:00:00 2001 From: "hangas%netscape.com" Date: Mon, 19 Jul 1999 03:24:40 +0000 Subject: [PATCH] First Checked In. --- .../global/resources/content/dialogOverlay.js | 34 ++++++++++++ .../resources/content/dialogOverlay.xul | 26 +++++++++ xpfe/global/resources/content/tasksOverlay.js | 39 +++++++++++++ .../global/resources/content/tasksOverlay.xul | 55 +++++++++++++++++++ 4 files changed, 154 insertions(+) create mode 100644 xpfe/global/resources/content/dialogOverlay.js create mode 100644 xpfe/global/resources/content/dialogOverlay.xul create mode 100644 xpfe/global/resources/content/tasksOverlay.js create mode 100644 xpfe/global/resources/content/tasksOverlay.xul diff --git a/xpfe/global/resources/content/dialogOverlay.js b/xpfe/global/resources/content/dialogOverlay.js new file mode 100644 index 00000000000..16f0fd3b286 --- /dev/null +++ b/xpfe/global/resources/content/dialogOverlay.js @@ -0,0 +1,34 @@ +var doOKFunction = 0; +var doCancelFunction = 0; + + +// call this from dialog onload() to allow ok and cancel to call your code +// functions should return true if they want the dialog to close +function doSetOKCancel(okFunc, cancelFunc) +{ + doOKFunction = okFunc; + doCancelFunction = cancelFunc; +} + +function doOKButton() +{ + var close = true; + + if ( doOKFunction ) + close = doOKFunction(); + + if ( close ) + top.window.close(); +} + +function doCancelButton() +{ + var close = true; + + if ( doCancelFunction ) + close = doCancelFunction(); + + if ( close ) + top.window.close(); +} + diff --git a/xpfe/global/resources/content/dialogOverlay.xul b/xpfe/global/resources/content/dialogOverlay.xul new file mode 100644 index 00000000000..c8f66b61edd --- /dev/null +++ b/xpfe/global/resources/content/dialogOverlay.xul @@ -0,0 +1,26 @@ + + + + + +]> + + + + + + + + + + + + + + + + diff --git a/xpfe/global/resources/content/tasksOverlay.js b/xpfe/global/resources/content/tasksOverlay.js new file mode 100644 index 00000000000..ccf10fac1a1 --- /dev/null +++ b/xpfe/global/resources/content/tasksOverlay.js @@ -0,0 +1,39 @@ +function NavigatorWindow() +{ + // FIX ME - Really need to find the front most navigator window + // and bring it all the way to the front + + // FIX ME - This code needs to be updated to use window.open() + var toolkitCore = XPAppCoresManager.Find("ToolkitCore"); + if (!toolkitCore) + { + toolkitCore = new ToolkitCore(); + if (toolkitCore) + { + toolkitCore.Init("ToolkitCore"); + } + } + + if (toolkitCore) + { + toolkitCore.ShowWindow("chrome://navigator/content/", + window); + } +} + + +function MessengerWindow() +{ + // FIX ME - Really need to find the front most messenger window + // and bring it all the way to the front + + window.open("chrome://messenger/content/", "messenger", "chrome"); +} + + +function AddressBook() +{ + var wind = window.open("chrome://addressbook/content/addressbook.xul", + "addressbook", "chrome"); + return wind; +} diff --git a/xpfe/global/resources/content/tasksOverlay.xul b/xpfe/global/resources/content/tasksOverlay.xul new file mode 100644 index 00000000000..abc7fd3275a --- /dev/null +++ b/xpfe/global/resources/content/tasksOverlay.xul @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +