1
|
Drupal.behaviors.securityReview = function(context) {
|
2
|
$('.sec-rev-dyn').click(function() {
|
3
|
anchor = $(this);
|
4
|
row = $(this).parent().parent();
|
5
|
$.getJSON(anchor.attr('href') + '&js=1', function(data) {
|
6
|
if (data.skip == true) {
|
7
|
anchor.text('Enable');
|
8
|
row.attr('class' , 'info');
|
9
|
}
|
10
|
else if (data.result == 1) {
|
11
|
anchor.text('Skip');
|
12
|
row.attr('class' , 'ok');
|
13
|
}
|
14
|
else {
|
15
|
anchor.text('Skip');
|
16
|
row.attr('class' , 'error');
|
17
|
}
|
18
|
});
|
19
|
return false;
|
20
|
});
|
21
|
|
22
|
$('.sec-rev-help-content').hide();
|
23
|
$('.sec-rev-help-dyn').click(function() {
|
24
|
$('.sec-rev-help-content').hide();
|
25
|
$(this).parent().find('.sec-rev-help-content').show();
|
26
|
});
|
27
|
}
|