Changes for page Desk allocation

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

From version 157.1
edited by Ricardo Julio Rodríguez Fernández
on 2024/03/09 09:20
Change comment: Kanban content updated
To version 172.1
edited by Abdullah Sharifi
on 2024/03/11 19:26
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.RicardoJulioRodriguezFernandez
1 +XWiki.AbdullahSharifi
Content
... ... @@ -1,3 +1,2 @@
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":"board1","title":"To Do","color":"blue","item":[{"title":"Item 5"},{"title":"Item 1"}]},{"id":"board3","title":"Done","color":"red","item":[{"title":"Item 2"},{"title":"Item 7"}]},{"id":"board4","title":"New Board 01","color":"orange","item":[{"title":"Item 1"}]},{"id":"board5","title":"New Board 02","color":"yellow","item":[{"title":"Item 3"}]},{"id":"board6","title":"New Board 03","color":"red","item":[{"title":"Item 1"},{"title":"Item 1"}]}]
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"}}
3 3  {{/kanban}}
room.json
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.RicardoJulioRodriguezFernandez
Size
... ... @@ -1,0 +1,1 @@
1 +1.8 KB
Content
... ... @@ -1,0 +1,101 @@
1 +[
2 + {
3 + "id": "room 01, floor 1",
4 + "color": "green",
5 + "item": [
6 + {
7 + "title": "person 001 - LHCB"
8 + }
9 + ],
10 + "title": "Room#: 01, Floor#: 1"
11 + },
12 + {
13 + "id": "room 02, floor 1",
14 + "color": "blue",
15 + "item": [
16 + {
17 + "title": "person 002 - STRI"
18 + }
19 + ],
20 + "title": "Room#: 02, Floor#: 1"
21 + },
22 + {
23 + "id": "room 03, floor 2",
24 + "color": "red",
25 + "item": [
26 + {
27 + "title": "person 003 - LHCB"
28 + }
29 + ],
30 + "title": "Room#: 03, Floor#: 2"
31 + },
32 + {
33 + "id": "room 05, floor 2",
34 + "color": "yellow",
35 + "item": [
36 + {
37 + "title": "person 003 - LHCB"
38 + },
39 + {
40 + "title": "person 004 - NUCL"
41 + }
42 + ],
43 + "title": "Room#: 05, Floor#: 2"
44 + },
45 + {
46 + "id": "room 08, floor 1",
47 + "color": "orange",
48 + "item": [
49 + {
50 + "title": "person 119 - HQCD"
51 + },
52 + {
53 + "title": "person 135 - LHCB"
54 + },
55 + {
56 + "title": "person 078 - HQCD"
57 + }
58 + ],
59 + "title": "Room#: 08, Floor#: 1"
60 + },
61 + {
62 + "id": "room 16, floor 1",
63 + "color": "green",
64 + "item": [
65 + {
66 + "title": "person 123 - AUGE"
67 + }
68 + ],
69 + "title": "Room#: 16, Floor#: 1"
70 + },
71 + {
72 + "id": "room 18, floor 1",
73 + "color": "green",
74 + "item": [
75 + {
76 + "title": "person 256 - GRWA"
77 + }
78 + ],
79 + "title": "Room#: 18, Floor#: 1"
80 + },
81 + {
82 + "id": "room 19, floor 1",
83 + "color": "green",
84 + "item": [
85 + {
86 + "title": "person 354 - LACC"
87 + }
88 + ],
89 + "title": "Room#: 19, Floor#: 1"
90 + },
91 + {
92 + "id": "room 30, floor 1",
93 + "color": "green",
94 + "item": [
95 + {
96 + "title": "person 354 - NEXT"
97 + }
98 + ],
99 + "title": "Room#: 30, Floor#: 1"
100 + }
101 +]
XWiki.JavaScriptExtension[0]
Caching policy
... ... @@ -1,0 +1,1 @@
1 +forbid
Code
... ... @@ -1,0 +1,47 @@
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 + /* for (let i = 0; i < titleElements.length; i++) {
7 + const titleElement = titleElements[i];
8 + titleElement.style.padding = "2px 4px";
9 + titleElement.style.borderRadius = "4px";
10 +
11 + if (titleElement.textContent.includes('2')) {
12 + titleElement.style.color = 'white';
13 + titleElement.style.backgroundColor = 'red';
14 + const parentElement = titleElement.closest('.kanban-item');
15 + if (parentElement) {
16 + parentElement.style.backgroundColor = 'yellow';
17 + }
18 + }
19 + } */
20 +
21 + for (let i = 0; i < headerElements.length; i++) {
22 + const element = headerElements[i];
23 + if (element.innerHTML.includes('Floor#: 2')) {
24 + for (let j = 0; j < element.classList.length; j++) {
25 + if (/kanban-header-\w+/.test(element.classList[j])) {
26 + element.classList.remove(element.classList[j]);
27 + element.style.backgroundColor = '#E6E6FA';
28 + break;
29 + }
30 + }
31 + }
32 + }
33 +
34 + for (let i = 0; i < headerElements.length; i++) {
35 + const element = headerElements[i];
36 + if (element.innerHTML.includes('Floor#: 1')) {
37 + for (let j = 0; j < element.classList.length; j++) {
38 + if (/kanban-header-\w+/.test(element.classList[j])) {
39 + element.classList.remove(element.classList[j]);
40 + element.style.backgroundColor = '#FFE5B4';
41 + break;
42 + }
43 + }
44 + }
45 + }
46 +};
47 +
Name
... ... @@ -1,0 +1,1 @@
1 +Change background Color
Parse content
... ... @@ -1,0 +1,1 @@
1 +No
Use this extension
... ... @@ -1,0 +1,1 @@
1 +currentPage
XWiki.StyleSheetExtension[0]
Caching policy
... ... @@ -1,0 +1,1 @@
1 +forbid
Code
... ... @@ -1,0 +1,3 @@
1 +#xwikicontent {
2 + background-color: lightBlue;
3 +}
Name
... ... @@ -1,0 +1,1 @@
1 +Blue background
Parse content
... ... @@ -1,0 +1,1 @@
1 +No
Use this extension
... ... @@ -1,0 +1,1 @@
1 +currentPage