mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 17:56:16 +01:00
closes #669
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
define(function () {
|
||||
define(['composer'], function(composer) {
|
||||
var Category = {},
|
||||
loadingMoreTopics = false;
|
||||
|
||||
@@ -27,9 +27,7 @@ define(function () {
|
||||
});
|
||||
|
||||
$('#new_post').on('click', function () {
|
||||
require(['composer'], function (cmp) {
|
||||
cmp.push(0, cid);
|
||||
});
|
||||
composer.newTopic(cid);
|
||||
});
|
||||
|
||||
ajaxify.register_events([
|
||||
@@ -84,7 +82,7 @@ define(function () {
|
||||
var html = templates.prepare(templates['category'].blocks['topics']).parse({
|
||||
topics: [data]
|
||||
});
|
||||
|
||||
|
||||
translator.translate(html, function(translatedHTML) {
|
||||
var topic = $(translatedHTML),
|
||||
container = $('#topics-container'),
|
||||
@@ -137,7 +135,7 @@ define(function () {
|
||||
var html = templates.prepare(templates['category'].blocks['topics']).parse({
|
||||
topics: topics
|
||||
});
|
||||
|
||||
|
||||
translator.translate(html, function(translatedHTML) {
|
||||
var container = $('#topics-container');
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ define(['composer'], function(composer) {
|
||||
}
|
||||
|
||||
if (thread_state.locked !== '1') {
|
||||
composer.push(tid, null, null, selectionText.length > 0 ? selectionText + '\n\n' + username : '' + username);
|
||||
composer.newReply(tid, topic_name, selectionText.length > 0 ? selectionText + '\n\n' + username : '' + username);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -286,7 +286,7 @@ define(['composer'], function(composer) {
|
||||
|
||||
quoted = '> ' + data.post.replace(/\n/g, '\n> ') + '\n\n';
|
||||
|
||||
composer.push(tid, null, null, quoted);
|
||||
composer.newReply(tid, topic_name, quoted);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -337,8 +337,7 @@ define(['composer'], function(composer) {
|
||||
$('#post-container').delegate('.edit', 'click', function(e) {
|
||||
var pid = $(this).parents('li').attr('data-pid');
|
||||
|
||||
|
||||
composer.push(null, null, pid);
|
||||
composer.editPost(pid);
|
||||
});
|
||||
|
||||
$('#post-container').delegate('.delete', 'click', function(e) {
|
||||
|
||||
Reference in New Issue
Block a user