From 1259d62249c0982e59b425084eb7687064e64748 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Thu, 5 Apr 2012 14:55:41 +0800 Subject: [PATCH] Fix mainTablePosition in js -> remove the notable class --- app/assets/javascripts/orbit-1.0.js | 17 +++++++++-------- app/views/admin/tags/index.html.erb | 2 +- .../back_end/fact_checks/setting.html.erb | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/orbit-1.0.js b/app/assets/javascripts/orbit-1.0.js index a894beea..e83c69f6 100644 --- a/app/assets/javascripts/orbit-1.0.js +++ b/app/assets/javascripts/orbit-1.0.js @@ -79,20 +79,21 @@ $(window).resize(function(){ /*main-table position*/ function mainTablePosition() { var $height = $('#main-wrap .subnav').length && $('#main-wrap .subnav').height(); - var $table = $('#main-wrap > .table').length && $('#main-wrap > .table'); - var $nottable = $('#main-wrap .nottable').length && $('#main-wrap .nottable'); - //alert ($table.height()) - if($nottable==0){ + var $table = $('#main-wrap > table').length && $('#main-wrap > table'); + if($table && $table==0){ + $table.css({marginTop:$height}); + } + else if($table){ if($height>0){ $height = $height-17; } $table.stop().animate({marginTop:$height},500); } - if($table==0){ - $nottable.css({marginTop:$height}); + else if($('#main-wrap .subnav')){ + var $object = $('#main-wrap .subnav').next(); + $object.css({marginTop:$height}); }; - //$table.css({marginTop : $height}) -} +}; $(window).scroll(function () { //var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-1; //var $subnavWidth = parseInt($('#main-wrap > .subnav').css("width")); diff --git a/app/views/admin/tags/index.html.erb b/app/views/admin/tags/index.html.erb index a8a1aa34..cca4b6af 100644 --- a/app/views/admin/tags/index.html.erb +++ b/app/views/admin/tags/index.html.erb @@ -8,7 +8,7 @@ -
+
<%= render :partial => 'tag', :collection => @tags %>
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb index 16e76f09..251d8346 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.html.erb @@ -11,7 +11,7 @@
<%#= label_tag :role, t("admin.roles") %> -
+
<%= content_tag :div do -%> <% form_tag :action => "update_setting" do %> <%= render :partial => "privilege_user", :locals => {:users => @users_array} %>