summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-02-13 14:19:41 +0100
committerAleksander Machniak <alec@alec.pl>2014-02-13 14:19:41 +0100
commit5e8da2b5c9d69872d17c857e239b1e30e9c23976 (patch)
tree6eb39b96d0243d141a3bafc93ff3d3504414ad18 /program/js
parent8bbb01cb66830cd20d3264d2ec78c911c48d270c (diff)
Added toolbar button to move message in message view
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js12
1 files changed, 10 insertions, 2 deletions
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)