Rewrite session check component in vanilla js

This commit is contained in:
Frederic Guillot
2016-12-10 13:05:35 -05:00
parent c0049ed7e6
commit 90c9e86461
4 changed files with 16 additions and 23 deletions

View File

@@ -0,0 +1,10 @@
KB.interval(60, function () {
var statusUrl = KB.find('body').data('statusUrl');
var loginUrl = KB.find('body').data('loginUrl');
if (KB.find('.form-login') === null) {
KB.http.get(statusUrl).error(function () {
window.location = loginUrl;
});
}
});