frontend commits
This commit is contained in:
parent
3749e919cb
commit
8dd69a140f
|
@ -4,6 +4,7 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
|
|||
|
||||
|
||||
def setting
|
||||
|
||||
@sys_users = User.all(conditions: {admin: false}).includes(:avatar)
|
||||
@ob_auth = ObjectAuth.find params[:object_auth_id]
|
||||
@options_from_collection_for_select_ob_auth = [@ob_auth].collect{|oa| [oa.auth_obj.pp_object,oa.id] }
|
||||
|
|
|
@ -227,7 +227,7 @@ Orbit::Application.routes.draw do
|
|||
|
||||
match '/desktop/temp_func/'=>'desktop#temp_func'
|
||||
|
||||
match '/panel/:app_name/front_end/:app_action/:id/*controller_action' => 'pages#show_from_link', :constraints => lambda { |request|
|
||||
match '/panel/:app_name/front_end/:app_action/:id(/:controller_action)' => 'pages#show_from_link', :constraints => lambda { |request|
|
||||
!request.query_string.include?("inner=true")
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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 -->
|
||||
|
|
Loading…
Reference in New Issue