summaryrefslogtreecommitdiff
path: root/skins/default/functions.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-05-30 07:48:15 +0000
committeralecpl <alec@alec.pl>2010-05-30 07:48:15 +0000
commit6c9d496fcc44a1d36299fb1d107d49e53858104c (patch)
treed9f467ceeedb49b32ea641b5f9da410fd68e2257 /skins/default/functions.js
parent7ceabc8815ef27557826380d649e18942b02c814 (diff)
- 'threads' column made movable
Diffstat (limited to 'skins/default/functions.js')
-rw-r--r--skins/default/functions.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/skins/default/functions.js b/skins/default/functions.js
index e9b03a125..e1edee1e8 100644
--- a/skins/default/functions.js
+++ b/skins/default/functions.js
@@ -148,7 +148,7 @@ show_popupmenu: function(obj, refname, show, above)
{
if (typeof show == 'undefined')
show = obj.is(':visible') ? false : true;
-
+
var ref = rcube_find_object(refname);
if (show && ref) {
var pos = $(ref).offset();
@@ -214,7 +214,13 @@ show_listmenu: function(show)
var ref = rcube_find_object('listmenulink');
if (show && ref) {
- var pos = $(ref).offset();
+ var pos = $(ref).offset(),
+ menuwidth = this.listmenu.width(),
+ pagewidth = $(document).width();
+
+ if (pagewidth - pos.left < menuwidth && pos.left > menuwidth)
+ pos.left = pos.left - menuwidth;
+
this.listmenu.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)});
// set form values
$('input[name="sort_col"][value="'+rcmail.env.sort_col+'"]').attr('checked', 1);