From 2efe332b495787dc5be77c3191ff319a62a56fca Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 15 Sep 2013 13:43:13 +0200 Subject: Display full attachment name using title attribute when name is too long to display (#1489320) --- program/js/app.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index 1d1c65172..24aaca055 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1881,7 +1881,7 @@ function rcube_webmail() html = expando; else if (c == 'subject') { if (bw.ie) { - col.onmouseover = function() { rcube_webmail.long_subject_title_ie(this, message.depth+1); }; + col.onmouseover = function() { rcube_webmail.long_subject_title_ex(this, message.depth+1); }; if (bw.ie8) tree = '' + tree; // #1487821 } @@ -3639,7 +3639,12 @@ function rcube_webmail() att.html = '' + (this.env.cancelicon ? '' : this.get_label('cancel')) + '' + att.html; - var indicator, li = $('
  • ').attr('id', name).addClass(att.classname).html(att.html); + var indicator, li = $('
  • '); + + li.attr('id', name) + .addClass(att.classname) + .html(att.html) + .on('mouseover', function() { rcube_webmail.long_subject_title_ex(this, 0); }); // replace indicator's li if (upload_id && (indicator = document.getElementById(upload_id))) { @@ -6986,11 +6991,11 @@ 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(); + elem.title = $elem.text(); } }; -rcube_webmail.long_subject_title_ie = function(elem, indent) +rcube_webmail.long_subject_title_ex = function(elem, indent) { if (!elem.title) { var $elem = $(elem), -- cgit v1.2.3