Currently working out of an initializer for my custom plugin - I want to be able to add an arbitrary class (locked-category) for each locked category, but can’t quite figure out how.
I’m aware that I can edit the template for topic-list-item
, however the class is conditional, dependent on whether the topic is locked or not.
Here’s the code in question:
TopicStatus.reopen({ statuses(){ if (this.topic.is_locked_down) { // I'd like to add the class to topic's classList } ... })
If anyone has ideas, anything is appreciated!