faster javascript on batch manager page with many pictures
git-svn-id: http://piwigo.org/svn/trunk@11754 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
5869dada4c
commit
d15d220256
1 changed files with 6 additions and 8 deletions
|
@ -428,14 +428,12 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
jQuery(window).load(function() {
|
||||
var max_dim = 20;
|
||||
var max_dim = 0;
|
||||
$(".thumbnails img").each(function () {
|
||||
if ($(this).height() > (max_dim-20))
|
||||
max_dim = $(this).height() + 20;
|
||||
if ($(this).width() > (max_dim-20))
|
||||
max_dim = $(this).width() + 20;
|
||||
$("ul.thumbnails span, ul.thumbnails label").css('width', max_dim+'px').css('height', max_dim+'px');
|
||||
max_dim = Math.max(max_dim, $(this).height(), $(this).width() );
|
||||
});
|
||||
max_dim += 20;
|
||||
$("ul.thumbnails span, ul.thumbnails label").css('width', max_dim+'px').css('height', max_dim+'px');
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
|
||||
|
|
Loading…
Reference in a new issue