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