Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit ef907be

Browse files
committed
speed up loading of group-list as well (like user-list)
1 parent 9d02847 commit ef907be

5 files changed

Lines changed: 18 additions & 18 deletions

File tree

service.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
{
9999
"name":"pc_admin",
100100
"hostname":"pc_admin",
101-
"url":"https://github.com/philleconnect/ServerContainers/releases/download/2.2.6/pc_admin.tar.gz",
101+
"url":"https://github.com/philleconnect/ServerContainers/releases/download/2.2.7/pc_admin.tar.gz",
102102
"ports":[
103103
{
104104
"external":84,

ui/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "schoolconnect-administration",
33
"private": true,
4-
"version": "2.2.6",
4+
"version": "2.2.7",
55
"description": "SchoolConnect Administration",
66
"repository": "",
77
"license": "UNLICENSED",

ui/src/pages/groups/list.f7.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
// Data display
4343
print: function() {
4444
document.getElementById("content").innerHTML = "";
45+
var tableContent = "";
4546
let style = false;
4647
for (const group of groups) {
47-
let tableRow = "";
4848
if (style) {
49-
tableRow += "<tr class=\"alt\">";
49+
tableContent += "<tr class=\"alt\">";
5050
} else {
51-
tableRow += "<tr>";
51+
tableContent += "<tr>";
5252
}
5353
style = !style;
5454
let permissions = "";
@@ -69,9 +69,9 @@
6969
if (group["type"] != 1) {
7070
modifyButton = '<a href="#" onclick="window.app.views.main.router.navigate(\'/groups/' + group["id"] + '\')"><i class="f7-icons icon-default">gear_alt_fill</i></a>';
7171
}
72-
tableRow += '<td>' + group["name"] + '</td><td>' + group["info"] + '</td><td>' + group["type"] + '</td><td>' + permissions + '</td><td>' + modifyButton + deleteButton + '</td>';
73-
document.getElementById("content").innerHTML += tableRow;
72+
tableContent += '<td>' + group["name"] + '</td><td>' + group["info"] + '</td><td>' + group["type"] + '</td><td>' + permissions + '</td><td>' + modifyButton + deleteButton + '</td>';
7473
}
74+
document.getElementById("content").innerHTML += tableContent;
7575
for (const element of document.getElementsByClassName("delete-group")) {
7676
element.addEventListener("click", function(e) {
7777
this.delete(parseInt(e.target.parentElement.dataset.id));

ui/src/pages/users/list.f7.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,24 @@
4141
},
4242
print: function() {
4343
var accTable = document.getElementById("accounts").innerHTML;
44-
var out = "";
44+
var tableContent = "";
4545
let style = false;
4646
for (const user of users) {
4747
if (style) {
48-
out += "<tr class=\"alt\">";
48+
tableContent += "<tr class=\"alt\">";
4949
style = false;
5050
} else {
51-
out += "<tr>";
51+
tableContent += "<tr>";
5252
style = true;
5353
}
54-
out += "<td>" + user["username"] + "</td>";
55-
out += "<td>" + user["firstname"] + " " + user["lastname"] + "</td>";
56-
out += "<td>" + essentials.minusIfNull(birthday.convertToGermanFormat(user["birthdate"])) + "</td>";
57-
out += "<td>" + essentials.minusIfNull(user["email"]) + "</td>";
58-
out += "<td>" + essentials.minusIfNull(user["persistant"]) + "</td>";
59-
out += "<td><a href=\"#\" onclick=\"window.app.views.main.router.navigate('/users/" + user["id"] + "')\"><i class=\"f7-icons icon-default\">gear_alt_fill</i></a>&nbsp;&nbsp;&nbsp;<a href=\"#\" data-id=\"" + user["id"] + "\" class=\"delete-user\"><i class=\"f7-icons icon-default\">trash_fill</i></a></td></tr>";
54+
tableContent += "<td>" + user["username"] + "</td>";
55+
tableContent += "<td>" + user["firstname"] + " " + user["lastname"] + "</td>";
56+
tableContent += "<td>" + essentials.minusIfNull(birthday.convertToGermanFormat(user["birthdate"])) + "</td>";
57+
tableContent += "<td>" + essentials.minusIfNull(user["email"]) + "</td>";
58+
tableContent += "<td>" + essentials.minusIfNull(user["persistant"]) + "</td>";
59+
tableContent += "<td><a href=\"#\" onclick=\"window.app.views.main.router.navigate('/users/" + user["id"] + "')\"><i class=\"f7-icons icon-default\">gear_alt_fill</i></a>&nbsp;&nbsp;&nbsp;<a href=\"#\" data-id=\"" + user["id"] + "\" class=\"delete-user\"><i class=\"f7-icons icon-default\">trash_fill</i></a></td></tr>";
6060
}
61-
accTable = out;
61+
accTable = tableContent;
6262
for (const element of document.getElementsByClassName("delete-user")) {
6363
element.addEventListener("click", function(e) {
6464
this.delete(e.target.parentElement.dataset.id);

0 commit comments

Comments
 (0)