mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 15:08:28 +03:00
Added Google Viewer Integration (Preview Microsoft Word, Excel and PowerPoint files)
This commit is contained in:
parent
1638b55411
commit
139f412b6a
15 changed files with 254 additions and 42 deletions
|
|
@ -34,6 +34,7 @@
|
|||
this.folder = '';
|
||||
this.uid = '';
|
||||
this.mimeIndex = '';
|
||||
this.framed = false;
|
||||
}
|
||||
|
||||
_.extend(AttachmentModel.prototype, AbstractModel.prototype);
|
||||
|
|
@ -62,6 +63,7 @@
|
|||
AttachmentModel.prototype.folder = '';
|
||||
AttachmentModel.prototype.uid = '';
|
||||
AttachmentModel.prototype.mimeIndex = '';
|
||||
AttachmentModel.prototype.framed = false;
|
||||
|
||||
/**
|
||||
* @param {AjaxJsonAttachment} oJsonAttachment
|
||||
|
|
@ -83,6 +85,7 @@
|
|||
this.folder = oJsonAttachment.Folder;
|
||||
this.uid = oJsonAttachment.Uid;
|
||||
this.mimeIndex = oJsonAttachment.MimeIndex;
|
||||
this.framed = !!oJsonAttachment.Framed;
|
||||
|
||||
this.friendlySize = Utils.friendlySize(this.estimatedSize);
|
||||
this.cidWithOutTags = this.cid.replace(/^<+/, '').replace(/>+$/, '');
|
||||
|
|
@ -120,6 +123,15 @@
|
|||
return Globals.bAllowPdfPreview && 'application/pdf' === this.mimeType;
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
AttachmentModel.prototype.isFramed = function ()
|
||||
{
|
||||
return this.framed && (Globals.__APP__ && Globals.__APP__.googlePreviewSupported()) &&
|
||||
!this.isPdf() && !this.isText() && !this.isImage();
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
|
|
@ -136,6 +148,14 @@
|
|||
return Links.attachmentPreview(this.download);
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
AttachmentModel.prototype.linkFramed = function ()
|
||||
{
|
||||
return Links.attachmentFramed(this.download);
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue