Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EZP-27572: Markdown specs for the selection buttons.
- Loading branch information
1 parent
e4602b8
commit 6af4559
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
## Provides the suggested markup for the selection buttons | ||
|
||
|
||
```html | ||
<table class="ez-selection-table" data-selection-buttons=".mybutton"> | ||
<tr class="ez-selection-table-row"> | ||
<td> | ||
<input type="checkbox" class="ez-selection-table-checkbox"> | ||
</td> | ||
</tr> | ||
<!-- ... --> | ||
</table> | ||
<button class="mybutton" data-can-multiple-selection="true" disabled="disabled">Do!</button> | ||
``` | ||
|
||
|
||
|
||
This is a very similar markup from what we had in PlatformUI (see https://github.com/ezsystems/PlatformUIBundle/blob/master/Resources/public/js/extensions/ez-selection-table.js#L27) : | ||
|
||
When a `ez-selection-table-checkbox` checkbox is checked, its `ez-selection-table-row` ancestor gets the `is-row-selected` class and if there's one checked checkbox, the buttons that match the selector in the `data-selection-buttons` attribute are enabled. | ||
If others checkboxes are checked the button will still stay enabled if it has its `data-can-multiple-selection` to `true`. If it's not it will get disabled back. |