RCFilter UI: allow getParametersFromFilters to accept filter list
authorMoriel Schottlender <moriel@gmail.com>
Tue, 2 May 2017 21:17:45 +0000 (14:17 -0700)
committerMoriel Schottlender <moriel@gmail.com>
Tue, 2 May 2017 22:31:41 +0000 (15:31 -0700)
commit25c2ad91f29aeeef0fecd51a4385e1a7acc19724
treec768df00c44f06a7f9ada467dcac5e31e368cb9f
parent46c7dc15eac1973745dcbf90014d55921d5e59d3
RCFilter UI: allow getParametersFromFilters to accept filter list

Up until now we assumed that this method should output the parameters
from the state of the system, which meant that even if it accepted an
external list, it required that it be the format of this.groups.

Instead, allow the method to accept a "flat" list of filter name/values
and translate that to a parameter state without changing the model state.

Change-Id: Ib41da620a16d874326fe73220ae7a0114c555639
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js