minor fix for sidebar

This commit is contained in:
Harry Bomrah 2012-09-11 16:50:42 +08:00
parent 7bab8bf8ad
commit c84b6a626e
2 changed files with 8 additions and 5 deletions

View File

@ -73,7 +73,7 @@
<%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %>
<%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
<%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
<%= content_tag :li, link_to(t('gallery.categories'), panel_gallery_back_end_gallery_categories_path), :class => active_for_action('/panel/gallery/back_end/gallery_categories','gallery_categories') %>
<%= content_tag :li, link_to(t('gallery.categories'), panel_gallery_back_end_gallery_categories_path), :class => active_for_action('gallery_categories','index') %>
<%= content_tag :li, link_to(t('gallery.tags'), panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') %>
<%= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "Gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %>
<% end -%>

View File

@ -90,7 +90,7 @@ var galleryAPI = function(){
wHeight = $(window).height();
$("#main_pic").height("auto");
$img.height("100%");
$img.css("height","auto");
var updatePhotoTag = function(){
var tagnames = imageArray[imagecount].tag_names;
@ -185,8 +185,8 @@ var galleryAPI = function(){
$img.css({"padding":""})
$("#main_pic").height("auto");
}else{
$("#main_pic").height(wHeight);
// $img.height("100%");
$("#main_pic").height(wHeight);
$img.css("height","auto");
$rslide.css("position","");
$rslide.addClass("fullscreen");
$img.css({"padding":($rslide.height()-$img.height())/2})
@ -197,7 +197,10 @@ var galleryAPI = function(){
var pageurl = dom.attr('href');
$img.fadeOut(200,function(){
$img.attr({"src":dom.attr("data-content"),"height":"auto"});
if($rslide.hasClass("fullscreen"))
$img.attr({"src":dom.attr("data-content")}).css("height","100%");
else
$img.attr({"src":dom.attr("data-content")}).css("height","auto");
$img.fadeIn(200);
if($rslide.hasClass("fullscreen")){
$img.css({"padding":($rslide.height()-$img.height())/2})