From: Moriel Schottlender Date: Tue, 1 Aug 2017 21:04:04 +0000 (-0700) Subject: RCFilters: Unsticky the 'limit' preference temporarily X-Git-Tag: 1.31.0-rc.0~2510 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=5e13bdf9d8b25f9b108b45c7134ae6dd11bd3b9b;p=lhc%2Fweb%2Fwiklou.git RCFilters: Unsticky the 'limit' preference temporarily Bug: T172156 Bug: T171514 Change-Id: I0bed6de70655a4a8a90ceb2f900ffbe98e643d33 --- diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js index 4051edaabf..9d2c3318ac 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js @@ -105,7 +105,11 @@ validate: $.isNumeric, sortFunc: function ( a, b ) { return Number( a.name ) - Number( b.name ); }, 'default': String( limitDefault ), - isSticky: true, + // Temporarily making this not sticky until we resolve the problem + // with the misleading preference. Note that if this is to be permanent + // we should remove all sticky behavior methods completely + // See T172156 + // isSticky: true, filters: [ 50, 100, 250, 500 ].map( function ( num ) { return controller._createFilterDataFromNumber( num, num ); } ) @@ -124,7 +128,8 @@ Number( i ); }, 'default': mw.user.options.get( 'rcdays', '30' ), - isSticky: true, + // Temporarily making this not sticky while limit is not sticky, see above + // isSticky: true, filters: [ // Hours (1, 2, 6, 12) 0.04166, 0.0833, 0.25, 0.5, @@ -810,9 +815,13 @@ /** * Update the limit default value * - * @param {number} newValue New value + * param {number} newValue New value */ - mw.rcfilters.Controller.prototype.updateLimitDefault = function ( newValue ) { + mw.rcfilters.Controller.prototype.updateLimitDefault = function ( /* newValue */ ) { + // HACK: Temporarily remove this from being sticky + // See T172156 + + /* if ( !$.isNumeric( newValue ) ) { return; } @@ -825,14 +834,20 @@ // Update the preference for this session mw.user.options.set( 'rcfilters-rclimit', newValue ); } + */ + return; }; /** * Update the days default value * - * @param {number} newValue New value + * param {number} newValue New value */ - mw.rcfilters.Controller.prototype.updateDaysDefault = function ( newValue ) { + mw.rcfilters.Controller.prototype.updateDaysDefault = function ( /* newValue */ ) { + // HACK: Temporarily remove this from being sticky + // See T172156 + + /* if ( !$.isNumeric( newValue ) ) { return; } @@ -845,6 +860,8 @@ // Update the preference for this session mw.user.options.set( 'rcdays', newValue ); } + */ + return; }; /**