[*] MO : Review of the productcomments module - Part3

This commit is contained in:
gBrunier
2011-08-11 12:07:25 +00:00
parent d0dbb5c185
commit abbcf84e6d
4 changed files with 73 additions and 13 deletions
+16 -13
View File
@@ -62,19 +62,22 @@
$('span[id^=comment_report_]').click(function(){
var idProductComment = $(this).attr('id').replace('comment_report_', '');
var parent = $(this).parent();
$.ajax({
{/literal}url: "{$module_dir}productcomments-ajax.php",{literal}
post: "POST",
data: "id_product_comment=" + idProductComment + "&action=report",
success: function(result){
parent.fadeOut("normal", function() {
parent.remove();
});
}
});
{/literal}if (confirm('{l s='Are you sure you want report this comment?' mod='productcomments'}')){literal}
{
var idProductComment = $(this).attr('id').replace('comment_report_', '');
var parent = $(this).parent();
$.ajax({
{/literal}url: "{$module_dir}productcomments-ajax.php",{literal}
post: "POST",
data: "id_product_comment=" + idProductComment + "&action=report",
success: function(result){
parent.fadeOut("normal", function() {
parent.remove();
});
}
});
}
});
});
{/literal}