Fix for #2967
Ylian Saint-Hilaire committed
Jul 30, 2021 at 02:11 UTC
bb88f9cc2fb729d3b1c84e803a5c04d5d5c358c8
2 files changed
+11
-4
translate/translate.json
+1
-1
@@ -756,7 +756,7 @@
756
"fi": ", vain Intel® AMT",
757
"fr": ", Intel® AMT uniquement",
758
"hi": ", Intel® AMT केवल",
759
- "it": ", Intel & reg; Solo AMT",
759
+ "it": ", Intel® Solo AMT",
760
"ja": "、Intel® AMTのみ",
761
"ko": ", Intel® AMT 만",
762
"nl": ", Intel® AMT alleen",
views/default.handlebars
+10
-3
@@ -3781,6 +3781,13 @@
3781
var deviceBoxWidth = Math.floor(totalDeviceViewWidth / 301);
3782
deviceBoxWidth = 301 + Math.floor((totalDeviceViewWidth - (deviceBoxWidth * 301)) / deviceBoxWidth);
3783
3784
+ // Compute number of colums
3785
+ var colcount = 4;
3786
+ if (deviceViewSettings && deviceViewSettings.devsCols) {
3787
+ colcount = deviceViewSettings.devsCols.length + 1;
3788
+ if (deviceViewSettings.devsCols.indexOf('desc') >= 0) { colcount--; } // Description is not an extra column.
3789
+ }
3790
+
3791
// Go thru the list of nodes and display them
3792
for (var i in nodes) {
3793
var node = nodes[i];
@@ -3794,7 +3801,7 @@
3801
if (((view == 1) || (view == 3) || (view == 5)) && (current != null)) { r += '</div>'; } // Close collapse div
3802
deviceHeaderSet();
3803
var extra = '';
3797
- if (view == 2) { r += '<tr><td colspan=' + (deviceViewSettings.devsCols.length + 1) + '>'; }
3804
+ if (view == 2) { r += '<tr><td colspan=' + colcount + '>'; }
3805
if (meshes[node.meshid] && (meshes[node.meshid].mtype == 1)) { extra = '<span class=devHeaderx>' + ", Intel® AMT only" + '</span>'; }
3806
if (meshes[node.meshid] && (meshes[node.meshid].mtype == 3)) { extra = '<span class=devHeaderx>' + ", Local Devices" + '</span>'; }
3807
if ((view == 1) && (current != null)) { if (c == 2) { r += '<td><div style=width:301px></div></td>'; } if (r != '') { r += '</tr></table>'; } }
@@ -3826,7 +3833,7 @@
3833
deviceHeaderSet();
3834
if ((view == 1) && (current !== null)) { if (c == 2) { r += '<td><div style=width:301px></div></td>'; } if (r != '') { r += '</tr></table>'; } }
3835
3829
- if (view == 2) { r += '<tr><td colspan=' + (deviceViewSettings.devsCols.length + 1) + '>'; }
3836
+ if (view == 2) { r += '<tr><td colspan=' + colcount + '>'; }
3837
r += '<div class=DevSt style=width:100%;padding-top:4px><span id=DevxHeader' + deviceHeaderId + ' class=devHeaderx style=float:right></span>';
3838
if ((view == 1) || (view == 2) || (view == 3) || (view == 5)) {
3839
var collapsed = CollapsedGroups['pwr:' + pwr];
@@ -3903,7 +3910,7 @@
3910
for (var j in groupNames) {
3911
var i = groupNames[j];
3912
if (view == 2) {
3906
- r += '<tr><td colspan=' + (deviceViewSettings.devsCols.length + 1) + '><div class=DevSt style=width:100%;padding-top:4px>';
3913
+ r += '<tr><td colspan=' + colcount + '><div class=DevSt style=width:100%;padding-top:4px>';
3914
var collapsed = CollapsedGroups['tag:' + encodeURIComponentEx(i)];
3915
r += '<img class=collapseImage cmenu=expandAllContextMenu id="DevxColImg' + tagDeviceHeaderId + '" src=images/c' + ((collapsed === true)?'1':'2') + '.png height=8 width=8 style=margin-left:2px;margin-right:2px;cursor:pointer onclick=toggleCollapseGroup("' + tagDeviceHeaderId + '","tag:' + encodeURIComponentEx(i) + '",2)></img>'; // Collapse action
3916
r += '<span class=devHeaderx style=float:right>' + groupCount[i] + ' node' + ((groupCount[i] > 1) ? 's' : '') + '</span><span>' + EscapeHtml(i).split('|').join(' → ').split('**INDV*~*DEVS**').join('<i>' + "Individual Devices" + '</i>') + '</span></div>' + groups[i];