Pman.Dialog.CmsBlog.bjs
authoredward <edward@roojs.com>
Thu, 21 Dec 2017 03:42:07 +0000 (11:42 +0800)
committeredward <edward@roojs.com>
Thu, 21 Dec 2017 03:42:07 +0000 (11:42 +0800)
Pman.Dialog.CmsBlog.js

Pman.Dialog.CmsBlog.bjs
Pman.Dialog.CmsBlog.js

index 835269e..15dfaa4 100644 (file)
     },
     {
      "listeners" : {
-      "|click" : " function() {\n    _this.exit = false;\n    \n    /*\n    if(!_this.form1.findField('body').editorcore.sourceEditMode){\n        _this.form1.findField('body').syncValue();\n        _this.form2.findField('extended').syncValue();\n    }else{\n        _this.form1.findField('body').pushValue();\n        _this.form2.findField('extended').pushValue();\n    }\n    */\n    if(_this.data.page_type_id_name != 'blog' && AppModules.indexOf(\"Crm\") == -1){\n        _this.interests.reset();\n    }\n        \n    if(\n        _this.trform.isDirty() ||\n        _this.trform1.isDirty() ||\n        _this.trform2.isDirty() ||\n        _this.trform3.isDirty()\n    ) {\n        Roo.MessageBox.confirm(\n            \"Confirm\", \n            \"Do you want to save the translation\",\n            function(res) {\n                if(res != 'yes') {\n                    _this.dialog.el.mask(\"Saving\");\n                    _this.form.doAction(\"submit\");\n                    return;\n                }\n                \n            }\n        );\n            \n        return;\n    }\n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}\n"
+      "|click" : " function() {\n    _this.exit = false;\n    \n    if(!_this.form1.findField('body').editorcore.sourceEditMode){\n        _this.form1.findField('body').syncValue();\n        _this.form2.findField('extended').syncValue();\n    }else{\n        _this.form1.findField('body').pushValue();\n        _this.form2.findField('extended').pushValue();\n    }\n    \n    if(_this.data.page_type_id_name != 'blog' && AppModules.indexOf(\"Crm\") == -1){\n        _this.interests.reset();\n    }\n        \n    if(\n        _this.trform.isDirty() ||\n        _this.trform1.isDirty() ||\n        _this.trform2.isDirty() ||\n        _this.trform3.isDirty()\n    ) {\n        Roo.MessageBox.confirm(\n            \"Confirm\", \n            \"Do you want to save the translation\",\n            function(res) {\n                if(res != 'yes') {\n                    _this.dialog.el.mask(\"Saving\");\n                    _this.form.doAction(\"submit\");\n                    return;\n                }\n                \n            }\n        );\n            \n        return;\n    }\n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}\n"
      },
      "text" : "Save",
      "xtype" : "Button",
index 6bf94a6..33a8b6d 100644 (file)
@@ -371,7 +371,6 @@ Pman.Dialog.CmsBlog = {
        click : function() {
             _this.exit = false;
             
-            /*
             if(!_this.form1.findField('body').editorcore.sourceEditMode){
                 _this.form1.findField('body').syncValue();
                 _this.form2.findField('extended').syncValue();
@@ -379,7 +378,7 @@ Pman.Dialog.CmsBlog = {
                 _this.form1.findField('body').pushValue();
                 _this.form2.findField('extended').pushValue();
             }
-            */
+            
             if(_this.data.page_type_id_name != 'blog' && AppModules.indexOf("Crm") == -1){
                 _this.interests.reset();
             }