diff --git a/o2web/source/o2_core/o2/widget/AttachmentController.js b/o2web/source/o2_core/o2/widget/AttachmentController.js index 2a0e58598cc5b63d2dd40c693846f673533c8255..651467eb8cb95937771a16222df731c388c67ada 100644 --- a/o2web/source/o2_core/o2/widget/AttachmentController.js +++ b/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], diff --git a/o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js b/o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js index e0439f01c5e919bad0ba980e77b0dc4cd77a9c25..47d143cf3752cbaefbed5178a9ea1561fc816e87 100644 --- a/o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js +++ b/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); diff --git a/o2web/source/x_component_Forum/Attachment.js b/o2web/source/x_component_Forum/Attachment.js index dee929ddc3e50079d80ae8990082451487ccd80a..edb48bc16f65f832c4568904760e9b0ae68781a5 100644 --- a/o2web/source/x_component_Forum/Attachment.js +++ b/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();