[Svn] r4432 - in trunk/roundcubemail/program: js steps/mail

trac at roundcube.net trac at roundcube.net
Wed Jan 19 18:34:23 CET 2011


Author: thomasb
Date: 2011-01-19 11:34:23 -0600 (Wed, 19 Jan 2011)
New Revision: 4432

Modified:
   trunk/roundcubemail/program/js/app.js
   trunk/roundcubemail/program/steps/mail/func.inc
Log:
Show full mail subject as title (#1487128)

Modified: trunk/roundcubemail/program/js/app.js
===================================================================
--- trunk/roundcubemail/program/js/app.js	2011-01-19 13:55:58 UTC (rev 4431)
+++ trunk/roundcubemail/program/js/app.js	2011-01-19 17:34:23 UTC (rev 4432)
@@ -1715,7 +1715,7 @@
       var action = flags.mbox == this.env.drafts_mailbox ? 'compose' : 'show';
       var uid_param = flags.mbox == this.env.drafts_mailbox ? '_draft_uid' : '_uid';
       cols.subject = '<a href="./?_task=mail&_action='+action+'&_mbox='+urlencode(flags.mbox)+'&'+uid_param+'='+uid+'"'+
-        ' onclick="return rcube_event.cancel(event)">'+cols.subject+'</a>';
+        ' onclick="return rcube_event.cancel(event)" onmouseover="rcube_webmail.long_subject_title(this,'+(message.depth+1)+')">'+cols.subject+'</a>';
     }
 
     // add each submitted col
@@ -5503,6 +5503,17 @@
 
 }  // end object rcube_webmail
 
+
+// some static methods
+rcube_webmail.long_subject_title = function(elem, indent)
+{
+  if (!elem.title) {
+    var $elem = $(elem);
+    if ($elem.width() + indent * 15 > $elem.parent().width())
+      elem.title = $elem.html();
+  }
+};
+
 // copy event engine prototype
 rcube_webmail.prototype.addEventListener = rcube_event_engine.prototype.addEventListener;
 rcube_webmail.prototype.removeEventListener = rcube_event_engine.prototype.removeEventListener;

Modified: trunk/roundcubemail/program/steps/mail/func.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/func.inc	2011-01-19 13:55:58 UTC (rev 4431)
+++ trunk/roundcubemail/program/steps/mail/func.inc	2011-01-19 17:34:23 UTC (rev 4432)
@@ -273,7 +273,7 @@
       if (in_array($col, array('from', 'to', 'cc', 'replyto')))
         $cont = Q(rcmail_address_string($header->$col, 3), 'show');
       else if ($col=='subject') {
-        $cont = abbreviate_string(trim($IMAP->decode_header($header->$col)), 160);
+        $cont = trim($IMAP->decode_header($header->$col));
         if (!$cont) $cont = rcube_label('nosubject');
         $cont = Q($cont);
       }

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



More information about the Svn mailing list