Java script functions for UI widgets

This commit is contained in:
chuang%netscape.com 1999-03-06 00:41:21 +00:00
Родитель 1348634270
Коммит a1dbbd5faa
4 изменённых файлов: 573 добавлений и 137 удалений

Просмотреть файл

@ -5,7 +5,7 @@
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onConstruction="StartUp()">
onconstruction="MsgStartUp()">
<html:style>
#toolbar {
position: fixed;
@ -69,113 +69,261 @@
</html:style>
<html:script>
function StartUp()
{
dump("StartUp: MsgAppCore\n");
var appCore = XPAppCoresManager.Find("MsgAppCore");
if (appCore == null) {
dump("StartUp: Creating AppCore\n");
appCore = new MsgAppCore();
}
dump("AppCore probably found\n");
if (appCore != null) {
dump("Initializing AppCore and setting Window\n");
appCore.Init("MsgAppCore");
appCore.SetWindow(window);
}
}
function OpenURL(url)
{
dump("\n\nOpenURL from XUL\n\n\n");
var appCore = new MsgAppCore();
if (appCore != null) {
dump("Initializing AppCore and setting Window\n");
appCore.Init("MsgAppCore");
appCore.SetWindow(window);
appCore.OpenURL(url);
}
}
function NewMessage()
{
dump("\n\nnewMsg from XUL\n\n\n");
var appCore = new ComposeAppCore();
if (appCore != null) {
dump("Initializing ComposeAppCore and creating a new Message\n");
appCore.Init("ComposeAppCore");
appCore.NewMessage("resource:/res/samples/compose.xul");
}
}
</html:script>
<html:script src="widgetglue.js"></html:script>
<html:script src="commandglue.js"></html:script>
<html:script src="shareglue.js"></html:script>
<menubar>
<menu name="File">
<menuitem name="New Message" onclick="NewMessage();"/>
<menu name="New">
<menuitem name="Navigator Window" onClick="NewBrowserWindow();"/>
<menuitem name="Message" onClick="MsgNewMessage();"/>
<menuitem name="Blank Page" onClick="NewBlankPage();"/>
<separator/>
<menuitem name="Page from Template" onClick="TemplatePage();"/>
<menuitem name="Page from Wizard" onClick="WizardPage();"/>
</menu>
<menuitem name="New Folder..." onClick="MsgNewFolder();"/>
<menuitem name="Open Attachment" onClick="MsgOpenAttachment();"/>
<menu name="Save As">
<menuitem name="File" onClick="MsgSaveAsFile();"/>
<menuitem name="Template" onClick="MsgSaveAsTemplate();"/>
</menu>
<separator/>
<menuitem name="Get New Message" onclick="GetMessage();"/>
<menuitem name="Subscribe" onclick="Subscribe();"/>
<menuitem name="Get New Message" onClick="MsgGetMessage();"/>
<menuitem name="Send Unsent Messages" onClick="MsgSendUnsentMsg();"/>
<menuitem name="Update Message Count" onClick="MsgUpdateMsgCount();"/>
<menuitem name="Subscribe" onClick="MsgSubscribe();"/>
<separator/>
<menuitem name="Rename Folder.." onclick="RenameFolder();"/>
<menuitem name="Empty Trash" onclick="EmptyTrash();"/>
<menuitem name="Rename Folder.." onClick="MsgRenameFolder();"/>
<menuitem name="Empty Trash" onClick="MsgEmptyTrash();"/>
<menuitem name="Compact Folders" onClick="MsgCompactFolders();"/>
<separator/>
<menuitem name="Print" onclick="Print();"/>
<menuitem name="Import..." onClick="MsgImport();"/>
<separator/>
<menuitem name="Close" onclick="Close();"/>
<menuitem name="Exit" onclick="Exit();"/>
<menu name="Offline">
<menuitem name="Work Offline" onClick="MsgWorkOffline();"/>
<menuitem name="Synchronize" onClick="MsgSynchronize();"/>
<menuitem name="Get Selected Messages" onClick="MsgGetSelectedMsg();"/>
<menuitem name="Get Flagged Messages" onClick="MsgGetFlaggedMsg();"/>
</menu>
<separator/>
<menuitem name="Page Setup..." onClick="PageSetup();"/>
<menuitem name="Print Preview" onClick="PrintPreview();"/>
<menuitem name="Print" onClick="Print();"/>
<separator/>
<menuitem name="Close" onClick="Close();"/>
<menuitem name="Exit" onClick="Exit();"/>
</menu>
<menu name="Edit">
<menuitem name="Delete Message" onclick="DeleteMessage();"/>
<menuitem name="Undo" onClick="MsgEditUndo();"/>
<menuitem name="Redo" onClick="MsgEditRedo();"/>
<separator/>
<menuitem name="Cut" onClick="MsgEditCut();"/>
<menuitem name="Copy" onClick="MsgEditCopy();"/>
<menuitem name="Paste" onClick="MsgEditPaste();"/>
<menuitem name="Delete Message" onClick="MsgDeleteMessage();"/>
<menu name="Select">
<menuitem name="All" onClick="MsgSelectAll();"/>
<menuitem name="Thread" onClick="MsgSelectThread();"/>
<menuitem name="Flagged Messages" onClick="MsgSelectFlaggedMsg();"/>
</menu>
<separator/>
<menuitem name="Find..." onClick="MsgFind();"/>
<menuitem name="Find Again" onClick="MsgFindAgain();"/>
<separator/>
<menuitem name="Search Messages" onClick="MsgSearchMessages();"/>
<separator/>
<menuitem name="Message Filters..." onClick="MsgFilters();"/>
<menuitem name="Folder Properties" onClick="MsgFolderProperties();"/>
<separator/>
<menuitem name="Preferences" onClick="MsgPreferences();"/>
</menu>
<menu name="View">
<menuitem name="View Attachments Inline" onclick="ViewAttachInline();"/>
<menuitem name="Wrap Long Lines" onclick="WrapLongLines();"/>
<menu name="Show">
<menuitem name="Message Toolbar" onClick="MsgShowMsgToolbar();"/>
<menuitem name="Location Toolbar" onClick="MsgShowLocationbar();"/>
<menuitem name="Message" onClick="MsgShowMessage();"/>
<menuitem name="Folders" onClick="MsgShowFolders();"/>
</menu>
<separator/>
<menuitem name="Page Source" onclick="ViewPageSource();"/>
<menuitem name="Page Info" onclick="ViewPageInfo();"/>
<menu name="Sort">
<menuitem name="by Date" onClick="MsgSortByDate();"/>
<menuitem name="by Flag" onClick="MsgSortByFlag();"/>
<menuitem name="by Priority" onClick="MsgSortByPriority();"/>
<menuitem name="by Sender" onClick="MsgSortBySender();"/>
<menuitem name="by Size" onClick="MsgSortBySize();"/>
<menuitem name="by Status" onClick="MsgSortByStatus();"/>
<menuitem name="by Subject" onClick="MsgSortBySubject();"/>
<menuitem name="by Thread" onClick="MsgSortByThread();"/>
<menuitem name="by Unread" onClick="MsgSortByUnread();"/>
<menuitem name="by Order Received" onClick="MsgSortByOrderReceived();"/>
<separator/>
<menuitem name="Ascending" onClick="MsgSortAscending();"/>
<menuitem name="Descending" onClick="MsgSortDescending();"/>
</menu>
<menu name="Messages">
<menuitem name="All" onClick="MsgViewAllMsgs();"/>
<menuitem name="Unread" onClick="MsgViewUnreadMsg();"/>
<menuitem name="Threads with Unread" onClick="MsgViewThreadsUnread();"/>
<menuitem name="Watched Threads with Unread" onClick="MsgViewWatchedThreadsUnread();"/>
<separator/>
<menuitem name="Ignore Thread" onClick="MsgViewIgnoreThread();"/>
</menu>
<menu name="Headers">
<menuitem name="All" onClick="MsgViewAllHeaders();"/>
<menuitem name="Normal" onClick="MsgViewNormalHeaders();"/>
<menuitem name="Brief" onClick="MsgViewBriefHeaders();"/>
</menu>
<separator/>
<menuitem name="View Attachments Inline" onClick="MsgViewAttachInline();"/>
<menuitem name="Wrap Long Lines" onClick="MsgWrapLongLines();"/>
<separator/>
<menuitem name="Increase Font" onClick="MsgIncreaseFont();"/>
<menuitem name="Decrease Font" onClick="MsgDecreaseFont();"/>
<separator/>
<menuitem name="Reload" onClick="MsgReload();"/>
<menuitem name="Show Images" onClick="MsgShowImages();"/>
<menuitem name="Refresh" onClick="MsgRefresh();"/>
<menuitem name="Stop" onClick="MsgStop();"/>
<separator/>
<menuitem name="Page Source" onClick="MsgViewPageSource();"/>
<menuitem name="Page Info" onClick="MsgViewPageInfo();"/>
<separator/>
<menu name="Character Set">
<menuitem name="Western (ISO-8859-1)" onClick="CharacterSet();"/>
</menu>
</menu>
<menu name="Go">
<menuitem name="Next Message" onclick="NextMessage();"/>
<menuitem name="Next Unread Message" onclick="NextUnreadMessage();"/>
<menuitem name="First Unread Message" onClick="MsgFirstUnreadMessage();"/>
<menuitem name="First Flagged Message" onClick="MsgFirstFlaggedMessage();"/>
<separator/>
<menu name="Next">
<menuitem name="Message" onClick="MsgNextMessage();"/>
<menuitem name="Unread Message" onClick="MsgNextUnreadMessage();"/>
<menuitem name="Flagged Message" onClick="MsgNextFlaggedMessage();"/>
</menu>
<menu name="Previous">
<menuitem name="Message" onClick="MsgPreviousMessage();"/>
<menuitem name="Unread Message" onClick="MsgPreviousUnreadMessage();"/>
<menuitem name="Flagged Message" onClick="MsgPreviousFlaggedMessage();"/>
</menu>
<separator/>
<menuitem name="Back" onClick="MsgGoBack();"/>
<menuitem name="Forward" onClick="MsgGoForward();"/>
</menu>
<menu name="Message">
<menuitem name="New Message" onclick="NewMessage();"/>
<menuitem name="Reply" onclick="ReplyMessage();"/>
<menuitem name="Forward" onclick="ForwardMessage();"/>
<menuitem name="New Message" onClick="MsgNewMessage();"/>
<menuitem name="Reply" onClick="MsgReplyMessage();"/>
<menuitem name="Reply to All" onClick="MsgReplyToAllMessage();"/>
<menuitem name="Forward" onClick="MsgForwardMessage();"/>
<menu name="Forward As">
<menuitem name="Inline" onClick="MsgForwardAsInline();"/>
<menuitem name="Quoted" onClick="MsgForwardAsQuoted();"/>
<menuitem name="Attachment" onClick="MsgForwardAsAttachment();"/>
</menu>
<menuitem name="Edit Message as New" onClick="MsgEditMessageAsNew();"/>
<separator/>
<menu name="Move Message">
<menuitem name="Folder" onClick="MsgMoveMessage();"/>
</menu>
<menu name="Copy Message">
<menuitem name="Folder" onClick="MsgCopyMessage();"/>
</menu>
<separator/>
<menuitem name="Add Sender to Address Book" onClick="MsgAddSenderToAddressBook();"/>
<menuitem name="Add All to Address Book" onClick="MsgAddAllToAddressBook();"/>
<separator/>
<menu name="Mark">
<menuitem name="As Read" onClick="MsgMarkMsgAsRead();"/>
<menuitem name="Thread As Read" onClick="MsgMarkThreadAsRead();"/>
<menuitem name="by Date..." onClick="MsgMarkByDate();"/>
<menuitem name="All Read" onClick="MsgMarkAllRead();"/>
<separator/>
<menuitem name="Flag" onClick="MsgMarkAsFlagged();"/>
</menu>
<separator/>
<menuitem name="Ignore Thread" onClick="MsgIgnoreThread();"/>
<menuitem name="Watch Thread" onClick="MsgWatchThread();"/>
</menu>
<menu name="Communicator">
<menuitem name="Navigatoe" onClick="NavigatorWindow();"/>
<menuitem name="Messenger" onClick="MessengerWindow();"/>
<menuitem name="Composer" onClick="ComposerWindow();"/>
<menuitem name="AOL Instant Messenger Service" onClick="AIMService();"/>
<separator/>
<menu name="Bookmarks">
<menuitem name="Add Bookmark" onClick="AddBookmark();"/>
<menuitem name="File Bookmark" onClick="FileBookmark();"/>
<menuitem name="Edit Bookmark" onClick="EditBookmark();"/>
</menu>
<menuitem name="Newsgroups" onClick="Newsgroups();"/>
<menuitem name="Address Book" onClick="AddressBook();"/>
<separator/>
<menu name="Tools">
<menuitem name="History" onClick="History();"/>
<menuitem name="Security Info" onClick="SecurityInfo();"/>
<menuitem name="Message Center" onClick="MessengerCenter();"/>
<menuitem name="Import Utility" onClick="Import();"/>
<menuitem name="Java Console" onClick="JavaConsole();"/>
</menu>
<menu name="Server Tools">
<menuitem name="Page Service" onClick="PageService();"/>
<menuitem name="Mail Account" onClick="MailAccount();"/>
<menuitem name="Mailing List" onClick="MaillingList();"/>
<menuitem name="Folder Permissions" onClick="FolderPermission();"/>
<menuitem name="Manage Newsgroups" onClick="ManageNewsgroup();"/>
</menu>
<separator/>
<menuitem name="Window" onClick="WindowList();"/>
</menu>
<menu name="Help">
<menuitem name="Help Content" onClick="Help();"/>
<menuitem name="Reference Library" onClick="Help();"/>
<menuitem name="Release Notes" onClick="Help();"/>
<menuitem name="Produce Information and Support" onClick="Help();"/>
<separator/>
<menuitem name="Software Updates" onClick="Help();"/>
<menuitem name="Register Now" onClick="Help();"/>
<menuitem name="Member Services" onClick="Help();"/>
<separator/>
<menuitem name="International Users" onClick="Help();"/>
<menuitem name="Security" onClick="Help();"/>
<menuitem name="NetWatch" onClick="Help();"/>
<separator/>
<menuitem name="About Plug-ins" onClick="About();"/>
<menuitem name="About Font Displayers" onClick="About();"/>
<menuitem name="About Communicator..." onClick="About();"/>
</menu>
<menu name="Demo">
<menuitem name="News Message 1" onclick="OpenURL('news://news.mcom.com:119/35BE6AB1.55A14AE4@netscape.com');"/>
<menuitem name="News Message 2" onclick="OpenURL('news://news.mozilla.org:119/36BC8178.5BE93104@netscape.com');"/>
<menuitem name="News Message 1" onClick="MsgLoadNewsMessage('news://news.mcom.com:119/35BE6AB1.55A14AE4@netscape.com');"/>
<menuitem name="News Message 2" onClick="MsgLoadNewsMessage('news://news.mozilla.org:119/36BC8178.5BE93104@netscape.com');"/>
</menu>
</menubar>
<html:div html:id="header">
<toolbox>
<toolbar>
<titledbutton src="resource:/res/toolbar/Mail_Forward.gif" align="bottom" value="Get Msg" onclick="GetMessage()">
<titledbutton src="resource:/res/toolbar/Mail_Forward.gif" align="bottom" value="Get Msg" onclick="MsgGetMessage()">
</titledbutton>
<titledbutton src="resource:/res/toolbar/Mail_NewMsg.gif" align="bottom" value="New Msg" onclick="NewMessage()">
<titledbutton src="resource:/res/toolbar/Mail_NewMsg.gif" align="bottom" value="New Msg" onclick="MsgNewMessage()">
</titledbutton>
<titledbutton src="resource:/res/toolbar/Mail_Reply.gif" align="bottom" value="Reply" onclick="ReplyMessage()">
<titledbutton src="resource:/res/toolbar/Mail_Reply.gif" align="bottom" value="Reply" onclick="MsgReplyMessage()">
</titledbutton>
<titledbutton src="resource:/res/toolbar/Mail_Forward.gif" align="bottom" value="Forward" onclick="ForwardMessage()">
<titledbutton src="resource:/res/toolbar/Mail_Forward.gif" align="bottom" value="Forward" onclick="MsgForwardMessage()">
</titledbutton>
<titledbutton src="resource:/res/samples/delmsg.gif" align="bottom" value="Delete" onclick="DeleteMessage()">
<titledbutton src="resource:/res/samples/delmsg.gif" align="bottom" value="Delete" onclick="MsgDeleteMessage()">
</titledbutton>
<titledbutton src="resource:/res/toolbar/Mail_NewMsg.gif" align="bottom" value="Load Msg" onclick="OpenURL('news://news.mcom.com:119/35BE6AB1.55A14AE4@netscape.com')">
<titledbutton src="resource:/res/toolbar/Mail_NewMsg.gif" align="bottom" value="Load Msg" onclick="MsgLoadNewsMessage('news://news.mcom.com:119/35BE6AB1.55A14AE4@netscape.com')">
</titledbutton>
<titledbutton src="resource:/res/throbber/anims00.gif" align="right" onclick="window.frames[0].home()"/>
</toolbar>
</toolbox>
</html:div>
<html:div id="thread">

