aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2016-05-02 16:09:50 +0200
committerplegall <plg@piwigo.org>2016-05-02 16:09:50 +0200
commitd1cb1f86a8513f0f5690d4d61d3e52ffe9dbbf21 (patch)
tree70d0ac28daa0bf541b29dc01cb45dbfe536baa7b /admin
parent89e0eed10a593f082640b60f1bcf6c97033919ea (diff)
bug #466 fixed, new album listed when moving photos
In the batch manager, merge action blocks "associate" and "move" because they follow the same pattern (list of albums + create new).
Diffstat (limited to 'admin')
-rw-r--r--admin/batch_manager_global.php5
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl18
2 files changed, 10 insertions, 13 deletions
diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php
index ba3944abe..1d5cb747d 100644
--- a/admin/batch_manager_global.php
+++ b/admin/batch_manager_global.php
@@ -44,7 +44,6 @@ trigger_notify('loc_begin_element_set_global');
check_input_parameter('del_tags', $_POST, true, PATTERN_ID);
check_input_parameter('associate', $_POST, false, PATTERN_ID);
-check_input_parameter('move', $_POST, false, PATTERN_ID);
check_input_parameter('dissociate', $_POST, false, PATTERN_ID);
// +-----------------------------------------------------------------------+
@@ -173,7 +172,7 @@ DELETE
else if ('move' == $action)
{
- move_images_to_categories($collection, array($_POST['move']));
+ move_images_to_categories($collection, array($_POST['associate']));
$_SESSION['page_infos'] = array(
l10n('Information data registered in database')
@@ -187,7 +186,7 @@ DELETE
else if ('no_virtual_album' == $page['prefilter'])
{
- $category_info = get_cat_info($_POST['move']);
+ $category_info = get_cat_info($_POST['associate']);
if (empty($category_info['dir']))
{
$redirect = true;
diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl
index c3be514b4..d8b183717 100644
--- a/admin/themes/default/template/batch_manager_global.tpl
+++ b/admin/themes/default/template/batch_manager_global.tpl
@@ -134,7 +134,13 @@ $(document).ready(function() {
$("select[name=selectAction]").change(function () {
$("[id^=action_]").hide();
- $("#action_"+$(this).prop("value")).show();
+
+ var action = $(this).prop("value");
+ if (action == 'move') {
+ action = 'associate';
+ }
+
+ $("#action_"+action).show();
if ($(this).val() != -1) {
$("#applyActionBlock").show();
@@ -590,21 +596,13 @@ UL.thumbnails SPAN.wrap2 {ldelim}
<p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p>
</div>
- <!-- associate -->
+ <!-- associate -->{* also used for "move" action *}
<div id="action_associate" class="bulkAction">
<select data-selectize="categories" data-default="first" name="associate" style="width:600px"></select>
<br>{'... or '|@translate}
<a href="#" data-add-album="associate" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a>
</div>
- <!-- move -->
- <div id="action_move" class="bulkAction">
- <select data-selectize="categories" data-default="first" name="move" style="width:600px"></select>
- <br>{'... or '|@translate}
- <a href="#" data-add-album="move" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a>
- </div>
-
-
<!-- dissociate -->
<div id="action_dissociate" class="bulkAction">
<select data-selectize="categories" placeholder="{'Type in a search term'|translate}"