X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ed7cd4d7271acd67bf366e4d320f9c49f07a50ea..a9b4700e3cd649a6dddc3b72dc0bd632f7841c74:/src/redakcja/static/js/wiki/view_properties.js diff --git a/src/redakcja/static/js/wiki/view_properties.js b/src/redakcja/static/js/wiki/view_properties.js index 3495197c..1fff64fe 100644 --- a/src/redakcja/static/js/wiki/view_properties.js +++ b/src/redakcja/static/js/wiki/view_properties.js @@ -119,9 +119,24 @@ if (field.value_type.hasLanguage) { span.attr('x-a-xml-lang', 'pl'); } - span.appendTo( - $("> [x-node='RDF'] > [x-node='Description']", self.$edited) - ); + + rdf = $("> [x-node='RDF']", self.$edited); + if (!rdf.length) { + rdf = $(""); + self.$edited.prepend(rdf); + self.$edited.prepend('\n '); + + } + rdfdesc = $("> [x-node='Description']", rdf); + if (!rdfdesc.length) { + rdfdesc = $(""); + rdf.prepend(rdfdesc); + rdf.prepend('\n '); + rdfdesc.append('\n '); + rdf.append('\n '); + } + span.appendTo(rdfdesc); + rdfdesc.append('\n '); self.displayMetaProperty($fg);