|
|
|
@ -7,14 +7,11 @@ define('forum/post-queue', ['categorySelector'], function (categorySelector) {
|
|
|
|
|
PostQueue.init = function () {
|
|
|
|
|
$('[data-toggle="tooltip"]').tooltip();
|
|
|
|
|
|
|
|
|
|
console.log('here');
|
|
|
|
|
$('.posts-list').on('click', '[data-action]', function () {
|
|
|
|
|
console.log('derp');
|
|
|
|
|
var parent = $(this).parents('[data-id]');
|
|
|
|
|
var action = $(this).attr('data-action');
|
|
|
|
|
var id = parent.attr('data-id');
|
|
|
|
|
var method = action === 'accept' ? 'posts.accept' : 'posts.reject';
|
|
|
|
|
console.log(parent, action, id, method);
|
|
|
|
|
|
|
|
|
|
socket.emit(method, { id: id }, function (err) {
|
|
|
|
|
if (err) {
|
|
|
|
|