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 256.1
edited by Ricardo Julio Rodríguez Fernández
on 2024/04/21 12:57
Change comment: Uploaded new attachment "room.json", version 1.4

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.AbdullahSharifi
1 +XWiki.RicardoJulioRodriguezFernandez
Content
... ... @@ -1,2 +1,2 @@
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="250px" source="https://portal.igfae.usc.es/xwiki/bin/download/Kanban%20playground%20for%20Ricardo/WebHome/room.json?rev=1.2" addBoardButton="true" addItemButton="true" removeBoardButton="true" removeBoardItem="true"
2 2  {{/kanban}}
room.json
Size
... ... @@ -1,1 +1,1 @@
1 -1.8 KB
1 +1.7 KB
Content
... ... @@ -1,6 +1,6 @@
1 1  [
2 2   {
3 - "id": "room 01, floor 1",
3 + "id": "rDI01f01o00s00",
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": "Room#: 01, Floor#: 1"
10 + "title": "rDI01f01o00s00"
11 11   },
12 12   {
13 - "id": "room 02, floor 1",
13 + "id": "rDI02f01o00s00",
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": "Room#: 02, Floor#: 1"
20 + "title": "rDI02f01o00s00"
21 21   },
22 22   {
23 - "id": "room 03, floor 2",
23 + "id": "rDI03f02o00s00",
24 24   "color": "red",
25 25   "item": [
26 26   {
... ... @@ -27,10 +27,10 @@
27 27   "title": "person 003 - LHCB"
28 28   }
29 29   ],
30 - "title": "Room#: 03, Floor#: 2"
30 + "title": "rDI03f02o00s00"
31 31   },
32 32   {
33 - "id": "room 05, floor 2",
33 + "id": "rDI05f02o00s00",
34 34   "color": "yellow",
35 35   "item": [
36 36   {
... ... @@ -40,10 +40,10 @@
40 40   "title": "person 004 - NUCL"
41 41   }
42 42   ],
43 - "title": "Room#: 05, Floor#: 2"
43 + "title": "rDI05f02o00s00"
44 44   },
45 45   {
46 - "id": "room 08, floor 1",
46 + "id": "rDI08f01o00s00",
47 47   "color": "orange",
48 48   "item": [
49 49   {
... ... @@ -56,10 +56,10 @@
56 56   "title": "person 078 - HQCD"
57 57   }
58 58   ],
59 - "title": "Room#: 08, Floor#: 1"
59 + "title": "rDI08f01o00s00"
60 60   },
61 61   {
62 - "id": "room 16, floor 1",
62 + "id": "rDI09f01o00s00",
63 63   "color": "green",
64 64   "item": [
65 65   {
... ... @@ -66,10 +66,10 @@
66 66   "title": "person 123 - AUGE"
67 67   }
68 68   ],
69 - "title": "Room#: 16, Floor#: 1"
69 + "title": "rDI09f01o00s00"
70 70   },
71 71   {
72 - "id": "room 18, floor 1",
72 + "id": "rDI10f01o00s00",
73 73   "color": "green",
74 74   "item": [
75 75   {
... ... @@ -76,10 +76,10 @@
76 76   "title": "person 256 - GRWA"
77 77   }
78 78   ],
79 - "title": "Room#: 18, Floor#: 1"
79 + "title": "rDI10f01o00s00"
80 80   },
81 81   {
82 - "id": "room 19, floor 1",
82 + "id": "rDI11f01o00s00",
83 83   "color": "green",
84 84   "item": [
85 85   {
... ... @@ -86,10 +86,10 @@
86 86   "title": "person 354 - LACC"
87 87   }
88 88   ],
89 - "title": "Room#: 19, Floor#: 1"
89 + "title": "rDI11f01o00s00"
90 90   },
91 91   {
92 - "id": "room 30, floor 1",
92 + "id": "rDI12f01o00s00",
93 93   "color": "green",
94 94   "item": [
95 95   {
... ... @@ -96,6 +96,6 @@
96 96   "title": "person 354 - NEXT"
97 97   }
98 98   ],
99 - "title": "Room#: 30, Floor#: 1"
99 + "title": "rDI12f01o00s00"
100 100   }
101 101  ]
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,11 +24,59 @@
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++) {
30 30   const element = headerElements[i];
31 - if (element.innerHTML.includes('Floor#: 2')) {
89 + if (element.innerHTML.includes('f02')) {
32 32   for (let j = 0; j < element.classList.length; j++) {
33 33   if (/kanban-header-\w+/.test(element.classList[j])) {
34 34   element.classList.remove(element.classList[j]);
... ... @@ -41,7 +41,7 @@
41 41  
42 42   for (let i = 0; i < headerElements.length; i++) {
43 43   const element = headerElements[i];
44 - if (element.innerHTML.includes('Floor#: 1')) {
102 + if (element.innerHTML.includes('f01')) {
45 45   for (let j = 0; j < element.classList.length; j++) {
46 46   if (/kanban-header-\w+/.test(element.classList[j])) {
47 47   element.classList.remove(element.classList[j]);
Name
... ... @@ -1,1 +1,1 @@
1 -Change background Color
1 +Styling boards
XWiki.XWikiComments[0]
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.RicardoJulioRodriguezFernandez
Comment
... ... @@ -1,0 +1,1 @@
1 +https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Date
... ... @@ -1,0 +1,1 @@
1 +2024-03-13 17:21:41.315