| 24 |
if(response.status) { |
if(response.status) { |
| 25 |
(Drupal.theme.onModerateContentComplete || onModerateContentComplete)(response, report); |
(Drupal.theme.onModerateContentComplete || onModerateContentComplete)(response, report); |
| 26 |
} else { |
} else { |
| 27 |
(Drupal.theme.onModerateContentError || onModerateContentError).call(response, report); |
(Drupal.theme.onModerateContentError || onModerateContentError)(response, report); |
| 28 |
} |
} |
| 29 |
} |
} |
| 30 |
}); |
}); |
| 31 |
|
|
| 32 |
$('.abuse-report-allow, .abuse-report-remove', this).each(function(){ |
$('.abuse-report-allow, .abuse-report-remove', this).each(function(){ |
| 33 |
var $submit = $(':submit', this), submit = $submit[0]; |
var $submit = $(':submit', this), submit = $submit[0]; |
| 34 |
$('<a href="#"></a>') |
$('<a href="#" class="button"></a>') |
| 35 |
.text($submit.attr('value')) |
.text($submit.attr('value')) |
| 36 |
.appendTo($actions) |
.insertBefore($form) |
| 37 |
.bind('click', function(event){ |
.bind('click', function(event){ |
| 38 |
form.clk = submit; |
form.clk = submit; |
| 39 |
$form.trigger('submit'); |
$form.trigger('submit'); |
| 44 |
$('.abuse-report-warn-and-allow, .abuse-report-warn-and-remove', this).each(function(){ |
$('.abuse-report-warn-and-allow, .abuse-report-warn-and-remove', this).each(function(){ |
| 45 |
var $element = $(this); |
var $element = $(this); |
| 46 |
|
|
| 47 |
$('<a href="#"></a>') |
$('<a href="#" class="button"></a>') |
| 48 |
.text($(':submit', this).attr('value')) |
.text($(':submit', this).attr('value')) |
| 49 |
.appendTo($actions) |
.insertBefore($form) |
| 50 |
.bind('click', function(event){ |
.bind('click', function(event){ |
| 51 |
|
$(this).toggleClass('button-active'); |
| 52 |
$('legend a', $element).trigger('click'); |
$('legend a', $element).trigger('click'); |
| 53 |
return false; |
return false; |
| 54 |
}); |
}); |
| 60 |
var body = $(this).next('dd').text(); |
var body = $(this).next('dd').text(); |
| 61 |
$('a', this).bind('click', function(){ |
$('a', this).bind('click', function(){ |
| 62 |
// $(':input[@id^="edit-allow-subject"]', $element).val(subject); |
// $(':input[@id^="edit-allow-subject"]', $element).val(subject); |
| 63 |
$(':input[@id^="edit-allow-body"]', $element).val(body); |
$(':input[@id^="edit-allow-body"], :input[@id^="edit-remove-body"]', $element).val(body); |
| 64 |
return false; |
return false; |
| 65 |
}); |
}); |
| 66 |
}) |
}) |
| 71 |
|
|
| 72 |
}); |
}); |
| 73 |
|
|
| 74 |
|
$('.abuse-report-ban', this).each(function(){ |
| 75 |
|
var message = $('.form-item', this).text(); |
| 76 |
|
var $submit = $(':submit', this), submit = $submit[0]; |
| 77 |
|
$('<a href="#" class="button"></a>') |
| 78 |
|
.text($submit.attr('value')) |
| 79 |
|
.insertBefore($form) |
| 80 |
|
.bind('click', function(event){ |
| 81 |
|
if(confirm(message)) { |
| 82 |
|
form.clk = submit; |
| 83 |
|
$form.trigger('submit'); |
| 84 |
|
} |
| 85 |
|
return false; |
| 86 |
|
}); |
| 87 |
|
}); |
| 88 |
|
|
| 89 |
}); |
}); |
| 90 |
}); |
}); |