I encountered a use case where we needed all the links in a specific container AJAX-ified ... but not a few of them. Since the triggers are just jQuery selectors, we're able to do that with some selector magic. Unfortunately, there are cases where selectors won't work including links like contextual links which are in the container we are selecting.

As an example, if you have #main a as a selector, this will select contextual links. But with the patch below you can remove contextual links from the selected elements by adding !.nav a. The "negative trigger" is then removed from selected elements using jQuery's .not method.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

serjas’s picture

Status: Active » Patch (to be ported)

good work @rballou , i will test and commit to dev branch

serjas’s picture

@rballou, perfect patch, only thing i had to do was commit :) Thanks

Committed to 7.x-1.x-dev . Please test and confirm :)

serjas’s picture

Status: Patch (to be ported) » Needs review

Status: Needs review » Needs work

The last submitted patch, ajax_links_api_support_negative_triggers.patch, failed testing.

serjas’s picture

Status: Needs work » Needs review
serjas’s picture

Status: Needs review » Closed (fixed)