Index: /branches/2.4/admin/batch_manager.php
===================================================================
--- /branches/2.4/admin/batch_manager.php	(revision 17289)
+++ /branches/2.4/admin/batch_manager.php	(revision 17290)
@@ -51,5 +51,5 @@
 {
   // echo '<pre>'; print_r($_POST); echo '</pre>';
-
+  unset($_REQUEST['start']); // new photo set must reset the page
   $_SESSION['bulk_manager_filter'] = array();
 
@@ -336,8 +336,8 @@
 // and $page['nb_images'] next elements
 
-if (!isset($_GET['start'])
-    or !is_numeric($_GET['start'])
-    or $_GET['start'] < 0
-    or (isset($_GET['display']) and 'all' == $_GET['display']))
+if (!isset($_REQUEST['start'])
+    or !is_numeric($_REQUEST['start'])
+    or $_REQUEST['start'] < 0
+    or (isset($_REQUEST['display']) and 'all' == $_REQUEST['display']))
 {
   $page['start'] = 0;
@@ -345,5 +345,5 @@
 else
 {
-  $page['start'] = $_GET['start'];
+  $page['start'] = $_REQUEST['start'];
 }
 
Index: /branches/2.4/admin/batch_manager_global.php
===================================================================
--- /branches/2.4/admin/batch_manager_global.php	(revision 17289)
+++ /branches/2.4/admin/batch_manager_global.php	(revision 17290)
@@ -473,6 +473,7 @@
     'selection' => $collection,
     'all_elements' => $page['cat_elements_id'],
+    'START' => $page['start'],
     'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')),
-    'F_ACTION'=>$base_url.get_query_string_diff(array('cat')),
+    'F_ACTION'=>$base_url.get_query_string_diff(array('cat','start')),
    )
  );
@@ -733,5 +734,4 @@
   }
 
-
   $query = '
 SELECT id,path,representative_ext,file,filesize,level,name,width,height,rotation
@@ -767,4 +767,5 @@
   $result = pwg_query($query);
 
+  $thumb_params = ImageStdParams::get_by_type(IMG_THUMB);
   // template thumbnail initialization
   while ($row = pwg_db_fetch_assoc($result))
@@ -773,23 +774,21 @@
     $src_image = new SrcImage($row);
 
-    $title = render_element_name($row);
-    if ($title != get_name_from_file($row['file']))
-    {
-      $title.= ' ('.$row['file'].')';
+    $ttitle = render_element_name($row);
+    if ($ttitle != get_name_from_file($row['file']))
+    {
+      $ttitle.= ' ('.$row['file'].')';
     }
 
     $template->append(
-      'thumbnails',
+      'thumbnails', array_merge($row,
       array(
-        'ID' => $row['id'],
-        'TN_SRC' => DerivativeImage::url(IMG_THUMB, $src_image),
-        'FILE' => $row['file'],
-        'TITLE' => $title,
-        'LEVEL' => $row['level'],
+        'thumb' => new DerivativeImage($thumb_params, $src_image),
+        'TITLE' => $ttitle,
         'FILE_SRC' => DerivativeImage::url(IMG_LARGE, $src_image),
         'U_EDIT' => get_root_url().'admin.php?page=photo-'.$row['id'],
         )
-      );
-  }
+      ));
+  }
+  $template->assign('thumb_params', $thumb_params);
 }
 
