Fix nextmatch category, filter & filter2 selectboxes did not listen for custom change return value to cancel server call

This commit is contained in:
nathangray 2017-01-24 08:41:05 -07:00
parent 45114cd2b8
commit 8de5542803

View File

@ -2715,13 +2715,6 @@ var et2_nextmatch_header_bar = (function(){ "use strict"; return et2_DOMWidget.e
if (this.nextmatch.options.settings[name+"_onchange"]) if (this.nextmatch.options.settings[name+"_onchange"])
{ {
// Make sure to get the new value for filtering
input.change(this.nextmatch, function(event) {
var set = {};
set[name] = select.getValue();
event.data.applyFilters(set);
});
// Get the onchange function string // Get the onchange function string
var onchange = this.nextmatch.options.settings[name+"_onchange"]; var onchange = this.nextmatch.options.settings[name+"_onchange"];
@ -2733,7 +2726,8 @@ var et2_nextmatch_header_bar = (function(){ "use strict"; return et2_DOMWidget.e
} }
// Connect it to the onchange event of the input element - may submit // Connect it to the onchange event of the input element - may submit
input.change(this.nextmatch, et2_compileLegacyJS(onchange, this.nextmatch, select.getInputNode())); select.change = et2_compileLegacyJS(onchange, this.nextmatch, select.getInputNode());
this._bindHeaderInput(select);
} }
else // default request changed rows with new filters, previous this.form.submit() else // default request changed rows with new filters, previous this.form.submit()
{ {