Javascript => JavaScript

pull/6433/head
Karl Hobley 2020-10-02 19:25:34 +01:00
rodzic 6e5f89adf2
commit 39d931d77d
41 zmienionych plików z 69 dodań i 69 usunięć

Wyświetl plik

@ -347,7 +347,7 @@ Changelog
2.6.1 (05.08.2019)
~~~~~~~~~~~~~~~~~~
* Fix: Prevent Javascript errors caused by unescaped quote characters in translation strings (Matt Westcott)
* Fix: Prevent JavaScript errors caused by unescaped quote characters in translation strings (Matt Westcott)
2.6 (01.08.2019)
@ -584,7 +584,7 @@ Changelog
* Increased max length of redirect URL field to 255 (Michael Harrison)
* Added documentation for new JS/CSS media files association with Draftail feature definitions (Ed Henderson)
* Added accessible colour contrast guidelines to the style guide (Catherine Farman)
* Admin modal views no longer rely on Javascript `eval()`, for better CSP compliance (Matt Westcott)
* Admin modal views no longer rely on JavaScript `eval()`, for better CSP compliance (Matt Westcott)
* Update editor guide for embeds and documents in rich text (Kevin Howbrook)
* Improved performance of sitemap generation (Michael van Tellingen, Bertrand Bordage)
* Added an internal API for autocomplete (Karl Hobley, Bertrand Bordage)
@ -1578,7 +1578,7 @@ Changelog
* Removed dependency on libsass (Tim Heap)
* Users without usernames can now be created and edited in the admin interface (Tim Heap)
* Added update notifications
* Javascript includes in the admin backend have been moved to the HTML header, to accommodate form widgets that render inline scripts that depend on libraries such as jQuery
* JavaScript includes in the admin backend have been moved to the HTML header, to accommodate form widgets that render inline scripts that depend on libraries such as jQuery
* Improvements to the layout of the admin menu footer.
* Menu items of custom apps are now highlighted when being used (Josh Barr)
* Added thousands separator for counters on dashboard
@ -1612,7 +1612,7 @@ Changelog
* The Page model now records the date/time that a page was first published, as the field `first_published_at`
* Increased the maximum length of a page slug from 50 to 255 characters
* Plain text fields in the page editor now use auto-expanding text areas
* Date / time pickers now consistently use times without seconds, to prevent Javascript behaviour glitches when focusing / unfocusing fields
* Date / time pickers now consistently use times without seconds, to prevent JavaScript behaviour glitches when focusing / unfocusing fields
* Added hooks `register_rich_text_embed_handler` and `register_rich_text_link_handler` for customising link / embed handling within rich text fields
* Added hook `construct_homepage_summary_items` for customising the site summary panel on the admin homepage
* No longer automatically tries to use Celery for sending notification emails
@ -1923,7 +1923,7 @@ Changelog
* Internationalisation of the admin backend
* Translations for Bulgarian, Catalan, Chinese, Galician, German, Greek, Polish, Romanian and Spanish. Partial translations for Basque and Mongolian.
* Stylesheets ported from Less to Sass, to eliminate dependency on an external CSS compiler
* Coffeescript replaced by vanilla Javascript
* Coffeescript replaced by vanilla JavaScript
* OEmbed supported as an alternative backend for wagtailembeds, eliminating dependency on Embedly
* Database supported as an alternative search backend, eliminating dependency on ElasticSearch
* Background tasks now fall back on in-process handling if Celery is not available (also eliminating Redis as a dependency)

Wyświetl plik

@ -3,7 +3,7 @@
Development
===========
Setting up a local copy of `the Wagtail git repository <https://github.com/wagtail/wagtail>`_ is slightly more involved than running a release package of Wagtail, as it requires `Node.js <https://nodejs.org/>`_ and NPM for building Javascript and CSS assets. (This is not required when running a release version, as the compiled assets are included in the release package.)
Setting up a local copy of `the Wagtail git repository <https://github.com/wagtail/wagtail>`_ is slightly more involved than running a release package of Wagtail, as it requires `Node.js <https://nodejs.org/>`_ and NPM for building JavaScript and CSS assets. (This is not required when running a release version, as the compiled assets are included in the release package.)
If you're happy to develop on a virtual machine, the `vagrant-wagtail-develop <https://github.com/wagtail/vagrant-wagtail-develop>`_ and `docker-wagtail-develop <https://github.com/wagtail/docker-wagtail-develop>`_ setup scripts are the fastest way to get up and running. They will provide you with a running instance of the `Wagtail Bakery demo site <https://github.com/wagtail/bakerydemo/>`_, with the Wagtail and bakerydemo codebases available as shared folders for editing on your host machine.

