Fix mainTablePosition in js -> remove the notable class

This commit is contained in:
Christophe Vilayphiou 2012-04-05 14:55:41 +08:00
parent 7bf50d6c52
commit 1259d62249
3 changed files with 11 additions and 10 deletions

View File

@ -79,20 +79,21 @@ $(window).resize(function(){
/*main-table position*/ /*main-table position*/
function mainTablePosition() { function mainTablePosition() {
var $height = $('#main-wrap .subnav').length && $('#main-wrap .subnav').height(); var $height = $('#main-wrap .subnav').length && $('#main-wrap .subnav').height();
var $table = $('#main-wrap > .table').length && $('#main-wrap > .table'); var $table = $('#main-wrap > table').length && $('#main-wrap > table');
var $nottable = $('#main-wrap .nottable').length && $('#main-wrap .nottable'); if($table && $table==0){
//alert ($table.height()) $table.css({marginTop:$height});
if($nottable==0){ }
else if($table){
if($height>0){ if($height>0){
$height = $height-17; $height = $height-17;
} }
$table.stop().animate({marginTop:$height},500); $table.stop().animate({marginTop:$height},500);
} }
if($table==0){ else if($('#main-wrap .subnav')){
$nottable.css({marginTop:$height}); var $object = $('#main-wrap .subnav').next();
$object.css({marginTop:$height});
}; };
//$table.css({marginTop : $height}) };
}
$(window).scroll(function () { $(window).scroll(function () {
//var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-1; //var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-1;
//var $subnavWidth = parseInt($('#main-wrap > .subnav').css("width")); //var $subnavWidth = parseInt($('#main-wrap > .subnav').css("width"));

View File

@ -8,7 +8,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div id='tags' class="nottable clear"> <div id='tags' class="clear">
<%= render :partial => 'tag', :collection => @tags %> <%= render :partial => 'tag', :collection => @tags %>
</div> </div>
<div class="form-actions"> <div class="form-actions">

View File

@ -11,7 +11,7 @@
</ul> </ul>
</div> </div>
<%#= label_tag :role, t("admin.roles") %> <%#= label_tag :role, t("admin.roles") %>
<div class="nottable clear"> <div class="clear">
<%= content_tag :div do -%> <%= content_tag :div do -%>
<% form_tag :action => "update_setting" do %> <% form_tag :action => "update_setting" do %>
<%= render :partial => "privilege_user", :locals => {:users => @users_array} %> <%= render :partial => "privilege_user", :locals => {:users => @users_array} %>