From a7507e3685646666026e3b9c7827e0f010eb5a1d Mon Sep 17 00:00:00 2001 From: Jean Baptiste Favre Date: Sun, 18 Dec 2011 16:19:32 +0100 Subject: [PATCH] Fix for #3463. Make InfiniteScroll plugin use config['plugins']['server'] if defined to build ajax-loader.gif URL --- plugins/InfiniteScroll/InfiniteScrollPlugin.php | 1 + plugins/InfiniteScroll/infinitescroll.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/InfiniteScroll/InfiniteScrollPlugin.php b/plugins/InfiniteScroll/InfiniteScrollPlugin.php index 376d88abb0..e4888c4e56 100644 --- a/plugins/InfiniteScroll/InfiniteScrollPlugin.php +++ b/plugins/InfiniteScroll/InfiniteScrollPlugin.php @@ -41,6 +41,7 @@ class InfiniteScrollPlugin extends Plugin function onEndShowScripts($action) { $action->inlineScript('var infinite_scroll_on_next_only = ' . ($this->on_next_only?'true':'false') . ';'); + $action->inlineScript('var ajax_loader_url = "' . ($this->path('ajax-loader.gif')) . '";'); $action->script($this->path('jquery.infinitescroll.js')); $action->script($this->path('infinitescroll.js')); } diff --git a/plugins/InfiniteScroll/infinitescroll.js b/plugins/InfiniteScroll/infinitescroll.js index f28c90a808..6fcf098dfe 100644 --- a/plugins/InfiniteScroll/infinitescroll.js +++ b/plugins/InfiniteScroll/infinitescroll.js @@ -9,7 +9,7 @@ jQuery(document).ready(function($){ 'body#showfavorites li.nav_next a,'+ 'body#showgroup li.nav_next a,'+ 'body#favorited li.nav_next a', - loadingImg : $('address .url')[0].href+'plugins/InfiniteScroll/ajax-loader.gif', + loadingImg : ajax_loader_url, text : "Loading the next set of posts...", donetext : "Congratulations, you\'ve reached the end of the Internet.", navSelector : "#pagination",