Wyświetl plik

@ -631,7 +631,7 @@ Hooks for customising the way users are directed through the process of creating
:template: path to a template to render to produce the menu item HTML
:get_context: a method that returns a context dictionary to pass to the template
:render_html: a method that returns the menu item HTML; by default, renders ``template`` with the context returned from ``get_context``
:Media: an inner class defining Javascript and CSS to import when this menu item is shown - see `Django form media <https://docs.djangoproject.com/en/stable/topics/forms/media/>`_
:Media: an inner class defining JavaScript and CSS to import when this menu item is shown - see `Django form media <https://docs.djangoproject.com/en/stable/topics/forms/media/>`_
The ``get_url``, ``is_shown``, ``get_context`` and ``render_html`` methods all accept a request object and a context dictionary containing the following fields:

Wyświetl plik

@ -454,7 +454,7 @@ Static files
WAGTAILADMIN_STATIC_FILE_VERSION_STRINGS = False
Static file URLs within the Wagtail admin are given a version-specific query string of the form ``?v=1a2b3c4d``, to prevent outdated cached copies of Javascript and CSS files from persisting after a Wagtail upgrade. To disable these, set ``WAGTAILADMIN_STATIC_FILE_VERSION_STRINGS`` to ``False``.
Static file URLs within the Wagtail admin are given a version-specific query string of the form ``?v=1a2b3c4d``, to prevent outdated cached copies of JavaScript and CSS files from persisting after a Wagtail upgrade. To disable these, set ``WAGTAILADMIN_STATIC_FILE_VERSION_STRINGS`` to ``False``.
API Settings
============

Wyświetl plik

@ -58,7 +58,7 @@ The ``Document`` model can now be overridden using the new ``WAGTAILDOCS_DOCUMEN
Removed django-compressor dependency
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wagtail no longer depends on the `django-compressor <http://django-compressor.readthedocs.org/>`_ library. While we highly recommend compressing and bundling the CSS and Javascript on your sites, using django-compressor places additional installation and configuration demands on the developer, so this has now been made optional.
Wagtail no longer depends on the `django-compressor <http://django-compressor.readthedocs.org/>`_ library. While we highly recommend compressing and bundling the CSS and JavaScript on your sites, using django-compressor places additional installation and configuration demands on the developer, so this has now been made optional.
Minor features

Wyświetl plik

@ -38,7 +38,7 @@ Other features
* Increased max length of redirect URL field to 255 (Michael Harrison)
* Added documentation for new JS/CSS media files association with Draftail feature definitions (Ed Henderson)
* Added accessible colour contrast guidelines to the style guide (Catherine Farman)
* Admin modal views no longer rely on Javascript ``eval()``, for better CSP compliance (Matt Westcott)
* Admin modal views no longer rely on JavaScript ``eval()``, for better CSP compliance (Matt Westcott)
* Update editor guide for embeds and documents in rich text (Kevin Howbrook)
* Improved performance of sitemap generation (Michael van Tellingen, Bertrand Bordage)
* Added an internal API for autocomplete (Karl Hobley)

Wyświetl plik

@ -13,4 +13,4 @@ What's new
Bug fixes
~~~~~~~~~
* Prevent Javascript errors caused by unescaped quote characters in translation strings (Matt Westcott)
* Prevent JavaScript errors caused by unescaped quote characters in translation strings (Matt Westcott)

Wyświetl plik

@ -128,7 +128,7 @@ class EditHandler:
# return any HTML that needs to be output on the edit page once per edit handler definition.
# Typically this will be used to define snippets of HTML within <script type="text/x-template"></script> blocks
# for Javascript code to work with.
# for JavaScript code to work with.
def html_declarations(self):
return ''

Wyświetl plik

@ -1421,7 +1421,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "

Wyświetl plik

@ -1814,7 +1814,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1822,11 +1822,11 @@ msgid ""
" "
msgstr ""
"\n"
"Pro použití Wagtailu je vyžadován Javascript, ale ten je momentálně vypnutý."
"Pro použití Wagtailu je vyžadován JavaScript, ale ten je momentálně vypnutý."
"<br />\n"
" Zde naleznete <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instrukce jak zapnout "
"Javascript ve vašem prohlížeči</a>.\n"
"JavaScript ve vašem prohlížeči</a>.\n"
" "
msgid "Skip to main content"

Wyświetl plik

@ -1797,7 +1797,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "

Wyświetl plik

