mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
- Fix missing onchange trigger on selectboxes
- Avoid loops caused by onchange trigger when applying filters
This commit is contained in:
parent
3037724641
commit
6671f4090a
@ -405,6 +405,10 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin
|
||||
applyFilters: function(_set) {
|
||||
var changed = false;
|
||||
|
||||
// Avoid loops cause by change events
|
||||
if(this.update_in_progress) return;
|
||||
this.update_in_progress = true;
|
||||
|
||||
// Cleared explicitly
|
||||
if(typeof _set != 'undefined' && jQuery.isEmptyObject(_set))
|
||||
{
|
||||
@ -496,6 +500,8 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin
|
||||
|
||||
// Trigger an update
|
||||
this.controller.update(true);
|
||||
|
||||
this.update_in_progress = false;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -447,6 +447,7 @@ var et2_selectbox = et2_inputWidget.extend(
|
||||
// No options set yet
|
||||
this.set_select_options(this.options.select_options);
|
||||
}
|
||||
this._oldValue = this.value;
|
||||
if(this.input !== null && (this.options.tags || this.options.search))
|
||||
{
|
||||
// Value must be a real Array, not an object
|
||||
@ -499,7 +500,10 @@ var et2_selectbox = et2_inputWidget.extend(
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.isAttached() && this._oldValue !== et2_no_init && this._oldValue !== _value)
|
||||
{
|
||||
this.input.change();
|
||||
}
|
||||
this.value = _value;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user