6
2

I've completed endless question paging and PJAX functionality. All pages in OSQA can be loaded via AJAX requests with complete, seamless fallback for browsers that don't support the HTML5 history APIs. It works incredibly well, it completely transforms the application (which is why I started this in the first place :)

It requires the django-endless-pagination extension be installed, but otherwise all of the dependencies are included. Turn on the functionality in the 'web' section in the admin panel. Default page size is 30 for question pages, loads will happen automatically at the base of the page.

I'm using this on my instance internally and have tested w/ Chrome, Firefox release channels and IE9, but would appreciate anyone trying this out on a test instance and letting me know how it works for you:

https://github.com/BinaryRage/OSQA

This fork also includes all of the changes here:

http://meta.osqa.net/questions/11337/improvements-to-osqa-how-do-i-request-that-patches-be-reviewedlanded-in-svn

In future, I'll make the pagination dependency soft and disable the settings if it's not installed and add a better 'more' interface and loading indicator for pagination.

Funnily enough, though I'd planned this work anyway, Jeff Atwood wrote about pagination in the last week. Well worth a read:

http://www.codinghorror.com/blog/2012/03/the-end-of-pagination.html

Features

Loading indicator on top bar during navigation:

alt text

Fixed top navigation that survives navigation and stays with you on all pages:

alt text

Known Issues

  • When navigating using back/forward you may find you can't be returned back to the same location on the page due to a shorter content length. There's currently no easy way to hook into PJAX's history state to persist the current page scroll information. Once history.state has better adoption, I'll override the browser behaviour and implement full restoration of scroll position after state change

asked 28 Mar '12, 20:16

Danny%20Thomas's gravatar image

Danny Thomas
1.1k51415
accept rate: 39%

edited 31 May '12, 05:32

I will take a look!

(30 Mar '12, 06:13) Crepsculus

Great effort. Will be watching this with great anticipation.

(31 Mar '12, 07:08) jac

We've been running this in production for a couple of months. It works great - no concerns about people taking this branch now.

(31 May '12, 05:31) Danny Thomas

can you show me your demo?

(13 Dec '13, 04:29) pahlawandevisa
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×148
×36
×6
×2

Asked: 28 Mar '12, 20:16

Seen: 1,088 times

Last updated: 13 Dec '13, 04:29

powered by OSQA