(function(global) {
    'use strict';

    global.setupEventPersonsList = function setupEventPersonsList() {
        enableIfChecked('#persons-list', '.select-row:visible', '#persons-list .js-requires-selected-row');
        $('#persons-list [data-toggle=dropdown]').closest('.group').dropdown();

        $('#persons-list [data-filter]').on('click', function() {
            var personRows = $('#persons-list tr[data-person-roles]');
            var filters = $('#persons-list [data-filter]:checked').map(function() {
                return $(this).data('filter');
            }).get();

            var visibleEntries = personRows.filter(function() {
                var $this = $(this);

                return _.any(filters, function(filterName) {
                    return $this.data('person-roles')[filterName];
                });
            });

            personRows.hide();
            visibleEntries.show();
            $('#persons-list').trigger('indico:syncEnableIfChecked');
        });

        $('#persons-list td').on('mouseenter', function() {
            var $this = $(this);
            if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
                $this.attr('title', $this.text());
            }
        });

        $('#persons-list .tablesorter').tablesorter({
            cssAsc: 'header-sort-asc',
            cssDesc: 'header-sort-desc',
            headerTemplate: '',
            sortList: [[1, 0]]
        });

        $('#persons-list .js-count-label:not(.no-role)').qbubble({
            show: {
                event: 'mouseover'
            },
            hide: {
                fixed: true,
                delay: 100,
                event: 'mouseleave'
            },
            position: {
                my: 'left center',
                at: 'right center'
            },
            content: {
                text: function() {
                    var items = $(this).data('items');
                    var html = $('<ul class="qbubble-item-list">');

                    $.each(items, function() {
                        var item = $('<li>');
                        if (this.url) {
                            item.append($('<a>', {text: this.title, 'href': this.url}));
                        } else {
                            item.text(this.title);
                        }
                        html.append(item);
                    });

                    return html;
                }
            }
        });
    };


    global.showUndoWarning = function showUndoWarning(message, feedbackMessage, actionCallback) {
        cornerMessage({
            message: message,
            progressMessage: $T.gettext("Undoing previous operation..."),
            feedbackMessage: feedbackMessage,
            actionLabel: $T.gettext('Undo'),
            actionCallback: actionCallback,
            duration: 10000,
            feedbackDuration: 4000,
            class: 'warning'
        });
    };
})(window);

@@ -47,317 +47,60 @@
 bal.
-setupEventPersonsList = function setupEventPersonsList() %7B%0A        enableIfChecked('#persons-list', '.select-row:visible', '#persons-list .js-requires-selected-row');%0A        $('#persons-list %5Bdata-toggle=dropdown%5D').closest('.group').dropdown();%0A%0A        $('#persons-list %5Bdata-filter%5D').on('click', function
+refreshPersonFilters = function refreshPersonFilters
 () %7B
@@ -104,28 +104,24 @@
 ) %7B%0A        
-    
 var personRo
@@ -163,28 +163,24 @@
 n-roles%5D');%0A
-    
         var 
@@ -251,36 +251,32 @@
 ) %7B%0A            
-  
-  
 return $(this).d
@@ -286,28 +286,24 @@
 ('filter');%0A
-    
         %7D).g
@@ -313,28 +313,24 @@
 );%0A%0A        
-    
 var visibleE
@@ -373,36 +373,32 @@
 ) %7B%0A            
- 
-   
 var $this = $(th
@@ -399,28 +399,24 @@
 = $(this);%0A%0A
-    
             
@@ -468,36 +468,32 @@
                 
-   
- 
 return $this.dat
@@ -535,28 +535,20 @@
         
-    %7D);%0A    
+%7D);%0A
         
@@ -560,20 +560,16 @@
         
- 
-   
 personRo
@@ -575,28 +575,24 @@
 ows.hide();%0A
-    
         visi
@@ -614,28 +614,24 @@
 ();%0A        
-   
- 
 $('#persons-
@@ -676,29 +676,359 @@
 cked');%0A    
-    %7D
+%7D;%0A%0A    global.setupEventPersonsList = function setupEventPersonsList() %7B%0A        enableIfChecked('#persons-list', '.select-row:visible', '#persons-list .js-requires-selected-row');%0A        $('#persons-list %5Bdata-toggle=dropdown%5D').closest('.group').dropdown();%0A        $('#persons-list %5Bdata-filter%5D').on('click', refreshPersonFilters
 );%0A%0A        

Allow person filters to be explicitly refreshed