diff options
author | M.Gergo | 2018-07-06 11:14:41 +0200 |
---|---|---|
committer | M.Gergo | 2018-07-06 11:14:41 +0200 |
commit | 43de9af71f7f4ca5731b94a06d688ae8412ba427 (patch) | |
tree | 54835de1dfcda504c02da261f0dc26885aed2e89 /mayor-orig/www/skin/classic/module-session/javascript | |
parent | 50310b0e4513ee3fcce67351ae61e8fff851130e (diff) | |
download | mayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.tar.gz mayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.zip |
2018/Feb/28 -i állapot hozzáadva, mint a módosítások kiindulási állapota
Diffstat (limited to 'mayor-orig/www/skin/classic/module-session/javascript')
3 files changed, 74 insertions, 0 deletions
diff --git a/mayor-orig/www/skin/classic/module-session/javascript/createAccount.jquery.min.js b/mayor-orig/www/skin/classic/module-session/javascript/createAccount.jquery.min.js new file mode 100644 index 00000000..1fa17a9c --- /dev/null +++ b/mayor-orig/www/skin/classic/module-session/javascript/createAccount.jquery.min.js @@ -0,0 +1,13 @@ +$(document).ready(function() { + $('#createAccount input[type=submit]').attr("disabled", "disabled"); + $('#createAccount').change(function(){ + $('input').removeClass('hiba'); + if ($('#createAccount input[name="userCn"]').val() == "") $('#createAccount input[name="userCn"]').addClass('hiba'); + if ($('#createAccount input[name="userAccount"]').val() == "") $('#createAccount input[name="userAccount"]').addClass('hiba'); + if ($('#createAccount input[name="userPassword"]').val() != $('#createAccount input[name="verification"]').val()) $('#createAccount input[name="verification"]').addClass('hiba'); +// ideiglegenes bekapcsolva + if ($('#createAccount input[name="mail"]').val() == "") $('#createAccount input[name="mail"]').addClass('hiba'); + if ($('#createAccount input.hiba').length == 0) + $('#createAccount input[type=submit]').removeAttr("disabled"); + }); +});
\ No newline at end of file diff --git a/mayor-orig/www/skin/classic/module-session/javascript/facebookConnect.jquery.min.js b/mayor-orig/www/skin/classic/module-session/javascript/facebookConnect.jquery.min.js new file mode 100644 index 00000000..94010747 --- /dev/null +++ b/mayor-orig/www/skin/classic/module-session/javascript/facebookConnect.jquery.min.js @@ -0,0 +1,31 @@ +$(document).ready(function() { + $('#grantFbAuth').submit(function() { // facebook + FB.getLoginStatus(function(response) { + if (response.status === 'connected') { + mayor_facebookconnect_redirect(); + } else if (response.status === 'not_authorized') { + FB.login(function(loginResponse) { + if (loginResponse.status=='connected') { + mayor_facebookconnect_redirect(); + } + }); + } else { + FB.login(function(loginResponse) { + if (loginResponse.status=='connected') { + mayor_facebookconnect_redirect(); + } + }); + } + },true); + return false; + }); + + var mayor_facebookconnect_redirect = function() { + var origUrl = $(location).attr('href'); + var pos = origUrl.indexOf("?"); + if (pos != -1) url = origUrl+'&action=grantFbAuth'; + else url = origUrl+'?action=grantFbAuth'; + window.location = url; + } + +});
\ No newline at end of file diff --git a/mayor-orig/www/skin/classic/module-session/javascript/googleapi.jquery.min.js b/mayor-orig/www/skin/classic/module-session/javascript/googleapi.jquery.min.js new file mode 100644 index 00000000..3c54f109 --- /dev/null +++ b/mayor-orig/www/skin/classic/module-session/javascript/googleapi.jquery.min.js @@ -0,0 +1,30 @@ +$(document).ready(function() { + if (typeof(GOOGLEAPI_CLIENT_ID)!=='undefined' && GOOGLEAPI_CLIENT_ID!='') { + gapi.load('auth2', function(){ + auth2 = gapi.auth2.init({ + client_id: GOOGLEAPI_CLIENT_ID, + cookiepolicy: 'single_host_origin', + }); + googleapiCheck(document.getElementById('googleapiCheckBtn')); + googleapiCheck(document.getElementById('googleapiGrantBtn')); + googleapiCheck(document.getElementById('googleapiRevokeBtn')); + }); + + function googleapiCheck(element) { + auth2.attachClickHandler(element, {}, + function(googleUser) { + // console.log(googleUser.getBasicProfile()); + var id_token = googleUser.getAuthResponse().id_token; + var origUrl = $(location).attr('href'); + var pos = origUrl.indexOf("?"); + if (pos != -1) url = origUrl+'&id_token='+id_token; + else url = origUrl+'?id_token='+id_token; + if (element.id == 'googleapiGrantBtn') url += '&action=googleapiGrant'; + if (element.id == 'googleapiRevokeBtn') url += '&action=googleapiRevoke'; + window.location = url; + }, function(error) { + // alert(JSON.stringify(error, undefined, 2)); + }); + } + } +}); |