Pman.Dialog.BAdminImageManager.bjs
authorEdward <edward@roojs.com>
Fri, 16 Nov 2018 02:30:24 +0000 (10:30 +0800)
committerEdward <edward@roojs.com>
Fri, 16 Nov 2018 02:30:24 +0000 (10:30 +0800)
Pman.Dialog.BAdminImageManager.js

Pman.Dialog.BAdminImageManager.bjs
Pman.Dialog.BAdminImageManager.js

index 7f0d557..3d5e935 100644 (file)
@@ -78,7 +78,7 @@
         {
          "listeners" : {
           "actionfailed" : "function (_self, action)\n{\n    _this.dialog.uploadComplete = true;\n    \n     _this.dialog.haveProgress = 2;\n     \n    if (action.type == 'submit') {\n        Roo.log(\"Upload error\");\n        Roo.log(action);\n        \n        try {\n            \n            Roo.MessageBox.alert(\"Error\", action.result.errorMsg.split(/\\n/).join('<BR/>'));\n            \n        } catch(e) {\n            \n            Roo.MessageBox.alert(\"Error\", \"Saving failed = fix errors and try again\");\n        }\n        return;\n    }\n    \n    Roo.MessageBox.alert(\"Error\", \"Error loading details\"); \n}",
-          "actioncomplete" : "function(_self,action)\n{\n    _this.dialog.uploadComplete = true;\n    \n    _this.dialog.haveProgress = 2;\n    \n    Roo.MessageBox.hide();\n     \n    if (action.type == 'setdata') { \n        \n        this.url = _this.data._url ? baseURL + _this.data._url : baseURL + '/Roo/Images.php';\n        \n        this.el.dom.action = this.url;\n        \n        if (typeof(_this.data.timeout) != 'undefined') {\n            this.timeout = _this.data.timeout;\n        }\n        \n        this.findField('UPLOAD_IDENTIFIER').setValue(\n            (new Date() * 1) + '' + Math.random());\n        \n        _this.masonry.load();\n        \n        return;\n    }\n     \n   \n    if (action.type == 'load') {\n        \n        _this.data = action.result.data;\n        \n        return;\n    }\n    \n    \n    if (action.type == 'submit') { // only submitted here if we are \n        _this.detail_form.doAction('submit', {\n            params: {\n                ts : Math.random()\n            }\n        });\n        Roo.log(\"Upload success\");\n        Roo.log(action);\n        if (_this.callback) {\n            _this.callback.call(this, action.result.data, action.result.extra);\n        }\n       \n        _this.masonry.load();\n        \n        return; \n    }\n \n\n    \n}\n",
+          "actioncomplete" : "function(_self,action)\n{\n    _this.dialog.uploadComplete = true;\n    \n    _this.dialog.haveProgress = 2;\n    \n    Roo.MessageBox.hide();\n     \n    if (action.type == 'setdata') { \n        \n        this.url = _this.data._url ? baseURL + _this.data._url : baseURL + '/Roo/Images.php';\n        \n        this.el.dom.action = this.url;\n        \n        if (typeof(_this.data.timeout) != 'undefined') {\n            this.timeout = _this.data.timeout;\n        }\n        \n        this.findField('UPLOAD_IDENTIFIER').setValue(\n            (new Date() * 1) + '' + Math.random());\n        \n        _this.masonry.load();\n        \n        return;\n    }\n     \n   \n    if (action.type == 'load') {\n        \n        _this.data = action.result.data;\n        \n        return;\n    }\n    \n    \n    if (action.type == 'submit') { // only submitted here if we are \n        \n        _this.masonry.load();\n        \n        return; \n    }\n \n\n    \n}\n",
           "render" : "function (_self)\n{\n    _this.form_upload = this;\n    \n}"
          },
          "xtype" : "Form",
index d5f06a3..eca872b 100644 (file)
@@ -220,17 +220,7 @@ Roo.apply(Pman.Dialog.BAdminImageManager.prototype, {
                 
                 
                 if (action.type == 'submit') { // only submitted here if we are 
-                    _this.detail_form.doAction('submit', {
-                        params: {
-                            ts : Math.random()
-                        }
-                    });
-                    Roo.log("Upload success");
-                    Roo.log(action);
-                    if (_this.callback) {
-                        _this.callback.call(this, action.result.data, action.result.extra);
-                    }
-                   
+                    
                     _this.masonry.load();
                     
                     return;