aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2011-07-15 19:01:04 +0000
committerrvelices <rv-github@modusoptimus.com>2011-07-15 19:01:04 +0000
commitd15d220256f249ad4af1a0bf7d4b95e9e5edd8b1 (patch)
treea16441d51bb2e18e05063716e3745486802477c0 /admin/themes/default
parent5869dada4c169f167205a2d23f274e976d5e323e (diff)
faster javascript on batch manager page with many pictures
git-svn-id: http://piwigo.org/svn/trunk@11754 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes/default')
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl14
1 files changed, 6 insertions, 8 deletions
diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl
index 3f283e70e..f1e722e35 100644
--- a/admin/themes/default/template/batch_manager_global.tpl
+++ b/admin/themes/default/template/batch_manager_global.tpl
@@ -428,14 +428,12 @@ $(document).ready(function() {
});
jQuery(window).load(function() {
- var max_dim = 20;
- $(".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');
- });
+ var max_dim = 0;
+ $(".thumbnails img").each(function () {
+ 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}