API Docs for: 1.0.0
Show:

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.

Methods

_handleRowSelection

(
  • e
)
protected

Change event handler for the ez-selection-table-checkbox checkboxes

Parameters:

  • e Object

    event facade

_uiEnableButtons

(
  • buttons
)
protected

Enables or disableds the buttons depending on the number of selected checkboxes

Parameters:

_uiSelectRow

(
  • checkbox
)
protected

Adds or removes the selected class on the row in which the checkbox is

Parameters: