From c848221a597fce9573f94e467fa155d52db288e1 Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Tue, 17 Dec 2019 14:33:08 +0100
Subject: [roomplanner] Tweak PC tooltip: disallow word-wrap
---
modules-available/roomplanner/js/grid.js | 20 ++++++++++----------
modules-available/roomplanner/style.css | 24 +++++++++++-------------
2 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/modules-available/roomplanner/js/grid.js b/modules-available/roomplanner/js/grid.js
index 80789963..9157faa5 100644
--- a/modules-available/roomplanner/js/grid.js
+++ b/modules-available/roomplanner/js/grid.js
@@ -123,20 +123,20 @@ if (!roomplanner) var roomplanner = {
});
}
},
- initTooltip: function(el) {
+ initTooltip: function (el) {
if ($(el).attr('itemtype') === 'pc') {
- var tip = '
';
- $(roomplanner.computerAttributes).each(function(i,key){
+ var tip = '
';
+ $(roomplanner.computerAttributes).each(function (i, key) {
+ tip += '';
if (key === 'hostname') {
- tip += '' + $(el).attr(key) + '
';
- return;
+ tip += '' + $(el).attr(key) + ' | ';
+ } else {
+ tip += '' + __(key) + ": " + ' | ';
+ tip += '' + $(el).attr(key) + ' | ';
}
- tip += '';
- tip += '
' + __(key) + ": " + '
';
- tip += '
' + $(el).attr(key) + '
';
- tip += '
';
+ tip += '
';
});
- tip += '';
+ tip += '
';
$(el).attr('title', tip).attr('data-toggle', 'tooltip');
$(el).tooltip({html: true, container: 'body'});
diff --git a/modules-available/roomplanner/style.css b/modules-available/roomplanner/style.css
index 0fe56ad6..70feb946 100644
--- a/modules-available/roomplanner/style.css
+++ b/modules-available/roomplanner/style.css
@@ -795,7 +795,7 @@ div.ui-draggable:hover > .pcHandle {
border-top: 1px solid #bbb;
}
-.machine-entry-header {
+div.machine-entry-header {
font-weight: bolder;
font-size: 18px;
}
@@ -804,33 +804,31 @@ div.ui-draggable:hover > .pcHandle {
max-height : 600px;
}
-.tooltip > .tooltip-inner {
- color: #FFFFFF;
- text-align: left;
- max-width: 500px;
+.tooltip-inner {
+ min-width: 300px;
+ max-width: 900px;
}
-div.table {
- display: table;
+.tooltip-inner table {
border-collapse:collapse;
text-align: left;
margin-bottom: 10px;
}
-div.tr {
- display:table-row;
+.tooltip-inner tr {
border-top: 1px solid #bbb;
- border-bottom: 1px solid #bbb;
}
-div.td {
+.tooltip-inner td {
display:table-cell;
padding: 2px;
}
-div.tc {
- display:table-caption;
+.tooltip-inner tr:first-child {
font-weight: bold;
font-size: 16px;
padding-bottom: 5px;
+ white-space: nowrap;
+ border: none;
+ text-align: center;
}
--
cgit v1.2.3-55-g7522