Interface redesign (attachments, new preview pane layout)

This commit is contained in:
RainLoop Team 2015-01-04 23:30:07 +04:00
parent 6755a0ce51
commit e3e7c1d963
64 changed files with 1286 additions and 1009 deletions

View file

@ -167,13 +167,21 @@
return Links.attachmentPreview(this.download);
};
/**
* @return {string}
*/
AttachmentModel.prototype.linkThumbnail = function ()
{
return this.hasThumbnail() ? Links.attachmentThumbnailPreview(this.download) : '';
};
/**
* @return {string}
*/
AttachmentModel.prototype.linkThumbnailPreviewStyle = function ()
{
return !this.hasThumbnail() ? '' :
'background:url(' + Links.attachmentThumbnailPreview(this.download) + ')';
var sLink = this.linkThumbnail();
return '' === sLink ? '' : 'background:url(' + sLink + ')';
};
/**
@ -211,7 +219,7 @@
sResult = this.linkFramed();
break;
}
return sResult;
};
@ -253,10 +261,14 @@
return true;
};
AttachmentModel.prototype.iconClass = function ()
/**
* @param {string} sMimeType
* @returns {string}
*/
AttachmentModel.staticIconClassHelper = function (sMimeType)
{
var
aParts = this.mimeType.toLocaleString().split('/'),
aParts = sMimeType.toLocaleString().split('/'),
sClass = 'icon-file'
;
@ -333,6 +345,14 @@
return sClass;
};
/**
* @returns {string}
*/
AttachmentModel.prototype.iconClass = function ()
{
return AttachmentModel.staticIconClassHelper(this.mimeType);
};
module.exports = AttachmentModel;
}());