mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Attachments (redesign)
This commit is contained in:
parent
735842bb88
commit
f9640b3ffa
40 changed files with 293 additions and 110 deletions
|
|
@ -192,6 +192,37 @@
|
|||
return Links.attachmentPreviewAsPlain(this.download);
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
AttachmentModel.prototype.linkPreviewMain = function ()
|
||||
{
|
||||
var sResult = '';
|
||||
switch (true)
|
||||
{
|
||||
case this.isImage():
|
||||
case this.isPdf():
|
||||
sResult = this.linkPreview();
|
||||
break;
|
||||
case this.isText():
|
||||
sResult = this.linkPreviewAsPlain();
|
||||
break;
|
||||
case this.isFramed():
|
||||
sResult = this.linkFramed();
|
||||
break;
|
||||
}
|
||||
|
||||
return sResult;
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
AttachmentModel.prototype.hasPreview = function ()
|
||||
{
|
||||
return this.isImage() || this.isPdf() || this.isText() || this.isFramed();
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue