mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-30 15:45:26 +00:00
fix(mail(js)): show "Download all attachments" menu option
This commit is contained in:
@@ -556,6 +556,22 @@
|
||||
return Message.$$resource.post(this.$absolutePath(), 'sendMDN');
|
||||
};
|
||||
|
||||
/**
|
||||
* @function hasAttachments
|
||||
* @memberof Message.prototype
|
||||
* @returns true if there's one ore more attached files
|
||||
*/
|
||||
Message.prototype.hasAttachments = function(content) {
|
||||
var _this = this;
|
||||
|
||||
return !!_.find(content || this.parts.content, function(part) {
|
||||
if (angular.isArray(part.content)) {
|
||||
return _this.hasAttachments(part.content);
|
||||
}
|
||||
return part.type == 'UIxMailPartLinkViewer' || part.type == 'UIxMailPartImageViewer';
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @function $deleteAttachment
|
||||
* @memberof Message.prototype
|
||||
|
||||
Reference in New Issue
Block a user