Here's a pretty simple patch for doing the drag over a folder thing.
The other thing it does is keeps track of whether the "folder" portion of the screen or the "mail" portion of the screen has the "focus" and changes the color accordingly.
For example if you've clicked on the Inbox folder, the folder will be colored red. If you then select a message, the Inbox folder will now be highlighted in grey and the message you've selected will be red. If you click back on to the Inbox folder, the message you've selected will turn grey and "Inbox" will turn back red.
If you go back to the message list, select a message and drag it over the folder list, the folder's will turn red as your mouse hovers over them.
I've tested this a little, but of course it could always use more testing. Please let me know your thoughts on this patch.
-Charles
--- program/js/app.js (revision 274) +++ program/js/app.js (working copy) @@ -244,7 +244,6 @@ // load body click event document.onmousedown = function(){ return rcube_webmail_client.reset_click(); }; document.onkeydown = function(e){ return rcube_webmail_client.key_pressed(e, msg_list_frame); };
// flag object as complete this.loaded = true;
@@ -285,6 +284,14 @@ } }
var s_mbox = String(this.env.mailbox).toLowerCase().replace(this.mbox_expression, '');
var mbox_li = document.getElementById('rcmbx'+s_mbox);
if (mbox_li)
this.set_classname(mbox_li, 'unfocused', true);
@@ -1161,9 +1168,10 @@ // onmouseup handler for mailboxlist item this.mbox_mouse_up = function(mbox) {
this.unfocus_mailbox(mbox);
this.command('moveto', mbox);
} else this.command('list', mbox);
return false;
@@ -1529,8 +1537,7 @@ if (this.env.search_request) add_url += '&_search='+this.env.search_request;
this.select_mailbox(mbox);
this.select_mailbox(mbox);
// load message list remotely if (this.gui_objects.messagelist)
@@ -1634,7 +1641,26 @@ return true; };
var s_mbox = String(mbox).toLowerCase().replace(this.mbox_expression, '');
var mbox_li = document.getElementById('rcmbx'+s_mbox);
if (mbox_li)
this.set_classname(mbox_li, 'selected', true);
var s_mbox = String(mbox).toLowerCase().replace(this.mbox_expression, '');
var mbox_li = document.getElementById('rcmbx'+s_mbox);
if (mbox_li)
this.set_classname(mbox_li, 'selected', false);
@@ -2199,7 +2225,6 @@ highlight.removeAttribute('id'); //highlight.removeAttribute('class'); this.set_classname(highlight, 'selected', false);
this.set_classname(highlight, 'unfocused', false);
}
if (next)
@@ -2990,7 +3015,7 @@ // mark a mailbox as selected and set environment variable this.select_mailbox = function(mbox) {
@@ -3003,8 +3028,10 @@ if (current_li) { this.set_classname(current_li, 'selected', false); this.set_classname(current_li, 'unfocused', false);
}
if (mbox_li)
}
if (mbox_li || this.env.mailbox == mbox)
this.set_classname(mbox_li, 'unfocused', false);
this.set_classname(mbox_li, 'selected', true);
}
--- program/steps/mail/func.inc (revision 274) +++ program/steps/mail/func.inc (working copy) @@ -216,6 +216,8 @@
$out .= sprintf('<li id="rcmbx%s" class="mailbox %s %s%s%s"><a href="%s&_mbox=%s"'.
' onclick="return %s.command(\'list\',\'%s\')"'.
' onmouseover="return %s.focus_mailbox(\'%s\')"' .
' onmouseout="return %s.unfocus_mailbox(\'%s\')"' .
' onmouseup="return %s.mbox_mouse_up(\'%s\')"%s>%s</a>',
$folder_css,
$class_name,
@@ -227,7 +229,12 @@ $JS_OBJECT_NAME, addslashes($folder['id']), $JS_OBJECT_NAME,
addslashes($folder['id']),
$JS_OBJECT_NAME,
addslashes($folder['id']),
$JS_OBJECT_NAME,
addslashes($folder['id']),
$title,
rep_specialchars_output($foldername, 'html', 'all'));
--- skins/default/mail.css (revision 274) +++ skins/default/mail.css (working copy) @@ -266,7 +266,7 @@
#mailboxlist li.selected {
}
@@ -276,7 +276,18 @@ font-weight: bold; }
+#mailboxlist li.unfocused +{
+}
+#mailboxlist li.unfocused a +{
+}
/* styles for nested folders */ #mailboxlist ul { list-style: none;