Commit c0ec8ed29f20347379cafcf54f4149786fadec8c

Authored by Alex Savenko
1 parent 2c5eaef6

popup js layout => homepage

src/app/frontend/views/index.php
... ... @@ -266,43 +266,6 @@ $page_title = isset( $page_title ) && !empty( $page_title ) ? $page_title : '';
266 266 </div>
267 267 </div>
268 268  
269   -<script>
270   -
271   - $(document).ready(function(){
272   - function getCookie(a) {
273   - var b = new RegExp(a+'=([^;]){1,}');
274   - var c = b.exec(document.cookie);
275   - if(c) c = c[0].split('=');
276   - else return false;
277   - return c[1] ? c[1] : false;
278   - }
279   - var cookie = getCookie('popup');
280   - if (cookie !== '1') {
281   - setTimeout(function(){$(".open-delivery-modal").show();},1000);
282   - }
283   - else {
284   - $(".open-delivery-modal").hide();
285   - }
286   - });
287   - $(".open-delivery-modal div img").click(function(){
288   - $(".delivery-form-par").show();
289   - $(".delivery-form-par").animate({opacity: "1"}, 500, function() {});
290   - $(".delivery-form-par .popup-main-delivery").animate({opacity: "1",top: "15%"}, 300, function() {});
291   - });
292   - $(".delivery-form-par .close-white").click(function(){
293   - $(".delivery-form-par .popup-main-delivery").animate({opacity: "0",top: "-50%"}, 300, function() {});
294   - $(".delivery-form-par").animate({opacity: "0"}, 500, function() {});
295   - setTimeout(function(){$(".delivery-form-par").hide();}, 600);
296   - });
297   - $(".delivery-form-par .close-popup").click(function(){
298   - $(".delivery-form-par .popup-main-delivery").animate({opacity: "0",top: "-50%"}, 300, function() {});
299   - $(".delivery-form-par").animate({opacity: "0"}, 500, function() {});
300   - setTimeout(function(){$(".delivery-form-par").hide();}, 600);
301   - });
302   - $(".modal_close").click(function(){
303   - $(".open-delivery-modal").hide();
304   - });
305   -</script>
306 269 <?php
307 270 if( !IS_PRODUCTION )
308 271 {
... ...
src/app/frontend/views/page/index.php
... ... @@ -330,26 +330,41 @@ js, fjs);
330 330 <!-- popup js -->
331 331 <script>
332 332 $(document).ready(function(){
333   - setTimeout(function(){$(".open-delivery-modal").show();},1000);
334   - });
335   - $(".open-delivery-modal div img").click(function(){
336   - $(".delivery-form-par").show();
337   - $(".delivery-form-par").animate({opacity: "1"}, 500, function() {});
338   - $(".delivery-form-par .popup-main-delivery").animate({opacity: "1",top: "15%"}, 300, function() {});
339   - });
340   - $(".delivery-form-par .close-white").click(function(){
341   - $(".delivery-form-par .popup-main-delivery").animate({opacity: "0",top: "-50%"}, 300, function() {});
342   - $(".delivery-form-par").animate({opacity: "0"}, 500, function() {});
343   - setTimeout(function(){$(".delivery-form-par").hide();}, 600);
344   - });
345   - $(".delivery-form-par .close-popup").click(function(){
346   - $(".delivery-form-par .popup-main-delivery").animate({opacity: "0",top: "-50%"}, 300, function() {});
347   - $(".delivery-form-par").animate({opacity: "0"}, 500, function() {});
348   - setTimeout(function(){$(".delivery-form-par").hide();}, 600);
349   - });
350   - $(".modal_close").click(function(){
351   - $(".open-delivery-modal").hide();
  333 + function getCookie(a) {
  334 + var b = new RegExp(a+'=([^;]){1,}');
  335 + var c = b.exec(document.cookie);
  336 + if(c) c = c[0].split('=');
  337 + else return false;
  338 + return c[1] ? c[1] : false;
  339 + }
  340 + var cookie = getCookie('popup');
  341 + if (cookie !== '1') {
  342 + setTimeout(function(){$(".open-delivery-modal").show();},1000);
  343 + }
  344 + else {
  345 + $(".open-delivery-modal").hide();
  346 + }
  347 +
  348 + $(".open-delivery-modal div img").click(function(){
  349 + $(".delivery-form-par").show();
  350 + $(".delivery-form-par").animate({opacity: "1"}, 500, function() {});
  351 + $(".delivery-form-par .popup-main-delivery").animate({opacity: "1",top: "15%"}, 300, function() {});
  352 + });
  353 + $(".delivery-form-par .close-white").click(function(){
  354 + $(".delivery-form-par .popup-main-delivery").animate({opacity: "0",top: "-50%"}, 300, function() {});
  355 + $(".delivery-form-par").animate({opacity: "0"}, 500, function() {});
  356 + setTimeout(function(){$(".delivery-form-par").hide();}, 600);
  357 + });
  358 + $(".delivery-form-par .close-popup").click(function(){
  359 + $(".delivery-form-par .popup-main-delivery").animate({opacity: "0",top: "-50%"}, 300, function() {});
  360 + $(".delivery-form-par").animate({opacity: "0"}, 500, function() {});
  361 + setTimeout(function(){$(".delivery-form-par").hide();}, 600);
  362 + });
  363 + $(".modal_close").click(function(){
  364 + $(".open-delivery-modal").hide();
  365 + });
352 366 });
  367 +
353 368 </script>
354 369 <!-- popup button -->
355 370  
... ...