Index: /trunk/admin/themes/default/js/batchManagerGlobal.js
===================================================================
--- /trunk/admin/themes/default/js/batchManagerGlobal.js	(revision 28820)
+++ /trunk/admin/themes/default/js/batchManagerGlobal.js	(revision 28821)
@@ -1,2 +1,50 @@
+
+/* ********** Filters*/
+function filter_enable(filter) {
+	/* show the filter*/
+	$("#"+filter).show();
+
+	/* check the checkbox to declare we use this filter */
+	$("input[type=checkbox][name="+filter+"_use]").prop("checked", true);
+
+	/* forbid to select this filter in the addFilter list */
+	$("#addFilter").children("option[value="+filter+"]").attr("disabled", "disabled");
+}
+
+function filter_disable(filter) {
+	/* hide the filter line */
+	$("#"+filter).hide();
+
+	/* uncheck the checkbox to declare we do not use this filter */
+	$("input[name="+filter+"_use]").prop("checked", false);
+
+	/* give the possibility to show it again */
+	$("#addFilter").children("option[value="+filter+"]").removeAttr("disabled");
+}
+
+$(".removeFilter").click(function () {
+	var filter = $(this).parent('li').attr("id");
+	filter_disable(filter);
+
+	return false;
+});
+
+$("#addFilter").change(function () {
+	var filter = $(this).prop("value");
+	filter_enable(filter);
+	$(this).prop("value", -1);
+});
+
+$("#removeFilters").click(function() {
+	$("#filterList li").each(function() {
+		var filter = $(this).attr("id");
+		filter_disable(filter);
+	});
+	return false;
+});
+
+
+
+/* ********** Thumbs */
 
 /* Shift-click: select all photos between the click and the shift+click */
@@ -44,4 +92,10 @@
 });
 
+jQuery("a.preview-box").colorbox();
+
+
+
+/* ********** Actions*/
+
 jQuery('[data-datepicker]').pwgDatepicker({
 	showTimepicker: true,
@@ -49,3 +103,30 @@
 });
 
-jQuery("a.preview-box").colorbox();
+jQuery('[data-add-album]').pwgAddAlbum({ cache: categoriesCache });
+
+$("input[name=remove_author]").click(function () {
+	if ($(this).is(':checked')) {
+		$("input[name=author]").hide();
+	}
+	else {
+		$("input[name=author]").show();
+	}
+});
+
+$("input[name=remove_title]").click(function () {
+	if ($(this).is(':checked')) {
+		$("input[name=title]").hide();
+	}
+	else {
+		$("input[name=title]").show();
+	}
+});
+
+$("input[name=remove_date_creation]").click(function () {
+	if ($(this).is(':checked')) {
+		$("#set_date_creation").hide();
+	}
+	else {
+		$("#set_date_creation").show();
+	}
+});
Index: /trunk/admin/themes/default/template/batch_manager_global.tpl
===================================================================
--- /trunk/admin/themes/default/template/batch_manager_global.tpl	(revision 28820)
+++ /trunk/admin/themes/default/template/batch_manager_global.tpl	(revision 28821)
@@ -1,5 +1,5 @@
 {include file='include/datepicker.inc.tpl' load_mode='async'}
 {include file='include/colorbox.inc.tpl' load_mode='async'}
-{include file='include/add_album.inc.tpl'}
+{include file='include/add_album.inc.tpl' load_mode='async'}
 
 {combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
@@ -36,12 +36,12 @@
     'Add': '{'Create'|translate}'
   }});
-  
+
   {* <!-- CATEGORIES --> *}
-  var categoriesCache = new CategoriesCache({
+  window.categoriesCache = new CategoriesCache({
     serverKey: '{$CACHE_KEYS.categories}',
     serverId: '{$CACHE_KEYS._hash}',
     rootUrl: '{$ROOT_URL}'
   });
-  
+
   categoriesCache.selectize(jQuery('[data-selectize=categories]'), {
     filter: function(categories, options) {
@@ -50,10 +50,10 @@
           return !cat.dir;
         });
-        
+
         if (filtered.length > 0) {
           jQuery('.albumDissociate').show();
           options.default = filtered[0].id;
         }
-        
+
         return filtered;
       }
@@ -63,6 +63,5 @@
     }
   });
-  
-  jQuery('[data-add-album]').pwgAddAlbum({ cache: categoriesCache });
+
 });
 
@@ -76,5 +75,5 @@
 	done: 0,
 	total: 0,
-	
+
 	finished: function() {ldelim}
 		return derivatives.done == derivatives.total && derivatives.elements && derivatives.elements.length==0;
