Jelajahi Sumber

论坛附件上传错误

unknown 5 tahun lalu
induk
melakukan
ae18dea980

+ 1 - 0
o2web/source/o2_core/o2/widget/AttachmentController.js

@@ -1,4 +1,5 @@
 o2.widget = o2.widget || {};
+if( !o2.widget.UUID )o2.require("o2.widget.UUID", null, false);
 o2.widget.AttachmentController = o2.widget.ATTER  = new Class({
     Extends: o2.widget.Common,
 	Implements: [Options, Events],

+ 2 - 1
o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js

@@ -129,7 +129,8 @@ MWF.xDesktop.Actions.RestActions = new Class({
             if(file){
                 this.transferComplete(e, xhr, messageItem, currentDate, file);
             }
-        }.bind(this), false);        xhr.upload.addEventListener("loadstart", function(e){this.transferStart(e, xhr, messageItem);}.bind(this), false);
+        }.bind(this), false);
+        xhr.upload.addEventListener("loadstart", function(e){this.transferStart(e, xhr, messageItem);}.bind(this), false);
         xhr.upload.addEventListener("error", function(e){this.transferFailed(e, xhr, messageItem);}.bind(this), false);
         xhr.upload.addEventListener("abort", function(e){this.transferCanceled(e, xhr, messageItem);}.bind(this), false);
         xhr.upload.addEventListener("timeout", function(e){this.transferCanceled(e, xhr, messageItem);}.bind(this), false);

+ 2 - 1
o2web/source/x_component_Forum/Attachment.js

@@ -89,12 +89,13 @@ MWF.xApplication.Forum.Attachment = new Class({
                 this.actions.getAttachment(aid, this.options.documentId, function (json) {
                     json = this.transportData(json);
                     if (json.data) {
-                        this.attachmentController.addAttachment(json.data);
+                        this.attachmentController.addAttachment(json.data, o.messageId);
                         //this.attachmentList.push(json.data);
                     }
                     this.attachmentController.checkActions();
 
                     this.fireEvent("upload", [json.data]);
+                    this.fireEvent("change");
                 }.bind(this))
             }
             this.attachmentController.checkActions();