merge of '0b02f6196103152cfd231e8681b65ad2464d90e6'
and '4b75d0f2673a649962c631fea2213e8dbf33a7b1' Monotone-Parent: 0b02f6196103152cfd231e8681b65ad2464d90e6 Monotone-Parent: 4b75d0f2673a649962c631fea2213e8dbf33a7b1 Monotone-Revision: 848b310c090a03db48d0571c275639c9b9b49c9f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-08-19T19:22:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
d96c9f09ba
18
ChangeLog
18
ChangeLog
|
@ -1,5 +1,23 @@
|
||||||
2010-08-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2010-08-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* SoObjects/Mailer/SOGoMailFolder.m (-deleteUIDs:inContext:): make
|
||||||
|
the use of the "result" variable clearer by declaring it with a
|
||||||
|
proper class name and avoiding type confusion within the code.
|
||||||
|
|
||||||
|
* UI/WebServerResources/MailerUI.js: (initDnd): removed useless
|
||||||
|
method.
|
||||||
|
(onMessageListPrepareVisibility): fixed a bug where the current
|
||||||
|
mailbox name would be attemptedly taken from the menu target,
|
||||||
|
while it really should have been deduced from
|
||||||
|
"Mailer.currentMailbox".
|
||||||
|
(configureDraggables): we now take all label nodes under
|
||||||
|
"#mailboxTree" into account and accept them as droppable when they
|
||||||
|
are not an account node. Also, we associate an account tag with
|
||||||
|
all of them.
|
||||||
|
(startDragging): we set the drag classname of the drag handle to
|
||||||
|
the correct account tag, to avoid visual feedback when hovering
|
||||||
|
mailboxes from another account.
|
||||||
|
|
||||||
* UI/WebServerResources/UIxReminderEditor.js
|
* UI/WebServerResources/UIxReminderEditor.js
|
||||||
(initialiseFormValues): added code to configure the "actionList"
|
(initialiseFormValues): added code to configure the "actionList"
|
||||||
if present (email alarms enabled).
|
if present (email alarms enabled).
|
||||||
|
|
|
@ -271,7 +271,7 @@ static NSString *defaultUserID = @"anyone";
|
||||||
NGImap4Client *client;
|
NGImap4Client *client;
|
||||||
NSString *folderName;
|
NSString *folderName;
|
||||||
NSException *error;
|
NSException *error;
|
||||||
id result;
|
NSString *result;
|
||||||
BOOL b;
|
BOOL b;
|
||||||
|
|
||||||
trashFolder = [[self mailAccountFolder] trashFolderInContext: localContext];
|
trashFolder = [[self mailAccountFolder] trashFolderInContext: localContext];
|
||||||
|
@ -296,19 +296,21 @@ static NSString *defaultUserID = @"anyone";
|
||||||
objectForKey: @"result"];
|
objectForKey: @"result"];
|
||||||
|
|
||||||
if (![result boolValue])
|
if (![result boolValue])
|
||||||
result = [[self imap4Connection] createMailbox: folderName atURL: [[self mailAccountFolder] imap4URL]];
|
[[self imap4Connection] createMailbox: folderName
|
||||||
|
atURL: [[self mailAccountFolder] imap4URL]];
|
||||||
|
|
||||||
if (!result || [result boolValue])
|
result = [[client copyUids: uids toFolder: folderName]
|
||||||
result = [client copyUids: uids toFolder: folderName];
|
objectForKey: @"result"];
|
||||||
|
|
||||||
b = [[result valueForKey: @"result"] boolValue];
|
b = [result boolValue];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
result = [client storeFlags: [NSArray arrayWithObject: @"Deleted"]
|
result = [[client storeFlags: [NSArray arrayWithObject: @"Deleted"]
|
||||||
forUIDs: uids addOrRemove: YES];
|
forUIDs: uids addOrRemove: YES]
|
||||||
if ([[result valueForKey: @"result"] boolValue])
|
objectForKey: @"result"];
|
||||||
|
if ([result boolValue])
|
||||||
{
|
{
|
||||||
[self markForExpunge];
|
[self markForExpunge];
|
||||||
[trashFolder flushMailCaches];
|
[trashFolder flushMailCaches];
|
||||||
|
|
|
@ -1635,32 +1635,6 @@ function onWindowResize(event) {
|
||||||
handle.adjust();
|
handle.adjust();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dnd */
|
|
||||||
function initDnd() {
|
|
||||||
// log("MailerUI initDnd");
|
|
||||||
|
|
||||||
var tree = $("mailboxTree");
|
|
||||||
if (tree) {
|
|
||||||
var images = tree.getElementsByTagName("img");
|
|
||||||
for (var i = 0; i < images.length; i++) {
|
|
||||||
if (images[i].id[0] == 'j') {
|
|
||||||
images[i].dndAcceptType = mailboxSpanAcceptType;
|
|
||||||
images[i].dndEnter = plusSignEnter;
|
|
||||||
images[i].dndExit = plusSignExit;
|
|
||||||
document.DNDManager.registerDestination(images[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var nodes = document.getElementsByClassName("nodeName", tree);
|
|
||||||
for (var i = 0; i < nodes.length; i++) {
|
|
||||||
nodes[i].dndAcceptType = mailboxSpanAcceptType;
|
|
||||||
nodes[i].dndEnter = mailboxSpanEnter;
|
|
||||||
nodes[i].dndExit = mailboxSpanExit;
|
|
||||||
nodes[i].dndDrop = mailboxSpanDrop;
|
|
||||||
document.DNDManager.registerDestination(nodes[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* stub */
|
/* stub */
|
||||||
|
|
||||||
function refreshContacts() {
|
function refreshContacts() {
|
||||||
|
@ -1688,8 +1662,6 @@ function initMailer(event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$(document.body).hasClassName("popup")) {
|
if (!$(document.body).hasClassName("popup")) {
|
||||||
//initDnd();
|
|
||||||
|
|
||||||
Mailer.dataTable = $("mailboxList");
|
Mailer.dataTable = $("mailboxList");
|
||||||
Mailer.dataTable.addInterface(SOGoDataTableInterface);
|
Mailer.dataTable.addInterface(SOGoDataTableInterface);
|
||||||
Mailer.dataTable.setRowRenderCallback(messageListCallback);
|
Mailer.dataTable.setRowRenderCallback(messageListCallback);
|
||||||
|
@ -2280,7 +2252,7 @@ function onMessageListMenuPrepareVisibility() {
|
||||||
"messagesListMenu": 2,
|
"messagesListMenu": 2,
|
||||||
"messageContentMenu": 4 };
|
"messageContentMenu": 4 };
|
||||||
if (document.menuTarget) {
|
if (document.menuTarget) {
|
||||||
var mbx = document.menuTarget.getAttribute("dataname");
|
var mbx = Mailer.currentMailbox;
|
||||||
if (mbx) {
|
if (mbx) {
|
||||||
var lis = this.getElementsByTagName("li");
|
var lis = this.getElementsByTagName("li");
|
||||||
var idx = indexes[this.id];
|
var idx = indexes[this.id];
|
||||||
|
@ -2533,33 +2505,47 @@ function configureDraggables () {
|
||||||
|
|
||||||
new Draggable ("dragDropVisual",
|
new Draggable ("dragDropVisual",
|
||||||
{ handle: "messageListBody",
|
{ handle: "messageListBody",
|
||||||
onStart: startDragging,
|
onStart: startDragging,
|
||||||
onEnd: stopDragging,
|
onEnd: stopDragging,
|
||||||
onDrag: whileDragging,
|
onDrag: whileDragging,
|
||||||
scroll: "folderTreeContent" });
|
scroll: "folderTreeContent" });
|
||||||
}
|
}
|
||||||
|
|
||||||
function configureDroppables () {
|
function configureDroppables() {
|
||||||
var drops = $$("div#dmailboxTree1 div.dTreeNode a.node span.nodeName");
|
var drops = $$("div#mailboxTree div.dTreeNode a.node span.nodeName");
|
||||||
|
|
||||||
Droppables.empty ();
|
Droppables.empty ();
|
||||||
drops.each(function (drop) {
|
drops.each(function (drop) {
|
||||||
drop.identify();
|
var dataname = drop.parentNode.parentNode.getAttribute("dataname");
|
||||||
Droppables.add(drop.id,
|
var acceptClass = "account";
|
||||||
{ hoverclass: "genericHoverClass",
|
if (dataname.length > 0) {
|
||||||
onDrop: dropAction });
|
var parts = dataname.split("/");
|
||||||
|
acceptClass += parts[1];
|
||||||
|
}
|
||||||
|
var parent = drop.parentNode.parentNode;
|
||||||
|
if (parent.getAttribute("datatype") != "account") {
|
||||||
|
drop.identify();
|
||||||
|
Droppables.add(drop.id,
|
||||||
|
{ hoverclass: "genericHoverClass",
|
||||||
|
accept: [ acceptClass ],
|
||||||
|
onDrop: dropAction });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function startDragging (itm, e) {
|
function startDragging (itm, e) {
|
||||||
var target = Event.element(e);
|
var target = Event.element(e);
|
||||||
if (target.up('TBODY') == undefined)
|
if (target.up('TBODY') == undefined)
|
||||||
return false;
|
return;
|
||||||
|
|
||||||
var handle = $("dragDropVisual");
|
var handle = $("dragDropVisual");
|
||||||
var count = $("messageListBody").getSelectedRowsId().length;
|
var count = $("messageListBody").getSelectedRowsId().length;
|
||||||
|
|
||||||
handle.update (count);
|
handle.update (count);
|
||||||
|
if (Mailer.currentMailbox) {
|
||||||
|
var parts = Mailer.currentMailbox.split("/");
|
||||||
|
handle.addClassName("account" + parts[1]);
|
||||||
|
}
|
||||||
if (e.shiftKey) {
|
if (e.shiftKey) {
|
||||||
handle.addClassName("copy");
|
handle.addClassName("copy");
|
||||||
}
|
}
|
||||||
|
@ -2581,6 +2567,9 @@ function stopDragging () {
|
||||||
handle.hide();
|
handle.hide();
|
||||||
if (handle.hasClassName("copy"))
|
if (handle.hasClassName("copy"))
|
||||||
handle.removeClassName("copy");
|
handle.removeClassName("copy");
|
||||||
|
for (var i = 0; i < accounts.length; i++) {
|
||||||
|
handle.removeClassName("account" + i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function dropAction (dropped, zone, e) {
|
function dropAction (dropped, zone, e) {
|
||||||
|
|
|
@ -848,7 +848,7 @@ function popupSubmenu(event) {
|
||||||
parentNode.submenu = submenuNode;
|
parentNode.submenu = submenuNode;
|
||||||
|
|
||||||
if (submenuNode.prepareVisibility)
|
if (submenuNode.prepareVisibility)
|
||||||
submenuNode.prepareVisibility();
|
submenuNode.prepareVisibility.apply(submenuNode, []);
|
||||||
|
|
||||||
var menuTop = (parentNode.offsetTop - 1
|
var menuTop = (parentNode.offsetTop - 1
|
||||||
+ this.offsetTop);
|
+ this.offsetTop);
|
||||||
|
|
Loading…
Reference in a new issue