Jpanel will now remember opened or closed state

3 years 11 months ago #743 by Krx
Krx created the topic: Jpanel will now remember opened or closed state

I needed an option for jPanel module to remember opened and closed state,
so I modified latest 0.9.3 version of Jpanel module.

I tested it in Joomla 3.5.6 and FireFox 50.1.0 and it works OK

What's modified:
1. in mod_jpanel.xml file - added option "Remember" in "Status on page load" settings
2. in jpanel.js file - added extra script to create session cookies and for fast close/open
3. in mod_jpanel.php file added check to look if cookie exist and to set it open or closed according to last state

All changes are commented with "Hrvoje" so you can see what's changed.

- it remembers opened or closed state during browser session. Cookie expires after all browser instances are closed
- it remembers state for every jPanel module.

I attached modified files in ZIP archive. If you want this feature, just unzip and overwrite files in modules/mod_jpanel folder

To module author:
- Thanks for this useful module. :)
- if you find this "hack" useful, feel free to include it in new version.

1. Module upgrade will undo my changes
2. I'm not responsible for any problems you are doing it on your own risk
3. I'm not providing support for this.

Regards B)

Please Log in or Create an account to join the conversation.

Fork me on GitHub
Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok