diff options
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/app.js | 15 | ||||
-rw-r--r-- | program/js/common.js | 2 | ||||
-rw-r--r-- | program/js/list.js | 12 |
3 files changed, 18 insertions, 11 deletions
diff --git a/program/js/app.js b/program/js/app.js index ece521861..30e7fddf4 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -8066,7 +8066,7 @@ function rcube_webmail() if (plugin && plugin.enabledPlugin) return 1; - if (window.ActiveXObject) { + if ('ActiveXObject' in window) { try { if (plugin = new ActiveXObject("AcroPDF.PDF")) return 1; @@ -8099,7 +8099,7 @@ function rcube_webmail() if (plugin && plugin.enabledPlugin) return 1; - if (window.ActiveXObject) { + if ('ActiveXObject' in window) { try { if (plugin = new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) return 1; @@ -8183,7 +8183,7 @@ rcube_webmail.long_subject_title = function(elem, indent) if (!elem.title) { var $elem = $(elem); if ($elem.width() + (indent || 0) * 15 > $elem.parent().width()) - elem.title = $elem.text(); + elem.title = rcube_webmail.subject_text(elem); } }; @@ -8200,10 +8200,17 @@ rcube_webmail.long_subject_title_ex = function(elem) tmp.remove(); if (w + $('span.branch', $elem).width() * 15 > $elem.width()) - elem.title = txt; + elem.title = rcube_webmail.subject_text(elem); } }; +rcube_webmail.subject_text = function(elem) +{ + var t = $(elem).clone(); + t.find('.skip-on-drag').remove(); + return t.text(); +}; + rcube_webmail.prototype.get_cookie = getCookie; // copy event engine prototype diff --git a/program/js/common.js b/program/js/common.js index 76643068d..2b96a8a30 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -103,7 +103,7 @@ function roundcube_browser() this.xmlhttp_test = function() { var activeX_test = new Function("try{var o=new ActiveXObject('Microsoft.XMLHTTP');return true;}catch(err){return false;}"); - this.xmlhttp = (window.XMLHttpRequest || (window.ActiveXObject && activeX_test())); + this.xmlhttp = window.XMLHttpRequest || (('ActiveXObject' in window) && activeX_test()); return this.xmlhttp; }; diff --git a/program/js/list.js b/program/js/list.js index dbc14d6b8..bbf6e1e01 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -219,7 +219,7 @@ init_header: function() if (this.column_fixed == r) continue; col = this.thead.rows[0].cells[r]; - col.onmousedown = function(e){ return p.drag_column(e, this); }; + col.onmousedown = function(e) { return p.drag_column(e, this); }; this.colcount++; } } @@ -240,8 +240,8 @@ init_fixed_header: function() $(this.list).before(this.fixed_header); var me = this; - $(window).resize(function(){ me.resize() }); - $(window).scroll(function(){ + $(window).resize(function() { me.resize(); }); + $(window).scroll(function() { var w = $(window); me.fixed_header.css('marginLeft', (-w.scrollLeft()) + 'px'); if (!bw.webkit) @@ -270,14 +270,14 @@ resize: function() var column_widths = []; // get column widths from original thead - $(this.tbody).parent().find('thead tr td').each(function(index) { + $(this.tbody).parent().find('thead th,thead td').each(function(index) { column_widths[index] = $(this).width(); }); // apply fixed widths to fixed table header $(this.thead).parent().width($(this.tbody).parent().width()); - $(this.thead).find('tr td').each(function(index) { - $(this).css('width', column_widths[index]); + $(this.thead).find('th,td').each(function(index) { + $(this).width(column_widths[index]); }); $(window).scroll(); |