Просмотреть файл

@ -32,6 +32,9 @@ install::
$(MAKE_INSTALL) threadPane.css $(DIST)\bin\res\samples
$(MAKE_INSTALL) message.html $(DIST)\bin\res\samples
$(MAKE_INSTALL) delmsg.gif $(DIST)\bin\res\samples
$(MAKE_INSTALL) widgetglue.js $(DIST)\bin\res\samples
$(MAKE_INSTALL) commandglue.js $(DIST)\bin\res\samples
$(MAKE_INSTALL) shareglue.js $(DIST)\bin\res\samples
clobber::
rm -f $(DIST)\res\samples\mailshell.xul
@ -41,3 +44,6 @@ clobber::
rm -f $(DIST)\res\samples\threadPane.xul
rm -f $(DIST)\res\samples\message.html
rm -f $(DIST)\res\samples\delmsg.gif
rm -f $(DIST)\res\samples\widgetglue.js
rm -f $(DIST)\res\samples\commandglue.js
rm -f $(DIST)\res\samples\shareglue.js

Просмотреть файл

@ -5,99 +5,260 @@
<xul:window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script language="JavaScript">
function StartUp()
{
dump("StartUp: MsgAppCore\n");
var appCore = XPAppCoresManager.Find("MsgAppCore");
if (appCore == null) {
dump("StartUp: Creating AppCore\n");
appCore = new MsgAppCore();
}
dump("AppCore probably found\n");
if (appCore != null) {
dump("Initializing AppCore and setting Window\n");
appCore.Init("MsgAppCore");
appCore.SetWindow(window);
}
}
function OpenURL(url)
{
dump("\n\nOpenURL from XUL\n\n\n");
var appCore = new MsgAppCore();
if (appCore != null) {
dump("Initializing AppCore and setting Window\n");
appCore.Init("MsgAppCore");
appCore.SetWindow(window);
appCore.OpenURL(url);
}
}
</html:script>
<html:script src="widgetglue.js"></html:script>
<html:script src="commandglue.js"></html:script>
<html:script src="shareglue.js"></html:script>
<xul:menubar>
<xul:menu name="File">
<xul:menuitem name="New Message" onclick="NewMessage();"/>
<xul:menu name="New">
<xul:menuitem name="Navigator Window" onclick="NewBrowserWindow();"/>
<xul:menuitem name="Message" onclick="MsgNewMessage();"/>
<xul:menuitem name="Blank Page" onclick="NewBlankPage();"/>
<separator/>
<xul:menuitem name="Page from Template" onclick="TemplatePage();"/>
<xul:menuitem name="Page from Wizard" onclick="WizardPage();"/>
</xul:menu>
<xul:menuitem name="New Folder..." onclick="MsgNewFolder();"/>
<xul:menuitem name="Open Attachment" onclick="MsgOpenAttachment();"/>
<xul:menu name="Save As">
<xul:menuitem name="File" onclick="MsgSaveAsFile();"/>
<xul:menuitem name="Template" onclick="MsgSaveAsTemplate();"/>
</xul:menu>
<separator/>
<xul:menuitem name="Get New Message" onclick="GetMessage();"/>
<xul:menuitem name="Subscribe" onclick="Subscribe();"/>
<xul:menuitem name="Get New Message" onclick="MsgGetMessage();"/>
<xul:menuitem name="Send Unsent Messages" onclick="MsgSendUnsentMsg();"/>
<xul:menuitem name="Update Message Count" onclick="MsgUpdateMsgCount();"/>
<xul:menuitem name="Subscribe" onclick="MsgSubscribe();"/>
<separator/>
<xul:menuitem name="Rename Folder.." onclick="RenameFolder();"/>
<xul:menuitem name="Empty Trash" onclick="EmptyTrash();"/>
<xul:menuitem name="Rename Folder.." onclick="MsgRenameFolder();"/>
<xul:menuitem name="Empty Trash" onclick="MsgEmptyTrash();"/>
<xul:menuitem name="Compact Folders" onclick="MsgCompactFolders();"/>
<separator/>
<xul:menuitem name="Import..." onclick="MsgImport();"/>
<separator/>
<xul:menu name="Offline">
<xul:menuitem name="Work Offline" onclick="MsgWorkOffline();"/>
<xul:menuitem name="Synchronize" onclick="MsgSynchronize();"/>
<xul:menuitem name="Get Selected Messages" onclick="MsgGetSelectedMsg();"/>
<xul:menuitem name="Get Flagged Messages" onclick="MsgGetFlaggedMsg();"/>
</xul:menu>
<separator/>
<xul:menuitem name="Page Setup..." onclick="PageSetup();"/>
<xul:menuitem name="Print Preview" onclick="PrintPreview();"/>
<xul:menuitem name="Print" onclick="Print();"/>
<separator/>
<xul:menuitem name="Close" onclick="Close();"/>
<xul:menuitem name="Exit" onclick="Exit();"/>
</xul:menu>
<xul:menu name="Edit">
<xul:menuitem name="Delete Message" onclick="DeleteMessage();"/>
<xul:menuitem name="Undo" onclick="MsgUndo();"/>
<xul:menuitem name="Redo" onclick="MsgRedo();"/>
<separator/>
<xul:menuitem name="Cut" onclick="MsgCut();"/>
<xul:menuitem name="Copy" onclick="MsgCopy();"/>
<xul:menuitem name="Paste" onclick="MsgPaste();"/>
<xul:menuitem name="Delete Message" onclick="MsgDeleteMessage();"/>
<xul:menu name="Select">
<xul:menuitem name="All" onclick="MsgSelectAll();"/>
<xul:menuitem name="Thread" onclick="MsgSelectThread();"/>
<xul:menuitem name="Flagged Messages" onclick="MsgSelectFlaggedMsg();"/>
</xul:menu>
<separator/>
<xul:menuitem name="Find..." onclick="MsgFind();"/>
<xul:menuitem name="Find Again" onclick="MsgFindAgain();"/>
<separator/>
<xul:menuitem name="Search Messages" onclick="MsgSearchMessages();"/>
<separator/>
<xul:menuitem name="Message Filters..." onclick="MsgFilters();"/>
<xul:menuitem name="Folder Properties" onclick="MsgFolderProperties();"/>
<separator/>
<xul:menuitem name="Preferences" onclick="MsgPreferences();"/>
</xul:menu>
<xul:menu name="View">
<xul:menuitem name="View Attachments Inline" onclick="ViewAttachInline();"/>
<xul:menuitem name="Wrap Long Lines" onclick="WrapLongLines();"/>
<xul:menu name="Show">
<xul:menuitem name="Message Toolbar" onclick="MsgShowMsgToolbar();"/>
<xul:menuitem name="Location Toolbar" onclick="MsgShowLocationbar();"/>
<xul:menuitem name="Message" onclick="MsgShowMessage();"/>
<xul:menuitem name="Folders" onclick="MsgShowFolders();"/>
</xul:menu>
<separator/>
<xul:menuitem name="Page Source" onclick="ViewPageSource();"/>
<xul:menuitem name="Page Info" onclick="ViewPageInfo();"/>
<xul:menu name="Sort">
<xul:menuitem name="by Date" onclick="MsgSortByDate();"/>
<xul:menuitem name="by Flag" onclick="MsgSortByFlag();"/>
<xul:menuitem name="by Priority" onclick="MsgSortByPriority();"/>
<xul:menuitem name="by Sender" onclick="MsgSortBySender();"/>
<xul:menuitem name="by Size" onclick="MsgSortBySize();"/>
<xul:menuitem name="by Status" onclick="MsgSortByStatus();"/>
<xul:menuitem name="by Subject" onclick="MsgSortBySubject();"/>
<xul:menuitem name="by Thread" onclick="MsgSortByThread();"/>
<xul:menuitem name="by Unread" onclick="MsgSortByUnread();"/>
<xul:menuitem name="by Order Received" onclick="MsgSortByOrderReceived();"/>
<separator/>
<xul:menuitem name="Ascending" onclick="MsgSortAscending();"/>
<xul:menuitem name="Descending" onclick="MsgSortDescending();"/>
</xul:menu>
<xul:menu name="Messages">
<xul:menuitem name="All" onclick="MsgViewAllMsgs();"/>
<xul:menuitem name="Unread" onclick="MsgViewUnreadMsg();"/>
<xul:menuitem name="Threads with Unread" onclick="MsgViewThreadsUnread();"/>
<xul:menuitem name="Watched Threads with Unread" onclick="MsgViewWatchedThreadsUnread();"/>
<separator/>
<xul:menuitem name="Ignore Thread" onclick="MsgViewIgnoreThread();"/>
</xul:menu>
<xul:menu name="Headers">
<xul:menuitem name="All" onclick="MsgViewAllHeaders();"/>
<xul:menuitem name="Normal" onclick="MsgViewNormalHeaders();"/>
<xul:menuitem name="Brief" onclick="MsgViewBriefHeaders();"/>
</xul:menu>
<separator/>
<xul:menuitem name="View Attachments Inline" onclick="MsgViewAttachInline();"/>
<xul:menuitem name="Wrap Long Lines" onclick="MsgWrapLongLines();"/>
<separator/>
<xul:menuitem name="Increase Font" onclick="MsgIncreaseFont();"/>
<xul:menuitem name="Decrease Font" onclick="MsgDecreaseFont();"/>
<separator/>
<xul:menuitem name="Reload" onclick="MsgReload();"/>
<xul:menuitem name="Show Images" onclick="MsgShowImages();"/>
<xul:menuitem name="Refresh" onclick="MsgRefresh();"/>
<xul:menuitem name="Stop" onclick="MsgStop();"/>
<separator/>
<xul:menuitem name="Page Source" onclick="MsgViewPageSource();"/>
<xul:menuitem name="Page Info" onclick="MsgViewPageInfo();"/>
<separator/>
<xul:menu name="Character Set">
<xul:menuitem name="Western (ISO-8859-1)" onclick="CharacterSet();"/>
</xul:menu>
</xul:menu>
<xul:menu name="Go">
<xul:menuitem name="Next Message" onclick="NextMessage();"/>
<xul:menuitem name="Next Unread Message" onclick="NextUnreadMessage();"/>
<xul:menuitem name="First Unread Message" onclick="MsgFirstUnreadMessage();"/>
<xul:menuitem name="First Flagged Message" onclick="MsgFirstFlaggedMessage();"/>
<separator/>
<xul:menu name="Next">
<xul:menuitem name="Message" onclick="MsgNextMessage();"/>
<xul:menuitem name="Unread Message" onclick="MsgNextUnreadMessage();"/>
<xul:menuitem name="Flagged Message" onclick="MsgNextFlaggedMessage();"/>
</xul:menu>
<xul:menu name="Previous">
<xul:menuitem name="Message" onclick="MsgPreviousMessage();"/>
<xul:menuitem name="Unread Message" onclick="MsgPreviousUnreadMessage();"/>
<xul:menuitem name="Flagged Message" onclick="MsgPreviousFlaggedMessage();"/>
</xul:menu>
<separator/>
<xul:menuitem name="Back" onclick="MsgGoBack();"/>
<xul:menuitem name="Forward" onclick="MsgGoForward();"/>
</xul:menu>
<xul:menu name="Message">
<xul:menuitem name="New Message" onclick="NewMessage();"/>
<xul:menuitem name="Reply" onclick="ReplyMessage();"/>
<xul:menuitem name="Forward" onclick="ForwardMessage();"/>
<xul:menuitem name="New Message" onclick="MsgNewMessage();"/>
<xul:menuitem name="Reply" onclick="MsgReplyMessage();"/>
<xul:menuitem name="Reply to All" onclick="MsgReplyToAllMessage();"/>
<xul:menuitem name="Forward" onclick="MsgForwardMessage();"/>
<xul:menu name="Forward As">
<xul:menuitem name="Inline" onclick="MsgForwardAsInline();"/>
<xul:menuitem name="Quoted" onclick="MsgForwardAsQuoted();"/>
<xul:menuitem name="Attachment" onclick="MsgForwardAsAttachment();"/>
</xul:menu>
<xul:menuitem name="Edit Message as New" onclick="MsgEditMessageAsNew();"/>
<separator/>
<xul:menu name="Move Message">
<xul:menuitem name="Folder" onclick="MsgMoveMessage();"/>
</xul:menu>
<xul:menu name="Copy Message">
<xul:menuitem name="Folder" onclick="MsgCopyMessage();"/>
</xul:menu>
<separator/>
<xul:menuitem name="Add Sender to Address Book" onclick="MsgAddSenderToAddressBook();"/>
<xul:menuitem name="Add All to Address Book" onclick="MsgAddAllToAddressBook();"/>
<separator/>
<xul:menu name="Mark">
<xul:menuitem name="As Read" onclick="MsgMarkMsgAsRead();"/>
<xul:menuitem name="Thread As Read" onclick="MsgMarkThreadAsRead();"/>
<xul:menuitem name="by Date..." onclick="MsgMarkByDate();"/>
<xul:menuitem name="All Read" onclick="MsgMarkAllRead();"/>
<separator/>
<xul:menuitem name="Flag" onclick="MsgMarkAsFlagged();"/>
</xul:menu>
<separator/>
<xul:menuitem name="Ignore Thread" onclick="MsgIgnoreThread();"/>
<xul:menuitem name="Watch Thread" onclick="MsgWatchThread();"/>
</xul:menu>
<xul:menu name="Communicator">
<xul:menuitem name="Navigatoe" onclick="NavigatorWindow();"/>
<xul:menuitem name="Messenger" onclick="MessengerWindow();"/>
<xul:menuitem name="Composer" onclick="ComposerWindow();"/>
<xul:menuitem name="AOL Instant Messenger Service" onclick="AIMService();"/>
<separator/>
<xul:menu name="Bookmarks">
<xul:menuitem name="Add Bookmark" onclick="AddBookmark();"/>
<xul:menuitem name="File Bookmark" onclick="FileBookmark();"/>
<xul:menuitem name="Edit Bookmark" onclick="EditBookmark();"/>
</xul:menu>
<xul:menuitem name="Newsgroups" onclick="Newsgroups();"/>
<xul:menuitem name="Address Book" onclick="AddressBook();"/>
<separator/>
<xul:menu name="Tools">
<xul:menuitem name="History" onclick="History();"/>
<xul:menuitem name="Security Info" onclick="SecurityInfo();"/>
<xul:menuitem name="Message Center" onclick="MessengerCenter();"/>
<xul:menuitem name="Import Utility" onclick="Import();"/>
<xul:menuitem name="Java Console" onclick="JavaConsole();"/>
</xul:menu>
<xul:menu name="Server Tools">
<menuitem name="Page Service" onclick="PageService();"/>
<menuitem name="Mail Account" onclick="MailAccount();"/>
<menuitem name="Mailing List" onclick="MaillingList();"/>
<menuitem name="Folder Permissions" onclick="FolderPermission();"/>
<menuitem name="Manage Newsgroups" onclick="ManageNewsgroup();"/>
</xul:menu>
<separator/>
<xul:menuitem name="Window" onclick="WindowList();"/>
</xul:menu>
<xul:menu name="Help">
<xul:menuitem name="Help Content" onclick="Help();"/>
<xul:menuitem name="Reference Library" onclick="Help();"/>
<xul:menuitem name="Release Notes" onclick="Help();"/>
<xul:menuitem name="Produce Information and Support" onclick="Help();"/>
<separator/>
<xul:menuitem name="Software Updates" onclick="Help();"/>
<xul:menuitem name="Register Now" onclick="Help();"/>
<xul:menuitem name="Member Services" onclick="Help();"/>
<separator/>
<xul:menuitem name="International Users" onclick="Help();"/>
<xul:menuitem name="Security" onclick="Help();"/>
<xul:menuitem name="NetWatch" onclick="Help();"/>
<separator/>
<xul:menuitem name="About Plug-ins" onclick="About();"/>
<xul:menuitem name="About Font Displayers" onclick="About();"/>
<xul:menuitem name="About Communicator..." onclick="About();"/>
</xul:menu>
<xul:menu name="Demo">
<xul:menuitem name="News Message 1" onclick="OpenURL('news://news.mcom.com:119/35BE6AB1.55A14AE4@netscape.com');"/>
<xul:menuitem name="News Message 2" onclick="OpenURL('news://news.mozilla.org:119/36BC8178.5BE93104@netscape.com');"/>
</xul:menu>
</xul:menubar>
<xul:toolbar>
<html:button onclick="GetMessage();" style="background-color:rgb(192,192,192);">
<html:img src="getmsg.gif"/><html:BR/>Get Msg
</html:button>
<html:button onclick="NewMessage();" style="background-color:rgb(192,192,192);">
<html:img src="newmsg.gif"/><html:BR/>New Msg
</html:button>
<html:button onclick="ReplyMessage();" style="background-color:rgb(192,192,192);">
<html:img src="replymsg.gif"/><html:BR/>Reply
</html:button>
<html:button onclick="ForwardMessage();" style="background-color:rgb(192,192,192);">
<html:img src="fwdmsg.gif"/><html:BR/>Forward
</html:button>
<html:button onclick="DeleteMessage();" style="background-color:rgb(192,192,192);">
<html:img src="delmsg.gif"/><html:BR/>Delete
</html:button>
<html:button onclick="OpenURL('news://news.mcom.com:119/35BE6AB1.55A14AE4@netscape.com');" style="background-color:rgb(192,192,192);">
<html:img src="getmsg.gif"/><html:BR/>Load Msg
</html:button>
<html:a style="position:relative; direction:rtl; right:3; top: 2px;" href="http://www.netscape.com">
<html:img alt="Throbber!" border=0 src="resource:/res/throbber/anims00.gif"/>
</html:a>
<xul:toolbar>
<titledbutton src="resource:/res/toolbar/Mail_Forward.gif" align="bottom" value="Get Msg" onclick="MsgGetMessage()">
</titledbutton>
<titledbutton src="resource:/res/toolbar/Mail_NewMsg.gif" align="bottom" value="New Msg" onclick="MsgNewMessage()">
</titledbutton>
<titledbutton src="resource:/res/toolbar/Mail_Reply.gif" align="bottom" value="Reply" onclick="MsgReplyMessage()">
</titledbutton>
<titledbutton src="resource:/res/toolbar/Mail_Forward.gif" align="bottom" value="Forward" onclick="MsgForwardMessage()">
</titledbutton>
<titledbutton src="resource:/res/samples/delmsg.gif" align="bottom" value="Delete" onclick="MsgDeleteMessage()">
</titledbutton>
<titledbutton src="resource:/res/toolbar/Mail_NewMsg.gif" align="bottom" value="Load Msg" onclick="MsgLoadNewsMessage('news://news.mcom.com:119/35BE6AB1.55A14AE4@netscape.com')">
</titledbutton>
<titledbutton src="resource:/res/throbber/anims00.gif" align="right" onclick="window.frames[0].home()"/>
</xul:toolbar>
</xul:window>

