mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:18:57 +01: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:
parent
f4e1db3a68
commit
d8984be747
@ -145,6 +145,8 @@ var et2_htmlarea = et2_inputWidget.extend(
|
||||
}
|
||||
},
|
||||
set_value: function(_value) {
|
||||
this._oldValue = _value;
|
||||
|
||||
try {
|
||||
//this.htmlNode.ckeditorGet().setData(_value);
|
||||
var ckeditor = CKEDITOR.instances[this.dom_id];
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user