Merge "Fix 'Tags' padding to keep it farther from the edge and document the source...
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / ui / mw.rcfilters.ui.MenuSelectWidget.js
index cbb4350..04b7709 100644 (file)
                this.footers = [];
 
                // Parent
-               mw.rcfilters.ui.MenuSelectWidget.parent.call( this, $.extend( {
+               mw.rcfilters.ui.MenuSelectWidget.parent.call( this, $.extend( config, {
                        $autoCloseIgnore: this.$overlay,
                        width: 650,
                        // Our filtering is done through the model
                        filterFromInput: false
-               }, config ) );
+               } ) );
                this.setGroupElement(
                        $( '<div>' )
                                .addClass( 'mw-rcfilters-ui-menuSelectWidget-group' )
 
                this.menuInitialized = true;
 
+               // Create shared popup for highlight buttons
+               this.highlightPopup = new mw.rcfilters.ui.HighlightPopupWidget( this.controller );
+               this.$overlay.append( this.highlightPopup.$element );
+
                // Count groups per view
                $.each( groups, function ( groupName, groupModel ) {
                        if ( !groupModel.isHidden() ) {
                                                        widget.model,
                                                        widget.model.getInvertModel(),
                                                        filterItem,
+                                                       widget.highlightPopup,
                                                        {
                                                                $overlay: widget.$overlay
                                                        }