From c84b6a626eded681ec107b6b6551a8c9eb168561 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 11 Sep 2012 16:50:42 +0800 Subject: [PATCH] minor fix for sidebar --- app/views/layouts/_side_bar.html.erb | 2 +- .../app/assets/javascripts/galleryAPI_frontend.js.erb | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index 675078b3..aa3aeee2 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -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 -%> diff --git a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb index 957f8749..cd5f7238 100644 --- a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb +++ b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb @@ -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})