Tim Heap
385564afe5
Refactor edit handler JavaScript integration
...
Edit handler panels which required JavaScript provided the JavaScript in
a `render_js` function, the output of which was collected together and
inserted after the `<script>` tags in the footer. Now that the
`<script>` tags are at the top of the `<body>`, these collected
initialisations were failing when they could not find the elements.
A new set of widgets have been created: `AdminPageChooser`,
`AdminImageChooser`, `AdminSnippetChooser`, `AdminDocumentChooser`.
These widgets output the initialisation JavaScript in a `<script>` tag
immediately following the widget itself, assuming that the required
external libraries and scripts are now included further up in the page.
This is how the GeoDjango fields from Django work, as well as many other
third party widgets. It makes writing integrations for arbitary widgets
easy, as they do not have to know anything about Wagtail edit handlers.
This also removes the need for the `fixPrefix()` JavaScript function
wrapping all field initialisers. As the fields are initialised as they
are inserted in to the page, any scripts included with them are inserted
at the same time. Additionally, the `__prefix__` placeholder in empty
form fields is also present in the initialisation scripts, and is fixed
at the same time. A template tag `escapescript` has been added to help
with this, to prevent `<script>` initialisation blocks from prematurely
closing the `<script type='text/django-form-template'>` tags.
2014-10-08 17:24:48 +11:00
Tim Heap
f2b9615ac8
Move <script> tags to top of body
...
Having <script> tags at the bottom of the <body> caused some widgets
that relied upon JavaScript to fail, as the required libraries had not
been loaded at the point where the widgets were added to the page.
2014-10-08 11:47:09 +11:00
Karl Hobley
f5d37db916
Update images/index.rst
2014-10-07 17:39:45 +01:00
Matt Westcott
3f934d026d
Add 'fields' to modelform definitions to silence warnings, as per #674
2014-10-07 16:18:35 +01:00
Matt Westcott
dedaead8a0
release note / upgrade consideration note for #576
2014-10-07 16:08:39 +01:00
Matt Westcott
994d0bba3e
Merge branch 'page-locking-2' of https://github.com/kaedroho/wagtail into kaedroho-page-locking-2
2014-10-07 12:06:13 +01:00
Matt Westcott
03b1e289b9
Merge branch 'master' of github.com:torchbox/wagtail
2014-10-07 11:51:51 +01:00
Matt Westcott
aa669bb46a
Merge branch 'kaedroho-feature/crop-closeness'
2014-10-07 11:51:30 +01:00
Matt Westcott
4d99250406
release note for #610
2014-10-07 11:51:13 +01:00
Matt Westcott
c696318d92
here, have an apostrophe
2014-10-07 11:47:17 +01:00
Matt Westcott
fb543589b7
Merge branch 'feature/crop-closeness' of https://github.com/kaedroho/wagtail into kaedroho-feature/crop-closeness
2014-10-07 11:41:11 +01:00
Karl Hobley
d9355c6b38
Block editing of locked pages at the view level
2014-10-07 09:43:34 +01:00
Karl Hobley
38d856a2ef
Added try-except block into page lock permission migrations
2014-10-07 09:43:04 +01:00
Dave Cranwell
0de10c110a
renaming more of editors picks to promoted search results
2014-10-06 16:30:22 +01:00
Dave Cranwell
b4699d2b2e
minor style tweaks to main menu
2014-10-06 16:19:13 +01:00
Karl Hobley
98437e8721
Fixed missing import
2014-10-06 12:48:41 +01:00
Matt Westcott
4d1cf64cb0
Merge branch 'kaedroho-searchchanges/updateindex-multi-backend'
2014-10-06 13:23:32 +02:00
Matt Westcott
39ce3ce5ca
Release note for #556
2014-10-06 13:23:18 +02:00
Matt Westcott
ebb6223f63
Fix option handling in update_index and refactor to avoid unnecessary backend/backend_name juggling
2014-10-06 13:15:03 +02:00
Karl Hobley
7879b01d1f
Added permission for page locking
...
Also created migrations to give this permission to moderators
2014-10-06 12:09:30 +01:00
Matt Westcott
bdf92d45ea
Merge branch 'searchchanges/updateindex-multi-backend' of https://github.com/kaedroho/wagtail into kaedroho-searchchanges/updateindex-multi-backend
2014-10-06 12:43:28 +02:00
Karl Hobley
17dfe16215
Fixed Python 3 incompatible migration
2014-10-06 09:18:20 +01:00
Karl Hobley
65d0846c4a
Fixed migration conflicts
2014-10-06 09:15:31 +01:00
Karl Hobley
3c7e617f64
Merge remote-tracking branch 'torchbox/master' into page-locking-2
2014-10-06 09:13:20 +01:00
Karl Hobley
9a752a2210
Pass backend name to update_index command in tests
2014-10-05 14:24:37 +01:00
Matt Westcott
9b26fe1a78
Merge branch 'kaedroho-page-publish-refactor'
2014-10-04 18:46:08 +02:00
Matt Westcott
bfa4a806ed
document PageQuerySet.unpublish
2014-10-04 18:45:50 +02:00
Matt Westcott
d5c3452dd3
Use if request.method == 'POST' rather than if request.POST so that tests don't have to post dummy data
2014-10-04 18:28:34 +02:00
Matt Westcott
223dcbc14d
make unpublish() a method on PageQuerySet as suggested by @kaedroho in https://github.com/torchbox/wagtail/pull/566#commitcomment-8037361
2014-10-04 18:11:30 +02:00
Karl Hobley
e49f64aea3
Merge branch 'master' into page-publish-refactor
...
Conflicts:
CHANGELOG.txt
docs/releases/0.7.rst
2014-10-04 14:02:54 +01:00
Karl Hobley
4d954df20f
Merge branch 'master' into feature/crop-closeness
...
Conflicts:
docs/core_components/pages/writing_templates.rst
2014-10-04 13:50:45 +01:00
Matt Westcott
29e86a3416
Merge branch 'kaedroho-image-upload-hidden-fields'
2014-10-04 12:20:00 +02:00
Matt Westcott
ad0e70ac73
Merge branch 'image-upload-hidden-fields' of https://github.com/kaedroho/wagtail into kaedroho-image-upload-hidden-fields
2014-10-04 12:18:26 +02:00
Matt Westcott
bee18185f4
Update changelog - release note for #667
2014-10-04 12:15:16 +02:00
Matt Westcott
9837292ad1
Update 0.7.rst - release note for #667
2014-10-04 12:14:39 +02:00
Matt Westcott
bddf049e28
Merge pull request #667 from kaedroho/issue/312
...
Various wagtailimages database fixes
2014-10-04 12:04:46 +02:00
Matt Westcott
8ab9a4ff6c
Merge branch 'master' of github.com:torchbox/wagtail
2014-10-04 11:51:39 +02:00
Matt Westcott
a481132798
Merge branch 'kaedroho-docs-changes'
2014-10-04 11:50:56 +02:00
Matt Westcott
f1f01f8394
fix more dead links to wagtailsearch_for_python_developers
2014-10-04 11:50:46 +02:00
Matt Westcott
963051e311
minor copyediting
2014-10-04 11:46:06 +02:00
Matt Westcott
d495ad493a
Merge branch 'docs-changes' of https://github.com/kaedroho/wagtail into kaedroho-docs-changes
2014-10-04 11:30:36 +02:00
Karl Hobley
691dc7c795
Don't display hidden fields in upload form on image chooser
2014-10-03 17:26:24 +01:00
Karl Hobley
e21c54e7d0
Translation setup for wagtailsites
2014-10-03 17:11:35 +01:00
Karl Hobley
0b544bfb0a
Changelog for #665
2014-10-03 16:14:07 +01:00
Dave Cranwell
48324eab72
removed conflicting state for open submenus
2014-10-03 16:04:38 +01:00
Karl Hobley
f8bc358594
Merge pull request #665 from mope/661-fix-page-reordering
...
Fix page reordering in Wagtail Admin
2014-10-03 14:46:56 +01:00
Karl Hobley
5a48af83fd
Python 3 support for migration
2014-10-03 14:23:44 +01:00
Karl Hobley
e4449b3d79
Made focal_point_key not nullable
2014-10-03 14:22:36 +01:00
Karl Hobley
af436e9026
Added Django 1.7 migration for focal point blank=True. Fixes #664
2014-10-03 14:11:45 +01:00
Matt Westcott
7c00f23e6e
Release note for has_unpublished_changes fixes in #566
2014-10-03 07:53:15 +01:00