@ -2319,7 +2319,7 @@ msgstr ""
#: templates/wagtailadmin/skeleton.html:26
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "

Wyświetl plik

@ -1396,7 +1396,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1404,7 +1404,7 @@ msgid ""
" "
msgstr ""
"\n"
" Javascript is requerido para usar Wagtail, pero está actualmente "
" JavaScript is requerido para usar Wagtail, pero está actualmente "
"deshabilitado.<br />\n"
" Aquí están las <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instrucciones para habilitar "

Wyświetl plik

@ -1423,7 +1423,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "

Wyświetl plik

@ -1482,7 +1482,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1490,9 +1490,9 @@ msgid ""
" "
msgstr ""
"\n"
"Wagtail vaatii toimiakseen Javascriptiä, mutta sen käyttö on estetty.<br />\n"
"Wagtail vaatii toimiakseen JavaScriptiä, mutta sen käyttö on estetty.<br />\n"
"Näillä <a href=\"https://www.enable-javascript.com/\" target=\"_blank\" rel="
"\"noopener noreferrer\">ohjeilla voit sallia Javascriptin käytön "
"\"noopener noreferrer\">ohjeilla voit sallia JavaScriptin käytön "
"selaimessasi</a>."
msgid "Go to Wagtail admin interface"

Wyświetl plik

@ -1782,7 +1782,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1790,7 +1790,7 @@ msgid ""
" "
msgstr ""
"\n"
" Javascript est nécessaire pour utiliser Wagtail, mais est "
" JavaScript est nécessaire pour utiliser Wagtail, mais est "
"actuellement désactivé.<br />\n"
" Voici les <a href=\"https://www.enable-javascript.com/\" target="
"\"_blank\" rel=\"noopener noreferrer\">instructions à suivre pour activer "

Wyświetl plik

@ -1749,7 +1749,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1757,10 +1757,10 @@ msgid ""
" "
msgstr ""
"\n"
"Az aminisztrációs felület működéséhez szükséges a Javascript futtatása, de "
"Az aminisztrációs felület működéséhez szükséges a JavaScript futtatása, de "
"ez jelenleg le van tiltva.<br />\n"
"Kérjük <a href=\"https://www.enable-javascript.com/\" target=\"_blank\" rel="
"\"noopener noreferrer\">engedélyezze a Javascript futtatást böngészőjében</"
"\"noopener noreferrer\">engedélyezze a JavaScript futtatást böngészőjében</"
"a>."
msgid "Skip to main content"

Wyświetl plik

@ -1780,7 +1780,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1788,7 +1788,7 @@ msgid ""
" "
msgstr ""
"\n"
" Javascript er krafa til þess að nota Wagtail, en það er ekki "
" JavaScript er krafa til þess að nota Wagtail, en það er ekki "
"kveikt á því.<br />\n"
" Hér eru <a href=\"https://www.enable-javascript.com/\" target="
"\"_blank\" rel=\"noopener noreferrer\">leiðbeiningar um hvernig á að kveikja "

Wyświetl plik

@ -1300,7 +1300,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1308,7 +1308,7 @@ msgid ""
" "
msgstr ""
"\n"
" Wagtail necessita Javascript per essere usato, ma al momento è "
" Wagtail necessita JavaScript per essere usato, ma al momento è "
"disabilitato.<br />\n"
" Qua trovi le <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">istruzioni su come abilitare "

Wyświetl plik

@ -1328,7 +1328,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "

Wyświetl plik

@ -1386,7 +1386,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1394,7 +1394,7 @@ msgid ""
" "
msgstr ""
"\n"
" Javascript er påkrevd for å bruke Wagtail, men er deaktivert."
" JavaScript er påkrevd for å bruke Wagtail, men er deaktivert."
"<br />\n"
" Her finner du <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instruksjoner for å aktivere "

Wyświetl plik

@ -1779,7 +1779,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1787,10 +1787,10 @@ msgid ""
" "
msgstr ""
"\n"
" Om Wagtail te kunnen gebruiken is Javascript vereist. Dit staat "
" Om Wagtail te kunnen gebruiken is JavaScript vereist. Dit staat "
"momenteel uitgeschakeld.<br />\n"
" De <a href=\"https://www.enable-javascript.com/\" target=\"_blank"
"\" rel=\"noopener noreferrer\">instructies om om Javascript in te schakelen "
"\" rel=\"noopener noreferrer\">instructies om om JavaScript in te schakelen "
"zijn hier te vinden</a>.\n"
" "

Wyświetl plik

