From: edward Date: Fri, 4 Nov 2016 06:17:07 +0000 (+0800) Subject: Pman.Dialog.CoreCompanies.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=5c211b47132db9d28e495d65a54b1202726edb38 Pman.Dialog.CoreCompanies.bjs Pman.Dialog.CoreCompanies.js --- diff --git a/Pman.Dialog.CoreCompanies.bjs b/Pman.Dialog.CoreCompanies.bjs index f97414b3..764784ce 100644 --- a/Pman.Dialog.CoreCompanies.bjs +++ b/Pman.Dialog.CoreCompanies.bjs @@ -266,7 +266,7 @@ }, { "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 \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 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}" }, "text" : "Save", "xtype" : "Button", diff --git a/Pman.Dialog.CoreCompanies.js b/Pman.Dialog.CoreCompanies.js index 121fe8cf..6fd02cb8 100644 --- a/Pman.Dialog.CoreCompanies.js +++ b/Pman.Dialog.CoreCompanies.js @@ -115,8 +115,10 @@ Pman.Dialog.CoreCompanies = { }, success : function(res) { Roo.log(res); + }, + failure : function(res) { + Roo.log(res); } - }); return;