Attachments (redesign)

This commit is contained in:
RainLoop Team 2014-12-27 23:48:55 +04:00
parent 735842bb88
commit f9640b3ffa
40 changed files with 293 additions and 110 deletions

View file

@ -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}
*/