PATH:
home
/
lab2454c
/
sothebankuab.com
/
wp-content
/
plugins
/
bdthemes-element-pack
/
assets
/
js
/
widgets
/** * Start user login widget script */ ( function ($, elementor) { 'use strict'; window.is_fb_loggedin = false; window.is_google_loggedin = false; var widgetUserLoginForm = { loginFormSubmission: function (login_form) { var redirect_url = login_form.find('.redirect_after_login').val(); $.ajax({ type : 'POST', dataType : 'json', url : element_pack_ajax_login_config.ajaxurl, data : login_form.serialize(), beforeSend: function (xhr) { bdtUIkit.notification({ message: '<div bdt-spinner></div> ' + element_pack_ajax_login_config.loadingmessage, timeout: false }); }, success: function (data) { var recaptcha_field = login_form.find('.element-pack-google-recaptcha'); if (recaptcha_field.length > 0) { var recaptcha_id = recaptcha_field.attr('data-widgetid'); grecaptcha.reset(recaptcha_id); grecaptcha.execute(recaptcha_id); } if (data.loggedin == true) { bdtUIkit.notification.closeAll(); bdtUIkit.notification({ message : '<span bdt-icon=\'icon: check\'></span> ' + data.message, status : 'primary' }); document.location.href = redirect_url; } else { bdtUIkit.notification.closeAll(); bdtUIkit.notification({ message : '<div class="bdt-flex"><span bdt-icon=\'icon: warning\'></span><span>' + data.message + '</span></div>', status : 'warning' }); } }, error: function (data) { bdtUIkit.notification.closeAll(); bdtUIkit.notification({ message : '<span bdt-icon=\'icon: warning\'></span>' + element_pack_ajax_login_config.unknownerror, status : 'warning' }); } }); }, get_facebook_user_data: function (widget_wrapper) { var redirect_url = widget_wrapper.find('.redirect_after_login').val(); FB.api('/me', {fields: 'id, name, first_name, last_name, email, link, gender, locale, picture'}, function (response) { var userID = FB.getAuthResponse()['userID']; var access_token = FB.getAuthResponse()['accessToken']; window.is_fb_loggedin = true; var fb_data = { 'id' : response.id, 'name' : response.name, 'first_name' : response.first_name, 'last_name' : response.last_name, 'email' : response.email, 'link' : response.link, }; $.ajax({ url: window.ElementPackConfig.ajaxurl, method: 'post', data: { action : 'element_pack_social_facebook_login', data : fb_data, method : 'post', dataType : 'json', userID : userID, security_string : access_token, }, dataType: 'json', beforeSend: function (xhr) { bdtUIkit.notification({ message: '<div bdt-spinner></div> ' + element_pack_ajax_login_config.loadingmessage, timeout: false }); }, success: function (data) { if (data.success === true) { if (undefined === redirect_url) { location.reload(); } else { window.location = redirect_url; } } else { location.reload(); } }, complete: function (xhr, status) { bdtUIkit.notification.closeAll(); } }); }); }, load_recaptcha: function () { var reCaptchaFields = $('.element-pack-google-recaptcha'), widgetID; if (reCaptchaFields.length > 0) { reCaptchaFields.each(function () { var self = $(this), attrWidget = self.attr('data-widgetid'); // alert(self.data('sitekey')) // Avoid re-rendering as it's throwing API error if (( typeof attrWidget !== typeof undefined && attrWidget !== false )) { return; } else { widgetID = grecaptcha.render($(this).attr('id'), { sitekey: self.data('sitekey'), callback: function (response) { if (response !== '') { self.append(jQuery('<input>', { type : 'hidden', value : response, class : 'g-recaptcha-response' })); } } }); self.attr('data-widgetid', widgetID); } }); } } }; window.onLoadElementorPackReCaptcha = widgetUserLoginForm.load_recaptcha; var widgetUserLoginFormHandler = function ($scope, $) { var widget_wrapper = $scope.find('.bdt-user-login'); var login_form = $scope.find('form.bdt-user-login-form'); var recaptcha_field = $scope.find('.element-pack-google-recaptcha'); var fb_button = widget_wrapper.find('.fb_btn_link'); var google_button = widget_wrapper.find('#google_btn_link'); var redirect_url = widget_wrapper.find('.redirect_after_login').val(); if (login_form.length > 0) { login_form.on('submit', function (e) { e.preventDefault(); widgetUserLoginForm.loginFormSubmission(login_form); }); } if (elementorFrontend.isEditMode() && undefined === recaptcha_field.attr('data-widgetid')) { onLoadElementorPackReCaptcha(); } if (recaptcha_field.length > 0) { grecaptcha.ready(function () { var recaptcha_id = recaptcha_field.attr('data-widgetid'); grecaptcha.execute(recaptcha_id); }); } if (fb_button.length > 0) { /** * Login with Facebook. * */ // Fetch the user profile data from facebook. fb_button.on('click', function () { if (!is_fb_loggedin) { FB.login(function (response) { if (response.authResponse) { // Get and display the user profile data. widgetUserLoginForm.get_facebook_user_data(widget_wrapper); } else { // $scope.find( '.status' ).addClass( 'error' ).text( 'User cancelled login or did not fully authorize.' ); } }, {scope: 'email'}); } }); } /** google */ if (google_button.length > 0) { var client_id = google_button.data('clientid'); /** * Login with Google. */ gapi.load('auth2', function () { // Retrieve the singleton for the GoogleAuth library and set up the client. var auth2 = gapi.auth2.init({ client_id: client_id, cookiepolicy: 'single_host_origin', }); auth2.attachClickHandler('google_btn_link', {}, function (googleUser) { var profile = googleUser.getBasicProfile(); var name = profile.getName(); var email = profile.getEmail(); if (window.is_google_loggedin) { var id_token = googleUser.getAuthResponse().id_token; $.ajax({ url: window.ElementPackConfig.ajaxurl, method: 'post', data: { action: 'element_pack_social_google_login', id_token: id_token }, dataType: 'json', beforeSend: function (xhr) { bdtUIkit.notification({ message: '<div bdt-spinner></div> ' + element_pack_ajax_login_config.loadingmessage, timeout: false }); }, success: function (data) { if (data.success === true) { if (undefined === redirect_url) { location.reload(); } else { window.location = redirect_url; } } }, complete: function (xhr, status) { bdtUIkit.notification.closeAll(); } }); } }, function (error) { // error here } ); }); google_button.on('click', function () { window.is_google_loggedin = true; }); } }; jQuery(window).on('elementor/frontend/init', function () { elementorFrontend.hooks.addAction('frontend/element_ready/bdt-user-login.default', widgetUserLoginFormHandler); elementorFrontend.hooks.addAction('frontend/element_ready/bdt-user-login.bdt-dropdown', widgetUserLoginFormHandler); elementorFrontend.hooks.addAction('frontend/element_ready/bdt-user-login.bdt-modal', widgetUserLoginFormHandler); }); }(jQuery, window.elementorFrontend)); /** * End user login widget script */
[+]
..
[-] ep-animated-heading.min.js
[edit]
[-] ep-faq.js
[edit]
[-] ep-testimonial-slider.min.js
[edit]
[-] ep-step-flow.js
[edit]
[-] ep-tabs.min.js
[edit]
[-] ep-scrollnav.js
[edit]
[-] ep-audio-player.min.js
[edit]
[-] ep-tutor-lms.min.js
[edit]
[-] ep-news-ticker.js
[edit]
[-] ep-offcanvas.min.js
[edit]
[-] ep-iconnav.min.js
[edit]
[-] ep-honeycombs.js
[edit]
[-] ep-circle-info.js
[edit]
[-] ep-iconnav.js
[edit]
[-] ep-honeycombs.min.js
[edit]
[-] ep-faq.min.js
[edit]
[-] ep-qrcode.js
[edit]
[-] ep-fancy-slider.js
[edit]
[-] ep-advanced-post-tab.js
[edit]
[-] ep-advanced-progress-bar.min.js
[edit]
[-] ep-business-hours.js
[edit]
[-] ep-step-flow.min.js
[edit]
[-] ep-lottie-icon-box.min.js
[edit]
[-] ep-advanced-divider.js
[edit]
[-] ep-vertical-menu.js
[edit]
[-] ep-logo-grid.js
[edit]
[-] ep-accordion.min.js
[edit]
[-] ep-advanced-gmap.min.js
[edit]
[-] ep-user-register.js
[edit]
[-] ep-contact-form.min.js
[edit]
[-] ep-vertical-menu.min.js
[edit]
[-] ep-woocommerce.min.js
[edit]
[-] ep-helpdesk.min.js
[edit]
[-] ep-scroll-button.min.js
[edit]
[-] ep-advanced-counter.js
[edit]
[-] ep-twitter-slider.js
[edit]
[-] ep-fancy-tabs.min.js
[edit]
[-] ep-image-accordion.js
[edit]
[-] ep-advanced-counter.min.js
[edit]
[-] ep-user-register.min.js
[edit]
[-] ep-twitter-carousel.js
[edit]
[-] ep-video-gallery.js
[edit]
[-] ep-time-zone.min.js
[edit]
[-] ep-source-code.min.js
[edit]
[-] ep-advanced-progress-bar.js
[edit]
[-] ep-tags-cloud.js
[edit]
[-] ep-timeline.min.js
[edit]
[-] ep-reading-progress.js
[edit]
[-] ep-testimonial-carousel.min.js
[edit]
[-] ep-lottie-image.js
[edit]
[-] ep-portfolio-carousel.js
[edit]
[-] ep-circle-menu.js
[edit]
[-] ep-tabs.js
[edit]
[-] ep-toggle.min.js
[edit]
[-] ep-search.js
[edit]
[-] ep-custom-carousel.js
[edit]
[-] ep-chart.js
[edit]
[-] ep-twitter-carousel.min.js
[edit]
[-] ep-advanced-icon-box.js
[edit]
[-] ep-price-table.min.js
[edit]
[-] ep-event-calendar.min.js
[edit]
[-] ep-event-calendar.js
[edit]
[-] ep-switcher.min.js
[edit]
[-] ep-image-compare.js
[edit]
[-] ep-hover-box.js
[edit]
[-] ep-contact-form.js
[edit]
[-] ep-logo-carousel.js
[edit]
[-] ep-animated-heading.js
[edit]
[-] ep-tags-cloud.min.js
[edit]
[-] ep-slideshow.min.js
[edit]
[-] ep-qrcode.min.js
[edit]
[-] ep-image-accordion.min.js
[edit]
[-] ep-time-zone.js
[edit]
[-] ep-price-table.js
[edit]
[-] ep-reading-progress.min.js
[edit]
[-] ep-image-magnifier.min.js
[edit]
[-] ep-notification.min.js
[edit]
[-] ep-marker.js
[edit]
[-] ep-table-of-content.js
[edit]
[-] ep-carousel.min.js
[edit]
[-] ep-advanced-gmap.js
[edit]
[-] ep-advanced-post-tab.min.js
[edit]
[-] ep-user-login.js
[edit]
[-] ep-cookie-consent.min.js
[edit]
[-] ep-progress-pie.js
[edit]
[-] ep-open-street-map.js
[edit]
[-] ep-lottie-icon-box.js
[edit]
[-] ep-products.min.js
[edit]
[-] ep-logo-grid.min.js
[edit]
[-] ep-slideshow.js
[edit]
[-] ep-logo-carousel.min.js
[edit]
[-] ep-post-grid-tab.js
[edit]
[-] ep-user-login.min.js
[edit]
[-] ep-accordion.js
[edit]
[-] ep-modal.js
[edit]
[-] ep-portfolio-gallery.min.js
[edit]
[-] ep-chart.min.js
[edit]
[-] ep-toggle.js
[edit]
[-] ep-threesixty-product-viewer.min.js
[edit]
[-] ep-woocommerce.js
[edit]
[-] ep-section-sticky.js
[edit]
[-] ep-post-gallery.min.js
[edit]
[-] ep-image-compare.min.js
[edit]
[-] ep-timeline.js
[edit]
[-] ep-mailchimp.min.js
[edit]
[-] ep-table-of-content.min.js
[edit]
[-] ep-hover-video.js
[edit]
[-] ep-tutor-lms.js
[edit]
[-] ep-fancy-slider.min.js
[edit]
[-] ep-mailchimp.js
[edit]
[-] ep-testimonial-carousel.js
[edit]
[-] ep-twitter-slider.min.js
[edit]
[-] ep-offcanvas.js
[edit]
[-] ep-interactive-card.min.js
[edit]
[-] ep-progress-pie.min.js
[edit]
[-] ep-particles.min.js
[edit]
[-] ep-portfolio-carousel.min.js
[edit]
[-] ep-iframe.min.js
[edit]
[-] ep-marker.min.js
[edit]
[-] ep-hover-box.min.js
[edit]
[-] ep-table.min.js
[edit]
[-] ep-post-grid-tab.min.js
[edit]
[-] ep-iframe.js
[edit]
[-] ep-slider.min.js
[edit]
[-] ep-advanced-icon-box.min.js
[edit]
[-] ep-section-sticky.min.js
[edit]
[-] ep-helpdesk.js
[edit]
[-] ep-comment.min.js
[edit]
[-] ep-custom-carousel.min.js
[edit]
[-] ep-modal.min.js
[edit]
[-] ep-post-gallery.js
[edit]
[-] ep-carousel.js
[edit]
[-] ep-news-ticker.min.js
[edit]
[-] ep-table.js
[edit]
[-] ep-image-expand.js
[edit]
[-] ep-notification.js
[edit]
[-] ep-instagram.js
[edit]
[-] ep-image-magnifier.js
[edit]
[-] ep-audio-player.js
[edit]
[-] ep-switcher.js
[edit]
[-] ep-hover-video.min.js
[edit]
[-] ep-interactive-card.js
[edit]
[-] ep-cookie-consent.js
[edit]
[-] ep-source-code.js
[edit]
[-] ep-portfolio-gallery.js
[edit]
[-] ep-image-expand.min.js
[edit]
[-] ep-particles.js
[edit]
[-] ep-open-street-map.min.js
[edit]
[-] ep-instagram.min.js
[edit]
[-] ep-panel-slider.js
[edit]
[-] ep-threesixty-product-viewer.js
[edit]
[-] ep-testimonial-slider.js
[edit]
[-] ep-advanced-divider.min.js
[edit]
[-] ep-fancy-tabs.js
[edit]
[-] ep-video-gallery.min.js
[edit]
[-] ep-scroll-button.js
[edit]
[-] ep-scrollnav.min.js
[edit]
[-] ep-circle-info.min.js
[edit]
[-] ep-comment.js
[edit]
[-] ep-products.js
[edit]
[-] ep-lottie-image.min.js
[edit]
[-] ep-slider.js
[edit]
[-] ep-search.min.js
[edit]
[-] ep-panel-slider.min.js
[edit]
[-] ep-circle-menu.min.js
[edit]
[-] ep-tooltip.js
[edit]
[-] ep-business-hours.min.js
[edit]