1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 10:04:35 +02:00

Infopanel comment-approval now fully functional.

This commit is contained in:
Cameron
2013-05-20 13:37:39 -07:00
parent 5034dc0e49
commit de808f74d5
4 changed files with 67 additions and 24 deletions

View File

@@ -143,6 +143,49 @@ $(document).ready(function()
return true;
}
);
/* InfoPanel Comment approval and deletion */
$("button[data-comment-action]").live("click", function(){
var url = $(this).attr("data-target");
var action = $(this).attr('data-comment-action');
var id = $(this).attr("data-comment-id");
var next = $('#comment-'+ id).nextAll('.hide').attr("id");
$.ajax({
type: 'POST',
url: url + '?ajax_used=1&mode='+action,
data: { itemid: id },
success: function(data) {
var a = $.parseJSON(data);
// alert(data);
if(!a.error)
{
$('#comment-'+ id).hide(800, function () {
$('#'+next).show('slow');
$('#'+next).removeClass('hide');
});
}
}
});
return false;
});
/* Bootstrap Modal window within an iFrame */