fix: post-queue not working after #8580

v1.18.x
Julian Lam 4 years ago
parent efc30e97ec
commit dc5bd7601f

@ -1,17 +1,20 @@
'use strict';
define('admin/manage/post-queue', ['categorySelector'], function (categorySelector) {
define('forum/post-queue', ['categorySelector'], function (categorySelector) {
var PostQueue = {};
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) {
Loading…
Cancel
Save