0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 13:10:14 +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
mock-fetch.js
mock-jquery.js
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