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
}
*/
mw.rcfilters.ui.MenuSelectWidget.prototype.onModelInitialize = function () {
this.menuInitialized = false;
+ // Set timeout for the menu to lazy build.
+ setTimeout( this.lazyMenuCreation.bind( this ) );
};
/**