Skip to content

Commit

Permalink
fix(mail(js)): add missing library to save msg from popup window
Browse files Browse the repository at this point in the history
Fixes #4879
  • Loading branch information
cgx committed Nov 18, 2019
1 parent e458a78 commit 7298022
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion UI/Templates/MailerUI/UIxMailPopupView.wox
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
className="UIxPageFrame"
title="title"
const:popup="YES"
const:jsFiles="Common.js, Preferences.services.js, Contacts.services.js, Scheduler.services.js, Mailer.app.popup.js, Mailer.services.js, vendor/ckeditor/ckeditor.js, vendor/ckeditor/ck.js, vendor/angular-file-upload.min.js">
const:jsFiles="Common.js, Preferences.services.js, Contacts.services.js, Scheduler.services.js, Mailer.app.popup.js, Mailer.services.js, vendor/ckeditor/ckeditor.js, vendor/ckeditor/ck.js, vendor/angular-file-upload.min.js, vendor/FileSaver.min.js">

<main class="layout-fill" ng-controller="navController">
<div id="detailView" class="view-detail md-default-theme md-background md-bg md-hue-2"
Expand Down
11 changes: 5 additions & 6 deletions UI/WebServerResources/js/Common/Resource.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@
if (action) path.push(action);
path = _.compact(_.flatten(path)).join('/');

if (typeof saveAs == 'undefined') {
throw new Error('To use Resource.download, FileSaver.js must be loaded.');
}

function getFileNameFromHeader(header) {
var result;

Expand Down Expand Up @@ -224,12 +228,7 @@
else {
getFileNameFromHeader(headers('content-disposition'));
}
if (!saveAs) {
throw new Error('To use Resource.download, FileSaver.js must be loaded.');
}
else {
saveAs(blob, fileName);
}
saveAs(blob, fileName);
}
});
};
Expand Down

0 comments on commit 7298022

Please sign in to comment.