marienfressinaud/FreshRSS — pull request #156 by Alkarex (2013-09-03 23:49:57+00:00)
Title: Speed: big jQuery optimisation of init_posts()

- jQuery updated from version 1.5.2 to 1.10.2 (checked that it is ok
with jQuery Migrate Plugin)
- Put hide_posts() first to avoid flashing content during load
- Big speed optimisation of init_img()
- Use a single on() delegated event (jQuery 1.7+) instead of all per-article click events as described on http://api.jquery.com/on/
- Moved all the per-article click events to an outside function init_stream_delegates() that is called only once even when new articles are dynamically added. Much lighter approach, and does not require unbinding events and rebinding them at each dynamic load.
- Side effect: corrected the bug of favourites and read/unread that were not properly unbound during dynamic loading.
- Corrected a JavaScript error for auto_load_more when #load_more is not visible and therefore does not have a position() defined.