+
+ $newChanges
+ .hide()
+ .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.
+ *
+ * @param {jQuery} $content
+ */
+ mw.rcfilters.ui.ChangesListWrapperWidget.prototype.setupNewChangesButtonContainer = function ( $content ) {
+ 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 );
+
+ $content.before(
+ $( '<div>' )
+ .addClass( 'mw-rcfilters-ui-changesListWrapperWidget-newChanges' )
+ .append( this.showNewChangesLink.$element )
+ );