[Svn] r5199 - in trunk/roundcubemail: . program/js

trac at roundcube.net trac at roundcube.net
Sat Sep 10 09:42:17 CEST 2011


Author: alec
Date: 2011-09-10 02:42:17 -0500 (Sat, 10 Sep 2011)
New Revision: 5199

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/js/app.js
Log:
- Fix setting title for truncated subject in IE (#1487128)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2011-09-10 06:49:51 UTC (rev 5198)
+++ trunk/roundcubemail/CHANGELOG	2011-09-10 07:42:17 UTC (rev 5199)
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Fix setting title for truncated subject in IE (#1487128)
 - Fix handling of links with IP address
 - Fix compacting folder resets message list filter (#1488076)
 - Fix displaying multipart/alternative messages with only one part (#1487938)

Modified: trunk/roundcubemail/program/js/app.js
===================================================================
--- trunk/roundcubemail/program/js/app.js	2011-09-10 06:49:51 UTC (rev 5198)
+++ trunk/roundcubemail/program/js/app.js	2011-09-10 07:42:17 UTC (rev 5199)
@@ -1771,8 +1771,11 @@
       }
       else if (c == 'threads')
         html = expando;
-      else if (c == 'subject')
+      else if (c == 'subject') {
+        if (bw.ie)
+          col.onmouseover = function() { rcube_webmail.long_subject_title_ie(this, message.depth+1); };
         html = tree + cols[c];
+      }
       else if (c == 'priority') {
         if (flags.prio > 0 && flags.prio < 6)
           html = '<span class="prio'+flags.prio+'"> </span>';
@@ -6113,6 +6116,23 @@
   }
 };
 
+rcube_webmail.long_subject_title_ie = function(elem, indent)
+{
+  if (!elem.title) {
+    var $elem = $(elem),
+      txt = $elem.text(),
+      tmp = $('<span>').text(txt)
+        .css({'position': 'absolute', 'float': 'left', 'visibility': 'hidden',
+          'font-size': $elem.css('font-size'), 'font-weight': $elem.css('font-weight')})
+        .appendTo($('body')),
+      w = tmp.width();
+
+    tmp.remove();
+    if (w + indent * 15 > $elem.width())
+      elem.title = txt;
+  }
+};
+
 // copy event engine prototype
 rcube_webmail.prototype.addEventListener = rcube_event_engine.prototype.addEventListener;
 rcube_webmail.prototype.removeEventListener = rcube_event_engine.prototype.removeEventListener;

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list