centralize jquery && bugfix mysql auto-termination problem w/ user auth
This commit is contained in:
@@ -167,6 +167,7 @@ header section div.buttons > a.slack-login {
|
||||
margin-bottom: 10px;
|
||||
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
|
||||
@@ -1,17 +1,3 @@
|
||||
<script>
|
||||
function fbLogin() {
|
||||
FB.getLoginStatus(function (response) {
|
||||
if (response.status === 'connected') {
|
||||
document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";
|
||||
} else {
|
||||
FB.login(function (response) {
|
||||
if (response.authResponse) {
|
||||
document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";
|
||||
}
|
||||
}, {scope: 'email'});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<a class="fb-login" href="#" onclick="fbLogin();"><i class="fa fa-facebook"></i><span>w/ Facebook</span></a>
|
||||
<a id="fbLogin" class="fb-login">
|
||||
<i class="fa fa-facebook"></i><span>w/ Facebook</span>
|
||||
</a>
|
||||
|
||||
@@ -33,18 +33,31 @@
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
|
||||
{% javascripts filter='?uglifyjs2'
|
||||
'@JotunheimrAdminBundle/Resources/public/js/vendor/plugins/jQuery/jquery-3.0.0.min.js'
|
||||
'@JotunheimrAdminBundle/Resources/public/js/vendor/plugins/jQuery/jquery-migrate-3.0.0.min.js'
|
||||
'@JotunheimrAdminBundle/Resources/public/js/vendor/bootstrap/js/bootstrap.min.js' %}
|
||||
<script type="text/javascript" src="{{ asset_url }}"></script>
|
||||
{% endjavascripts %}
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/JQuery-Snowfall/1.7.4/snowfall.jquery.min.js"
|
||||
type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(document).snowfall({deviceorientation: true, round: true, minSize: 5, maxSize: 8});
|
||||
|
||||
$('#fbLogin').length && $('#fbLogin').on('click', function () {
|
||||
FB.login(function (response) {
|
||||
if (response.authResponse) {
|
||||
document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";
|
||||
}
|
||||
}, {scope: 'email'});
|
||||
|
||||
{#FB.getLoginStatus(function (response) {#}
|
||||
{#if (response.status === 'connected') {#}
|
||||
{#document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";#}
|
||||
{#} else {#}
|
||||
{#FB.login(function (response) {#}
|
||||
{#if (response.authResponse) {#}
|
||||
{#document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";#}
|
||||
{#}#}
|
||||
{#}, {scope: 'email'});#}
|
||||
{#}#}
|
||||
{#});#}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user