PageSourceSearch

https://distribucionmayorista.online/modules/iqitpopup/views/js/front.js

js distribucionmayorista.online collected 2026-10-04 13:26:43 UTC 3,376 bytes, 119 lines download raw bytes

1/**
2 * 2017 IQIT-COMMERCE.COM
3 *
4 * NOTICE OF LICENSE
5 *
6 * This file is licenced under the Software License Agreement.
7 * With the purchase or the installation of the software in your application
8 * you accept the licence agreement
9 *
10 *  @author    IQIT-COMMERCE.COM <[email protected]>
11 *  @copyright 2017 IQIT-COMMERCE.COM
12 *  @license   Commercial license (You can not resell or redistribute this software)
13 *
14 */
15
16$(document).ready(function(){
17
18    iqitpopup.script = (function() {
19
20        var $el = $('#iqitpopup');
21        var $overlay = $('#iqitpopup-overlay');
22        var elHeight = $el.outerHeight();
23        var elWidth = $el.outerWidth();
24        var $wrapper = $( window );
25        var offset = -30;
26
27        var sizeData = {
28            size: {
29                width: $wrapper.width() + offset,
30                height: $wrapper.height() + offset
31            }
32        };
33
34        function init() {
35
36            if (iqitpopup.delay) {            
37                setTimeout(function() {
38                    $el.addClass('showed-iqitpopup');
39                    $overlay.addClass('showed-iqitpopupo');
40                },  iqitpopup.delay);
41            }
42
43            $el.find('.iqit-btn-newsletter').first().click(function() {
44                setCookie();
45                $overlay.removeClass('showed-iqitpopupo');
46                $el.removeClass('showed-iqitpopup');
47            });
48
49            $(document).on('click', '#iqitpopup .cross, #iqitpopup-overlay', function () {
50                $overlay.removeClass('showed-iqitpopupo');
51                $el.removeClass('showed-iqitpopup');
52
53                if ($("#iqitpopup-checkbox").is(':checked')) {
54                    setCookie();
55                }
56            });
57
58            $(document).on('click', '#footer-newsletter-open-button', function () {
59                $el.find('.iqit-close-checkbox').css("display", "none");
60                $el.addClass('showed-iqitpopup');
61                $overlay.addClass('showed-iqitpopupo');
62            });
63
64
65
66            doResize(sizeData, false);
67
68            $wrapper.resize(function() {
69                sizeData.size.width = $wrapper.width() + offset ;
70                sizeData.size.height = $wrapper.height() + offset ;
71                doResize(sizeData, true);
72
73            });
74        }
75
76
77        function doResize(ui, resize) {
78            if (elWidth >= ui.size.width  || elHeight >= ui.size.height) {
79                var scale;
80                scale = Math.min(
81                    ui.size.width / elWidth,
82                    ui.size.height / elHeight
83                );
84                $el.css({
85                    transform: "translate(-50%, -50%) scale(" + scale + ")"
86                });
87            }
88            else{
89                if (resize){
90                    $el.css({
91                        transform: "translate(-50%, -50%) scale(1)"
92                    });
93                }
94            }
95        }
96
97        function setCookie() {
98            var name = iqitpopup.name;
99            var value = '1';
100            var expire = new Date();
101            expire.setDate(expire.getDate() + iqitpopup.time);
102            document.cookie = name + "=" + escape(value) + ";path=/;" + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
103        }
104
105        return { init : init};
106
107    })();
108
109    iqitpopup.script.init();
110
111});
112
113
114
115
116
117
118
119

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.