Node.js based forum software built for the modern web
removed hardcoded icons for post delete restore
barisusaklib00ee4828f34
diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.jsindex 4612a4f25e..14a54a30a8 100644--- a/public/src/client/topic/postTools.js+++ b/public/src/client/topic/postTools.js@@ -23,9 +23,9 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translatorpostEl.find('[component="post/quote"], [component="post/favourite"], [component="post/reply"], [component="post/flag"], [component="user/chat"]').toggleClass('hidden', isDeleted);+ postEl.find('[component="post/delete"]').toggleClass('hidden', isDeleted);+ postEl.find('[component="post/restore"]').toggleClass('hidden', !isDeleted);postEl.find('[component="post/purge"]').toggleClass('hidden', !isDeleted);- postEl.find('[component="post/delete"] .i').toggleClass('fa-trash-o', !isDeleted).toggleClass('fa-history', isDeleted);- postEl.find('[component="post/delete"] span').translateHtml(isDeleted ? ' [[topic:restore]]' : ' [[topic:delete]]');};PostTools.updatePostCount = function() {@@ -114,7 +114,11 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator});postContainer.on('click', '[component="post/delete"]', function(e) {- deletePost($(this), tid);+ togglePostDelete($(this), tid);+ });++ postContainer.on('click', '[component="post/restore"]', function(e) {+ togglePostDelete($(this), tid);});postContainer.on('click', '[component="post/purge"]', function(e) {@@ -248,7 +252,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translatorreturn username;}- function deletePost(button, tid) {+ function togglePostDelete(button, tid) {var pid = getData(button, 'data-pid'),postEl = components.get('post', 'pid', pid),action = !postEl.hasClass('deleted') ? 'delete' : 'restore';