PageSourceSearch

https://www.familium.hu/modules/ets_sociallogin/views/js/front.js

js familium.hu collected 2026-09-27 03:34:36 UTC 12,074 bytes, 243 lines download raw bytes

1/**
2  * Copyright ETS Software Technology Co., Ltd
3 *
4 * NOTICE OF LICENSE
5 *
6 * This file is not open source! Each license that you purchased is only available for 1 website only.
7 * If you want to use this file on more websites (or projects), you need to purchase additional licenses.
8 * You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
9 *
10 * DISCLAIMER
11 *
12 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
13 * versions in the future.
14 *
15 * @author ETS Software Technology Co., Ltd
16 * @copyright  ETS Software Technology Co., Ltd
17 * @license    Valid for 1 website (or project) for each purchase of license
18 */
19var ets_solo_popup = false;
20var ets_solo_func = {
21    closeForm: function () {
22        if ($('.ets_solo_popup.actived').length > 0)
23            $('.ets_solo_popup.actived').remove();
24    },
25    popupForm: function () {
26        setTimeout(function () {
27            if ($('.ets_solo_popup.actived').length <= 0) {
28                $('.ets_solo_popup').addClass('actived');
29            }
30        }, 3000);
31    },
32    authPopup: function (provider) {
33        if (typeof ets_solo_callbackUrl !== typeof undefined && ets_solo_callbackUrl !== '' && typeof provider !== typeof undefined && provider != '') {
34            var callbackURL = ets_solo_callbackUrl;
35            if (ets_solo_callbackUrl.indexOf('?') !== -1) {
36                callbackURL += '&provider=' + provider
37            } else {
38                callbackURL += '?provider=' + provider
39            }
40            if (callbackURL)
41                window.open(callbackURL, '_parent', 'width=800,height=auto,scrollbars=yes');//authWindow
42            return false;
43        }
44    },
45    formAccount: function (type) {
46        if (!type)
47            return false;
48        switch (type) {
49            case 'close':
50                $('.ets_solo_social_wrapper.alw.clone').removeClass('active');
51                $('body').removeClass('ets_solo_loading');
52                break;
53            case 'active':
54                $('.ets_solo_social_wrapper.alw.clone').addClass('active');
55                $('body').addClass('ets_solo_loading');
56                break;
57        }
58    },
59    autoLoad: function () {
60        if ($('.ets_solo_social_wrapper.alw').length > 0 && ($('.header_user_info').length > 0 || $('#_desktop_user_info, #_mobile_user_info').length > 0 || $('#header_user_info').length > 0) && !$('.ets_solo_social_wrapper.alw.clone').length) {
61            $('.header_user_info, #_desktop_user_info, #_mobile_user_info, #header_user_info').append($('.ets_solo_social_wrapper.alw').clone().addClass('clone'));
62            if ($('.header_user_info .ets_solo_social_wrapper.alw').length > 0 || $('#_desktop_user_info .ets_solo_social_wrapper.alw, #_mobile_user_info .ets_solo_social_wrapper.alw').length > 0 || $('#header_user_info .ets_solo_social_wrapper.alw').length > 0) {
63                $('.ets_solo_social_wrapper.alw').not('.clone').remove();
64                $('.ets_solo_social_wrapper.hover.alw.clone').parent().addClass('hover');
65            }
66        }
67    },
68    loginPageCheckout: function () {
69        if ($('#checkout').length > 0 && $('#checkout-login-form #login-form').length > 0 && $('.ets_solo_social_wrapper.lgp').length > 0 && !$('.ets_solo_social_wrapper.lgp.clone').length) {
70            $('#login-form section').append($('.ets_solo_social_wrapper.lgp').clone().addClass('clone'));
71            if ($('#login-form .ets_solo_social_wrapper.lgp.clone').length > 0)
72                $('.ets_solo_social_wrapper.lgp:not(.clone)').remove();
73        }
74    }
75};
76$(document).ready(function () {
77    ets_solo_func.autoLoad();
78    ets_solo_func.loginPageCheckout();
79    $(document).on('click', '.nav-link.active', function () {
80        ets_solo_func.loginPageCheckout();
81    });
82    $(document).on('hover', '.header_user_info, #_desktop_user_info, #_mobile_user_info, #header_user_info', function () {
83        ets_solo_func.autoLoad();
84    });
85    if ($('.ets_solo_popup').length > 0) {
86        ets_solo_func.popupForm();
87    }
88    $('.ets_solo_popup_close, .ets_solo_popup_close_overlay').click(function () {
89        ets_solo_func.closeForm();
90    });
91    $('.ets_sl_wrapper').click(function (evt) {
92        evt.stopPropagation();
93    });
94    $(document).on('click', '.solo_discount_code input', function (e) {
95        $(this).select();
96        var textcopied = $(this).attr('data-copy');
97        document.execCommand("copy");
98        $(this).parent().append('<span class="text_copied">' + textcopied + '</span>');
99        $(this).parent().addClass('copied');
100
101        setTimeout(function () {
102            $(this).parent().removeClass('copied');
103            $('.text_copied').remove();
104        }, 3000);
105    });
106
107    function ets_solo_slide_event(button) {
108        if (button.hasClass('active')) {
109            button.removeClass('active');
110            button.parents('.ets_solo_social_wrapper').removeClass('active s1');
111            button.parents('.ets_solo_social_wrapper').find('.ets_solo_wrapper_content.slw.active').removeClass('active');
112            button.parents('.ets_solo_social_wrapper').find('.ets_solo_slide_widget.active').removeClass('active');
113
114        } else {
115            button.addClass('active');
116            //$('.ets_solo_wrapper_content.slw, .ets_solo_slide_widget, .ets_solo_social_wrapper').addClass('active');
117            button.parents('.ets_solo_social_wrapper').addClass('active s1');
118            button.parents('.ets_solo_social_wrapper').find('.ets_solo_wrapper_content.slw').addClass('active');
119            button.parents('.ets_solo_social_wrapper').find('.ets_solo_slide_widget').addClass('active');
120        }
121    }
122
123    function ets_solo_slide_event_hover(button) {
124        if (button.hasClass('active')) {
125            button.removeClass('active');
126            button.removeClass('active');
127            button.find('.ets_solo_wrapper_content.slw.active').removeClass('active');
128            button.find('.ets_solo_slide_widget.active').removeClass('active');
129
130        } else {
131            button.addClass('active');
132            //$('.ets_solo_wrapper_content.slw, .ets_solo_slide_widget, .ets_solo_social_wrapper').addClass('active');
133            button.addClass('active');
134            button.find('.ets_solo_wrapper_content.slw').addClass('active');
135            button.find('.ets_solo_slide_widget').addClass('active');
136        }
137    }
138
139    $(document).on('click', '.ets_solo_social_wrapper.click.slw .ets_solo_slide_widget', function () {
140        ets_solo_slide_event($(this));
141    });
142    $(document).on('click', '.ets_solo_social_wrapper.slw:not(.click) .ets_solo_slide_widget', function () {
143        if ($(window).width() < 1200) {
144            ets_solo_slide_event($(this));
145        }
146    });
147    $(window).resize(function () {
148        if ($(window).width() > 767) {
149            $('.ets_solo_social_wrapper.active, .ets_solo_wrapper_content.active, .ets_solo_slide_widget.active, .ets_solo_wrapper_content.active').removeClass('active');
150            $('body.ets_solo_loading').removeClass('ets_solo_loading');
151        }
152    });
153    $(document).on('mouseenter mouseleave', '.ets_solo_social_wrapper.hover.slw', function () {
154        if ($(window).width() >= 1200)
155            ets_solo_slide_event_hover($(this));
156    });
157    $(document).mouseup(function (e) {
158        if (!$('.ets_solo_popup').is(e.target) && $('.ets_solo_popup').has(e.target).length === 0)
159            ets_solo_func.closeForm();
160
161        //if (!$('.ets_solo_wrapper_content.slw').is(e.target) && $('.ets_solo_wrapper_content.slw').has(e.target).length !== 0 && !$('.ets_solo_slide_widget.active').is(e.target))
162        //$('.ets_solo_slide_widget.active, .ets_solo_wrapper_content.slw.active, .ets_solo_social_wrapper.active').removeClass('active');
163
164        //if (!$('.ets_solo_social_wrapper.alw.clone').is(e.target) && $('.ets_solo_social_wrapper.alw.clone').has(e.target).length === 0)
165        //ets_solo_func.formAccount('close');
166    });
167    $(document).keyup(function (e) {
168        if (e.keyCode === 27) {
169            ets_solo_func.closeForm();
170            $('.ets_solo_slide_widget.active, .ets_solo_wrapper_content.slw.active, .ets_solo_social_wrapper.active').removeClass('active');
171            ets_solo_func.formAccount('close');
172        }
173    });
174    $(document).on('click', '.ets_solo_social_item', function () {
175        if ($(this).data('auth') != '') {
176            ets_solo_func.authPopup($(this).data('auth'));
177        }
178    });
179    $('button[class^=solo-submit-login]').click(function () {
180        if ($('form[class^=solo-login-form]').length > 0) {
181            var button = $(this), $HOOK = button.parents('form').data('hook'), form = button.parents('form');
182            if (!button.hasClass('active')) {
183                button.addClass('active');
184                $('.solo-login-form-' + $HOOK + ' .bootstrap, .solo-login-form-' + $HOOK + ' .module_error').remove();
185                var formData = new FormData(form.get(0));
186                $.ajax({
187                    url: form.attr('action'),
188                    data: formData,
189                    type: 'post',
190                    dataType: 'json',
191                    processData: false,
192                    contentType: false,
193                    success: function (json) {
194                        button.removeClass('active');
195                        if (json) {
196                            if (json.hasError) {
197                                form.prepend(json.errors);
198                            } else {
199                                window.location.reload();
200                            }
201                        }
202                    },
203                    error: function () {
204                        button.removeClass('active');
205                    }
206                });
207            }
208        }
209        return false;
210    });
211    $(document).on('focus', '.solo-login-form-alw input', function () {
212        if ($('#_desktop_user_info, #_mobile_user_info, .header_user_info, #header_user_info').length > 0) {
213            $('#_desktop_user_info, #_mobile_user_info, .header_user_info, #header_user_info').addClass('active');
214        }
215    });
216    $(document).on('focusout', '.solo-login-form-alw input', function () {
217        if ($('#_desktop_user_info.active, #_mobile_user_info.active, .header_user_info.active, #header_user_info.active').length > 0) {
218            $('#_desktop_user_info.active, #_mobile_user_info.active, .header_user_info.active, #header_user_info.active').removeClass('active');
219        }
220    });
221    $(document).on('click', '.user-info a:not(.logout, .account), .header_user_info a.login, #header_user_info a.login', function (evt) {
222        ets_solo_func.autoLoad();
223        if (($(window).width() < 768 && $('.ets_solo_social_wrapper.alw.mobile').length > 0) || $('.ets_solo_social_wrapper.alw.clone.click').length > 0) {
224            evt.preventDefault();
225            ets_solo_func.formAccount('active');
226        }
227    });
228    $('.ets_solo_account_close').click(function () {
229        if ($(this).parents('.ets_solo_social_wrapper').find('.ets_solo_wrapper_content.slw.active').length > 0) {
230            $(this).parents('.ets_solo_social_wrapper').find('.ets_solo_slide_widget.active').removeClass('active');
231            $(this).parents('.ets_solo_social_wrapper').find('.ets_solo_wrapper_content.slw.active').removeClass('active');
232        }
233
234        $(this).parents('.ets_solo_social_wrapper').removeClass('active');
235
236        if (($(window).width() < 768 && $('.ets_solo_social_wrapper.alw.mobile').length > 0) || $('.ets_solo_social_wrapper.alw.clone.click').length > 0)
237            ets_solo_func.formAccount('close');
238    });
239
240    $(document).on('click', '.ets_solo_wrapper_content.alw', function (e) {
241        e.stopPropagation();
242    });
243});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.