From 9d0357e889d603e769e9755fb07fb34334396b6e Mon Sep 17 00:00:00 2001 From: mistic100 Date: Tue, 23 Sep 2014 09:28:26 +0000 Subject: filter "dissociate" action + display bug of Selectize widget git-svn-id: http://piwigo.org/svn/trunk@29760 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/batch_manager_global.tpl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'admin/themes') diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl index fae8a286e..46262c0ff 100644 --- a/admin/themes/default/template/batch_manager_global.tpl +++ b/admin/themes/default/template/batch_manager_global.tpl @@ -43,16 +43,17 @@ jQuery(document).ready(function() { serverId: '{$CACHE_KEYS._hash}', rootUrl: '{$ROOT_URL}' }); + + var associated_categories = {$associated_categories|@json_encode}; categoriesCache.selectize(jQuery('[data-selectize=categories]'), { filter: function(categories, options) { if (this.name == 'dissociate') { var filtered = jQuery.grep(categories, function(cat) { - return !cat.dir; + return !!associated_categories[cat.id]; }); if (filtered.length > 0) { - jQuery('.albumDissociate').show(); options.default = filtered[0].id; } @@ -552,7 +553,9 @@ UL.thumbnails SPAN.wrap2 {ldelim} - + {if !empty($associated_categories)} + + {/if} {if !empty($associated_tags)} @@ -597,7 +600,7 @@ UL.thumbnails SPAN.wrap2 {ldelim} -