Some new icons with logic (not completed yet)

This commit is contained in:
Daniel
2025-04-15 10:03:39 +02:00
parent 135802c626
commit 737e29975a
6 changed files with 61 additions and 25 deletions

View File

@ -13,7 +13,7 @@ function getGroup(s, name) {
if (debug_group_daniel) {
console.log("%cfunction: getGroup", "color:white;background:salmon");
}
// console.log('name: ',name, ', id: '.ClientID);
console.log('name: ',name, ', id: '.ClientID);
reqJSON(s, "http://" + hostPort + "/getblock?path=" + name
+ "&id=" + clientID, successHandler, errorHandler);
}
@ -148,11 +148,10 @@ function create_rdlink_row(s, component) {
var left = createTitle(component, 1);
left.id = component.name;
left.name = component.title; // or setAttribute('name'.. ?
// left.classList.add("interactive", "link");
left.onclick = function () {
getGroup(s, component.title);
}
// left.onclick = function () {
// getGroup(s, component.title);
// }
return appendToContent(component, left, createParElement(component));
}
@ -504,11 +503,13 @@ function createTitle(component, modules) {
// Creates left side of row-tag containing title. Title may hold additional
// information, which is shown, when title-tag is clicked.
// At the modules-block a status-oicon is added
// At the modules-block a status-icon is added
var left = document.createElement('span');
var status_icon = document.createElement('p');
status_icon.classList.add("status-icon");
// var status_icon = document.createElement('p');
// status_icon.classList.add("status-icon");
console.log(component);
var title = component.title;
if (component.info) {
left.classList.add("col-left", "event-toggle-info");
@ -524,14 +525,16 @@ function createTitle(component, modules) {
left.innerHTML = component.title + "<sup><b>(i)</b></sup>";
} else {
if (modules) {
left.innerHTML = '<span class = "modules-title">' + component.title + '</span>'
// + '<span class = "modules-icon status-icon">s</span>'
+ '<img class = "modules-icon" src="res/icon_status_16px.png">'
// + '<span class = "modules-icon edit-icon">e</span>'
+ '<img class = "modules-icon" src="res/icon_edit_16px.png">'
// + '<span class = "modules-icon info-icon">i</span>'
+ '<img class = "modules-icon" src="res/question_mark.png">'
;
var icon_status = '<img class = "modules-icon status-icon" src="res/icon_status.png">';
var icon_edit = '<img class = "modules-icon edit-icon" src="res/icon_edit.png">';
var icon_info = '<img class = "modules-icon info-icon" src="res/icon_info.png" onclick = getGroup(1,"' + title + '")>';
left.innerHTML = '<span class = "modules-title">' + component.title + '</span>';
if (component.statusname) {
left.innerHTML += icon_status;
}
left.innerHTML += icon_edit;
left.innerHTML += icon_info;
} else {
left.innerHTML = component.title;
}