From c32794db8e948644d350f1e01d009e0df278895c Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Mon, 19 Mar 2018 16:26:31 +0100 Subject: [PATCH] suite --- app/assets/javascripts/popover.coffee | 12 +++------ .../render_public/_gallerycontent.html.haml | 27 ++++++++++--------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/app/assets/javascripts/popover.coffee b/app/assets/javascripts/popover.coffee index 0ae36b1..33e302b 100644 --- a/app/assets/javascripts/popover.coffee +++ b/app/assets/javascripts/popover.coffee @@ -6,9 +6,6 @@ $("document").ready -> position_img_now = -> - - # alert $("#large .large-img").outerHeight(false) - imgheight = $("#large .large-img").outerHeight(false) + $("#large h3").outerHeight(false) @@ -81,14 +78,12 @@ $("document").ready -> $(".expandable_image").click -> maxwidth = 1000 maxheight = 900 - alert "t" - - + prev_link = $(this) $("body").append "
" title = false - alert "te" + $("#large").append "
" @@ -117,8 +112,7 @@ $("document").ready -> "max-width" : "85%" position_img(); - - alert "t" + false diff --git a/app/views/portlets/render_public/_gallerycontent.html.haml b/app/views/portlets/render_public/_gallerycontent.html.haml index b7dd487..3f89c7a 100644 --- a/app/views/portlets/render_public/_gallerycontent.html.haml +++ b/app/views/portlets/render_public/_gallerycontent.html.haml @@ -1,6 +1,6 @@ -if admin - %h2 Galerie photo + %h2 Galerie photos %h2=input.name .description =raw input.description @@ -72,7 +72,8 @@ .rea-gal.img_gallery -input.gallery_images.each do |gallery_images| - =link_to image_tag("http#{("s" if Rails.env.production?)}://"+HOSTNAME+gallery_images.image_file.file.square.url, :alt => "#{gallery_images.title}"), "http#{("s" if Rails.env.production?)}://"+HOSTNAME+gallery_images.image_file.file.large.url, :title => gallery_images.title + -if gallery_images.image_file.file + =link_to image_tag("http#{("s" if Rails.env.production?)}://"+HOSTNAME+gallery_images.image_file.file.square.url, :alt => "#{gallery_images.title}"), "http#{("s" if Rails.env.production?)}://"+HOSTNAME+gallery_images.image_file.file.large.url, :title => gallery_images.title .clear @@ -90,16 +91,17 @@ .slides %ul.slides-container -input.gallery_images.each do |gallery_images| - %li - =image_tag "http#{("s" if Rails.env.production?)}://"+HOSTNAME+gallery_images.image_file.file.large.url + -if gallery_images.image_file.file + %li + =image_tag "http#{("s" if Rails.env.production?)}://"+HOSTNAME+gallery_images.image_file.file.large.url - .desc - -if gallery_images.title? - %h3 - =gallery_images.title - ="/" if gallery_images.description? - -if gallery_images.description? - =gallery_images.description + .desc + -if gallery_images.title? + %h3 + =gallery_images.title + ="/" if gallery_images.description? + -if gallery_images.description? + =gallery_images.description =raw "
" =raw "
" @@ -114,6 +116,7 @@ .rea-gal.img_gallery -input.gallery_images.each do |gallery_images| - =link_to image_tag("http#{("s" if Rails.env.production?)}://"+HOSTNAME+gallery_images.image_file.file.large.medium.small.thumb.url, :alt => "#{gallery_images.title}"), "http#{("s" if Rails.env.production?)}://"+HOSTNAME+gallery_images.image_file.file.large.url, :title => (gallery_images.title if input.show_title) + -if gallery_images.image_file.file + =link_to image_tag("http#{("s" if Rails.env.production?)}://"+HOSTNAME+gallery_images.image_file.file.large.medium.small.thumb.url, :alt => "#{gallery_images.title}"), "http#{("s" if Rails.env.production?)}://"+HOSTNAME+gallery_images.image_file.file.large.url, :title => (gallery_images.title if input.show_title) \ No newline at end of file