зеркало из https://github.com/mozilla/pjs.git
First Checked In.
This commit is contained in:
Родитель
b4cb9a7556
Коммит
e88e6c5f2b
|
@ -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();
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!DOCTYPE window
|
||||
[
|
||||
<!-- OK Cancel Buttons -->
|
||||
<!ENTITY okButton.label "OK">
|
||||
<!ENTITY cancelButton.label "Cancel">
|
||||
]>
|
||||
|
||||
|
||||
<overlay id="dialogOverlay"
|
||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<html:script language="JavaScript" src="chrome://global/content/dialogOverlay.js"/>
|
||||
|
||||
<!-- OK & Cancel Buttons -->
|
||||
<box id="okCancelButtons" align="horizontal" style="margin-top: 0.5em">
|
||||
<spring flex="100%"/>
|
||||
<titledbutton id="ok" value="&okButton.label;" class="push" onclick="doOKButton()"/>
|
||||
<spring style="width:10px"/>
|
||||
<titledbutton id="cancel" value="&cancelButton.label;" class="push" onclick="doCancelButton()"/>
|
||||
<spring style="width:10px"/>
|
||||
</box>
|
||||
|
||||
</overlay>
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!DOCTYPE window
|
||||
[
|
||||
<!ENTITY tasksMenu.label "Tasks">
|
||||
<!ENTITY navigatorCmd.label "Navigator">
|
||||
<!ENTITY messengerCmd.label "Messenger">
|
||||
<!ENTITY addressBookCmd.label "Address Book">
|
||||
<!ENTITY bookmarkMenu.label ".Bookmarks">
|
||||
<!ENTITY addBookmarkCmd.label ".Add Bookmark">
|
||||
<!ENTITY fileBookmarkCmd.label ".File Bookmark">
|
||||
<!ENTITY editBookmarkCmd.label ".Edit Bookmark">
|
||||
<!ENTITY newsgroupsCmd.label ".Newsgroups">
|
||||
<!ENTITY toolsMenu.label ".Tools">
|
||||
<!ENTITY historyCmd.label ".History">
|
||||
<!ENTITY securityInfoCmd.label ".Security Info">
|
||||
<!ENTITY messageCenterCmd.label ".Message Center">
|
||||
<!ENTITY importUtilCmd.label ".Import Utility">
|
||||
<!ENTITY javaConsoleCmd.label ".Java Console">
|
||||
<!ENTITY windowMenu.label ".Window">
|
||||
]>
|
||||
|
||||
|
||||
<overlay id="tasksOverlay"
|
||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<html:script language="JavaScript" src="chrome://global/content/tasksOverlay.js"/>
|
||||
|
||||
<!-- Tasks Menu -->
|
||||
<menu id="tasksMenu" name="&tasksMenu.label;">
|
||||
<menuitem name="&navigatorCmd.label;" onclick="goNavigatorWindow()"/>
|
||||
<menuitem name="&messengerCmd.label;" onclick="goMessengerWindow()"/>
|
||||
<menuitem name="&addressBookCmd.label;" onclick="goAddressBook()"/>
|
||||
<separator/>
|
||||
<menu name="&bookmarkMenu.label;">
|
||||
<menuitem name="&addBookmarkCmd.label;" onclick="goAddBookmark()"/>
|
||||
<menuitem name="&fileBookmarkCmd.label;" onclick="goFileBookmark()"/>
|
||||
<menuitem name="&editBookmarkCmd.label;" onclick="goEditBookmark()"/>
|
||||
</menu>
|
||||
<menuitem name="&newsgroupsCmd.label;" onclick="goNewsgroups()"/>
|
||||
<separator/>
|
||||
<menu name="&toolsMenu.label;">
|
||||
<menuitem name="&historyCmd.label;" onclick="goHistory()"/>
|
||||
<menuitem name="&securityInfoCmd.label;" onclick="goSecurityInfo()"/>
|
||||
<menuitem name="&messageCenterCmd.label;" onclick="goMessengerCenter()"/>
|
||||
<menuitem name="&importUtilCmd.label;" onclick="goImport()"/>
|
||||
<menuitem name="&javaConsoleCmd.label;" onclick="goJavaConsole()"/>
|
||||
</menu>
|
||||
<separator/>
|
||||
<menu name="&windowMenu.label;">
|
||||
</menu>
|
||||
</menu>
|
||||
|
||||
</overlay>
|
Загрузка…
Ссылка в новой задаче