RCFilters: Only show 'no filters' when actually none were found
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / ui / mw.rcfilters.ui.MenuSelectWidget.js
index c12e10e..2bb0fdf 100644 (file)
                                        views: footerData.views
                                };
 
-                       this.footers.push( adjustedData );
+                       if ( !footerData.disabled ) {
+                               this.footers.push( adjustedData );
 
-                       if ( isSticky ) {
-                               this.$element.append( adjustedData.$element );
-                       } else {
-                               this.$body.append( adjustedData.$element );
+                               if ( isSticky ) {
+                                       this.$element.append( adjustedData.$element );
+                               } else {
+                                       this.$body.append( adjustedData.$element );
+                               }
                        }
                }.bind( this ) );
 
 
                        this.emit( 'itemVisibilityChange' );
                }
+
+               this.noResults.toggle( !this.getItems().some( function ( item ) {
+                       return item.isVisible();
+               } ) );
        };
 
        /**