Skip to content

Node.js based forum software built for the modern web

closes #3687

barisusaklibcd8bdf0df55
diff --git a/public/less/admin/manage/categories.less b/public/less/admin/manage/categories.less
index 9b1e1fec3f..b9be869550 100644
--- a/public/less/admin/manage/categories.less
+++ b/public/less/admin/manage/categories.less
@@ -82,4 +82,11 @@ div.categories {
.description {
margin: 0;
}
+
+ .children-placeholder{
+ border: 1px dashed #ddd;
+ min-height: 20px;
+ height: 20px;
+ }
+
}
\ No newline at end of file
diff --git a/public/src/admin/manage/categories.js b/public/src/admin/manage/categories.js
index 2d1cf08d5e..1d346ccd8a 100644
--- a/public/src/admin/manage/categories.js
+++ b/public/src/admin/manage/categories.js
@@ -153,9 +153,7 @@ define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-seri
// Handle and children categories in this level have
for(var x=0,numCategories=categories.length;x<numCategories;x++) {
- if (categories[x].hasOwnProperty('children') && categories[x].children.length > 0) {
- renderList(categories[x].children, $('li[data-cid="' + categories[x].cid + '"]'), categories[x].cid);
- }
+ renderList(categories[x].children, $('li[data-cid="' + categories[x].cid + '"]'), categories[x].cid);
}
// Make list sortable
diff --git a/src/views/admin/partials/categories/category-rows.tpl b/src/views/admin/partials/categories/category-rows.tpl
index 273d7e31b5..715427c34e 100644
--- a/src/views/admin/partials/categories/category-rows.tpl
+++ b/src/views/admin/partials/categories/category-rows.tpl
@@ -26,4 +26,7 @@
</div>
</li>
<!-- END categories -->
+
+<li class="children-placeholder"></li>
+
</ul>
\ No newline at end of file