frontend commits
This commit is contained in:
parent
3749e919cb
commit
8dd69a140f
|
@ -4,6 +4,7 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
|
||||||
|
|
||||||
|
|
||||||
def setting
|
def setting
|
||||||
|
|
||||||
@sys_users = User.all(conditions: {admin: false}).includes(:avatar)
|
@sys_users = User.all(conditions: {admin: false}).includes(:avatar)
|
||||||
@ob_auth = ObjectAuth.find params[:object_auth_id]
|
@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] }
|
@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 '/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")
|
!request.query_string.include?("inner=true")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ var galleryAPI = function(){
|
||||||
this.urlVars = rcom.getUrlVars();
|
this.urlVars = rcom.getUrlVars();
|
||||||
this.albumArea = $("#orbit_gallery");
|
this.albumArea = $("#orbit_gallery");
|
||||||
this.loadArea = null;
|
this.loadArea = null;
|
||||||
this.tagList = $("ul#.tag_list");
|
this.tagList = $(".taglist ul");
|
||||||
// this.authenticated = false;
|
// this.authenticated = false;
|
||||||
this.initialize = function(callbackFn){
|
this.initialize = function(callbackFn){
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
@ -93,25 +93,12 @@ var galleryAPI = function(){
|
||||||
$img.height("100%");
|
$img.height("100%");
|
||||||
|
|
||||||
var updatePhotoTag = function(){
|
var updatePhotoTag = function(){
|
||||||
var tags = imageArray[imagecount].tag_ids;
|
var tagnames = imageArray[imagecount].tag_names;
|
||||||
if(tags.length > 0 && g.tagList.find("li").length == 0){
|
g.tagList.empty();
|
||||||
var tagnames = imageArray[imagecount].tag_names;
|
for(tag in tagnames){
|
||||||
g.tagList.empty();
|
g.tagList.append("<li>"+tagnames[tag]+"</li>");
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -227,7 +214,6 @@ var galleryAPI = function(){
|
||||||
window.location.hash = pageurl;
|
window.location.hash = pageurl;
|
||||||
}
|
}
|
||||||
// $(".slideinfo b.info").text(imageArray[imagecount].title);
|
// $(".slideinfo b.info").text(imageArray[imagecount].title);
|
||||||
if($('.bt-tag').hasClass("active"))
|
|
||||||
updatePhotoTag();
|
updatePhotoTag();
|
||||||
$(".slideinfo .info").text(imageArray[imagecount].description);
|
$(".slideinfo .info").text(imageArray[imagecount].description);
|
||||||
if(imageArray.length > 1)
|
if(imageArray.length > 1)
|
||||||
|
|
|
@ -87,11 +87,15 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
||||||
end
|
end
|
||||||
|
|
||||||
def theater
|
def theater
|
||||||
@tags = GalleryTag.all
|
|
||||||
@image = GalleryImage.find(params[:id])
|
@image = GalleryImage.find(params[:id])
|
||||||
@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
|
||||||
|
@tagnames = Array.new
|
||||||
|
tags.each do |tag|
|
||||||
|
@tagnames << GalleryTag.find(tag)[I18n.locale]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,9 @@
|
||||||
<div class="taglist">
|
<div class="taglist">
|
||||||
<h3 class="taglist_title"><%= t('gallery.photo_tag') %></h3>
|
<h3 class="taglist_title"><%= t('gallery.photo_tag') %></h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
<% @tagnames.each do |tagname| %>
|
||||||
|
<li><%= tagname %></li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- tag end -->
|
<!-- tag end -->
|
||||||
|
|
Reference in New Issue