From a54ef357932aea1bc580f8131136a59582cb7718 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Mon, 25 Jul 2016 22:55:50 +0200 Subject: [PATCH] suite --- app/assets/javascripts/public.js.coffee | 9 ++- app/assets/stylesheets/public.scss | 52 ++++++++++++++++++ app/views/layouts/public.html.haml | 9 +++ .../render_public/_imagecontent.html.haml | 2 +- app/views/public/menu_items/show.html.haml | 10 ---- app/views/public/menu_items/show.js.erb | 4 ++ public/bouton-croix.png | Bin 0 -> 1925 bytes 7 files changed, 72 insertions(+), 14 deletions(-) create mode 100644 app/views/public/menu_items/show.js.erb create mode 100755 public/bouton-croix.png 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 0000000000000000000000000000000000000000..f2f94b3183ad8cd722c645db93a2af5596f3a7c9 GIT binary patch literal 1925 zcmaJ?c~la49G@)7TJ2KPlyai1Y?CV_AkYvLG4Z5wyHD8%awjHl~JFKi7Dr^5(ciznWj`#U|zQ^w~Z~h1k7TFDU84Lh` zoj5=kj*k=ZXMzm@e~Uh+tigv-m|r9o0V^?`ObY>g1sn~5Vzn#=3WsD0!{W0L7XbQ` zRMJQ+QWC_G!)mh3f+6eG2+jrou8$s($>SgljD})V8XoCcWfcijDR`tgUJ|MV5kRr3 zfFvyxkrXVIC&kIx3X+dE$klUj0X2llK)pI%gL3pd(idG0KDTUBNZ=O;7RMufO)63n z3JPE?1bUIDddjIZ8pvdlX$&tWlQspUQ)zSx6~CFDGzQ0u$)QgJzg;9enpUCYgbV$@ z#llxSQY?lc912CJ(~)&k$*?wtLSwVp77aSx6GwQW1`Q_Dduq^ey$V7Im1|W9rh+w~ zMNt+FCty4hp6S;T)W~;P4f?H3c*7`q8A73vsg{y@ffC98L)GfS*22NXiTOTpUL7+r3%?Jnje!b5U~9G*=zxmP8IU`zP(%_EKg8F z8myPA_`&t!m zWo(m53s-axNL?EbFFdx)EjZZmgto%wobpJ-yc@3P&YaN?8~m<%=t-Gx<%z7$g%>xV z*zYm<1qE5niwas=TGwydq#A77{d~Dw@~kEg_NN+}XWeb%+$ZVj)*LQ3KR-^m^M^z_8}pIVN#{4(Vp#xX~o zEHB@ARy<7&!y@arSR|8cEWc$>3fZ-7LdKBl$dnhgwF7#3miVQor{~H1#CgTVjUV1l zs4_l!{Mfp!u8trH33)iWu*(>Cd5dGLjd4hZ!1m?q*QFh=^YWti78g6#6He_I`6qk# z+8{>R;lm_TKdT)`NprK~uBbKkyg4eylEgO~%bFnwva$(*X3x$pJ9hkd5Q-jA7McV9 zo?kI)An-1E1}^S*bI+*MM~__g7L|=2B@&79YT?{zdm^em zT^bMUF^sKqWlZfX*tyf~-s>bYoLiq@KX*XxjR56>1-uQ}*_m>nxcFAEdrr8OvCNc2 z=px)K8csdGSRcN-kgL022JEQs9Nrps5$u>$nC0HszLt|s+3&LSb7`a>kdu{lzG36M zi!V#_pYMC&=Iz`>coS%p-7%FO@Wr)?R&(#wh*Als9CHFI^1QEn^uOHJR%_QL6p&jZ zgGxeYG*ww29pv`T96IO0&sT|0h2u-^-yeCdvC%GNG?Dnggl6n>uMe=8Yj_jc@HAP_aq2Ai8T)Z1=aO;z=X`~{|zOSg*ZUxj(ryG?dzP^SoOo;YNr?l~>4wl~DJ zcG?m?b4!2AT7irhHr>ZvyKnNCN7=5djjOe8&-06xG4Jpcdz literal 0 HcmV?d00001