From 97b646ec7d1705536b7b60e1ec3add69fbedeec0 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sat, 28 Feb 2015 17:56:26 +0100 Subject: [PATCH] gallery div fix --- app/views/fotos/show.html.erb | 11 +- app/views/galleries/show.html.erb | 326 +++++++++++++++--------------- 2 files changed, 168 insertions(+), 169 deletions(-) diff --git a/app/views/fotos/show.html.erb b/app/views/fotos/show.html.erb index 04c4e6b..babad45 100644 --- a/app/views/fotos/show.html.erb +++ b/app/views/fotos/show.html.erb @@ -7,10 +7,11 @@ bottom: 40pt; top: 0" %> <% #, gallery_foto_path(@foto.gallery, ((@foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].nil?) ? (@foto.gallery.fotos[0].try(:id).to_i) : @foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].try(:id).to_i) ) %>
-<%= link_to ff_icon('icon-circle-arrow-down').html_safe, @foto.datei.url, - :class=>"btn",title: I18n.t('fotos.download')+': '+@foto.title,:target=>:blank, :style=>"" %> - -<%= render_shareable :url=>gallery_foto_url(@foto.gallery,@foto, {theme: nil, locale: nil}) %> -

<%= notice %>

+ <%= link_to ff_icon('icon-circle-arrow-down').html_safe, @foto.datei.url, + :class=>"btn",title: I18n.t('fotos.download')+': '+@foto.title,:target=>:blank, :style=>"" %> + + <%= render_shareable :url=>gallery_foto_url(@foto.gallery,@foto, {theme: nil, locale: nil}),:turbolinks=>true, :buttons=>[:facebook, :twitter, :google_plus] %> +

<%= notice %>

+
diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb index 8cd4f77..db225b7 100644 --- a/app/views/galleries/show.html.erb +++ b/app/views/galleries/show.html.erb @@ -2,7 +2,7 @@ Fet - Fotos: <%= @gallery.name %> <% -if @openfotoid.nil? || @openfotoid==0 + if @openfotoid.nil? || @openfotoid==0 @firstfoto= @fotos_p.first picture_url=URI(root_url) picture_url.path=@firstfoto.datei.url(:locale=>nil, :theme=>nil) @@ -39,187 +39,185 @@ end js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&appId=120379864660921&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); -}(document, 'script', 'facebook-jssdk')); + }(document, 'script', 'facebook-jssdk'));
-

<%= notice %>

+

<%= notice %>

-
- <%= @gallery.fotos.size.to_s + " " + I18n.t('fotos.bilder')%> - <%=I18n.l(@gallery.try(:datum).try(:to_date)) unless @gallery.try(:datum).try(:to_date).nil? %>
-

- <%= @gallery.name %> -

-
- -

- <%= @gallery.desc %> -

- -
-
- <%= paginate @fotos_p , theme:'twitter-bootstrap' %> - + } + +
+
+ <%= paginate @fotos_p , theme:'twitter-bootstrap' %> + +
+
+
+
+ + <% for i in 0..@pppage_array.size-1 %> + <%=@pppage_array[i]%> + <% end %> +
+
+
-
-
-
- - <% for i in 0..@pppage_array.size-1 %> - <%=@pppage_array[i]%> +
+ + + +

+
+
+ <% @fotos_p.each do |f| %> +
+ + <%= link_to ff_icon('icon-circle-arrow-down').html_safe, f.datei.url, + :class=>"btn-small",title: I18n.t('fotos.download')+': '+f.title, rel: 'tooltip' %> + <%= link_to ff_icon('icon-remove-circle').html_safe, gallery_foto_path(@gallery, f), + :method => :delete, :class=>"btn-small btn-danger",title: I18n.t('fotos.delete')+': '+f.title, rel: 'tooltip', confirm: I18n.t('fotos.delete')+': '+f.title+', Sicher?' if can?(:delete,f) %> +

+
+ <% end %> + +
-
-
- - -

-
-
- <% @fotos_p.each do |f| %> -
-
- -
- <% if can? :delete,@gallery %> -
- - <%= link_to ff_icon('icon-circle-arrow-down').html_safe, '', - :class=>"btn-small"%>: <%= I18n.t('fotos.download_long')%>
- <%= link_to ff_icon('icon-remove-circle').html_safe, '', - :class=>"btn-small btn-danger"%>: <%= I18n.t('fotos.delete')%> -

- -
- <% end %> - <%= render 'layouts/pretty_toolbar' %> -
- -<%= javascript_include_tag "blueimp-gallery-all" %> - - - - -
+ blueimp.Gallery.prototype.onslide = (function(_super) { + return function(index) { + history.pushState({},"Foto",String(this.list[index].getAttribute('histitem'))); + return _super.apply(this, arguments); + }; + })(blueimp.Gallery.prototype.onslide); + + + +