Class: RearrangeFilterHandler

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

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.

Source:

Members

addGroupButton :jQuery

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

Type:
Source:

draggableRows :jQuery

Keep a reference to all draggable rows within the table.

Type:
Source:
Type:
Source:

hasGroupOperator :bool

Type:
  • bool
Source:

operator :jQuery

Type:
Source:

removeGroupButtons :jQuery

Type:
Source:

table

Keep a reference to the <table> being altered and to the div containing the filter groups operator dropdown (if it exists).

Source:

Methods

clickAddGroupButton(event)

Dynamically click the button that adds a new filter group.

Parameters:
Name Type Description
event jQuery.Event

The event triggered.

Source:

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.

Source:

duplicateGroupsOperator() → {jQuery}

Move the groups operator so that it's between the first two groups, and duplicate it between any subsequent groups.

Source:
Returns:

An operator element.

Type
jQuery

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

Source:

modifyTableDrag()

Source:

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.

Source:

redrawOperatorLabels()

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

Source:

syncGroupsOperators()

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

Source:

updateRowspans()

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

Source: