mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-05 14:20:13 +01:00
20 lines
392 B
JavaScript
20 lines
392 B
JavaScript
'use strict';
|
|
|
|
|
|
define('forum/categories', ['categorySelector'], function (categorySelector) {
|
|
const categories = {};
|
|
|
|
categories.init = function () {
|
|
app.enterRoom('categories');
|
|
|
|
categorySelector.init($('[component="category-selector"]'), {
|
|
privilege: 'find',
|
|
onSelect: function (category) {
|
|
ajaxify.go('/category/' + category.cid);
|
|
},
|
|
});
|
|
};
|
|
|
|
return categories;
|
|
});
|