Pman.Dialog.CmsBlog.bjs
authoredward <edward@roojs.com>
Thu, 12 Apr 2018 04:39:27 +0000 (12:39 +0800)
committeredward <edward@roojs.com>
Thu, 12 Apr 2018 04:39:27 +0000 (12:39 +0800)
Pman.Dialog.CmsBlog.js

Pman.Dialog.CmsBlog.bjs
Pman.Dialog.CmsBlog.js

index d43ce50..e64f68d 100644 (file)
         {
          "listeners" : {
           "|beforeload" : "function (_self, o)\n{\n    var id = _this.form.findField('id').getValue() * 1;\n\n    if (id < 1) {\n        this.removeAll();\n        return false;\n    } \n    o.params = o.params || {};    \n    o.params.limit = 9999;          \n    o.params.onid = id;\n    o.params.ontable = 'cms_page';\n}",
-          "update" : "function (_self, rec, operation)\n{\n    \n    new Pman.Request({\n        url : baseURL+'/Roo/Images.php',\n        method : 'POST',\n        params : rec.data,\n        success: function(res)\n        {\n            Roo.log(\"GOT success\");\n            // update the data...\n            _this.grid.ds.load({});\n        },\n        failure : function(res)\n        {\n            Roo.log(res);\n        }\n        \n        \n    });\n}"
+          "update" : "function (_self, rec, operation)\n{\n    \n    new Pman.Request({\n        url : baseURL+'/Roo/Images.php',\n        method : 'POST',\n        params : rec.data,\n        success: function(res)\n        {\n            Roo.log(\"GOT success\");\n            // update the data...\n            _this.grid.ds.load({});\n        },\n        failure : function(res)\n        {\n            Roo.MessageBox.alert('Error', res.errorMsg);\n            _this.grid.ds.load({});\n        }\n        \n        \n    });\n}"
          },
          "xtype" : "Store",
          "$ xns" : "Roo.data",
index 86a05df..04afafc 100644 (file)
@@ -2825,7 +2825,8 @@ Pman.Dialog.CmsBlog = {
                   },
                   failure : function(res)
                   {
-                      Roo.log(res);
+                      Roo.MessageBox.alert('Error', res.errorMsg);
+                      _this.grid.ds.load({});
                   }