It would be very lovely to see the Views Library plugin tabs support multi-select, so #951004: Allow selecting of multiple media items for a multi value media field in the same dialog and similar could progress without having to patch media first.
It now has a 'setup' and 'select' that triggers when the page is loaded, and when the tab containing the view is selected. To enable this, I've had to build a JS settings array that contains the views names and display ids that are active.
Slightly related, I've changed the events bound to the launcher and remove-button to use
event.preventDefault instead of
return false, to enable Media plugins to also listen to these events (
return false is equivalent to
event.preventDefault(); event.stopImmediatePropagation(), and what is needed is only to prevent the default behavior of clicking the link.
I've taken the liberty to include those changes in this issue, as I see no harm in the change, and because the reason to support multiselect is to enable modules to provide better field-widgets. Widgets which could also benefit from being able to know when either the launcher or the remove-button is pressed.