Open-AudIT
http://www.open-audit.org/phpBB3/

Custom Sort lost after auto refresh of page
http://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=6480
Page 1 of 1

Author:  FranzXaver [ Fri Dec 18, 2015 12:05 am ]
Post subject:  Custom Sort lost after auto refresh of page

At the moment you lose any custom sort order when the page does its auto refresh to keep the session.
Is there any way to prevent this from happening?

Author:  jpa [ Fri Dec 18, 2015 10:05 am ]
Post subject:  Re: Custom Sort lost after auto refresh of page

I took a quick stab at this and was able to get something to work but it did cause visual side affects that I didn't spend the time to track down.

What I did:
Download jquery.tablesorter.min.js, jquery.tablesorter.pager.js and jquery.tablesorter.widgets.js from here. Widgets is the new important bit.
Copy the files to open-audit\theme-tango\tango-files\jquery\css\humanity overwriting the existing two tablesorter files.
Edit "code_igniter\application\views\theme-tango\v_template.php"
Add the following to the other <script> lines at the top:
Code:
<script type="text/javascript" src="<?php echo $oa_theme_files; ?>/jquery/js/jquery.tablesorter.widgets.js"></script>

Change the tablesorter line around line 120:
Code:
$("table").tablesorter({cancelSelection: false, widthFixed: true, sortList: [[<?php echo $sortcolumn?>,0],[<?php echo $sortcolumn?>,0]], widgets: ['saveSort', 'zebra'] })
Adding saveSort to widgets.

See what happens. It mostly worked for me but clobbered the ascending/descending sort indicators. Need to fix the CSS or something.

Author:  FranzXaver [ Tue Jan 05, 2016 7:38 pm ]
Post subject:  Re: Custom Sort lost after auto refresh of page

Thanks a lot jpa, will have a look at it as soon as I migrate our Open-Audit installation to a new server.

On a side note - I did not get an email notification from the forum when your reply was posted...

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/