@@ -86,10 +85,5 @@
 var selectedMessage_all = "{'All %d photos are selected'|@translate}";
 
-var width_str = '{'Width'|@translate}';
-var height_str = '{'Height'|@translate}';
-var max_width_str = '{'Maximum width'|@translate}';
-var max_height_str = '{'Maximum height'|@translate}';
 {literal}
-
 function progress(success) {
   jQuery('#progressBar').progressBar(derivatives.done, {
@@ -193,8 +187,8 @@
 
     if ($(checkbox).is(':checked')) {
-      $(wrap2).addClass("thumbSelected"); 
+      $(wrap2).addClass("thumbSelected");
     }
     else {
-      $(wrap2).removeClass('thumbSelected'); 
+      $(wrap2).removeClass('thumbSelected');
     }
 
@@ -215,5 +209,5 @@
 
       $(checkbox).prop('checked', true);
-      $(wrap2).addClass("thumbSelected"); 
+      $(wrap2).addClass("thumbSelected");
     });
   }
@@ -227,5 +221,5 @@
 
       $(checkbox).prop('checked', false);
-      $(wrap2).removeClass("thumbSelected"); 
+      $(wrap2).removeClass("thumbSelected");
     });
     checkPermitAction();
@@ -243,8 +237,8 @@
 
       if ($(checkbox).is(':checked')) {
-        $(wrap2).addClass("thumbSelected"); 
+        $(wrap2).addClass("thumbSelected");
       }
       else {
-        $(wrap2).removeClass('thumbSelected'); 
+        $(wrap2).removeClass('thumbSelected');
       }
     });
@@ -260,73 +254,4 @@
   });
 
