eZ.SelectionTable Class
Extension for the views providing a table that is meant to select some items and to enable one or several buttons depending on the selection.
This extensions expects the following markup to work correctly:
<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" disabled="disabled">Do!</button>
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 at least one checked checkbox, the buttons that match the selector in the data-selection-buttons attribute are enabled.
Item Index
Methods
_handleRowSelection
(
protected
-
e
Change event handler for the ez-selection-table-checkbox checkboxes
Parameters:
-
e
Objectevent facade
_uiEnableButtons
(
protected
-
buttons
Enables or disableds the buttons depending on the number of selected checkboxes
Parameters:
-
buttons
NodeList
_uiSelectRow
(
protected
-
checkbox
Adds or removes the selected class on the row in which the checkbox is
Parameters:
-
checkbox
Node