mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
More scrict rules
This commit is contained in:
parent
71b6407d61
commit
fb2e492ce8
30 changed files with 126 additions and 89 deletions
|
|
@ -72,7 +72,7 @@ AbstractSystemDropDownUserView.prototype.accountClick = function(oAccount, oEven
|
|||
|
||||
_.delay(function() {
|
||||
AccountStore.accounts.loading(false);
|
||||
}, 1000);
|
||||
}, Enums.Magics.Time1s);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ function LoginUserView()
|
|||
|
||||
_.delay(function() {
|
||||
self.additionalCode.focused(true);
|
||||
}, 100);
|
||||
}, Enums.Magics.Time100ms);
|
||||
}
|
||||
else if (oData.Admin)
|
||||
{
|
||||
|
|
@ -476,7 +476,7 @@ LoginUserView.prototype.onBuild = function()
|
|||
|
||||
});
|
||||
|
||||
}, 50);
|
||||
}, Enums.Magics.Time50ms);
|
||||
|
||||
Utils.triggerAutocompleteInputChange(true);
|
||||
};
|
||||
|
|
@ -500,7 +500,7 @@ LoginUserView.prototype.selectLanguageOnTab = function(bShift)
|
|||
var self = this;
|
||||
_.delay(function() {
|
||||
self.emailFocus(true);
|
||||
}, 5);
|
||||
}, Enums.Magics.Time50ms);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ FolderListMailBoxUserView.prototype.onBuild = function(oDom)
|
|||
|
||||
var
|
||||
iIndex = -1,
|
||||
iKeyCode = handler && 'up' === handler.shortcut ? 38 : 40,
|
||||
iKeyCode = handler && 'up' === handler.shortcut ? Enums.EventKeyCode.Up : Enums.EventKeyCode.Down,
|
||||
$items = $('.b-folders .e-item .e-link:not(.hidden):visible', oDom);
|
||||
|
||||
if (event && $items.length)
|
||||
|
|
@ -154,11 +154,11 @@ FolderListMailBoxUserView.prototype.onBuild = function(oDom)
|
|||
$items.eq(iIndex).removeClass('focused');
|
||||
}
|
||||
|
||||
if (38 === iKeyCode && 0 < iIndex)
|
||||
if (Enums.EventKeyCode.Up === iKeyCode && 0 < iIndex)
|
||||
{
|
||||
iIndex -= 1;
|
||||
}
|
||||
else if (40 === iKeyCode && iIndex < $items.length - 1)
|
||||
else if (Enums.EventKeyCode.Down === iKeyCode && iIndex < $items.length - 1)
|
||||
{
|
||||
iIndex += 1;
|
||||
}
|
||||
|
|
@ -220,7 +220,7 @@ FolderListMailBoxUserView.prototype.messagesDropOver = function(oFolder)
|
|||
oFolder.collapsed(false);
|
||||
require('App/User').default.setExpandedFolder(oFolder.fullNameHash, true);
|
||||
Utils.windowResize();
|
||||
}, 500);
|
||||
}, Enums.Magics.Time500ms);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ MessageListMailBoxUserView.prototype.goToUpUpOrDownDown = function(bUp)
|
|||
self.gotoPage(bUp ? oPrev : oNext);
|
||||
}
|
||||
|
||||
}, 350);
|
||||
}, Enums.Magics.Time350ms);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
|
@ -461,7 +461,7 @@ MessageListMailBoxUserView.prototype.searchEnterAction = function()
|
|||
MessageListMailBoxUserView.prototype.printableMessageCountForDeletion = function()
|
||||
{
|
||||
var iCnt = this.messageListCheckedOrSelectedUidsWithSubMails().length;
|
||||
return 1 < iCnt ? ' (' + (100 > iCnt ? iCnt : '99+') + ')' : '';
|
||||
return 1 < iCnt ? ' (' + (100 > iCnt ? iCnt : '99+') + ')' : ''; // eslint-disable-line no-magic-numbers
|
||||
};
|
||||
|
||||
MessageListMailBoxUserView.prototype.cancelSearch = function()
|
||||
|
|
@ -772,7 +772,7 @@ MessageListMailBoxUserView.prototype.onBuild = function(oDom)
|
|||
|
||||
if (!Globals.bMobileDevice && ifvisible && Settings.capa(Enums.Capa.Prefetch))
|
||||
{
|
||||
ifvisible.setIdleDuration(10);
|
||||
ifvisible.setIdleDuration(Enums.Magics.ifvisibleIdle10s);
|
||||
|
||||
ifvisible.idle(function() {
|
||||
self.prefetchNextTick();
|
||||
|
|
@ -980,7 +980,7 @@ MessageListMailBoxUserView.prototype.prefetchNextTick = function()
|
|||
{
|
||||
self.prefetchNextTick();
|
||||
}
|
||||
}, 1000);
|
||||
}, Enums.Magics.Time1s);
|
||||
|
||||
}, oMessage.folderFullNameRaw, oMessage.uid);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -547,7 +547,7 @@ MessageViewMailBoxUserView.prototype.checkHeaderHeight = function()
|
|||
if (this.oHeaderDom)
|
||||
{
|
||||
this.viewBodyTopValue(this.message() ? this.oHeaderDom.height() +
|
||||
20 /* padding-(top/bottom): 20px */ + 1 /* borded-bottom: 1px */ : 0);
|
||||
Enums.Magics.Size20px /* padding-(top/bottom): 20px */ + Enums.Magics.Size1px /* borded-bottom: 1px */ : 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -661,13 +661,13 @@ MessageViewMailBoxUserView.prototype.onBuild = function(oDom)
|
|||
|
||||
Events.sub('window.resize', _.throttle(function() {
|
||||
_.delay(fCheckHeaderHeight, 1);
|
||||
_.delay(fCheckHeaderHeight, 200);
|
||||
_.delay(fCheckHeaderHeight, 500);
|
||||
}, 50));
|
||||
_.delay(fCheckHeaderHeight, Enums.Magics.Time200ms);
|
||||
_.delay(fCheckHeaderHeight, Enums.Magics.Time500ms);
|
||||
}, Enums.Magics.Time50ms));
|
||||
|
||||
this.showFullInfo.subscribe(function(value) {
|
||||
Utils.windowResize();
|
||||
Utils.windowResize(250);
|
||||
Utils.windowResize(Enums.Magics.Time200ms);
|
||||
Local.set(Enums.ClientSideKeyName.MessageHeaderFullInfo, value ? '1' : '0');
|
||||
});
|
||||
|
||||
|
|
@ -695,7 +695,7 @@ MessageViewMailBoxUserView.prototype.onBuild = function(oDom)
|
|||
oDom
|
||||
.on('click', 'a', function(oEvent) {
|
||||
// setup maito protocol
|
||||
return !(!!oEvent && 3 !== oEvent.which && Utils.mailToHelper(
|
||||
return !(!!oEvent && Enums.Magics.EventWhichMouseMiddle !== oEvent.which && Utils.mailToHelper(
|
||||
$(this).attr('href'), Settings.capa(Enums.Capa.Composer) ? require('View/Popup/Compose') : null
|
||||
));
|
||||
})
|
||||
|
|
@ -1033,11 +1033,11 @@ MessageViewMailBoxUserView.prototype.scrollMessageToTop = function()
|
|||
{
|
||||
if (this.oMessageScrollerDom)
|
||||
{
|
||||
if (50 < this.oMessageScrollerDom.scrollTop())
|
||||
if (Enums.Size50px < this.oMessageScrollerDom.scrollTop())
|
||||
{
|
||||
this.oMessageScrollerDom
|
||||
.scrollTop(50)
|
||||
.animate({'scrollTop': 0}, 200);
|
||||
.scrollTop(Enums.Size50px)
|
||||
.animate({'scrollTop': 0}, Enums.Time200ms);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1192,7 +1192,7 @@ MessageViewMailBoxUserView.prototype.showImages = function(oMessage)
|
|||
MessageViewMailBoxUserView.prototype.printableCheckedMessageCount = function()
|
||||
{
|
||||
var iCnt = this.messageListCheckedOrSelectedUidsWithSubMails().length;
|
||||
return 0 < iCnt ? (100 > iCnt ? iCnt : '99+') : '';
|
||||
return 0 < iCnt ? (100 > iCnt ? iCnt : '99+') : ''; // eslint-disable-line no-magic-numbers
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue