From a88544474018f48d36060aa178c6137eefe5d24a Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Sun, 12 Jan 2014 15:37:33 -0500 Subject: [PATCH] fixes toggle_mod_tools undefined error --- public/src/forum/topic.js | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 2fd9001fab..8c9d335f96 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -897,23 +897,6 @@ define(['composer'], function(composer) { } } - function toggle_mod_tools(pid, state) { - var postEl = $(document.querySelector('#post-container li[data-pid="' + pid + '"]')), - editEl = postEl.find('.edit'), - deleteEl = postEl.find('.delete'); - - if (state) { - editEl.removeClass('none'); - deleteEl.removeClass('none'); - } else { - editEl.addClass('none'); - deleteEl.addClass('none'); - } - } - - - - Topic.postCount = templates.get('postcount'); window.onscroll = updateHeader; @@ -1084,6 +1067,20 @@ define(['composer'], function(composer) { }); } + function toggle_mod_tools(pid, state) { + var postEl = $(document.querySelector('#post-container li[data-pid="' + pid + '"]')), + editEl = postEl.find('.edit'), + deleteEl = postEl.find('.delete'); + + if (state) { + editEl.removeClass('none'); + deleteEl.removeClass('none'); + } else { + editEl.addClass('none'); + deleteEl.addClass('none'); + } + } + function updatePostCount() { socket.emit('api:topics.postcount', templates.get('topic_id'), function(err, postcount) { if(!err) {