From a740e8e98fef71dd78b47958212a61d6f64ccd89 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 17 Mar 2015 14:31:32 -0400 Subject: [PATCH] post/header component --- NOTES.md | 4 +++- public/src/client/category.js | 2 +- public/src/client/topic/threadTools.js | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NOTES.md b/NOTES.md index dca0aec904..4d9c63d7fc 100644 --- a/NOTES.md +++ b/NOTES.md @@ -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 \ No newline at end of file diff --git a/public/src/client/category.js b/public/src/client/category.js index 9b44708fd1..4e91b28afe 100644 --- a/public/src/client/category.js +++ b/public/src/client/category.js @@ -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) { diff --git a/public/src/client/topic/threadTools.js b/public/src/client/topic/threadTools.js index 1f0db3232d..90fe941b81 100644 --- a/public/src/client/topic/threadTools.js +++ b/public/src/client/topic/threadTools.js @@ -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); } };