Changes for page Material Collection

Last modified by Judith Steinfeld on 2025/06/03 11:13

From version 53.6
edited by admin
on 2024/10/21 12:47
Change comment: There is no comment for this version
To version 53.5
edited by admin
on 2024/10/21 12:31
Change comment: There is no comment for this version

Summary

Details

XWiki.JavaScriptExtension[0]
Code
... ... @@ -1,4 +1,6 @@
1 1  document.observe('xwiki:livetable:loading', () => {
2 + // TODO: patch table
3 + // debugger;
2 2  });
3 3  
4 4  document.observe("xwiki:livetable:materials:receivedEntries", ({memo: {data}}) => {
... ... @@ -9,12 +9,13 @@
9 9  
10 10   for (let i = 0; i < li.length - 1; i++) // all but last
11 11   if (i !== 1) // also skip 2nd (the actual event)
12 - li[0].textContent = li[0].textContent; // remove link
14 + li[i].children[0].removeAttribute("href"); // remove link
13 13  
14 - li[li.length - 1].children[0].setAttribute("href", row.link_value);
16 + li[li.length - 1].children[0].href = row.link_value;
15 15  
16 16   row.doc_location = ol.outerHTML;
17 17   }
20 + // mangle data
18 18  });
19 19  
20 20