b471c09f7749c2a04f8e3485f2797ca55944c9fb tdreszer Thu Jul 24 16:13:09 2014 -0700 Fixed many of the problems with IE version 11 going undetected. Redmine #13422. diff --git src/hg/js/ddcl.js src/hg/js/ddcl.js index 2e57ebb..f31d989 100644 --- src/hg/js/ddcl.js +++ src/hg/js/ddcl.js @@ -32,31 +32,31 @@ { // returns the obj text and if there is obj style, the text gets span wrapped with it var text = ''; var style = $(obj).attr('style'); if (style && style.length > 0) text = "<span style='"+style+"'>"; text += $(obj).text(); if (style && style.length > 0) text += "</span>"; return text; }, textOfCurrentSelections: function (options) { // Generates a multi-line string of currently selected options var chosen = $(options).filter(':selected'); // Works with FF and Chrome but not IE! - if (chosen.length === 0 && $.browser.msie) + if (chosen.length === 0 && theClient.isIe()) chosen = $(options).find(':selected'); // Works with IE but not FF and Chrome! var chosenCount = $(chosen).length; var msg = ''; if (chosenCount === 0) { msg = 'Please select...'; } else if (chosenCount === 1) { msg = ddcl.textOfObjWrappedInStyle(chosen[0]); } else if (chosenCount === options.length) { msg = ddcl.textOfObjWrappedInStyle(options[0]); } else { for (var ix=0;ix<chosenCount;ix++) { if (ix > 0) msg += "<BR>"; msg += ddcl.textOfObjWrappedInStyle(chosen[ix]); } @@ -478,31 +478,31 @@ } else filterTable.trigger(); }, excludeOptions: function (filter) { // bound to 'click' event inside ddcl.js. // Will mark all options in one filterBy box that are inconsistent with the current // selections in other filterBy boxes. Mark with class ".excluded" // Compare to the list of all trs var allTrs = $('tr.filterable'); // Default all if (allTrs.length === 0) return false; // IE takes tooo long, so this should be called only when leaving the filterBy box - if ($.browser.msie && $(allTrs).length > 300) + if (theClient.isIePre11() && $(allTrs).length > 300) return false; // Find the var for this filter var filterVar = filterTable.variable(filter); if (!filterVar) return false; // Look at list of visible trs. var visibleTrs = filterTable.trsSurviving(filterVar); if (!visibleTrs) return false; if (allTrs.length === visibleTrs.length) { $(filter).children('option.excluded').removeClass('excluded'); return true; // Nothing more to do. All are already excluded