Index: /branches/2.4/admin/element_set_ranks.php
===================================================================
--- /branches/2.4/admin/element_set_ranks.php	(revision 17289)
+++ /branches/2.4/admin/element_set_ranks.php	(revision 17290)
@@ -240,19 +240,19 @@
 $sort_fields = array(
   ''                    => '',
-  'file'                => l10n('file name, A &rarr; Z'),
-  'file DESC'           => l10n('file name, Z &rarr; A'),
-  'name'                => l10n('photo title, A &rarr; Z'),
-  'name DESC'           => l10n('photo title, Z &rarr; A'),
-  'date_creation DESC'  => l10n('date created, new &rarr; old'),
-  'date_creation'       => l10n('date created, old &rarr; new'),
-  'date_available DESC' => l10n('date posted, new &rarr; old'),
-  'date_available'      => l10n('date posted, old &rarr; new'),
-  'rating_score DESC'   => l10n('rating score, high &rarr; low'),
-  'rating_score'        => l10n('rating score, low &rarr; high'),
-  'hit DESC'            => l10n('visits, high &rarr; low'),
-  'hit'                 => l10n('visits, low &rarr; high'),
-  'id'                  => l10n('numeric identifier, 1 &rarr; 9'),
-  'id DESC'             => l10n('numeric identifier, 9 &rarr; 1'),
-  'rank'                => l10n('manual sort order'),
+  'file'                => l10n('File name, A &rarr; Z'),
+  'file DESC'           => l10n('File name, Z &rarr; A'),
+  'name'                => l10n('Photo title, A &rarr; Z'),
+  'name DESC'           => l10n('Photo title, Z &rarr; A'),
+  'date_creation DESC'  => l10n('Date created, new &rarr; old'),
+  'date_creation'       => l10n('Date created, old &rarr; new'),
+  'date_available DESC' => l10n('Date posted, new &rarr; old'),
+  'date_available'      => l10n('Date posted, old &rarr; new'),
+  'rating_score DESC'   => l10n('Rating score, high &rarr; low'),
+  'rating_score'        => l10n('Rating score, low &rarr; high'),
+  'hit DESC'            => l10n('Visits, high &rarr; low'),
+  'hit'                 => l10n('Visits, low &rarr; high'),
+  'id'                  => l10n('Numeric identifier, 1 &rarr; 9'),
+  'id DESC'             => l10n('Numeric identifier, 9 &rarr; 1'),
+  'rank'                => l10n('Manual sort order'),
   );
 
Index: /branches/2.4/admin/themes/clear/theme.css
===================================================================
--- /branches/2.4/admin/themes/clear/theme.css	(revision 17289)
+++ /branches/2.4/admin/themes/clear/theme.css	(revision 17290)
@@ -98,6 +98,4 @@
 UL.thumbnails span.wrap2:hover { background-color:#7CBA0F; color:#999; }
 UL.thumbnails span.wrap2 {
-	padding: 4px;
-	border-radius: 4px;
 	background-color:#ddd;
 }
@@ -112,5 +110,5 @@
 
 .content ul.categoryActions a img { margin-left: 10px; }
-ul.thumbnails input { border:3px double #666; color:#666; font-size:10px; margin:0; background-color:#bbb; text-align: center;}
+ul.thumbnails input { color:#666; font-size:10px; margin:0; background-color:#bbb; text-align: center;}
 INPUT.bigbutton:hover { background-color: #ddd;  color:#0cc; border: 0; }
 .throw  { font-size: 120%; line-height: 26px; padding-top: 10px; font-weight: bold; }
Index: /branches/2.4/admin/themes/default/template/batch_manager_global.tpl
===================================================================
--- /branches/2.4/admin/themes/default/template/batch_manager_global.tpl	(revision 17289)
+++ /branches/2.4/admin/themes/default/template/batch_manager_global.tpl	(revision 17290)
@@ -51,4 +51,5 @@
     });
   }
+	$('ul.thumbnails').enableShiftClick();
 });
 {/literal}{/footer_script}
@@ -482,15 +483,5 @@
 });
 
-jQuery(window).load(function() {
-	var max_w=0, max_h=0;
-	$(".thumbnails img").each(function () {
-		max_w = Math.max(max_w, $(this).width() );
-		max_h = Math.max(max_h, $(this).height() );
-	});
-	max_w += 10;
-	max_h += 35;
-	$("ul.thumbnails span, ul.thumbnails label").css('width', max_w+'px').css('height', max_h+'px');
-	$('ul.thumbnails').enableShiftClick();
-});
+
 {/literal}{/footer_script}
 
@@ -500,4 +491,5 @@
 
   <form action="{$F_ACTION}" method="post">
+	<input type="hidden" name="start" value="{$START}">
 
   <fieldset>
@@ -511,5 +503,5 @@
         <select name="filter_prefilter">
           {foreach from=$prefilters item=prefilter}
