Changes for page Desk allocation

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

From version 207.1
edited by Abdullah Sharifi
on 2024/03/12 16:52
Change comment: There is no comment for this version
To version 169.1
edited by Ricardo Julio Rodríguez Fernández
on 2024/03/11 19:05
Change comment: Uploaded new attachment "room.json", version 1.2

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.AbdullahSharifi
1 +XWiki.RicardoJulioRodriguezFernandez
Content
... ... @@ -1,3 +1,3 @@
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"}]
1 +{{kanban width="29%" 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":"Item 121"},{"title":"Item 4"}]},{"id":"board3","title":"Done","color":"yellow","item":[{"title":"Item 2"},{"title":"Item 7"}]},{"id":"board1","title":"To Do","color":"red","item":[{"title":"Item 5"},{"title":"Item 1"}]},{"id":"board4","title":"New Board 01","color":"blue","item":[{"title":"Item 1"}]},{"id":"board5","title":"New Board 02","color":"orange","item":[{"title":"Item 3"}]},{"id":"board6","title":"New Board 03","color":"yellow","item":[{"title":"Item 1"},{"title":"Item 1"}]}]
3 3  {{/kanban}}
XWiki.JavaScriptExtension[0]
Code
... ... @@ -1,111 +1,0 @@
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.width = '300px'
8 - kanbanContainer.style.display = "flex";
9 - kanbanContainer.style.justifyContent = "center"
10 - kanbanContainer.style.gap = "2.5rem"
11 - kanbanContainer.style.alignItems = "center"
12 - kanbanContainer.style.flexWrap = "wrap"
13 -
14 - for (let i = 0; i < titleElements.length; i++) {
15 - const titleElement = titleElements[i];
16 - titleElement.style.padding = "2px 4px";
17 - titleElement.style.borderRadius = "4px";
18 -
19 - if (titleElement.textContent.includes('LHCB')) {
20 - titleElement.style.color = 'white';
21 - titleElement.style.backgroundColor = 'red';
22 - const parentElement = titleElement.closest('.kanban-item');
23 - if (parentElement) {
24 - parentElement.style.backgroundColor = 'yellow';
25 - }
26 - }
27 - if (titleElement.textContent.includes('STRI')) {
28 - titleElement.style.color = 'white';
29 - titleElement.style.backgroundColor = 'navy';
30 - const parentElement = titleElement.closest('.kanban-item');
31 - if (parentElement) {
32 - parentElement.style.backgroundColor = '#FFDB58';
33 - }
34 - }
35 - if (titleElement.textContent.includes('AUGE')) {
36 - titleElement.style.color = 'white';
37 - titleElement.style.backgroundColor = '#FF7F50';
38 - const parentElement = titleElement.closest('.kanban-item');
39 - if (parentElement) {
40 - parentElement.style.backgroundColor = '#008080';
41 - }
42 - }
43 - if (titleElement.textContent.includes('HQCD')) {
44 - titleElement.style.color = 'white';
45 - titleElement.style.backgroundColor = 'crimson';
46 - const parentElement = titleElement.closest('.kanban-item');
47 - if (parentElement) {
48 - parentElement.style.backgroundColor = '#808000';
49 - }
50 - }
51 - if (titleElement.textContent.includes('NUCL')) {
52 - titleElement.style.color = 'white';
53 - titleElement.style.backgroundColor = '#E2725B';
54 - const parentElement = titleElement.closest('.kanban-item');
55 - if (parentElement) {
56 - parentElement.style.backgroundColor = '#708090';
57 - }
58 - }
59 - if (titleElement.textContent.includes('GRWA')) {
60 - titleElement.style.color = 'white';
61 - titleElement.style.backgroundColor = '#FF00FF';
62 - const parentElement = titleElement.closest('.kanban-item');
63 - if (parentElement) {
64 - parentElement.style.backgroundColor = '#F4C430';
65 - }
66 - }
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 - }
83 - }
84 -
85 - for (let i = 0; i < headerElements.length; i++) {
86 - const element = headerElements[i];
87 - if (element.innerHTML.includes('Floor#: 2')) {
88 - for (let j = 0; j < element.classList.length; j++) {
89 - if (/kanban-header-\w+/.test(element.classList[j])) {
90 - element.classList.remove(element.classList[j]);
91 - element.style.backgroundColor = '#98FF98';
92 - break;
93 - }
94 - }
95 - }
96 - }
97 -
98 - for (let i = 0; i < headerElements.length; i++) {
99 - const element = headerElements[i];
100 - if (element.innerHTML.includes('Floor#: 1')) {
101 - for (let j = 0; j < element.classList.length; j++) {
102 - if (/kanban-header-\w+/.test(element.classList[j])) {
103 - element.classList.remove(element.classList[j]);
104 - element.style.backgroundColor = '#FF7F50';
105 - break;
106 - }
107 - }
108 - }
109 - }
110 -};
111 -
Name
... ... @@ -1,1 +1,0 @@
1 -Styling boards
Parse content
... ... @@ -1,1 +1,0 @@
1 -No
Use this extension
... ... @@ -1,1 +1,0 @@
1 -currentPage
XWiki.XWikiRights[1]
Allow/Deny
... ... @@ -1,1 +1,0 @@
1 -Allow
Levels
... ... @@ -1,1 +1,0 @@
1 -view
Users
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest