1999-06-08 00:59:02 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
1999-06-08 02:17:35 +00:00
|
|
|
* 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.
|
1999-06-08 00:59:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* widget-specific wrapper glue. There should be one function for every
|
|
|
|
* widget/menu item, which gets some context (like the current selection)
|
|
|
|
* and then calls a function/command in commandglue
|
|
|
|
*/
|
1999-11-10 23:47:59 +00:00
|
|
|
|
|
|
|
var msgComposeType = Components.interfaces.nsIMsgCompType;
|
|
|
|
var msgComposFormat = Components.interfaces.nsIMsgCompFormat;
|
1999-11-30 22:57:42 +00:00
|
|
|
var Bundle = srGetStrBundle("chrome://messenger/locale/messenger.properties");
|
1999-06-08 00:59:02 +00:00
|
|
|
|
1999-12-22 00:18:44 +00:00
|
|
|
var prefs = Components.classes['component://netscape/preferences'].getService();
|
|
|
|
prefs = prefs.QueryInterface(Components.interfaces.nsIPref);
|
|
|
|
|
1999-09-16 20:24:07 +00:00
|
|
|
// Controller object for folder pane
|
|
|
|
var FolderPaneController =
|
|
|
|
{
|
1999-10-14 10:58:25 +00:00
|
|
|
supportsCommand: function(command)
|
|
|
|
{
|
|
|
|
switch ( command )
|
|
|
|
{
|
|
|
|
case "cmd_selectAll":
|
|
|
|
case "cmd_delete":
|
1999-11-02 03:55:59 +00:00
|
|
|
case "button_delete":
|
1999-10-14 10:58:25 +00:00
|
|
|
return true;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
isCommandEnabled: function(command)
|
1999-09-16 20:24:07 +00:00
|
|
|
{
|
1999-09-16 22:21:47 +00:00
|
|
|
dump("FolderPaneController.IsCommandEnabled\n");
|
1999-09-16 20:24:07 +00:00
|
|
|
switch ( command )
|
|
|
|
{
|
|
|
|
case "cmd_selectAll":
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case "cmd_delete":
|
1999-11-02 03:55:59 +00:00
|
|
|
case "button_delete":
|
|
|
|
if ( command == "cmd_delete" )
|
|
|
|
goSetMenuValue(command, 'valueFolder');
|
|
|
|
var folderTree = GetFolderTree();
|
|
|
|
if ( folderTree && folderTree.selectedItems )
|
|
|
|
return true;
|
|
|
|
else
|
|
|
|
return false;
|
1999-09-16 20:24:07 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
1999-10-14 10:58:25 +00:00
|
|
|
doCommand: function(command)
|
1999-09-16 20:24:07 +00:00
|
|
|
{
|
|
|
|
switch ( command )
|
|
|
|
{
|
|
|
|
case "cmd_selectAll":
|
|
|
|
var folderTree = GetFolderTree();
|
|
|
|
if ( folderTree )
|
|
|
|
{
|
|
|
|
dump("select all now!!!!!!" + "\n");
|
|
|
|
folderTree.selectAll();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "cmd_delete":
|
1999-11-02 03:55:59 +00:00
|
|
|
case "button_delete":
|
|
|
|
// add this back in when folder delete has warning
|
|
|
|
//MsgDeleteFolder();
|
1999-09-16 20:24:07 +00:00
|
|
|
break;
|
|
|
|
}
|
1999-11-05 02:21:47 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
onEvent: function(event)
|
|
|
|
{
|
|
|
|
dump("onEvent("+event+")\n");
|
|
|
|
// on blur events set the menu item texts back to the normal values
|
|
|
|
if ( event == 'blur' )
|
|
|
|
{
|
|
|
|
goSetMenuValue('cmd_delete', 'valueDefault');
|
|
|
|
}
|
1999-09-16 20:24:07 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Controller object for thread pane
|
|
|
|
var ThreadPaneController =
|
|
|
|
{
|
1999-10-14 10:58:25 +00:00
|
|
|
supportsCommand: function(command)
|
|
|
|
{
|
|
|
|
switch ( command )
|
|
|
|
{
|
|
|
|
case "cmd_selectAll":
|
|
|
|
case "cmd_delete":
|
1999-11-02 03:55:59 +00:00
|
|
|
case "button_delete":
|
1999-11-03 23:03:12 +00:00
|
|
|
case "cmd_undo":
|
|
|
|
case "cmd_redo":
|
1999-10-14 10:58:25 +00:00
|
|
|
return true;
|
1999-11-03 23:03:12 +00:00
|
|
|
|
1999-10-14 10:58:25 +00:00
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
isCommandEnabled: function(command)
|
1999-09-16 20:24:07 +00:00
|
|
|
{
|
1999-10-14 10:58:25 +00:00
|
|
|
dump("ThreadPaneController.isCommandEnabled\n");
|
1999-09-16 20:24:07 +00:00
|
|
|
switch ( command )
|
|
|
|
{
|
|
|
|
case "cmd_selectAll":
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case "cmd_delete":
|
1999-11-02 03:55:59 +00:00
|
|
|
case "button_delete":
|
|
|
|
var threadTree = GetThreadTree();
|
|
|
|
dump("threadTree = " + threadTree + "\n");
|
|
|
|
var numSelected = 0;
|
|
|
|
if ( threadTree && threadTree.selectedItems )
|
|
|
|
numSelected = threadTree.selectedItems.length;
|
|
|
|
if ( command == "cmd_delete" )
|
|
|
|
{
|
|
|
|
if ( numSelected < 2 )
|
|
|
|
goSetMenuValue(command, 'valueMessage');
|
|
|
|
else
|
|
|
|
goSetMenuValue(command, 'valueMessages');
|
|
|
|
}
|
|
|
|
return ( numSelected > 0 );
|
1999-09-16 20:24:07 +00:00
|
|
|
|
1999-11-03 23:03:12 +00:00
|
|
|
case "cmd_undo":
|
|
|
|
case "cmd_redo":
|
|
|
|
// FIX ME - these commands should be calling the back-end code to determine if
|
|
|
|
// they should be enabled, this hack of always enabled can then be fixed.
|
|
|
|
return true;
|
|
|
|
|
1999-09-16 20:24:07 +00:00
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
1999-10-14 10:58:25 +00:00
|
|
|
doCommand: function(command)
|
1999-09-16 20:24:07 +00:00
|
|
|
{
|
|
|
|
switch ( command )
|
|
|
|
{
|
|
|
|
case "cmd_selectAll":
|
|
|
|
var threadTree = GetThreadTree();
|
|
|
|
if ( threadTree )
|
|
|
|
{
|
|
|
|
dump("select all now!!!!!!" + "\n");
|
|
|
|
threadTree.selectAll();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "cmd_delete":
|
|
|
|
MsgDeleteMessage(false);
|
|
|
|
break;
|
1999-11-02 03:55:59 +00:00
|
|
|
|
|
|
|
case "button_delete":
|
|
|
|
MsgDeleteMessage(true);
|
|
|
|
break;
|
1999-11-03 23:03:12 +00:00
|
|
|
|
|
|
|
case "cmd_undo":
|
|
|
|
messenger.Undo();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "cmd_redo":
|
|
|
|
messenger.Redo();
|
|
|
|
break;
|
1999-09-16 20:24:07 +00:00
|
|
|
}
|
1999-11-05 02:21:47 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
onEvent: function(event)
|
|
|
|
{
|
|
|
|
dump("onEvent("+event+")\n");
|
|
|
|
// on blur events set the menu item texts back to the normal values
|
|
|
|
if ( event == 'blur' )
|
|
|
|
{
|
|
|
|
goSetMenuValue('cmd_delete', 'valueDefault');
|
|
|
|
}
|
1999-09-16 20:24:07 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function SetupCommandUpdateHandlers()
|
|
|
|
{
|
|
|
|
dump("SetupCommandUpdateHandlers\n");
|
|
|
|
|
|
|
|
var widget;
|
|
|
|
|
|
|
|
// folder pane
|
|
|
|
widget = GetFolderTree();
|
|
|
|
if ( widget )
|
1999-10-14 10:58:25 +00:00
|
|
|
widget.controllers.appendController(FolderPaneController);
|
1999-09-16 20:24:07 +00:00
|
|
|
|
|
|
|
// thread pane
|
|
|
|
widget = GetThreadTree();
|
|
|
|
if ( widget )
|
1999-10-14 10:58:25 +00:00
|
|
|
widget.controllers.appendController(ThreadPaneController);
|
1999-09-16 20:24:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1999-09-09 06:18:40 +00:00
|
|
|
var viewShowAll =0;
|
|
|
|
var viewShowRead = 1;
|
|
|
|
var viewShowUnread =2;
|
|
|
|
var viewShowWatched = 3;
|
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgHome(url)
|
|
|
|
{
|
1999-10-09 06:23:30 +00:00
|
|
|
window.open( url, "_blank", "chrome,dependent=yes,all" );
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgGetMessage()
|
|
|
|
{
|
|
|
|
GetNewMessages();
|
|
|
|
}
|
|
|
|
|
1999-07-23 09:18:13 +00:00
|
|
|
function MsgDeleteMessage(fromToolbar)
|
1999-05-28 19:41:31 +00:00
|
|
|
{
|
1999-09-20 02:12:28 +00:00
|
|
|
//dump("\nMsgDeleteMessage from XUL\n");
|
1999-07-23 09:18:13 +00:00
|
|
|
//dump("from toolbar? " + fromToolbar + "\n");
|
|
|
|
|
1999-06-23 03:02:21 +00:00
|
|
|
var tree = GetThreadTree();
|
1999-06-08 00:26:29 +00:00
|
|
|
if(tree) {
|
1999-07-23 09:18:13 +00:00
|
|
|
var srcFolder = GetThreadTreeFolder();
|
|
|
|
// if from the toolbar, return right away if this is a news message
|
|
|
|
// only allow cancel from the menu: "Edit | Cancel / Delete Message"
|
|
|
|
if (fromToolbar) {
|
1999-07-27 23:02:54 +00:00
|
|
|
uri = srcFolder.getAttribute('ref');
|
1999-07-23 09:18:13 +00:00
|
|
|
//dump("uri[0:6]=" + uri.substring(0,6) + "\n");
|
|
|
|
if (uri.substring(0,6) == "news:/") {
|
|
|
|
//dump("delete ignored!\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dump("tree is valid\n");
|
1999-05-28 19:41:31 +00:00
|
|
|
//get the selected elements
|
1999-12-21 23:38:31 +00:00
|
|
|
|
1999-12-18 00:48:25 +00:00
|
|
|
var messageList = ConvertDOMListToResourceArray(tree.selectedItems);
|
1999-12-18 19:23:09 +00:00
|
|
|
var nextMessage = GetNextMessageAfterDelete(tree.selectedItems);
|
1999-05-28 19:41:31 +00:00
|
|
|
//get the current folder
|
1999-12-21 23:38:31 +00:00
|
|
|
|
1999-12-18 00:48:25 +00:00
|
|
|
messenger.DeleteMessages(tree.database, srcFolder.resource, messageList);
|
1999-09-14 04:41:46 +00:00
|
|
|
SelectNextMessage(nextMessage);
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-12-18 00:48:25 +00:00
|
|
|
function ConvertDOMListToResourceArray(nodeList)
|
|
|
|
{
|
|
|
|
var result = Components.classes["component://netscape/supports-array"].createInstance(Components.interfaces.nsISupportsArray);
|
|
|
|
|
|
|
|
for (var i=0; i<nodeList.length; i++) {
|
|
|
|
result.AppendElement(nodeList[i].resource);
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgDeleteFolder()
|
|
|
|
{
|
1999-06-08 00:26:29 +00:00
|
|
|
//get the selected elements
|
1999-06-23 03:02:21 +00:00
|
|
|
var tree = GetFolderTree();
|
1999-08-23 02:58:28 +00:00
|
|
|
var folderList = tree.selectedItems;
|
1999-06-08 00:26:29 +00:00
|
|
|
var i;
|
|
|
|
var folder, parent;
|
|
|
|
for(i = 0; i < folderList.length; i++)
|
|
|
|
{
|
|
|
|
folder = folderList[i];
|
|
|
|
folderuri = folder.getAttribute('id');
|
|
|
|
dump(folderuri);
|
|
|
|
parent = folder.parentNode.parentNode;
|
|
|
|
var parenturi = parent.getAttribute('id');
|
|
|
|
if(parenturi)
|
|
|
|
dump(parenturi);
|
|
|
|
else
|
|
|
|
dump("No parenturi");
|
|
|
|
dump("folder = " + folder.nodeName + "\n");
|
|
|
|
dump("parent = " + parent.nodeName + "\n");
|
1999-12-18 00:48:25 +00:00
|
|
|
messenger.DeleteFolders(tree.database,
|
|
|
|
parent.resource, folder.resource);
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
1999-10-13 04:26:01 +00:00
|
|
|
function MsgNewMessage(event)
|
|
|
|
{
|
1999-11-10 23:47:59 +00:00
|
|
|
ComposeMessage(msgComposeType.New, msgComposFormat.Default);
|
1999-10-13 04:26:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgReplyMessage(event)
|
1999-05-28 19:41:31 +00:00
|
|
|
{
|
1999-06-11 00:25:20 +00:00
|
|
|
dump("\nMsgReplyMessage from XUL\n");
|
1999-11-10 23:47:59 +00:00
|
|
|
ComposeMessage(msgComposeType.Reply, msgComposFormat.Default);
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
1999-10-13 04:26:01 +00:00
|
|
|
function MsgReplyToAllMessage(event)
|
1999-05-28 19:41:31 +00:00
|
|
|
{
|
1999-06-11 00:25:20 +00:00
|
|
|
dump("\nMsgReplyToAllMessage from XUL\n");
|
1999-11-10 23:47:59 +00:00
|
|
|
ComposeMessage(msgComposeType.ReplyAll, msgComposFormat.Default);
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
1999-10-13 04:26:01 +00:00
|
|
|
function MsgForwardMessage(event)
|
1999-05-28 19:41:31 +00:00
|
|
|
{
|
1999-06-11 00:25:20 +00:00
|
|
|
dump("\nMsgForwardMessage from XUL\n");
|
1999-11-10 23:47:59 +00:00
|
|
|
var forwardType = 0;
|
|
|
|
try {
|
|
|
|
var forwardType = prefs.GetIntPref("mail.forward_message_mode");
|
1999-11-30 22:57:42 +00:00
|
|
|
} catch (e) {dump ("failed to retrieve pref mail.forward_message_mode");}
|
1999-11-10 23:47:59 +00:00
|
|
|
|
|
|
|
if (forwardType == 0)
|
|
|
|
MsgForwardAsAttachment(null);
|
|
|
|
else
|
|
|
|
MsgForwardAsInline(null);
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
1999-10-13 04:26:01 +00:00
|
|
|
function MsgForwardAsAttachment(event)
|
1999-05-28 19:41:31 +00:00
|
|
|
{
|
1999-06-11 00:25:20 +00:00
|
|
|
dump("\nMsgForwardAsAttachment from XUL\n");
|
1999-11-10 23:47:59 +00:00
|
|
|
ComposeMessage(msgComposeType.ForwardAsAttachment, msgComposFormat.Default);
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
1999-10-13 04:26:01 +00:00
|
|
|
function MsgForwardAsInline(event)
|
1999-05-28 19:41:31 +00:00
|
|
|
{
|
1999-06-11 00:25:20 +00:00
|
|
|
dump("\nMsgForwardAsInline from XUL\n");
|
1999-11-10 23:47:59 +00:00
|
|
|
ComposeMessage(msgComposeType.ForwardInline, msgComposFormat.Default);
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgCopyMessage(destFolder)
|
|
|
|
{
|
|
|
|
// Get the id for the folder we're copying into
|
|
|
|
destUri = destFolder.getAttribute('id');
|
|
|
|
dump(destUri);
|
|
|
|
|
1999-06-23 03:02:21 +00:00
|
|
|
var tree = GetThreadTree();
|
1999-05-28 19:41:31 +00:00
|
|
|
if(tree)
|
|
|
|
{
|
|
|
|
//Get the selected messages to copy
|
1999-12-18 00:48:25 +00:00
|
|
|
var messageList = ConvertDOMListToResourceArray(tree.selectedItems);
|
1999-06-08 00:26:29 +00:00
|
|
|
//get the current folder
|
1999-06-24 21:26:48 +00:00
|
|
|
|
1999-08-23 02:58:28 +00:00
|
|
|
// dump('In copy messages. Num Selected Items = ' + messageList.length);
|
|
|
|
// dump('\n');
|
1999-06-23 03:02:21 +00:00
|
|
|
var srcFolder = GetThreadTreeFolder();
|
1999-12-18 00:48:25 +00:00
|
|
|
messenger.CopyMessages(tree.database,
|
|
|
|
srcFolder.resource,
|
|
|
|
destFolder.resource, messageList, false);
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgMoveMessage(destFolder)
|
|
|
|
{
|
|
|
|
// Get the id for the folder we're copying into
|
|
|
|
destUri = destFolder.getAttribute('id');
|
|
|
|
dump(destUri);
|
|
|
|
|
1999-06-23 03:02:21 +00:00
|
|
|
var tree = GetThreadTree();
|
1999-05-28 19:41:31 +00:00
|
|
|
if(tree)
|
|
|
|
{
|
|
|
|
//Get the selected messages to copy
|
1999-12-18 00:48:25 +00:00
|
|
|
var messageList = ConvertDOMListToResourceArray(tree.selectedItems);
|
1999-06-08 00:26:29 +00:00
|
|
|
//get the current folder
|
1999-12-18 19:23:09 +00:00
|
|
|
var nextMessage = GetNextMessageAfterDelete(tree.selectedItems);
|
1999-06-23 03:02:21 +00:00
|
|
|
var srcFolder = GetThreadTreeFolder();
|
2000-01-08 01:34:08 +00:00
|
|
|
var srcUri = srcFolder.getAttribute('ref');
|
|
|
|
if (srcUri.substring(0,6) == "news:/")
|
|
|
|
{
|
|
|
|
messenger.CopyMessages(tree.database,
|
|
|
|
srcFolder.resource,
|
|
|
|
destFolder.resource, messageList, false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
messenger.CopyMessages(tree.database,
|
|
|
|
srcFolder.resource,
|
|
|
|
destFolder.resource, messageList, true);
|
|
|
|
SelectNextMessage(nextMessage);
|
|
|
|
}
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgViewAllMsgs()
|
|
|
|
{
|
|
|
|
dump("MsgViewAllMsgs");
|
|
|
|
|
1999-09-09 06:18:40 +00:00
|
|
|
if(messageView)
|
1999-08-20 22:47:12 +00:00
|
|
|
{
|
1999-09-09 06:18:40 +00:00
|
|
|
messageView.viewType = viewShowAll;
|
|
|
|
messageView.showThreads = false;
|
1999-08-20 22:47:12 +00:00
|
|
|
}
|
1999-06-23 03:02:21 +00:00
|
|
|
RefreshThreadTreeView();
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgViewUnreadMsg()
|
|
|
|
{
|
|
|
|
dump("MsgViewUnreadMsgs");
|
|
|
|
|
1999-09-09 06:18:40 +00:00
|
|
|
if(messageView)
|
1999-08-20 22:47:12 +00:00
|
|
|
{
|
1999-09-09 06:18:40 +00:00
|
|
|
messageView.viewType = viewShowUnread;
|
|
|
|
view.showThreads = false;
|
1999-08-20 22:47:12 +00:00
|
|
|
}
|
1999-05-28 19:41:31 +00:00
|
|
|
|
1999-06-23 03:02:21 +00:00
|
|
|
RefreshThreadTreeView();
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgViewAllThreadMsgs()
|
|
|
|
{
|
|
|
|
dump("MsgViewAllMessagesThreaded");
|
|
|
|
|
1999-09-09 06:18:40 +00:00
|
|
|
if(messageView)
|
1999-08-20 22:47:12 +00:00
|
|
|
{
|
1999-09-09 06:18:40 +00:00
|
|
|
view.viewType = viewShowAll;
|
|
|
|
view.showThreads = true;
|
1999-08-20 22:47:12 +00:00
|
|
|
}
|
1999-06-23 03:02:21 +00:00
|
|
|
RefreshThreadTreeView();
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgSortByDate()
|
|
|
|
{
|
|
|
|
SortThreadPane('DateColumn', 'http://home.netscape.com/NC-rdf#Date');
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgSortBySender()
|
|
|
|
{
|
|
|
|
SortThreadPane('AuthorColumn', 'http://home.netscape.com/NC-rdf#Sender');
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgSortByStatus()
|
|
|
|
{
|
|
|
|
SortThreadPane('StatusColumn', 'http://home.netscape.com/NC-rdf#Status');
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgSortBySubject()
|
|
|
|
{
|
|
|
|
SortThreadPane('SubjectColumn', 'http://home.netscape.com/NC-rdf#Subject');
|
|
|
|
}
|
|
|
|
|
1999-12-22 00:18:44 +00:00
|
|
|
function MsgSortByFlagged()
|
|
|
|
{
|
|
|
|
SortThreadPane('FlaggedButtonColumn', 'http://home.netscape.com/NC-rdf#Flagged');
|
|
|
|
}
|
|
|
|
function MsgSortByPriority()
|
|
|
|
{
|
|
|
|
SortThreadPane('PriorityColumn', 'http://home.netscape.com/NC-rdf#Priority');
|
|
|
|
}
|
|
|
|
function MsgSortBySize()
|
|
|
|
{
|
|
|
|
SortThreadPane('SizeColumn', 'http://home.netscape.com/NC-rdf#Size');
|
|
|
|
}
|
|
|
|
function MsgSortByThread()
|
|
|
|
{
|
|
|
|
ChangeThreadView()
|
|
|
|
}
|
|
|
|
function MsgSortByUnread()
|
|
|
|
{
|
|
|
|
SortThreadPane('UnreadButtonColumn', 'http://home.netscape.com/NC-rdf#TotalUnreadMessages');
|
|
|
|
}
|
|
|
|
function MsgSortByOrderReceived()
|
|
|
|
{
|
|
|
|
dump("not implemented yet.\n");
|
|
|
|
}
|
|
|
|
function MsgSortAscending()
|
|
|
|
{
|
|
|
|
dump("not implemented yet.\n");
|
|
|
|
}
|
|
|
|
function MsgSortDescending()
|
|
|
|
{
|
|
|
|
dump("not implemented yet.\n");
|
|
|
|
}
|
|
|
|
function MsgSortByRead()
|
|
|
|
{
|
|
|
|
dump("not implemented yet.\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgSortByTotal()
|
|
|
|
{
|
|
|
|
SortThreadPane('TotalColumn', 'http://home.netscape.com/NC-rdf#TotalMessages');
|
|
|
|
}
|
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgNewFolder()
|
1999-08-11 04:52:24 +00:00
|
|
|
{
|
1999-11-30 22:57:42 +00:00
|
|
|
var windowTitle = Bundle.GetStringFromName("newFolderDialogTitle");
|
|
|
|
MsgNewSubfolder("chrome://messenger/content/newFolderNameDialog.xul",windowTitle);
|
1999-09-18 00:40:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgSubscribe()
|
|
|
|
{
|
1999-11-30 22:57:42 +00:00
|
|
|
var windowTitle = Bundle.GetStringFromName("subscribeDialogTitle");
|
|
|
|
MsgNewSubfolder("chrome://messenger/content/subscribeDialog.xul", windowTitle);
|
1999-09-18 00:40:03 +00:00
|
|
|
}
|
|
|
|
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
function GetSelectedFolderURI()
|
1999-09-18 00:40:03 +00:00
|
|
|
{
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
var uri = null;
|
1999-11-30 22:57:42 +00:00
|
|
|
var selectedFolder = null;
|
1999-09-18 00:40:03 +00:00
|
|
|
try {
|
|
|
|
var folderTree = GetFolderTree();
|
|
|
|
var selectedFolderList = folderTree.selectedItems;
|
|
|
|
|
1999-11-30 22:57:42 +00:00
|
|
|
// you can only select one folder / server to add new folder / subscribe to
|
|
|
|
if (selectedFolderList.length == 1) {
|
|
|
|
selectedFolder = selectedFolderList[0];
|
1999-09-18 00:40:03 +00:00
|
|
|
}
|
1999-11-30 22:57:42 +00:00
|
|
|
else {
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
//dump("number of selected folder was " + selectedFolderList.length + "\n");
|
1999-11-30 22:57:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (ex) {
|
1999-11-30 23:15:27 +00:00
|
|
|
// dump("failed to get the selected folder\n");
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
uri = null;
|
1999-11-30 22:57:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
if (selectedFolder) {
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
uri = selectedFolder.getAttribute('id');
|
1999-09-18 00:40:03 +00:00
|
|
|
// dump("folder to preselect: " + preselectedURI + "\n");
|
1999-11-30 22:57:42 +00:00
|
|
|
}
|
1999-09-18 00:40:03 +00:00
|
|
|
}
|
|
|
|
catch (ex) {
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
uri = null;
|
1999-09-18 00:40:03 +00:00
|
|
|
}
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
|
|
|
|
return uri;
|
1999-08-11 04:52:24 +00:00
|
|
|
}
|
|
|
|
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
function MsgNewSubfolder(chromeWindowURL,windowTitle)
|
1999-05-28 19:41:31 +00:00
|
|
|
{
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
var preselectedURI = GetSelectedFolderURI();
|
|
|
|
dump("preselectedURI = " + preselectedURI + "\n");
|
|
|
|
var dialog = window.openDialog(
|
|
|
|
chromeWindowURL,
|
|
|
|
"",
|
|
|
|
"chrome,modal",
|
|
|
|
{preselectedURI:preselectedURI, title:windowTitle,
|
|
|
|
okCallback:NewFolder});
|
|
|
|
}
|
1999-05-28 19:41:31 +00:00
|
|
|
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
function NewFolder(name,uri)
|
|
|
|
{
|
|
|
|
var tree = GetFolderTree();
|
|
|
|
dump("uri,name = " + uri + "," + name + "\n");
|
|
|
|
if (uri && (uri != "") && name && (name != "")) {
|
|
|
|
var selectedFolder = GetResourceFromUri(uri);
|
|
|
|
dump("selectedFolder = " + selectedFolder + "\n");
|
|
|
|
messenger.NewFolder(tree.database, selectedFolder, name);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
dump("no name or nothing selected\n");
|
|
|
|
}
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
1999-08-11 03:37:06 +00:00
|
|
|
|
1999-09-15 04:40:34 +00:00
|
|
|
function MsgAccountManager()
|
|
|
|
{
|
|
|
|
var result = {refresh: false};
|
|
|
|
window.openDialog("chrome://messenger/content/AccountManager.xul",
|
|
|
|
"AccountManager", "chrome,modal", result);
|
|
|
|
if (result.refresh)
|
|
|
|
refreshFolderPane();
|
|
|
|
}
|
|
|
|
|
1999-06-25 09:44:39 +00:00
|
|
|
function MsgAccountWizard()
|
|
|
|
{
|
1999-09-15 04:40:34 +00:00
|
|
|
var result = {refresh: false};
|
|
|
|
window.openDialog("chrome://messenger/content/AccountWizard.xul",
|
|
|
|
"AccountWizard", "chrome,modal", result);
|
|
|
|
if(result.refresh)
|
|
|
|
refreshFolderPane();
|
|
|
|
}
|
|
|
|
|
|
|
|
// refresh the folder tree by rerooting it
|
|
|
|
// hack until the account manager can tell RDF that new accounts
|
|
|
|
// have been created.
|
|
|
|
function refreshFolderPane()
|
|
|
|
{
|
|
|
|
var folderTree = GetFolderTree();
|
|
|
|
if (folderTree) {
|
1999-09-23 03:01:17 +00:00
|
|
|
folderTree.clearItemSelection();
|
1999-09-15 04:40:34 +00:00
|
|
|
var root = folderTree.getAttribute('ref');
|
|
|
|
folderTree.setAttribute('ref', root);
|
|
|
|
}
|
1999-06-25 09:44:39 +00:00
|
|
|
}
|
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgOpenAttachment() {}
|
1999-09-03 02:26:58 +00:00
|
|
|
|
|
|
|
function MsgSaveAsFile()
|
|
|
|
{
|
|
|
|
dump("\MsgSaveAsFile from XUL\n");
|
|
|
|
var tree = GetThreadTree();
|
|
|
|
//get the selected elements
|
|
|
|
var messageList = tree.selectedItems;
|
|
|
|
if (messageList && messageList.length == 1)
|
|
|
|
{
|
|
|
|
var uri = messageList[0].getAttribute('id');
|
|
|
|
dump (uri);
|
|
|
|
if (uri)
|
1999-11-23 22:19:48 +00:00
|
|
|
messenger.saveAs(uri, true, null);
|
1999-09-03 02:26:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgSaveAsTemplate()
|
|
|
|
{
|
|
|
|
dump("\MsgSaveAsTemplate from XUL\n");
|
|
|
|
var tree = GetThreadTree();
|
|
|
|
//get the selected elements
|
|
|
|
var messageList = tree.selectedItems;
|
|
|
|
if (messageList && messageList.length == 1)
|
|
|
|
{
|
|
|
|
var uri = messageList[0].getAttribute('id');
|
1999-11-23 22:19:48 +00:00
|
|
|
// dump (uri);
|
1999-09-03 02:26:58 +00:00
|
|
|
if (uri)
|
1999-11-23 22:19:48 +00:00
|
|
|
{
|
|
|
|
var folderTree = GetFolderTree();
|
|
|
|
var identity = null;
|
|
|
|
var selectedFolderList = folderTree.selectedItems;
|
|
|
|
if(selectedFolderList.length > 0)
|
|
|
|
{
|
|
|
|
var selectedFolder = selectedFolderList[0];
|
|
|
|
var folderUri = selectedFolder.getAttribute('id');
|
|
|
|
// dump("selectedFolder uri = " + uri + "\n");
|
|
|
|
|
|
|
|
// get the incoming server associated with this folder uri
|
|
|
|
var server = FindIncomingServer(folderUri);
|
|
|
|
// dump("server = " + server + "\n");
|
|
|
|
// get the identity associated with this server
|
|
|
|
var identities = accountManager.GetIdentitiesForServer(server);
|
|
|
|
// dump("identities = " + identities + "\n");
|
|
|
|
// just get the first one
|
|
|
|
if (identities.Count() > 0 ) {
|
|
|
|
identity = identities.GetElementAt(0).QueryInterface(Components.interfaces.nsIMsgIdentity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
messenger.saveAs(uri, false, identity);
|
|
|
|
}
|
1999-09-03 02:26:58 +00:00
|
|
|
}
|
|
|
|
}
|
1999-06-11 22:11:32 +00:00
|
|
|
function MsgSendUnsentMsg()
|
|
|
|
{
|
|
|
|
messenger.SendUnsentMessages();
|
|
|
|
}
|
1999-07-31 19:59:35 +00:00
|
|
|
function MsgLoadFirstDraft()
|
|
|
|
{
|
|
|
|
messenger.LoadFirstDraft();
|
|
|
|
}
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgUpdateMsgCount() {}
|
1999-08-11 04:52:24 +00:00
|
|
|
|
|
|
|
function MsgRenameFolder()
|
|
|
|
{
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
var preselectedURI = GetSelectedFolderURI();
|
|
|
|
dump("preselectedURI = " + preselectedURI + "\n");
|
|
|
|
var windowTitle = Bundle.GetStringFromName("renameFolderDialogTitle");
|
|
|
|
var dialog = window.openDialog(
|
|
|
|
"chrome://messenger/content/renameFolderNameDialog.xul",
|
1999-09-15 05:16:00 +00:00
|
|
|
"newFolder",
|
|
|
|
"chrome,modal",
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
{preselectedURI:preselectedURI, title:windowTitle,
|
|
|
|
okCallback:RenameFolder});
|
1999-08-11 04:52:24 +00:00
|
|
|
}
|
|
|
|
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
function RenameFolder(name,uri)
|
1999-08-11 04:52:24 +00:00
|
|
|
{
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
dump("uri,name = " + uri + "," + name + "\n");
|
1999-08-11 04:52:24 +00:00
|
|
|
var tree = GetFolderTree();
|
|
|
|
if (tree)
|
|
|
|
{
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
if (uri && (uri != "") && name && (name != "")) {
|
|
|
|
var selectedFolder = GetResourceFromUri(uri);
|
1999-11-19 14:34:55 +00:00
|
|
|
tree.clearItemSelection();
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
messenger.RenameFolder(tree.database, selectedFolder, name);
|
1999-08-11 04:52:24 +00:00
|
|
|
}
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
else {
|
|
|
|
dump("no name or nothing selected\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
dump("no tree\n");
|
1999-08-11 04:52:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-08-06 18:22:05 +00:00
|
|
|
function MsgEmptyTrash()
|
|
|
|
{
|
|
|
|
var tree = GetFolderTree();
|
|
|
|
if (tree)
|
|
|
|
{
|
1999-08-23 02:58:28 +00:00
|
|
|
var folderList = tree.selectedItems;
|
1999-08-06 18:22:05 +00:00
|
|
|
if (folderList)
|
|
|
|
{
|
|
|
|
var folder;
|
|
|
|
folder = folderList[0];
|
|
|
|
if (folder)
|
1999-08-09 19:51:07 +00:00
|
|
|
{
|
1999-12-03 05:59:57 +00:00
|
|
|
var trashUri = GetSelectTrashUri(folder);
|
|
|
|
if (trashUri)
|
|
|
|
{
|
|
|
|
var trashElement = document.getElementById(trashUri);
|
|
|
|
if (trashElement)
|
|
|
|
{
|
|
|
|
dump ('found trash folder\n');
|
|
|
|
trashElement.setAttribute('open','');
|
|
|
|
}
|
|
|
|
}
|
1999-08-09 19:51:07 +00:00
|
|
|
if(IsSpecialFolderSelected('Trash'))
|
|
|
|
{
|
1999-12-03 05:59:57 +00:00
|
|
|
tree.clearItemSelection();
|
|
|
|
RefreshThreadTreeView();
|
1999-08-09 19:51:07 +00:00
|
|
|
}
|
1999-12-18 00:48:25 +00:00
|
|
|
messenger.EmptyTrash(tree.database, folder.resource);
|
1999-08-09 19:51:07 +00:00
|
|
|
}
|
1999-08-06 18:22:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
1999-08-11 04:52:24 +00:00
|
|
|
|
1999-08-06 13:35:11 +00:00
|
|
|
function MsgCompactFolder()
|
|
|
|
{
|
|
|
|
//get the selected elements
|
|
|
|
var tree = GetFolderTree();
|
1999-08-06 18:22:05 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
1999-08-23 02:58:28 +00:00
|
|
|
var folderList = tree.selectedItems;
|
1999-08-06 18:22:05 +00:00
|
|
|
if (folderList)
|
|
|
|
{
|
|
|
|
var i;
|
|
|
|
var folder;
|
|
|
|
for(i = 0; i < folderList.length; i++)
|
|
|
|
{
|
|
|
|
folder = folderList[i];
|
|
|
|
if (folder)
|
|
|
|
{
|
|
|
|
folderuri = folder.getAttribute('id');
|
|
|
|
dump(folderuri);
|
|
|
|
dump("folder = " + folder.nodeName + "\n");
|
1999-12-18 00:48:25 +00:00
|
|
|
messenger.CompactFolder(tree.database, folder.resource);
|
1999-08-06 18:22:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
1999-08-06 13:35:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgImport() {}
|
|
|
|
function MsgWorkOffline() {}
|
|
|
|
function MsgSynchronize() {}
|
|
|
|
function MsgGetSelectedMsg() {}
|
|
|
|
function MsgGetFlaggedMsg() {}
|
1999-06-08 22:15:58 +00:00
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgSelectThread() {}
|
|
|
|
function MsgSelectFlaggedMsg() {}
|
|
|
|
function MsgFind() {}
|
|
|
|
function MsgFindAgain() {}
|
1999-06-15 00:49:23 +00:00
|
|
|
|
|
|
|
function MsgSearchMessages() {
|
|
|
|
window.openDialog("chrome://messenger/content/SearchDialog.xul", "SearchMail", "chrome");
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgFilters() {
|
|
|
|
window.openDialog("chrome://messenger/content/FilterListDialog.xul", "FilterDialog", "chrome");
|
|
|
|
}
|
|
|
|
|
1999-09-14 06:28:05 +00:00
|
|
|
function MsgToggleMessagePane()
|
|
|
|
{
|
|
|
|
MsgToggleSplitter("messagePaneSplitter");
|
|
|
|
}
|
|
|
|
|
1999-09-21 06:17:00 +00:00
|
|
|
function MsgToggleFolderPane()
|
|
|
|
{
|
|
|
|
MsgToggleSplitter("sidebarsplitter");
|
|
|
|
}
|
|
|
|
|
1999-09-14 06:28:05 +00:00
|
|
|
function MsgToggleSplitter(id)
|
|
|
|
{
|
1999-09-21 06:17:00 +00:00
|
|
|
var splitter = document.getElementById(id);
|
|
|
|
var state = splitter.getAttribute("state");
|
1999-09-14 06:28:05 +00:00
|
|
|
if (state == "collapsed")
|
1999-09-21 06:17:00 +00:00
|
|
|
splitter.setAttribute("state", null);
|
1999-09-14 06:28:05 +00:00
|
|
|
else
|
1999-09-21 06:17:00 +00:00
|
|
|
splitter.setAttribute("state", "collapsed")
|
1999-09-14 06:28:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgShowFolders()
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
1999-06-15 00:49:23 +00:00
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgFolderProperties() {}
|
|
|
|
|
|
|
|
function MsgShowLocationbar() {}
|
|
|
|
function MsgViewThreadsUnread() {}
|
|
|
|
function MsgViewWatchedThreadsUnread() {}
|
|
|
|
function MsgViewIgnoreThread() {}
|
1999-12-22 00:18:44 +00:00
|
|
|
|
|
|
|
function MsgViewAllHeaders()
|
|
|
|
{
|
|
|
|
prefs.SetIntPref("mail.show_headers",2);
|
1999-12-24 01:08:05 +00:00
|
|
|
MsgReload();
|
|
|
|
return true;
|
1999-12-22 00:18:44 +00:00
|
|
|
}
|
|
|
|
function MsgViewNormalHeaders()
|
|
|
|
{
|
|
|
|
prefs.SetIntPref("mail.show_headers",1);
|
1999-12-24 01:08:05 +00:00
|
|
|
MsgReload();
|
|
|
|
return true;
|
1999-12-22 00:18:44 +00:00
|
|
|
}
|
|
|
|
function MsgViewBriefHeaders()
|
|
|
|
{
|
|
|
|
prefs.SetIntPref("mail.show_headers",0);
|
1999-12-24 01:08:05 +00:00
|
|
|
MsgReload();
|
|
|
|
return true;
|
1999-12-22 00:18:44 +00:00
|
|
|
}
|
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgViewAttachInline() {}
|
|
|
|
function MsgWrapLongLines() {}
|
|
|
|
function MsgIncreaseFont() {}
|
|
|
|
function MsgDecreaseFont() {}
|
1999-12-22 00:18:44 +00:00
|
|
|
|
|
|
|
function MsgReload()
|
|
|
|
{
|
|
|
|
ThreadPaneSelectionChange()
|
|
|
|
}
|
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgShowImages() {}
|
|
|
|
function MsgRefresh() {}
|
|
|
|
function MsgViewPageSource() {}
|
|
|
|
function MsgViewPageInfo() {}
|
|
|
|
function MsgFirstUnreadMessage() {}
|
|
|
|
function MsgFirstFlaggedMessage() {}
|
1999-09-22 03:32:18 +00:00
|
|
|
|
|
|
|
function MsgStop() {
|
1999-10-29 04:39:06 +00:00
|
|
|
StopUrls();
|
1999-09-22 03:32:18 +00:00
|
|
|
}
|
|
|
|
|
1999-08-02 23:58:09 +00:00
|
|
|
function MsgNextMessage()
|
|
|
|
{
|
2000-01-05 00:56:27 +00:00
|
|
|
GoNextMessage(GoMessage, ResourceGoMessage, null, false);
|
1999-08-02 23:58:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgNextUnreadMessage()
|
|
|
|
{
|
2000-01-05 00:56:27 +00:00
|
|
|
GoNextMessage(GoUnreadMessage, ResourceGoUnreadMessage, GoUnreadThread, true);
|
1999-08-02 23:58:09 +00:00
|
|
|
}
|
1999-08-30 22:13:45 +00:00
|
|
|
function MsgNextFlaggedMessage()
|
|
|
|
{
|
2000-01-05 00:56:27 +00:00
|
|
|
GoNextMessage(GoFlaggedMessage, ResourceGoFlaggedMessage, null, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgNextUnreadThread()
|
|
|
|
{
|
|
|
|
GoNextThread(GoUnreadThread, GoUnreadMessage, ResourceGoUnreadMessage, true, true);
|
1999-08-30 22:13:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgPreviousMessage()
|
|
|
|
{
|
|
|
|
GoPreviousMessage(GoMessage, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgPreviousUnreadMessage()
|
|
|
|
{
|
|
|
|
GoPreviousMessage(GoUnreadMessage, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
function MsgPreviousFlaggedMessage()
|
|
|
|
{
|
|
|
|
GoPreviousMessage(GoFlaggedMessage, true);
|
|
|
|
}
|
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgGoBack() {}
|
|
|
|
function MsgGoForward() {}
|
|
|
|
function MsgEditMessageAsNew() {}
|
|
|
|
function MsgAddSenderToAddressBook() {}
|
|
|
|
function MsgAddAllToAddressBook() {}
|
|
|
|
|
|
|
|
function MsgMarkMsgAsRead(markRead)
|
|
|
|
{
|
|
|
|
dump("\MsgMarkMsgAsRead from XUL\n");
|
1999-06-23 03:02:21 +00:00
|
|
|
var tree = GetThreadTree();
|
1999-06-08 00:26:29 +00:00
|
|
|
//get the selected elements
|
1999-12-18 00:48:25 +00:00
|
|
|
var messageList = ConvertDOMListToResourceArray(tree.selectedItems);
|
1999-06-08 00:26:29 +00:00
|
|
|
messenger.MarkMessagesRead(tree.database, messageList, markRead);
|
1999-05-28 19:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function MsgMarkThreadAsRead() {}
|
|
|
|
function MsgMarkByDate() {}
|
1999-07-24 21:10:53 +00:00
|
|
|
function MsgMarkAllRead()
|
|
|
|
{
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
var folderTree = GetFolderTree();
|
1999-08-23 02:58:28 +00:00
|
|
|
var selectedFolderList = folderTree.selectedItems;
|
1999-07-24 21:10:53 +00:00
|
|
|
if(selectedFolderList.length > 0)
|
|
|
|
{
|
|
|
|
var selectedFolder = selectedFolderList[0];
|
1999-12-18 00:48:25 +00:00
|
|
|
messenger.MarkAllMessagesRead(folderTree.database, selectedFolder.resource);
|
1999-07-24 21:10:53 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
dump("Nothing was selected\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-08-24 21:48:44 +00:00
|
|
|
function MsgMarkAsFlagged(markFlagged)
|
|
|
|
{
|
|
|
|
dump("\MsgMarkMsgAsFlagged from XUL\n");
|
|
|
|
var tree = GetThreadTree();
|
|
|
|
//get the selected elements
|
1999-12-18 00:48:25 +00:00
|
|
|
var messageList = ConvertDOMListToResourceArray(tree.selectedItems);
|
1999-08-24 21:48:44 +00:00
|
|
|
messenger.MarkMessagesFlagged(tree.database, messageList, markFlagged);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
1999-05-28 19:41:31 +00:00
|
|
|
function MsgIgnoreThread() {}
|
|
|
|
function MsgWatchThread() {}
|
1999-07-31 18:19:54 +00:00
|
|
|
|
1999-09-15 08:39:28 +00:00
|
|
|
var gStatusObserver;
|
1999-08-01 18:39:04 +00:00
|
|
|
var bindCount = 0;
|
|
|
|
function onStatus() {
|
1999-09-15 08:39:28 +00:00
|
|
|
if (!gStatusObserver)
|
|
|
|
gStatusObserver = document.getElementById("Messenger:Status");
|
|
|
|
if ( gStatusObserver ) {
|
|
|
|
var text = gStatusObserver.getAttribute("value");
|
1999-08-01 18:39:04 +00:00
|
|
|
if ( text == "" ) {
|
|
|
|
text = defaultStatus;
|
|
|
|
}
|
|
|
|
var statusText = document.getElementById("statusText");
|
|
|
|
if ( statusText ) {
|
|
|
|
statusText.setAttribute( "value", text );
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
dump("Can't find status broadcaster!\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-09-15 08:39:28 +00:00
|
|
|
var gThrobberObserver;
|
|
|
|
var gMeterObserver;
|
1999-07-31 18:19:54 +00:00
|
|
|
var startTime = 0;
|
|
|
|
function onProgress() {
|
1999-09-15 08:39:28 +00:00
|
|
|
if (!gThrobberObserver)
|
|
|
|
gThrobberObserver = document.getElementById("Messenger:Throbber");
|
|
|
|
if (!gMeterObserver)
|
|
|
|
gMeterObserver = document.getElementById("Messenger:LoadingProgress");
|
|
|
|
if ( gThrobberObserver && gMeterObserver ) {
|
|
|
|
var busy = gThrobberObserver.getAttribute("busy");
|
|
|
|
var wasBusy = gMeterObserver.getAttribute("mode") == "undetermined" ? "true" : "false";
|
1999-07-31 18:19:54 +00:00
|
|
|
if ( busy == "true" ) {
|
|
|
|
if ( wasBusy == "false" ) {
|
|
|
|
// Remember when loading commenced.
|
|
|
|
startTime = (new Date()).getTime();
|
|
|
|
// Turn progress meter on.
|
1999-09-15 08:39:28 +00:00
|
|
|
gMeterObserver.setAttribute("mode","undetermined");
|
1999-07-31 18:19:54 +00:00
|
|
|
}
|
|
|
|
// Update status bar.
|
|
|
|
} else if ( busy == "false" && wasBusy == "true" ) {
|
|
|
|
// Record page loading time.
|
1999-09-15 08:39:28 +00:00
|
|
|
if (!gStatusObserver)
|
|
|
|
gStatusObserver = document.getElementById("Messenger:Status");
|
|
|
|
if ( gStatusObserver ) {
|
1999-07-31 18:19:54 +00:00
|
|
|
var elapsed = ( (new Date()).getTime() - startTime ) / 1000;
|
|
|
|
var msg = "Document: Done (" + elapsed + " secs)";
|
|
|
|
dump( msg + "\n" );
|
1999-09-15 08:39:28 +00:00
|
|
|
gStatusObserver.setAttribute("value",msg);
|
1999-07-31 18:19:54 +00:00
|
|
|
defaultStatus = msg;
|
|
|
|
}
|
|
|
|
// Turn progress meter off.
|
1999-09-15 08:39:28 +00:00
|
|
|
gMeterObserver.setAttribute("mode","normal");
|
1999-07-31 18:19:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function dumpProgress() {
|
|
|
|
var broadcaster = document.getElementById("Messenger:LoadingProgress");
|
1999-09-15 08:39:28 +00:00
|
|
|
|
1999-07-31 18:19:54 +00:00
|
|
|
dump( "bindCount=" + bindCount + "\n" );
|
|
|
|
dump( "broadcaster mode=" + broadcaster.getAttribute("mode") + "\n" );
|
|
|
|
dump( "broadcaster value=" + broadcaster.getAttribute("value") + "\n" );
|
|
|
|
dump( "meter mode=" + meter.getAttribute("mode") + "\n" );
|
|
|
|
dump( "meter value=" + meter.getAttribute("value") + "\n" );
|
|
|
|
}
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
function GetMsgFolderFromUri(uri)
|
|
|
|
{
|
1999-12-24 08:57:54 +00:00
|
|
|
//dump("GetMsgFolderFromUri of " + uri + "\n");
|
1999-12-04 01:43:12 +00:00
|
|
|
try {
|
|
|
|
var resource = GetResourceFromUri(uri);
|
|
|
|
var msgfolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
|
|
|
return msgfolder;
|
|
|
|
}
|
|
|
|
catch (ex) {
|
1999-12-24 08:57:54 +00:00
|
|
|
//dump("failed to get the folder resource\n");
|
1999-12-04 01:43:12 +00:00
|
|
|
}
|
|
|
|
return null;
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 08:10:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function GetResourceFromUri(uri)
|
|
|
|
{
|
|
|
|
var RDF = Components.classes['component://netscape/rdf/rdf-service'].getService();
|
|
|
|
RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);
|
|
|
|
var resource = RDF.GetResource(uri);
|
|
|
|
|
|
|
|
return resource;
|
|
|
|
}
|