Skip to content

Commit

Permalink
front - insert relation xml meta dc
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaetanbrl committed Apr 14, 2023
1 parent 16d2197 commit 78ce4e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion js/mviewerstudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ var newConfiguration = function (infos) {
id: infos?.id || mv.uuid(),
description: newDate.format("DD-MM-YYYY-HH-mm-ss"),
isFile: !!infos?.id,
publish: infos?.publish == 'true'
publish: infos?.publish == 'true',
relation: infos?.relation
};
//Store des parametres non gérés
savedParameters = {"application":[], "baselayers": {}};
Expand Down
8 changes: 4 additions & 4 deletions lib/mv.js
Original file line number Diff line number Diff line change
Expand Up @@ -1147,10 +1147,10 @@ var mv = (function () {
<dc:creator>${ creator }</dc:creator>
<dc:identifier>${ UUID }</dc:identifier>
<dc:keywords>${ keyworkds }</dc:keywords>
<dc:publisher>${ publisher }</dc:publisher>
<dc:publisher>${ organisation || publisher}</dc:publisher>
<dc:description>${ description }</dc:description>
<dc:date>${ dataDate }</dc:date>
<dc:organisation>${ organisation }</dc:organisation>
<dc:relation>${ relation }</dc:relation>
${ themes.length ? themes.join('\r\n') : ''}
</rdf:Description>
</rdf:RDF>`;
Expand Down Expand Up @@ -1221,7 +1221,7 @@ var mv = (function () {
const app_identifier = xml.getElementsByTagName("dc:identifier")[0]?.innerHTML
const app_keywords = xml.getElementsByTagName("dc:keywords")[0]?.innerHTML;
const dateXml = xml.getElementsByTagName("dc:date")[0]?.innerHTML;

const relation = xml.getElementsByTagName("dc:relation")[0]?.innerHTML;
const isPublish = xml.getElementsByTagName("config")[0].getAttribute("publish") == "true";

if (isPublish) {
Expand All @@ -1237,7 +1237,7 @@ var mv = (function () {
onlineCard.classList.add("d-none")
}

newConfiguration({id: app_identifier, isFile: true, date: dateXml, publish: isPublish});
newConfiguration({id: app_identifier, isFile: true, date: dateXml, publish: isPublish, relation: relation});
var proxy = $(xml).find("proxy");
var olscompletion = $(xml).find("olscompletion");
if (proxy) {
Expand Down

0 comments on commit 78ce4e9

Please sign in to comment.