From: Moriel Schottlender Date: Wed, 22 Nov 2017 00:37:32 +0000 (-0800) Subject: RCFilters: Update URL even when we skip fetching X-Git-Tag: 1.31.0-rc.0~1431^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=9775f9ddb24e77bc871e2007b446a0e5d2684f47;p=lhc%2Fweb%2Fwiklou.git RCFilters: Update URL even when we skip fetching In some cases, when the selected value of the filters have not changed, we don't reload the results. However, we should still update the URL values. Change-Id: Iff81b4ca1b78848813b2eb8d55f0f5f5e614b424 --- diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js index 5386291f7c..0cec3ffe52 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js @@ -400,9 +400,12 @@ * Reset to default filters */ mw.rcfilters.Controller.prototype.resetToDefaults = function () { - if ( this.applyParamChange( this._getDefaultParams() ) ) { + var params = this._getDefaultParams(); + if ( this.applyParamChange( params ) ) { // Only update the changes list if there was a change to actual filters this.updateChangesList(); + } else { + this.uriProcessor.updateURL( params ); } }; @@ -425,6 +428,8 @@ if ( this.applyParamChange( {} ) ) { // Only update the changes list if there was a change to actual filters this.updateChangesList(); + } else { + this.uriProcessor.updateURL(); } if ( highlightedFilterNames ) { @@ -712,6 +717,8 @@ if ( this.applyParamChange( params ) ) { // Update changes list only if there was a difference in filter selection this.updateChangesList(); + } else { + this.uriProcessor.updateURL( params ); } // Log filter grouping