mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
second pass, #981
This commit is contained in:
@@ -61,5 +61,13 @@
|
|||||||
"fork_success": "Succesfully forked topic!",
|
"fork_success": "Succesfully forked topic!",
|
||||||
|
|
||||||
"reputation": "Reputation",
|
"reputation": "Reputation",
|
||||||
"posts": "Posts"
|
"posts": "Posts",
|
||||||
|
|
||||||
|
"composer.title_placeholder": "Enter your topic title here...",
|
||||||
|
"composer.write": "Write",
|
||||||
|
"composer.preview": "Preview",
|
||||||
|
"composer.discard": "Discard",
|
||||||
|
"composer.submit": "Submit",
|
||||||
|
"composer.replying_to": "Replying to",
|
||||||
|
"composer.new_topic": "New Topic"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,10 +82,12 @@ define(['taskbar'], function(taskbar) {
|
|||||||
function push(post) {
|
function push(post) {
|
||||||
var uuid = utils.generateUUID();
|
var uuid = utils.generateUUID();
|
||||||
|
|
||||||
|
translator.translate('[[topic:composer.new_topic]]', function(newTopicStr) {
|
||||||
taskbar.push('composer', uuid, {
|
taskbar.push('composer', uuid, {
|
||||||
title: post.title ? post.title : 'New Topic',
|
title: post.title ? post.title : newTopicStr,
|
||||||
icon: post.picture
|
icon: post.picture
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
composer.posts[uuid] = post;
|
composer.posts[uuid] = post;
|
||||||
|
|
||||||
@@ -103,8 +105,8 @@ define(['taskbar'], function(taskbar) {
|
|||||||
composer.createNewComposer = function(post_uuid) {
|
composer.createNewComposer = function(post_uuid) {
|
||||||
|
|
||||||
templates.preload_template('composer', function() {
|
templates.preload_template('composer', function() {
|
||||||
|
|
||||||
var composerTemplate = templates['composer'].parse({});
|
var composerTemplate = templates['composer'].parse({});
|
||||||
|
translator.translate(composerTemplate, function(composerTemplate) {
|
||||||
composerTemplate = $(composerTemplate);
|
composerTemplate = $(composerTemplate);
|
||||||
|
|
||||||
composerTemplate.attr('id', 'cmp-uuid-' + post_uuid);
|
composerTemplate.attr('id', 'cmp-uuid-' + post_uuid);
|
||||||
@@ -124,7 +126,9 @@ define(['taskbar'], function(taskbar) {
|
|||||||
bodyEl = postContainer.find('textarea');
|
bodyEl = postContainer.find('textarea');
|
||||||
|
|
||||||
if (parseInt(postData.tid) > 0) {
|
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);
|
titleEl.prop('disabled', true);
|
||||||
} else if (parseInt(postData.pid) > 0) {
|
} else if (parseInt(postData.pid) > 0) {
|
||||||
titleEl.val(postData.title);
|
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
|
//http://stackoverflow.com/questions/14441456/how-to-detect-which-device-view-youre-on-using-twitter-bootstrap-api
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="composer">
|
<div class="composer">
|
||||||
<div class="composer-container">
|
<div class="composer-container">
|
||||||
<input class="title form-control" type="text" tabIndex="1" placeholder="Enter your topic title here..." />
|
<input class="title form-control" type="text" tabIndex="1" placeholder="[[topic:composer.title_placeholder]]" />
|
||||||
<div class="btn-toolbar formatting-bar">
|
<div class="btn-toolbar formatting-bar">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<span class="btn btn-link" tabindex="-1"><i class="fa fa-bold"></i></span>
|
<span class="btn btn-link" tabindex="-1"><i class="fa fa-bold"></i></span>
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="active"><a data-pane=".tab-write" data-toggle="tab">Write</a></li>
|
<li class="active"><a data-pane=".tab-write" data-toggle="tab">[[topic:composer.write]]</a></li>
|
||||||
<li><a data-pane=".tab-preview" data-toggle="tab">Preview</a></li>
|
<li><a data-pane=".tab-preview" data-toggle="tab">[[topic:composer.preview]]</a></li>
|
||||||
<li class="btn-group pull-right action-bar">
|
<li class="btn-group pull-right action-bar">
|
||||||
<button class="btn btn-default" data-action="discard" tabIndex="5"><i class="fa fa-times"></i> Discard</button>
|
<button class="btn btn-default" data-action="discard" tabIndex="5"><i class="fa fa-times"></i> [[topic:composer.discard]]</button>
|
||||||
<button data-action="post" class="btn btn-default btn-primary" tabIndex="3"><i class="fa fa-check"></i> Submit</button>
|
<button data-action="post" class="btn btn-default btn-primary" tabIndex="3"><i class="fa fa-check"></i> [[topic:composer.submit]]</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user