Add onFocus callback to popups

This commit is contained in:
RainLoop Team 2013-12-29 00:42:07 +04:00
parent fd2c2346a8
commit 04932fce63
28 changed files with 412 additions and 336 deletions

View file

@ -634,6 +634,19 @@ Utils.getUploadErrorDescByCode = function (mCode)
return sResult;
};
/**
* @param {?} oObject
* @param {string} sMethodName
* @param {Array=} aParameters
*/
Utils.delegateRun = function (oObject, sMethodName, aParameters)
{
if (oObject && oObject[sMethodName])
{
oObject[sMethodName].apply(oObject, Utils.isArray(aParameters) ? aParameters : []);
}
};
/**
* @param {?} oEvent
*/

View file

@ -74,19 +74,6 @@ Knoin.prototype.screen = function (sScreenName)
return ('' !== sScreenName && !Utils.isUnd(this.oScreens[sScreenName])) ? this.oScreens[sScreenName] : null;
};
/**
* @param {?} oViewModel
* @param {string} sDelegateName
* @param {Array=} aParameters
*/
Knoin.prototype.delegateRun = function (oViewModel, sDelegateName, aParameters)
{
if (oViewModel && oViewModel[sDelegateName])
{
oViewModel[sDelegateName].apply(oViewModel, Utils.isArray(aParameters) ? aParameters : []);
}
};
/**
* @param {Function} ViewModelClass
* @param {Object=} oScreen
@ -127,7 +114,7 @@ Knoin.prototype.buildViewModel = function (ViewModelClass, oScreen)
Plugins.runHook('view-model-pre-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
ko.applyBindings(oViewModel, oViewModelDom[0]);
this.delegateRun(oViewModel, 'onBuild', [oViewModelDom]);
Utils.delegateRun(oViewModel, 'onBuild', [oViewModelDom]);
Plugins.runHook('view-model-post-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
}
@ -160,7 +147,7 @@ Knoin.prototype.hideScreenPopup = function (ViewModelClassToHide)
if (ViewModelClassToHide && ViewModelClassToHide.__vm && ViewModelClassToHide.__dom)
{
ViewModelClassToHide.__vm.modalVisibility(false);
this.delegateRun(ViewModelClassToHide.__vm, 'onHide');
Utils.delegateRun(ViewModelClassToHide.__vm, 'onHide');
this.popupVisibility(false);
Plugins.runHook('view-model-on-hide', [ViewModelClassToHide.__name, ViewModelClassToHide.__vm]);
@ -185,10 +172,14 @@ Knoin.prototype.showScreenPopup = function (ViewModelClassToShow, aParameters)
{
ViewModelClassToShow.__dom.show();
ViewModelClassToShow.__vm.modalVisibility(true);
this.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
this.popupVisibility(true);
Plugins.runHook('view-model-on-show', [ViewModelClassToShow.__name, ViewModelClassToShow.__vm, aParameters || []]);
_.delay(function () {
Utils.delegateRun(ViewModelClassToShow.__vm, 'onFocus');
}, 500);
}
}
};
@ -236,7 +227,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
}, this);
}
this.delegateRun(oScreen, 'onBuild');
Utils.delegateRun(oScreen, 'onBuild');
}
_.defer(function () {
@ -244,7 +235,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
// hide screen
if (self.oCurrentScreen)
{
self.delegateRun(self.oCurrentScreen, 'onHide');
Utils.delegateRun(self.oCurrentScreen, 'onHide');
if (Utils.isNonEmptyArray(self.oCurrentScreen.viewModels()))
{
@ -255,7 +246,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
{
ViewModelClass.__dom.hide();
ViewModelClass.__vm.viewModelVisibility(false);
self.delegateRun(ViewModelClass.__vm, 'onHide');
Utils.delegateRun(ViewModelClass.__vm, 'onHide');
}
});
@ -269,7 +260,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
if (self.oCurrentScreen)
{
self.delegateRun(self.oCurrentScreen, 'onShow');
Utils.delegateRun(self.oCurrentScreen, 'onShow');
Plugins.runHook('screen-on-show', [self.oCurrentScreen.screenName(), self.oCurrentScreen]);
@ -282,7 +273,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
{
ViewModelClass.__dom.show();
ViewModelClass.__vm.viewModelVisibility(true);
self.delegateRun(ViewModelClass.__vm, 'onShow');
Utils.delegateRun(ViewModelClass.__vm, 'onShow');
Plugins.runHook('view-model-on-show', [ViewModelClass.__name, ViewModelClass.__vm]);
}
@ -338,7 +329,7 @@ Knoin.prototype.startScreens = function (aScreensClasses)
oScreen.__start();
Plugins.runHook('screen-pre-start', [oScreen.screenName(), oScreen]);
this.delegateRun(oScreen, 'onStart');
Utils.delegateRun(oScreen, 'onStart');
Plugins.runHook('screen-post-start', [oScreen.screenName(), oScreen]);
}
}, this);

View file

@ -78,7 +78,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
RoutedSettingsViewModel.__vm = oSettingsScreen;
ko.applyBindings(oSettingsScreen, oViewModelDom[0]);
kn.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
Utils.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
}
else
{
@ -92,7 +92,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
// hide
if (self.oCurrentSubScreen)
{
kn.delegateRun(self.oCurrentSubScreen, 'onHide');
Utils.delegateRun(self.oCurrentSubScreen, 'onHide');
self.oCurrentSubScreen.viewModelDom.hide();
}
// --
@ -103,7 +103,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
if (self.oCurrentSubScreen)
{
self.oCurrentSubScreen.viewModelDom.show();
kn.delegateRun(self.oCurrentSubScreen, 'onShow');
Utils.delegateRun(self.oCurrentSubScreen, 'onShow');
_.each(self.menu(), function (oItem) {
oItem.selected(oSettingsScreen && oSettingsScreen.__rlSettingsData && oItem.route === oSettingsScreen.__rlSettingsData.Route);
@ -127,7 +127,7 @@ AbstractSettings.prototype.onHide = function ()
{
if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom)
{
kn.delegateRun(this.oCurrentSubScreen, 'onHide');
Utils.delegateRun(this.oCurrentSubScreen, 'onHide');
this.oCurrentSubScreen.viewModelDom.hide();
}
};

View file

@ -61,15 +61,17 @@ html.rl-started-trigger.no-mobile #rl-content {
.opacity(70);
}
#rl-loading {
.transition(opacity 0.5s linear);
}
.rl-anim {
&.csstransitions.no-mobile #rl-content {
/*.transition(~"0.4s opacity cubic-bezier(0.250, 0.460, 0.450, 0.940)");*/
.transition(opacity 0.3s ease-out);
}
&.csstransitions.no-mobile .b-login-content .loginFormWrapper {
/*.transition(~"0.4s all cubic-bezier(0.250, 0.460, 0.450, 0.940)");*/
.transition(all 0.3s ease-out);
}

