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

@ -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, _));