0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
wagtail/client/tests
Matt Westcott 947a7883f9 Add a higher-level API for chooser modals
Previously, anything invoking the chooser modal needed to make its own call to ModalWorkflow, which meant it needed to import the corresponding 'onloadHandlers' dict, know the appropriate chosen response identifier to listen to, and know how to modify the chooser URL to pass parameters (if applicable). This would mean a lot of duplicated logic if there were multiple places where the modal is invoked.

Here we introduce a ChooserModal base class which encapsulates those details - a caller just needs to instantiate it with the base URL, and call `open` on it to open the modal (passing an options dict and a response callback).
2023-01-18 14:31:07 +00:00
..
integration Bump json5 from 2.2.0 to 2.2.3 in /client/tests/integration 2023-01-05 12:04:42 +00:00
adapter.js Update React and related dependencies to latest versions 2018-01-17 21:48:17 +02:00
mock-fetch.js Cleanup - eslint config fixes (#8543) 2022-05-20 16:08:13 +01:00
mock-jquery.js Use stubs in storybook 2021-05-03 17:05:56 +01:00
stubs.js Add a higher-level API for chooser modals 2023-01-18 14:31:07 +00:00
utils.js Add custom jest matcher for block id duplicate tests 2022-09-06 08:08:34 +10:00