diff --git a/themes/smartpocket/js/smartpocket.js b/themes/smartpocket/js/smartpocket.js index 9ee1027c4..436adf205 100644 --- a/themes/smartpocket/js/smartpocket.js +++ b/themes/smartpocket/js/smartpocket.js @@ -20,20 +20,22 @@ return '
1 ? window.devicePixelRatio : 1 + , nb_thumbs = Math.max(2, Math.ceil($('.thumbnails').width() / (var_thumb_width/dpr+2*5))) + , width = Math.floor(1000000 / nb_thumbs) / 10000; + $('.thumbnails li').css('width', width+'%'); } diff --git a/themes/smartpocket/template/thumbnails.tpl b/themes/smartpocket/template/thumbnails.tpl index 36af6609f..f4e56e570 100644 --- a/themes/smartpocket/template/thumbnails.tpl +++ b/themes/smartpocket/template/thumbnails.tpl @@ -5,7 +5,7 @@ {combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'} {combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'} {footer_script} - var var_loop = {if $smartpocket.loop}true{else}false{/if}, var_autohide = {$smartpocket.autohide}, var_trad = "{'More Information'|@translate}"; + var var_loop = {if $smartpocket.loop}true{else}false{/if}, var_autohide = {$smartpocket.autohide}, var_trad = "{'More Information'|@translate}", var_thumb_width={$thumbnail_derivative_params->max_width()}; {/footer_script}