This commit is contained in:
Baris Soner Usakli
2013-12-22 15:15:59 -05:00
parent 3752a1c691
commit 680dbf138a
6 changed files with 80 additions and 73 deletions

View File

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

View File

@@ -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) {