diff --git a/public/language/en/topic.json b/public/language/en/topic.json index d7a4581ad6..278ceea37a 100644 --- a/public/language/en/topic.json +++ b/public/language/en/topic.json @@ -16,6 +16,7 @@ "thread_tools.move": "Move Thread", "thread_tools.delete": "Delete Thread", "load_categories": "Loading Categories", + "disabled_categories_note": "Disabled Categories are greyed out", "confirm_move": "Move", "favourites.not_logged_in.title": "Not Logged In", "favourites.not_logged_in.message": "Please log in in order to favourite this post" diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 7e10e1c762..42c6d8e6ab 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -37,9 +37,11 @@ define(function() { $('#delete_thread').on('click', function(e) { if (thread_state.deleted !== '1') { bootbox.confirm('Are you sure you want to delete this thread?', function(confirm) { - if (confirm) socket.emit('api:topic.delete', { - tid: tid - }); + if (confirm) { + socket.emit('api:topic.delete', { + tid: tid + }); + } }); } else { bootbox.confirm('Are you sure you want to restore this thread?', function(confirm) { @@ -87,6 +89,7 @@ define(function() { var loadingEl = document.getElementById('categories-loading'); if (loadingEl) { socket.once('api:categories.get', function(data) { + console.log(data); // Render categories var categoriesFrag = document.createDocumentFragment(), categoryEl = document.createElement('li'), @@ -102,7 +105,7 @@ define(function() { categoriesEl.className = 'category-list'; for (x = 0; x < numCategories; x++) { info = data.categories[x]; - categoryEl.className = info.blockclass; + categoryEl.className = info.blockclass + (info.disabled === '1' ? ' disabled' : ''); categoryEl.innerHTML = ' ' + info.name; categoryEl.setAttribute('data-cid', info.cid); categoriesFrag.appendChild(categoryEl.cloneNode(true)); diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index 5db4ea3fd2..1d9346a1ab 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -178,19 +178,22 @@ -