From 5781da6200402f60b6db3a4a1cdc27d92b8acde6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Solard?= Date: Wed, 30 Jul 2014 16:52:23 +0200 Subject: [PATCH] Important change of JS relative to ui-resizable --- .../webmail/static/webmail/js/webmail.js | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/modoboa/extensions/webmail/static/webmail/js/webmail.js b/modoboa/extensions/webmail/static/webmail/js/webmail.js index fc7b468f4..803295fa5 100644 --- a/modoboa/extensions/webmail/static/webmail/js/webmail.js +++ b/modoboa/extensions/webmail/static/webmail/js/webmail.js @@ -36,13 +36,20 @@ Webmail.prototype = { }); this.record_unseen_messages(); - $("#folders").css({ - bottom: $("#bottom-bar").outerHeight(true), - width: this.options.mboxes_col_width + 'px' - }); + $("#mboxactions").css({ bottom: $("#bottom-bar").outerHeight(true) + 10 }); + if ($( window ).width()>1198){ + $("#folders").css({ + bottom: $("#bottom-bar").outerHeight(true), + width: this.options.mboxes_col_width + 'px' + }); + $("#rightcol").css({ + marginLeft: 200 + 48 + 'px' + }); + } + $("#folders").resizable({ start: function(event, ui) { $('#listing iframe').css('pointer-events','none'); @@ -54,10 +61,16 @@ Webmail.prototype = { $('#listing iframe').css('pointer-events','auto'); } }); - $("#folders").bind("resize", function(event, ui) { - if (typeof(ui.size) != "undefined") { - $("#menubar").css("left", ui.size.width + 15 + "px"); - $("#listing").css("left", ui.size.width + 15 + "px"); + + $( "#folders" ).resizable({ + resize: function(event, ui) { + if ($( window ).width()>760){ + var width = ui.size.width; + $("#rightcol").css({ + marginLeft: width + 48 + 'px', + paddingRight: width - 260 + 'px' + }); + } } }); @@ -209,9 +222,6 @@ Webmail.prototype = { } $("#listing").html(response.listing); $("#listing").css({ - top: $("#menubar").outerHeight(true) + 60 + "px", - bottom: $("#bottom-bar").outerHeight(true) + "px", - overflow: "auto" }); },