From 101b12d912d241ef533080f980e61a6fb964141a Mon Sep 17 00:00:00 2001 From: Steffen Ritter Date: Fri, 19 Jul 2019 11:52:33 +0200 Subject: [roomplanner] Make client tooltip more readable --- modules-available/roomplanner/js/grid.js | 12 ++++++++++-- modules-available/roomplanner/js/init.js | 18 +++++++++--------- 2 files changed, 19 insertions(+), 11 deletions(-) (limited to 'modules-available/roomplanner/js') diff --git a/modules-available/roomplanner/js/grid.js b/modules-available/roomplanner/js/grid.js index 697d7c3f..80789963 100644 --- a/modules-available/roomplanner/js/grid.js +++ b/modules-available/roomplanner/js/grid.js @@ -125,10 +125,18 @@ if (!roomplanner) var roomplanner = { }, initTooltip: function(el) { if ($(el).attr('itemtype') === 'pc') { - var tip = "Rechnerdaten
"; + var tip = '
'; $(roomplanner.computerAttributes).each(function(i,key){ - tip += __(key)+": "+$(el).attr(key)+"
"; + if (key === 'hostname') { + tip += '
' + $(el).attr(key) + '
'; + return; + } + tip += '
'; + tip += '
' + __(key) + ": " + '
'; + tip += '
' + $(el).attr(key) + '
'; + tip += '
'; }); + tip += '
'; $(el).attr('title', tip).attr('data-toggle', 'tooltip'); $(el).tooltip({html: true, container: 'body'}); diff --git a/modules-available/roomplanner/js/init.js b/modules-available/roomplanner/js/init.js index 7cada0dd..79f8e17e 100644 --- a/modules-available/roomplanner/js/init.js +++ b/modules-available/roomplanner/js/init.js @@ -6,10 +6,10 @@ function initRoomplanner() { $('#drawarea').css('left',(-roomplanner.settings.scale*10)+'px'); roomplanner.computerAttributes = [ - "muuid", - "mac_address", - "ip", - "hostname" + "hostname", + "ip", + "mac_address", + "muuid" ]; $("#loadButton").click(function() { @@ -66,11 +66,11 @@ function initRoomplanner() { } var translation = { - "muuid" : "Machine UUID", - "mac_address" : "MAC Adresse", - "ip" : "IP Adresse", - "hostname": "Rechnername", - + "muuid" : "UUID", + "mac_address" : "MAC", + "ip" : "IP", + "hostname": "Hostname", + "wall-horizontal" : "Wand (horizontal)", "wall-vertical" : "Mauer (vertikal)", "window-horizontal" : "Fenster", -- cgit v1.2.3-55-g7522