frontend commits
This commit is contained in:
1 parent
3749e919cb
commit
8dd69a140f
5 files changed
+16
-23
No files matched your search
+6
-20
@@ -9,7 +9,7 @@ var galleryAPI = function(){
|
||||
this.urlVars = rcom.getUrlVars();
|
||||
this.albumArea = $("#orbit_gallery");
|
||||
this.loadArea = null;
|
||||
this.tagList = $("ul#.tag_list");
|
||||
this.tagList = $(".taglist ul");
|
||||
// this.authenticated = false;
|
||||
this.initialize = function(callbackFn){
|
||||
$(document).ready(function(){
|
||||
@@ -93,25 +93,12 @@ var galleryAPI = function(){
|
||||
$img.height("100%");
|
||||
|
||||
var updatePhotoTag = function(){
|
||||
var tags = imageArray[imagecount].tag_ids;
|
||||
if(tags.length > 0 && g.tagList.find("li").length == 0){
|
||||
var tagnames = imageArray[imagecount].tag_names;
|
||||
g.tagList.empty();
|
||||
for(i in tagnames){
|
||||
$li = $("<li><label>"+tagnames[i]+"</label><span style='display:none;'>"+tagnames[i]+"</span></li>");
|
||||
g.tagList.append($li);
|
||||
}
|
||||
}else if(tags.length > 0 && g.tagList.find("li").length > 0) {
|
||||
g.tagList.find("input").attr("checked",false);
|
||||
for(tag in tags){
|
||||
g.tagList.find("li[data-content="+tags[tag]+"] input").attr("checked",true);
|
||||
}
|
||||
}else if(tags.length == 0){
|
||||
if(g.tagList.find("input").length == 0)
|
||||
g.tagList.empty();
|
||||
else
|
||||
g.tagList.find("input").attr("checked",false);
|
||||
var tagnames = imageArray[imagecount].tag_names;
|
||||
g.tagList.empty();
|
||||
for(tag in tagnames){
|
||||
g.tagList.append("<li>"+tagnames[tag]+"</li>");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -227,7 +214,6 @@ var galleryAPI = function(){
|
||||
window.location.hash = pageurl;
|
||||
}
|
||||
// $(".slideinfo b.info").text(imageArray[imagecount].title);
|
||||
if($('.bt-tag').hasClass("active"))
|
||||
updatePhotoTag();
|
||||
$(".slideinfo .info").text(imageArray[imagecount].description);
|
||||
if(imageArray.length > 1)
|
||||
|
||||
Vendored
+5
-1
@@ -87,11 +87,15 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
||||
end
|
||||
|
||||
def theater
|
||||
@tags = GalleryTag.all
|
||||
@image = GalleryImage.find(params[:id])
|
||||
@albumid = @image.gallery_album_id
|
||||
@album = GalleryAlbum.find(@albumid)
|
||||
@images = @album.gallery_images.all
|
||||
tags = @album.tag_ids
|
||||
@tagnames = Array.new
|
||||
tags.each do |tag|
|
||||
@tagnames << GalleryTag.find(tag)[I18n.locale]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
+3
-1
@@ -34,7 +34,9 @@
|
||||
<div class="taglist">
|
||||
<h3 class="taglist_title"><%= t('gallery.photo_tag') %></h3>
|
||||
<ul>
|
||||
|
||||
<% @tagnames.each do |tagname| %>
|
||||
<li><%= tagname %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- tag end -->
|
||||
|
||||
Reference in new issue
Block a user