2014-02-05 17:30:30 +01: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;
|
2014-02-05 17:30:30 +01: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
|
|
|
}
|