mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 04:21:17 +01:00
deprecation notices
This commit is contained in:
6
NOTES.md
Normal file
6
NOTES.md
Normal file
@@ -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-content
|
||||
@@ -72,6 +72,12 @@ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(com
|
||||
function 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(com
|
||||
var 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';
|
||||
|
||||
Reference in New Issue
Block a user