RCFilters: Trim spaces in saved query names
authorMoriel Schottlender <moriel@gmail.com>
Fri, 30 Jun 2017 16:46:42 +0000 (09:46 -0700)
committerMoriel Schottlender <moriel@gmail.com>
Fri, 30 Jun 2017 17:18:05 +0000 (10:18 -0700)
commit96e89280ef0d72db4674eecf01e3c67fb76b310f
treef5d62a9d78a7a315645061d1334d2b75f395b1d8
parentf5ca17b6b74b9394d4e082c1d5d67ccf06309a95
RCFilters: Trim spaces in saved query names

Make sure to trim the spaces before saving, and also to verify that
names that contain spaces-only are considered empty.

Also make sure that the same behavior is working when saved queries
are edited - but since the save query button may be disabled, make
sure that any blur event on the input gets us out of the edit mode
either after save or without saving (if the string is invalid)

Bug: T169273
Change-Id: I16da9fcde0bf6be2b854243d7facc80d2860e458
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js