mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Interface redesign (attachments, new preview pane layout)
This commit is contained in:
parent
6755a0ce51
commit
e3e7c1d963
64 changed files with 1286 additions and 1009 deletions
|
|
@ -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;
|
||||
|
||||
}());
|
||||
Loading…
Add table
Add a link
Reference in a new issue