mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
Code refactoring
This commit is contained in:
parent
4a95dd6195
commit
36329110e5
81 changed files with 3474 additions and 2124 deletions
|
|
@ -77,7 +77,6 @@
|
|||
oViewModelPlace = this.oViewModelPlace;
|
||||
if (oViewModelPlace && 1 === oViewModelPlace.length)
|
||||
{
|
||||
RoutedSettingsViewModel = /** @type {?Function} */ RoutedSettingsViewModel;
|
||||
oSettingsScreen = new RoutedSettingsViewModel();
|
||||
|
||||
oViewModelDom = $('<div></div>').addClass('rl-settings-view-model').hide();
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
AdminLoginScreen.prototype.onShow = function ()
|
||||
{
|
||||
var RL = require('../Boots/AdminApp.js');
|
||||
RL.setTitle('');
|
||||
var App = require('../Apps/AdminApp.js');
|
||||
App.setTitle('');
|
||||
};
|
||||
|
||||
module.exports = AdminLoginScreen;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
|
||||
AdminSettingsScreen.prototype.onShow = function ()
|
||||
{
|
||||
var RL = require('../Boots/AdminApp.js');
|
||||
RL.setTitle('');
|
||||
var App = require('../Apps/AdminApp.js');
|
||||
App.setTitle('');
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsScreen;
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
LoginScreen.prototype.onShow = function ()
|
||||
{
|
||||
var RL = require('../Boots/RainLoopApp.js');
|
||||
RL.setTitle('');
|
||||
var App = require('../Apps/RainLoopApp.js');
|
||||
App.setTitle('');
|
||||
};
|
||||
|
||||
module.exports = LoginScreen;
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@
|
|||
MailBoxScreen.prototype.setNewTitle = function ()
|
||||
{
|
||||
var
|
||||
RL = require('../Boots/RainLoopApp.js'),
|
||||
App = require('../Apps/RainLoopApp.js'),
|
||||
sEmail = Data.accountEmail(),
|
||||
nFoldersInboxUnreadCount = Data.foldersInboxUnreadCount()
|
||||
;
|
||||
|
||||
RL.setTitle(('' === sEmail ? '' :
|
||||
App.setTitle(('' === sEmail ? '' :
|
||||
(0 < nFoldersInboxUnreadCount ? '(' + nFoldersInboxUnreadCount + ') ' : ' ') + sEmail + ' - ') + Utils.i18n('TITLES/MAILBOX'));
|
||||
};
|
||||
|
||||
|
|
@ -77,12 +77,12 @@
|
|||
*/
|
||||
MailBoxScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch, bPreview)
|
||||
{
|
||||
var RL = require('../Boots/RainLoopApp.js');
|
||||
var App = require('../Apps/RainLoopApp.js');
|
||||
if (Utils.isUnd(bPreview) ? false : !!bPreview)
|
||||
{
|
||||
if (Enums.Layout.NoPreview === Data.layout() && !Data.message())
|
||||
{
|
||||
RL.historyBack();
|
||||
App.historyBack();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
Data.message(null);
|
||||
}
|
||||
|
||||
RL.reloadMessageList();
|
||||
App.reloadMessageList();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
MailBoxScreen.prototype.onStart = function ()
|
||||
{
|
||||
var
|
||||
RL = require('../Boots/RainLoopApp.js'),
|
||||
App = require('../Apps/RainLoopApp.js'),
|
||||
fResizeFunction = function () {
|
||||
Utils.windowResize();
|
||||
}
|
||||
|
|
@ -121,18 +121,18 @@
|
|||
|
||||
if (AppSettings.capa(Enums.Capa.AdditionalAccounts) || AppSettings.capa(Enums.Capa.AdditionalIdentities))
|
||||
{
|
||||
RL.accountsAndIdentities();
|
||||
App.accountsAndIdentities();
|
||||
}
|
||||
|
||||
_.delay(function () {
|
||||
if ('INBOX' !== Data.currentFolderFullNameRaw())
|
||||
{
|
||||
RL.folderInformation('INBOX');
|
||||
App.folderInformation('INBOX');
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
_.delay(function () {
|
||||
RL.quota();
|
||||
App.quota();
|
||||
}, 5000);
|
||||
|
||||
_.delay(function () {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
function SettingsScreen()
|
||||
{
|
||||
var
|
||||
RL = require('../Boots/RainLoopApp.js'),
|
||||
App = require('../Apps/RainLoopApp.js'),
|
||||
|
||||
SettingsSystemDropDownViewModel = require('../ViewModels/SettingsSystemDropDownViewModel.js'),
|
||||
SettingsMenuViewModel = require('../ViewModels/SettingsMenuViewModel.js'),
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
Utils.initOnStartOrLangChange(function () {
|
||||
this.sSettingsTitle = Utils.i18n('TITLES/SETTINGS');
|
||||
}, this, function () {
|
||||
RL.setTitle(this.sSettingsTitle);
|
||||
App.setTitle(this.sSettingsTitle);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -45,9 +45,9 @@
|
|||
|
||||
SettingsScreen.prototype.onShow = function ()
|
||||
{
|
||||
var RL = require('../Boots/RainLoopApp.js');
|
||||
var App = require('../Apps/RainLoopApp.js');
|
||||
|
||||
RL.setTitle(this.sSettingsTitle);
|
||||
App.setTitle(this.sSettingsTitle);
|
||||
Globals.keyScope(Enums.KeyState.Settings);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue