Class: RearrangeFilterHandler

Drupal.viewsUi. RearrangeFilterHandler

new Drupal.viewsUi.RearrangeFilterHandler($table, $operator)

Improve the UI of the rearrange filters dialog box.

Name Type Description
$table jQuery

The table in the filter form.

$operator jQuery

The filter groups operator element.

Members

addGroupButtonjQuery

Keep a reference to the buttons for adding and removing filter groups.

draggableRowsjQuery

Keep a reference to all draggable rows within the table.

hasGroupOperatorbool

operatorjQuery

removeGroupButtonsjQuery

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.

Name Type Description
event jQuery.Event

The event triggered.

clickRemoveGroupButton(event)

Dynamically click a button for removing a filter group.

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:
Type Description
jQuery An operator element.

Insert links that allow filter groups to be added and removed.

operatorChangeHandler(event)

Click handler for the operators that appear between filter groups.

Forces all operator dropdowns to have the same value.

Name Type Description
event jQuery.Event

The event triggered.

Redraw the operator labels that are displayed next to each filter.

Make the duplicated groups operators change in sync with each other.

Update the rowspan attribute of each cell containing an operator dropdown.