From: Radek Czajka Date: Thu, 14 Jul 2022 07:54:47 +0000 (+0200) Subject: Fix meta editor for ns-less tags. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/4a6513cd9ed9d66351b8973d3455204aad684fb5 Fix meta editor for ns-less tags. --- diff --git a/src/redakcja/static/js/wiki/view_properties.js b/src/redakcja/static/js/wiki/view_properties.js index 7e284a50..a7caf10a 100644 --- a/src/redakcja/static/js/wiki/view_properties.js +++ b/src/redakcja/static/js/wiki/view_properties.js @@ -266,8 +266,12 @@ // clear container $('.c', $fg).empty(); - - $("> [x-node='RDF'] > [x-node='Description'] > [x-node='"+tag+"'][x-ns='"+ns+"']", self.$edited).each(function() { + + let selector = "> [x-node='RDF'] > [x-node='Description'] > [x-node='"+tag+"']"; + if (ns) { + selector += "[x-ns='"+ns+"']"; + } + $(selector, self.$edited).each(function() { self.addMetaInput( $('.c', $fg), field,