addressed issue #158, where topic buttons in admin panel were not working

correctly
v1.18.x
Julian Lam 12 years ago
parent dd6c9e03cb
commit 26944ae686

@ -40,12 +40,12 @@ $(document).ready(function() {
var topicEls = topicsListEl.querySelectorAll('li'),
numTopics = topicEls.length;
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-locked')) topicEls[x].querySelector('[data-action="lock"]').className += ' active';
if (topicEls[x].getAttribute('data-deleted')) topicEls[x].querySelector('[data-action="delete"]').className += ' active';
topicEls[x].removeAttribute('data-pinned');
topicEls[x].removeAttribute('data-locked');
topicEls[x].removeAttribute('data-deleted');
if (topicEls[x].getAttribute('data-pinned') === '1') topicEls[x].querySelector('[data-action="pin"]').className += ' active';
if (topicEls[x].getAttribute('data-locked') === '1') topicEls[x].querySelector('[data-action="lock"]').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-locked');
// topicEls[x].removeAttribute('data-deleted');
}
});

Loading…
Cancel
Save