1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-09 15:35:25 +02:00
This commit is contained in:
Murod Khaydarov 2019-01-17 01:50:10 +03:00
parent 5c9bafe069
commit 9a78c10f06
No known key found for this signature in database
GPG key ID: C480BA53A8D274C5
3 changed files with 4 additions and 10741 deletions

10740
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -86,8 +86,10 @@ router.post('/page/:id', multer.any(), async (req, res) => {
if (page._parent !== parent) { if (page._parent !== parent) {
await PagesOrder.move(page._parent, parent, id); await PagesOrder.move(page._parent, parent, id);
} else { } else {
if (putAbovePageId && putAbovePageId !== '0') {
await PagesOrder.update(page._id, page._parent, putAbovePageId); await PagesOrder.update(page._id, page._parent, putAbovePageId);
} }
}
page = await Pages.update(id, {title, body, parent}); page = await Pages.update(id, {title, body, parent});
res.json({ res.json({

View file

@ -36,6 +36,7 @@
<span> <span>
Put Above Put Above
<select name="above"> <select name="above">
<option value="0">—</option>
{% for _page in parentsChildrenOrdered %} {% for _page in parentsChildrenOrdered %}
<option value="{{ _page._id }}">{{ _page.title }}</option> <option value="{{ _page._id }}">{{ _page.title }}</option>
{% endfor %} {% endfor %}