mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
fixing category admin panel integration
This commit is contained in:
@@ -81,7 +81,8 @@ define(function() {
|
||||
name: $('#inputName').val(),
|
||||
description: $('#inputDescription').val(),
|
||||
icon: $('#new-category-modal i').val(),
|
||||
blockclass: $('#inputBlockclass').val()
|
||||
bgColor: '#0059b2',
|
||||
color: '#fff'
|
||||
};
|
||||
|
||||
socket.emit('api:admin.categories.create', category, function(err, data) {
|
||||
|
||||
@@ -135,7 +135,9 @@ define(function() {
|
||||
categoriesEl.className = 'category-list';
|
||||
for (x = 0; x < numCategories; x++) {
|
||||
info = data.categories[x];
|
||||
categoryEl.className = info.blockclass + (info.disabled === '1' ? ' disabled' : '');
|
||||
categoryEl.style.background = info.bgColor;
|
||||
categoryEl.style.color = info.color || '#fff';
|
||||
categoryEl.className = info.disabled === '1' ? ' disabled' : '';
|
||||
categoryEl.innerHTML = '<i class="fa ' + info.icon + '"></i> ' + info.name;
|
||||
categoryEl.setAttribute('data-cid', info.cid);
|
||||
categoriesFrag.appendChild(categoryEl.cloneNode(true));
|
||||
|
||||
Reference in New Issue
Block a user