Skip to content

Commit

Permalink
Merge branch 'update_v6.3_click' into update_v6.3_code
Browse files Browse the repository at this point in the history
  • Loading branch information
ffritze committed Sep 26, 2024
2 parents c0d10c1 + d31a1aa commit 94c3fba
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/main/webapp/metadataFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -457,21 +457,18 @@
}
}
const project_url = "https://fis.uni-stuttgart.de/converis/portal/detail/Project/";
var number = 0;
var project_metadata = "";
if(document.getElementById("metadata_project") !== null) {
project_metadata = document.getElementById("metadata_project");
number = document.getElementById("metadata_project").childElementCount;
if(number >= 2) {
if(project_metadata.getElementsByTagName("td") !== null) {
if(project_metadata.getElementsByTagName("span") !== null) {
var project_metadata = document.getElementById("metadata_project");
if(project_metadata.getElementsByTagName("td") !== null) {
var row = project_metadata.getElementsByTagName("td")[0];
if(row.getElementsByTagName("span") !== null) {
var number = row.getElementsByTagName("span").length;
if(number >= 1) {
const pattern = /[0-9]{6,}\b/gm;
var counter = number -1;
var row = project_metadata.getElementsByTagName("td")[0];
var fisid = [];
if(pattern.test(row.innerText)) {
fisid = row.innerText.match(pattern);
for (let i = 0; i < counter; i++) {
for (let i = 0; i < number; i++) {
var project = row.getElementsByTagName("span")[i].innerText;
row.getElementsByTagName("span")[i].innerHTML = '<a href="' + project_url + fisid[i] + '" target="_blank">' +project+ '</a>';
}
Expand Down

0 comments on commit 94c3fba

Please sign in to comment.