@ -1462,7 +1462,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1470,7 +1470,7 @@ msgid ""
" "
msgstr ""
"\n"
" Javascript jest wymagany by korzystać z Wagtail, ale aktualnie "
" JavaScript jest wymagany by korzystać z Wagtail, ale aktualnie "
"jest wyłączony.<br />\n"
" Tutaj znajdziesz <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instrukcje jak go uruchomić</"

Wyświetl plik

@ -1619,7 +1619,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1627,7 +1627,7 @@ msgid ""
" "
msgstr ""
"\n"
" Javascript é necessário para usar o Wagtail, mas atualmente está "
" JavaScript é necessário para usar o Wagtail, mas atualmente está "
"desativado.<br />\n"
" Aqui estão as <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instruções sobre como ativar o "

Wyświetl plik

@ -1798,7 +1798,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1806,7 +1806,7 @@ msgid ""
" "
msgstr ""
"\n"
" O Javascript é necessário para usar o Wagtail, mas neste momento "
" O JavaScript é necessário para usar o Wagtail, mas neste momento "
"está desativado.<br />\n"
" Aqui estão as <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instruções para ativar o "

Wyświetl plik

@ -1811,7 +1811,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1819,7 +1819,7 @@ msgid ""
" "
msgstr ""
"\n"
" Wagtail are nevoie de Javascript, care în prezent e deactivat."
" Wagtail are nevoie de JavaScript, care în prezent e deactivat."
"<br />\n"
" Vezi <a href=\"https://www.enable-javascript.com/\" target="
"\"_blank\" rel=\"noopener noreferrer\">instrucțiuni de activare JavaScript "

Wyświetl plik

@ -1860,7 +1860,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1868,7 +1868,7 @@ msgid ""
" "
msgstr ""
"\n"
"Javascript требуется для использования Wagtail, но в настоящее время он "
"JavaScript требуется для использования Wagtail, но в настоящее время он "
"отключен. <br />\n"
"Вот <a href=\"https://www.enable-javascript.com/\" target=\"_blank\" rel="
"\"noopener noreferrer\">инструкции, как включить JavaScript в вашем веб-"

Wyświetl plik

@ -1777,7 +1777,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "
@ -1785,7 +1785,7 @@ msgid ""
" "
msgstr ""
"\n"
"Javascript krävs för att använda Wagtail, men det är för närvarande "
"JavaScript krävs för att använda Wagtail, men det är för närvarande "
"inaktiverat.<br />\n"
"Här är <a href=\"https://www.enable-javascript.com/\" target=\"_blank\" rel="
"\"noopener noreferrer\">anvisningarna för hur du aktiverar JavaScript i din "

Wyświetl plik

@ -1696,7 +1696,7 @@ msgstr ""
msgid ""
"\n"
" Javascript is required to use Wagtail, but it is currently "
" JavaScript is required to use Wagtail, but it is currently "
"disabled.<br />\n"
" Here are the <a href=\"https://www.enable-javascript.com/\" "
"target=\"_blank\" rel=\"noopener noreferrer\">instructions how to enable "

Wyświetl plik

