fix: post-queue not working after #8580
parent
efc30e97ec
commit
dc5bd7601f
@ -1,17 +1,20 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
define('admin/manage/post-queue', ['categorySelector'], function (categorySelector) {
|
define('forum/post-queue', ['categorySelector'], function (categorySelector) {
|
||||||
var PostQueue = {};
|
var PostQueue = {};
|
||||||
|
|
||||||
PostQueue.init = function () {
|
PostQueue.init = function () {
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
||||||
|
console.log('here');
|
||||||
$('.posts-list').on('click', '[data-action]', function () {
|
$('.posts-list').on('click', '[data-action]', function () {
|
||||||
|
console.log('derp');
|
||||||
var parent = $(this).parents('[data-id]');
|
var parent = $(this).parents('[data-id]');
|
||||||
var action = $(this).attr('data-action');
|
var action = $(this).attr('data-action');
|
||||||
var id = parent.attr('data-id');
|
var id = parent.attr('data-id');
|
||||||
var method = action === 'accept' ? 'posts.accept' : 'posts.reject';
|
var method = action === 'accept' ? 'posts.accept' : 'posts.reject';
|
||||||
|
console.log(parent, action, id, method);
|
||||||
|
|
||||||
socket.emit(method, { id: id }, function (err) {
|
socket.emit(method, { id: id }, function (err) {
|
||||||
if (err) {
|
if (err) {
|
Loading…
Reference in New Issue