summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-12-17 14:33:08 +0100
committerSimon Rettberg2019-12-17 14:33:08 +0100
commitc848221a597fce9573f94e467fa155d52db288e1 (patch)
tree37df723a3b026eb4e6d169277c593df545c69d73
parent[serversetup-bwlp-ipxe] Show title of referenced menus in entry list (diff)
downloadslx-admin-c848221a597fce9573f94e467fa155d52db288e1.tar.gz
slx-admin-c848221a597fce9573f94e467fa155d52db288e1.tar.xz
slx-admin-c848221a597fce9573f94e467fa155d52db288e1.zip
[roomplanner] Tweak PC tooltip: disallow word-wrap
-rw-r--r--modules-available/roomplanner/js/grid.js20
-rw-r--r--modules-available/roomplanner/style.css24
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 = '<div class="table">';
- $(roomplanner.computerAttributes).each(function(i,key){
+ var tip = '<table>';
+ $(roomplanner.computerAttributes).each(function (i, key) {
+ tip += '<tr>';
if (key === 'hostname') {
- tip += '<div class="tc">' + $(el).attr(key) + '</div>';
- return;
+ tip += '<td colspan="2">' + $(el).attr(key) + '</td>';
+ } else {
+ tip += '<td>' + __(key) + ": " + '</td>';
+ tip += '<td>' + $(el).attr(key) + '</td>';
}
- tip += '<div class="tr">';
- tip += '<div class="td">' + __(key) + ": " + '</div>';
- tip += '<div class="td">' + $(el).attr(key) + '</div>';
- tip += '</div>';
+ tip += '</tr>';
});
- tip += '</div>';
+ tip += '</table>';
$(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;
}