Collapsed Sidebar AdminLTE

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.

Collapsed Sidebar AdminLTE

Postby pandapipino » Wed Aug 02, 2017 3:32 pm

I'm aware that PHPMaker doesn't support any template customization but I really want this feature to be added on my project:

A tip from AdminLTE website:
Add the sidebar-collapse class to the body tag to get this layout. You should combine this option with a fixed layout if you have a long sidebar. Doing that will prevent your page content from getting stretched vertically.

If you can just point me to the right direction on where and what to do and maybe some basic code to start with. Thank you.

I tried this code:

//hide sidebar
$("body").addClass("sidebar-collapse");
//hide sidebar

but the icons on the sidebar was fully hidden, I was expecting that the icons were partially shown.
pandapipino
 
Posts: 87
Joined: Fri Jan 04, 2013 12:15 am

Re: Collapsed Sidebar AdminLTE

Postby Webmaster » Wed Aug 02, 2017 6:18 pm

pandapipino wrote:
> I was expecting that the icons were partially shown.

1. Make sure you have assigned menu icons in the Menu Editor, or there are no icons to show.
2. If you meant mini sidebar, see the example under Server Events and Client Scripts -> Client Scripts -> Global -> Startup Script in the help file.
Webmaster
 
Posts: 10734
Joined: Fri Aug 06, 2004 5:59 pm

Re: Collapsed Sidebar AdminLTE

Postby sangnandar » Sun Aug 13, 2017 12:52 am

Awesome yeah that's what I need, though I'm seeing a glitch on the menu, it has a little horizontal line gap on the menu from the submenu, so when you tried to mouse-over/click on the submenu it will end up closing because of the gap. This gap is too big for me.
sangnandar
 
Posts: 293
Joined: Mon Sep 19, 2016 2:04 am

Re: Collapsed Sidebar AdminLTE

Postby ichanz » Wed Aug 30, 2017 1:59 am

awesome... how to get "sidebar mini" get collapse by default, tks
ichanz
 
Posts: 18
Joined: Fri Jun 19, 2015 6:24 am

Re: Collapsed Sidebar AdminLTE

Postby arbei » Wed Aug 30, 2017 11:44 am

You can add one more class to the body in order to make it collapse.

For example:
$("body").addClass("sidebar-mini sidebar-collapse"); // Enable mini sidebar

But every page will make the sidebar collapsed as default, so you need to add a condition to determine whether adding the class "sidebar-collapse" or not.
arbei
 
Posts: 1499
Joined: Wed Sep 09, 2015 10:13 am

Re: Collapsed Sidebar AdminLTE

Postby pandapipino » Wed Sep 13, 2017 11:39 am

sangnandar wrote:
> Awesome yeah that's what I need, though I'm seeing a glitch on the menu, it
> has a little horizontal line gap on the menu from the submenu, so when you
> tried to mouse-over/click on the submenu it will end up closing because of
> the gap. This gap is too big for me.
I'm having the same problem, can some gentle help us with this glitch? Thank you
pandapipino
 
Posts: 87
Joined: Fri Jan 04, 2013 12:15 am

Re: Collapsed Sidebar AdminLTE

Postby jjancel » Sat Jan 13, 2018 3:38 am

Change the first level of the menu
in HTML/Styles/User
with
.sidebar-menu{ font-size: 15px; }
look
viewtopic.php?f=4&t=41275&hilit=sidebar
jjancel
 
Posts: 3
Joined: Mon Nov 24, 2014 7:58 pm


Return to General Discussion (PHPMaker)