From d189871623cb7fb0dbae1d2605943e72b6e26dcd Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 6 Apr 2021 20:00:33 -0700 Subject: [PATCH] Device Group-Tag sort now displays devices with no tags in group only. --- views/default.handlebars | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/views/default.handlebars b/views/default.handlebars index 87ad7004..6eab24e6 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -3725,6 +3725,14 @@ if (groups[tag] == null) { groups[tag] = r2; groupCount[tag] = 1; } else { groups[tag] += r2; groupCount[tag] += 1; } if ((view == 3) || (view == 5)) break; } + } else { + // If sorted by "Groups-Tags" and a device has not tags, put in a group only section. + if ((sort == 4) && ((node.tags == null) || (node.tags.length == 0))) { + var tag = mesh2.name; + var collapsed = CollapsedGroups['tag:' + tag]; + var r2 = r.replace('**xx**xx*TaG*xx**xx**', encodeURIComponentEx(tag) + (collapsed?' style=display:none':'')); + if (groups[tag] == null) { groups[tag] = r2; groupCount[tag] = 1; } else { groups[tag] += r2; groupCount[tag] += 1; } + } } r = ''; }