diff options
Diffstat (limited to 'frontend/simple/script')
-rw-r--r-- | frontend/simple/script/init.js | 4 | ||||
-rw-r--r-- | frontend/simple/script/script.js | 85 |
2 files changed, 89 insertions, 0 deletions
diff --git a/frontend/simple/script/init.js b/frontend/simple/script/init.js new file mode 100644 index 0000000..f810e38 --- /dev/null +++ b/frontend/simple/script/init.js @@ -0,0 +1,4 @@ +$(document).ready(function() {
+
+
+});
diff --git a/frontend/simple/script/script.js b/frontend/simple/script/script.js new file mode 100644 index 0000000..ff91482 --- /dev/null +++ b/frontend/simple/script/script.js @@ -0,0 +1,85 @@ +function CookieAlertSubmit (form) {
+
+ $("#kuki").dialog({
+ modal: true,
+ buttons: {
+ "DA, Nadaljuj s prijavo": function() {
+ $(this).dialog( "close" );
+ $('#' + form).submit();
+ },
+ "Ne": function() {
+ $(this).dialog( "close" );
+ }
+ }
+ });
+}
+
+function CookieAlertFB () {
+
+ $("#kuki").dialog({
+ modal: true,
+ buttons: {
+ "DA, Nadaljuj s prijavo": function() {
+ $(this).dialog( "close" );
+ document.location.href='../api/fb_login.php';
+ },
+ "Ne": function() {
+ $(this).dialog( "close" );
+ }
+ }
+ });
+}
+
+function LostPassword(alert_text) {
+
+ var email = document.getElementById('em').value;
+
+ if (email === '') {
+ alert(alert_text);
+ }
+ else {
+
+ var lang_param = '';
+ var lang_id = $('input[name="lang_id"]').val();
+ if(lang_id == '1' || lang_id == '2'){
+ lang_param = '&lang_id=' + lang_id;
+ }
+
+ document.location.href = '../api/api.php?action=reset_password&email=' + email + lang_param;
+ }
+}
+
+// function CheckEmailFP() {
+// var Email = document.getElementById('em');
+// console.log(Email.value);
+// if (Email.search('@') == -1 || Email.indexOf('.') == -1)
+// alert ('Prosimo, popravite email');
+// }
+
+
+// Posljemo zahtevo za izbris (iz simple frontenda)
+function sendGDPRRequest(){
+
+ var form_serialize = $("#gdpr").serializeArray();
+
+ $.ajax({
+ url : '../../utils/gdpr_request.php',
+ type: "POST",
+ data : form_serialize,
+ success:function(response){
+ $("#gdpr_holder").load('frontend/simple/ajax.php?a=gdpr_request_send', {json: JSON.parse(response)});
+ }
+ });
+}
+
+
+function switchLoginRegistration(clicked_tab){
+
+ if($(clicked_tab).hasClass('active'))
+ return;
+
+ $("#registration_holder").toggle('fast');
+ $("#login_holder").toggle('fast');
+
+ $(".tab").toggleClass('active');
+}
|