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