From 34ed2d72908e805c5b8b2fb64bb0e6a3ea105778 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 26 May 2014 22:27:57 +0000 Subject: [PATCH] - Fix missing change handler on some nm header templates - Fix improper usage of jQuery.when() (it doesn't take an array) - Fix missing filter detection to not break with multiple values --- etemplate/js/et2_extension_nextmatch.js | 4 ++-- etemplate/js/et2_widget_tabs.js | 2 +- etemplate/js/etemplate2.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 1d8efc35ca..0bdb2723d0 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -1968,7 +1968,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, header.loadingFinished(deferred); // Wait until all child widgets are loaded, then bind - jQuery.when(deferred).then(function() { + jQuery.when.apply(jQuery,deferred).then(function() { self._bindHeaderInput(header); }); }, @@ -2140,7 +2140,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, * is to warn & not set it, but for nextmatch we'll just add it * in, and let the server either set it properly, or ignore. */ - if(value && child.instanceOf(et2_selectbox)) + if(value && typeof value != 'object' && child.instanceOf(et2_selectbox)) { var found = typeof child.options.select_options[value] != 'undefined'; // options is array of objects with attribute value&label diff --git a/etemplate/js/et2_widget_tabs.js b/etemplate/js/et2_widget_tabs.js index b050e10411..6129115a04 100644 --- a/etemplate/js/et2_widget_tabs.js +++ b/etemplate/js/et2_widget_tabs.js @@ -238,7 +238,7 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput], { tabs._loadTab(i,promises); } - jQuery.when(promises).then(function() { + jQuery.when.apply(jQuery,promises).then(function() { tab_deferred.resolve(); }); },0); diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index eeb07edb77..c75722135e 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -384,7 +384,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback) } // Wait for everything to be loaded, then finish it up - jQuery.when.apply(null, deferred).done(jQuery.proxy(function() { + jQuery.when.apply(jQuery, deferred).done(jQuery.proxy(function() { egw.debug("log", "Finished loading %s, triggering load event", _name); // Trigger the "resize" event