From ebbeacd8cf090df34f54dbb0d2be75e74d2d83df Mon Sep 17 00:00:00 2001 From: Edward Date: Mon, 3 Mar 2014 16:52:46 +0800 Subject: [PATCH] Pman.Dialog.CoreEnum.bjs Pman.Dialog.CoreEnum.js --- Pman.Dialog.CoreEnum.bjs | 2 +- Pman.Dialog.CoreEnum.js | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Pman.Dialog.CoreEnum.bjs b/Pman.Dialog.CoreEnum.bjs index c70bfc98..523e6c97 100644 --- a/Pman.Dialog.CoreEnum.bjs +++ b/Pman.Dialog.CoreEnum.bjs @@ -36,7 +36,7 @@ "items": [ { "listeners": { - "|actioncomplete": "function (_self, action)\n{\n if (action.type == 'setdata') {\n //_this.dialog.el.mask(\"Loading\");\n //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n \n // this is 'new' only!!!\n\n \n return;\n }\n if (action.type == 'load') {\n _this.dialog.el.unmask();\n return;\n }\n if (action.type == 'submit' ) {\n _this.dialog.el.unmask();\n _this.dialog.hide();\n\n if (_this.callback) {\n _this.callback.call(_this, action.result.data);\n }\n _this.form.reset();\n }\n}\n", + "|actioncomplete": "function (_self, action)\n{\n if (action.type == 'setdata') {\n if(_this.data.id){\n _this.dialog.el.mask(\"Loading\");\n this.load({ method: 'GET', params: { '_id' : _this.data.id }}); \n }\n \n return;\n }\n if (action.type == 'load') {\n _this.dialog.el.unmask();\n return;\n }\n if (action.type == 'submit' ) {\n _this.dialog.el.unmask();\n _this.dialog.hide();\n\n if (_this.callback) {\n _this.callback.call(_this, action.result.data);\n }\n _this.form.reset();\n }\n}\n", "|rendered": "function (form)\n{\n _this.form = form;\n}" }, "method": "POST", diff --git a/Pman.Dialog.CoreEnum.js b/Pman.Dialog.CoreEnum.js index 3027fb1c..c4080b4b 100644 --- a/Pman.Dialog.CoreEnum.js +++ b/Pman.Dialog.CoreEnum.js @@ -59,11 +59,10 @@ Pman.Dialog.CoreEnum = { actioncomplete : function (_self, action) { if (action.type == 'setdata') { - //_this.dialog.el.mask("Loading"); - //this.load({ method: 'GET', params: { '_id' : _this.data.id }}); - - // this is 'new' only!!! - + if(_this.data.id){ + _this.dialog.el.mask("Loading"); + this.load({ method: 'GET', params: { '_id' : _this.data.id }}); + } return; } -- 2.39.2