From bbbacdc69832d2993b6e2f6416f88ef833636a8a Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 29 Aug 2012 06:03:22 -0400
Subject: [PATCH] Call resize() to fix floatingbuttons position in tabbed page (on tab selection)

---
 skins/larry/ui.js |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index ca16807..474c480 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -254,11 +254,11 @@
    */
   function resize()
   {
-    if (rcmail.env.task == 'mail' && (rcmail.env.action == 'show' || rcmail.env.action == 'preview')) {
-      layout_messageview();
-    }
-    if (rcmail.env.task == 'mail' && rcmail.env.action == 'compose') {
-      layout_composeview();
+    if (rcmail.env.task == 'mail') {
+      if (rcmail.env.action == 'show' || rcmail.env.action == 'preview')
+        layout_messageview();
+      else if (rcmail.env.action == 'compose')
+        layout_composeview();
     }
 
     // make iframe footer buttons float if scrolling is active
@@ -267,13 +267,13 @@
         body = $(document.body),
         floating = footer.hasClass('floating'),
         overflow = body.outerHeight(true) > $(window).height();
+
       if (overflow != floating) {
         var action = overflow ? 'addClass' : 'removeClass';
         footer[action]('floating');
         body[action]('floatingbuttons');
       }
-    })
-
+    });
   }
 
   /**
@@ -847,6 +847,8 @@
       // Select/unselect tab
       $('#tab'+idx).toggleClass('selected', idx==index);
     });
+
+    resize();
   }
 
   /**

--
Gitblit v1.9.1