(js) Fix saving draft outside Mail module

Fixes #4071
pull/234/head
Francis Lachapelle 2017-03-07 10:26:10 -05:00
parent 74c2926bca
commit 270ff1bd29
3 changed files with 5 additions and 1 deletions

1
NEWS
View File

@ -20,6 +20,7 @@ Bug fixes
- [web] exposed default value of SOGoMailAutoSave (#4053) - [web] exposed default value of SOGoMailAutoSave (#4053)
- [web] fixed handling of contact organizations (#4028) - [web] fixed handling of contact organizations (#4028)
- [web] fixed handling of attachments in mail editor (#4058, #4063) - [web] fixed handling of attachments in mail editor (#4058, #4063)
- [web] fixed saving draft outside Mail module (#4071)
3.2.7 (2017-02-14) 3.2.7 (2017-02-14)
------------------ ------------------

View File

@ -129,6 +129,9 @@
if (options && options.asDraft && this.draftId) { if (options && options.asDraft && this.draftId) {
id = buildPath() + '/' + this.draftId; // add draft ID id = buildPath() + '/' + this.draftId; // add draft ID
} }
if (options && options.withResourcePath) {
id = Message.$$resource.path(id); // return absolute URL
}
return id; return id;
}; };

View File

@ -33,7 +33,7 @@
vm.sendState = false; vm.sendState = false;
vm.toggleFullscreen = toggleFullscreen; vm.toggleFullscreen = toggleFullscreen;
vm.uploader = new FileUploader({ vm.uploader = new FileUploader({
url: stateMessage.$absolutePath({asDraft: true}) + '/save', url: stateMessage.$absolutePath({asDraft: true, withResourcePath: true}) + '/save',
autoUpload: true, autoUpload: true,
alias: 'attachments', alias: 'attachments',
removeAfterUpload: false, removeAfterUpload: false,