mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 08:25:46 +01:00
addressed issue #158, where topic buttons in admin panel were not working
correctly
This commit is contained in:
@@ -40,12 +40,12 @@ $(document).ready(function() {
|
|||||||
var topicEls = topicsListEl.querySelectorAll('li'),
|
var topicEls = topicsListEl.querySelectorAll('li'),
|
||||||
numTopics = topicEls.length;
|
numTopics = topicEls.length;
|
||||||
for(var x=0;x<numTopics;x++) {
|
for(var x=0;x<numTopics;x++) {
|
||||||
if (topicEls[x].getAttribute('data-pinned')) topicEls[x].querySelector('[data-action="pin"]').className += ' active';
|
if (topicEls[x].getAttribute('data-pinned') === '1') topicEls[x].querySelector('[data-action="pin"]').className += ' active';
|
||||||
if (topicEls[x].getAttribute('data-locked')) topicEls[x].querySelector('[data-action="lock"]').className += ' active';
|
if (topicEls[x].getAttribute('data-locked') === '1') topicEls[x].querySelector('[data-action="lock"]').className += ' active';
|
||||||
if (topicEls[x].getAttribute('data-deleted')) topicEls[x].querySelector('[data-action="delete"]').className += ' active';
|
if (topicEls[x].getAttribute('data-deleted') === '1') topicEls[x].querySelector('[data-action="delete"]').className += ' active';
|
||||||
topicEls[x].removeAttribute('data-pinned');
|
// topicEls[x].removeAttribute('data-pinned');
|
||||||
topicEls[x].removeAttribute('data-locked');
|
// topicEls[x].removeAttribute('data-locked');
|
||||||
topicEls[x].removeAttribute('data-deleted');
|
// topicEls[x].removeAttribute('data-deleted');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user