From 495a33d70979385a33615b513fb6cbb19f3a2588 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Mon, 1 Aug 2016 18:32:50 +0200 Subject: [PATCH] suite --- app/assets/javascripts/public.js.coffee | 4 +++- app/views/layouts/public.html.haml | 8 +------- app/views/public/menu_items/show.js.erb | 7 +++++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/public.js.coffee b/app/assets/javascripts/public.js.coffee index e179df0..5e9f427 100755 --- a/app/assets/javascripts/public.js.coffee +++ b/app/assets/javascripts/public.js.coffee @@ -46,7 +46,9 @@ $ -> "height" : ($(window).height()- 60 )+"px" $("body").on "click", ".close_popup", -> $(".popup_overlay").fadeOut(); - $(".popup_container").fadeOut(); + $(".popup_container").fadeOut 400, -> + $(".popup_overlay").remove() + $(".popup_container").remove() $(window).on "resize", -> resize() diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index ddec260..affd0bd 100755 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -238,10 +238,4 @@ Contact / Devis - .popup_overlay - .popup_container - - #popup_content - .close_popup - =image_tag "/bouton-croix.png" - .inner + diff --git a/app/views/public/menu_items/show.js.erb b/app/views/public/menu_items/show.js.erb index fafad08..f33e8dd 100755 --- a/app/views/public/menu_items/show.js.erb +++ b/app/views/public/menu_items/show.js.erb @@ -1,4 +1,7 @@ - +$("body").append(''); $("#popup_content .inner").html("<%= escape_javascript(render( :partial => "public/blocks/block", :locals => {:block => @menu_item.menu_content.blocks.find_by_lang_site_id(@lang.id)}) )%>"); +$("#popup_content").css({"margin-top":"30px","height" : ($(window).height()- 60 )+"px"}); $(".popup_overlay").fadeIn(); -$(".popup_container").fadeIn(); \ No newline at end of file +$(".popup_container").fadeIn(); + +