-( function ( mw ) {
+( function () {
/**
* A widget for the footer for the default view, allowing to switch views
*
this.controller = controller;
this.model = model;
- this.buttons = new OO.ui.ButtonGroupWidget( {
+ this.buttons = new mw.rcfilters.ui.GroupWidget( {
+ events: {
+ click: 'buttonClick'
+ },
items: [
new OO.ui.ButtonWidget( {
data: 'namespaces',
// Events
this.model.connect( this, { update: 'onModelUpdate' } );
- this.buttons.aggregate( { click: 'buttonClick' } );
this.buttons.connect( this, { buttonClick: 'onButtonClick' } );
this.$element
mw.rcfilters.ui.ViewSwitchWidget.prototype.onButtonClick = function ( buttonWidget ) {
this.controller.switchView( buttonWidget.getData() );
};
-}( mediaWiki ) );
+}() );