Skip to content

Commit

Permalink
(js) Fix saving draft outside Mail module
Browse files Browse the repository at this point in the history
Fixes #4071
  • Loading branch information
cgx committed Mar 7, 2017
1 parent 74c2926 commit 270ff1b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -20,6 +20,7 @@ Bug fixes
- [web] exposed default value of SOGoMailAutoSave (#4053)
- [web] fixed handling of contact organizations (#4028)
- [web] fixed handling of attachments in mail editor (#4058, #4063)
- [web] fixed saving draft outside Mail module (#4071)

3.2.7 (2017-02-14)
------------------
Expand Down
3 changes: 3 additions & 0 deletions UI/WebServerResources/js/Mailer/Message.service.js
Expand Up @@ -129,6 +129,9 @@
if (options && options.asDraft && this.draftId) {
id = buildPath() + '/' + this.draftId; // add draft ID
}
if (options && options.withResourcePath) {
id = Message.$$resource.path(id); // return absolute URL
}

return id;
};
Expand Down
2 changes: 1 addition & 1 deletion UI/WebServerResources/js/Mailer/MessageEditorController.js
Expand Up @@ -33,7 +33,7 @@
vm.sendState = false;
vm.toggleFullscreen = toggleFullscreen;
vm.uploader = new FileUploader({
url: stateMessage.$absolutePath({asDraft: true}) + '/save',
url: stateMessage.$absolutePath({asDraft: true, withResourcePath: true}) + '/save',
autoUpload: true,
alias: 'attachments',
removeAfterUpload: false,
Expand Down

0 comments on commit 270ff1b

Please sign in to comment.