minor fix for sidebar

This commit is contained in:
Harry Bomrah 2012-09-11 16:50:42 +08:00 committed by Christophe Vilayphiou
parent 8a71bd530f
commit 4ea0c0ec9c
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.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_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('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('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) %> <%= 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 -%> <% end -%>

View File

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