Changes for page Desk allocation

Last modified by Ricardo Julio Rodríguez Fernández on 2025/05/13 08:31

From version 176.1
edited by Abdullah Sharifi
on 2024/03/11 19:35
Change comment: There is no comment for this version
To version 208.1
edited by Abdullah Sharifi
on 2024/03/12 16:53
Change comment: There is no comment for this version

Summary

Details

Page properties
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"}],"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"}]
2 2  {{/kanban}}
XWiki.JavaScriptExtension[0]
Code
... ... @@ -3,6 +3,14 @@
3 3   const headerElements = document.getElementsByClassName('kanban-board-header');
4 4   const titleContainers = document.getElementsByClassName('kanban-item');
5 5  
6 + const kanbanContainer = document.querySelector('.kanban-container');
7 + kanbanContainer,style.width = '300px'
8 + kanbanContainer.style.display = "flex";
9 + kanbanContainer.style.justifyContent = "space-between"
10 + kanbanContainer.style.gap = "2.5rem"
11 + kanbanContainer.style.alignItems = "start"
12 + kanbanContainer.style.flexWrap = "wrap"
13 +
6 6   for (let i = 0; i < titleElements.length; i++) {
7 7   const titleElement = titleElements[i];
8 8   titleElement.style.padding = "2px 4px";
... ... @@ -34,7 +34,7 @@
34 34   }
35 35   if (titleElement.textContent.includes('HQCD')) {
36 36   titleElement.style.color = 'white';
37 - titleElement.style.backgroundColor = '#E6E6FA';
45 + titleElement.style.backgroundColor = 'crimson';
38 38   const parentElement = titleElement.closest('.kanban-item');
39 39   if (parentElement) {
40 40   parentElement.style.backgroundColor = '#808000';
... ... @@ -56,6 +56,22 @@
56 56   parentElement.style.backgroundColor = '#F4C430';
57 57   }
58 58   }
67 + if (titleElement.textContent.includes('NEXT')) {
68 + titleElement.style.color = 'white';
69 + titleElement.style.backgroundColor = '#4B0082';
70 + const parentElement = titleElement.closest('.kanban-item');
71 + if (parentElement) {
72 + parentElement.style.backgroundColor = '#E0115F';
73 + }
74 + }
75 + if (titleElement.textContent.includes('LACC')) {
76 + titleElement.style.color = 'white';
77 + titleElement.style.backgroundColor = '#87CEEB';
78 + const parentElement = titleElement.closest('.kanban-item');
79 + if (parentElement) {
80 + parentElement.style.backgroundColor = '#98FF98';
81 + }
82 + }
59 59   }
60 60  
61 61   for (let i = 0; i < headerElements.length; i++) {
Name
... ... @@ -1,1 +1,1 @@
1 -Change background Color
1 +Styling boards
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