X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.rcfilters%2Fui%2Fmw.rcfilters.ui.ChangesListWrapperWidget.js;h=8716c68c4a1b1f69907ea0803554e50d6094dc4a;hb=68808a483321ac52d3cd227f2f8a4dfb2e6c1d3a;hp=b6a0a4fff496d901b31d389cec1a3ef76e7daf2e;hpb=12d69eca0355155f7f23269510539114d8dab605;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js index b6a0a4fff4..8716c68c4a 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js @@ -39,8 +39,7 @@ } ); this.changesListViewModel.connect( this, { invalidate: 'onModelInvalidate', - update: 'onModelUpdate', - newChangesExist: 'onNewChangesExist' + update: 'onModelUpdate' } ); this.$element @@ -49,8 +48,6 @@ // 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 */ @@ -240,44 +237,6 @@ .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( - $( '
' ) - .addClass( 'mw-rcfilters-ui-changesListWrapperWidget-newChanges' ) - .append( this.showNewChangesLink.$element ) - ); - }; - /** * Set up the highlight containers with all color circle indicators. *