• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Collapsible Code Event Listeners

Marcel

Active member
#1
We have a few addons installed and it's getting a bit of a messy list having the code event listeners all in one view, especially as the listeners have the same names repeated under different addons.

It would be nice to at least collapse the list by Addon name.

Thanks,
 

Xon

Well-known member
#2
@Marcel you should see it when you've got ~100 add-ons installed and ~520 code event listeners.

There is a reason that all my hinted listeners copy the hint into the description!
 
Last edited:

Arty

Well-known member
#3
It can be done with simple template modification. Create admin template modification for code_event_listener_list

Search:
Code:
<xen:require js="js/xenforo/filter_list.js" />
Replace with:
Code:
<xen:require js="js/xenforo/filter_list.js" />
<script type="text/javascript">
$(document).ready(function() {
    $('.FilterList .textHeading').click(function() {
        var $this = $(this),
            collapsed = $this.hasClass('collapsed'),
            $children = $this.toggleClass('collapsed').next().children();

        if (collapsed) {
            $children.show();
        } else {
            $children.hide();
        }
    });
});
</script>
 

Marcel

Active member
#5
@Marcel you should see it when you've got ~100 add-ons installed and ~520 code event listeners.

There is a reason that all my hinted listeners copy the hint into the description!
250ish so far (although some of them are disabled). Still, it really does add up doesn't it?