mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-19 12:55:08 +02:00
isDirty() method for whole template / etemplate2 object, thought it needs more work in widgets, not setting this._oldValue in their set_value() method
This commit is contained in:
@@ -301,6 +301,24 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if template contains any dirty (unsaved) content
|
||||
*
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
etemplate2.prototype.isDirty = function()
|
||||
{
|
||||
var dirty = false;
|
||||
this.widgetContainer.iterateOver(function(_widget) {
|
||||
if (_widget.isDirty && _widget.isDirty())
|
||||
{
|
||||
dirty = true;
|
||||
}
|
||||
});
|
||||
|
||||
return dirty;
|
||||
};
|
||||
|
||||
etemplate2.prototype.submit = function(button)
|
||||
{
|
||||
// Get the form values
|
||||
|
Reference in New Issue
Block a user