Changes for page Desk allocation

Last modified by Ricardo Julio Rodríguez Fernández on 2025/06/02 10:02

From version 175.1
edited by Abdullah Sharifi
on 2024/03/11 19:31
Change comment: There is no comment for this version
To version 242.1
edited by Ricardo Julio Rodríguez Fernández
on 2024/03/13 16:54
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.AbdullahSharifi
1 +XWiki.RicardoJulioRodriguezFernandez
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":"red","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 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,8 +1,18 @@
1 -window.onload = function() {
1 +setTimeout(changeStyles, 500);
2 +
3 +function changeStyles() {
2 2   const titleElements = document.getElementsByClassName('kanban-item-title');
3 3   const headerElements = document.getElementsByClassName('kanban-board-header');
4 4   const titleContainers = document.getElementsByClassName('kanban-item');
5 5  
8 + const kanbanContainer = document.querySelector('.kanban-container');
9 + if (kanbanContainer) {
10 + kanbanContainer.style.display = "flex";
11 + kanbanContainer.style.justifyContent = "left"
12 + kanbanContainer.style.alignItems = "start"
13 + kanbanContainer.style.flexWrap = "wrap"
14 + }
15 +
6 6   for (let i = 0; i < titleElements.length; i++) {
7 7   const titleElement = titleElements[i];
8 8   titleElement.style.padding = "2px 4px";
... ... @@ -24,6 +24,54 @@
24 24   parentElement.style.backgroundColor = '#FFDB58';
25 25   }
26 26   }
37 + if (titleElement.textContent.includes('AUGE')) {
38 + titleElement.style.color = 'white';
39 + titleElement.style.backgroundColor = '#FF7F50';
40 + const parentElement = titleElement.closest('.kanban-item');
41 + if (parentElement) {
42 + parentElement.style.backgroundColor = '#008080';
43 + }
44 + }
45 + if (titleElement.textContent.includes('HQCD')) {
46 + titleElement.style.color = 'white';
47 + titleElement.style.backgroundColor = 'crimson';
48 + const parentElement = titleElement.closest('.kanban-item');
49 + if (parentElement) {
50 + parentElement.style.backgroundColor = '#808000';
51 + }
52 + }
53 + if (titleElement.textContent.includes('NUCL')) {
54 + titleElement.style.color = 'white';
55 + titleElement.style.backgroundColor = '#E2725B';
56 + const parentElement = titleElement.closest('.kanban-item');
57 + if (parentElement) {
58 + parentElement.style.backgroundColor = '#708090';
59 + }
60 + }
61 + if (titleElement.textContent.includes('GRWA')) {
62 + titleElement.style.color = 'white';
63 + titleElement.style.backgroundColor = '#FF00FF';
64 + const parentElement = titleElement.closest('.kanban-item');
65 + if (parentElement) {
66 + parentElement.style.backgroundColor = '#F4C430';
67 + }
68 + }
69 + if (titleElement.textContent.includes('NEXT')) {
70 + titleElement.style.color = 'white';
71 + titleElement.style.backgroundColor = '#4B0082';
72 + const parentElement = titleElement.closest('.kanban-item');
73 + if (parentElement) {
74 + parentElement.style.backgroundColor = '#E0115F';
75 + }
76 + }
77 + if (titleElement.textContent.includes('LACC')) {
78 + titleElement.style.color = 'white';
79 + titleElement.style.backgroundColor = '#87CEEB';
80 + const parentElement = titleElement.closest('.kanban-item');
81 + if (parentElement) {
82 + parentElement.style.backgroundColor = '#98FF98';
83 + }
84 + }
27 27   }
28 28  
29 29   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