Wykres commitów

13529 Commity (e83f3f6bde0ee1b741b162e7eb0e9b7fd8ac05d3)

Autor SHA1 Wiadomość Data
Matt Westcott e83f3f6bde Make 'no images' prompt consistent with documents, with "upload one now" prompt 2022-08-02 19:28:49 +02:00
Matt Westcott ae0495fa44 Add release note for changes to image chooser URL route names 2022-08-02 19:28:49 +02:00
Matt Westcott 7e91535fad Register image chooser views with a viewset 2022-08-02 19:28:49 +02:00
Matt Westcott 61d46d4193 Use ImageChosenResponseMixin for select-format response 2022-08-02 19:28:49 +02:00
Matt Westcott edbf195673 Make render_select_format_response into a mixin 2022-08-02 19:28:49 +02:00
Matt Westcott c72a9aba11 Move 'construct queryset' hook handling into the base chooser 2022-08-02 19:28:49 +02:00
Matt Westcott 8e47e61087 Let filter_object_list handle filtering on things other than filter_form 2022-08-02 19:28:49 +02:00
Matt Westcott 11cb6a1655 Make FilterForm responsible for doing the filtering 2022-08-02 19:28:49 +02:00
Matt Westcott f58cef9a33 Move locale filtering from snippets into the base chooser 2022-08-02 19:28:49 +02:00
Matt Westcott 79cd029e80 Use data-chooser-modal-search-filter on collection filter mixin
So that document and image choosers don't have to identify it by ID in their JS
2022-08-02 19:28:49 +02:00
Matt Westcott 5461ac8bab Remove now-redundant filter_object_list methods from image and document choosers 2022-08-02 19:28:49 +02:00
Matt Westcott 688bf620af Add configurable ordering to base chooser 2022-08-02 19:28:49 +02:00
Matt Westcott a0c1c43322 Expose a filtering_by_collection flag from the base chooser
This replaces the collection_id attribute on the document chooser
2022-08-02 19:28:49 +02:00
Matt Westcott ea4e7be178 Build up the filter form with mixins, so that we can reuse the collection filter code 2022-08-02 19:28:49 +02:00
Matt Westcott 3caa98abbe Change CSS selectors to the generic defaults 2022-08-02 19:28:49 +02:00
Matt Westcott 90454c75df Make ImageChooserModalOnloadHandlerFactory inherit from base implementation 2022-08-02 19:28:49 +02:00
Matt Westcott b2fa61d33b Convert image chooser modal onload handlers into a class 2022-08-02 19:28:49 +02:00
Matt Westcott 0b752a81ac Move validation into the base chooser modal implementation 2022-08-02 19:28:49 +02:00
Matt Westcott 49720cc08f Update form validation code to check all required fields and eliminate jquery 2022-08-02 19:28:49 +02:00
Matt Westcott e173ca9f22 Make chooser_select_format into a class-based view 2022-08-02 19:28:49 +02:00
Matt Westcott 21d172200c Use CreateViewMixin for image upload view 2022-08-02 19:28:49 +02:00
Matt Westcott 908d088b3e further cleanup of attributes/methods that belong in ImageCreationFormMixin 2022-08-02 19:28:49 +02:00
Matt Westcott 1b5bf70991 Move duplicate_found handler into ChooserUploadView 2022-08-02 19:28:49 +02:00
Matt Westcott da33faf220 Use ChosenViewMixin for image chosen view 2022-08-02 19:28:49 +02:00
Matt Westcott e831d8e6cc Use standard modal step names (choose / chosen) for image chooser 2022-08-02 19:28:49 +02:00
Matt Westcott 386a7d7c95 Make image chooser views inherit from ChooseViewMixin / ChooseResultsViewMixin 2022-08-02 19:28:49 +02:00
Matt Westcott 2be596212f Inherit from BaseChooseView on image chooser views 2022-08-02 19:28:49 +02:00
Matt Westcott c75e29b364 Use CreationFormMixin to handle image upload form 2022-08-02 19:28:49 +02:00
Matt Westcott 3aa69c5e31 Use the generic creation_form.html for the image chooser 2022-08-02 19:28:49 +02:00
Matt Westcott 81293058cf Make image chooser results.html inherit from generic template 2022-08-02 19:28:49 +02:00
Matt Westcott be368d1361 Make images chooser.html inherit from generic template
Remove the `w-tabs__wrapper` element from the generic template, as it isn't needed (its primary purpose is to handle the tab list overflowing/scrolling) and adds unwanted bottom margin.
2022-08-02 19:28:49 +02:00
Matt Westcott 68a265b1c1 Tweak wagtailimages/chooser/chooser.html to better match generic template 2022-08-02 19:28:49 +02:00
Matt Westcott 7ed50d5364 Use ModalPageFurnitureMixin to pass icon / page title 2022-08-02 19:28:49 +02:00
Matt Westcott e124a08e8d Use ContextMixin for image chooser views
so that we can use other mixins to populate the context
2022-08-02 19:28:49 +02:00
Matt Westcott dd892a6508 Use ChosenResponseMixin for returning 'image chosen' responses 2022-08-02 19:28:49 +02:00
Matt Westcott de2662ff56 Make chooser upload view into a class-based view 2022-08-02 19:28:49 +02:00
Matt Westcott db41ae4dde Make image_chosen view into a class-based view 2022-08-02 19:28:49 +02:00
Matt Westcott ade352d538 Split out get_object_list and filter_object_list methods 2022-08-02 19:28:49 +02:00
Matt Westcott f861bf991e Move collection filter into filter form 2022-08-02 19:28:49 +02:00
Matt Westcott 0ab0ecc78f Remove unnecessary seek operation
file.open does this already.
2022-08-02 18:53:56 +02:00
Matt Westcott 8ca7cc72d5 Remove now-unnecessary save_object methods 2022-08-02 18:53:56 +02:00
Matt Westcott 9d7f0d16c5 Handle deletion of original file in form.save 2022-08-02 18:53:56 +02:00
Matt Westcott 9667088e98 Move setting metadata / reindexing into form.save() 2022-08-02 18:53:56 +02:00
Matt Westcott fe73506747 Move file.open call into set-file-metadata method
If the file is already open this is the same as seek(0), so there are no unwanted side effects from this.
2022-08-02 18:53:56 +02:00
Matt Westcott fcb2776383 Add a _set_document_file_metadata helper method 2022-08-02 18:53:56 +02:00
Matt Westcott a9aa3cdc21 Add a _set_image_file_metadata helper method 2022-08-02 18:53:56 +02:00
Matt Westcott 112f2ea7da Fix focus() to focus the correct button in the 'chosen' vs 'unchosen' divs according to the widget state 2022-08-02 16:41:46 +02:00
Matt Westcott f91daa7f3e Use textContent rather than innerText for accessing title element
innerText is unimplemented by jest / jsdom, as per https://github.com/jsdom/jsdom/issues/1245
2022-08-02 16:41:45 +02:00
Matt Westcott d1f21993dc Deprecate createPageChooser 2022-08-02 16:38:28 +02:00
Matt Westcott e21e1d6644 Correctly handle edit link element being omitted from chooser widget 2022-08-02 16:37:24 +02:00