Including security review as a submodule - with patched for Yaffs.
[yaffs-website] / web / modules / contrib / security_review / js / security_review.run_and_review.js
1 /**
2  * @file
3  * Implementation of check toggling using AJAX.
4  */
5
6 (function ($) {
7   Drupal.behaviors.securityReview = {
8     attach: function (context) {
9       $(context).find('.security-review-toggle-link a').click(function () {
10         var link = $(this);
11         var url = link.attr('href');
12         var td = link.parent();
13         var tr = td.parent();
14         $.getJSON(url + '&js=1', function (data) {
15           if (data.skipped) {
16             tr.addClass('skipped');
17           }
18           else {
19             tr.removeClass('skipped');
20           }
21           link.text(data.toggle_text);
22           link.attr(data.toggle_href);
23         });
24         return false;
25       });
26     }
27   };
28 })(jQuery);