mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-11 15:44:43 +08:00
Add onFocus callback to popups
This commit is contained in:
parent
fd2c2346a8
commit
04932fce63
28 changed files with 412 additions and 336 deletions
|
@ -634,6 +634,19 @@ Utils.getUploadErrorDescByCode = function (mCode)
|
||||||
return sResult;
|
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
|
* @param {?} oEvent
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -74,19 +74,6 @@ Knoin.prototype.screen = function (sScreenName)
|
||||||
return ('' !== sScreenName && !Utils.isUnd(this.oScreens[sScreenName])) ? this.oScreens[sScreenName] : null;
|
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 {Function} ViewModelClass
|
||||||
* @param {Object=} oScreen
|
* @param {Object=} oScreen
|
||||||
|
@ -127,7 +114,7 @@ Knoin.prototype.buildViewModel = function (ViewModelClass, oScreen)
|
||||||
Plugins.runHook('view-model-pre-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
|
Plugins.runHook('view-model-pre-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
|
||||||
|
|
||||||
ko.applyBindings(oViewModel, oViewModelDom[0]);
|
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]);
|
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)
|
if (ViewModelClassToHide && ViewModelClassToHide.__vm && ViewModelClassToHide.__dom)
|
||||||
{
|
{
|
||||||
ViewModelClassToHide.__vm.modalVisibility(false);
|
ViewModelClassToHide.__vm.modalVisibility(false);
|
||||||
this.delegateRun(ViewModelClassToHide.__vm, 'onHide');
|
Utils.delegateRun(ViewModelClassToHide.__vm, 'onHide');
|
||||||
this.popupVisibility(false);
|
this.popupVisibility(false);
|
||||||
|
|
||||||
Plugins.runHook('view-model-on-hide', [ViewModelClassToHide.__name, ViewModelClassToHide.__vm]);
|
Plugins.runHook('view-model-on-hide', [ViewModelClassToHide.__name, ViewModelClassToHide.__vm]);
|
||||||
|
@ -185,10 +172,14 @@ Knoin.prototype.showScreenPopup = function (ViewModelClassToShow, aParameters)
|
||||||
{
|
{
|
||||||
ViewModelClassToShow.__dom.show();
|
ViewModelClassToShow.__dom.show();
|
||||||
ViewModelClassToShow.__vm.modalVisibility(true);
|
ViewModelClassToShow.__vm.modalVisibility(true);
|
||||||
this.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
||||||
this.popupVisibility(true);
|
this.popupVisibility(true);
|
||||||
|
|
||||||
Plugins.runHook('view-model-on-show', [ViewModelClassToShow.__name, ViewModelClassToShow.__vm, aParameters || []]);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.delegateRun(oScreen, 'onBuild');
|
Utils.delegateRun(oScreen, 'onBuild');
|
||||||
}
|
}
|
||||||
|
|
||||||
_.defer(function () {
|
_.defer(function () {
|
||||||
|
@ -244,7 +235,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
|
||||||
// hide screen
|
// hide screen
|
||||||
if (self.oCurrentScreen)
|
if (self.oCurrentScreen)
|
||||||
{
|
{
|
||||||
self.delegateRun(self.oCurrentScreen, 'onHide');
|
Utils.delegateRun(self.oCurrentScreen, 'onHide');
|
||||||
|
|
||||||
if (Utils.isNonEmptyArray(self.oCurrentScreen.viewModels()))
|
if (Utils.isNonEmptyArray(self.oCurrentScreen.viewModels()))
|
||||||
{
|
{
|
||||||
|
@ -255,7 +246,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
|
||||||
{
|
{
|
||||||
ViewModelClass.__dom.hide();
|
ViewModelClass.__dom.hide();
|
||||||
ViewModelClass.__vm.viewModelVisibility(false);
|
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)
|
if (self.oCurrentScreen)
|
||||||
{
|
{
|
||||||
|
|
||||||
self.delegateRun(self.oCurrentScreen, 'onShow');
|
Utils.delegateRun(self.oCurrentScreen, 'onShow');
|
||||||
|
|
||||||
Plugins.runHook('screen-on-show', [self.oCurrentScreen.screenName(), self.oCurrentScreen]);
|
Plugins.runHook('screen-on-show', [self.oCurrentScreen.screenName(), self.oCurrentScreen]);
|
||||||
|
|
||||||
|
@ -282,7 +273,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
|
||||||
{
|
{
|
||||||
ViewModelClass.__dom.show();
|
ViewModelClass.__dom.show();
|
||||||
ViewModelClass.__vm.viewModelVisibility(true);
|
ViewModelClass.__vm.viewModelVisibility(true);
|
||||||
self.delegateRun(ViewModelClass.__vm, 'onShow');
|
Utils.delegateRun(ViewModelClass.__vm, 'onShow');
|
||||||
|
|
||||||
Plugins.runHook('view-model-on-show', [ViewModelClass.__name, ViewModelClass.__vm]);
|
Plugins.runHook('view-model-on-show', [ViewModelClass.__name, ViewModelClass.__vm]);
|
||||||
}
|
}
|
||||||
|
@ -338,7 +329,7 @@ Knoin.prototype.startScreens = function (aScreensClasses)
|
||||||
oScreen.__start();
|
oScreen.__start();
|
||||||
|
|
||||||
Plugins.runHook('screen-pre-start', [oScreen.screenName(), oScreen]);
|
Plugins.runHook('screen-pre-start', [oScreen.screenName(), oScreen]);
|
||||||
this.delegateRun(oScreen, 'onStart');
|
Utils.delegateRun(oScreen, 'onStart');
|
||||||
Plugins.runHook('screen-post-start', [oScreen.screenName(), oScreen]);
|
Plugins.runHook('screen-post-start', [oScreen.screenName(), oScreen]);
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
|
@ -78,7 +78,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
|
||||||
RoutedSettingsViewModel.__vm = oSettingsScreen;
|
RoutedSettingsViewModel.__vm = oSettingsScreen;
|
||||||
|
|
||||||
ko.applyBindings(oSettingsScreen, oViewModelDom[0]);
|
ko.applyBindings(oSettingsScreen, oViewModelDom[0]);
|
||||||
kn.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
|
Utils.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
|
||||||
// hide
|
// hide
|
||||||
if (self.oCurrentSubScreen)
|
if (self.oCurrentSubScreen)
|
||||||
{
|
{
|
||||||
kn.delegateRun(self.oCurrentSubScreen, 'onHide');
|
Utils.delegateRun(self.oCurrentSubScreen, 'onHide');
|
||||||
self.oCurrentSubScreen.viewModelDom.hide();
|
self.oCurrentSubScreen.viewModelDom.hide();
|
||||||
}
|
}
|
||||||
// --
|
// --
|
||||||
|
@ -103,7 +103,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
|
||||||
if (self.oCurrentSubScreen)
|
if (self.oCurrentSubScreen)
|
||||||
{
|
{
|
||||||
self.oCurrentSubScreen.viewModelDom.show();
|
self.oCurrentSubScreen.viewModelDom.show();
|
||||||
kn.delegateRun(self.oCurrentSubScreen, 'onShow');
|
Utils.delegateRun(self.oCurrentSubScreen, 'onShow');
|
||||||
|
|
||||||
_.each(self.menu(), function (oItem) {
|
_.each(self.menu(), function (oItem) {
|
||||||
oItem.selected(oSettingsScreen && oSettingsScreen.__rlSettingsData && oItem.route === oSettingsScreen.__rlSettingsData.Route);
|
oItem.selected(oSettingsScreen && oSettingsScreen.__rlSettingsData && oItem.route === oSettingsScreen.__rlSettingsData.Route);
|
||||||
|
@ -127,7 +127,7 @@ AbstractSettings.prototype.onHide = function ()
|
||||||
{
|
{
|
||||||
if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom)
|
if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom)
|
||||||
{
|
{
|
||||||
kn.delegateRun(this.oCurrentSubScreen, 'onHide');
|
Utils.delegateRun(this.oCurrentSubScreen, 'onHide');
|
||||||
this.oCurrentSubScreen.viewModelDom.hide();
|
this.oCurrentSubScreen.viewModelDom.hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -61,15 +61,17 @@ html.rl-started-trigger.no-mobile #rl-content {
|
||||||
.opacity(70);
|
.opacity(70);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#rl-loading {
|
||||||
|
.transition(opacity 0.5s linear);
|
||||||
|
}
|
||||||
|
|
||||||
.rl-anim {
|
.rl-anim {
|
||||||
|
|
||||||
&.csstransitions.no-mobile #rl-content {
|
&.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);
|
.transition(opacity 0.3s ease-out);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.csstransitions.no-mobile .b-login-content .loginFormWrapper {
|
&.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);
|
.transition(all 0.3s ease-out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,13 @@ PopupsActivateViewModel.prototype.onShow = function ()
|
||||||
this.activateText('');
|
this.activateText('');
|
||||||
this.activateText.isError(false);
|
this.activateText.isError(false);
|
||||||
this.activationSuccessed(false);
|
this.activationSuccessed(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsActivateViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
|
if (!this.activateProcess())
|
||||||
|
{
|
||||||
this.key.focus(true);
|
this.key.focus(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -105,6 +105,10 @@ PopupsAddAccountViewModel.prototype.clearPopup = function ()
|
||||||
PopupsAddAccountViewModel.prototype.onShow = function ()
|
PopupsAddAccountViewModel.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
this.clearPopup();
|
this.clearPopup();
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsAddAccountViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
this.emailFocus(true);
|
this.emailFocus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -117,7 +121,7 @@ PopupsAddAccountViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
|
|
@ -123,7 +123,10 @@ PopupsAdvancedSearchViewModel.prototype.clearPopup = function ()
|
||||||
PopupsAdvancedSearchViewModel.prototype.onShow = function ()
|
PopupsAdvancedSearchViewModel.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
this.clearPopup();
|
this.clearPopup();
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
this.fromFocus(true);
|
this.fromFocus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -134,7 +137,7 @@ PopupsAdvancedSearchViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
|
|
@ -80,7 +80,10 @@ PopupsAskViewModel.prototype.onShow = function (sAskDesc, fYesFunc, fNoFunc, sYe
|
||||||
{
|
{
|
||||||
this.yesButton(sNoButton);
|
this.yesButton(sNoButton);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsAskViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
this.yesFocus(true);
|
this.yesFocus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -492,7 +492,7 @@ PopupsComposeViewModel.prototype.sendMessageResponse = function (sResult, oData)
|
||||||
bResult = true;
|
bResult = true;
|
||||||
if (this.modalVisibility())
|
if (this.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(this, 'closeCommand');
|
Utils.delegateRun(this, 'closeCommand');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,7 +594,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
||||||
aDownloads = [],
|
aDownloads = [],
|
||||||
aDraftInfo = null,
|
aDraftInfo = null,
|
||||||
oMessage = null,
|
oMessage = null,
|
||||||
bFocusOnBody = false,
|
|
||||||
sComposeType = sType || Enums.ComposeType.Empty,
|
sComposeType = sType || Enums.ComposeType.Empty,
|
||||||
fEmailArrayToStringLineHelper = function (aList) {
|
fEmailArrayToStringLineHelper = function (aList) {
|
||||||
|
|
||||||
|
@ -655,7 +654,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
||||||
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
|
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
|
||||||
this.sInReplyTo = oMessage.sMessageId;
|
this.sInReplyTo = oMessage.sMessageId;
|
||||||
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.sReferences);
|
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.sReferences);
|
||||||
bFocusOnBody = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Enums.ComposeType.ReplyAll:
|
case Enums.ComposeType.ReplyAll:
|
||||||
|
@ -667,7 +665,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
||||||
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
|
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
|
||||||
this.sInReplyTo = oMessage.sMessageId;
|
this.sInReplyTo = oMessage.sMessageId;
|
||||||
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.references());
|
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.references());
|
||||||
bFocusOnBody = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Enums.ComposeType.Forward:
|
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();
|
aDownloads = this.getAttachmentsDownloadsForUpload();
|
||||||
if (Utils.isNonEmptyArray(aDownloads))
|
if (Utils.isNonEmptyArray(aDownloads))
|
||||||
{
|
{
|
||||||
|
@ -793,7 +785,16 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
||||||
}, aDownloads);
|
}, 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.oEditor.focus();
|
||||||
}
|
}
|
||||||
|
@ -807,7 +808,7 @@ PopupsComposeViewModel.prototype.tryToClosePopup = function ()
|
||||||
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
|
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
|
||||||
if (self.modalVisibility())
|
if (self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'closeCommand');
|
Utils.delegateRun(self, 'closeCommand');
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -563,7 +563,7 @@ PopupsContactsViewModel.prototype.onBuild = function (oDom)
|
||||||
{
|
{
|
||||||
if (Enums.EventKeyCode.Esc === oEvent.keyCode)
|
if (Enums.EventKeyCode.Esc === oEvent.keyCode)
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'closeCommand');
|
Utils.delegateRun(self, 'closeCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
else if (oEvent.ctrlKey && Enums.EventKeyCode.S === oEvent.keyCode)
|
else if (oEvent.ctrlKey && Enums.EventKeyCode.S === oEvent.keyCode)
|
||||||
|
|
|
@ -193,7 +193,7 @@ PopupsDomainViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
|
|
@ -103,7 +103,7 @@ PopupsFolderClearViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
|
|
@ -13,7 +13,7 @@ function PopupsFolderCreateViewModel()
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.folderName = ko.observable('');
|
this.folderName = ko.observable('');
|
||||||
this.focusTrigger = ko.observable(false);
|
this.folderName.focused = ko.observable(false);
|
||||||
|
|
||||||
this.selectedParentValue = ko.observable(Consts.Values.UnuseOptionValue);
|
this.selectedParentValue = ko.observable(Consts.Values.UnuseOptionValue);
|
||||||
|
|
||||||
|
@ -97,13 +97,17 @@ PopupsFolderCreateViewModel.prototype.clearPopup = function ()
|
||||||
{
|
{
|
||||||
this.folderName('');
|
this.folderName('');
|
||||||
this.selectedParentValue('');
|
this.selectedParentValue('');
|
||||||
this.focusTrigger(false);
|
this.folderName.focused(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
PopupsFolderCreateViewModel.prototype.onShow = function ()
|
PopupsFolderCreateViewModel.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
this.clearPopup();
|
this.clearPopup();
|
||||||
this.focusTrigger(true);
|
};
|
||||||
|
|
||||||
|
PopupsFolderCreateViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
|
this.folderName.focused(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
PopupsFolderCreateViewModel.prototype.onBuild = function ()
|
PopupsFolderCreateViewModel.prototype.onBuild = function ()
|
||||||
|
@ -113,7 +117,7 @@ PopupsFolderCreateViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
|
|
@ -111,7 +111,7 @@ PopupsFolderSystemViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
|
|
@ -138,7 +138,10 @@ PopupsIdentityViewModel.prototype.onShow = function (oIdentity)
|
||||||
|
|
||||||
this.owner(this.id === RL.data().accountEmail());
|
this.owner(this.id === RL.data().accountEmail());
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsIdentityViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
if (!this.owner())
|
if (!this.owner())
|
||||||
{
|
{
|
||||||
this.email.focused(true);
|
this.email.focused(true);
|
||||||
|
@ -152,7 +155,7 @@ PopupsIdentityViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
|
|
@ -61,7 +61,7 @@ PopupsLanguagesViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
|
|
@ -118,7 +118,7 @@ PopupsPluginViewModel.prototype.tryToClosePopup = function ()
|
||||||
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
|
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
|
||||||
if (self.modalVisibility())
|
if (self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "RainLoop",
|
"name": "RainLoop",
|
||||||
"title": "RainLoop Webmail",
|
"title": "RainLoop Webmail",
|
||||||
"version": "1.6.0",
|
"version": "1.6.0",
|
||||||
"release": "616",
|
"release": "621",
|
||||||
"description": "Simple, modern & fast web-based email client",
|
"description": "Simple, modern & fast web-based email client",
|
||||||
"homepage": "http://rainloop.net",
|
"homepage": "http://rainloop.net",
|
||||||
"main": "Gruntfile.js",
|
"main": "Gruntfile.js",
|
||||||
|
|
|
@ -48,6 +48,15 @@
|
||||||
<div class="e-bounce bounce3"></div>
|
<div class="e-bounce bounce3"></div>
|
||||||
</div>
|
</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">
|
<div id="rl-loading-error" class="thm-loading">
|
||||||
An Error occurred,<br />please refresh the page and try again.
|
An Error occurred,<br />please refresh the page and try again.
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<span class="i18n" data-i18n-text="POPUPS_CREATE_FOLDER/LABEL_NAME"></span>
|
<span class="i18n" data-i18n-text="POPUPS_CREATE_FOLDER/LABEL_NAME"></span>
|
||||||
</label>
|
</label>
|
||||||
<div class="controls">
|
<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>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
|
@ -8301,17 +8301,19 @@ html.rl-started-trigger.no-mobile #rl-content {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
filter: alpha(opacity=70);
|
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 {
|
.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;
|
-webkit-transition: opacity 0.3s ease-out;
|
||||||
-moz-transition: opacity 0.3s ease-out;
|
-moz-transition: opacity 0.3s ease-out;
|
||||||
-o-transition: opacity 0.3s ease-out;
|
-o-transition: opacity 0.3s ease-out;
|
||||||
transition: opacity 0.3s ease-out;
|
transition: opacity 0.3s ease-out;
|
||||||
}
|
}
|
||||||
.rl-anim.csstransitions.no-mobile .b-login-content .loginFormWrapper {
|
.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;
|
-webkit-transition: all 0.3s ease-out;
|
||||||
-moz-transition: all 0.3s ease-out;
|
-moz-transition: all 0.3s ease-out;
|
||||||
-o-transition: all 0.3s ease-out;
|
-o-transition: all 0.3s ease-out;
|
||||||
|
|
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -1225,6 +1225,19 @@ Utils.getUploadErrorDescByCode = function (mCode)
|
||||||
return sResult;
|
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
|
* @param {?} oEvent
|
||||||
*/
|
*/
|
||||||
|
@ -3664,19 +3677,6 @@ Knoin.prototype.screen = function (sScreenName)
|
||||||
return ('' !== sScreenName && !Utils.isUnd(this.oScreens[sScreenName])) ? this.oScreens[sScreenName] : null;
|
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 {Function} ViewModelClass
|
||||||
* @param {Object=} oScreen
|
* @param {Object=} oScreen
|
||||||
|
@ -3717,7 +3717,7 @@ Knoin.prototype.buildViewModel = function (ViewModelClass, oScreen)
|
||||||
Plugins.runHook('view-model-pre-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
|
Plugins.runHook('view-model-pre-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
|
||||||
|
|
||||||
ko.applyBindings(oViewModel, oViewModelDom[0]);
|
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]);
|
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)
|
if (ViewModelClassToHide && ViewModelClassToHide.__vm && ViewModelClassToHide.__dom)
|
||||||
{
|
{
|
||||||
ViewModelClassToHide.__vm.modalVisibility(false);
|
ViewModelClassToHide.__vm.modalVisibility(false);
|
||||||
this.delegateRun(ViewModelClassToHide.__vm, 'onHide');
|
Utils.delegateRun(ViewModelClassToHide.__vm, 'onHide');
|
||||||
this.popupVisibility(false);
|
this.popupVisibility(false);
|
||||||
|
|
||||||
Plugins.runHook('view-model-on-hide', [ViewModelClassToHide.__name, ViewModelClassToHide.__vm]);
|
Plugins.runHook('view-model-on-hide', [ViewModelClassToHide.__name, ViewModelClassToHide.__vm]);
|
||||||
|
@ -3775,10 +3775,14 @@ Knoin.prototype.showScreenPopup = function (ViewModelClassToShow, aParameters)
|
||||||
{
|
{
|
||||||
ViewModelClassToShow.__dom.show();
|
ViewModelClassToShow.__dom.show();
|
||||||
ViewModelClassToShow.__vm.modalVisibility(true);
|
ViewModelClassToShow.__vm.modalVisibility(true);
|
||||||
this.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
||||||
this.popupVisibility(true);
|
this.popupVisibility(true);
|
||||||
|
|
||||||
Plugins.runHook('view-model-on-show', [ViewModelClassToShow.__name, ViewModelClassToShow.__vm, aParameters || []]);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.delegateRun(oScreen, 'onBuild');
|
Utils.delegateRun(oScreen, 'onBuild');
|
||||||
}
|
}
|
||||||
|
|
||||||
_.defer(function () {
|
_.defer(function () {
|
||||||
|
@ -3834,7 +3838,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
|
||||||
// hide screen
|
// hide screen
|
||||||
if (self.oCurrentScreen)
|
if (self.oCurrentScreen)
|
||||||
{
|
{
|
||||||
self.delegateRun(self.oCurrentScreen, 'onHide');
|
Utils.delegateRun(self.oCurrentScreen, 'onHide');
|
||||||
|
|
||||||
if (Utils.isNonEmptyArray(self.oCurrentScreen.viewModels()))
|
if (Utils.isNonEmptyArray(self.oCurrentScreen.viewModels()))
|
||||||
{
|
{
|
||||||
|
@ -3845,7 +3849,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
|
||||||
{
|
{
|
||||||
ViewModelClass.__dom.hide();
|
ViewModelClass.__dom.hide();
|
||||||
ViewModelClass.__vm.viewModelVisibility(false);
|
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)
|
if (self.oCurrentScreen)
|
||||||
{
|
{
|
||||||
|
|
||||||
self.delegateRun(self.oCurrentScreen, 'onShow');
|
Utils.delegateRun(self.oCurrentScreen, 'onShow');
|
||||||
|
|
||||||
Plugins.runHook('screen-on-show', [self.oCurrentScreen.screenName(), self.oCurrentScreen]);
|
Plugins.runHook('screen-on-show', [self.oCurrentScreen.screenName(), self.oCurrentScreen]);
|
||||||
|
|
||||||
|
@ -3872,7 +3876,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
|
||||||
{
|
{
|
||||||
ViewModelClass.__dom.show();
|
ViewModelClass.__dom.show();
|
||||||
ViewModelClass.__vm.viewModelVisibility(true);
|
ViewModelClass.__vm.viewModelVisibility(true);
|
||||||
self.delegateRun(ViewModelClass.__vm, 'onShow');
|
Utils.delegateRun(ViewModelClass.__vm, 'onShow');
|
||||||
|
|
||||||
Plugins.runHook('view-model-on-show', [ViewModelClass.__name, ViewModelClass.__vm]);
|
Plugins.runHook('view-model-on-show', [ViewModelClass.__name, ViewModelClass.__vm]);
|
||||||
}
|
}
|
||||||
|
@ -3928,7 +3932,7 @@ Knoin.prototype.startScreens = function (aScreensClasses)
|
||||||
oScreen.__start();
|
oScreen.__start();
|
||||||
|
|
||||||
Plugins.runHook('screen-pre-start', [oScreen.screenName(), oScreen]);
|
Plugins.runHook('screen-pre-start', [oScreen.screenName(), oScreen]);
|
||||||
this.delegateRun(oScreen, 'onStart');
|
Utils.delegateRun(oScreen, 'onStart');
|
||||||
Plugins.runHook('screen-post-start', [oScreen.screenName(), oScreen]);
|
Plugins.runHook('screen-post-start', [oScreen.screenName(), oScreen]);
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
@ -4547,7 +4551,7 @@ PopupsDomainViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -4692,7 +4696,7 @@ PopupsPluginViewModel.prototype.tryToClosePopup = function ()
|
||||||
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
|
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
|
||||||
if (self.modalVisibility())
|
if (self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
};
|
};
|
||||||
|
@ -4808,7 +4812,13 @@ PopupsActivateViewModel.prototype.onShow = function ()
|
||||||
this.activateText('');
|
this.activateText('');
|
||||||
this.activateText.isError(false);
|
this.activateText.isError(false);
|
||||||
this.activationSuccessed(false);
|
this.activationSuccessed(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsActivateViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
|
if (!this.activateProcess())
|
||||||
|
{
|
||||||
this.key.focus(true);
|
this.key.focus(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -4882,7 +4892,7 @@ PopupsLanguagesViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -4975,7 +4985,10 @@ PopupsAskViewModel.prototype.onShow = function (sAskDesc, fYesFunc, fNoFunc, sYe
|
||||||
{
|
{
|
||||||
this.yesButton(sNoButton);
|
this.yesButton(sNoButton);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsAskViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
this.yesFocus(true);
|
this.yesFocus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6846,7 +6859,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
|
||||||
RoutedSettingsViewModel.__vm = oSettingsScreen;
|
RoutedSettingsViewModel.__vm = oSettingsScreen;
|
||||||
|
|
||||||
ko.applyBindings(oSettingsScreen, oViewModelDom[0]);
|
ko.applyBindings(oSettingsScreen, oViewModelDom[0]);
|
||||||
kn.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
|
Utils.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -6860,7 +6873,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
|
||||||
// hide
|
// hide
|
||||||
if (self.oCurrentSubScreen)
|
if (self.oCurrentSubScreen)
|
||||||
{
|
{
|
||||||
kn.delegateRun(self.oCurrentSubScreen, 'onHide');
|
Utils.delegateRun(self.oCurrentSubScreen, 'onHide');
|
||||||
self.oCurrentSubScreen.viewModelDom.hide();
|
self.oCurrentSubScreen.viewModelDom.hide();
|
||||||
}
|
}
|
||||||
// --
|
// --
|
||||||
|
@ -6871,7 +6884,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
|
||||||
if (self.oCurrentSubScreen)
|
if (self.oCurrentSubScreen)
|
||||||
{
|
{
|
||||||
self.oCurrentSubScreen.viewModelDom.show();
|
self.oCurrentSubScreen.viewModelDom.show();
|
||||||
kn.delegateRun(self.oCurrentSubScreen, 'onShow');
|
Utils.delegateRun(self.oCurrentSubScreen, 'onShow');
|
||||||
|
|
||||||
_.each(self.menu(), function (oItem) {
|
_.each(self.menu(), function (oItem) {
|
||||||
oItem.selected(oSettingsScreen && oSettingsScreen.__rlSettingsData && oItem.route === oSettingsScreen.__rlSettingsData.Route);
|
oItem.selected(oSettingsScreen && oSettingsScreen.__rlSettingsData && oItem.route === oSettingsScreen.__rlSettingsData.Route);
|
||||||
|
@ -6895,7 +6908,7 @@ AbstractSettings.prototype.onHide = function ()
|
||||||
{
|
{
|
||||||
if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom)
|
if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom)
|
||||||
{
|
{
|
||||||
kn.delegateRun(this.oCurrentSubScreen, 'onHide');
|
Utils.delegateRun(this.oCurrentSubScreen, 'onHide');
|
||||||
this.oCurrentSubScreen.viewModelDom.hide();
|
this.oCurrentSubScreen.viewModelDom.hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
6
rainloop/v/0.0.0/static/js/admin.min.js
vendored
6
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1225,6 +1225,19 @@ Utils.getUploadErrorDescByCode = function (mCode)
|
||||||
return sResult;
|
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
|
* @param {?} oEvent
|
||||||
*/
|
*/
|
||||||
|
@ -5094,19 +5107,6 @@ Knoin.prototype.screen = function (sScreenName)
|
||||||
return ('' !== sScreenName && !Utils.isUnd(this.oScreens[sScreenName])) ? this.oScreens[sScreenName] : null;
|
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 {Function} ViewModelClass
|
||||||
* @param {Object=} oScreen
|
* @param {Object=} oScreen
|
||||||
|
@ -5147,7 +5147,7 @@ Knoin.prototype.buildViewModel = function (ViewModelClass, oScreen)
|
||||||
Plugins.runHook('view-model-pre-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
|
Plugins.runHook('view-model-pre-build', [ViewModelClass.__name, oViewModel, oViewModelDom]);
|
||||||
|
|
||||||
ko.applyBindings(oViewModel, oViewModelDom[0]);
|
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]);
|
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)
|
if (ViewModelClassToHide && ViewModelClassToHide.__vm && ViewModelClassToHide.__dom)
|
||||||
{
|
{
|
||||||
ViewModelClassToHide.__vm.modalVisibility(false);
|
ViewModelClassToHide.__vm.modalVisibility(false);
|
||||||
this.delegateRun(ViewModelClassToHide.__vm, 'onHide');
|
Utils.delegateRun(ViewModelClassToHide.__vm, 'onHide');
|
||||||
this.popupVisibility(false);
|
this.popupVisibility(false);
|
||||||
|
|
||||||
Plugins.runHook('view-model-on-hide', [ViewModelClassToHide.__name, ViewModelClassToHide.__vm]);
|
Plugins.runHook('view-model-on-hide', [ViewModelClassToHide.__name, ViewModelClassToHide.__vm]);
|
||||||
|
@ -5205,10 +5205,14 @@ Knoin.prototype.showScreenPopup = function (ViewModelClassToShow, aParameters)
|
||||||
{
|
{
|
||||||
ViewModelClassToShow.__dom.show();
|
ViewModelClassToShow.__dom.show();
|
||||||
ViewModelClassToShow.__vm.modalVisibility(true);
|
ViewModelClassToShow.__vm.modalVisibility(true);
|
||||||
this.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
||||||
this.popupVisibility(true);
|
this.popupVisibility(true);
|
||||||
|
|
||||||
Plugins.runHook('view-model-on-show', [ViewModelClassToShow.__name, ViewModelClassToShow.__vm, aParameters || []]);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.delegateRun(oScreen, 'onBuild');
|
Utils.delegateRun(oScreen, 'onBuild');
|
||||||
}
|
}
|
||||||
|
|
||||||
_.defer(function () {
|
_.defer(function () {
|
||||||
|
@ -5264,7 +5268,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
|
||||||
// hide screen
|
// hide screen
|
||||||
if (self.oCurrentScreen)
|
if (self.oCurrentScreen)
|
||||||
{
|
{
|
||||||
self.delegateRun(self.oCurrentScreen, 'onHide');
|
Utils.delegateRun(self.oCurrentScreen, 'onHide');
|
||||||
|
|
||||||
if (Utils.isNonEmptyArray(self.oCurrentScreen.viewModels()))
|
if (Utils.isNonEmptyArray(self.oCurrentScreen.viewModels()))
|
||||||
{
|
{
|
||||||
|
@ -5275,7 +5279,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
|
||||||
{
|
{
|
||||||
ViewModelClass.__dom.hide();
|
ViewModelClass.__dom.hide();
|
||||||
ViewModelClass.__vm.viewModelVisibility(false);
|
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)
|
if (self.oCurrentScreen)
|
||||||
{
|
{
|
||||||
|
|
||||||
self.delegateRun(self.oCurrentScreen, 'onShow');
|
Utils.delegateRun(self.oCurrentScreen, 'onShow');
|
||||||
|
|
||||||
Plugins.runHook('screen-on-show', [self.oCurrentScreen.screenName(), self.oCurrentScreen]);
|
Plugins.runHook('screen-on-show', [self.oCurrentScreen.screenName(), self.oCurrentScreen]);
|
||||||
|
|
||||||
|
@ -5302,7 +5306,7 @@ Knoin.prototype.screenOnRoute = function (sScreenName, sSubPart)
|
||||||
{
|
{
|
||||||
ViewModelClass.__dom.show();
|
ViewModelClass.__dom.show();
|
||||||
ViewModelClass.__vm.viewModelVisibility(true);
|
ViewModelClass.__vm.viewModelVisibility(true);
|
||||||
self.delegateRun(ViewModelClass.__vm, 'onShow');
|
Utils.delegateRun(ViewModelClass.__vm, 'onShow');
|
||||||
|
|
||||||
Plugins.runHook('view-model-on-show', [ViewModelClass.__name, ViewModelClass.__vm]);
|
Plugins.runHook('view-model-on-show', [ViewModelClass.__name, ViewModelClass.__vm]);
|
||||||
}
|
}
|
||||||
|
@ -5358,7 +5362,7 @@ Knoin.prototype.startScreens = function (aScreensClasses)
|
||||||
oScreen.__start();
|
oScreen.__start();
|
||||||
|
|
||||||
Plugins.runHook('screen-pre-start', [oScreen.screenName(), oScreen]);
|
Plugins.runHook('screen-pre-start', [oScreen.screenName(), oScreen]);
|
||||||
this.delegateRun(oScreen, 'onStart');
|
Utils.delegateRun(oScreen, 'onStart');
|
||||||
Plugins.runHook('screen-post-start', [oScreen.screenName(), oScreen]);
|
Plugins.runHook('screen-post-start', [oScreen.screenName(), oScreen]);
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
@ -7655,7 +7659,7 @@ PopupsFolderClearViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -7675,7 +7679,7 @@ function PopupsFolderCreateViewModel()
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.folderName = ko.observable('');
|
this.folderName = ko.observable('');
|
||||||
this.focusTrigger = ko.observable(false);
|
this.folderName.focused = ko.observable(false);
|
||||||
|
|
||||||
this.selectedParentValue = ko.observable(Consts.Values.UnuseOptionValue);
|
this.selectedParentValue = ko.observable(Consts.Values.UnuseOptionValue);
|
||||||
|
|
||||||
|
@ -7759,13 +7763,17 @@ PopupsFolderCreateViewModel.prototype.clearPopup = function ()
|
||||||
{
|
{
|
||||||
this.folderName('');
|
this.folderName('');
|
||||||
this.selectedParentValue('');
|
this.selectedParentValue('');
|
||||||
this.focusTrigger(false);
|
this.folderName.focused(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
PopupsFolderCreateViewModel.prototype.onShow = function ()
|
PopupsFolderCreateViewModel.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
this.clearPopup();
|
this.clearPopup();
|
||||||
this.focusTrigger(true);
|
};
|
||||||
|
|
||||||
|
PopupsFolderCreateViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
|
this.folderName.focused(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
PopupsFolderCreateViewModel.prototype.onBuild = function ()
|
PopupsFolderCreateViewModel.prototype.onBuild = function ()
|
||||||
|
@ -7775,7 +7783,7 @@ PopupsFolderCreateViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -7893,7 +7901,7 @@ PopupsFolderSystemViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -8393,7 +8401,7 @@ PopupsComposeViewModel.prototype.sendMessageResponse = function (sResult, oData)
|
||||||
bResult = true;
|
bResult = true;
|
||||||
if (this.modalVisibility())
|
if (this.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(this, 'closeCommand');
|
Utils.delegateRun(this, 'closeCommand');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8495,7 +8503,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
||||||
aDownloads = [],
|
aDownloads = [],
|
||||||
aDraftInfo = null,
|
aDraftInfo = null,
|
||||||
oMessage = null,
|
oMessage = null,
|
||||||
bFocusOnBody = false,
|
|
||||||
sComposeType = sType || Enums.ComposeType.Empty,
|
sComposeType = sType || Enums.ComposeType.Empty,
|
||||||
fEmailArrayToStringLineHelper = function (aList) {
|
fEmailArrayToStringLineHelper = function (aList) {
|
||||||
|
|
||||||
|
@ -8556,7 +8563,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
||||||
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
|
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
|
||||||
this.sInReplyTo = oMessage.sMessageId;
|
this.sInReplyTo = oMessage.sMessageId;
|
||||||
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.sReferences);
|
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.sReferences);
|
||||||
bFocusOnBody = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Enums.ComposeType.ReplyAll:
|
case Enums.ComposeType.ReplyAll:
|
||||||
|
@ -8568,7 +8574,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
||||||
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
|
this.aDraftInfo = ['reply', oMessage.uid, oMessage.folderFullNameRaw];
|
||||||
this.sInReplyTo = oMessage.sMessageId;
|
this.sInReplyTo = oMessage.sMessageId;
|
||||||
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.references());
|
this.sReferences = Utils.trim(this.sInReplyTo + ' ' + oMessage.references());
|
||||||
bFocusOnBody = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Enums.ComposeType.Forward:
|
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();
|
aDownloads = this.getAttachmentsDownloadsForUpload();
|
||||||
if (Utils.isNonEmptyArray(aDownloads))
|
if (Utils.isNonEmptyArray(aDownloads))
|
||||||
{
|
{
|
||||||
|
@ -8694,7 +8694,16 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
||||||
}, aDownloads);
|
}, 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.oEditor.focus();
|
||||||
}
|
}
|
||||||
|
@ -8708,7 +8717,7 @@ PopupsComposeViewModel.prototype.tryToClosePopup = function ()
|
||||||
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
|
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
|
||||||
if (self.modalVisibility())
|
if (self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'closeCommand');
|
Utils.delegateRun(self, 'closeCommand');
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
};
|
};
|
||||||
|
@ -9869,7 +9878,7 @@ PopupsContactsViewModel.prototype.onBuild = function (oDom)
|
||||||
{
|
{
|
||||||
if (Enums.EventKeyCode.Esc === oEvent.keyCode)
|
if (Enums.EventKeyCode.Esc === oEvent.keyCode)
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'closeCommand');
|
Utils.delegateRun(self, 'closeCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
else if (oEvent.ctrlKey && Enums.EventKeyCode.S === oEvent.keyCode)
|
else if (oEvent.ctrlKey && Enums.EventKeyCode.S === oEvent.keyCode)
|
||||||
|
@ -10024,7 +10033,10 @@ PopupsAdvancedSearchViewModel.prototype.clearPopup = function ()
|
||||||
PopupsAdvancedSearchViewModel.prototype.onShow = function ()
|
PopupsAdvancedSearchViewModel.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
this.clearPopup();
|
this.clearPopup();
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
this.fromFocus(true);
|
this.fromFocus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10035,7 +10047,7 @@ PopupsAdvancedSearchViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -10147,6 +10159,10 @@ PopupsAddAccountViewModel.prototype.clearPopup = function ()
|
||||||
PopupsAddAccountViewModel.prototype.onShow = function ()
|
PopupsAddAccountViewModel.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
this.clearPopup();
|
this.clearPopup();
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsAddAccountViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
this.emailFocus(true);
|
this.emailFocus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10159,7 +10175,7 @@ PopupsAddAccountViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -10304,7 +10320,10 @@ PopupsIdentityViewModel.prototype.onShow = function (oIdentity)
|
||||||
|
|
||||||
this.owner(this.id === RL.data().accountEmail());
|
this.owner(this.id === RL.data().accountEmail());
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsIdentityViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
if (!this.owner())
|
if (!this.owner())
|
||||||
{
|
{
|
||||||
this.email.focused(true);
|
this.email.focused(true);
|
||||||
|
@ -10318,7 +10337,7 @@ PopupsIdentityViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -10386,7 +10405,7 @@ PopupsLanguagesViewModel.prototype.onBuild = function ()
|
||||||
var bResult = true;
|
var bResult = true;
|
||||||
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
|
||||||
{
|
{
|
||||||
kn.delegateRun(self, 'cancelCommand');
|
Utils.delegateRun(self, 'cancelCommand');
|
||||||
bResult = false;
|
bResult = false;
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -10479,7 +10498,10 @@ PopupsAskViewModel.prototype.onShow = function (sAskDesc, fYesFunc, fNoFunc, sYe
|
||||||
{
|
{
|
||||||
this.yesButton(sNoButton);
|
this.yesButton(sNoButton);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
PopupsAskViewModel.prototype.onFocus = function ()
|
||||||
|
{
|
||||||
this.yesFocus(true);
|
this.yesFocus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15650,7 +15672,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
|
||||||
RoutedSettingsViewModel.__vm = oSettingsScreen;
|
RoutedSettingsViewModel.__vm = oSettingsScreen;
|
||||||
|
|
||||||
ko.applyBindings(oSettingsScreen, oViewModelDom[0]);
|
ko.applyBindings(oSettingsScreen, oViewModelDom[0]);
|
||||||
kn.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
|
Utils.delegateRun(oSettingsScreen, 'onBuild', [oViewModelDom]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -15664,7 +15686,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
|
||||||
// hide
|
// hide
|
||||||
if (self.oCurrentSubScreen)
|
if (self.oCurrentSubScreen)
|
||||||
{
|
{
|
||||||
kn.delegateRun(self.oCurrentSubScreen, 'onHide');
|
Utils.delegateRun(self.oCurrentSubScreen, 'onHide');
|
||||||
self.oCurrentSubScreen.viewModelDom.hide();
|
self.oCurrentSubScreen.viewModelDom.hide();
|
||||||
}
|
}
|
||||||
// --
|
// --
|
||||||
|
@ -15675,7 +15697,7 @@ AbstractSettings.prototype.onRoute = function (sSubName)
|
||||||
if (self.oCurrentSubScreen)
|
if (self.oCurrentSubScreen)
|
||||||
{
|
{
|
||||||
self.oCurrentSubScreen.viewModelDom.show();
|
self.oCurrentSubScreen.viewModelDom.show();
|
||||||
kn.delegateRun(self.oCurrentSubScreen, 'onShow');
|
Utils.delegateRun(self.oCurrentSubScreen, 'onShow');
|
||||||
|
|
||||||
_.each(self.menu(), function (oItem) {
|
_.each(self.menu(), function (oItem) {
|
||||||
oItem.selected(oSettingsScreen && oSettingsScreen.__rlSettingsData && oItem.route === oSettingsScreen.__rlSettingsData.Route);
|
oItem.selected(oSettingsScreen && oSettingsScreen.__rlSettingsData && oItem.route === oSettingsScreen.__rlSettingsData.Route);
|
||||||
|
@ -15699,7 +15721,7 @@ AbstractSettings.prototype.onHide = function ()
|
||||||
{
|
{
|
||||||
if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom)
|
if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom)
|
||||||
{
|
{
|
||||||
kn.delegateRun(this.oCurrentSubScreen, 'onHide');
|
Utils.delegateRun(this.oCurrentSubScreen, 'onHide');
|
||||||
this.oCurrentSubScreen.viewModelDom.hide();
|
this.oCurrentSubScreen.viewModelDom.hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue