forked from Wavyzz/dolibarr
Merge pull request #10780 from atm-john/theme_sidebarr_toggle
NEW/FIX Theme sidebarr toggle
This commit is contained in:
@@ -7191,11 +7191,10 @@ function printCommonFooter($zone = 'private')
|
|||||||
{
|
{
|
||||||
print "\n";
|
print "\n";
|
||||||
print '/* JS CODE TO ENABLE to manage handler to switch left menu page (menuhider) */'."\n";
|
print '/* JS CODE TO ENABLE to manage handler to switch left menu page (menuhider) */'."\n";
|
||||||
print 'jQuery(".menuhider").click(function() {';
|
print 'jQuery(".menuhider").click(function(event) {';
|
||||||
|
print ' if(!$( "body" ).hasClass( "sidebar-collapse" )){ event.preventDefault(); }'."\n";
|
||||||
print ' console.log("We click on .menuhider");'."\n";
|
print ' console.log("We click on .menuhider");'."\n";
|
||||||
//print " $('.side-nav').animate({width:'toggle'},200);\n"; // OK with eldy theme but not with md
|
print " $('body').toggleClass('sidebar-collapse')\n";
|
||||||
print " $('.side-nav').toggle()\n";
|
|
||||||
print " $('.login_block').toggle()\n";
|
|
||||||
print '});'."\n";
|
print '});'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1096,6 +1096,10 @@ if (! function_exists("llxHeader"))
|
|||||||
// html header
|
// html header
|
||||||
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
||||||
|
|
||||||
|
if ($conf->browser->layout == 'phone'){
|
||||||
|
$morecssonbody.= ' sidebar-collapse';
|
||||||
|
}
|
||||||
|
|
||||||
print '<body id="mainbody"'.($morecssonbody?' class="'.$morecssonbody.'"':'').'>' . "\n";
|
print '<body id="mainbody"'.($morecssonbody?' class="'.$morecssonbody.'"':'').'>' . "\n";
|
||||||
|
|
||||||
// top menu and left menu area
|
// top menu and left menu area
|
||||||
|
|||||||
@@ -963,7 +963,13 @@ td.showDragHandle {
|
|||||||
border-right: 1px solid #d0d0d0;
|
border-right: 1px solid #d0d0d0;
|
||||||
box-shadow: 3px 0 6px -2px #eee;
|
box-shadow: 3px 0 6px -2px #eee;
|
||||||
background: rgb(<?php echo $colorbackvmenu1; ?>);
|
background: rgb(<?php echo $colorbackvmenu1; ?>);
|
||||||
|
transition: left 0.5s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.sidebar-collapse .side-nav {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
div.blockvmenulogo
|
div.blockvmenulogo
|
||||||
{
|
{
|
||||||
border-bottom: 0 !important;
|
border-bottom: 0 !important;
|
||||||
@@ -1006,11 +1012,8 @@ div.vmenu, td.vmenu {
|
|||||||
background: #FFF;
|
background: #FFF;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
}
|
|
||||||
.side-nav {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 90;
|
z-index: 90;
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
div.blockvmenulogo
|
div.blockvmenulogo
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1196,9 +1196,33 @@ td.showDragHandle {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Slide animation
|
||||||
|
*/
|
||||||
|
.side-nav-vert, #id-right {
|
||||||
|
transition: padding-left 0.5s ease, margin-left 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.side-nav, .login_block {
|
||||||
|
transition: left 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.sidebar-collapse .side-nav-vert, body.sidebar-collapse #id-right {
|
||||||
|
margin-left: 0;padding-left:0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.side-nav-vert {
|
.side-nav-vert {
|
||||||
margin-left: 228px;
|
margin-left: 228px;
|
||||||
}
|
}
|
||||||
|
body.sidebar-collapse .side-nav, body.sidebar-collapse .login_block {
|
||||||
|
<?php if (in_array($conf->browser->layout, array('phone','tablet')) && ((GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER)) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))) { ?>
|
||||||
|
left: -240px;
|
||||||
|
<?php } else { ?>
|
||||||
|
left: -229px;
|
||||||
|
<?php } ?>
|
||||||
|
}
|
||||||
<?php if (empty($conf->global->THEME_DISABLE_STICKY_TOPMENU)) { ?>
|
<?php if (empty($conf->global->THEME_DISABLE_STICKY_TOPMENU)) { ?>
|
||||||
.side-nav-vert {
|
.side-nav-vert {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
@@ -1225,13 +1249,13 @@ div.login_block {
|
|||||||
overflow-x: initial !important;
|
overflow-x: initial !important;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
display: none;
|
display: block;
|
||||||
|
|
||||||
position: auto;
|
position: relative;
|
||||||
top: auto;
|
|
||||||
z-index: 90;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
div.backgroundsemitransparent {
|
div.backgroundsemitransparent {
|
||||||
background:rgba(255,255,255,0.6);
|
background:rgba(255,255,255,0.6);
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
@@ -1244,7 +1268,7 @@ div.backgroundsemitransparent {
|
|||||||
|
|
||||||
div.login_block {
|
div.login_block {
|
||||||
/* position: initial !important;*/
|
/* position: initial !important;*/
|
||||||
display: none;
|
/*display: none;*/
|
||||||
}
|
}
|
||||||
.login_block_getinfo {
|
.login_block_getinfo {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user