Wykres commitów

11148 Commity (7423d72efe58d38e9a287999940b9b302cac58e4)

Autor SHA1 Wiadomość Data
Karl Hobley 3664bfa838 Convert table.js to use 2-space indentation 2021-03-17 23:32:35 +00:00
Karl Hobley 84010b92a7 Moved TableBlock block's table.js into client 2021-03-17 23:32:34 +00:00
Matt Westcott 24d393d7cb Fix setting of initial state for datetime fields 2021-03-17 23:32:34 +00:00
Karl Hobley 7bc28b46b1 Telepath: Date time inputs 2021-03-17 23:32:34 +00:00
Karl Hobley c50ee54659 Add unit tests for DraftailRichTextArea 2021-03-17 23:32:34 +00:00
Karl Hobley 0a2f71856a Add unit tests for AdminAutoHeightTextInput 2021-03-17 23:32:33 +00:00
Karl Hobley e23e7c1c6e Add unit tests for PageChooser 2021-03-17 23:32:33 +00:00
Karl Hobley ca87668cb9 Add unit tests for RadioSelect/BoundRadioSelect 2021-03-17 23:32:33 +00:00
Karl Hobley 1d894ee6e7 Add unit tests for Widget/BoundWidget 2021-03-17 23:32:33 +00:00
Karl Hobley a7bc294c34 Decorate all currently failing tests with unittest.expectedFailure 2021-03-17 23:32:32 +00:00
Matt Westcott eaa16a924a Consistently pass 'animate' flag via an opts dict 2021-03-17 23:32:32 +00:00
Matt Westcott a2fc9a1661 Clarify comment on grouped_child_blocks 2021-03-17 23:32:32 +00:00
Matt Westcott d0bd2cbf7a Rename StreamMenu onclick handler to onSelectBlockType 2021-03-17 23:32:31 +00:00
Matt Westcott 8e00fbb13c StreamField block deletion 2021-03-17 23:32:31 +00:00
Matt Westcott 43a63d5567 Add type checks to telepath tests 2021-03-17 23:32:31 +00:00
Matt Westcott 31012506bd Move telepath.js to utils 2021-03-17 23:32:30 +00:00
Matt Westcott e651c1cdbd Avoid creating references for trivial primitive values and short strings 2021-03-17 23:32:30 +00:00
Matt Westcott cd50b842dc Support unpacking of references 2021-03-17 23:32:30 +00:00
Matt Westcott 6111d66728 Add tests for telepath client 2021-03-17 23:32:30 +00:00
Matt Westcott 19cfd7a423 Move telepath module to components 2021-03-17 23:32:29 +00:00
Matt Westcott 7c53261d16 lint fix for blocks.js 2021-03-17 23:32:29 +00:00
Matt Westcott 323f9bc2d2 Assign ids to nodes that are referenced multiple times 2021-03-17 23:32:29 +00:00
Matt Westcott 99258f2a72 Introduce a two-pass mechanism for packing
Traversing the object structure with ValueContext.pack yields a tree of Node objects, on which we can call emit() to obtain the final JSONish representation. The nodes in this intermediate tree representation can be annotated to control the output, e.g. to indicate that it should be output with an ID attached.
2021-03-17 23:32:28 +00:00
Matt Westcott 1d815f7653 Foundation for reference-counting support
Move the packing logic into a one-shot ValueContext where we can stash previously-encountered sub-values for the current value being packed.
2021-03-17 23:32:28 +00:00
Matt Westcott 82dc18b24f add unit tests for telepath 2021-03-17 23:32:28 +00:00
Matt Westcott 38548f1257 add slide animation on block addition 2021-03-17 23:32:27 +00:00
Matt Westcott 2845c218c2 Focus form field on addition, and show menu for initially-empty streams 2021-03-17 23:32:27 +00:00
Matt Westcott a9cb60c44e Close menu after selecting
Turns out we need to insert the new block *after* the active menu for the animation to work...
2021-03-17 23:32:27 +00:00
Matt Westcott ebf249f685 use a dedicated counter for prefixes, not index 2021-03-17 23:32:27 +00:00
Matt Westcott b78b908251 Hook up onclick handler for menu 2021-03-17 23:32:26 +00:00
Matt Westcott e310cff2dd Replace StreamBlock.append with an insert method that works on arbitrary indexes 2021-03-17 23:32:26 +00:00
Matt Westcott a58439a9af Pass initial 'new child' states to block types that need to dynamically create children 2021-03-17 23:32:26 +00:00
Matt Westcott 50d168f280 Ensure StructBlock.get_default properly reflects child block defaults
StructBlock previously handled default values 'lazily' at render time, setting meta.default to fall back to an empty dict and calling the child block's get_default on missing items. We can't do this with client-side rendering because get_default isn't available on the client-side block definition (and adding it to the client-side block API would introduce unnecessary bloat). Instead, we fix StructBlock.get_default to correctly pick up the defaults from its child blocks, so that anything that makes use of StructBlock.get_default (e.g. a containing ListBlock / StreamBlock that needs to create StructBlock children on the fly) will have the full accurate data to hand.
2021-03-17 23:32:26 +00:00
Matt Westcott cf35306e64 Insert menus between blocks 2021-03-17 23:32:25 +00:00
Matt Westcott 00bfff1312 Construct StreamBlock menu 2021-03-17 23:32:25 +00:00
Matt Westcott 8cc2818922 Remove redundant duplicate calls to jQuery 2021-03-17 23:32:25 +00:00
Matt Westcott e9d278e16e Pass StreamBlock children as a grouped list 2021-03-17 23:32:24 +00:00
Matt Westcott b9cb68e311 Refactor a StreamChild class out of StreamBlock 2021-03-17 23:32:24 +00:00
Matt Westcott d7c1579a52 More specific exception for unpackable objects 2021-03-17 23:32:24 +00:00
Matt Westcott d18d23190d Update telepath JS code for new transport format 2021-03-17 23:32:24 +00:00
Matt Westcott d4dc02ad0f Rewrite wagtail.core.telepath to recursively pack constructor args
js_args and get_media methods no longer receive the context object, since they are not responsible for packing their own arguments.
2021-03-17 23:32:23 +00:00
Matt Westcott ac0c5d7ef5 Add telepath adapter for snippet chooser 2021-03-17 23:32:23 +00:00
Matt Westcott 61dc5fb07f Add telepath adapter for document chooser 2021-03-17 23:32:23 +00:00
Matt Westcott 950ef65056 Add telepath adapter for image chooser 2021-03-17 23:32:22 +00:00
Matt Westcott 3a6fb6f2b4 Have PageChooserAdapter inherit from WidgetAdapter so that we don't have to redefine media 2021-03-17 23:32:22 +00:00
Karl Hobley 14423d3fda Add telepath widget for Draftail 2021-03-17 23:32:22 +00:00
Karl Hobley 3d59778f7a Make WidgetAdapter pass through widget media 2021-03-17 23:32:22 +00:00
Karl Hobley 5fa50ad04a Add classes to field blocks 2021-03-17 23:32:21 +00:00
Karl Hobley 7ae32e39f7 Implement autosize text input 2021-03-17 23:32:21 +00:00
Matt Westcott 20bc76bf10 Support passing initial state to widget.render 2021-03-17 23:32:21 +00:00