} );
this.changesListViewModel.connect( this, {
invalidate: 'onModelInvalidate',
- update: 'onModelUpdate',
- newChangesExist: 'onNewChangesExist'
+ update: 'onModelUpdate'
} );
this.$element
// We keep the timeout class here and remove it later, since at this
// stage it is still needed to identify that the timeout occurred.
.removeClass( 'mw-changeslist-empty' );
-
- this.setupNewChangesButtonContainer();
};
/* Initialization */
.fadeIn( 1000 );
};
- /**
- * Respond to changes list model newChangesExist
- *
- * @param {boolean} newChangesExist Whether new changes exist
- */
- mw.rcfilters.ui.ChangesListWrapperWidget.prototype.onNewChangesExist = function ( newChangesExist ) {
- this.showNewChangesLink.toggle( newChangesExist );
- };
-
- /**
- * Respond to the user clicking the 'show new changes' button
- */
- mw.rcfilters.ui.ChangesListWrapperWidget.prototype.onShowNewChangesClick = function () {
- this.controller.showNewChanges();
- };
-
- /**
- * Setup the container for the 'new changes' button.
- */
- mw.rcfilters.ui.ChangesListWrapperWidget.prototype.setupNewChangesButtonContainer = function () {
- this.showNewChangesLink = new OO.ui.ButtonWidget( {
- framed: false,
- label: mw.message( 'rcfilters-show-new-changes' ).text(),
- flags: [ 'progressive' ]
- } );
- this.showNewChangesLink.connect( this, { click: 'onShowNewChangesClick' } );
- this.showNewChangesLink.toggle( false );
-
- // HACK: Add the -newChanges div inside rcfilters-head, rather than right above us
- // Visually it's the same place, but by putting it inside rcfilters-head we are
- // able to use the min-height rule to prevent the page from jumping when this is added.
- this.$element.parent().find( '.rcfilters-head' ).append(
- $( '<div>' )
- .addClass( 'mw-rcfilters-ui-changesListWrapperWidget-newChanges' )
- .append( this.showNewChangesLink.$element )
- );
- };
-
/**
* Set up the highlight containers with all color circle indicators.
*