File tree Expand file tree Collapse file tree 3 files changed +14
-11
lines changed
content_editor/static/content_editor Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ repos:
1414 - id : mixed-line-ending
1515 - id : trailing-whitespace
1616 - repo : https://github.com/adamchainz/django-upgrade
17- rev : 1.24 .0
17+ rev : 1.25 .0
1818 hooks :
1919 - id : django-upgrade
2020 args : [--target-version, "3.2"]
2121 - repo : https://github.com/astral-sh/ruff-pre-commit
22- rev : " v0.11.5 "
22+ rev : " v0.12.0 "
2323 hooks :
2424 - id : ruff
2525 args : [--unsafe-fixes]
3030 - id : biome-check
3131 args : [--unsafe]
3232 - repo : https://github.com/tox-dev/pyproject-fmt
33- rev : v2.5.1
33+ rev : v2.6.0
3434 hooks :
3535 - id : pyproject-fmt
3636 - repo : https://github.com/abravalheri/validate-pyproject
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Next version
1111- Prepared for the new object-based ``Script `` by moving from django-js-asset's
1212 ``JS `` to a script without attributes, and moved the configuration into an
1313 inline JSON blob.
14+ - Rewrote ``content_editor/save_shortcut.js `` without jQuery.
1415
1516
16177.2 (2025-01-27)
Original file line number Diff line number Diff line change 1- /* global django */
2- django . jQuery ( ( $ ) => {
3- $ ( document ) . keydown ( function handleKeys ( event ) {
4- if ( event . which === 83 && ( event . metaKey || event . ctrlKey ) ) {
5- $ ( "form input[name=_continue]" ) . click ( )
6- return false
7- }
8- } )
1+ window . addEventListener ( "keydown" , ( e ) => {
2+ let el
3+ if (
4+ e . key === "s" &&
5+ ( e . metaKey || e . ctrlKey ) &&
6+ ( el = document . querySelector ( "form input[name=_continue]" ) )
7+ ) {
8+ e . preventDefault ( )
9+ el . click ( )
10+ }
911} )
You can’t perform that action at this time.
0 commit comments