new RearrangeFilterHandler($table, $operator)
Improve the UI of the rearrange filters dialog box.
Parameters:
Name | Type | Description |
---|---|---|
$table |
jQuery | The table in the filter form. |
$operator |
jQuery | The filter groups operator element. |
Members
addGroupButton :jQuery
Keep a reference to the buttons for adding and removing filter groups.
Type:
draggableRows :jQuery
Keep a reference to all draggable rows within the table.
Type:
dropdowns :jQuery
Type:
hasGroupOperator :bool
Type:
- bool
operator :jQuery
Type:
removeGroupButtons :jQuery
Type:
table
Keep a reference to the <table>
being altered and to the div containing
the filter groups operator dropdown (if it exists).
Methods
clickAddGroupButton(event)
Dynamically click the button that adds a new filter group.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The event triggered. |
clickRemoveGroupButton(event)
Dynamically click a button for removing a filter group.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | Event being triggered, with event.data.buttonId set to the ID of the form button that should be clicked. |
duplicateGroupsOperator() → {jQuery}
Move the groups operator so that it's between the first two groups, and duplicate it between any subsequent groups.
Returns:
An operator element.
- Type
- jQuery
insertAddRemoveFilterGroupLinks()
Insert links that allow filter groups to be added and removed.
modifyTableDrag()
operatorChangeHandler(event)
Click handler for the operators that appear between filter groups.
Forces all operator dropdowns to have the same value.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The event triggered. |
redrawOperatorLabels()
Redraw the operator labels that are displayed next to each filter.
syncGroupsOperators()
Make the duplicated groups operators change in sync with each other.
updateRowspans()
Update the rowspan attribute of each cell containing an operator dropdown.