CommonJS (research/4)

This commit is contained in:
RainLoop Team 2014-08-25 11:10:51 +04:00
parent 06bb124379
commit 8d73c7b1b2
127 changed files with 1893 additions and 1085 deletions

View file

@ -50,6 +50,9 @@
"jquery" : true,
"globals": {
"module" : true,
"require" : true,
"ko" : true,
"ko" : true,
"ssm" : true,
"moment" : true,

View file

@ -1,14 +1,10 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
AppSettings = require('../Storages/AppSettings.js'),
Data = require('../Storages/AdminDataStorage.js'),
RL = require('../Boots/AdminApp.js')
ko = require('../External/ko.js')
;
/**
@ -16,6 +12,11 @@
*/
function AdminSettingsAbout()
{
var
AppSettings = require('../Storages/AppSettings.js'),
Data = require('../Storages/AdminDataStorage.js')
;
this.version = ko.observable(AppSettings.settingsGet('Version'));
this.access = ko.observable(!!AppSettings.settingsGet('CoreAccess'));
this.errorDesc = ko.observable('');
@ -70,7 +71,7 @@
{
if (this.access())
{
RL.reloadCoreData();
require('../Boots/AdminApp.js').reloadCoreData();
}
};
@ -78,7 +79,7 @@
{
if (!this.coreUpdating())
{
RL.updateCoreData();
require('../Boots/AdminApp.js').updateCoreData();
}
};

View file

@ -1,18 +1,13 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),
Enums = require('../Common/Enums.js'),
Utils = require('../Common/Utils.js'),
AppSettings = require('..Storages/AppSettings.js'),
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
Utils = require('../Common/Utils.js')
;
/**
@ -20,6 +15,11 @@
*/
function AdminSettingsBranding()
{
var
Enums = require('../Common/Enums.js'),
AppSettings = require('..Storages/AppSettings.js')
;
this.title = ko.observable(AppSettings.settingsGet('Title'));
this.title.trigger = ko.observable(Enums.SaveSettingsStep.Idle);
@ -38,7 +38,11 @@
AdminSettingsBranding.prototype.onBuild = function ()
{
var self = this;
var
self = this,
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
;
_.delay(function () {
var

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),
@ -11,8 +10,7 @@
Enums = require('../Common/Enums.js'),
Utils = require('../Common/Utils.js'),
AppSettings = require('../Storages/AppSettings.js'),
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
AppSettings = require('../Storages/AppSettings.js')
;
/**
@ -20,6 +18,10 @@
*/
function AdminSettingsContacts()
{
var
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
;
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
this.enableContacts = ko.observable(!!AppSettings.settingsGet('ContactsEnable'));
this.contactsSharing = ko.observable(!!AppSettings.settingsGet('ContactsSharing'));
@ -174,7 +176,11 @@
AdminSettingsContacts.prototype.onBuild = function ()
{
var self = this;
var
self = this,
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
;
_.delay(function () {
var

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
_ = require('../External/underscore.js'),
@ -11,7 +10,7 @@
Enums = require('../Common/Enums.js'),
RL = require('../Boots/AdminApp.js'),
PopupsDomainViewModel = require('../ViewModels/Popups/PopupsDomainViewModel.js'),
Data = require('../Storages/AdminDataStorage.js'),
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
@ -58,7 +57,7 @@
AdminSettingsDomains.prototype.createDomain = function ()
{
kn.showScreenPopup(PopupsDomainViewModel);
require('../Knoin/Knoin.js').showScreenPopup(PopupsDomainViewModel);
};
AdminSettingsDomains.prototype.deleteDomain = function (oDomain)
@ -86,20 +85,20 @@
})
;
RL.reloadDomainList();
require('../Boots/AdminApp.js').reloadDomainList();
};
AdminSettingsDomains.prototype.onDomainLoadRequest = function (sResult, oData)
{
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
kn.showScreenPopup(PopupsDomainViewModel, [oData.Result]);
require('../Knoin/Knoin.js').showScreenPopup(PopupsDomainViewModel, [oData.Result]);
}
};
AdminSettingsDomains.prototype.onDomainListChangeRequest = function ()
{
RL.reloadDomainList();
require('../Boots/AdminApp.js').reloadDomainList();
};
module.exports = AdminSettingsDomains;

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),
@ -12,11 +11,8 @@
Utils = require('../Common/Utils.js'),
LinkBuilder = require('../Common/LinkBuilder.js'),
kn = require('../Knoin/Knoin.js'),
AppSettings = require('../Storages/AppSettings.js'),
Data = require('../Storages/AdminDataStorage.js'),
Remote = require('../Storages/AdminAjaxRemoteStorage.js'),
PopupsLanguagesViewModel = require('../ViewModels/Popups/PopupsLanguagesViewModel.js')
;
@ -69,7 +65,11 @@
AdminSettingsGeneral.prototype.onBuild = function ()
{
var self = this;
var
self = this,
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
;
_.delay(function () {
var
@ -131,7 +131,7 @@
AdminSettingsGeneral.prototype.selectLanguage = function ()
{
kn.showScreenPopup(PopupsLanguagesViewModel);
require('../Knoin/Knoin.js').showScreenPopup(PopupsLanguagesViewModel);
};
/**

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
moment = require('../External/moment.js'),
@ -11,9 +10,6 @@
AppSettings = require('../Storages/AppSettings.js'),
Data = require('../Storages/AdminDataStorage.js'),
RL = require('../Boots/AdminApp.js'),
kn = require('../Knoin/Knoin.js'),
PopupsActivateViewModel = require('../ViewModels/Popups/PopupsActivateViewModel.js')
;
@ -35,7 +31,7 @@
this.licenseTrigger.subscribe(function () {
if (this.subscriptionEnabled())
{
RL.reloadLicensing(true);
require('../Boots/AdminApp.js').reloadLicensing(true);
}
}, this);
}
@ -44,7 +40,7 @@
{
if (this.subscriptionEnabled())
{
RL.reloadLicensing(false);
require('../Boots/AdminApp.js').reloadLicensing(false);
}
};
@ -55,7 +51,7 @@
AdminSettingsLicensing.prototype.showActivationForm = function ()
{
kn.showScreenPopup(PopupsActivateViewModel);
require('../Knoin/Knoin.js').showScreenPopup(PopupsActivateViewModel);
};
/**

View file

@ -1,18 +1,17 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),
Enums = require('../Common/Enums.js'),
Utils = require('../Common/Utils.js'),
AppSettings = require('../Storages/AppSettings.js'),
Data = require('../Storages/AdminDataStorage.js'),
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
Data = require('../Storages/AdminDataStorage.js')
;
/**
@ -31,7 +30,11 @@
AdminSettingsLogin.prototype.onBuild = function ()
{
var self = this;
var
self = this,
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
;
_.delay(function () {
var f1 = Utils.settingsSaveHelperSimpleFunction(self.defaultDomainTrigger, self);

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
ko = require('../External/ko.js'),
@ -11,8 +10,6 @@
Enums = require('../Common/Enums.js'),
Utils = require('../Common/Utils.js'),
RL = require('../Boots/AdminApp.js'),
Data = require('../Storages/AdminDataStorage.js'),
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
;
@ -53,7 +50,7 @@
AdminSettingsPackages.prototype.onBuild = function ()
{
RL.reloadPackagesList();
require('../Boots/AdminApp.js').reloadPackagesList();
};
AdminSettingsPackages.prototype.requestHelper = function (oPackage, bInstall)
@ -88,7 +85,7 @@
}
else
{
RL.reloadPackagesList();
require('../Boots/AdminApp.js').reloadPackagesList();
}
};
};

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),
@ -15,8 +14,6 @@
Data = require('../Storages/AdminDataStorage.js'),
Remote = require('../Storages/AdminAjaxRemoteStorage.js'),
RL = require('../Boots/AdminApp.js'),
PopupsPluginViewModel = require('../ViewModels/Popups/PopupsPluginViewModel.js')
;
@ -82,14 +79,14 @@
AdminSettingsPlugins.prototype.onShow = function ()
{
this.pluginsError('');
RL.reloadPluginList();
require('../Boots/AdminApp.js').reloadPluginList();
};
AdminSettingsPlugins.prototype.onPluginLoadRequest = function (sResult, oData)
{
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
kn.showScreenPopup(PopupsPluginViewModel, [oData.Result]);
require('../Knoin/Knoin.js').showScreenPopup(PopupsPluginViewModel, [oData.Result]);
}
};
@ -110,7 +107,7 @@
}
}
RL.reloadPluginList();
require('../Boots/AdminApp.js').reloadPluginList();
};
module.exports = AdminSettingsPlugins;

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),
@ -94,6 +93,10 @@
AdminSettingsSecurity.prototype.onBuild = function ()
{
var
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
;
this.capaOpenPGP.subscribe(function (bValue) {
Remote.saveAdminConfig(Utils.emptyFunction, {
'CapaOpenPGP': bValue ? '1' : '0'

View file

@ -1,18 +1,14 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),
Enums = require('../Common/Enums.js'),
Utils = require('../Common/Utils.js'),
Data = require('../Storages/AdminDataStorage.js'),
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
Utils = require('../Common/Utils.js')
;
/**
@ -20,6 +16,8 @@
*/
function AdminSettingsSocial()
{
var Data = require('../Storages/AdminDataStorage.js');
this.googleEnable = Data.googleEnable;
this.googleClientID = Data.googleClientID;
this.googleApiKey = Data.googleApiKey;
@ -48,7 +46,11 @@
AdminSettingsSocial.prototype.onBuild = function ()
{
var self = this;
var
self = this,
Remote = require('../Storages/AdminAjaxRemoteStorage.js')
;
_.delay(function () {
var

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
$ = require('../External/jquery.js'),
_ = require('../External/underscore.js'),
@ -19,7 +18,6 @@
AppSettings = require('../Storages/AppSettings.js'),
kn = require('../Knoin/Knoin.js'),
KnoinAbstractBoot = require('../Knoin/KnoinAbstractBoot.js')
;
@ -143,6 +141,7 @@
AbstractApp.prototype.loginAndLogoutReload = function (bLogout, bClose)
{
var
kn = require('../Knoin/Knoin.js'),
sCustomLogoutLink = Utils.pString(AppSettings.settingsGet('CustomLogoutLink')),
bInIframe = !!AppSettings.settingsGet('InIframe')
;
@ -192,15 +191,6 @@
window.history.back();
};
/**
* @param {string} sQuery
* @param {Function} fCallback
*/
AbstractApp.prototype.getAutocomplete = function (sQuery, fCallback)
{
fCallback([], sQuery);
};
AbstractApp.prototype.bootstart = function ()
{
Events.pub('rl.bootstart');

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
_ = require('../External/underscore.js'),

View file

@ -1,11 +1,11 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
_ = require('../External/underscore.js'),
$ = require('../External/jquery.js'),
$window = require('../External/$window.js'),
$html = require('../External/$html.js'),
@ -15,15 +15,15 @@
Utils = require('../Common/Utils.js')
;
module.exports = function (RL) {
module.exports = function (App) {
Globals.__RL = RL;
Globals.__RL = App;
RL.setupSettings();
App.setupSettings();
Plugins.__boot = RL;
Plugins.__remote = RL.remote();
Plugins.__data = RL.data();
Plugins.__boot = App;
Plugins.__remote = App.remote();
Plugins.__data = App.data();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
@ -58,7 +58,7 @@
_.delay(function () {
RL.bootstart();
App.bootstart();
$html.removeClass('no-js rl-booted-trigger').addClass('rl-booted');
}, 50);

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
$ = require('../External/jquery.js'),
@ -26,10 +25,12 @@
Cache = require('../Storages/WebMailCacheStorage.js'),
Remote = require('../Storages/WebMailAjaxRemoteStorage.js'),
EmailModel = require('../Models/EmailModel.js'),
FolderModel = require('../Models/FolderModel.js'),
MessageModel = require('../Models/MessageModel.js'),
AccountModel = require('../Models/AccountModel.js'),
IdentityModel = require('../Models/IdentityModel.js'),
OpenPgpKeyModel = require('../Models/OpenPgpKeyModel.js'),
PopupsFolderSystemViewModel = require('../ViewModels/Popups/PopupsAskViewModel.js'),
PopupsAskViewModel = require('../ViewModels/Popups/PopupsAskViewModel.js'),
@ -90,6 +91,7 @@
}, 60000 * 5);
$.wakeUp(function () {
Remote.jsVersion(function (sResult, oData) {
if (Enums.StorageResultType.Success === sResult && oData && !oData.Result)
{
@ -103,6 +105,7 @@
}
}
}, self.settingsGet('Version'));
}, {}, 60 * 60 * 1000);
@ -176,9 +179,9 @@
'SettingsSecurity', 'SETTINGS_LABELS/LABEL_SECURITY_NAME', 'security');
}
if (!AppSettings.settingsGet('AllowGoogleSocial') &&
!AppSettings.settingsGet('AllowFacebookSocial') &&
!AppSettings.settingsGet('AllowTwitterSocial'))
if (AppSettings.settingsGet('AllowGoogleSocial') ||
AppSettings.settingsGet('AllowFacebookSocial') ||
AppSettings.settingsGet('AllowTwitterSocial'))
{
kn.addSettingsViewModel(SettingsSocial,
'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
@ -272,7 +275,7 @@
RainLoopApp.prototype.reloadMessageListHelper = function (bEmptyList)
{
self.reloadMessageList(bEmptyList);
this.reloadMessageList(bEmptyList);
};
/**
@ -1081,6 +1084,7 @@
RainLoopApp.prototype.folderResponseParseRec = function (sNamespace, aFolders)
{
var
self = this,
iIndex = 0,
iLen = 0,
oFolder = null,
@ -1110,10 +1114,7 @@
if (oCacheFolder)
{
if (Globals.__RL)
{
oCacheFolder.collapsed(!Globals.__RL.isFolderExpanded(oCacheFolder.fullNameHash));
}
oCacheFolder.collapsed(!self.isFolderExpanded(oCacheFolder.fullNameHash));
if (oFolder.Extended)
{

View file

@ -1,10 +1,9 @@
// Base64 encode / decode
// http://www.webtoolkit.info/
'use strict';
(function (module) {
'use strict';
/*jslint bitwise: true*/
var Base64 = {

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var Consts = {};
Consts.Values = {};

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var Enums = {};
/**

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
Globals = {},
window = require('../External/window.js'),

View file

@ -1,13 +1,11 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
Utils = require('./Utils.js'),
AppSettings = require('../Storages/AppSettings.js')
Utils = require('./Utils.js')
;
/**
@ -15,6 +13,8 @@
*/
function LinkBuilder()
{
var AppSettings = require('../Storages/AppSettings.js');
this.sBase = '#/';
this.sServer = './?';
this.sVersion = AppSettings.settingsGet('Version');

View file

@ -1,11 +1,11 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
_ = require('../External/underscore.js'),
Globals = require('./Globals.js'),
AppSettings = require('../Storages/AppSettings.js')
;
@ -19,18 +19,17 @@
*/
function NewHtmlEditorWrapper(oElement, fOnBlur, fOnReady, fOnModeChange)
{
var self = this;
self.editor = null;
self.iBlurTimer = 0;
self.fOnBlur = fOnBlur || null;
self.fOnReady = fOnReady || null;
self.fOnModeChange = fOnModeChange || null;
this.editor = null;
this.iBlurTimer = 0;
this.fOnBlur = fOnBlur || null;
this.fOnReady = fOnReady || null;
this.fOnModeChange = fOnModeChange || null;
self.$element = $(oElement);
this.$element = $(oElement);
self.resize = _.throttle(_.bind(self.resize, self), 100);
this.resize = _.throttle(_.bind(this.resize, this), 100);
self.init();
this.init();
}
NewHtmlEditorWrapper.prototype.blurTrigger = function ()
@ -38,8 +37,8 @@
if (this.fOnBlur)
{
var self = this;
window.clearTimeout(self.iBlurTimer);
self.iBlurTimer = window.setTimeout(function () {
window.clearTimeout(this.iBlurTimer);
this.iBlurTimer = window.setTimeout(function () {
self.fOnBlur();
}, 200);
}

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
Plugins = {
__boot: null,

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
$ = require('../External/jquery.js'),
_ = require('../External/underscore.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
Utils = {},
@ -13,6 +12,7 @@
window = require('../External/window.js'),
$window = require('../External/$window.js'),
$html = require('../External/$html.js'),
$div = require('../External/$div.js'),
$doc = require('../External/$doc.js'),
NotificationClass = require('../External/NotificationClass.js'),
@ -462,14 +462,14 @@
*/
Utils.inFocus = function ()
{
if (document.activeElement)
if (window.document.activeElement)
{
if (Utils.isUnd(document.activeElement.__inFocusCache))
if (Utils.isUnd(window.document.activeElement.__inFocusCache))
{
document.activeElement.__inFocusCache = $(document.activeElement).is('input,textarea,iframe,.cke_editable');
window.document.activeElement.__inFocusCache = $(window.document.activeElement).is('input,textarea,iframe,.cke_editable');
}
return !!document.activeElement.__inFocusCache;
return !!window.document.activeElement.__inFocusCache;
}
return false;
@ -477,12 +477,12 @@
Utils.removeInFocus = function ()
{
if (document && document.activeElement && document.activeElement.blur)
if (window.document && window.document.activeElement && window.document.activeElement.blur)
{
var oA = $(document.activeElement);
var oA = $(window.document.activeElement);
if (oA.is('input,textarea'))
{
document.activeElement.blur();
window.document.activeElement.blur();
}
}
};
@ -497,9 +497,9 @@
oSel.removeAllRanges();
}
}
else if (document && document.selection && document.selection.empty)
else if (window.document && window.document.selection && window.document.selection.empty)
{
document.selection.empty();
window.document.selection.empty();
}
};
@ -919,11 +919,14 @@
{
var
fResult = fExecute ? function () {
if (fResult.canExecute && fResult.canExecute())
if (fResult && fResult.canExecute && fResult.canExecute())
{
fExecute.apply(oContext, Array.prototype.slice.call(arguments));
}
return false;
} : function () {}
;
@ -1466,8 +1469,6 @@
return Utils.settingsSaveHelperFunction(null, koTrigger, oContext, 1000);
};
Utils.$div = $('<div></div>');
/**
* @param {string} sHtml
* @return {string}
@ -1576,7 +1577,7 @@
.replace(/<[^>]*>/gm, '')
;
sText = Utils.$div.html(sText).text();
sText = $div.html(sText).text();
sText = sText
.replace(/\n[ \t]+/gm, '\n')
@ -1713,7 +1714,7 @@
{
if ($.fn && $.fn.linkify)
{
sHtml = Utils.$div.html(sHtml.replace(/&amp;/ig, 'amp_amp_12345_amp_amp'))
sHtml = $div.html(sHtml.replace(/&amp;/ig, 'amp_amp_12345_amp_amp'))
.linkify()
.find('.linkified').removeClass('linkified').end()
.html()
@ -1731,7 +1732,7 @@
var
aDiff = [0, 0],
oCanvas = document.createElement('canvas'),
oCanvas = window.document.createElement('canvas'),
oCtx = oCanvas.getContext('2d')
;

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = require('./jquery.js')('<div></div>');

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = require('./jquery.js')(window.document);

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = require('./jquery.js')('html');

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = require('./jquery.js')(window);

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = require('./window.js')['rainloopAppData'] || {};

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = JSON;

1
dev/External/Jua.js vendored
View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = Jua;

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
var window = require('./window.js');

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = crossroads;

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = hasher;

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = ifvisible;

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = $;

1
dev/External/key.js vendored
View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = key;

61
dev/External/ko.js vendored
View file

@ -1,8 +1,7 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
(function (module, ko) {
var
window = require('./window.js'),
@ -55,10 +54,10 @@
ko.bindingHandlers.tooltip2 = {
'init': function (oElement, fValueAccessor) {
var
Globals = require('../Common/Globals.js'),
$oEl = $(oElement),
sClass = $oEl.data('tooltip-class') || '',
sPlacement = $oEl.data('tooltip-placement') || 'top',
Globals = require('../Common/Globals.js')
sPlacement = $oEl.data('tooltip-placement') || 'top'
;
$oEl.tooltip({
@ -122,11 +121,7 @@
ko.bindingHandlers.registrateBootstrapDropdown = {
'init': function (oElement) {
var
Globals = require('../Common/Globals.js')
;
var Globals = require('../Common/Globals.js');
Globals.aBootstrapDropdowns.push($(oElement));
}
};
@ -167,11 +162,7 @@
ko.bindingHandlers.csstext = {
'init': function (oElement, fValueAccessor) {
var
Utils = require('../Common/Utils.js')
;
var Utils = require('../Common/Utils.js');
if (oElement && oElement.styleSheet && !Utils.isUnd(oElement.styleSheet.cssText))
{
oElement.styleSheet.cssText = ko.utils.unwrapObservable(fValueAccessor());
@ -182,11 +173,7 @@
}
},
'update': function (oElement, fValueAccessor) {
var
Utils = require('../Common/Utils.js')
;
var Utils = require('../Common/Utils.js');
if (oElement && oElement.styleSheet && !Utils.isUnd(oElement.styleSheet.cssText))
{
oElement.styleSheet.cssText = ko.utils.unwrapObservable(fValueAccessor());
@ -268,6 +255,7 @@
.find('.close').click(function () {
fValueAccessor()(false);
});
},
'update': function (oElement, fValueAccessor) {
$(oElement).modal(ko.utils.unwrapObservable(fValueAccessor()) ? 'show' : 'hide');
@ -276,18 +264,14 @@
ko.bindingHandlers.i18nInit = {
'init': function (oElement) {
var
Utils = require('../Common/Utils.js')
;
var Utils = require('../Common/Utils.js');
Utils.i18nToNode(oElement);
}
};
ko.bindingHandlers.i18nUpdate = {
'update': function (oElement, fValueAccessor) {
var
Utils = require('../Common/Utils.js')
;
var Utils = require('../Common/Utils.js');
ko.utils.unwrapObservable(fValueAccessor());
Utils.i18nToNode(oElement);
}
@ -326,6 +310,7 @@
});
},
'update': function (oElement, fValueAccessor) {
var
Utils = require('../Common/Utils.js'),
aValues = ko.utils.unwrapObservable(fValueAccessor()),
@ -360,12 +345,10 @@
ko.bindingHandlers.draggable = {
'init': function (oElement, fValueAccessor, fAllBindingsAccessor) {
var
Globals = require('../Common/Globals.js'),
Utils = require('../Common/Utils.js')
;
if (!Globals.bMobileDevice)
{
var
@ -446,11 +429,7 @@
ko.bindingHandlers.droppable = {
'init': function (oElement, fValueAccessor, fAllBindingsAccessor) {
var
Globals = require('../Common/Globals.js')
;
var Globals = require('../Common/Globals.js');
if (!Globals.bMobileDevice)
{
var
@ -492,11 +471,7 @@
ko.bindingHandlers.nano = {
'init': function (oElement) {
var
Globals = require('../Common/Globals.js')
;
var Globals = require('../Common/Globals.js');
if (!Globals.bDisableNanoScroll)
{
$(oElement)
@ -594,6 +569,8 @@
var
Utils = require('../Common/Utils.js'),
EmailModel = require('../Models/EmailModel.js'),
$oEl = $(oElement),
fValue = fValueAccessor(),
fAllBindings = fAllBindingsAccessor(),
@ -662,10 +639,12 @@
};
ko.bindingHandlers.contactTags = {
'init': function(oElement, fValueAccessor) {
'init': function(oElement, fValueAccessor, fAllBindingsAccessor) {
var
Utils = require('../Common/Utils.js'),
ContactTagModel = require('../Models/ContactTagModel.js'),
$oEl = $(oElement),
fValue = fValueAccessor(),
fAllBindings = fAllBindingsAccessor(),
@ -877,6 +856,7 @@
ko.observable.fn.validateEmail = function ()
{
var Utils = require('../Common/Utils.js');
this.hasError = ko.observable(false);
this.subscribe(function (sValue) {
@ -906,6 +886,7 @@
ko.observable.fn.validateFunc = function (fFunc)
{
var Utils = require('../Common/Utils.js');
this.hasFuncError = ko.observable(false);
if (Utils.isFunc(fFunc))
@ -922,4 +903,4 @@
module.exports = ko;
}(module));
}(module, ko));

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = moment;

1
dev/External/ssm.js vendored
View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = ssm;

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = _;

View file

@ -1,5 +1,4 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
module.exports = window;

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
$ = require('../External/jquery.js'),
_ = require('../External/underscore.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
/**
* @constructor
*/

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
crossroads = require('../External/crossroads.js'),
Utils = require('../Common/Utils.js')

View file

@ -1,16 +1,15 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
$window = require('../External/$window.js'),
Utils = require('../Common/Utils.js'),
Enums = require('../Common/Enums.js'),
Globals = require('../Common/Globals.js')
Globals = require('../Common/Globals.js'),
Utils = require('../Common/Utils.js')
;
/**
@ -87,6 +86,7 @@
KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
if (oEvent && self.modalVisibility && self.modalVisibility())
{

View file

@ -1,12 +1,10 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
LinkBuilder = require('../Common/LinkBuilder.js')
ko = require('../External/ko.js')
;
/**
@ -28,7 +26,7 @@
*/
AccountModel.prototype.changeAccountLink = function ()
{
return LinkBuilder.change(this.email);
return require('../Common/LinkBuilder.js').change(this.email);
};
module.exports = AccountModel;

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
Globals = require('../Common/Globals.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
Utils = require('../Common/Utils.js')

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
Enums = require('../Common/Enums.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
Utils = require('../Common/Utils.js')

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
Enums = require('../Common/Enums.js'),
Utils = require('../Common/Utils.js')

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
Enums = require('../Common/Enums.js')

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
Enums = require('../Common/Enums.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
Utils = require('../Common/Utils.js')

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
$ = require('../External/jquery.js'),
@ -1081,6 +1080,7 @@
this.body.data('rl-plain-raw', this.plainRaw);
var Data = require('../Storages/WebMailDataStorage.js');
if (Data.capaOpenPGP())
{
this.body.data('rl-plain-pgp-signed', !!this.isPgpSigned());
@ -1093,6 +1093,7 @@
MessageModel.prototype.storePgpVerifyDataToDom = function ()
{
var Data = require('../Storages/WebMailDataStorage.js');
if (this.body && Data.capaOpenPGP())
{
this.body.data('rl-pgp-verify-status', this.pgpSignedVerifyStatus());
@ -1109,6 +1110,7 @@
this.plainRaw = Utils.pString(this.body.data('rl-plain-raw'));
var Data = require('../Storages/WebMailDataStorage.js');
if (Data.capaOpenPGP())
{
this.isPgpSigned(!!this.body.data('rl-plain-pgp-signed'));
@ -1133,6 +1135,7 @@
var
aRes = [],
mPgpMessage = null,
Data = require('../Storages/WebMailDataStorage.js'),
sFrom = this.from && this.from[0] && this.from[0].email ? this.from[0].email : '',
aPublicKeys = Data.findPublicKeysByEmail(sFrom),
oValidKey = null,
@ -1196,6 +1199,7 @@
aRes = [],
mPgpMessage = null,
mPgpMessageDecrypted = null,
Data = require('../Storages/WebMailDataStorage.js'),
sFrom = this.from && this.from[0] && this.from[0].email ? this.from[0].email : '',
aPublicKey = Data.findPublicKeysByEmail(sFrom),
oPrivateKey = Data.findSelfPrivateKey(sPassword),

View file

@ -1,11 +1,10 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../Externalko.js')
ko = require('../External/ko.js')
;
/**

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
$ = require('../External/jquery.js'),
_ = require('../External/underscore.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
KnoinAbstractScreen = require('../Knoin/KnoinAbstractScreen.js')

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
AbstractSettings = require('./AbstractSettings.js')

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
KnoinAbstractScreen = require('../Knoin/KnoinAbstractScreen.js')

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
$html = require('../External/$html.js'),
@ -150,7 +149,7 @@
});
Events.sub('mailbox.inbox-unread-count', function (nCount) {
Data.foldersInboxUnreadCount(nCount)
Data.foldersInboxUnreadCount(nCount);
});
Data.foldersInboxUnreadCount.subscribe(function () {

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
_ = require('../External/underscore.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),

View file

@ -1,16 +1,14 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
Utils = require('../Common/Utils.js'),
Remote = require('../Storages/WebMailAjaxRemoteStorage.js'),
Data = require('../Storages/WebMailDataStorage.js')
;

View file

@ -1,14 +1,11 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
Utils = require('../Common/Utils.js'),
kn = require('../Knoin/Knoin.js'),
PopupsFilterViewModel = require('../ViewModels/Popups/PopupsFilterViewModel.js')
Utils = require('../Common/Utils.js')
;
/**
@ -31,6 +28,12 @@
SettingsFilters.prototype.addFilter = function ()
{
var
kn = require('../Knoin/Knoin.js'),
FilterModel = require('../Models/FilterModel.js'),
PopupsFilterViewModel = require('../ViewModels/Popups/PopupsFilterViewModel.js')
;
kn.showScreenPopup(PopupsFilterViewModel, [new FilterModel()]);
};

View file

@ -1,11 +1,11 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
Enums = require('../Common/Enums.js'),
Utils = require('../Common/Utils.js'),
@ -17,8 +17,6 @@
Cache = require('../Storages/WebMailCacheStorage.js'),
Remote = require('../Storages/WebMailAjaxRemoteStorage.js'),
RL = require('../Boots/RainLoopApp.js'),
PopupsFolderCreateViewModel = require('../ViewModels/Popups/PopupsFolderCreateViewModel.js'),
PopupsFolderSystemViewModel = require('../ViewModels/Popups/PopupsFolderSystemViewModel.js')
;
@ -98,7 +96,11 @@
SettingsFolders.prototype.folderEditOnEnter = function (oFolder)
{
var sEditName = oFolder ? Utils.trim(oFolder.nameForEdit()) : '';
var
RL = require('../Boots/RainLoopApp.js'),
sEditName = oFolder ? Utils.trim(oFolder.nameForEdit()) : ''
;
if ('' !== sEditName && oFolder.name() !== sEditName)
{
LocalStorage.set(Enums.ClientSideKeyName.FoldersLashHash, '');
@ -156,6 +158,7 @@
this.folderForDeletion(null);
var
RL = require('../Boots/RainLoopApp.js'),
fRemoveFolder = function (oFolder) {
if (oFolderToRemove === oFolder)

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
$ = require('../External/jquery.js'),
ko = require('../External/ko.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
@ -14,8 +13,6 @@
Data = require('../Storages/WebMailDataStorage.js'),
Remote = require('../Storages/WebMailAjaxRemoteStorage.js'),
RL = require('../Boots/RainLoopApp.js'),
kn = require('../Knoin/Knoin.js'),
PopupsIdentityViewModel = require('../ViewModels/Popups/PopupsIdentityViewModel.js')
;
@ -135,6 +132,7 @@
this.identityForDeletion(null);
var
RL = require('../Boots/RainLoopApp.js'),
fRemoveFolder = function (oIdentity) {
return oIdentityToRemove === oIdentity;
}

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
@ -11,8 +10,6 @@
Data = require('../Storages/WebMailDataStorage.js'),
RL = require('../Boots/RainLoopApp.js'),
PopupsAddOpenPgpKeyViewModel = require('../ViewModels/Popups/PopupsAddOpenPgpKeyViewModel.js'),
PopupsGenerateNewOpenPgpKeyViewModel = require('../ViewModels/Popups/PopupsGenerateNewOpenPgpKeyViewModel.js'),
PopupsViewOpenPgpKeyViewModel = require('../ViewModels/Popups/PopupsViewOpenPgpKeyViewModel.js')
@ -80,6 +77,7 @@
Data.openpgpKeyring.store();
var RL = require('../Boots/RainLoopApp.js');
RL.reloadOpenPgpKeys();
}
}

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),

View file

@ -1,22 +1,19 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
Utils = require('../Common/Utils.js'),
Data = require('../Storages/WebMailDataStorage.js'),
RL = require('../Boots/RainLoopApp.js')
;
/**
* @constructor
*/
function SettingsSocial()
{
var
Utils = require('../Common/Utils.js'),
RL = require('../Boots/RainLoopApp.js'),
Data = require('../Storages/WebMailDataStorage.js')
;
this.googleEnable = Data.googleEnable;
this.googleActions = Data.googleActions;

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
$ = require('../External/jquery.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
$ = require('../External/jquery.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
Enums = require('../Common/Enums.js'),
Utils = require('../Common/Utils.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
AppData = require('../External/AppData.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),

View file

@ -1,12 +1,12 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
$ = require('../../External/jquery.js'),
JSON = require('../../External/JSON.js'),
Consts = require('../../Common/Consts.js'),
Utils = require('../../Common/Utils.js')
;

View file

@ -1,12 +1,12 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../../External/window.js'),
JSON = require('../../External/JSON.js'),
Consts = require('../../Common/Consts.js'),
Utils = require('../../Common/Utils.js')
;

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
$ = require('../External/jquery.js'),
@ -325,7 +324,10 @@
if (Enums.Layout.NoPreview === this.layout() &&
-1 < window.location.hash.indexOf('message-preview'))
{
RL.historyBack(); // TODO cjs
if (Globals.__RL)
{
Globals.__RL.historyBack();
}
}
}
else if (Enums.Layout.NoPreview === this.layout())
@ -922,7 +924,10 @@
Cache.initMessageFlagsFromCache(oMessage);
if (oMessage.unseen())
{
RL.setMessageSeen(oMessage);
if (Globals.__RL)
{
Globals.__RL.setMessageSeen(oMessage);
}
}
Utils.windowResize();

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),
@ -18,8 +17,6 @@
Data = require('../Storages/WebMailDataStorage.js'),
Remote = require('../Storages/WebMailAjaxRemoteStorage.js'),
RL = require('../Boots/RainLoopApp.js'),
PopupsKeyboardShortcutsHelpViewModel = require('../ViewModels/Popups/PopupsKeyboardShortcutsHelpViewModel.js'),
PopupsAddAccountViewModel = require('../ViewModels/Popups/PopupsKeyboardShortcutsHelpViewModel.js'),
@ -91,6 +88,7 @@
AbstractSystemDropDownViewModel.prototype.logoutClick = function ()
{
var RL = require('../Boots/RainLoopApp.js');
Remote.logout(function () {
if (window.__rlah_clear)
{

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
_ = require('../External/underscore.js'),
ko = require('../External/ko.js'),
@ -13,8 +12,6 @@
Remote = require('../Storages/AdminAjaxRemoteStorage.js'),
RL = require('../Boots/AdminApp.js'),
kn = require('../Knoin/Knoin.js'),
KnoinAbstractViewModel = require('../Knoin/KnoinAbstractViewModel.js')
;
@ -66,6 +63,7 @@
{
if (oData.Result)
{
var RL = require('../Boots/AdminApp.js');
RL.loginAndLogoutReload();
}
else if (oData.ErrorCode)

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
kn = require('../Knoin/Knoin.js'),
Globals = require('../Common/Globals.js'),

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../External/ko.js'),
@ -11,8 +10,6 @@
Data = require('../Storages/AdminDataStorage.js'),
Remote = require('../Storages/AdminAjaxRemoteStorage.js'),
RL = require('../Boots/AdminApp.js'),
kn = require('../Knoin/Knoin.js'),
KnoinAbstractViewModel = require('../Knoin/KnoinAbstractViewModel.js')
;
@ -38,6 +35,7 @@
AdminPaneViewModel.prototype.logoutClick = function ()
{
Remote.adminLogout(function () {
var RL = require('../Boots/AdminApp.js');
RL.loginAndLogoutReload();
});
};

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
$ = require('../External/jquery.js'),
@ -18,8 +17,6 @@
Data = require('../Storages/WebMailDataStorage.js'),
Remote = require('../Storages/WebMailAjaxRemoteStorage.js'),
RL = require('../Boots/RainLoopApp.js'),
kn = require('../Knoin/Knoin.js'),
KnoinAbstractViewModel = require('../Knoin/KnoinAbstractViewModel.js'),
@ -135,6 +132,7 @@
}
else
{
var RL = require('../Boots/RainLoopApp.js');
RL.loginAndLogoutReload();
}
}
@ -233,6 +231,7 @@
window.open(LinkBuilder.socialTwitter(), 'Twitter',
'left=200,top=100,width=650,height=335,menubar=no,status=no,resizable=yes,scrollbars=yes');
return true;
}, function () {
@ -293,6 +292,8 @@
if (0 === iErrorCode)
{
self.submitRequest(true);
var RL = require('../Boots/RainLoopApp.js');
RL.loginAndLogoutReload();
}
else

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
window = require('../External/window.js'),
$ = require('../External/jquery.js'),
@ -20,8 +19,6 @@
Cache = require('../Storages/WebMailCacheStorage.js'),
Data = require('../Storages/WebMailDataStorage.js'),
RL = require('../Boots/RainLoopApp.js'),
PopupsComposeViewModel = require('./Popups/PopupsComposeViewModel.js'),
PopupsFolderCreateViewModel = require('./Popups/PopupsFolderCreateViewModel.js'),
PopupsContactsViewModel = require('./Popups/PopupsContactsViewModel.js'),
@ -62,7 +59,10 @@
this.oContentVisible = $('.b-content', oDom);
this.oContentScrollable = $('.content', this.oContentVisible);
var self = this;
var
self = this,
RL = require('../Boots/RainLoopApp.js')
;
oDom
.on('click', '.b-folders .e-item .e-link .e-collapsed-sign', function (oEvent) {
@ -185,6 +185,7 @@
window.clearTimeout(this.iDropOverTimer);
if (oFolder && oFolder.collapsed())
{
var RL = require('../Boots/RainLoopApp.js');
this.iDropOverTimer = window.setTimeout(function () {
oFolder.collapsed(false);
RL.setExpandedFolder(oFolder.fullNameHash, true);
@ -240,6 +241,7 @@
if (oToFolder && oUi && oUi.helper)
{
var
RL = require('../Boots/RainLoopApp.js'),
sFromFolderFullNameRaw = oUi.helper.data('rl-folder'),
bCopy = $html.hasClass('rl-ctrl-key-pressed'),
aUids = oUi.helper.data('rl-uids')

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
$ = require('../External/jquery.js'),
_ = require('../External/underscore.js'),
@ -12,10 +11,10 @@
ifvisible = require('../External/ifvisible.js'),
Jua = require('../External/Jua.js'),
Utils = require('../Common/Utils.js'),
Enums = require('../Common/Enums.js'),
Consts = require('../Common/Consts.js'),
Globals = require('../Common/Globals.js'),
Utils = require('../Common/Utils.js'),
LinkBuilder = require('../Common/LinkBuilder.js'),
Events = require('../Common/Events.js'),
Selector = require('../Common/Selector.js'),
@ -25,12 +24,12 @@
Data = require('../Storages/WebMailDataStorage.js'),
Remote = require('../Storages/WebMailAjaxRemoteStorage.js'),
RL = require('../Boots/RainLoopApp.js'),
kn = require('../Knoin/Knoin.js'),
KnoinAbstractViewModel = require('../Knoin/KnoinAbstractViewModel.js'),
PopupsComposeViewModel = require('./Popups/PopupsComposeViewModel.js')
PopupsComposeViewModel = require('./Popups/PopupsComposeViewModel.js'),
PopupsAdvancedSearchViewModel = require('./Popups/PopupsAdvancedSearchViewModel.js'),
PopupsFolderClearViewModel = require('./Popups/PopupsFolderClearViewModel.js')
;
/**
@ -39,6 +38,8 @@
*/
function MailBoxMessageListViewModel()
{
var RL = require('../Boots/RainLoopApp.js');
KnoinAbstractViewModel.call(this, 'Right', 'MailMessageList');
this.sLastUid = null;
@ -305,6 +306,7 @@
{
if (this.canBeMoved())
{
var RL = require('../Boots/RainLoopApp.js');
RL.moveMessagesToFolder(
Data.currentFolderFullNameRaw(),
Data.messageListCheckedOrSelectedUidsWithSubMails(), sToFolderFullNameRaw, bCopy);
@ -392,7 +394,8 @@
var
aUids = [],
oFolder = null,
iAlreadyUnread = 0
iAlreadyUnread = 0,
RL = require('../Boots/RainLoopApp.js')
;
if (Utils.isUnd(aMessages))
@ -472,7 +475,8 @@
{
var
oFolder = null,
aMessages = Data.messageList()
aMessages = Data.messageList(),
RL = require('../Boots/RainLoopApp.js')
;
if ('' !== sFolderFullNameRaw)
@ -625,7 +629,8 @@
MailBoxMessageListViewModel.prototype.onBuild = function (oDom)
{
var
self = this
self = this,
RL = require('../Boots/RainLoopApp.js')
;
this.oContentVisible = $('.b-content', oDom);
@ -656,6 +661,7 @@
oMessage.lastInCollapsedThreadLoading(true);
oMessage.lastInCollapsedThread(!oMessage.lastInCollapsedThread());
RL.reloadMessageList();
}
@ -886,7 +892,9 @@
return false;
}
var oJua = new Jua({
var
RL = require('../Boots/RainLoopApp.js'),
oJua = new Jua({
'action': LinkBuilder.append(),
'name': 'AppendFile',
'queueSize': 1,
@ -899,7 +907,8 @@
},
'dragAndDropElement': this.dragOverArea(),
'dragAndDropBodyElement': this.dragOverBodyArea()
});
})
;
oJua
.on('onDragEnter', _.bind(function () {

View file

@ -1,9 +1,8 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
$ = require('../External/jquery.js'),
ko = require('../External/ko.js'),
@ -20,7 +19,7 @@
Data = require('../Storages/WebMailDataStorage.js'),
Remote = require('../Storages/WebMailAjaxRemoteStorage.js'),
RL = require('../Boots/RainLoopApp.js'),
PopupsComposeViewModel = require('./Popups/PopupsComposeViewModel.js'),
kn = require('../Knoin/Knoin.js'),
KnoinAbstractViewModel = require('../Knoin/KnoinAbstractViewModel.js')
@ -37,6 +36,7 @@
var
self = this,
sLastEmail = '',
RL = require('../Boots/RainLoopApp.js'),
createCommandHelper = function (sType) {
return Utils.createCommand(self, function () {
this.replyOrforward(sType);
@ -341,7 +341,8 @@
MailBoxMessageViewViewModel.prototype.onBuild = function (oDom)
{
var
self = this
self = this,
RL = require('../Boots/RainLoopApp.js')
;
this.fullScreenMode.subscribe(function (bValue) {
@ -710,6 +711,8 @@
oMessage.isReadReceipt(true);
Cache.storeMessageFlagsToCache(oMessage);
var RL = require('../Boots/RainLoopApp.js');
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
}
};

View file

@ -1,11 +1,9 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
Utils = require('../Common/Utils.js'),
kn = require('../Knoin/Knoin.js'),
AbstractSystemDropDownViewModel = require('./AbstractSystemDropDownViewModel.js')
;

View file

@ -1,11 +1,11 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
'use strict';
(function (module) {
'use strict';
var
ko = require('../../External/ko.js'),
Enums = require('../../Common/Enums.js'),
Utils = require('../../Common/Utils.js'),

Some files were not shown because too many files have changed in this diff Show more