-          <option value="{$prefilter.ID}" {if $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option>
+          <option value="{$prefilter.ID}" {if isset($filter.prefilter) && $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option>
           {/foreach}
         </select>
@@ -529,7 +521,7 @@
         {'Tags'|@translate}
         <select id="tagsFilter" name="filter_tags">
-          {foreach from=$filter_tags item=tag}
+          {if isset($filter_tags)}{foreach from=$filter_tags item=tag}
           <option value="{$tag.id}">{$tag.name}</option>
-          {/foreach}
+          {/foreach}{/if}
         </select>
         <label><span><input type="radio" name="tag_mode" value="AND" {if !isset($filter.tag_mode) or $filter.tag_mode eq 'AND'}checked="checked"{/if}> {'All tags'|@translate}</span></label>
@@ -547,5 +539,5 @@
     </ul>
 
-    <p class="actionButtons" style="">
+    <p class="actionButtons">
       <select id="addFilter">
         <option value="-1">{'Add a filter'|@translate}</option>
@@ -587,30 +579,32 @@
   </p>
 
-    <ul class="thumbnails">
-			{foreach from=$thumbnails item=thumbnail}
-				{if in_array($thumbnail.ID, $selection)}
-					{assign var='isSelected' value=true}
-				{else}
-					{assign var='isSelected' value=false}
-				{/if}
-			<li>
-				<span class="wrap1">
-					<label>
-						<span class="wrap2{if $isSelected} thumbSelected{/if}">
-						<div class="actions"><a href="{$thumbnail.FILE_SRC}" class="preview-box">{'Zoom'|@translate}</a> &middot; <a href="{$thumbnail.U_EDIT}" target="_blank">{'Edit'|@translate}</a></div>
-							{if $thumbnail.LEVEL > 0}
-							<em class="levelIndicatorB">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em>
-							<em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em>
-							{/if}
-							<span>
-								<img src="{$thumbnail.TN_SRC}" alt="{$thumbnail.FILE}" title="{$thumbnail.TITLE|@escape:'html'}" class="thumbnail">
-							</span>
-						</span>
-						<input type="checkbox" name="selection[]" value="{$thumbnail.ID}" {if $isSelected}checked="checked"{/if}>
-					</label>
-				</span>
-			</li>
-      {/foreach}
-    </ul>
+	<ul class="thumbnails">
+		{html_style}
+UL.thumbnails SPAN.wrap2{ldelim}
+  width: {$thumb_params->max_width()+2}px;
+}
+UL.thumbnails SPAN.wrap2 {ldelim}
+  height: {$thumb_params->max_height()+25}px;
+}
+		{/html_style}
+		{foreach from=$thumbnails item=thumbnail}
+		{assign var='isSelected' value=$thumbnail.id|@in_array:$selection}
+		<li>
+			<span class="wrap1">
+				<label>
+					<input type="checkbox" name="selection[]" value="{$thumbnail.id}" {if $isSelected}checked="checked"{/if}>
+					<span class="wrap2{if $isSelected} thumbSelected{/if}">
+					<div class="actions"><a href="{$thumbnail.FILE_SRC}" class="preview-box">{'Zoom'|@translate}</a> &middot; <a href="{$thumbnail.U_EDIT}" target="_blank">{'Edit'|@translate}</a></div>
+						{if $thumbnail.level > 0}
+						<em class="levelIndicatorB">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.level))}</em>
+						<em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.level))}</em>
+						{/if}
+						<img src="{$thumbnail.thumb->get_url()}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE|@escape:'html'}" {$thumbnail.thumb->get_size_htm()}>
+					</span>
+				</label>
+			</span>
+		</li>
+		{/foreach}
+	</ul>
 
   {if !empty($navbar) }
@@ -714,5 +708,5 @@
     <!-- del_tags -->
     <div id="action_del_tags" class="bulkAction">
-{$DEL_TAG_SELECTION}
+{if !empty($DEL_TAG_SELECTION)}{$DEL_TAG_SELECTION}{/if}
     </div>
 
Index: /branches/2.4/admin/themes/default/theme.css
===================================================================
--- /branches/2.4/admin/themes/default/theme.css	(revision 17289)
+++ /branches/2.4/admin/themes/default/theme.css	(revision 17290)
@@ -43,10 +43,11 @@
   background-color: #333;
   color: #666;
-  -moz-border-radius: 5px;
+  border-radius: 5px;
   display: block;
-  width: 104px;
-  height: 104px;
+  width: 120px;
+  height: 120px;
   cursor: move;
-  margin: 10px;
+  margin: 4px;
+	overflow: hidden;
 }
 .clipwrapper {
@@ -59,6 +60,5 @@
   position:absolute;
 }
