From 56c7f13479701644fd9c1e233fc52be0b90e4ab9 Mon Sep 17 00:00:00 2001 From: Silvio Hermann Date: Tue, 22 Oct 2024 09:20:38 +0200 Subject: [PATCH] MIR-1361 Added title attribute to ror link --- .../main/resources/META-INF/resources/js/mir/ror-search.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mir-module/src/main/resources/META-INF/resources/js/mir/ror-search.js b/mir-module/src/main/resources/META-INF/resources/js/mir/ror-search.js index 66c6f81c33..387dcc746f 100644 --- a/mir-module/src/main/resources/META-INF/resources/js/mir/ror-search.js +++ b/mir-module/src/main/resources/META-INF/resources/js/mir/ror-search.js @@ -93,7 +93,12 @@ const RORSearch = { for (const rorLink of rorLinks) { RORSearch.search(rorLink.href).then(data => { if (data.length > 0) { - rorLink.innerHTML = data[0].name; + if (data[0].name.length > 30) { + rorLink.innerHTML = data[0].name.substring(0, 30).trim() + " …"; + } else { + rorLink.innerHTML = data[0].name; + } + rorLink.setAttribute("title", data[0].name + " | " + data[0].id); } }); }