mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 19:19:21 +03:00
Optimizations
Added "[labs]imap_folder_list_limit" setting (optimization)
This commit is contained in:
parent
833f40c115
commit
7ef9ebb45f
22 changed files with 878 additions and 32 deletions
|
|
@ -75,8 +75,8 @@
|
|||
var bResult = false;
|
||||
if (oJsonAttachment && 'Object/Attachment' === oJsonAttachment['@Object'])
|
||||
{
|
||||
this.mimeType = (oJsonAttachment.MimeType || '').toLowerCase();
|
||||
this.fileName = oJsonAttachment.FileName;
|
||||
this.mimeType = Utils.trim((oJsonAttachment.MimeType || '').toLowerCase());
|
||||
this.fileName = Utils.trim(oJsonAttachment.FileName);
|
||||
this.estimatedSize = Utils.pInt(oJsonAttachment.EstimatedSize);
|
||||
this.isInline = !!oJsonAttachment.IsInline;
|
||||
this.isLinked = !!oJsonAttachment.IsLinked;
|
||||
|
|
@ -122,8 +122,8 @@
|
|||
*/
|
||||
AttachmentModel.prototype.isText = function ()
|
||||
{
|
||||
return 'text/' === this.mimeType.substr(0, 5) &&
|
||||
-1 === Utils.inArray(this.mimeType, ['text/html']);
|
||||
return -1 < Utils.inArray(this.mimeType, ['application/pgp-signature']) ||
|
||||
('text/' === this.mimeType.substr(0, 5) && -1 === Utils.inArray(this.mimeType, ['text/html']));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -267,9 +267,12 @@
|
|||
*/
|
||||
AttachmentModel.staticIconClassHelper = function (sMimeType)
|
||||
{
|
||||
sMimeType = Utils.trim(sMimeType).toLowerCase();
|
||||
|
||||
var
|
||||
aParts = sMimeType.toLocaleString().split('/'),
|
||||
sClass = 'icon-file'
|
||||
sText = '',
|
||||
sClass = 'icon-file',
|
||||
aParts = sMimeType.split('/')
|
||||
;
|
||||
|
||||
if (aParts && aParts[1])
|
||||
|
|
@ -295,17 +298,24 @@
|
|||
{
|
||||
sClass = 'icon-file-zip';
|
||||
}
|
||||
// else if (-1 < Utils.inArray(aParts[1],
|
||||
// ['pdf', 'x-pdf']))
|
||||
// {
|
||||
// sClass = 'icon-file-pdf';
|
||||
// }
|
||||
else if (-1 < Utils.inArray(aParts[1],
|
||||
['pdf', 'x-pdf']))
|
||||
{
|
||||
sText = 'pdf'
|
||||
sClass = 'icon-none';
|
||||
}
|
||||
// else if (-1 < Utils.inArray(aParts[1], [
|
||||
// 'exe', 'x-exe', 'x-winexe', 'bat'
|
||||
// ]))
|
||||
// {
|
||||
// sClass = 'icon-console';
|
||||
// }
|
||||
else if (-1 < Utils.inArray(sMimeType, [
|
||||
'application/pgp-signature'
|
||||
]))
|
||||
{
|
||||
sClass = 'icon-file-certificate';
|
||||
}
|
||||
else if (-1 < Utils.inArray(aParts[1], [
|
||||
'rtf', 'msword', 'vnd.msword', 'vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'vnd.openxmlformats-officedocument.wordprocessingml.template',
|
||||
|
|
@ -342,7 +352,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
return sClass;
|
||||
return [sClass, sText];
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -350,7 +360,15 @@
|
|||
*/
|
||||
AttachmentModel.prototype.iconClass = function ()
|
||||
{
|
||||
return AttachmentModel.staticIconClassHelper(this.mimeType);
|
||||
return AttachmentModel.staticIconClassHelper(this.mimeType)[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
AttachmentModel.prototype.iconText = function ()
|
||||
{
|
||||
return AttachmentModel.staticIconClassHelper(this.mimeType)[1];
|
||||
};
|
||||
|
||||
module.exports = AttachmentModel;
|
||||
|
|
|
|||
|
|
@ -91,6 +91,9 @@
|
|||
case 'doc':
|
||||
sClass = 'icon-file-text';
|
||||
break;
|
||||
case 'certificate':
|
||||
sClass = 'icon-file-certificate';
|
||||
break;
|
||||
// case 'pdf':
|
||||
// sClass = 'icon-file-pdf';
|
||||
// break;
|
||||
|
|
@ -628,6 +631,10 @@
|
|||
{
|
||||
aResult.push('focused');
|
||||
}
|
||||
if (this.isImportant())
|
||||
{
|
||||
aResult.push('important');
|
||||
}
|
||||
if (this.hasAttachments())
|
||||
{
|
||||
aResult.push('withAttachments');
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
{
|
||||
this.layout(mLayout);
|
||||
}
|
||||
|
||||
|
||||
this.facebookSupported(!!Settings.settingsGet('SupportedFacebookSocial'));
|
||||
this.facebookEnable(!!Settings.settingsGet('AllowFacebookSocial'));
|
||||
this.facebookAppID(Settings.settingsGet('FacebookAppID'));
|
||||
|
|
|
|||
|
|
@ -242,6 +242,17 @@ html.rl-no-preview-pane {
|
|||
background-color: #ccc !important;
|
||||
}
|
||||
|
||||
.importantMark {
|
||||
display: none;
|
||||
|
||||
color:red;
|
||||
margin-right:5px
|
||||
}
|
||||
|
||||
&.important .importantMark {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
&.e-single-line {
|
||||
height: 35px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -309,6 +309,21 @@ html.rl-no-preview-pane {
|
|||
color: #aaa;
|
||||
}
|
||||
|
||||
.attachmentIconText {
|
||||
display: inline-block;
|
||||
font-size: 28px;
|
||||
width: 60px;
|
||||
height: 56px;
|
||||
color: #aaa;
|
||||
line-height: 56px;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.attachmentIcon.icon-none {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.attachmentIconParent.hasPreview:hover {
|
||||
.iconPreview {
|
||||
display: inline-block;
|
||||
|
|
|
|||
|
|
@ -119,6 +119,15 @@
|
|||
|
||||
animation: rotation .8s infinite linear;
|
||||
}
|
||||
|
||||
&.big {
|
||||
|
||||
height: 13px;
|
||||
width: 13px;
|
||||
|
||||
margin-top: -2px;
|
||||
margin-left: -2px;
|
||||
}
|
||||
}
|
||||
|
||||
html.no-cssanimations .icon-spinner {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
'placement': 'top',
|
||||
'trigger': 'hover',
|
||||
'title': 'About',
|
||||
'container': 'body',
|
||||
'content': function () {
|
||||
return self.readme();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -900,6 +900,13 @@
|
|||
})
|
||||
;
|
||||
|
||||
this.dragOver.subscribe(function (bValue) {
|
||||
if (bValue)
|
||||
{
|
||||
this.selector.scrollToTop();
|
||||
}
|
||||
}, this);
|
||||
|
||||
oJua
|
||||
.on('onDragEnter', _.bind(function () {
|
||||
this.dragOverEnter(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue