Node.js based forum software built for the modern web
deprecation notices
psychobunny855e43ea1266
diff --git a/NOTES.md b/NOTES.mdnew file mode 100644index 0000000000..dca0aec904--- /dev/null+++ b/NOTES.md@@ -0,0 +1,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-contentdiff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.jsindex 4d6ee457d4..2a48e3008b 100644--- a/public/src/client/topic/postTools.js+++ b/public/src/client/topic/postTools.js@@ -72,6 +72,12 @@ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(comfunction addPostHandlers(tid, threadState) {var postContainer = components.get('topic');+ /*+ * Deprecation notice:+ * post-0.7.0 .classname selectors will no longer be supported+ * Use the components system instead.+ */+postContainer.on('click', '.quote, [component="post/quote"]', function() {if (!threadState.locked) {onQuoteClicked($(this), tid, topicName);@@ -129,7 +135,7 @@ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(comvar selectionText = '',selection = window.getSelection ? window.getSelection() : document.selection.createRange();- if ($(selection.baseNode).parents('.post-content').length > 0) {+ if ($(selection.baseNode).parents('[component="post/content"]').length > 0) {var snippet = selection.toString();if (snippet.length) {selectionText = '> ' + snippet.replace(/\n/g, '\n> ') + '\n\n';