From 59865f3259753248ce39b6a463bf954a6d84a89b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 13 Feb 2014 14:19:41 +0100 Subject: Added toolbar button to move message in message view Conflicts: CHANGELOG --- program/js/app.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index 1ef341415..eb9b9ced8 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -6670,8 +6670,9 @@ function rcube_webmail() this.element_position = function(element, obj) { var obj = $(obj), win = $(window), - width = obj.width(), - height = obj.height(), + width = obj.outerWidth(), + height = obj.outerHeight(), + menu_pos = obj.data('menu-pos'), win_height = win.height(), elem_height = $(element).height(), elem_width = $(element).width(), @@ -6679,6 +6680,13 @@ function rcube_webmail() top = pos.top, left = pos.left + width; + if (menu_pos == 'bottom') { + top += height; + left -= width; + } + else + left -= 5; + if (top + elem_height > win_height) { top -= elem_height - height; if (top < 0) -- cgit v1.2.3