1var overlay_type=""; 2var overlay_title=""; 3var overlay_text=""; 4var allow_cookie_popup= 1; 5function overlay_load(type,title,text,params) { 6 overlay_type=type; 7 overlay_title=title; 8 overlay_text=text; 9 10 if (typeof params === "undefined") { 11 params = {}; 12 } 13 14 let overlay_id="script"; 15 if (params.custom === true) { 16 overlay_ajax("custom", {"custom": true, "overlay_type": type}); 17 overlay_id=type; 18 overlay_type = "custom"; 19 } else { 20 overlay_ajax(overlay_id); 21 } 22 23 $(document).on("overlayAjaxLoaded",function(event, params) { 24 if (params['id'] == overlay_id) { 25 let overlay_el = $("#overlay_" + overlay_id); 26 overlay_el.attr("class", "overlay_common overlay_" + overlay_type); 27 28 if (overlay_title != '') $(".overlay_title", overlay_el).html(overlay_title).addClass('loaded'); 29 if (text != "") { 30 $(".overlay_text", overlay_el).html(overlay_text).show(); 31 } else { 32 $(".overlay_text", overlay_el).hide(); 33 } 34 overlay_el.overlay().load(); 35 } 36 }); 37} 38function overlay_init(id,config) { 39 var config_act = $.extend({ 40 top: 50, 41 maskLoadSpeed: 200, 42 maskOpacity: 0.7, 43 closeOnClick: (config_plus['overlay_close_on_click_forced'] === 1), 44 closeOnEsc: true, 45 load: false, 46 onBeforeLoad: true 47 }, config); 48 49 let overlay_el = $("#overlay_"+id); 50 51 if ( overlay_el.length === 0 ) { 52 if ($('#overlays').length === 0) { 53 $('<div id="overlays"></div>').appendTo('body'); 54 } 55 $('<div id="overlay_'+ id +'"></div>').appendTo('#overlays'); 56 overlay_el = $("#overlay_"+id); 57 } 58 59 overlay_el.overlay({ 60 onBeforeLoad: function() { 61 if (config_act.onBeforeLoad==true && overlay_el.attr("data-content")!=1) { 62 overlay_ajax(id); 63 } 64 }, 65 onLoad: function(){ 66 if (config_plus['accessible_design']) { 67 manageFocus('#overlay_' + id, { 68 trigger: document.activeElement 69 }); 70 } 71 $(document).trigger("overlayOpen",{id:id}); 72 }, 73 onClose: function() { 74 if (config_plus['accessible_design']) restoreFocus('#overlay_' + id); 75 $(document).trigger("overlayClose",{id:id}); 76 }, 77 top: config_act.top, 78 mask: { 79 color: "#000000", 80 loadSpeed: config_act.maskLoadSpeed, 81 maskId: id === "cookie_alert" ? "cookieConsent" : "exposeMaskOverlay", 82 opacity: config_act.maskOpacity 83 }, 84 closeOnClick: ($.inArray(id,["cookie_alert","explicit","close"]) > -1 ? false : (config_plus['overlay_close_on_click_forced'] === 1 ? true : config_act.closeOnClick)), 85 closeOnEsc: ($.inArray(id,["cookie_alert","explicit","close"]) > -1 ? false : (config_plus['overlay_close_on_esc_forced'] === 1 ? true : config_act.closeOnEsc)), 86 load: config_act.load 87 }); 88 89 $(document).trigger("overlayInited",{id:id}); 90 overlay_el.attr("data-inited",1); 91} 92function overlay_ajax(id,params) { 93 if (typeof params === "undefined") { 94 params = []; 95 } 96 97 temp_data = { 98 lang_master: actual_lang, 99 overlay_id: id, 100 layout_plus: UNAS.design.page, 101 overlay_parameters: params, 102 get_ajax: "1" 103 } 104 105 if (typeof config_plus['unas_design'] !== 'undefined') { 106 temp_data['unas_design'] = config_plus['unas_design']; 107 } 108 109 if (service_type == "cms") { 110 temp_data['home_id'] = home_id; 111 temp_overlay_url = shop_url_main + "/ajax/ajax_overlay.php"; 112 } else { 113 temp_data['shop_id'] = shop_id; 114 temp_overlay_url = shop_url_main + "/shop_ajax/ajax_overlay.php"; 115 } 116 117 if (params.custom === true) { 118 id = params.overlay_type;; 119 } 120 121 let overlay_el = $("#overlay_"+id); 122 123 if (overlay_el.attr("data-content")!=1) { 124 overlay_el.attr("data-content",1); 125 126 $.ajax({ 127 type: "GET", 128 async: true, 129 url: temp_overlay_url, 130 data: temp_data, 131 beforeSend:function(){ 132 overlay_el.addClass('overlay-loading'); 133 }, 134 success: function(data){ 135 if (data!="") overlay_el.html(data); 136 overlay_el.removeClass('overlay-loading').addClass('overlay-loaded'); 137 $(document).trigger("overlayAjaxLoaded",{id:id,params:params}); 138 } 139 }); 140 } else { 141 $(document).trigger("overlayAjaxLoaded",{id:id,params:params}); 142 } 143} 144 145function overlay_close(id) { 146 $("#"+id).overlay().close(); 147 $(document).trigger("overlayClosed",id); 148} 149 150function cookie_alert_overlay() { 151 if (!$.mask.isLoaded() && allow_cookie_popup !== 0) { 152 $("#overlay_cookie_alert").overlay().load(); 153 $('#overlay_cookie_alert').removeClass('cookie-alert-closed'); 154 } else { 155 $('#overlay_cookie_alert').addClass('cookie-alert-closed'); 156 setTimeout(function () { 157 cookie_alert_overlay(); 158 }, 1000); 159 } 160} 161 162function cart_add_overlay() { 163 if (cart_add_warning!=1) { 164 $('#overlay_cart_add_ok').overlay().load(); 165 $(document).trigger("addToCartOverlay"); 166 } 167}
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.