Skip to content

Commit

Permalink
fixes #1636 with whole_set selected, provide the list of image_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
plegall committed Oct 9, 2023
1 parent cc99c0f commit 27e81f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion admin/batch_manager_global.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}
else if (isset($_POST['setSelected']))
{
$collection = $page['cat_elements_id'];
$collection = explode(',', $_POST['whole_set']);
}
else if (isset($_POST['selection']))
{
Expand Down
14 changes: 9 additions & 5 deletions admin/themes/default/template/batch_manager_global.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ $(document).ready(function() {
});

$(".wrap1 label").click(function (event) {
$("input[name=setSelected]").prop('checked', false);
$("input[name=setSelected]").prop('checked', false).trigger('change');
var li = $(this).closest("li");
var checkbox = $(this).children("input[type=checkbox]");
Expand All @@ -181,7 +181,7 @@ $(document).ready(function() {
});

$("#selectAll").click(function () {
$("input[name=setSelected]").prop('checked', false);
$("input[name=setSelected]").prop('checked', false).trigger('change');
selectPageThumbnails();
checkPermitAction();
return false;
Expand All @@ -197,7 +197,7 @@ $(document).ready(function() {
}

$("#selectNone").click(function () {
$("input[name=setSelected]").prop('checked', false);
$("input[name=setSelected]").prop('checked', false).trigger('change');
$(".thumbnails label").each(function() {
var checkbox = $(this).children("input[type=checkbox]");
Expand All @@ -213,7 +213,7 @@ $(document).ready(function() {
});

$("#selectInvert").click(function () {
$("input[name=setSelected]").prop('checked', false);
$("input[name=setSelected]").prop('checked', false).trigger('change');
$(".thumbnails label").each(function() {
var checkbox = $(this).children("input[type=checkbox]");
Expand All @@ -233,11 +233,14 @@ $(document).ready(function() {

$("#selectSet").click(function () {
selectPageThumbnails();
$("input[name=setSelected]").prop('checked', true);
$("input[name=setSelected]").prop('checked', true).trigger('change');
checkPermitAction();
return false;
});

$("input[name=setSelected]").change(function() {
$('input[name=whole_set]').val(this.checked ? all_elements.join(',') : '');
});

jQuery("input[name=confirm_deletion]").change(function() {
jQuery("#confirmDel span.errors").css("visibility", "hidden");
Expand Down Expand Up @@ -569,6 +572,7 @@ var sliders = {
<span id="selectedMessage"></span>

<input type="checkbox" name="setSelected" style="display:none" {if count($selection) == $nb_thumbs_set}checked="checked"{/if}>
<input type="hidden" name="whole_set" value="">
</p>

<ul class="thumbnails">
Expand Down

0 comments on commit 27e81f2

Please sign in to comment.