Pman.Dialog.CoreCompanies.bjs
authoredward <edward@roojs.com>
Fri, 4 Nov 2016 06:19:15 +0000 (14:19 +0800)
committeredward <edward@roojs.com>
Fri, 4 Nov 2016 06:19:15 +0000 (14:19 +0800)
Pman.Dialog.CoreCompanies.js

Pman.Dialog.CoreCompanies.bjs
Pman.Dialog.CoreCompanies.js

index 764784c..95641ae 100644 (file)
     },
     {
      "listeners" : {
-      "click" : "function (_self, e)\n{\n    if(!_this.form.isValid()){\n        Roo.MessageBox.alert('Error', 'Please Correct all the errors in red');\n        return;\n    }\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/Core_company.php',\n        method : 'POST',\n        params : {\n          id : _this.form.findField('id').getValue() * 1,\n          name : _this.form.findField('name').getValue(),\n          _check_name : 1\n        }, \n        success : function(res) {\n            Roo.log(res);\n        },\n        failure : function(res) {\n            Roo.log(res);\n        }\n    });\n    \n    return;\n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
+      "click" : "function (_self, e)\n{\n    if(!_this.form.isValid()){\n        Roo.MessageBox.alert('Error', 'Please Correct all the errors in red');\n        return;\n    }\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/Core_company.php',\n        method : 'POST',\n        params : {\n          id : _this.form.findField('id').getValue() * 1,\n          name : _this.form.findField('name').getValue(),\n          _check_name : 1\n        }, \n        success : function(res) {\n            _this.dialog.el.mask(\"Saving\");\n            _this.form.doAction(\"submit\");\n        },\n        failure : function(res) {\n            Roo.log(res);\n        }\n    });\n    \n    return;\n    \n}"
      },
      "text" : "Save",
      "xtype" : "Button",
index 6fd02cb..949437f 100644 (file)
@@ -114,7 +114,8 @@ Pman.Dialog.CoreCompanies = {
                   _check_name : 1
                 }, 
                 success : function(res) {
-                    Roo.log(res);
+                    _this.dialog.el.mask("Saving");
+                    _this.form.doAction("submit");
                 },
                 failure : function(res) {
                     Roo.log(res);
@@ -123,9 +124,6 @@ Pman.Dialog.CoreCompanies = {
             
             return;
             
-            _this.dialog.el.mask("Saving");
-            _this.form.doAction("submit");
-        
         }
       },
       xns : Roo,