+ listeners : {
+ autosave : function (_self)
+ {
+ Roo.log('autosave');
+
+ var id = _this.form.findField('id').getValue() * 1;
+
+ /*
+ if(!_self.editorcore.sourceEditMode){
+ _self.syncValue();
+ }else{
+ _self.pushValue();
+ }
+ */
+
+ new Pman.Request({
+ url : baseURL + '/Roo/Events.php',
+ method :'POST',
+ params : {
+ id : 0,
+ action : 'AUTOSAVE',
+ on_id : (id > 0) ? id : 0,
+ on_table : 'crm_mailing_list_message',
+ remarks : 'BODY',
+ source: _self.getValue()
+ },
+ success : function() {
+ _self.originalValue = _self.getValue();
+
+ },
+ failure : function()
+ {
+ Roo.log('body autosave failed?!');
+ }
+ });
+
+ },
+ savedpreview : function (_self)
+ {
+ var id = _this.form.findField('id').getValue() * 1;
+
+ var successFn = function(res){
+ return res.data.POST.source;
+ };
+
+ var params = {
+ action : 'AUTOSAVE',
+ remarks : 'BODY',
+ on_id : (id < 1) ? 0 : id,
+ on_table : 'crm_mailing_list_message',
+ successFn : successFn
+ };
+
+
+ Pman.Dialog.CoreAutoSavePreview.show(params, function(res){
+ _self.setValue(res);
+ _self.originalValue = res;
+ });
+ }
+ },