frontend gallery fix
This commit is contained in:
parent
c7ac4e2485
commit
b1d8a87256
|
@ -69,7 +69,7 @@ var galleryAPI = function(){
|
||||||
this.loadImages = function(id){
|
this.loadImages = function(id){
|
||||||
g.albumArea.addClass('o_album');
|
g.albumArea.addClass('o_album');
|
||||||
g.albumArea.find("#imgholder").empty();
|
g.albumArea.find("#imgholder").empty();
|
||||||
$.getJSON("panel/gallery/front_end/albums/"+id+"/imgs",{inner:true},function(album){
|
$.getJSON("/panel/gallery/front_end/albums/"+id+"/imgs",{inner:true},function(album){
|
||||||
$.each(album.images,function(i,image){
|
$.each(album.images,function(i,image){
|
||||||
var thumb = image.file.thumb.url;
|
var thumb = image.file.thumb.url;
|
||||||
image.description = (image.description?image.description:"<%= I18n.t('gallery.no_description') %>")
|
image.description = (image.description?image.description:"<%= I18n.t('gallery.no_description') %>")
|
||||||
|
@ -218,6 +218,7 @@ var galleryAPI = function(){
|
||||||
}
|
}
|
||||||
// $(".slideinfo b.info").text(imageArray[imagecount].title);
|
// $(".slideinfo b.info").text(imageArray[imagecount].title);
|
||||||
updatePhotoTag();
|
updatePhotoTag();
|
||||||
|
if(imageArray[imagecount].description)
|
||||||
$(".slideinfo .info").text(imageArray[imagecount].description);
|
$(".slideinfo .info").text(imageArray[imagecount].description);
|
||||||
if(imageArray.length > 1)
|
if(imageArray.length > 1)
|
||||||
updateNavigation();
|
updateNavigation();
|
||||||
|
@ -244,7 +245,7 @@ var galleryAPI = function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
var preparestage = function(albumid){
|
var preparestage = function(albumid){
|
||||||
$.getJSON("panel/gallery/front_end/albums/"+albumid+"/imgs",{"inner":true},function(album){
|
$.getJSON("/panel/gallery/front_end/albums/"+albumid+"/imgs",{"inner":true},function(album){
|
||||||
imageArray = eval(album.images);
|
imageArray = eval(album.images);
|
||||||
$.each(album.images,function(i,image){
|
$.each(album.images,function(i,image){
|
||||||
if(image._id == id)
|
if(image._id == id)
|
||||||
|
|
|
@ -85,8 +85,8 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
||||||
@albumid = @image.gallery_album_id
|
@albumid = @image.gallery_album_id
|
||||||
@album = GalleryAlbum.find(@albumid)
|
@album = GalleryAlbum.find(@albumid)
|
||||||
@images = @album.gallery_images.all
|
@images = @album.gallery_images.all
|
||||||
tags = @album.tag_ids
|
# tags = @album.tag_ids
|
||||||
@tagnames = Tag.find(tags.tagged_ids).map{|t| t.name}
|
@tagnames = @album.tags.map{|t|t.name}
|
||||||
@back_link = panel_gallery_front_end_album_path(@albumid)
|
@back_link = panel_gallery_front_end_album_path(@albumid)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue