deprecation notices

v1.18.x
psychobunny 10 years ago
parent 0c4ffafca3
commit 855e43ea12

@ -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';

Loading…
Cancel
Save