From: Stephane Bisson Date: Mon, 12 Feb 2018 16:35:19 +0000 (-0500) Subject: RCLFilters: make sticky filters default and current value equal X-Git-Tag: 1.31.0-rc.0~582^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=79ca05b80a71d4b2c8c5e63115435a34ad58778c;p=lhc%2Fweb%2Fwiklou.git RCLFilters: make sticky filters default and current value equal Bug: T186930 Change-Id: I6d2f5bd4b979fd1b66f3e37b8757daf93dd8b4a9 --- diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js index bb29b36191..eda8c0d36b 100644 --- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js +++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js @@ -266,17 +266,17 @@ } } + if ( this.isSticky() ) { + // If this group is sticky, then change the default according to the + // current selection. + this.defaultParams = this.getParamRepresentation( this.getSelectedState() ); + } + if ( changed || this.active !== active || this.currSelected !== item ) { - if ( this.isSticky() ) { - // If this group is sticky, then change the default according to the - // current selection. - this.defaultParams = this.getParamRepresentation( this.getSelectedState() ); - } - this.active = active; this.currSelected = item;