Pman.Dialog.XtupleVendTypeEdit.bjs
authorEdward <edward@roojs.com>
Tue, 3 Dec 2013 05:19:54 +0000 (13:19 +0800)
committerEdward <edward@roojs.com>
Tue, 3 Dec 2013 05:19:54 +0000 (13:19 +0800)
Pman.Dialog.XtupleVendTypeEdit.js

Pman.Dialog.XtupleVendTypeEdit.bjs
Pman.Dialog.XtupleVendTypeEdit.js

index 60eebc7..50ee6e6 100644 (file)
@@ -28,7 +28,7 @@
                     "items": [
                         {
                             "listeners": {
-                                "|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       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \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         return;\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       return;\n    }\n    if (action.type == 'load') {\n        _this.data = action.result.data;\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \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         return;\n    }\n}\n",
                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
                             },
                             "method": "POST",
index 6919d0a..cb6609e 100644 (file)
@@ -57,6 +57,7 @@ Pman.Dialog.XtupleVendTypeEdit = {
                                        return;
                                     }
                                     if (action.type == 'load') {
+                                        _this.data = action.result.data;
                                         _this.dialog.el.unmask();
                                         return;
                                     }