2013-07-17 15:46:59 +02:00
|
|
|
$(document).ready(function(){
|
2013-09-30 16:37:15 +02:00
|
|
|
|
|
|
|
// Manage auto login
|
|
|
|
if (browserIdAutoLogin.match('1')) {
|
|
|
|
launchRequest();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Intercept submit the first time
|
|
|
|
var intercepted = 0;
|
2013-10-15 11:58:37 +02:00
|
|
|
$("form.BrowserID").submit(function( event ) {
|
2013-09-30 16:37:15 +02:00
|
|
|
if (!intercepted) {
|
|
|
|
event.preventDefault();
|
|
|
|
intercepted = 1;
|
|
|
|
launchRequest();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
function launchRequest() {
|
2013-07-20 11:07:19 +02:00
|
|
|
navigator.id.request({
|
|
|
|
siteName: browserIdSiteName,
|
|
|
|
siteLogo: browserIdSiteLogo,
|
|
|
|
backgroundColor: browserIdBackgroundColor
|
|
|
|
});
|
2013-09-30 16:37:15 +02:00
|
|
|
}
|