From 019619a859fcbcfac6f7e1d5fced9cb2b4e46f9d Mon Sep 17 00:00:00 2001 From: edward Date: Fri, 4 Nov 2016 13:50:49 +0800 Subject: [PATCH] Pman.Dialog.CoreCompanies.bjs Pman.Dialog.CoreCompanies.js --- Pman.Dialog.CoreCompanies.bjs | 2 +- Pman.Dialog.CoreCompanies.js | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Pman.Dialog.CoreCompanies.bjs b/Pman.Dialog.CoreCompanies.bjs index e53d5b2f..76534ab5 100644 --- a/Pman.Dialog.CoreCompanies.bjs +++ b/Pman.Dialog.CoreCompanies.bjs @@ -266,7 +266,7 @@ }, { "listeners" : { - "click" : "function (_self, e)\n{\n // do some checks?\n \n if(!_this.form.isValid()){\n Roo.MessageBox.alert('Error', 'Please Correct all the errors in red');\n return;\n }\n \n \n _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}" + "click" : "function (_self, e)\n{\n // do some checks?\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_enum.php',\n method : 'POST',\n params : {\n id : record.data.id,\n etype : _this.data.etype,\n name : record.data.name,\n active : record.data.active,\n seqid : record.data.seqid,\n display_name : record.data.display_name\n }, \n success : function(res) {\n //Roo.log(data);\n // update the ID if it's not set..\n if (record.data.id * 1 < 1) {\n record.set('id', res.data.id);\n }\n }\n });\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 7e2d2f6b..73688287 100644 --- a/Pman.Dialog.CoreCompanies.js +++ b/Pman.Dialog.CoreCompanies.js @@ -107,6 +107,25 @@ Pman.Dialog.CoreCompanies = { return; } + new Pman.Request({ + url : baseURL + '/Roo/Core_enum.php', + method : 'POST', + params : { + id : record.data.id, + etype : _this.data.etype, + name : record.data.name, + active : record.data.active, + seqid : record.data.seqid, + display_name : record.data.display_name + }, + success : function(res) { + //Roo.log(data); + // update the ID if it's not set.. + if (record.data.id * 1 < 1) { + record.set('id', res.data.id); + } + } + }); _this.dialog.el.mask("Saving"); _this.form.doAction("submit"); -- 2.39.2