diff --git a/modoboa/extensions/webmail/static/webmail/css/webmail.css b/modoboa/extensions/webmail/static/webmail/css/webmail.css index f3b709d82..dd85f5f6b 100644 --- a/modoboa/extensions/webmail/static/webmail/css/webmail.css +++ b/modoboa/extensions/webmail/static/webmail/css/webmail.css @@ -97,7 +97,11 @@ body, html { .nav-sidebar li > a { padding-top: 7px; padding-bottom: 7px; -} +} + +.nav-sidebar li li { + margin-left: 10px; +} #mboxes_container a[name=loadfolder] { white-space: nowrap; @@ -190,14 +194,10 @@ div.expanded { background-repeat: no-repeat; } -div#leftcol #mboxes_container .nav .droppable div.clickbox{ +div#leftcol #mboxes_container .nav .droppable div.clickbox { z-index: 800; } -li.droppable li{ - margin-left: 10px; -} - /* * Compose form */ diff --git a/modoboa/extensions/webmail/static/webmail/js/webmail.js b/modoboa/extensions/webmail/static/webmail/js/webmail.js index c250ee9a2..d49de0ba8 100644 --- a/modoboa/extensions/webmail/static/webmail/js/webmail.js +++ b/modoboa/extensions/webmail/static/webmail/js/webmail.js @@ -1,5 +1,9 @@ -/* - * The javascript code that brings the webmail to life! +/** + * Creates an instance of Webmail. + * + * @constructor + * @param {Object} options - instance options + * @classdesc The javascript code that brings the webmail to life! */ var Webmail = function(options) { this.initialize(options); @@ -99,6 +103,11 @@ Webmail.prototype = { this.listen(); }, + /** + * Register navigation callbacks. + * + * @this Webmail + */ register_navcallbacks: function() { this.navobject.register_callback( "listmailbox", $.proxy(this.listmailbox_callback, this)); @@ -330,6 +339,12 @@ Webmail.prototype = { } }, + /** + * Update the current displayed content. + * + * @this Webmail + * @param {Object} response - object containing the new content + */ page_update: function(response) { var curmb = this.get_current_mailbox(); @@ -431,8 +446,11 @@ Webmail.prototype = { } }, - /* - * Inject a new *clickbox* somewhere in the tree + /** + * Inject a new *clickbox* somewhere in the tree. + * + * @this Webmail + * @param {Object} $container - box container */ inject_clickbox: function($container) { $container.prepend($("
", {'class' : 'clickbox collapsed'})); @@ -467,10 +485,12 @@ Webmail.prototype = { return $li; }, - /* + /** * Inject new mailboxes under a given parent in the tree. * - * $parent must be a
  • node. + * @this Webmail + * @param {Object} $parent - an existing
  • node. + * @param {Array} mboxes - list of mailboxes to inject */ inject_mailboxes: function($parent, mboxes) { var $ul = $("