Changes for page Nice Display
Last modified by Benjamin Fischer on 2025/03/26 13:19
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -23,5 +23,5 @@ 23 23 'defaultOrder': 'asc' 24 24 }) 25 25 #set ($columns = ['affiliation', 'URL', "content", "tags", "tags", "tags", '_actions']) 26 -#livetable('research _groups' $columns $columnsProperties $options)26 +#livetable('research groups' $columns $columnsProperties $options) 27 27 {{/velocity}}
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -1,7 +1,7 @@ 1 -const tabName = "research _groups";1 +const tabName = "research groups"; 2 2 const tagCols = [ 3 3 ["Community", "KAT", "KET", "KfB", "KFN", "KFS", "KFSI", "KHuK", "RDS", "beyond ErUM"], 4 - ["Experiment", "CMS", "ATLAS", "Belle2", "CTA", "Auger" , "SKA", "IceCube"],4 + ["Experiment", "CMS", "ATLAS", "Belle2", "CTA", "Auger"], 5 5 ["Tags", true], 6 6 ] 7 7 ... ... @@ -46,17 +46,10 @@ 46 46 47 47 document.observe(`xwiki:livetable:${tabName}:receivedEntries`, ({memo: {data}}) => { 48 48 for (const row of data.rows) { 49 - const a = new Element("a", { href: row.URL }); 50 - a.innerHTML = row.affiliation_value.split("\n").map((a, i) => i ? a : `<b class="wikiexternallink">${a}</b>`).join("<br/>"); 51 - a.title = row.doc_title; 52 - if (row.content !== "-") { 53 - a.dataset.content = row.content; 54 - a.dataset.toggle = "popover"; 55 - } 49 + row.affiliation = `<a href="${row.URL}" class="wikiexternallink">${ 50 + row.affiliation_value.split("\n").map((a, i) => i ? a : `<b>${a}</b>`).join("<br/>") 51 + }</a>`; 56 56 57 - row.affiliation = a.outerHTML; 58 - delete a; 59 - 60 60 // tags 61 61 const tags = new Set(row.tags_value.slice(1, -1).split(", ")); 62 62 tagCols.forEach(([name, ...want], i) => ... ... @@ -69,20 +69,5 @@ 69 69 } 70 70 }); 71 71 72 -require(['jquery', 'bootstrap'], function($) { 73 - document.styleSheets[0].insertRule(`#mainContentArea .popover {max-width: 50%;}`) 74 74 75 - const ttApply = () => { 76 - $(`#${tabName} [data-toggle="popover"]`).popover({ 77 - html: true, 78 - container: `#mainContentArea`, 79 - trigger: "hover", 80 - }); 81 - }; 82 82 83 - document.observe(`xwiki:livetable:${tabName}:displayComplete`, ttApply); 84 - ttApply(); 85 -}); 86 - 87 - 88 -