diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php index 7eb833898..a527330e7 100644 --- a/admin/batch_manager_global.php +++ b/admin/batch_manager_global.php @@ -528,6 +528,7 @@ SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE.' ;'; display_select_cat_wrapper($query, array(), 'associate_options', true); +display_select_cat_wrapper($query, array(), 'category_parent_options'); // in the filter box, which category to select by default $selected_category = array(); diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl index d278bb7f4..856633421 100644 --- a/admin/themes/default/template/batch_manager_global.tpl +++ b/admin/themes/default/template/batch_manager_global.tpl @@ -1,6 +1,7 @@ {include file='include/tag_selection.inc.tpl'} {include file='include/datepicker.inc.tpl'} {include file='include/colorbox.inc.tpl'} +{include file='include/add_album.inc.tpl'} {footer_script}{literal} pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set"); @@ -644,9 +645,10 @@ jQuery(window).load(function() {
- {html_options options=$associate_options } +
{'... or '|@translate}{'create a new album'|@translate}
diff --git a/admin/themes/default/template/include/add_album.inc.tpl b/admin/themes/default/template/include/add_album.inc.tpl new file mode 100644 index 000000000..82178ab11 --- /dev/null +++ b/admin/themes/default/template/include/add_album.inc.tpl @@ -0,0 +1,102 @@ +{footer_script}{literal} +jQuery(document).ready(function(){ + function fillCategoryListbox(selectId, selectedValue) { + jQuery.getJSON( + "ws.php?format=json&method=pwg.categories.getList", + { + recursive: true, + fullname: true, + format: "json", + }, + function(data) { + jQuery.each( + data.result.categories, + function(i,category) { + var selected = null; + if (category.id == selectedValue) { + selected = "selected"; + } + + jQuery("