Changes for page Desk allocation
Last modified by Ricardo Julio Rodríguez Fernández on 2025/06/02 10:02
From version 170.1
edited by Ricardo Julio Rodríguez Fernández
on 2024/03/11 19:05
on 2024/03/11 19:05
Change comment:
There is no comment for this version
To version 234.1
edited by Abdullah Sharifi
on 2024/03/13 16:03
on 2024/03/13 16:03
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 1 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. RicardoJulioRodriguezFernandez1 +XWiki.AbdullahSharifi - Content
-
... ... @@ -1,2 +1,3 @@ 1 -{{kanban width="29%" source="https://portal.igfae.usc.es/xwiki/bin/downloadrev/Kanban%20playground%20for%20Ricardo/WebHome/room.json?rev=1.2" addBoardButton="true" addItemButton="true" removeBoardButton="true" removeBoardItem="true"}} 1 +{{kanban width="235px" source="https://portal.igfae.usc.es/xwiki/bin/view/Towards%20JSON/Rooms/?outputSyntax=plain&xpage=plain" addBoardButton="true" addItemButton="true" removeBoardButton="true" removeBoardItem="true"}} 2 +[{"id":"room 01, floor 1","item":[{"title":"person 001 - LHCB"},{"title":"person 003 - LHCB"},{"title":"person 003 - LHCB"},{"title":"person 135 - LHCB"}],"color":"green","title":"Room#: 01, Floor#: 1"},{"id":"room 02, floor 1","item":[{"title":"person 002 - STRI"}],"color":"blue","title":"Room#: 02, Floor#: 1"},{"id":"room 03, floor 2","item":[],"color":"red","title":"Room#: 03, Floor#: 2"},{"id":"room 05, floor 2","item":[{"title":"person 004 - NUCL"}],"color":"yellow","title":"Room#: 05, Floor#: 2"},{"id":"room 08, floor 1","item":[{"title":"person 119 - HQCD"},{"title":"person 078 - HQCD"}],"color":"orange","title":"Room#: 08, Floor#: 1"},{"id":"room 16, floor 1","item":[{"title":"person 123 - AUGE"}],"color":"green","title":"Room#: 16, Floor#: 1"},{"id":"room 18, floor 1","item":[{"title":"person 256 - GRWA"}],"color":"green","title":"Room#: 18, Floor#: 1"},{"id":"room 19, floor 1","item":[{"title":"person 354 - LACC"}],"color":"green","title":"Room#: 19, Floor#: 1"},{"id":"room 30, floor 1","item":[{"title":"person 354 - NEXT"}],"color":"green","title":"Room#: 30, Floor#: 1"}] 2 2 {{/kanban}}
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -1,0 +1,114 @@ 1 + 2 +const myTimeout = setTimeout(changeStyles, 1000); 3 + 4 +function changeStyles() { 5 + const titleElements = document.getElementsByClassName('kanban-item-title'); 6 + const headerElements = document.getElementsByClassName('kanban-board-header'); 7 + const titleContainers = document.getElementsByClassName('kanban-item'); 8 + 9 + const kanbanContainer = document.querySelector('.kanban-container'); 10 + if (kanbanContainer) { 11 + kanbanContainer.style.display = "flex"; 12 + kanbanContainer.style.justifyContent = "space-around" 13 + kanbanContainer.style.alignItems = "start" 14 + kanbanContainer.style.flexWrap = "wrap" 15 + } 16 + 17 + for (let i = 0; i < titleElements.length; i++) { 18 + const titleElement = titleElements[i]; 19 + titleElement.style.padding = "2px 4px"; 20 + titleElement.style.borderRadius = "4px"; 21 + 22 + if (titleElement.textContent.includes('LHCB')) { 23 + titleElement.style.color = 'white'; 24 + titleElement.style.backgroundColor = 'red'; 25 + const parentElement = titleElement.closest('.kanban-item'); 26 + if (parentElement) { 27 + parentElement.style.backgroundColor = 'yellow'; 28 + } 29 + } 30 + if (titleElement.textContent.includes('STRI')) { 31 + titleElement.style.color = 'white'; 32 + titleElement.style.backgroundColor = 'navy'; 33 + const parentElement = titleElement.closest('.kanban-item'); 34 + if (parentElement) { 35 + parentElement.style.backgroundColor = '#FFDB58'; 36 + } 37 + } 38 + if (titleElement.textContent.includes('AUGE')) { 39 + titleElement.style.color = 'white'; 40 + titleElement.style.backgroundColor = '#FF7F50'; 41 + const parentElement = titleElement.closest('.kanban-item'); 42 + if (parentElement) { 43 + parentElement.style.backgroundColor = '#008080'; 44 + } 45 + } 46 + if (titleElement.textContent.includes('HQCD')) { 47 + titleElement.style.color = 'white'; 48 + titleElement.style.backgroundColor = 'crimson'; 49 + const parentElement = titleElement.closest('.kanban-item'); 50 + if (parentElement) { 51 + parentElement.style.backgroundColor = '#808000'; 52 + } 53 + } 54 + if (titleElement.textContent.includes('NUCL')) { 55 + titleElement.style.color = 'white'; 56 + titleElement.style.backgroundColor = '#E2725B'; 57 + const parentElement = titleElement.closest('.kanban-item'); 58 + if (parentElement) { 59 + parentElement.style.backgroundColor = '#708090'; 60 + } 61 + } 62 + if (titleElement.textContent.includes('GRWA')) { 63 + titleElement.style.color = 'white'; 64 + titleElement.style.backgroundColor = '#FF00FF'; 65 + const parentElement = titleElement.closest('.kanban-item'); 66 + if (parentElement) { 67 + parentElement.style.backgroundColor = '#F4C430'; 68 + } 69 + } 70 + if (titleElement.textContent.includes('NEXT')) { 71 + titleElement.style.color = 'white'; 72 + titleElement.style.backgroundColor = '#4B0082'; 73 + const parentElement = titleElement.closest('.kanban-item'); 74 + if (parentElement) { 75 + parentElement.style.backgroundColor = '#E0115F'; 76 + } 77 + } 78 + if (titleElement.textContent.includes('LACC')) { 79 + titleElement.style.color = 'white'; 80 + titleElement.style.backgroundColor = '#87CEEB'; 81 + const parentElement = titleElement.closest('.kanban-item'); 82 + if (parentElement) { 83 + parentElement.style.backgroundColor = '#98FF98'; 84 + } 85 + } 86 + } 87 + 88 + for (let i = 0; i < headerElements.length; i++) { 89 + const element = headerElements[i]; 90 + if (element.innerHTML.includes('Floor#: 2')) { 91 + for (let j = 0; j < element.classList.length; j++) { 92 + if (/kanban-header-\w+/.test(element.classList[j])) { 93 + element.classList.remove(element.classList[j]); 94 + element.style.backgroundColor = '#98FF98'; 95 + break; 96 + } 97 + } 98 + } 99 + } 100 + 101 + for (let i = 0; i < headerElements.length; i++) { 102 + const element = headerElements[i]; 103 + if (element.innerHTML.includes('Floor#: 1')) { 104 + for (let j = 0; j < element.classList.length; j++) { 105 + if (/kanban-header-\w+/.test(element.classList[j])) { 106 + element.classList.remove(element.classList[j]); 107 + element.style.backgroundColor = '#FF7F50'; 108 + break; 109 + } 110 + } 111 + } 112 + } 113 +}; 114 + - Name
-
... ... @@ -1,0 +1,1 @@ 1 +Styling boards - Parse content
-
... ... @@ -1,0 +1,1 @@ 1 +No - Use this extension
-
... ... @@ -1,0 +1,1 @@ 1 +currentPage
- XWiki.XWikiRights[1]
-
- Allow/Deny
-
... ... @@ -1,0 +1,1 @@ 1 +Allow - Levels
-
... ... @@ -1,0 +1,1 @@ 1 +view - Users
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.XWikiGuest