2018-03-19 17:27:33 +00:00
|
|
|
gstore.add('popup_opened', false);
|
|
|
|
|
2018-03-03 15:00:43 +00:00
|
|
|
gstore.add('popup_click', function(){
|
2018-03-03 15:21:41 +00:00
|
|
|
|
2018-03-19 17:27:33 +00:00
|
|
|
/* (1) Do nothing if already opened */
|
|
|
|
if( gstore.get.popup_opened )
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* (2) Store that popup is opened */
|
|
|
|
gstore.get.popup_opened = true;
|
|
|
|
|
|
|
|
/* (3) Open popup */
|
2018-03-20 23:41:44 +00:00
|
|
|
window.pop = window.open('https://sso.univ-pau.fr/cas/login?service='+window.api.target+'cas/1', '_blank', 'location=no,height=1024,width=1024,scrollbars=yes,status=no');
|
2018-03-03 15:21:41 +00:00
|
|
|
|
2018-03-19 17:27:33 +00:00
|
|
|
/* (4) Clear interval (optional) */
|
|
|
|
!isNaN(window.popint) && clearInterval(window.popint);
|
|
|
|
|
|
|
|
/* (5) Check if popup closed -> abort */
|
2018-03-20 10:49:26 +00:00
|
|
|
window.popint = setInterval(function(){ window.pop.closed && window.cas_callback(-5); }, 500);
|
2018-03-03 15:21:41 +00:00
|
|
|
|
2018-03-19 17:27:33 +00:00
|
|
|
|
|
|
|
|
2018-03-03 15:00:43 +00:00
|
|
|
});
|
2018-03-03 15:21:41 +00:00
|
|
|
|
|
|
|
gstore.add('login_class', 'neutral');
|
2018-03-06 17:02:04 +00:00
|
|
|
gstore.add('login_error_text', '');
|
|
|
|
|
|
|
|
|
|
|
|
gstore.add('icon', { it: null, a: new Audio('https://cloud.xdrm.io/index.php/s/6oJe9GzzrwpqJgj/download') });
|
2018-03-06 18:42:09 +00:00
|
|
|
gstore.get.icon.start = (function(e){ this.stop().it=setTimeout((function(){ this.play(); }).bind(this.a), 100*100); }).bind(gstore.get.icon);
|
|
|
|
gstore.get.icon.stop = (function(e){ !isNaN(parseInt(gstore.get.icon.it)) && clearTimeout(gstore.get.icon.it); return this; }).bind(gstore.get.icon);
|
2018-03-06 17:02:04 +00:00
|
|
|
|