Add Ajax to SSL (closes #1212)
parent
abd9983a21
commit
a83a707931
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,21 @@ |
||||
# Launch SSL request |
||||
|
||||
tryssl = () -> |
||||
$.ajax window.datas.sslHost, |
||||
dataType: 'json' |
||||
# Called if browser can't find Kerberos ticket will display |
||||
# PE_BADCREDENTIALS |
||||
statusCode: |
||||
401: () -> |
||||
$('#lform').submit() |
||||
# If request succeed, cookie is set, posting form to get redirection |
||||
# or menu |
||||
success: (data) -> |
||||
$('#lform').submit() |
||||
# Case else, will display PE_BADCREDENTIALS or fallback to next auth |
||||
# backend |
||||
error: () -> |
||||
$('#lform').submit() |
||||
|
||||
$(document).ready -> |
||||
$('.sslclick').on 'click', tryssl |
@ -1 +1 @@ |
||||
html,body{height:100%;background:radial-gradient(circle at 50% 0,#fff 0,#ddd 100%) no-repeat scroll 0 0 #ddd}#wrap{min-height:100%;height:auto;margin:0 auto -80px;padding:20px 0 80px}#footer{height:80px;background-color:#fff;background-color:rgba(255,255,255,0.9);text-align:center;padding-top:10px;overflow:hidden}#header img{background-color:#fff;background-color:rgba(255,255,255,0.8);margin-bottom:20px}.panel,.navbar-default{background-color:#fff;background-color:rgba(255,255,255,0.9);background-image:none}.login,.password,.confirm{text-align:center;padding:20px}div.form{margin:0 auto;max-width:330px}div.actions{margin:10px 0 0 0}div.actions a{margin-top:10px}.buttons{text-align:center;margin:10px 0 0 0}.btn{white-space:normal}.btn span.glyphicon{padding-right:8px}li.ui-state-active{background-color:#fafafa;background-color:rgba(250,250,250,0.9)}#appslist,#password,#loginHistory,#logout{margin-top:20px}div.application{height:50px;overflow:hidden}div.application a,div.application a:hover{text-decoration:none;display:block}div.application h4.appname{margin-top:5px}div.application p.appdesc{color:#aaa;font-style:italic}p.notifCheck label{margin-left:5px;margin-top:3px;display:inline-block}div.openidconnect button{height:60px;width:160px;margin-bottom:5px}div.openidconnect button img{height:30px}div.oidc_consent_message>ul{text-align:left;list-style:circle}@media(min-width:768px){div.application{height:80px}div.application h4.appname{margin:0}#wrap{margin:0 auto -60px}#footer{padding-top:20px;height:60px}}.hiddenFrame{border:0;display:hidden;margin:0}.noborder{border:0} |
||||
html,body{height:100%;background:radial-gradient(circle at 50% 0,#fff 0,#ddd 100%) no-repeat scroll 0 0 #ddd}#wrap{min-height:100%;height:auto;margin:0 auto -80px;padding:20px 0 80px}#footer{height:80px;background-color:#fff;background-color:rgba(255,255,255,0.9);text-align:center;padding-top:10px;overflow:hidden}#header img{background-color:#fff;background-color:rgba(255,255,255,0.8);margin-bottom:20px}.panel,.navbar-default{background-color:#fff;background-color:rgba(255,255,255,0.9);background-image:none}.login,.password,.confirm{text-align:center;padding:20px}div.form{margin:0 auto;max-width:330px}div.actions{margin:10px 0 0 0}div.actions a{margin-top:10px}.buttons{text-align:center;margin:10px 0 0 0;cursor:pointer}.btn{white-space:normal}.btn span.glyphicon{padding-right:8px}li.ui-state-active{background-color:#fafafa;background-color:rgba(250,250,250,0.9)}#appslist,#password,#loginHistory,#logout{margin-top:20px}div.application{height:50px;overflow:hidden}div.application a,div.application a:hover{text-decoration:none;display:block}div.application h4.appname{margin-top:5px}div.application p.appdesc{color:#aaa;font-style:italic}p.notifCheck label{margin-left:5px;margin-top:3px;display:inline-block}div.openidconnect button{height:60px;width:160px;margin-bottom:5px}div.openidconnect button img{height:30px}div.oidc_consent_message>ul{text-align:left;list-style:circle}@media(min-width:768px){div.application{height:80px}div.application h4.appname{margin:0}#wrap{margin:0 auto -60px}#footer{padding-top:20px;height:60px}}.hiddenFrame{border:0;display:hidden;margin:0}.noborder{border:0}.max{width:100%} |
@ -0,0 +1,26 @@ |
||||
// Generated by CoffeeScript 1.10.0
|
||||
(function() { |
||||
var tryssl; |
||||
|
||||
tryssl = function() { |
||||
return $.ajax(window.datas.sslHost, { |
||||
dataType: 'json', |
||||
statusCode: { |
||||
401: function() { |
||||
return $('#lform').submit(); |
||||
} |
||||
}, |
||||
success: function(data) { |
||||
return $('#lform').submit(); |
||||
}, |
||||
error: function() { |
||||
return $('#lform').submit(); |
||||
} |
||||
}); |
||||
}; |
||||
|
||||
$(document).ready(function() { |
||||
return $('.sslclick').on('click', tryssl); |
||||
}); |
||||
|
||||
}).call(this); |
@ -0,0 +1 @@ |
||||
(function(){var a;a=function(){return $.ajax(window.datas.sslHost,{dataType:"json",statusCode:{401:function(){return $("#lform").submit()}},success:function(b){return $("#lform").submit()},error:function(){return $("#lform").submit()}})};$(document).ready(function(){return $(".sslclick").on("click",a)})}).call(this); |
@ -0,0 +1,19 @@ |
||||
<!-- //if:jsminified |
||||
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/ssl.min.js"></script> |
||||
//else --> |
||||
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/ssl.js"></script> |
||||
<!-- //endif --> |
||||
|
||||
<div class="form"> |
||||
<input type="hidden" name="nossl" value="1" /> |
||||
<div class="form-group input-group sslclick buttons max"> |
||||
<img src="<TMPL_VAR NAME="STATIC_PREFIX">common/modules/SSL.png" alt="<TMPL_VAR NAME="module">" class="img-thumbnail" /> |
||||
</div> |
||||
|
||||
<TMPL_INCLUDE NAME="checklogins.tpl"> |
||||
|
||||
<button type="submit" class="btn btn-success sslclick" > |
||||
<span class="glyphicon glyphicon-log-in"></span> |
||||
<span trspan="connect">Connect</span> |
||||
</button> |
||||
</div> |
Loading…
Reference in new issue