post/reply component

v1.18.x
psychobunny 10 years ago
parent a740e8e98f
commit 1d53365707

@ -6,3 +6,4 @@ Deprecation TODO's for post - 0.7x
- remove all pre-0.7x compatibility selectors for:
.post-content
.topic-title
.post_reply

@ -172,7 +172,7 @@ define('forum/topic/posts', [
if (!privileges.move) {
postEl.find('.move').remove();
}
postEl.find('.reply, .quote').toggleClass('hidden', !$('.post_reply').length);
postEl.find('.reply, .quote').toggleClass('hidden', !$('.post_reply, [component="post/reply"]').length);
var isSelfPost = parseInt(postEl.attr('data-uid'), 10) === parseInt(app.user.uid, 10);
postEl.find('.chat, .flag').toggleClass('hidden', isSelfPost || !app.user.uid);
}

@ -105,8 +105,8 @@ define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move'], func
translator.translate(isLocked ? '[[topic:locked]]' : '[[topic:reply]]', function(translated) {
var className = isLocked ? 'fa-lock' : 'fa-reply';
threadEl.find('.post_reply').html('<i class="fa ' + className + '"></i> ' + translated);
$('.topic-main-buttons .post_reply').attr('disabled', isLocked).html(isLocked ? '<i class="fa fa-lock"></i> ' + translated : translated);
threadEl.find('.post_reply, [component="post/reply"]').html('<i class="fa ' + className + '"></i> ' + translated);
$('.post_reply, [component="post/reply"]').attr('disabled', isLocked).html(isLocked ? '<i class="fa fa-lock"></i> ' + translated : translated);
});
threadEl.find('.quote, .edit, .delete').toggleClass('hidden', isLocked);

Loading…
Cancel
Save