Merge branch '1844-Fixed-header-pisa-el-contenido-de-la-página' into 'develop'

Change fixed header and fixed menu positions - #1844

See merge request artica/pandorafms!1328
This commit is contained in:
vgilc 2018-03-01 09:24:42 +01:00
commit bb313fc6c6
3 changed files with 60 additions and 6 deletions

View File

@ -288,6 +288,7 @@ $table_styles->data[$row][1] = __('Yes') . ' ' .
'  ';
$table_styles->data[$row][1] .= __('No') . ' ' .
html_print_radio_button ('fixed_menu', 0, '', $config["fixed_menu"], true);
$row++;
// For 5.1 Autohidden menu feature
$table_styles->data['autohidden'][0] = __('Autohidden menu');

View File

@ -226,12 +226,65 @@ $(document).ready (function () {
$(document).on("scroll", function(){
if((document.documentElement.scrollTop != 0 || document.body.scrollTop != 0) && $('#menu').css('position') =='fixed'){
$('#menu').css('top','20px');
}
else{
$('#menu').css('top','80px');
if(document.documentElement.scrollTop != 0 || document.body.scrollTop != 0){
if($('#head').css('position') =='fixed'){
if($('#menu').css('position') =='fixed'){
$('#menu').css('top','80px');
}
else{
$('#menu').css('top','60px');
}
}
else{
if($('#menu').css('position') =='fixed'){
$('#menu').css('top','20px');
}
else{
$('#menu').css('top','80px');
}
}
}
else{
if($('#head').css('position') =='fixed'){
if($('#menu').css('position') =='fixed'){
$('#menu').css('top','80px');
}
else{
$('#menu').css('top','60px');
}
}
else{
if($('#menu').css('position') =='fixed'){
$('#menu').css('top','80px');
}
else{
$('#menu').css('top','80px');
}
}
}
// if((document.documentElement.scrollTop != 0 || document.body.scrollTop != 0) && $('#menu').css('position') =='fixed'){
// if($('#head').css('position') =='fixed'){
// $('#menu').css('top','80px');
// }
// else{
// $('#menu').css('top','20px');
// }
// }
// else{
// if($('#head').css('position') =='fixed'){
// if(document.documentElement.scrollTop != 0 || document.body.scrollTop != 0){
// $('#menu').css('top','60px');
// }else{
// $('#menu').css('top','80px');
// }
//
// }
// else{
// $('#menu').css('top','60px');
// }
// }
});
$("#alert_messages").draggable();

View File

@ -951,7 +951,7 @@ if ($config["pure"] == 0) {
else {
echo '<div id="container"><div id="head">';
require ("general/header.php");
echo '</div><div id="page"><div id="menu">';
echo '</div><div id="page" style="margin-top:20px;"><div id="menu">';
require ("general/main_menu.php");
echo '</div>';
}