Some documentation, add ability to set value rather than hacking up getValue() (actions)

This commit is contained in:
Nathan Gray 2013-08-20 18:49:38 +00:00
parent dba3bcc2aa
commit 62d42c83da

View File

@ -1194,6 +1194,10 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
}, },
// Input widget // Input widget
/**
* Get the current 'value' for the nextmatch
*/
getValue: function() { getValue: function() {
var _ids = this.getSelection(); var _ids = this.getSelection();
@ -1206,12 +1210,16 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
var value = { var value = {
"selected": idsArr, "selected": idsArr,
} }
jQuery.extend(value, this.activeFilters); jQuery.extend(value, this.activeFilters, this.value);
return value; return value;
}, },
resetDirty: function() {}, resetDirty: function() {},
isDirty: function() { return false;}, isDirty: function() { return typeof this.value !== 'undefined';},
isValid: function() { return true;} isValid: function() { return true;},
set_value: function(_value)
{
this.value = _value;
}
}); });
et2_register_widget(et2_nextmatch, ["nextmatch"]); et2_register_widget(et2_nextmatch, ["nextmatch"]);