mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 14:35:47 +01:00
feat: reduce amount of data loaded on acp admin page
get rid of socket call and use ajaxify.data.categories
This commit is contained in:
@@ -11,13 +11,7 @@ define('admin/manage/categories', [
|
||||
var sortables;
|
||||
|
||||
Categories.init = function () {
|
||||
socket.emit('admin.categories.getAll', function (err, payload) {
|
||||
if (err) {
|
||||
return app.alertError(err.message);
|
||||
}
|
||||
|
||||
Categories.render(payload);
|
||||
});
|
||||
Categories.render(ajaxify.data.categories);
|
||||
|
||||
$('button[data-action="create"]').on('click', Categories.throwCreateModal);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user