Some esponsivity bugfixes
This commit is contained in:
@ -13,6 +13,7 @@ function getGroup(s, name) {
|
||||
if (debug_group_daniel) {
|
||||
console.log("%cfunction: getGroup", "color:white;background:salmon");
|
||||
}
|
||||
// console.log('name: ',name, ', id: '.ClientID);
|
||||
reqJSON(s, "http://" + hostPort + "/getblock?path=" + name
|
||||
+ "&id=" + clientID, successHandler, errorHandler);
|
||||
}
|
||||
@ -37,6 +38,10 @@ function createContent(s, message) {
|
||||
var content = document.createElement('div');
|
||||
content.classList.add("content");
|
||||
// Process components of the message
|
||||
|
||||
// console.log("create content");
|
||||
// console.log("message: ",message);
|
||||
// console.log('length: ',message.components.length);
|
||||
for (var i = 0; i < message.components.length; i++) {
|
||||
var component = message.components[i];
|
||||
if (!("title" in component))
|
||||
@ -138,11 +143,12 @@ function create_rdlink_row(s, component) {
|
||||
// Creates row-element containing link AND read-only-item.
|
||||
|
||||
var name = component.name;
|
||||
var status = component.statusname;
|
||||
|
||||
var left = createTitle(component);
|
||||
var left = createTitle(component, 1);
|
||||
left.id = component.name;
|
||||
left.name = component.title; // or setAttribute('name'.. ?
|
||||
left.classList.add("interactive", "link");
|
||||
// left.classList.add("interactive", "link");
|
||||
|
||||
left.onclick = function () {
|
||||
getGroup(s, component.title);
|
||||
@ -491,15 +497,18 @@ function create_enum_row(s, component) {
|
||||
return appendToContent(component, left, right);
|
||||
}
|
||||
|
||||
function createTitle(component) {
|
||||
function createTitle(component, modules) {
|
||||
if (debug_group_daniel) {
|
||||
console.log("%cfunction: createTitle", "color:white;background:salmon");
|
||||
}
|
||||
|
||||
// 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
|
||||
|
||||
var left = document.createElement('span');
|
||||
var status_icon = document.createElement('p');
|
||||
status_icon.classList.add("status-icon");
|
||||
if (component.info) {
|
||||
left.classList.add("col-left", "event-toggle-info");
|
||||
|
||||
@ -514,8 +523,18 @@ function createTitle(component) {
|
||||
|
||||
left.innerHTML = component.title + "<sup><b>(i)</b></sup>";
|
||||
} else {
|
||||
left.classList.add("col-left");
|
||||
left.innerHTML = component.title;
|
||||
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">'
|
||||
;
|
||||
} else {
|
||||
left.innerHTML = component.title;
|
||||
}
|
||||
}
|
||||
return left;
|
||||
}
|
||||
|
Reference in New Issue
Block a user