|
|
|
@ -82,10 +82,12 @@ define(['taskbar'], function(taskbar) {
|
|
|
|
|
function push(post) {
|
|
|
|
|
var uuid = utils.generateUUID();
|
|
|
|
|
|
|
|
|
|
translator.translate('[[topic:composer.new_topic]]', function(newTopicStr) {
|
|
|
|
|
taskbar.push('composer', uuid, {
|
|
|
|
|
title: post.title ? post.title : 'New Topic',
|
|
|
|
|
title: post.title ? post.title : newTopicStr,
|
|
|
|
|
icon: post.picture
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
composer.posts[uuid] = post;
|
|
|
|
|
|
|
|
|
@ -103,8 +105,8 @@ define(['taskbar'], function(taskbar) {
|
|
|
|
|
composer.createNewComposer = function(post_uuid) {
|
|
|
|
|
|
|
|
|
|
templates.preload_template('composer', function() {
|
|
|
|
|
|
|
|
|
|
var composerTemplate = templates['composer'].parse({});
|
|
|
|
|
translator.translate(composerTemplate, function(composerTemplate) {
|
|
|
|
|
composerTemplate = $(composerTemplate);
|
|
|
|
|
|
|
|
|
|
composerTemplate.attr('id', 'cmp-uuid-' + post_uuid);
|
|
|
|
@ -124,7 +126,9 @@ define(['taskbar'], function(taskbar) {
|
|
|
|
|
bodyEl = postContainer.find('textarea');
|
|
|
|
|
|
|
|
|
|
if (parseInt(postData.tid) > 0) {
|
|
|
|
|
titleEl.val('Replying to: ' + postData.title);
|
|
|
|
|
translator.translate('[[topic:composer.replying_to]]: ' + postData.title, function(newTitle) {
|
|
|
|
|
titleEl.val(newTitle);
|
|
|
|
|
});
|
|
|
|
|
titleEl.prop('disabled', true);
|
|
|
|
|
} else if (parseInt(postData.pid) > 0) {
|
|
|
|
|
titleEl.val(postData.title);
|
|
|
|
@ -326,6 +330,7 @@ define(['taskbar'], function(taskbar) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//http://stackoverflow.com/questions/14441456/how-to-detect-which-device-view-youre-on-using-twitter-bootstrap-api
|
|
|
|
|