View file

@ -97,7 +97,13 @@ PopupsActivateViewModel.prototype.onShow = function ()
this.activateText('');
this.activateText.isError(false);
this.activationSuccessed(false);
}
};
PopupsActivateViewModel.prototype.onFocus = function ()
{
if (!this.activateProcess())
{
this.key.focus(true);
}
};

View file

@ -105,6 +105,10 @@ PopupsAddAccountViewModel.prototype.clearPopup = function ()
PopupsAddAccountViewModel.prototype.onShow = function ()
{
this.clearPopup();
};
PopupsAddAccountViewModel.prototype.onFocus = function ()
{
this.emailFocus(true);
};
@ -117,7 +121,7 @@ PopupsAddAccountViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;

View file

@ -123,7 +123,10 @@ PopupsAdvancedSearchViewModel.prototype.clearPopup = function ()
PopupsAdvancedSearchViewModel.prototype.onShow = function ()
{
this.clearPopup();
};
PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
{
this.fromFocus(true);
};
@ -134,7 +137,7 @@ PopupsAdvancedSearchViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;

View file

@ -80,7 +80,10 @@ PopupsAskViewModel.prototype.onShow = function (sAskDesc, fYesFunc, fNoFunc, sYe
{
this.yesButton(sNoButton);
}
};
PopupsAskViewModel.prototype.onFocus = function ()
{
this.yesFocus(true);
};

View file

@ -492,7 +492,7 @@ PopupsComposeViewModel.prototype.sendMessageResponse = function (sResult, oData)
bResult = true;
if (this.modalVisibility())
{
kn.delegateRun(this, 'closeCommand');
Utils.delegateRun(this, 'closeCommand');
}
}
@ -594,7 +594,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
aDownloads = [],
aDraftInfo = null,
oMessage = null,
bFocusOnBody = false,
sComposeType = sType || Enums.ComposeType.Empty,
fEmailArrayToStringLineHelper = function (aList) {
@ -655,7 +654,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
this.sInReplyTo = oMessage.sMessageId;
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.sReferences);
bFocusOnBody = true;
break;
case Enums.ComposeType.ReplyAll:
@ -667,7 +665,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
this.sInReplyTo = oMessage.sMessageId;
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.references());
bFocusOnBody = true;
break;
case Enums.ComposeType.Forward:
@ -753,11 +750,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
});
}
if ('' === this.to())
{
this.to.focusTrigger(!this.to.focusTrigger());
}
aDownloads = this.getAttachmentsDownloadsForUpload();
if (Utils.isNonEmptyArray(aDownloads))
{
@ -793,11 +785,20 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
}, aDownloads);
}
if (bFocusOnBody && this.oEditor)
this.triggerForResize();
};
PopupsComposeViewModel.prototype.onFocus = function ()
{
if ('' === this.to())
{
this.to.focusTrigger(!this.to.focusTrigger());
}
else if (this.oEditor)
{
this.oEditor.focus();
}
this.triggerForResize();
};
@ -807,7 +808,7 @@ PopupsComposeViewModel.prototype.tryToClosePopup = function ()
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
if (self.modalVisibility())
{
kn.delegateRun(self, 'closeCommand');
Utils.delegateRun(self, 'closeCommand');
}
}]);
};

View file

@ -563,7 +563,7 @@ PopupsContactsViewModel.prototype.onBuild = function (oDom)
{
if (Enums.EventKeyCode.Esc === oEvent.keyCode)
{
kn.delegateRun(self, 'closeCommand');
Utils.delegateRun(self, 'closeCommand');
bResult = false;
}
else if (oEvent.ctrlKey && Enums.EventKeyCode.S === oEvent.keyCode)

View file

@ -193,7 +193,7 @@ PopupsDomainViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;

View file

@ -103,7 +103,7 @@ PopupsFolderClearViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;

View file

@ -13,7 +13,7 @@ function PopupsFolderCreateViewModel()
}, this);
this.folderName = ko.observable('');
this.focusTrigger = ko.observable(false);
this.folderName.focused = ko.observable(false);
this.selectedParentValue = ko.observable(Consts.Values.UnuseOptionValue);
@ -97,13 +97,17 @@ PopupsFolderCreateViewModel.prototype.clearPopup = function ()
{
this.folderName('');
this.selectedParentValue('');
this.focusTrigger(false);
this.folderName.focused(false);
};
PopupsFolderCreateViewModel.prototype.onShow = function ()
{
this.clearPopup();
this.focusTrigger(true);
};
PopupsFolderCreateViewModel.prototype.onFocus = function ()
{
this.folderName.focused(true);
};
PopupsFolderCreateViewModel.prototype.onBuild = function ()
@ -113,7 +117,7 @@ PopupsFolderCreateViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;

View file

@ -111,7 +111,7 @@ PopupsFolderSystemViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;

View file

@ -138,7 +138,10 @@ PopupsIdentityViewModel.prototype.onShow = function (oIdentity)
this.owner(this.id === RL.data().accountEmail());
}
};
PopupsIdentityViewModel.prototype.onFocus = function ()
{
if (!this.owner())
{
this.email.focused(true);
@ -152,7 +155,7 @@ PopupsIdentityViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;

View file

@ -61,7 +61,7 @@ PopupsLanguagesViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;

View file

@ -118,7 +118,7 @@ PopupsPluginViewModel.prototype.tryToClosePopup = function ()
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
if (self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
}
}]);
};

View file

@ -2,7 +2,7 @@
"name": "RainLoop",
"title": "RainLoop Webmail",
"version": "1.6.0",
"release": "616",
"release": "621",
"description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net",
"main": "Gruntfile.js",

View file

@ -15,7 +15,7 @@
function __fIncludeScr(sSrc) {
document.write(unescape('%3Csc' + 'ript type="text/jav' + 'ascr' + 'ipt" sr' + 'c="' + sSrc + '"%3E%3C/' + 'scr' + 'ipt%3E'));
}
if (!navigator || !navigator.cookieEnabled) {
document.location.replace('{{BaseAppIndexFile}}?/NoCookie');
}
@ -48,6 +48,15 @@
<div class="e-bounce bounce3"></div>
</div>
</div>
<script type="text/javascript">
var oE = document.getElementById('rl-loading');
if (oE) {
oE.style.opacity = 0;
window.setTimeout(function () {
oE.style.opacity = 1;
}, 300);
}
</script>
<div id="rl-loading-error" class="thm-loading">
An Error occurred,<br />please refresh the page and try again.
</div>

View file

@ -15,7 +15,7 @@
<span class="i18n" data-i18n-text="POPUPS_CREATE_FOLDER/LABEL_NAME"></span>
</label>
<div class="controls">
<input class="uiInput inputName" type="text" data-bind="value: folderName, valueUpdate: 'afterkeydown', onEnter: createFolder, hasfocus: focusTrigger" />
<input class="uiInput inputName" type="text" data-bind="value: folderName, hasfocus: folderName.focused, valueUpdate: 'afterkeydown', onEnter: createFolder" />
</div>
</div>
<div class="control-group">

