mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Before there was a row for each distributor and a 'shared' row for shipping methods which were shared among more than one distributor. This layout displays a single list of shipping methods with the distributor or distributors it belongs to beside it as suggested by @lin-d-hop
16 lines
362 B
JavaScript
16 lines
362 B
JavaScript
import { Controller } from "stimulus";
|
|
|
|
export default class extends Controller {
|
|
static targets = ["all", "checkbox"];
|
|
|
|
toggleAll() {
|
|
this.checkboxTargets.forEach(checkbox => {
|
|
checkbox.checked = this.allTarget.checked;
|
|
});
|
|
}
|
|
|
|
toggleCheckbox() {
|
|
this.allTarget.checked = this.checkboxTargets.every(checkbox => checkbox.checked);
|
|
}
|
|
}
|