GThumb+

{'Configuration'|@translate}
{'Thumbnails max height'|@translate} :     px
{'Margin between thumbnails'|@translate} :     px
{'Number of photos per page'|@translate} :   
{'Double the size of the first thumbnail'|@translate} :     
{'Cache the big thumbnails (recommended)'|@translate} :     
{'Scale thumbnails'|@translate} :     
{'Show thumbnails caption'|@translate} :     

{'Pre-cache thumbnails'|@translate}

Errors 0
Loaded 0
Remaining 0

{html_head}{literal} {/literal}{/html_head} {combine_script id='iloader' load='footer' path='plugins/GThumb/js/image.loader.js'} {footer_script require='jquery.ui.effect-slide'}{literal} jQuery('input[name^="cache"]').tipTip({'delay' : 0, 'fadeIn' : 200, 'fadeOut' : 200}); var loader = new ImageLoader( {onChanged: loaderChanged, maxRequests:1 } ) , pending_next_page = null , last_image_show_time = 0 , allDoneDfd, urlDfd; function start() { allDoneDfd = jQuery.Deferred(); urlDfd = jQuery.Deferred(); allDoneDfd.always( function() { jQuery("#startLink").attr('disabled', false).css("opacity", 1); jQuery("#pauseLink,#stopLink").attr('disabled', true).css("opacity", 0.5); } ); urlDfd.always( function() { if (loader.remaining()==0) allDoneDfd.resolve(); } ); jQuery('#generate_cache').show(); jQuery("#startLink").attr('disabled', true).css("opacity", 0.5); jQuery("#pauseLink,#stopLink").attr('disabled', false).css("opacity", 1); loader.pause(false); updateStats(); getUrls(0); } function pause() { loader.pause( !loader.pause() ); } function stop() { loader.clear(); urlDfd.resolve(); } function getUrls(page_token) { data = {prev_page: page_token, max_urls: 500, types: []}; jQuery.post( '{/literal}{$ROOT_URL}{literal}admin.php?page=plugin-GThumb&getMissingDerivative=', data, wsData, "json").fail( wsError ); } function wsData(data) { loader.add( data.urls ); if (data.next_page) { if (loader.pause() || loader.remaining() > 100) { pending_next_page = data.next_page; } else { getUrls(data.next_page); } } } function wsError() { urlDfd.reject(); } function updateStats() { jQuery("#loaded").text( loader.loaded ); jQuery("#errors").text( loader.errors ); jQuery("#remaining").text( loader.remaining() ); } function loaderChanged(type, img) { updateStats(); if (img) { if (type==="load") { var now = jQuery.now(); if (now - last_image_show_time > 3000) { last_image_show_time = now; var h=img.height, url=img.src; jQuery("#feedbackWrap").hide("slide", {direction:'down'}, function() { last_image_show_time = jQuery.now(); if (h > 300 ) jQuery("#feedbackImg").attr("height", 300); else jQuery("#feedbackImg").removeAttr("height"); jQuery("#feedbackImg").attr("src", url); jQuery("#feedbackWrap").show("slide", {direction:'up'} ); } ); } } else { jQuery("#errorList").prepend( ''+img.src+'' + "
"); } } if (pending_next_page && 100 > loader.remaining() ) { getUrls(pending_next_page); pending_next_page = null; } else if (loader.remaining() == 0 && (urlDfd.isResolved() || urlDfd.isRejected())) { allDoneDfd.resolve(); } } {/literal}{/footer_script}