diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-09-15 13:43:13 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-09-15 13:47:01 +0200 |
commit | 7f1218caeacb5c3085047e61b9e3cf8e82198045 (patch) | |
tree | a2ad7354d2b1b0ef79a71584f1693ede13f80615 /program/js | |
parent | 256d5b7216711e8c183222be1a0dc3850b623944 (diff) |
Display full attachment name using title attribute when name is too long to display (#1489320)
Conflicts:
CHANGELOG
program/steps/mail/show.inc
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/app.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js index 337875431..48727e851 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1887,7 +1887,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 = '<span></span>' + tree; // #1487821 } @@ -3604,7 +3604,12 @@ function rcube_webmail() att.html = '<a title="'+this.get_label('cancel')+'" onclick="return rcmail.cancel_attachment_upload(\''+name+'\', \''+att.frame+'\');" href="#cancelupload" class="cancelupload">' + (this.env.cancelicon ? '<img src="'+this.env.cancelicon+'" alt="" />' : this.get_label('cancel')) + '</a>' + att.html; - var indicator, li = $('<li>').attr('id', name).addClass(att.classname).html(att.html); + var indicator, li = $('<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))) { @@ -6876,11 +6881,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), |