mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-06 10:09:38 +02:00
closes #2953
This commit is contained in:
@@ -285,9 +285,10 @@ define('composer', [
|
||||
composer.bsEnvironment = utils.findBootstrapEnvironment();
|
||||
|
||||
var data = {
|
||||
title: postData.title,
|
||||
mobile: composer.bsEnvironment === 'xs' || composer.bsEnvironment === 'sm',
|
||||
allowTopicsThumbnail: allowTopicsThumbnail,
|
||||
showTags: isTopic || isMain,
|
||||
isTopicOrMain: isTopic || isMain,
|
||||
minimumTagLength: config.minimumTagLength,
|
||||
maximumTagLength: config.maximumTagLength,
|
||||
isTopic: isTopic,
|
||||
@@ -317,8 +318,6 @@ define('composer', [
|
||||
tags.init(postContainer, composer.posts[post_uuid]);
|
||||
categoryList.init(postContainer, composer.posts[post_uuid]);
|
||||
|
||||
updateTitle(postData, postContainer);
|
||||
|
||||
activate(post_uuid);
|
||||
resize.reposition(postContainer);
|
||||
|
||||
@@ -431,27 +430,6 @@ define('composer', [
|
||||
});
|
||||
}
|
||||
|
||||
function updateTitle(postData, postContainer) {
|
||||
var titleEl = postContainer.find('.title');
|
||||
|
||||
if (parseInt(postData.tid, 10) > 0) {
|
||||
titleEl.translateVal('[[topic:composer.replying_to, "' + postData.title + '"]]');
|
||||
titleEl.prop('disabled', true);
|
||||
} else if (parseInt(postData.pid, 10) > 0) {
|
||||
titleEl.val(postData.title);
|
||||
titleEl.prop('disabled', true);
|
||||
socket.emit('modules.composer.editCheck', postData.pid, function(err, editCheck) {
|
||||
if (!err && editCheck.titleEditable) {
|
||||
titleEl.prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
titleEl.val(postData.title);
|
||||
titleEl.prop('disabled', false);
|
||||
}
|
||||
}
|
||||
|
||||
function activate(post_uuid) {
|
||||
if(composer.active && composer.active !== post_uuid) {
|
||||
composer.minimize(composer.active);
|
||||
|
||||
Reference in New Issue
Block a user