diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-10 07:42:17 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-10 07:42:17 +0000 |
| commit | 991aec09361bddd7345f9ed9792c3621404c03b0 (patch) | |
| tree | fc2edde8b97953d91d103d4d0b2bc70fb840427c /roundcubemail/program | |
| parent | b73fcbadb9fea4547eef2da168d251aa5f3b7d2b (diff) | |
- Fix setting title for truncated subject in IE (#1487128)
git-svn-id: https://svn.roundcube.net/trunk@5199 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/js/app.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 6544fe8f5..0f17633a2 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/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; |