View file

@ -637,7 +637,7 @@
border-radius: 8px;
}
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
/* =============================================================================
@ -1142,7 +1142,7 @@ table {
border-collapse: collapse;
border-spacing: 0;
}
@charset "UTF-8";
@font-face {
@ -1474,7 +1474,7 @@ table {
.icon-mail:before {
content: "\e062";
}
/** initial setup **/
.nano {
/*
@ -1591,7 +1591,7 @@ table {
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
background-color: rgba(0, 0, 0, 0.4);
}
/* Magnific Popup CSS */
.mfp-bg {
top: 0;
@ -1956,7 +1956,7 @@ img.mfp-img {
right: 0;
padding-top: 0; }
/* overlay at start */
.mfp-fade.mfp-bg {
@ -2002,7 +2002,7 @@ img.mfp-img {
-moz-transform: translateX(50px);
transform: translateX(50px);
}
.simple-pace {
-webkit-pointer-events: none;
pointer-events: none;
@ -2073,7 +2073,7 @@ img.mfp-img {
@keyframes simple-pace-stripe-animation {
0% { transform: none; transform: none; }
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
}
}
.inputosaurus-container {
background-color:#fff;
border:1px solid #bcbec0;
@ -2141,7 +2141,7 @@ img.mfp-img {
box-shadow:none;
}
.inputosaurus-input-hidden { display:none; }
.flag-wrapper {
width: 24px;
height: 16px;
@ -2182,7 +2182,7 @@ img.mfp-img {
.flag.flag-pt-br {background-position: -192px -11px}
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
.clearfix {
*zoom: 1;
@ -8301,17 +8301,19 @@ html.rl-started-trigger.no-mobile #rl-content {
opacity: 0.7;
filter: alpha(opacity=70);
}
#rl-loading {
-webkit-transition: opacity 0.5s linear;
-moz-transition: opacity 0.5s linear;
-o-transition: opacity 0.5s linear;
transition: opacity 0.5s linear;
}
.rl-anim.csstransitions.no-mobile #rl-content {
/*.transition(~"0.4s opacity cubic-bezier(0.250, 0.460, 0.450, 0.940)");*/
-webkit-transition: opacity 0.3s ease-out;
-moz-transition: opacity 0.3s ease-out;
-o-transition: opacity 0.3s ease-out;
transition: opacity 0.3s ease-out;
}
.rl-anim.csstransitions.no-mobile .b-login-content .loginFormWrapper {
/*.transition(~"0.4s all cubic-bezier(0.250, 0.460, 0.450, 0.940)");*/
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, _) {
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, _) {
'use strict';
@ -70,14 +70,14 @@ var
$document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
;
;
/*jshint onevar: false*/
/**
* @type {?AdminApp}
*/
var RL = null;
/*jshint onevar: true*/
/**
* @type {?}
*/
@ -138,7 +138,7 @@ Globals.bDisableNanoScroll = Globals.bMobileDevice;
Globals.bAnimationSupported = !Globals.bMobileDevice && $html.hasClass('csstransitions');
Globals.sAnimationType = '';
Consts.Defaults = {};
Consts.Values = {};
Consts.DataImages = {};
@ -256,7 +256,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string}
*/
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/**
* @enum {string}
*/
@ -590,7 +590,7 @@ Enums.Notification = {
'UnknownNotification': 999,
'UnknownError': 999
};
Utils.trim = $.trim;
Utils.inArray = $.inArray;
Utils.isArray = _.isArray;
@ -1225,6 +1225,19 @@ Utils.getUploadErrorDescByCode = function (mCode)
return sResult;
};
/**
* @param {?} oObject
* @param {string} sMethodName
* @param {Array=} aParameters
*/
Utils.delegateRun = function (oObject, sMethodName, aParameters)
{
if (oObject && oObject[sMethodName])
{
oObject[sMethodName].apply(oObject, Utils.isArray(aParameters) ? aParameters : []);
}
};
/**
* @param {?} oEvent
*/
@ -2099,7 +2112,7 @@ Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
return aResult;
};
};
// Base64 encode / decode
// http://www.webtoolkit.info/
@ -2262,7 +2275,7 @@ Base64 = {
}
};
/*jslint bitwise: false*/
/*jslint bitwise: false*/
ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice)
@ -2884,7 +2897,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this;
};
/**
* @constructor
*/
@ -3157,7 +3170,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
};
/**
* @type {Object}
*/
@ -3251,7 +3264,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
};
/**
* @constructor
*/
@ -3325,7 +3338,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -3397,7 +3410,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -3440,7 +3453,7 @@ LocalStorage.prototype.get = function (iKey)
{
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
};
/**
* @constructor
*/
@ -3453,7 +3466,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{
};
/**
* @param {string=} sPosition = ''
* @param {string=} sTemplate = ''
@ -3513,7 +3526,7 @@ KnoinAbstractViewModel.prototype.viewModelPosition = function ()
KnoinAbstractViewModel.prototype.cancelCommand = KnoinAbstractViewModel.prototype.closeCommand = function ()
{
};
/**
* @param {string} sScreenName
* @param {?=} aViewModels = []
@ -3589,7 +3602,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute;
}
};
/**
* @constructor
*/
@ -3664,19 +3677,6 @@ Knoin.prototype.screen = function (sScreenName)
return ('' !== sScreenName && !Utils.isUnd(this.oScreens[sScreenName])) ? this.oScreens[sScreenName] : null;
};
/**
* @param {?} oViewModel
* @param {string} sDelegateName
* @param {Array=} aParameters
*/
Knoin.prototype.delegateRun = function (oViewModel, sDelegateName, aParameters)
{
if (oViewModel && oViewModel[sDelegateName])
{
oViewModel[sDelegateName].apply(oViewModel, Utils.isArray(aParameters) ? aParameters : []);
}
};
/**
* @param {Function} ViewModelClass
* @param {Object=} oScreen
@ -3717,7 +3717,7 @@ Knoin.prototype.buildViewModel = function (ViewModelClass, oScreen)
Plugins.runHook('view-model-pre-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
ko.applyBindings(oViewModel, oViewModelDom[0]);
this.delegateRun(oViewModel, 'onBuild', [oViewModelDom]);
Utils.delegateRun(oViewModel, 'onBuild', [oViewModelDom]);
Plugins.runHook('view-model-post-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
}
@ -3750,7 +3750,7 @@ Knoin.prototype.hideScreenPopup = function (ViewModelClassToHide)
if (ViewModelClassToHide && ViewModelClassToHide.__vm && ViewModelClassToHide.__dom)
{
ViewModelClassToHide.__vm.modalVisibility(false);
this.delegateRun(ViewModelClassToHide.__vm, 'onHide');
Utils.delegateRun(ViewModelClassToHide.__vm, 'onHide');
this.popupVisibility(false);
Plugins.runHook('view-model-on-hide', [ViewModelClassToHide.__name, ViewModelClassToHide.__vm]);
@ -3775,10 +3775,14 @@ Knoin.prototype.showScreenPopup = function (ViewModelClassToShow, aParameters)
{
ViewModelClassToShow.__dom.show();
ViewModelClassToShow.__vm.modalVisibility(true);
this.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
this.popupVisibility(true);
Plugins.runHook('view-model-on-show', [ViewModelClassToShow.__name, ViewModelClassToShow.__vm, aParameters || []]);
_.delay(function () {
Utils.delegateRun(ViewModelClassToShow.__vm, 'onFocus');
}, 500);
}
}
};
@ -3826,7 +3830,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
}, this);
}
this.delegateRun(oScreen, 'onBuild');
Utils.delegateRun(oScreen, 'onBuild');
}
_.defer(function () {
@ -3834,7 +3838,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
// hide screen
if (self.oCurrentScreen)
{
self.delegateRun(self.oCurrentScreen, 'onHide');
Utils.delegateRun(self.oCurrentScreen, 'onHide');
if (Utils.isNonEmptyArray(self.oCurrentScreen.viewModels()))
{
@ -3845,7 +3849,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
{
ViewModelClass.__dom.hide();
ViewModelClass.__vm.viewModelVisibility(false);
self.delegateRun(ViewModelClass.__vm, 'onHide');
Utils.delegateRun(ViewModelClass.__vm, 'onHide');
}
});
@ -3859,7 +3863,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
if (self.oCurrentScreen)
{
self.delegateRun(self.oCurrentScreen, 'onShow');
Utils.delegateRun(self.oCurrentScreen, 'onShow');
Plugins.runHook('screen-on-show', [self.oCurrentScreen.screenName(), self.oCurrentScreen]);
@ -3872,7 +3876,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
{
ViewModelClass.__dom.show();
ViewModelClass.__vm.viewModelVisibility(true);
self.delegateRun(ViewModelClass.__vm, 'onShow');
Utils.delegateRun(ViewModelClass.__vm, 'onShow');
Plugins.runHook('view-model-on-show', [ViewModelClass.__name, ViewModelClass.__vm]);
}
@ -3928,7 +3932,7 @@ Knoin.prototype.startScreens = function (aScreensClasses)
oScreen.__start();
Plugins.runHook('screen-pre-start', [oScreen.screenName(), oScreen]);
this.delegateRun(oScreen, 'onStart');
Utils.delegateRun(oScreen, 'onStart');
Plugins.runHook('screen-post-start', [oScreen.screenName(), oScreen]);
}
}, this);
@ -3989,7 +3993,7 @@ Knoin.prototype.bootstart = function ()
};
kn = new Knoin();
/**
* @param {string=} sEmail
* @param {string=} sName
@ -4353,7 +4357,7 @@ EmailModel.prototype.inputoTagLine = function ()
{
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -4547,7 +4551,7 @@ PopupsDomainViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
@ -4573,7 +4577,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
this.smtpAuth(true);
this.whiteList('');
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -4692,7 +4696,7 @@ PopupsPluginViewModel.prototype.tryToClosePopup = function ()
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
if (self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
}
}]);
};
@ -4710,7 +4714,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
return bResult;
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -4808,7 +4812,13 @@ PopupsActivateViewModel.prototype.onShow = function ()
this.activateText('');
this.activateText.isError(false);
this.activationSuccessed(false);
}
};
PopupsActivateViewModel.prototype.onFocus = function ()
{
if (!this.activateProcess())
{
this.key.focus(true);
}
};
@ -4820,7 +4830,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
{
var sValue = this.key();
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
};
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -4882,7 +4892,7 @@ PopupsLanguagesViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
@ -4894,7 +4904,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang);
this.cancelCommand();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -4975,7 +4985,10 @@ PopupsAskViewModel.prototype.onShow = function (sAskDesc, fYesFunc, fNoFunc, sYe
{
this.yesButton(sNoButton);
}
};
PopupsAskViewModel.prototype.onFocus = function ()
{
this.yesFocus(true);
};
@ -5009,7 +5022,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5096,7 +5109,7 @@ AdminLoginViewModel.prototype.onHide = function ()
{
this.loginFocus(false);
};
/**
* @param {?} oScreen
*
@ -5118,7 +5131,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
{
return '#/' + sRoute;
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5140,7 +5153,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
RL.remote().adminLogout(function () {
RL.loginAndLogoutReload();
});
};
};
/**
* @constructor
*/
@ -5259,7 +5272,7 @@ AdminGeneral.prototype.selectLanguage = function ()
{
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/**
* @constructor
*/
@ -5311,7 +5324,7 @@ AdminLogin.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -5531,7 +5544,7 @@ AdminContacts.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -5620,7 +5633,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
{
RL.reloadDomainList();
};
/**
* @constructor
*/
@ -5701,7 +5714,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
{
return RL.link().phpInfo();
};
/**
* @constructor
*/
@ -5817,7 +5830,7 @@ AdminSocial.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -5914,7 +5927,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
RL.reloadPluginList();
};
/**
* @constructor
*/
@ -6018,7 +6031,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
}
};
/**
* @constructor
*/
@ -6069,7 +6082,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
{
var oDate = moment.unix(this.licenseExpired());
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
};
};
/**
* @constructor
*/
@ -6138,7 +6151,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
};
/**
* @constructor
* @extends AbstractData
@ -6172,7 +6185,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
AdminDataStorage.prototype.populateDataOnStart = function()
{
AbstractData.prototype.populateDataOnStart.call(this);
};
};
/**
* @constructor
*/
@ -6446,7 +6459,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion
});
};
/**
* @constructor
* @extends AbstractAjaxRemoteStorage
@ -6690,7 +6703,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
{
this.defaultRequest(fCallback, 'AdminPing');
};
/**
* @constructor
*/
@ -6756,7 +6769,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{
this.oEmailsPicsHashes = oData;
};
/**
* @constructor
* @extends AbstractCacheStorage
@ -6767,7 +6780,7 @@ function AdminCacheStorage()
}
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
/**
* @param {Array} aViewModels
* @constructor
@ -6846,7 +6859,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
RoutedSettingsViewModel.__vm = oSettingsScreen;
ko.applyBindings(oSettingsScreen, oViewModelDom[0]);
kn.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
Utils.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
}
else
{
@ -6860,7 +6873,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
// hide
if (self.oCurrentSubScreen)
{
kn.delegateRun(self.oCurrentSubScreen, 'onHide');
Utils.delegateRun(self.oCurrentSubScreen, 'onHide');
self.oCurrentSubScreen.viewModelDom.hide();
}
// --
@ -6871,7 +6884,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
if (self.oCurrentSubScreen)
{
self.oCurrentSubScreen.viewModelDom.show();
kn.delegateRun(self.oCurrentSubScreen, 'onShow');
Utils.delegateRun(self.oCurrentSubScreen, 'onShow');
_.each(self.menu(), function (oItem) {
oItem.selected(oSettingsScreen && oSettingsScreen.__rlSettingsData && oItem.route === oSettingsScreen.__rlSettingsData.Route);
@ -6895,7 +6908,7 @@ AbstractSettings.prototype.onHide = function ()
{
if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom)
{
kn.delegateRun(this.oCurrentSubScreen, 'onHide');
Utils.delegateRun(this.oCurrentSubScreen, 'onHide');
this.oCurrentSubScreen.viewModelDom.hide();
}
};
@ -6944,7 +6957,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules]
];
};
/**
* @constructor
* @extends KnoinAbstractScreen
@ -6959,7 +6972,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
AdminLoginScreen.prototype.onShow = function ()
{
RL.setTitle('');
};
};
/**
* @constructor
* @extends AbstractSettings
@ -6979,7 +6992,7 @@ AdminSettingsScreen.prototype.onShow = function ()
// AbstractSettings.prototype.onShow.call(this);
RL.setTitle('');
};
};
/**
* @constructor
* @extends KnoinAbstractBoot
@ -7241,7 +7254,7 @@ AbstractApp.prototype.bootstart = function ()
Utils.windowResize();
}, 1000);
};
/**
* @constructor
* @extends AbstractApp
@ -7488,7 +7501,7 @@ AdminApp.prototype.bootstart = function ()
* @type {AdminApp}
*/
RL = new AdminApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -7535,9 +7548,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null;
});
};
if (window.SimplePace) {
window.SimplePace.add(10);
}
}
}(window, jQuery, ko, crossroads, hasher, _));

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, moment, Jua, _) {
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, moment, Jua, _) {
'use strict';
@ -70,14 +70,14 @@ var
$document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
;
;
/*jshint onevar: false*/
/**
* @type {?RainLoopApp}
*/
var RL = null;
/*jshint onevar: true*/
/**
* @type {?}
*/
@ -138,7 +138,7 @@ Globals.bDisableNanoScroll = Globals.bMobileDevice;
Globals.bAnimationSupported = !Globals.bMobileDevice && $html.hasClass('csstransitions');
Globals.sAnimationType = '';
Consts.Defaults = {};
Consts.Values = {};
Consts.DataImages = {};
@ -256,7 +256,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string}
*/
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/**
* @enum {string}
*/
@ -590,7 +590,7 @@ Enums.Notification = {
'UnknownNotification': 999,
'UnknownError': 999
};
Utils.trim = $.trim;
Utils.inArray = $.inArray;
Utils.isArray = _.isArray;
@ -1225,6 +1225,19 @@ Utils.getUploadErrorDescByCode = function (mCode)
return sResult;
};
/**
* @param {?} oObject
* @param {string} sMethodName
* @param {Array=} aParameters
*/
Utils.delegateRun = function (oObject, sMethodName, aParameters)
{
if (oObject && oObject[sMethodName])
{
oObject[sMethodName].apply(oObject, Utils.isArray(aParameters) ? aParameters : []);
}
};
/**
* @param {?} oEvent
*/
@ -2099,7 +2112,7 @@ Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
return aResult;
};
};
// Base64 encode / decode
// http://www.webtoolkit.info/
@ -2262,7 +2275,7 @@ Base64 = {
}
};
/*jslint bitwise: false*/
/*jslint bitwise: false*/
ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice)
@ -2884,7 +2897,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this;
};
/**
* @constructor
*/
@ -3157,7 +3170,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
};
/**
* @type {Object}
*/
@ -3251,7 +3264,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
};
/**
* @constructor
*/
@ -4147,7 +4160,7 @@ HtmlEditor.htmlFunctions = {
}, this), this.toolbar);
}
};
/**
* @constructor
* @param {koProperty} oKoList
@ -4681,7 +4694,7 @@ Selector.prototype.on = function (sEventName, fCallback)
{
this.oCallbacks[sEventName] = fCallback;
};
/**
* @constructor
*/
@ -4755,7 +4768,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -4827,7 +4840,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -4870,7 +4883,7 @@ LocalStorage.prototype.get = function (iKey)
{
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
};
/**
* @constructor
*/
@ -4883,7 +4896,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{
};
/**
* @param {string=} sPosition = ''
* @param {string=} sTemplate = ''
@ -4943,7 +4956,7 @@ KnoinAbstractViewModel.prototype.viewModelPosition = function ()
KnoinAbstractViewModel.prototype.cancelCommand = KnoinAbstractViewModel.prototype.closeCommand = function ()
{
};
/**
* @param {string} sScreenName
* @param {?=} aViewModels = []
@ -5019,7 +5032,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute;
}
};
/**
* @constructor
*/
@ -5094,19 +5107,6 @@ Knoin.prototype.screen = function (sScreenName)
return ('' !== sScreenName && !Utils.isUnd(this.oScreens[sScreenName])) ? this.oScreens[sScreenName] : null;
};
/**
* @param {?} oViewModel
* @param {string} sDelegateName
* @param {Array=} aParameters
*/
Knoin.prototype.delegateRun = function (oViewModel, sDelegateName, aParameters)
{
if (oViewModel && oViewModel[sDelegateName])
{
oViewModel[sDelegateName].apply(oViewModel, Utils.isArray(aParameters) ? aParameters : []);
}
};
/**
* @param {Function} ViewModelClass
* @param {Object=} oScreen
@ -5147,7 +5147,7 @@ Knoin.prototype.buildViewModel = function (ViewModelClass, oScreen)
Plugins.runHook('view-model-pre-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
ko.applyBindings(oViewModel, oViewModelDom[0]);
this.delegateRun(oViewModel, 'onBuild', [oViewModelDom]);
Utils.delegateRun(oViewModel, 'onBuild', [oViewModelDom]);
Plugins.runHook('view-model-post-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
}
@ -5180,7 +5180,7 @@ Knoin.prototype.hideScreenPopup = function (ViewModelClassToHide)
if (ViewModelClassToHide && ViewModelClassToHide.__vm && ViewModelClassToHide.__dom)
{
ViewModelClassToHide.__vm.modalVisibility(false);
this.delegateRun(ViewModelClassToHide.__vm, 'onHide');
Utils.delegateRun(ViewModelClassToHide.__vm, 'onHide');
this.popupVisibility(false);
Plugins.runHook('view-model-on-hide', [ViewModelClassToHide.__name, ViewModelClassToHide.__vm]);
@ -5205,10 +5205,14 @@ Knoin.prototype.showScreenPopup = function (ViewModelClassToShow, aParameters)
{
ViewModelClassToShow.__dom.show();
ViewModelClassToShow.__vm.modalVisibility(true);
this.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
this.popupVisibility(true);
Plugins.runHook('view-model-on-show', [ViewModelClassToShow.__name, ViewModelClassToShow.__vm, aParameters || []]);
_.delay(function () {
Utils.delegateRun(ViewModelClassToShow.__vm, 'onFocus');
}, 500);
}
}
};
@ -5256,7 +5260,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
}, this);
}
this.delegateRun(oScreen, 'onBuild');
Utils.delegateRun(oScreen, 'onBuild');
}
_.defer(function () {
@ -5264,7 +5268,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
// hide screen
if (self.oCurrentScreen)
{
self.delegateRun(self.oCurrentScreen, 'onHide');
Utils.delegateRun(self.oCurrentScreen, 'onHide');
if (Utils.isNonEmptyArray(self.oCurrentScreen.viewModels()))
{
@ -5275,7 +5279,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
{
ViewModelClass.__dom.hide();
ViewModelClass.__vm.viewModelVisibility(false);
self.delegateRun(ViewModelClass.__vm, 'onHide');
Utils.delegateRun(ViewModelClass.__vm, 'onHide');
}
});
@ -5289,7 +5293,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
if (self.oCurrentScreen)
{
self.delegateRun(self.oCurrentScreen, 'onShow');
Utils.delegateRun(self.oCurrentScreen, 'onShow');
Plugins.runHook('screen-on-show', [self.oCurrentScreen.screenName(), self.oCurrentScreen]);
@ -5302,7 +5306,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
{
ViewModelClass.__dom.show();
ViewModelClass.__vm.viewModelVisibility(true);
self.delegateRun(ViewModelClass.__vm, 'onShow');
Utils.delegateRun(ViewModelClass.__vm, 'onShow');
Plugins.runHook('view-model-on-show', [ViewModelClass.__name, ViewModelClass.__vm]);
}
@ -5358,7 +5362,7 @@ Knoin.prototype.startScreens = function (aScreensClasses)
oScreen.__start();
Plugins.runHook('screen-pre-start', [oScreen.screenName(), oScreen]);
this.delegateRun(oScreen, 'onStart');
Utils.delegateRun(oScreen, 'onStart');
Plugins.runHook('screen-post-start', [oScreen.screenName(), oScreen]);
}
}, this);
@ -5419,7 +5423,7 @@ Knoin.prototype.bootstart = function ()
};
kn = new Knoin();
/**
* @param {string=} sEmail
* @param {string=} sName
@ -5783,7 +5787,7 @@ EmailModel.prototype.inputoTagLine = function ()
{
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
};
/**
* @constructor
*/
@ -5905,7 +5909,7 @@ ContactModel.prototype.lineAsCcc = function ()
return aResult.join(' ');
};
/**
* @param {number=} iType = Enums.ContactPropertyType.Unknown
* @param {string=} sValue = ''
@ -5927,7 +5931,7 @@ function ContactPropertyModel(iType, sValue, bFocused, sPlaceholder)
return sPlaceholder ? Utils.i18n(sPlaceholder) : '';
}, this);
}
/**
* @constructor
*/
@ -6154,7 +6158,7 @@ AttachmentModel.prototype.iconClass = function ()
return sClass;
};
/**
* @constructor
* @param {string} sId
@ -6215,7 +6219,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
}
return bResult;
};
};
/**
* @constructor
*/
@ -7170,7 +7174,7 @@ MessageModel.prototype.showInternalImages = function (bLazy)
Utils.windowResize(500);
}
};
/**
* @constructor
*/
@ -7494,7 +7498,7 @@ FolderModel.prototype.printableFullName = function ()
{
return this.fullName.split(this.delimiter).join(' / ');
};
/**
* @param {string} sEmail
* @param {boolean=} bCanBeDelete = true
@ -7515,7 +7519,7 @@ AccountModel.prototype.email = '';
AccountModel.prototype.changeAccountLink = function ()
{
return RL.link().change(this.email);
};
};
/**
* @param {string} sId
* @param {string} sEmail
@ -7551,7 +7555,7 @@ IdentityModel.prototype.formattedNameForEmail = function ()
var sName = this.name();
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -7655,13 +7659,13 @@ PopupsFolderClearViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -7675,7 +7679,7 @@ function PopupsFolderCreateViewModel()
}, this);
this.folderName = ko.observable('');
this.focusTrigger = ko.observable(false);
this.folderName.focused = ko.observable(false);
this.selectedParentValue = ko.observable(Consts.Values.UnuseOptionValue);
@ -7759,13 +7763,17 @@ PopupsFolderCreateViewModel.prototype.clearPopup = function ()
{
this.folderName('');
this.selectedParentValue('');
this.focusTrigger(false);
this.folderName.focused(false);
};
PopupsFolderCreateViewModel.prototype.onShow = function ()
{
this.clearPopup();
this.focusTrigger(true);
};
PopupsFolderCreateViewModel.prototype.onFocus = function ()
{
this.folderName.focused(true);
};
PopupsFolderCreateViewModel.prototype.onBuild = function ()
@ -7775,13 +7783,13 @@ PopupsFolderCreateViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -7893,14 +7901,14 @@ PopupsFolderSystemViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -8393,7 +8401,7 @@ PopupsComposeViewModel.prototype.sendMessageResponse = function (sResult, oData)
bResult = true;
if (this.modalVisibility())
{
kn.delegateRun(this, 'closeCommand');
Utils.delegateRun(this, 'closeCommand');
}
}
@ -8495,7 +8503,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
aDownloads = [],
aDraftInfo = null,
oMessage = null,
bFocusOnBody = false,
sComposeType = sType || Enums.ComposeType.Empty,
fEmailArrayToStringLineHelper = function (aList) {
@ -8556,7 +8563,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
this.sInReplyTo = oMessage.sMessageId;
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.sReferences);
bFocusOnBody = true;
break;
case Enums.ComposeType.ReplyAll:
@ -8568,7 +8574,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
this.sInReplyTo = oMessage.sMessageId;
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.references());
bFocusOnBody = true;
break;
case Enums.ComposeType.Forward:
@ -8654,11 +8659,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
});
}
if ('' === this.to())
{
this.to.focusTrigger(!this.to.focusTrigger());
}
aDownloads = this.getAttachmentsDownloadsForUpload();
if (Utils.isNonEmptyArray(aDownloads))
{
@ -8694,11 +8694,20 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
}, aDownloads);
}
if (bFocusOnBody && this.oEditor)
this.triggerForResize();
};
PopupsComposeViewModel.prototype.onFocus = function ()
{
if ('' === this.to())
{
this.to.focusTrigger(!this.to.focusTrigger());
}
else if (this.oEditor)
{
this.oEditor.focus();
}
this.triggerForResize();
};
@ -8708,7 +8717,7 @@ PopupsComposeViewModel.prototype.tryToClosePopup = function ()
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
if (self.modalVisibility())
{
kn.delegateRun(self, 'closeCommand');
Utils.delegateRun(self, 'closeCommand');
}
}]);
};
@ -9305,7 +9314,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
this.resizer(!this.resizer());
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -9869,7 +9878,7 @@ PopupsContactsViewModel.prototype.onBuild = function (oDom)
{
if (Enums.EventKeyCode.Esc === oEvent.keyCode)
{
kn.delegateRun(self, 'closeCommand');
Utils.delegateRun(self, 'closeCommand');
bResult = false;
}
else if (oEvent.ctrlKey && Enums.EventKeyCode.S === oEvent.keyCode)
@ -9900,7 +9909,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
oItem.checked(false);
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10024,7 +10033,10 @@ PopupsAdvancedSearchViewModel.prototype.clearPopup = function ()
PopupsAdvancedSearchViewModel.prototype.onShow = function ()
{
this.clearPopup();
};
PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
{
this.fromFocus(true);
};
@ -10035,13 +10047,13 @@ PopupsAdvancedSearchViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10147,6 +10159,10 @@ PopupsAddAccountViewModel.prototype.clearPopup = function ()
PopupsAddAccountViewModel.prototype.onShow = function ()
{
this.clearPopup();
};
PopupsAddAccountViewModel.prototype.onFocus = function ()
{
this.emailFocus(true);
};
@ -10159,13 +10175,13 @@ PopupsAddAccountViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10304,7 +10320,10 @@ PopupsIdentityViewModel.prototype.onShow = function (oIdentity)
this.owner(this.id === RL.data().accountEmail());
}
};
PopupsIdentityViewModel.prototype.onFocus = function ()
{
if (!this.owner())
{
this.email.focused(true);
@ -10318,13 +10337,13 @@ PopupsIdentityViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10386,7 +10405,7 @@ PopupsLanguagesViewModel.prototype.onBuild = function ()
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
Utils.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
@ -10398,7 +10417,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang);
this.cancelCommand();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10479,7 +10498,10 @@ PopupsAskViewModel.prototype.onShow = function (sAskDesc, fYesFunc, fNoFunc, sYe
{
this.yesButton(sNoButton);
}
};
PopupsAskViewModel.prototype.onFocus = function ()
{
this.yesFocus(true);
};
@ -10513,7 +10535,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10783,7 +10805,7 @@ LoginViewModel.prototype.selectLanguage = function ()
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10850,7 +10872,7 @@ AbstractSystemDropDownViewModel.prototype.logoutClick = function ()
RL.loginAndLogoutReload(true, RL.settingsGet('ParentEmail') && 0 < RL.settingsGet('ParentEmail').length);
});
};
};
/**
* @constructor
* @extends AbstractSystemDropDownViewModel
@ -10862,7 +10884,7 @@ function MailBoxSystemDropDownViewModel()
}
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/**
* @constructor
* @extends AbstractSystemDropDownViewModel
@ -10874,7 +10896,7 @@ function SettingsSystemDropDownViewModel()
}
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10989,7 +11011,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
kn.showScreenPopup(PopupsContactsViewModel);
}
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11857,7 +11879,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
;
return !!oJua;
};
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -12196,7 +12218,7 @@ MailBoxMessageViewViewModel.prototype.showImages = function (oMessage)
oMessage.showExternalImages(true);
}
};
/**
* @param {?} oScreen
*
@ -12223,7 +12245,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
{
kn.setHash(RL.link().inbox());
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -12246,7 +12268,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
{
kn.setHash(RL.link().inbox());
};
/**
* @constructor
*/
@ -12400,7 +12422,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
{
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/**
* @constructor
*/
@ -12438,7 +12460,7 @@ SettingsContacts.prototype.onShow = function ()
{
this.showPassword(false);
};
/**
* @constructor
*/
@ -12504,7 +12526,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
}
}
};
/**
* @constructor
*/
@ -12555,7 +12577,7 @@ SettingsIdentity.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -12676,7 +12698,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
});
}, 50);
};
};
/**
* @constructor
*/
@ -12743,7 +12765,7 @@ function SettingsSocialScreen()
}
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
/**
* @constructor
*/
@ -12807,7 +12829,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
this.passwordUpdateError(true);
}
};
/**
* @constructor
*/
@ -13002,7 +13024,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
oFolder.subScribed(false);
};
/**
* @constructor
*/
@ -13219,7 +13241,7 @@ SettingsThemes.prototype.initCustomThemeUploader = function ()
return false;
};
/**
* @constructor
*/
@ -13288,7 +13310,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
};
/**
* @constructor
* @extends AbstractData
@ -14236,7 +14258,7 @@ WebMailDataStorage.prototype.setMessageList = function (oData, bCached)
));
}
};
/**
* @constructor
*/
@ -14510,7 +14532,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion
});
};
/**
* @constructor
* @extends AbstractAjaxRemoteStorage
@ -15188,7 +15210,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
this.defaultRequest(fCallback, 'SocialUsers');
};
/**
* @constructor
*/
@ -15254,7 +15276,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{
this.oEmailsPicsHashes = oData;
};
/**
* @constructor
* @extends AbstractCacheStorage
@ -15571,7 +15593,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
}
};
/**
* @param {Array} aViewModels
* @constructor
@ -15650,7 +15672,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
RoutedSettingsViewModel.__vm = oSettingsScreen;
ko.applyBindings(oSettingsScreen, oViewModelDom[0]);
kn.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
Utils.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
}
else
{
@ -15664,7 +15686,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
// hide
if (self.oCurrentSubScreen)
{
kn.delegateRun(self.oCurrentSubScreen, 'onHide');
Utils.delegateRun(self.oCurrentSubScreen, 'onHide');
self.oCurrentSubScreen.viewModelDom.hide();
}
// --
@ -15675,7 +15697,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
if (self.oCurrentSubScreen)
{
self.oCurrentSubScreen.viewModelDom.show();
kn.delegateRun(self.oCurrentSubScreen, 'onShow');
Utils.delegateRun(self.oCurrentSubScreen, 'onShow');
_.each(self.menu(), function (oItem) {
oItem.selected(oSettingsScreen && oSettingsScreen.__rlSettingsData && oItem.route === oSettingsScreen.__rlSettingsData.Route);
@ -15699,7 +15721,7 @@ AbstractSettings.prototype.onHide = function ()
{
if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom)
{
kn.delegateRun(this.oCurrentSubScreen, 'onHide');
Utils.delegateRun(this.oCurrentSubScreen, 'onHide');
this.oCurrentSubScreen.viewModelDom.hide();
}
};
@ -15748,7 +15770,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules]
];
};
/**
* @constructor
* @extends KnoinAbstractScreen
@ -15763,7 +15785,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
LoginScreen.prototype.onShow = function ()
{
RL.setTitle('');
};
};
/**
* @constructor
* @extends KnoinAbstractScreen
@ -15928,7 +15950,7 @@ MailBoxScreen.prototype.routes = function ()
[/^([^\/]*)$/, {'normalize_': fNormS}]
];
};
/**
* @constructor
* @extends AbstractSettings
@ -15956,7 +15978,7 @@ SettingsScreen.prototype.onShow = function ()
RL.setTitle(this.sSettingsTitle);
};
/**
* @constructor
* @extends KnoinAbstractBoot
@ -16218,7 +16240,7 @@ AbstractApp.prototype.bootstart = function ()
Utils.windowResize();
}, 1000);
};
/**
* @constructor
* @extends AbstractApp
@ -17139,7 +17161,7 @@ RainLoopApp.prototype.bootstart = function ()
* @type {RainLoopApp}
*/
RL = new RainLoopApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -17186,9 +17208,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null;
});
};
if (window.SimplePace) {
window.SimplePace.add(10);
}
}
}(window, jQuery, ko, crossroads, hasher, moment, Jua, _));

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
/*! See http://www.JSON.org/js.html */
var JSON;JSON||(JSON={}),function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(b&&typeof b!="function"&&(typeof b!="object"||typeof b.length!="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver=="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})}();
/*! See http://www.JSON.org/js.html */
var JSON;JSON||(JSON={}),function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(b&&typeof b!="function"&&(typeof b!="object"||typeof b.length!="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver=="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})}();
/*! RainLoop Simple Pace v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
!function(a){function b(){var b=this;b.el=null,b.done=!1,b.progress=0,b.addInterval=0,b.addSpeed=3,b.stopProgress=100,b.interval=a.setInterval(function(){var c=b.build();c&&a.clearInterval(b.interval)},100)}if(b.prototype.startAddInterval=function(){var b=this;b.stopAddInterval(),b.addInterval=a.setInterval(function(){0<b.progress&&b.stopProgress>b.progress&&b.add(b.addSpeed)},500)},b.prototype.stopAddInterval=function(){a.clearInterval(this.addInterval),this.addInterval=0},b.prototype.build=function(){if(null===this.el){var a=document.querySelector("body");a&&(this.el=document.createElement("div"),this.el.className="simple-pace simple-pace-active",this.el.innerHTML='<div class="simple-pace-progress"><div class="simple-pace-progress-inner"></div></div><div class="simple-pace-activity"></div>',a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el))}return this.el},b.prototype.reset=function(){return this.progress=0,this.render()},b.prototype.update=function(b){var c=a.parseInt(b,10);return c>this.progress&&(this.progress=c,this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress),this.render()},b.prototype.add=function(b){return this.progress+=a.parseInt(b,10),this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress,this.render()},b.prototype.setSpeed=function(a,b){this.addSpeed=a,this.stopProgress=b||100},b.prototype.render=function(){var b=this.build();b&&b.children&&b.children[0]&&b.children[0].setAttribute("style","width:"+this.progress+"%"),100!==this.progress||this.done?100>this.progress&&this.done?(this.done=!1,this.startAddInterval(),b.className=b.className.replace("simple-pace-inactive",""),b.className+=" simple-pace-inactive"):100>this.progress&&!this.done&&0===this.addInterval&&this.startAddInterval():(this.done=!0,this.stopAddInterval(),a.setTimeout(function(){b.className=b.className.replace("simple-pace-active",""),b.className+=" simple-pace-inactive"},500))},!a.SimplePace){var c=new b;a.SimplePace={sleep:function(){c.setSpeed(2,95)},set:function(a){c.update(a)},add:function(a){c.add(a)}}}}(window);
!function(a){function b(){var b=this;b.el=null,b.done=!1,b.progress=0,b.addInterval=0,b.addSpeed=3,b.stopProgress=100,b.interval=a.setInterval(function(){var c=b.build();c&&a.clearInterval(b.interval)},100)}if(b.prototype.startAddInterval=function(){var b=this;b.stopAddInterval(),b.addInterval=a.setInterval(function(){0<b.progress&&b.stopProgress>b.progress&&b.add(b.addSpeed)},500)},b.prototype.stopAddInterval=function(){a.clearInterval(this.addInterval),this.addInterval=0},b.prototype.build=function(){if(null===this.el){var a=document.querySelector("body");a&&(this.el=document.createElement("div"),this.el.className="simple-pace simple-pace-active",this.el.innerHTML='<div class="simple-pace-progress"><div class="simple-pace-progress-inner"></div></div><div class="simple-pace-activity"></div>',a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el))}return this.el},b.prototype.reset=function(){return this.progress=0,this.render()},b.prototype.update=function(b){var c=a.parseInt(b,10);return c>this.progress&&(this.progress=c,this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress),this.render()},b.prototype.add=function(b){return this.progress+=a.parseInt(b,10),this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress,this.render()},b.prototype.setSpeed=function(a,b){this.addSpeed=a,this.stopProgress=b||100},b.prototype.render=function(){var b=this.build();b&&b.children&&b.children[0]&&b.children[0].setAttribute("style","width:"+this.progress+"%"),100!==this.progress||this.done?100>this.progress&&this.done?(this.done=!1,this.startAddInterval(),b.className=b.className.replace("simple-pace-inactive",""),b.className+=" simple-pace-inactive"):100>this.progress&&!this.done&&0===this.addInterval&&this.startAddInterval():(this.done=!0,this.stopAddInterval(),a.setTimeout(function(){b.className=b.className.replace("simple-pace-active",""),b.className+=" simple-pace-inactive"},500))},!a.SimplePace){var c=new b;a.SimplePace={sleep:function(){c.setSpeed(2,95)},set:function(a){c.update(a)},add:function(a){c.add(a)}}}}(window);
/*! RainLoop Top Driver v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
!function(a,b){function c(){}c.prototype.s=a.sessionStorage,c.prototype.t=a.top||a,c.prototype.getHash=function(){var a=null;if(this.s)a=this.s.getItem("__rlA")||null;else if(this.t){var c=this.t.name&&b&&"{"===this.t.name.toString().substr(0,1)?b.parse(this.t.name.toString()):null;a=c?c.__rlA||null:null}return a},c.prototype.setHash=function(){var c=a.rainloopAppData,d=null;this.s?this.s.setItem("__rlA",c&&c.AuthAccountHash?c.AuthAccountHash:""):this.t&&b&&(d={},d.__rlA=c&&c.AuthAccountHash?c.AuthAccountHash:"",this.t.name=b.stringify(d))},c.prototype.clearHash=function(){this.s?this.s.setItem("__rlA",""):this.t&&(this.t.name="")},a._rlhh=new c,a.__rlah=function(){return a._rlhh?a._rlhh.getHash():null},a.__rlah_set=function(){a._rlhh&&a._rlhh.setHash()},a.__rlah_clear=function(){a._rlhh&&a._rlhh.clearHash()}}(window,window.JSON);

File diff suppressed because one or more lines are too long