Просмотреть файл

@ -0,0 +1,121 @@
function MsgStartUp()
{
dump("StartUp: MsgAppCore\n");
var appCore = XPAppCoresManager.Find("MsgAppCore");
if (appCore == null) {
dump("StartUp: Creating AppCore\n");
appCore = new MsgAppCore();
}
dump("AppCore probably found\n");
if (appCore != null) {
dump("Initializing AppCore and setting Window\n");
appCore.Init("MsgAppCore");
appCore.SetWindow(window);
}
}
function MsgLoadNewsMessage(url)
{
dump("\n\nMsgLoadNewsMessage from XUL\n");
OpenURL(url);
}
function MsgNewMessage()
{
dump("\n\nMsgNewMessage from XUL\n");
NewMessage();
}
function MsgNewFolder() {}
function MsgOpenAttachment() {}
function MsgSaveAsFile() {}
function MsgSaveAsTemplate() {}
function MsgGetMessage() {}
function MsgSendUnsentMsg() {}
function MsgUpdateMsgCount() {}
function MsgSubscribe() {}
function MsgRenameFolder() {}
function MsgEmptyTrash() {}
function MsgCompactFolders() {}
function MsgImport() {}
function MsgWorkOffline() {}
function MsgSynchronize() {}
function MsgGetSelectedMsg() {}
function MsgGetFlaggedMsg() {}
function MsgEditUndo() {}
function MsgEditRedo() {}
function MsgEditCut() {}
function MsgEditCopy() {}
function MsgEditPaste() {}
function MsgDeleteMessage() {}
function MsgSelectAll() {}
function MsgSelectThread() {}
function MsgSelectFlaggedMsg() {}
function MsgFind() {}
function MsgFindAgain() {}
function MsgSearchMessages() {}
function MsgFilters() {}
function MsgFolderProperties() {}
function MsgPreferences() {}
function MsgShowMsgToolbar() {}
function MsgShowLocationbar() {}
function MsgShowMessage() {}
function MsgShowFolders() {}
function MsgSortByDate() {}
function MsgSortByFlag() {}
function MsgSortByPriority() {}
function MsgSortBySender() {}
function MsgSortBySize() {}
function MsgSortByStatus() {}
function MsgSortBySubject() {}
function MsgSortByThread() {}
function MsgSortByUnread() {}
function MsgSortByOrderReceived() {}
function MsgSortAscending() {}
function MsgSortDescending() {}
function MsgViewAllMsgs() {}
function MsgViewUnreadMsg() {}
function MsgViewThreadsUnread() {}
function MsgViewWatchedThreadsUnread() {}
function MsgViewIgnoreThread() {}
function MsgViewAllHeaders() {}
function MsgViewNormalHeaders() {}
function MsgViewBriefHeaders() {}
function MsgViewAttachInline() {}
function MsgWrapLongLines() {}
function MsgIncreaseFont() {}
function MsgDecreaseFont() {}
function MsgReload() {}
function MsgShowImages() {}
function MsgRefresh() {}
function MsgStop() {}
function MsgViewPageSource() {}
function MsgViewPageInfo() {}
function MsgFirstUnreadMessage() {}
function MsgFirstFlaggedMessage() {}
function MsgNextMessage() {}
function MsgNextUnreadMessage() {}
function MsgNextFlaggedMessage() {}
function MsgPreviousMessage() {}
function MsgPreviousUnreadMessage() {}
function MsgPreviousFlaggedMessage() {}
function MsgGoBack() {}
function MsgGoForward() {}
function MsgReplyMessage() {}
function MsgReplyToAllMessage() {}
function MsgForwardMessage() {}
function MsgForwardAsInline() {}
function MsgForwardAsQuoted() {}
function MsgForwardAsAttachment() {}
function MsgEditMessageAsNew() {}
function MsgMoveMessage() {}
function MsgCopyMessage() {}
function MsgAddSenderToAddressBook() {}
function MsgAddAllToAddressBook() {}
function MsgMarkfunction MsgAsRead() {}
function MsgMarkThreadAsRead() {}
function MsgMarkByDate() {}
function MsgMarkAllRead() {}
function MsgMarkAsFlagged() {}
function MsgIgnoreThread() {}
function MsgWatchThread() {}