diff options
| author | 2013-09-04 01:46:49 +0200 | |
|---|---|---|
| committer | 2013-09-04 01:46:49 +0200 | |
| commit | d9db9bae0dc5eae0ad9822fc848c2db909fcc993 (patch) | |
| tree | 0c8013d62244b0759418b2000f5d234d4109d175 /app/App_FrontController.php | |
| parent | 31a6a13268023a2db5eba2445ee6c7db4a6d9623 (diff) | |
Speed: 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.
Diffstat (limited to 'app/App_FrontController.php')
| -rw-r--r-- | app/App_FrontController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/App_FrontController.php b/app/App_FrontController.php index 2a2684412..9eb3b5e1d 100644 --- a/app/App_FrontController.php +++ b/app/App_FrontController.php @@ -57,8 +57,8 @@ class App_FrontController extends FrontController { if (login_is_conf ($this->conf)) { View::appendScript ('https://login.persona.org/include.js'); } - View::appendScript (Url::display ('/scripts/jquery.js')); - View::appendScript (Url::display ('/scripts/jquery.lazyload.min.js')); + View::appendScript (Url::display ('/scripts/jquery.min.js')); + View::appendScript (Url::display ('/scripts/jquery.lazyload.min.js')); //TODO: Load only if used View::appendScript (Url::display ('/scripts/notification.js')); } |
