2020-01-15 22:12:02 +01:00
|
|
|
// Generated by CoffeeScript 1.12.7
|
2017-04-11 21:19:59 +02:00
|
|
|
(function() {
|
2019-07-30 21:58:04 +02:00
|
|
|
var sendUrl, tryssl;
|
2017-04-11 21:19:59 +02:00
|
|
|
|
|
|
|
tryssl = function() {
|
2019-07-30 21:58:04 +02:00
|
|
|
var path;
|
2019-07-09 10:34:46 +02:00
|
|
|
path = window.location.pathname;
|
2019-07-30 21:58:04 +02:00
|
|
|
console.log('path -> ', path);
|
|
|
|
console.log('Call URL -> ', window.datas.sslHost);
|
|
|
|
$.ajax(window.datas.sslHost, {
|
2019-02-07 19:27:42 +01:00
|
|
|
dataType: 'jsonp',
|
2017-04-11 21:19:59 +02:00
|
|
|
statusCode: {
|
|
|
|
401: function() {
|
2019-02-01 23:22:11 +01:00
|
|
|
$('#lform').submit();
|
|
|
|
return console.log('Error code 401');
|
2017-04-11 21:19:59 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
success: function(data) {
|
2019-07-30 21:58:04 +02:00
|
|
|
sendUrl(path);
|
2019-02-01 23:22:11 +01:00
|
|
|
return console.log('Success -> ', data);
|
2017-04-11 21:19:59 +02:00
|
|
|
},
|
|
|
|
error: function() {
|
2019-07-30 21:58:04 +02:00
|
|
|
sendUrl(path);
|
2019-02-01 23:22:11 +01:00
|
|
|
return console.log('Error');
|
2017-04-11 21:19:59 +02:00
|
|
|
}
|
|
|
|
});
|
2019-06-27 16:40:56 +02:00
|
|
|
return false;
|
2017-04-11 21:19:59 +02:00
|
|
|
};
|
|
|
|
|
2019-07-30 21:58:04 +02:00
|
|
|
sendUrl = function(path) {
|
|
|
|
var form_url;
|
|
|
|
form_url = $('#lform').attr('action');
|
|
|
|
if (form_url.match(/^#$/)) {
|
|
|
|
form_url = path;
|
|
|
|
} else {
|
|
|
|
form_url = form_url + path;
|
|
|
|
}
|
|
|
|
console.log('form action URL -> ', form_url);
|
|
|
|
$('#lform').attr('action', form_url);
|
|
|
|
return $('#lform').submit();
|
|
|
|
};
|
|
|
|
|
2017-04-11 21:19:59 +02:00
|
|
|
$(document).ready(function() {
|
|
|
|
return $('.sslclick').on('click', tryssl);
|
|
|
|
});
|
|
|
|
|
|
|
|
}).call(this);
|