v1.18.x
Baris Soner Usakli 11 years ago
parent a29ea27596
commit 6c6c57f45f

@ -13,6 +13,7 @@
"reply": "Reply", "reply": "Reply",
"edit": "Edit", "edit": "Edit",
"delete": "Delete", "delete": "Delete",
"restore": "Restore",
"move": "Move", "move": "Move",
"fork": "Fork", "fork": "Fork",
"banned": "banned", "banned": "banned",

@ -978,7 +978,6 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
function set_delete_state(deleted) { function set_delete_state(deleted) {
var deleteThreadEl = $('.delete_thread'), var deleteThreadEl = $('.delete_thread'),
deleteTextEl = $('.delete_thread span'), deleteTextEl = $('.delete_thread span'),
//deleteThreadEl.getElementsByTagName('span')[0],
threadEl = $('#post-container'), threadEl = $('#post-container'),
deleteNotice = document.getElementById('thread-deleted') || document.createElement('div'); deleteNotice = document.getElementById('thread-deleted') || document.createElement('div');
@ -1053,23 +1052,16 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
} }
function toggle_post_tools(pid, isDeleted) { function toggle_post_tools(pid, isDeleted) {
var postEl = $('#post-container li[data-pid="' + pid + '"]'), var postEl = $('#post-container li[data-pid="' + pid + '"]');
quoteEl = $(postEl[0].querySelector('.quote')),
favEl = $(postEl[0].querySelector('.favourite')), postEl.find('.quote').toggleClass('none', isDeleted);
replyEl = $(postEl[0].querySelector('.post_reply')), postEl.find('.favourite').toggleClass('none', isDeleted);
chatEl = $(postEl[0].querySelector('.chat')); postEl.find('.post_reply').toggleClass('none', isDeleted);
postEl.find('.chat').toggleClass('none', isDeleted);
if (isDeleted) {
quoteEl.addClass('none'); translator.translate(isDeleted ? ' [[topic:restore]]' : ' [[topic:delete]]', function(translated) {
favEl.addClass('none'); postEl.find('.delete').find('span').html(translated);
replyEl.addClass('none'); });
chatEl.addClass('none');
} else {
quoteEl.removeClass('none');
favEl.removeClass('none');
replyEl.removeClass('none');
chatEl.removeClass('none');
}
} }
$(window).on('scroll', updateHeader); $(window).on('scroll', updateHeader);

Loading…
Cancel
Save