diff --git a/app/assets/javascripts/public.js.coffee b/app/assets/javascripts/public.js.coffee index 3faaf91..6c26869 100644 --- a/app/assets/javascripts/public.js.coffee +++ b/app/assets/javascripts/public.js.coffee @@ -43,9 +43,12 @@ $ -> $("#home_slider .inner").css("height", ($("#main").width()*(9 / 26))+"px") - - - + $("#popup_content").css + "margin-top":"30px" + "height" : ($(window).height()- 60 )+"px" + $("body").on "click", ".close_popup", -> + $(".popup_overlay").fadeOut(); + $(".popup_container").fadeOut(); $(window).on "resize", -> resize() diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index 31c7084..7ea4c25 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -23,6 +23,58 @@ $orange: rgba(251,163,58,1); @import "bootstrap/bootstrap"; $blue :#2dadb1; + + + +.popup_overlay{ + display:none; + background:rgba(0,0,0,0.7); + position:fixed; + top:0; + left:0; + right:0; + bottom:0; + z-index:3; +} +.popup_container{ + display:none; + z-index:4; + position:fixed; + top:0; + left:0; + right:0; + bottom:0; + .close_popup{ + position:absolute; + top:-20px; + right:-20px; + cursor:pointer; + + } + #popup_content{ + background:white; + + margin:auto; + max-width:900px; + + position:relative; + + .inner{ + padding:20px; + overflow:auto; + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + } + + + + + } + +} .row { margin-left: 0px; margin-right: 0px; diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index f21ef14..81fbc48 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -152,4 +152,13 @@ .top_link =i(:"arrow-up") + .popup_overlay + .popup_container + + #popup_content + .close_popup + =image_tag "/bouton-croix.png" + .inner + + \ No newline at end of file diff --git a/app/views/portlets/render_public/_imagecontent.html.haml b/app/views/portlets/render_public/_imagecontent.html.haml index 4afee38..b39d7c5 100644 --- a/app/views/portlets/render_public/_imagecontent.html.haml +++ b/app/views/portlets/render_public/_imagecontent.html.haml @@ -57,7 +57,7 @@ -if link - =link_to image_tag(url, :alt => input.alt.to_s, :style => styleimg, :class=> css_class, :id=> css_id), link, :title => input.alt.to_s, :target => (input.popup ? "_blank" : "") + =link_to image_tag(url, :alt => input.alt.to_s, :style => styleimg, :class=> css_class, :id=> css_id), link, :title => input.alt.to_s, :target => (input.popup ? "_blank" : ""), :data => {:remote => input.remote_link} -elsif input.expandable diff --git a/app/views/public/menu_items/show.html.haml b/app/views/public/menu_items/show.html.haml index 047afa0..f33c9a1 100644 --- a/app/views/public/menu_items/show.html.haml +++ b/app/views/public/menu_items/show.html.haml @@ -57,13 +57,3 @@ =yield :corps - --if @sidebar - :coffeescript - resize_menu_content_inner = -> - $('.menu_content_inner').css - "width" : ($("#main").outerWidth() - $(".side_menu").outerWidth())+"px" - "float" : "left" - resize_menu_content_inner() - $(window).bind "resize", -> - resize_menu_content_inner() diff --git a/app/views/public/menu_items/show.js.erb b/app/views/public/menu_items/show.js.erb new file mode 100644 index 0000000..fafad08 --- /dev/null +++ b/app/views/public/menu_items/show.js.erb @@ -0,0 +1,4 @@ + +$("#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_overlay").fadeIn(); +$(".popup_container").fadeIn(); \ No newline at end of file diff --git a/public/bouton-croix.png b/public/bouton-croix.png new file mode 100755 index 0000000..f2f94b3 Binary files /dev/null and b/public/bouton-croix.png differ