From: Radek Czajka Date: Tue, 15 Apr 2025 13:56:28 +0000 (+0200) Subject: Source scan numbering X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/HEAD?ds=sidebyside;hp=1cc3cb0514586ece78aa7b03bf19e83e7b3789a3 Source scan numbering --- 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); + } }); } 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 %}