-  $("input[name=remove_author]").click(function () {
-    if ($(this).is(':checked')) {
-      $("input[name=author]").hide();
-    }
-    else {
-      $("input[name=author]").show();
-    }
-  });
-
-  $("input[name=remove_title]").click(function () {
-    if ($(this).is(':checked')) {
-      $("input[name=title]").hide();
-    }
-    else {
-      $("input[name=title]").show();
-    }
-  });
-
-  $("input[name=remove_date_creation]").click(function () {
-    if ($(this).is(':checked')) {
-      $("#set_date_creation").hide();
-    }
-    else {
-      $("#set_date_creation").show();
-    }
-  });
-
-  $(".removeFilter").click(function () {
-    var filter = $(this).parent('li').attr("id");
-    filter_disable(filter);
-
-    return false;
-  });
-
-  function filter_enable(filter) {
-    /* show the filter*/
-    $("#"+filter).show();
-
-    /* check the checkbox to declare we use this filter */
-    $("input[type=checkbox][name="+filter+"_use]").prop("checked", true);
-
-    /* forbid to select this filter in the addFilter list */
-    $("#addFilter").children("option[value="+filter+"]").attr("disabled", "disabled");
-  }
-
-  $("#addFilter").change(function () {
-    var filter = $(this).prop("value");
-    filter_enable(filter);
-    $(this).prop("value", -1);
-  });
-
-  function filter_disable(filter) {
-    /* hide the filter line */
-    $("#"+filter).hide();
-
-    /* uncheck the checkbox to declare we do not use this filter */
-    $("input[name="+filter+"_use]").prop("checked", false);
-
-    /* give the possibility to show it again */
-    $("#addFilter").children("option[value="+filter+"]").removeAttr("disabled");
-  }
-
-  $("#removeFilters").click(function() {
-    $("#filterList li").each(function() {
-      var filter = $(this).attr("id");
-      filter_disable(filter);
-    });
-    return false;
-  });
 
   jQuery('#applyAction').click(function() {
@@ -338,5 +263,5 @@
 				return confirm(are_you_sure);
 		}
-		
+
 		if (action != 'generate_derivatives'
 			|| derivatives.finished() )
@@ -347,6 +272,6 @@
 		jQuery('.bulkAction').hide();
 
-		var queuedManager = jQuery.manageAjax.create('queued', { 
-			queue: true,  
+		var queuedManager = jQuery.manageAjax.create('queued', {
+			queue: true,
 			cacheResponse: false,
 			maxRequests: 1
@@ -366,5 +291,5 @@
 		jQuery('select[name="selectAction"]').hide();
 		jQuery('#regenerationMsg').show();
-		
+
 		progress();
 		getDerivativeUrls();
@@ -393,6 +318,6 @@
 				for (var i=0; i < data.result.urls.length; i++) {
 					jQuery.manageAjax.add("queued", {
-						type: 'GET', 
-						url: data.result.urls[i] + "&ajaxload=true", 
+						type: 'GET',
+						url: data.result.urls[i] + "&ajaxload=true",
 						dataType: 'json',
 						success: ( function(data) { derivatives.done++; progress(true) }),
@@ -407,5 +332,5 @@
 
   checkPermitAction();
-  
+
   /* dimensions sliders */
   /**
@@ -418,5 +343,5 @@
       }
     }
-  
+
     return 0;
   }
@@ -518,5 +443,5 @@
     }
   });
-  
+
   $("a.dimensions-choice").click(function() {ldelim}
     var type = jQuery(this).data("type");
@@ -528,5 +453,5 @@
     );
 
-    $("#filter_dimension_"+type+"_slider").slider("values", 1, 
+    $("#filter_dimension_"+type+"_slider").slider("values", 1,
       getSliderKeyFromValue(max, dimension_values[type])
     );
@@ -557,5 +482,5 @@
         </select>
       </li>
-      
+
       <li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}>
         <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
@@ -566,5 +491,5 @@
         <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label>
       </li>
-      
+
       <li id="filter_tags" {if !isset($filter.tags)}style="display:none"{/if}>
         <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
@@ -577,5 +502,5 @@
         <label><span><input type="radio" name="tag_mode" value="OR" {if isset($filter.tag_mode) and $filter.tag_mode eq 'OR'}checked="checked"{/if}> {'Any tag'|@translate}</span></label>
       </li>
-      
+
       <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}>
         <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
@@ -587,19 +512,19 @@
         <label><input type="checkbox" name="filter_level_include_lower" {if isset($filter.level_include_lower)}checked="checked"{/if}> {'include photos with lower privacy level'|@translate}</label>
       </li>
-      
+
       <li id="filter_dimension" {if !isset($filter.dimension)}style="display:none"{/if}>
         <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
         <input type="checkbox" name="filter_dimension_use" class="useFilterCheckbox" {if isset($filter.dimension)}checked="checked"{/if}>
         {'Dimensions'|@translate}
-        
+
         <blockquote>
           {'Width'|@translate} <span id="filter_dimension_width_info">{'between %d and %d pixels'|@translate:$dimensions.selected.min_width:$dimensions.selected.max_width}</span>
           | <a class="dimensions-choice" data-type="width" data-min="{$dimensions.bounds.min_width}" data-max="{$dimensions.bounds.max_width}">{'Reset'|@translate}</a>
           <div id="filter_dimension_width_slider"></div>
-          
+
           {'Height'|@translate} <span id="filter_dimension_height_info">{'between %d and %d pixels'|@translate:$dimensions.selected.min_height:$dimensions.selected.max_height}</span>
           | <a class="dimensions-choice" data-type="height" data-min="{$dimensions.bounds.min_height}" data-max="{$dimensions.bounds.max_height}">{'Reset'|@translate}</a>
           <div id="filter_dimension_height_slider"></div>
-          
+
           {'Ratio'|@translate} ({'Width'|@translate}/{'Height'|@translate}) <span id="filter_dimension_ratio_info">{'between %.2f and %.2f'|@translate:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span>
 {if isset($dimensions.ratio_portrait)}
@@ -618,5 +543,5 @@
           <div id="filter_dimension_ratio_slider"></div>
         </blockquote>
-        
+
         <input type="hidden" name="filter_dimension_min_width" value="{$dimensions.selected.min_width}">
         <input type="hidden" name="filter_dimension_max_width" value="{$dimensions.selected.max_width}">
@@ -815,5 +740,5 @@
     {assign var='authorDefaultValue' value='Type here the author name'|@translate}
 <input type="text" class="large" name="author" value="{$authorDefaultValue}" onfocus="this.value=(this.value=='{$authorDefaultValue|@escape:javascript}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$authorDefaultValue|@escape:javascript}' : this.value;">
-    </div>    
+    </div>
 
     <!-- title -->
@@ -882,5 +807,5 @@
 			{/footer_script}
 		</div>
-		
+
     <!-- progress bar -->
     <div id="regenerationMsg" class="bulkAction" style="display:none">
Index: /trunk/admin/themes/default/template/header.tpl
===================================================================
--- /trunk/admin/themes/default/template/header.tpl	(revision 28820)
+++ /trunk/admin/themes/default/template/header.tpl	(revision 28821)
@@ -11,4 +11,5 @@
 
 {strip}
+{combine_css path="admin/themes/default/fontello/css/fontello.css" order=-10}
 {foreach from=$themes item=theme}
   {if $theme.load_css}
@@ -19,6 +20,4 @@
   {/if}
 {/foreach}
-
-{combine_css path="admin/themes/default/fontello/css/fontello.css"}
 
 {combine_script id='jquery' path='themes/default/js/jquery.min.js'}