@ -45,7 +45,7 @@ WAGTAILADMIN_PROVIDED_LANGUAGES = [
]
# Translatable strings to be made available to Javascript code
# Translatable strings to be made available to JavaScript code
# as the wagtailConfig.STRINGS object
def get_js_translation_strings():
return {

Wyświetl plik

@ -1,7 +1,7 @@
{% load wagtailadmin_tags %}
{% comment %}
Javascript declarations to be included on the 'create page' and 'edit page' views
JavaScript declarations to be included on the 'create page' and 'edit page' views
{% endcomment %}
{% allow_unicode_slugs as unicode_slugs_enabled %}

Wyświetl plik

@ -78,7 +78,7 @@
{{ action_menu.media.js }}
{% comment %}
Additional HTML code that edit handlers define through 'html_declarations'. (Technically this isn't Javascript, but it will generally be data that exists for Javascript to work with...)
Additional HTML code that edit handlers define through 'html_declarations'. (Technically this isn't JavaScript, but it will generally be data that exists for JavaScript to work with...)
{% endcomment %}
{{ edit_handler.html_declarations }}

Wyświetl plik

@ -103,7 +103,7 @@
{{ action_menu.media.js }}
{% comment %}
Additional HTML code that edit handlers define through 'html_declarations'. (Technically this isn't Javascript, but it will generally be data that exists for Javascript to work with...)
Additional HTML code that edit handlers define through 'html_declarations'. (Technically this isn't JavaScript, but it will generally be data that exists for JavaScript to work with...)
{% endcomment %}
{{ edit_handler.html_declarations }}

Wyświetl plik

@ -74,7 +74,7 @@
<![endif]-->
<noscript class="capabilitymessage">
{% blocktrans %}
Javascript is required to use Wagtail, but it is currently disabled.<br />
JavaScript is required to use Wagtail, but it is currently disabled.<br />
Here are the <a href="https://www.enable-javascript.com/" target="_blank" rel="noopener noreferrer">instructions how to enable JavaScript in your web browser</a>.
{% endblocktrans %}
</noscript>

Wyświetl plik

@ -14,7 +14,7 @@ class FilteredSelect(forms.Select):
`filter_values` list are shown.
filter_field and filter_values are inserted as 'data-' attributes on the rendered HTML, where
they are picked up by the Javascript behaviour code -
they are picked up by the JavaScript behaviour code -
see wagtailadmin/js/filtered-select.js for an example of how these attributes are configured.
"""

Wyświetl plik

@ -134,8 +134,8 @@ class Block(metaclass=BaseBlock):
def js_initializer(self):
"""
Returns a Javascript expression string, or None if this block does not require any
Javascript behaviour. This expression evaluates to an initializer function, a function that
Returns a JavaScript expression string, or None if this block does not require any
JavaScript behaviour. This expression evaluates to an initializer function, a function that
takes the ID prefix and applies JS behaviour to the block instance with that value and prefix.
The parent block of this block (or the top-level page code) must ensure that this

Wyświetl plik

@ -1,7 +1,7 @@
import re
# helpers for Javascript expression formatting
# helpers for JavaScript expression formatting
def indent(string, depth=1):
@ -11,9 +11,9 @@ def indent(string, depth=1):
def js_dict(d):
"""
Return a Javascript expression string for the dict 'd'.
Return a JavaScript expression string for the dict 'd'.
Keys are assumed to be strings consisting only of JS-safe characters, and will be quoted but not escaped;
values are assumed to be valid Javascript expressions and will be neither escaped nor quoted (but will be
values are assumed to be valid JavaScript expressions and will be neither escaped nor quoted (but will be
wrapped in parentheses, in case some awkward git decides to use the comma operator...)
"""
dict_items = [

Wyświetl plik

@ -142,7 +142,7 @@ STATICFILES_DIRS = [
]
# ManifestStaticFilesStorage is recommended in production, to prevent outdated
# Javascript / CSS assets being served from cache (e.g. after a Wagtail upgrade).
# JavaScript / CSS assets being served from cache (e.g. after a Wagtail upgrade).
# See https://docs.djangoproject.com/en/{{ docs_version }}/ref/contrib/staticfiles/#manifeststaticfilesstorage
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'

Wyświetl plik

@ -532,7 +532,7 @@ class BackendTests(WagtailTestUtils):
])
def test_plain_text_single_word(self):
results = self.backend.search(PlainText('Javascript'),
results = self.backend.search(PlainText('JavaScript'),
models.Book.objects.all())
self.assertSetEqual({r.title for r in results},
{'JavaScript: The Definitive Guide',
@ -545,7 +545,7 @@ class BackendTests(WagtailTestUtils):
self.assertSetEqual({r.title for r in results}, set())
def test_plain_text_multiple_words_or(self):
results = self.backend.search(PlainText('Javascript Definitive',
results = self.backend.search(PlainText('JavaScript Definitive',
operator='or'),
models.Book.objects.all())
self.assertSetEqual({r.title for r in results},
@ -553,7 +553,7 @@ class BackendTests(WagtailTestUtils):
'JavaScript: The good parts'})
def test_plain_text_multiple_words_and(self):
results = self.backend.search(PlainText('Javascript Definitive',
results = self.backend.search(PlainText('JavaScript Definitive',
operator='and'),
models.Book.objects.all())
self.assertSetEqual({r.title for r in results},

Wyświetl plik

@ -54,7 +54,7 @@ class Migration(migrations.Migration):
name='ProgrammingGuide',
fields=[
('book_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='searchtests.Book')),
('programming_language', models.CharField(choices=[('py', 'Python'), ('js', 'Javascript'), ('rs', 'Rust')], max_length=255)),
('programming_language', models.CharField(choices=[('py', 'Python'), ('js', 'JavaScript'), ('rs', 'Rust')], max_length=255)),
],
bases=('searchtests.book',),
),

Wyświetl plik

@ -99,7 +99,7 @@ class Novel(Book):
class ProgrammingGuide(Book):
programming_language = models.CharField(max_length=255, choices=[
('py', "Python"),
('js', "Javascript"),
('js', "JavaScript"),
('rs', "Rust"),
])