1rosehip / jplist

jPList jQuery Data Grid Controls is a flexible jQuery plugin for sorting, pagination and filtering of any HTML structure (DIVs, UL/LI, tables, etc).
http://jplist.com
Other
438 stars 176 forks source link

Pagination with data-control-storage="false" not working #181

Closed b0hdy closed 8 years ago

b0hdy commented 8 years ago

Hi, I have problem with pagination. When I want to use data-control-storage="false" on pagination settings (bootstrap), it´s not working. When I refresh page, pagination won´t load. PS: Using PHP Data Source

Thank you.

1rosehip commented 8 years ago

Have you defined storage settings like described in the docs? http://jplist.com/documentation/js-settings#storage

b0hdy commented 8 years ago

Yes. Everything else working, filtering, etc. But I don´t want to save current page and want to always start with page number one.

1rosehip commented 8 years ago

Actually, you need to do data-control-storage="false" (and not true) like described here: http://jplist.com/controls/bootstrap-pagination-control#settings

b0hdy commented 8 years ago

Sorry, I was wrong. I have set data-control-storage="false" on UL pagination. Try your demo "1-php-mysql-html" with server, set storage and data-control-storage and you wil see.

1rosehip commented 8 years ago

OK, I'll check it.

b0hdy commented 8 years ago

Any solution?

1rosehip commented 8 years ago

The issue is fixed (in js): https://github.com/no81no/jplist/blob/master/demo/php-mysql-demos/7-php-mysql-html-with-localstorage.html

b0hdy commented 8 years ago

Good, what file (js) has been modifed?

1rosehip commented 8 years ago

You should take the relevant files from the dist folder (depending on controls you're using): https://github.com/no81no/jplist/tree/master/dist/js

1rosehip commented 8 years ago

Please take the scripts from dist folder again now. I forgot to upload them to github :)

b0hdy commented 8 years ago

Ok, thank you, it´s working. But now it´s problem with boot-items-per-page-dropdown, when you don´t select number of post on page, results won´t show, but when you select number of post on page and refresh page, result will show.

b0hdy commented 8 years ago

So still not functioning properly fully jplist.bootstrap-pagination-bundle.min.js. :(

1rosehip commented 8 years ago

Can you share the link?

b0hdy commented 8 years ago

I can't, because I have it on localhost. But your demo PHP with MySQL and localstorage (last edited) has still bug, when you select another per page and you are go to another page (no first) and refresh page, still current page stay saved.

1rosehip commented 8 years ago

I've created a demo page here: https://github.com/no81no/jplist/blob/master/demo/php-mysql-demos/9-bootstrap-pagination-bundle-demo.html It seems to work OK. Please compare your html with this demo.

b0hdy commented 8 years ago

Still not working, after refresh page on another page (ex. 2), result is empty. I am using: jplist.core.min.js jplist.bootstrap-pagination-bundle.min.js
jplist.bootstrap-filter-dropdown.min.js jplist.textbox-filter.min.js jplist.bootstrap-sort-dropdown.min.js jplist.history-bundle.min.js jplist.list-grid-view.min.js jplist.preloader-control.min.js

1rosehip commented 8 years ago

I'm not sure why it doesn't work on your end. Maybe the best options would be to recreate the demo page I provided in your environment and compare these pages.

b0hdy commented 8 years ago

I tried your demo and compare html, it´s same, but when i select another per page and go to second page and then refresh page, per page will reset OR when I for the first go to second page and then select another per page and refresh page, current page (2) stay saved, so there is still bug.

1rosehip commented 8 years ago

So you use 2 different pages with jplist with local storage settings? If so, please make sure that "storageName" in their settings is different.

b0hdy commented 8 years ago

No, I thought on the same page. I am using JPlist with localstorage and PHP html data source. When I select on pagination page (2), then select "per page 10" and refresh page, current page is still 2. If I do this conversely "per page 10" will reset back to "per page 3" but current page is first. It´s so complicated. :)

b0hdy commented 8 years ago

I´ll try to create demo and upload on ftp.

b0hdy commented 8 years ago

Check it out, what I wrote http://www.comely.cz/code/jplist/demo/php-mysql-demos/1-php-mysql-html.html

1rosehip commented 8 years ago

Thank you for the uploaded demo, I'll check it.

b0hdy commented 8 years ago

Any progress?

1rosehip commented 8 years ago

The issue is fixed. You can download:

b0hdy commented 8 years ago

Ok, that's fine. I'll try it and give you feeeback.

1rosehip commented 8 years ago

Great :)

b0hdy commented 8 years ago

Now, it's works very good. Thank you!! :+1: :)

1rosehip commented 8 years ago

I'm glad that it's OK. I've added 530 integration tests, so now it could be easier to avoid bugs after future changes.