Skip to content

pat-checklist selectAll/deselectAll only works inside .pat-checklist element #377

@adrianwhite

Description

@adrianwhite

Initially raised in ploneintranet/ploneintranet.theme#23

Whilst working with @cornae we tried to add buttons for Select and Deselect All outside of the pat-checklist element and target them via an id and class but they did not function.

<fieldset class=pat-checklist" data-pat-checklist="select: #ElemOutsidePatChecklist .select-all; deselect: #ElemOutsidePatChecklist .deselect-all" >

@cornae mentioned he thought this was a regression as he had seen them function outside of a .pat-checklist element before.

The js only looks for the select and deselect elements within the checklist ($trigger), line 27 and 28 of checklist.js:

$trigger.find(options.select).on("click.pat-checklist", {trigger: $trigger}, _.onSelectAll);
$trigger.find(options.deselect).on("click.pat-checklist", {trigger: $trigger},_.onDeselectAll);

This is my first issue raised for this repo, is there anything I can do to make it better/clearer?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions