Changes for page Desk allocation
Last modified by Ricardo Julio Rodríguez Fernández on 2025/06/02 10:02
From version 168.1
edited by Ricardo Julio Rodríguez Fernández
on 2024/03/11 18:59
on 2024/03/11 18:59
Change comment:
Uploaded new attachment "room.json", version 1.1
To version 214.1
edited by Abdullah Sharifi
on 2024/03/12 17:02
on 2024/03/12 17:02
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (1 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,3 +1,3 @@ 1 -{{kanban width="2 9%" source="https://portal.igfae.usc.es/xwiki/bin/download/Kanban%20playground%20for%20Ricardo/WebHome/jsonformatter.txt?rev=1.1" addBoardButton="true" addItemButton="true" removeBoardButton="true" removeBoardItem="true"}}2 -[{"id":" board2","title":"Working","color":"green","item":[{"title":"Item121"},{"title":"Item4"}]},{"id":"board3","title":"Done","color":"yellow","item":[{"title":"Item2"},{"title":"Item7"}]},{"id":"board1","title":"ToDo","color":"red","item":[{"title":"Item5"},{"title":"Item1"}]},{"id":"board4","title":"NewBoard01","color":"blue","item":[{"title":"Item1"}]},{"id":"board5","title":"NewBoard02","color":"orange","item":[{"title":"Item 3"}]},{"id":"board6","title":"New Board03","color":"yellow","item":[{"title":"Item1"},{"title":"Item 1"}]}]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"}],"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":[{"title":"person 003 - LHCB"}],"color":"red","title":"Room#: 03, Floor#: 2"},{"id":"room 05, floor 2","item":[{"title":"person 003 - LHCB"},{"title":"person 004 - NUCL"}],"color":"yellow","title":"Room#: 05, Floor#: 2"},{"id":"room 08, floor 1","item":[{"title":"person 119 - HQCD"},{"title":"person 135 - LHCB"},{"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 30, floor 1","item":[{"title":"person 354 - NEXT"}],"color":"green","title":"Room#: 30, 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"}] 3 3 {{/kanban}}
- room.json
-
- Size
-
... ... @@ -1,1 +1,1 @@ 1 - 5.5KB1 +1.8 KB - Content
-
... ... @@ -1,6 +1,6 @@ 1 1 [ 2 2 { 3 - "id": "r DI01f01o01s015",3 + "id": "room 01, floor 1", 4 4 "color": "green", 5 5 "item": [ 6 6 { ... ... @@ -7,10 +7,10 @@ 7 7 "title": "person 001 - LHCB" 8 8 } 9 9 ], 10 - "title": " rDI01f01o01s015"10 + "title": "Room#: 01, Floor#: 1" 11 11 }, 12 12 { 13 - "id": "r DI02f01o01s015",13 + "id": "room 02, floor 1", 14 14 "color": "blue", 15 15 "item": [ 16 16 { ... ... @@ -17,10 +17,10 @@ 17 17 "title": "person 002 - STRI" 18 18 } 19 19 ], 20 - "title": " rDI02f01o01s015"20 + "title": "Room#: 02, Floor#: 1" 21 21 }, 22 22 { 23 - "id": "r DI03f01o01s015",23 + "id": "room 03, floor 2", 24 24 "color": "red", 25 25 "item": [ 26 26 { ... ... @@ -27,30 +27,10 @@ 27 27 "title": "person 003 - LHCB" 28 28 } 29 29 ], 30 - "title": " rDI03f01o01s015"30 + "title": "Room#: 03, Floor#: 2" 31 31 }, 32 32 { 33 - "id": "rDI04f01o01s015", 34 - "color": "red", 35 - "item": [ 36 - { 37 - "title": "person 003 - LHCB" 38 - } 39 - ], 40 - "title": "rDI04f01o01s015" 41 - }, 42 - { 43 - "id": "rDI05f01o01s015", 44 - "color": "red", 45 - "item": [ 46 - { 47 - "title": "person 003 - LHCB" 48 - } 49 - ], 50 - "title": "rDI05f01o01s015" 51 - }, 52 - { 53 - "id": "rDI06f01o01s015", 33 + "id": "room 05, floor 2", 54 54 "color": "yellow", 55 55 "item": [ 56 56 { ... ... @@ -60,20 +60,10 @@ 60 60 "title": "person 004 - NUCL" 61 61 } 62 62 ], 63 - "title": " rDI06f01o01s015"43 + "title": "Room#: 05, Floor#: 2" 64 64 }, 65 65 { 66 - "id": "rDI07f01o01s015", 67 - "color": "red", 68 - "item": [ 69 - { 70 - "title": "person 003 - LHCB" 71 - } 72 - ], 73 - "title": "rDI07f01o01s015" 74 - }, 75 - { 76 - "id": "rDI08f01o01s015", 46 + "id": "room 08, floor 1", 77 77 "color": "orange", 78 78 "item": [ 79 79 { ... ... @@ -86,10 +86,10 @@ 86 86 "title": "person 078 - HQCD" 87 87 } 88 88 ], 89 - "title": " rDI08f01o01s015"59 + "title": "Room#: 08, Floor#: 1" 90 90 }, 91 91 { 92 - "id": "r DI09f01o01s015",62 + "id": "room 16, floor 1", 93 93 "color": "green", 94 94 "item": [ 95 95 { ... ... @@ -96,10 +96,10 @@ 96 96 "title": "person 123 - AUGE" 97 97 } 98 98 ], 99 - "title": " rDI09f01o01s015"69 + "title": "Room#: 16, Floor#: 1" 100 100 }, 101 101 { 102 - "id": "r DI10f01o01s015",72 + "id": "room 18, floor 1", 103 103 "color": "green", 104 104 "item": [ 105 105 { ... ... @@ -106,10 +106,10 @@ 106 106 "title": "person 256 - GRWA" 107 107 } 108 108 ], 109 - "title": " rDI10f01o01s015"79 + "title": "Room#: 18, Floor#: 1" 110 110 }, 111 111 { 112 - "id": "r DI11f01o01s015",82 + "id": "room 19, floor 1", 113 113 "color": "green", 114 114 "item": [ 115 115 { ... ... @@ -116,10 +116,10 @@ 116 116 "title": "person 354 - LACC" 117 117 } 118 118 ], 119 - "title": " rDI11f01o01s015"89 + "title": "Room#: 19, Floor#: 1" 120 120 }, 121 121 { 122 - "id": "r DI12f01o01s015",92 + "id": "room 30, floor 1", 123 123 "color": "green", 124 124 "item": [ 125 125 { ... ... @@ -126,202 +126,6 @@ 126 126 "title": "person 354 - NEXT" 127 127 } 128 128 ], 129 - "title": "rDI12f01o01s015" 130 - }, 131 - { 132 - "id": "rDI13f01o01s015", 133 - "color": "red", 134 - "item": [ 135 - { 136 - "title": "person 003 - LHCB" 137 - } 138 - ], 139 - "title": "rDI13f01o01s015" 140 - }, 141 - { 142 - "id": "rDI14f01o01s015", 143 - "color": "red", 144 - "item": [ 145 - { 146 - "title": "person 003 - LHCB" 147 - } 148 - ], 149 - "title": "rDI14f01o01s015" 150 - }, 151 - { 152 - "id": "rDT07f01o04s023", 153 - "color": "red", 154 - "item": [ 155 - { 156 - "title": "person 003 - LHCB" 157 - } 158 - ], 159 - "title": "rDT07f01o04s023" 160 - }, 161 - { 162 - "id": "rSR07f01o00s024", 163 - "color": "red", 164 - "item": [], 165 - "title": "rSR07f01o00s024" 166 - }, 167 - { 168 - "id": "rSR01f01o00s048", 169 - "color": "red", 170 - "item": [ 171 - { 172 - "title": "person 003 - LHCB" 173 - } 174 - ], 175 - "title": "rSR01f01o00s048" 176 - }, 177 - { 178 - "id": "rSR02f01o00s046", 179 - "color": "red", 180 - "item": [ 181 - { 182 - "title": "person 003 - LHCB" 183 - } 184 - ], 185 - "title": "rSR02f01o00s046" 186 - }, 187 - { 188 - "id": "rSR03f01o00s048", 189 - "color": "red", 190 - "item": [ 191 - { 192 - "title": "person 003 - LHCB" 193 - } 194 - ], 195 - "title": "rSR03f01o00s048" 196 - }, 197 - { 198 - "id": "rSR04f01o00s052", 199 - "color": "red", 200 - "item": [ 201 - { 202 - "title": "person 003 - LHCB" 203 - } 204 - ], 205 - "title": "rSR04f01o00s052" 206 - }, 207 - { 208 - "id": "rSC01f01o00s142", 209 - "color": "red", 210 - "item": [ 211 - { 212 - "title": "person 003 - LHCB" 213 - } 214 - ], 215 - "title": "rSC01f01o00s142" 216 - }, 217 - { 218 - "id": "rDT01f01o03s028", 219 - "color": "red", 220 - "item": [ 221 - { 222 - "title": "person 003 - LHCB" 223 - } 224 - ], 225 - "title": "rDT01f01o03s028" 226 - }, 227 - { 228 - "id": "rDT02f01o03s025", 229 - "color": "red", 230 - "item": [ 231 - { 232 - "title": "person 003 - LHCB" 233 - } 234 - ], 235 - "title": "rDT02f01o03s025" 236 - }, 237 - { 238 - "id": "rDT03f01o03s025", 239 - "color": "red", 240 - "item": [ 241 - { 242 - "title": "person 003 - LHCB" 243 - } 244 - ], 245 - "title": "rDT03f01o03s025" 246 - }, 247 - { 248 - "id": "rDT04f01o03s026", 249 - "color": "red", 250 - "item": [ 251 - { 252 - "title": "person 003 - LHCB" 253 - } 254 - ], 255 - "title": "rDT04f01o03s026" 256 - }, 257 - { 258 - "id": "rDD01f01o02s024", 259 - "color": "red", 260 - "item": [ 261 - { 262 - "title": "person 003 - LHCB" 263 - } 264 - ], 265 - "title": "rDD01f01o02s024" 266 - }, 267 - { 268 - "id": "rDD02f01o02s024", 269 - "color": "red", 270 - "item": [ 271 - { 272 - "title": "person 003 - LHCB" 273 - } 274 - ], 275 - "title": "rDD02f01o02s024" 276 - }, 277 - { 278 - "id": "rDD03f01o02s024", 279 - "color": "red", 280 - "item": [ 281 - { 282 - "title": "person 003 - LHCB" 283 - } 284 - ], 285 - "title": "rDD03f01o02s024" 286 - }, 287 - { 288 - "id": "rDD04f01o02s024", 289 - "color": "red", 290 - "item": [ 291 - { 292 - "title": "person 003 - LHCB" 293 - } 294 - ], 295 - "title": "rDD04f01o02s024" 296 - }, 297 - { 298 - "id": "rDD05f01o02s024", 299 - "color": "red", 300 - "item": [ 301 - { 302 - "title": "person 003 - LHCB" 303 - } 304 - ], 305 - "title": "rDD05f01o02s024" 306 - }, 307 - { 308 - "id": "rDD06f01o02s024", 309 - "color": "red", 310 - "item": [ 311 - { 312 - "title": "person 003 - LHCB" 313 - } 314 - ], 315 - "title": "rDD06f01o02s024" 316 - }, 317 - { 318 - "id": "rDD07f01o03s026", 319 - "color": "red", 320 - "item": [ 321 - { 322 - "title": "person 003 - LHCB" 323 - } 324 - ], 325 - "title": "rDD07f01o03s026" 99 + "title": "Room#: 30, Floor#: 1" 326 326 } 327 327 ]
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -1,0 +1,109 @@ 1 +window.onload = function() { 2 + const titleElements = document.getElementsByClassName('kanban-item-title'); 3 + const headerElements = document.getElementsByClassName('kanban-board-header'); 4 + const titleContainers = document.getElementsByClassName('kanban-item'); 5 + 6 + const kanbanContainer = document.querySelector('.kanban-container'); 7 + kanbanContainer.style.display = "flex"; 8 + kanbanContainer.style.justifyContent = "space-around" 9 + kanbanContainer.style.alignItems = "start" 10 + kanbanContainer.style.flexWrap = "wrap" 11 + 12 + for (let i = 0; i < titleElements.length; i++) { 13 + const titleElement = titleElements[i]; 14 + titleElement.style.padding = "2px 4px"; 15 + titleElement.style.borderRadius = "4px"; 16 + 17 + if (titleElement.textContent.includes('LHCB')) { 18 + titleElement.style.color = 'white'; 19 + titleElement.style.backgroundColor = 'red'; 20 + const parentElement = titleElement.closest('.kanban-item'); 21 + if (parentElement) { 22 + parentElement.style.backgroundColor = 'yellow'; 23 + } 24 + } 25 + if (titleElement.textContent.includes('STRI')) { 26 + titleElement.style.color = 'white'; 27 + titleElement.style.backgroundColor = 'navy'; 28 + const parentElement = titleElement.closest('.kanban-item'); 29 + if (parentElement) { 30 + parentElement.style.backgroundColor = '#FFDB58'; 31 + } 32 + } 33 + if (titleElement.textContent.includes('AUGE')) { 34 + titleElement.style.color = 'white'; 35 + titleElement.style.backgroundColor = '#FF7F50'; 36 + const parentElement = titleElement.closest('.kanban-item'); 37 + if (parentElement) { 38 + parentElement.style.backgroundColor = '#008080'; 39 + } 40 + } 41 + if (titleElement.textContent.includes('HQCD')) { 42 + titleElement.style.color = 'white'; 43 + titleElement.style.backgroundColor = 'crimson'; 44 + const parentElement = titleElement.closest('.kanban-item'); 45 + if (parentElement) { 46 + parentElement.style.backgroundColor = '#808000'; 47 + } 48 + } 49 + if (titleElement.textContent.includes('NUCL')) { 50 + titleElement.style.color = 'white'; 51 + titleElement.style.backgroundColor = '#E2725B'; 52 + const parentElement = titleElement.closest('.kanban-item'); 53 + if (parentElement) { 54 + parentElement.style.backgroundColor = '#708090'; 55 + } 56 + } 57 + if (titleElement.textContent.includes('GRWA')) { 58 + titleElement.style.color = 'white'; 59 + titleElement.style.backgroundColor = '#FF00FF'; 60 + const parentElement = titleElement.closest('.kanban-item'); 61 + if (parentElement) { 62 + parentElement.style.backgroundColor = '#F4C430'; 63 + } 64 + } 65 + if (titleElement.textContent.includes('NEXT')) { 66 + titleElement.style.color = 'white'; 67 + titleElement.style.backgroundColor = '#4B0082'; 68 + const parentElement = titleElement.closest('.kanban-item'); 69 + if (parentElement) { 70 + parentElement.style.backgroundColor = '#E0115F'; 71 + } 72 + } 73 + if (titleElement.textContent.includes('LACC')) { 74 + titleElement.style.color = 'white'; 75 + titleElement.style.backgroundColor = '#87CEEB'; 76 + const parentElement = titleElement.closest('.kanban-item'); 77 + if (parentElement) { 78 + parentElement.style.backgroundColor = '#98FF98'; 79 + } 80 + } 81 + } 82 + 83 + for (let i = 0; i < headerElements.length; i++) { 84 + const element = headerElements[i]; 85 + if (element.innerHTML.includes('Floor#: 2')) { 86 + for (let j = 0; j < element.classList.length; j++) { 87 + if (/kanban-header-\w+/.test(element.classList[j])) { 88 + element.classList.remove(element.classList[j]); 89 + element.style.backgroundColor = '#98FF98'; 90 + break; 91 + } 92 + } 93 + } 94 + } 95 + 96 + for (let i = 0; i < headerElements.length; i++) { 97 + const element = headerElements[i]; 98 + if (element.innerHTML.includes('Floor#: 1')) { 99 + for (let j = 0; j < element.classList.length; j++) { 100 + if (/kanban-header-\w+/.test(element.classList[j])) { 101 + element.classList.remove(element.classList[j]); 102 + element.style.backgroundColor = '#FF7F50'; 103 + break; 104 + } 105 + } 106 + } 107 + } 108 +}; 109 + - 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