mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	removed hardcoded icons for post delete restore
This commit is contained in:
		@@ -23,9 +23,9 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
 | 
			
		||||
		postEl.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', 'translator
 | 
			
		||||
		return 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';
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user