From 63198af4992a825e4e1ccd6daba30c798be71d8a Mon Sep 17 00:00:00 2001 From: flop25 Date: Thu, 17 Jan 2013 18:38:54 +0000 Subject: bug:2820 & bug:2684 much better code : ability to pass max_requests to the js file like error_icon git-svn-id: http://piwigo.org/svn/trunk@20212 68402e56-0260-453c-a942-63ccdbb3a9ee --- themes/default/js/thumbnails.loader.js | 5 ++- themes/default/template/comment_list.tpl | 2 +- themes/default/template/mainpage_categories.tpl | 44 ++++--------------------- themes/default/template/thumbnails.tpl | 44 ++++--------------------- 4 files changed, 17 insertions(+), 78 deletions(-) (limited to 'themes/default') diff --git a/themes/default/js/thumbnails.loader.js b/themes/default/js/thumbnails.loader.js index b383b7276..3d54dd825 100644 --- a/themes/default/js/thumbnails.loader.js +++ b/themes/default/js/thumbnails.loader.js @@ -1,7 +1,10 @@ +if ( typeof( max_requests ) == "undefined" ) + max_requests = 3; + var thumbnails_queue = jQuery.manageAjax.create('queued', { queue: true, cacheResponse: false, - maxRequests: 3, + maxRequests: max_requests, preventDoubleRequests: false }); diff --git a/themes/default/template/comment_list.tpl b/themes/default/template/comment_list.tpl index f70a1a075..64b6ee2b5 100644 --- a/themes/default/template/comment_list.tpl +++ b/themes/default/template/comment_list.tpl @@ -9,7 +9,7 @@ } {/html_style}{/strip} {/if} -{footer_script}var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png"{/footer_script} +{footer_script}var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png";{/footer_script}