diff --git a/templates/client/blank.html b/templates/client/blank.html index 1be9b75a..19a075c1 100644 --- a/templates/client/blank.html +++ b/templates/client/blank.html @@ -136,6 +136,7 @@ This template include basic anf main styles and js files, {% endif %} {% include 'client/popups/callback.html' %} + {% include 'client/includes/banners/popup.html' %} {% block popup_banner %} {% if not request.COOKIES.popover_test1 %} {% if theme_for_filter %} diff --git a/templates/client/static_client/js/rejs/banners.js b/templates/client/static_client/js/rejs/banners.js index df86bbb0..fc266152 100644 --- a/templates/client/static_client/js/rejs/banners.js +++ b/templates/client/static_client/js/rejs/banners.js @@ -59,18 +59,37 @@ var parent = document.getElementById(banner.id); if (parent) { - if (banner.is_img) { - var a = document.createElement("a"); - a.href = banner.url; - - var img = document.createElement("img"); - img.src = banner.img; - img.alt = banner.alt; - - a.appendChild(img); - parent.appendChild(a); - } else if (banner.is_html) { - parent.innerHTML = banner.text; + if (banner.is_popup) { + if (banner.is_img) { + parent.innerHTML = + "
" + + "\""
"; + } else if (banner.is_html) { + parent.innerHTML = banner.text; + } + + $("#expo-form-popup").on("submit", function(e) { + e.preventDefault(); + window.location = $("#expo-form-popup").attr("action"); + }); + + setTimeout(function(){ + $.fancybox.open([{"href": "#" + banner.id}], {}); + }, 5000); + } else { + if (banner.is_img) { + var a = document.createElement("a"); + a.href = banner.url; + + var img = document.createElement("img"); + img.src = banner.img; + img.alt = banner.alt; + + a.appendChild(img); + parent.appendChild(a); + } else if (banner.is_html) { + parent.innerHTML = banner.text; + } } }