Device Group-Tag sort now displays devices with no tags in group only.

Ylian Saint-Hilaire committed Apr 6, 2021 at 20:00 UTC d189871623cb7fb0dbae1d2605943e72b6e26dcd
1 file changed +8
views/default.handlebars
+8
@@ -3725,6 +3725,14 @@
3725 if (groups[tag] == null) { groups[tag] = r2; groupCount[tag] = 1; } else { groups[tag] += r2; groupCount[tag] += 1; }
3726 if ((view == 3) || (view == 5)) break;
3727 }
3728 + } else {
3729 + // If sorted by "Groups-Tags" and a device has not tags, put in a group only section.
3730 + if ((sort == 4) && ((node.tags == null) || (node.tags.length == 0))) {
3731 + var tag = mesh2.name;
3732 + var collapsed = CollapsedGroups['tag:' + tag];
3733 + var r2 = r.replace('**xx**xx*TaG*xx**xx**', encodeURIComponentEx(tag) + (collapsed?' style=display:none':''));
3734 + if (groups[tag] == null) { groups[tag] = r2; groupCount[tag] = 1; } else { groups[tag] += r2; groupCount[tag] += 1; }
3735 + }
3736 }
3737 r = '';
3738 }