-UL.thumbnails li.rank-of-image input {
-}
+
 UL.thumbnails SPAN.wrap1 {
   margin: 5px;
@@ -72,23 +72,26 @@
   display: table-cell;		/* block prevents vertical-align here */
   vertical-align: middle;	/* Ok with Opera and Geko not IE6 */
-}
-UL.thumbnails LABEL { display: block; border-bottom: none; }
+	border-radius: 4px;
+}
+UL.thumbnails LABEL {
+	position: relative;
+	display: block; 
+	border-bottom: none;
+}
+
 UL.thumbnails IMG {
-  margin-bottom: -4px;  /* why ??? something wrong with Geko and Opera ignored by IE6*/
-}
-UL.thumbnails LABEL { position: relative; }
+	vertical-align: middle;
+	margin-top: 12px;
+}
+
 UL.thumbnails INPUT {
-  position: relative;	/* <= Opera can handle relative here */
-  top: -20px;
-}
-:root UL.thumbnails INPUT { /* hide from Opera */
-  position: absolute;	/* <= Opera hide 1 checkbox over 2 !!! */
+  position: absolute;
   left: 2px; top: 2px;
 }
 UL.thumbnails .levelIndicatorB {
-display:block; position:absolute; z-index:100;padding:0px 0 0 14px; color:black; font-weight:bold; font-size:120%;
+display:block; position:absolute; z-index:100; padding:7px 0 0 2px; color:black; font-weight:bold; font-size:120%;
 }
 UL.thumbnails .levelIndicatorF {
-display:block; position:absolute; z-index:101;padding:1px 0 0 15px; color:white; font-weight:bold; font-size:120%;
+display:block; position:absolute; z-index:101; padding:8px 0 0 3px; color:white; font-weight:bold; font-size:120%;
 }
 
@@ -298,5 +301,5 @@
 font-weight: normal;
 font-style:italic;
-padding: 8px 0 0 10px;
+padding: 2px 0 0 10px;
 margin: 0;
 float:left;
@@ -307,5 +310,5 @@
 #pwgHead A:hover {color:#fff;border-bottom:1px solid #fff}
 
-#headActions {float:right; height:46px; line-height:46px; margin-right:10px;}
+#headActions {float:right; height:36px; line-height:36px; margin-right:10px;}
 
 A {
@@ -590,5 +593,5 @@
 #pwgHead {
   background-color:#464646;
-  height:46px;
+	height: 36px;
 }
 
@@ -604,9 +607,10 @@
   bottom:0;
   width:100%;
-  height:46px;
-  background: url(images/logo.png) no-repeat 7px 8px;
-  background-color:#464646;
+	height: 34px;
+	line-height: 34px;
+	background-repeat: no-repeat;
+	background-position: 7px 2px;
+	background-color:#464646;
   color:#aaa;
-  line-height:46px;
 }
 
@@ -768,15 +772,4 @@
 #thePopuphelpPage #pwgHead {display:none}
 #thePopuphelpPage #footer  {display:none}
-
-/* Set some sizes according to your maximum thumbnail width and height */
-UL.thumbnails SPAN,
-UL.thumbnails SPAN.wrap2 A,
-UL.thumbnails LABEL {
-  width: 140px;      /* max thumbnail width + 2px */
-}
-UL.thumbnails SPAN.wrap2 {
-  height: 140px;    /* max thumbnail height + 2px */
-}
-
 
 .themeBox {display:inline-table; text-align:center; height:192px; background-color:#eee; margin:5px; -moz-border-radius:5px; overflow:hidden; }
@@ -979,5 +972,5 @@
 #batchManagerGlobal ul.thumbnails div.actions a:hover {border-color:#fff;}
 #batchManagerGlobal ul.thumbnails span.wrap1:hover div.actions {display:block;}
-#batchManagerGlobal #selectedMessage {padding:5px; -moz-border-radius:5px;-webkit-border-radius:5px;}
+#batchManagerGlobal #selectedMessage {padding:5px; border-radius:5px;}
 #batchManagerGlobal #selectSet a {border-bottom:1px dotted;}
 #batchManagerGlobal #applyOnDetails {font-style:italic;}
Index: /branches/2.4/admin/themes/roma/theme.css
===================================================================
--- /branches/2.4/admin/themes/roma/theme.css	(revision 17289)
+++ /branches/2.4/admin/themes/roma/theme.css	(revision 17290)
@@ -65,6 +65,4 @@
 UL.thumbnails span.wrap2:hover { background-color#7CBA0F; color:#666; }
 UL.thumbnails span.wrap2 {
-	padding: 4px;
-	border-radius: 4px;
 	background-color:#333;
 }
@@ -81,5 +79,5 @@
 .tagSelected LABEL {color:#000;}
 .content ul.categoryActions a img { margin-left: 10px; }
-ul.thumbnails input { border:3px double #999; color:#999; font-size:10px; margin:0; background-color:#444; text-align: center;}
+ul.thumbnails input { color:#999; font-size:10px; margin:0; background-color:#444; text-align: center;}
 INPUT[type="submit"]:hover , INPUT[type="reset"]:hover  { cursor: pointer; }
 INPUT.bigbutton:hover { background-color: #222;  color:#f33; border: 0; }
