post/header component

v1.18.x
psychobunny 10 years ago
parent 61db112942
commit a740e8e98f

@ -3,4 +3,6 @@ Deprecation TODO's for post - 0.7x
- public/src/components.js: remove pre-0.7x compatibility code
- public/src/client/topic/postTools.js: remove selectors for every post button (ex. ".edit")
- remove all selectors for .post-content
- remove all pre-0.7x compatibility selectors for:
.post-content
.topic-title

@ -55,7 +55,7 @@ define('forum/category', [
navigator.init('#topics-container > .category-item', ajaxify.variables.get('topic_count'), Category.toTop, Category.toBottom, Category.navigatorCallback);
}
$('#topics-container').on('click', '.topic-title', function() {
$('#topics-container').on('click', '[component="post/header"], .topic-title', function() {
var clickedIndex = $(this).parents('[data-index]').attr('data-index');
$('#topics-container li.category-item').each(function(index, el) {
if ($(el).offset().top - $(window).scrollTop() > 0) {

@ -110,7 +110,7 @@ define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move'], func
});
threadEl.find('.quote, .edit, .delete').toggleClass('hidden', isLocked);
$('.topic-title i.fa-lock').toggleClass('hide', !data.isLocked);
$('[component="post/header"] i.fa-lock, .topic-title i.fa-lock').toggleClass('hide', !data.isLocked);
ThreadTools.threadState.locked = data.isLocked;
}
};
@ -143,7 +143,7 @@ define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move'], func
$('.pin_thread').html(translated);
ThreadTools.threadState.pinned = data.isPinned;
});
$('.topic-title i.fa-thumb-tack').toggleClass('hide', !data.isPinned);
$('[component="post/header"] i.fa-thumb-tack, .topic-title i.fa-thumb-tack').toggleClass('hide', !data.isPinned);
}
};

Loading…
Cancel
Save