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

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

index 351cf84..7f0d557 100644 (file)
@@ -91,7 +91,7 @@
          "items" : [
           {
            "listeners" : {
-            "render" : "function (_self)\n{\n    _this.uploadDL = this;\n    \n    _this.uploadDL.inputEl().on(\"change\",function(){\n    \n        var id =  _this.show.isActive() ? _this.data.onid : \"\";\n        _this.form_upload.doAction('submit', {\n            params: {\n                onid: id,\n                ontable: 'core_email',\n                ts : Math.random()\n            }\n        });\n        Roo.log(\"Upload success\");\n        \n        \n        //console.log(_this.current_obj_btn.getEl().dom.className);\n        _this.dialog.uploadProgress.defer(1000, _this.dialog);\n    });\n    \n    \n}"
+            "render" : "function (_self)\n{\n    _this.uploadDL = this;\n    \n    _this.uploadDL.inputEl().on(\"change\",function(){\n        \n        _this.form.findField('onid').setValue(_this.showTypeBtn.isActive() ? _this.data.onid : 0);\n        _this.form.doAction('submit');\n        \n        //_this.dialog.uploadProgress.defer(1000, _this.dialog);\n    });\n    \n    \n}"
            },
            "String name" : "imageUpload",
            "xtype" : "Input",
index 73686cf..d5f06a3 100644 (file)
@@ -283,20 +283,11 @@ Roo.apply(Pman.Dialog.BAdminImageManager.prototype, {
                   _this.uploadDL = this;
                   
                   _this.uploadDL.inputEl().on("change",function(){
-                  
-                      var id =  _this.show.isActive() ? _this.data.onid : "";
-                      _this.form_upload.doAction('submit', {
-                          params: {
-                              onid: id,
-                              ontable: 'core_email',
-                              ts : Math.random()
-                          }
-                      });
-                      Roo.log("Upload success");
                       
+                      _this.form.findField('onid').setValue(_this.showTypeBtn.isActive() ? _this.data.onid : 0);
+                      _this.form.doAction('submit');
                       
-                      //console.log(_this.current_obj_btn.getEl().dom.className);
-                      _this.dialog.uploadProgress.defer(1000, _this.dialog);
+                      //_this.dialog.uploadProgress.defer(1000, _this.dialog);
                   });