Littled Library Pagination: Difference between revisions
(Created page with "Category:CMS Documentation Category:Littled Libraries Category:jQuery/AJAX Category:PHP Category:Web Development == Pagination == `littled/listings.js` ...") |
(No difference)
|
Revision as of 05:20, 13 September 2014
Pagination
littled/listings.js
Listings container is stored in dom.listings_container, with a default value of '.listings'.
The page key is defined in keys.page, with a default value of 'p'.
When clicking on page buttons to navigate to a different page in the listings, the new page value comes from the page button itself.
Resorting
littled/resort.js
Listings container is stored in dom.listings_container, with a default value of '.listings'.
The position_offset key is defined in keys.position_offset, with a default value of 'po'. This is the position of the first record currently being displayed on a page relative to the first record in the entire set of matching listings.
When loading modal dialogs and refreshing listings content, the library looks to the data-po attribute of .listings table:first by default.
Typically the `<table> markup is in a page content template, which is wrapped in a div.listings` container by the top-level page.
Refreshing listings after AJAX edits
littled/formDialog.js
Listings container is stored in dom.listings_container, with a default value of '.listings'.
The page key is defined in keys.page, with a default value of 'p'.
When loading modal dialogs and refreshing listings content, the library looks to the data-p attribute of .listings table:first by default.
Typically the `<table> markup is in a page content template, which is wrapped in a div.listings` container by the top-level page.
Album and gallery containers
The default album listings container is .album-listings and the default gallery listings container is .gallery-listings. Whatever routine calls the listings, formDialog, or resort libraries will override the default listings selector with the appropriate values.
The libraries will still look to the first table element in the container for the page' and position offset values.