From 31036bb3eb65f9b6513631a71936fe19f302815c Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 16 Feb 2011 06:14:28 -0500
Subject: [PATCH] - Add favicon on message print page (#1487789)

---
 skins/default/functions.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/skins/default/functions.js b/skins/default/functions.js
index 62e4783..3497826 100644
--- a/skins/default/functions.js
+++ b/skins/default/functions.js
@@ -13,7 +13,7 @@
     tab = '#settingstab' + (rcmail.env.action=='preferences' ? 'default' : (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action.replace(/\./g, '')));
 
   $(tab).addClass('tablink-selected');
-  $(tab + '> a').removeAttr('onclick').unbind('click').bind('click', function(){return false;});
+  $(tab + '> a').removeAttr('onclick').click(function() { return false; });
 }
 
 function rcube_show_advanced(visible)
@@ -46,7 +46,7 @@
     // create a tab
     a   = $('<a>').text(legend.text()).attr('href', '#');
     tab = $('<span>').attr({'id': 'tab'+idx, 'class': 'tablink'})
-        .click(function() { return rcube_show_tab(id, idx); })
+        .click(function() { rcube_show_tab(id, idx); return false })
 
     // remove legend
     legend.remove();
@@ -128,13 +128,13 @@
 
   if (show && ref) {
     var parent = $(ref).parent(),
+      win = $(window),
       pos = parent.hasClass('dropbutton') ? parent.offset() : $(ref).offset();
 
-    if (!above && pos.top + ref.offsetHeight + obj.height() > window.innerHeight)
+    if (!above && pos.top + ref.offsetHeight + obj.height() > win.height())
       above = true;
-
-    if (pos.left + obj.width() > window.innerWidth)
-      pos.left = window.innerWidth - obj.width() - 30;
+    if (pos.left + obj.width() > win.width())
+      pos.left = win.width() - obj.width() - 30;
 
     obj.css({ left:pos.left, top:(pos.top + (above ? -obj.height() : ref.offsetHeight)) });
   }

--
Gitblit v1.9.1