Pman.Dialog.CoreAutoSavePreview.bjs
authorEdward <edward@roojs.com>
Thu, 8 May 2014 10:42:46 +0000 (18:42 +0800)
committerEdward <edward@roojs.com>
Thu, 8 May 2014 10:42:46 +0000 (18:42 +0800)
Pman.Dialog.CoreAutoSavePreview.js

Pman.Dialog.CoreAutoSavePreview.bjs
Pman.Dialog.CoreAutoSavePreview.js

index 4bbd794..b8a989c 100644 (file)
@@ -57,7 +57,7 @@
                             "items": [
                                 {
                                     "listeners": {
-                                        "afterselectionchange": "function (_self)\n{\n    var selected = this.getSelected();\n    \n    if (!selected) {\n        _this.viewPanel.setContent(\"Nothing Selected\");\n        return;\n    }\n    \n    _this.viewPanel.load( { url : baseURL + \"/Roo/Events\", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){\n        \n        _this.source = '';\n        \n        var res = Roo.decode(oResponse.responseText);\n        \n        if(!bSuccess || !res.success){\n            _this.viewPanel.setContent(\"Load data failed?!\");\n        }\n        \n        if(typeof(res.data) === 'string'){\n            _this.viewPanel.setContent(res.data);\n            return;\n        }\n        \n        if(!_this.data.successFn){\n            Roo.MessageBox.alert('Error', 'Please setup the successFn');\n            return;\n        }\n        \n        _this.source = _this.data.successFn(res);\n\n        _this.viewPanel.setContent(_this.source);\n        _this.data.successFn();\n        \n    });\n}"
+                                        "afterselectionchange": "function (_self)\n{\n    var selected = this.getSelected();\n    \n    if (!selected) {\n        _this.viewPanel.setContent(\"Nothing Selected\");\n        return;\n    }\n    \n    _this.viewPanel.load( { url : baseURL + \"/Roo/Events\", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){\n        \n        _this.source = '';\n        \n        var res = Roo.decode(oResponse.responseText);\n        \n        if(!bSuccess || !res.success){\n            _this.viewPanel.setContent(\"Load data failed?!\");\n        }\n        \n        if(typeof(res.data) === 'string'){\n            _this.viewPanel.setContent(res.data);\n            return;\n        }\n        \n        if(!_this.data.successFn){\n            Roo.MessageBox.alert('Error', 'Please setup the successFn');\n            return;\n        }\n        \n        _this.source = _this.data.successFn(res);\n\n        _this.viewPanel.setContent(_this.source);\n        \n    });\n}"
                                     },
                                     "*prop": "sm",
                                     "singleSelect": true,
index b30842f..bb95ff7 100644 (file)
@@ -115,7 +115,6 @@ Pman.Dialog.CoreAutoSavePreview = {
                                         _this.source = _this.data.successFn(res);
                                 
                                         _this.viewPanel.setContent(_this.source);
-                                        _this.data.successFn();
                                         
                                     });
                                 }