Add bulk operations for orders (#3548)

* Add bulk operations for orders

* UI tweaks

* Fix test failures

* Fix filter form

* Add tests

* Run isort
This commit is contained in:
Raphael Michel
2023-09-06 17:02:21 +02:00
committed by GitHub
parent ce73d4831e
commit c0031e4579
10 changed files with 821 additions and 150 deletions

View File

@@ -784,7 +784,7 @@ function setup_basics(el) {
el.find("input[data-toggle-table]").each(function (ev) {
var $toggle = $(this);
var $actionButtons = $(".batch-select-actions button", this.form);
var countLabels = $("<span></span>").appendTo($actionButtons);
var countLabels = $("<span></span>").appendTo($actionButtons.filter(function () { return !$(this).closest(".dropdown-menu").length }));
var $table = $toggle.closest("table");
var $selectAll = $table.find(".table-select-all");
var $rows = $table.find("tbody tr");

View File

@@ -788,12 +788,32 @@ table td > .checkbox input[type="checkbox"] {
padding-bottom: 5px;
}
.batch-select-label {
display: block;
width: 100%;
height: 1.5em;
cursor: pointer;
margin: 0;
}
.dropdown-menu > li > button.btn {
display: block;
padding: 3px 20px;
clear: both;
font-weight: 400;
line-height: $line-height-base;
color: $dropdown-link-color;
white-space: nowrap;
background: inherit;
border: 0;
width: 100%;
text-align: left;
&:hover, &:focus {
color: $dropdown-link-hover-color;
text-decoration: none;
background-color: $dropdown-link-hover-bg;
}
}
.bulk-edit-field-group {