Rules links has its own implementation of the AJAX call and response process. This patch converts rules links to drupal's native AJAX system.

A few notes:

  • This adds ctools as a dependency...but its a views dependency so its basically on every site anyway
  • This increases the accessibility of the module. If the user doesn't have JS, the link reverts to the behavior of a normal non-ajax link
  • This also opens the door for adding configurable actions to happen after the link is clicked, rather than just displaying a message. I could imagine setting jQuery selectors in the rules admin UI, and adding / removing additional content after the rules link calls back. I'd be interested in working on that functionality should this patch be accepted

Comments

mkadin’s picture

StatusFileSize
new4.94 KB

Whoops, that had my name as a test class on the link. Here's a better patch.

Yuri’s picture

Issue summary: View changes

Sounds good, but this post did not catch much attention?

kopeboy’s picture

Yeah, this would be good, please review (I don't have the skills)

giorgio79’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

The current branch is 7x2x. This patch needs a reroll.

alansaviolobo’s picture

Status: Active » Needs review
StatusFileSize
new5.15 KB

Status: Needs review » Needs work

The last submitted patch, 5: rules_link_use_core_ajax_framework-1792544.patch, failed testing. View results

alansaviolobo’s picture

alansaviolobo’s picture

Status: Needs work » Needs review

The last submitted patch, rules_link_use_core_ajax_framework.patch, failed testing. View results

The last submitted patch, rules_link_use_core_ajax_framework.patch, failed testing. View results

The last submitted patch, 1: rules_link_use_core_ajax_framework.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 7: rules_link_use_core_ajax_framework-1792544.patch, failed testing. View results