Expand the mailbox tree when needed.

fixes #270
This commit is contained in:
Antoine Nguyen
2012-06-20 18:03:08 +02:00
parent 504fc2d8dd
commit 8688158d58
2 changed files with 3 additions and 6 deletions
@@ -194,6 +194,9 @@ Webmail.prototype = {
var curmb = this.get_current_mailbox();
$(window).unbind("resize");
if (!$('li[name="' + curmb + '"]').hasClass("active")) {
this.load_and_select_mailbox(curmb);
}
this.enable_mb_actions();
for (var idx in this.options.ro_mboxes) {
if (curmb == this.options.ro_mboxes[idx]) {
@@ -770,12 +773,7 @@ Webmail.prototype = {
* 'listmailbox' callback
*/
listmailbox_callback: function(resp) {
var curmb = this.get_current_mailbox();
this.store_nav_params();
if (!$('li[name="' + curmb + '"]').hasClass("active")) {
this.load_and_select_mailbox(curmb);
}
this.page_update(resp);
$("#emails").htmltable();
this.htmltable = $("#emails").data("htmltable");
@@ -130,7 +130,6 @@ def print_mailboxes(tree, selected=None, withunseen=False, selectonly=False):
result += "<li name='%s' class='droppable %s'>\n" % (name, cssclass)
if mbox.has_key("sub"):
if selected is not None and selected != name and selected.count(name):
print "%s is visible" % name
ul_state = "visible"
div_state = "expanded"
else: