Fix html parser

Add "login.active_backgroud" setting
This commit is contained in:
RainLoop Team 2016-10-20 22:38:29 +03:00
parent 52018b40e8
commit 1b7c6f76d1
5 changed files with 32 additions and 66 deletions

View file

@ -447,6 +447,11 @@ class LoginUserView extends AbstractViewNext
}, Magics.Time50ms);
triggerAutocompleteInputChange(true);
if (Settings.appSettingsGet('activeBackgroud'))
{
this.initActiveBackgroud();
}
}
submitForm() {
@ -471,6 +476,26 @@ class LoginUserView extends AbstractViewNext
return true;
}
initActiveBackgroud() {
const
$bg = $('#rl-bg'),
movementStrength = 25,
winHeight = $win.height(),
winWidth = $win.width(),
height = movementStrength / winHeight,
width = movementStrength / winWidth,
winHeightHalf = winHeight / 2,
winWidthHalf = winWidth / 2;
$('#rl-app').on('mousemove', _.throttle((e) => {
$bg.css({
top: height * (e.pageY - winHeightHalf) * -1 - movementStrength,
left: width * (e.pageX - winWidthHalf) * -1 - movementStrength
});
}, 1));
}
}
export {LoginUserView, LoginUserView as default};