diff options
author | alecpl <alec@alec.pl> | 2011-09-10 07:42:17 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-09-10 07:42:17 +0000 |
commit | 065d7025ee2d8b585dc8643439a1c453bbf6636b (patch) | |
tree | 1af118609762fce420a76794de189b03a35681d8 | |
parent | 303ade533f4056400a8976418d06946de012b7b5 (diff) |
- Fix setting title for truncated subject in IE (#1487128)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | program/js/app.js | 22 |
2 files changed, 22 insertions, 1 deletions
@@ -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) diff --git a/program/js/app.js b/program/js/app.js index 6544fe8f5..0f17633a2 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1771,8 +1771,11 @@ function rcube_webmail() } 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 = function(elem, indent) } }; +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; |