Small fixes and changes

This commit is contained in:
RainLoop Team 2015-01-19 01:57:29 +04:00
parent 91b3f1a3e9
commit 54edeaa645
15 changed files with 77 additions and 94 deletions

View file

@ -271,15 +271,6 @@
'FalseResult': 0
};
/**
* @enum {string}
*/
Enums.InterfaceAnimation = {
'None': 'None',
'Normal': 'Normal',
'Full': 'Full'
};
/**
* @enum {number}
*/

View file

@ -111,11 +111,6 @@
*/
Globals.bXMLHttpRequestSupported = !!window.XMLHttpRequest;
/**
* @type {string}
*/
Globals.sAnimationType = '';
/**
* @type {*}
*/

View file

@ -871,10 +871,8 @@
{
oData.editorDefaultType = ko.observable(Enums.EditorDefaultType.Html);
oData.showImages = ko.observable(false);
oData.interfaceAnimation = ko.observable(Enums.InterfaceAnimation.Full);
oData.contactsAutosave = ko.observable(false);
Globals.sAnimationType = Enums.InterfaceAnimation.Full;
oData.interfaceAnimation = ko.observable(true);
oData.capaThemes = ko.observable(true);
oData.capaUserBackground = ko.observable(false);
@ -893,26 +891,14 @@
return Enums.Layout.NoPreview !== oData.layout();
});
oData.interfaceAnimation.subscribe(function (sValue) {
if (Globals.bMobileDevice || sValue === Enums.InterfaceAnimation.None)
oData.interfaceAnimation.subscribe(function (bValue) {
if (Globals.bMobileDevice || !bValue)
{
Globals.$html.removeClass('rl-anim rl-anim-full').addClass('no-rl-anim');
Globals.sAnimationType = Enums.InterfaceAnimation.None;
Globals.$html.removeClass('rl-anim').addClass('no-rl-anim');
}
else
{
switch (sValue)
{
case Enums.InterfaceAnimation.Full:
Globals.$html.removeClass('no-rl-anim').addClass('rl-anim rl-anim-full');
Globals.sAnimationType = sValue;
break;
case Enums.InterfaceAnimation.Normal:
Globals.$html.removeClass('no-rl-anim rl-anim-full').addClass('rl-anim');
Globals.sAnimationType = sValue;
break;
}
Globals.$html.removeClass('no-rl-anim').addClass('rl-anim');
}
});