summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-04-14 20:41:27 +0200
committerAleksander Machniak <alec@alec.pl>2014-04-14 20:44:15 +0200
commit3a04a3d710e917703e03de6315858f564ebab028 (patch)
tree1ec3cce1c9af04505e08b7e3f67ecccb8754329f
parentef925bb49cbc49caf52e3d3dbe91ffdc98ae8841 (diff)
Fix regression where title attribute for long message subjects wasn't used on IE
Conflicts: program/js/app.js
-rw-r--r--program/js/app.js15
-rw-r--r--program/js/list.js4
2 files changed, 9 insertions, 10 deletions
diff --git a/program/js/app.js b/program/js/app.js
index be937c0dc..57b2c3ce6 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1912,7 +1912,7 @@ function rcube_webmail()
// add each submitted col
for (n in this.env.coltypes) {
c = this.env.coltypes[n];
- col = { className: String(c).toLowerCase() };
+ col = {className: String(c).toLowerCase(), events:{}};
if (c == 'flag') {
css_class = (flags.flagged ? 'flagged' : 'unflagged');
@@ -1940,11 +1940,8 @@ function rcube_webmail()
else if (c == 'threads')
html = expando;
else if (c == 'subject') {
- if (bw.ie) {
- col.onmouseover = function() { rcube_webmail.long_subject_title_ex(this, message.depth+1); };
- if (bw.ie8)
- tree = '<span></span>' + tree; // #1487821
- }
+ if (bw.ie)
+ col.events.mouseover = function() { rcube_webmail.long_subject_title_ex(this); };
html = tree + cols[c];
}
else if (c == 'priority') {
@@ -4059,7 +4056,7 @@ function rcube_webmail()
li.attr('id', name)
.addClass(att.classname)
.html(att.html)
- .on('mouseover', function() { rcube_webmail.long_subject_title_ex(this, 0); });
+ .on('mouseover', function() { rcube_webmail.long_subject_title_ex(this); });
// replace indicator's li
if (upload_id && (indicator = document.getElementById(upload_id))) {
@@ -7683,7 +7680,7 @@ rcube_webmail.long_subject_title = function(elem, indent)
}
};
-rcube_webmail.long_subject_title_ex = function(elem, indent)
+rcube_webmail.long_subject_title_ex = function(elem)
{
if (!elem.title) {
var $elem = $(elem),
@@ -7695,7 +7692,7 @@ rcube_webmail.long_subject_title_ex = function(elem, indent)
w = tmp.width();
tmp.remove();
- if (w + indent * 15 > $elem.width())
+ if (w + $('span.branch', $elem).width() * 15 > $elem.width())
elem.title = txt;
}
};
diff --git a/program/js/list.js b/program/js/list.js
index 476edae4b..b54b4daf3 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -300,11 +300,13 @@ insert_row: function(row, before)
if (row.className) domrow.className = row.className;
if (row.style) $.extend(domrow.style, row.style);
- for (var domcell, col, i=0; row.cols && i < row.cols.length; i++) {
+ for (var e, domcell, col, i=0; row.cols && i < row.cols.length; i++) {
col = row.cols[i];
domcell = document.createElement(this.col_tagname());
if (col.className) domcell.className = col.className;
if (col.innerHTML) domcell.innerHTML = col.innerHTML;
+ for (e in col.events)
+ domcell['on' + e] = col.events[e];
domrow.appendChild(domcell);
}