mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #8984, post-queue ux
This commit is contained in:
@@ -8,5 +8,7 @@
|
|||||||
"content": "Content",
|
"content": "Content",
|
||||||
"posted": "Posted",
|
"posted": "Posted",
|
||||||
"reply-to": "Reply to \"%1\"",
|
"reply-to": "Reply to \"%1\"",
|
||||||
"content-editable": "You can click on individual content to edit before posting."
|
"content-editable": "You can click on individual content to edit before posting.",
|
||||||
|
"category-editable": "Click to edit the category of this new topic",
|
||||||
|
"title-editable": "Click to edit the title of this new topic"
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,12 @@ define('forum/post-queue', [
|
|||||||
category: category,
|
category: category,
|
||||||
}],
|
}],
|
||||||
}, function (html) {
|
}, function (html) {
|
||||||
|
if ($this.find('.category-text').length) {
|
||||||
|
$this.find('.category-text').text(html.find('.topic-category .category-text').text());
|
||||||
|
} else {
|
||||||
|
// for backwards compatibility, remove in 1.16.0
|
||||||
$this.replaceWith(html.find('.topic-category'));
|
$this.replaceWith(html.find('.topic-category'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -92,7 +97,17 @@ define('forum/post-queue', [
|
|||||||
if (err) {
|
if (err) {
|
||||||
return app.alertError(err);
|
return app.alertError(err);
|
||||||
}
|
}
|
||||||
preview.html(titleEdit ? data.postData.title : data.postData.content);
|
if (titleEdit) {
|
||||||
|
if (preview.find('.title-text').length) {
|
||||||
|
preview.find('.title-text').text(data.postData.title);
|
||||||
|
} else {
|
||||||
|
// for backwards compatibility, remove in 1.16.0
|
||||||
|
preview.html(data.postData.title);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
preview.html(data.postData.content);
|
||||||
|
}
|
||||||
|
|
||||||
textarea.parent().addClass('hidden');
|
textarea.parent().addClass('hidden');
|
||||||
preview.removeClass('hidden');
|
preview.removeClass('hidden');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user