From 461c5c048f565ffbc0d9fad72f642c9de8704079 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 1 Apr 2025 16:15:27 +0200 Subject: [PATCH 1/2] Fix dialog actions on Enter --- src/redakcja/static/js/wiki/base.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/redakcja/static/js/wiki/base.js b/src/redakcja/static/js/wiki/base.js index ad0ca835..3ee92c4b 100644 --- a/src/redakcja/static/js/wiki/base.js +++ b/src/redakcja/static/js/wiki/base.js @@ -249,9 +249,7 @@ var self = this; /* bind buttons */ - $('button[data-ui-action]', self.$elem).click(function(event) { - event.preventDefault(); - + function dataUiAction(elem) { var action = $(this).attr('data-ui-action'); console.log("Button pressed, action: ", action); @@ -263,6 +261,15 @@ if(action == 'cancel') self.hide(); } + } + $('button[data-ui-action]', self.$elem).click(function(event) { + event.preventDefault(); + dataUiAction(this); + }).on('keydown'), function(event) { + if (event.key == 'Enter') { + event.preventDefault(); + dataUiAction(this); + } }); } -- 2.20.1 From 1ee716ea2b876762950786a9d9d2ba2f666530f9 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 15 Apr 2025 15:56:28 +0200 Subject: [PATCH 2/2] Source scan numbering --- src/sources/templates/sources/upload.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/sources/templates/sources/upload.html b/src/sources/templates/sources/upload.html index 39e64066..09847964 100644 --- a/src/sources/templates/sources/upload.html +++ b/src/sources/templates/sources/upload.html @@ -5,3 +5,21 @@ Skany źródła ładujemy w oryginalnej jakości. {% endblock %} + + +{% block add_css %} +{{ block.super }} + +{% endblock %} -- 2.20.1