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

This commit is contained in:
Ylian Saint-Hilaire 2021-04-06 20:00:33 -07:00
parent 00b43cc333
commit d189871623

View File

@ -3725,6 +3725,14 @@
if (groups[tag] == null) { groups[tag] = r2; groupCount[tag] = 1; } else { groups[tag] += r2; groupCount[tag] += 1; } if (groups[tag] == null) { groups[tag] = r2; groupCount[tag] = 1; } else { groups[tag] += r2; groupCount[tag] += 1; }
if ((view == 3) || (view == 5)) break; 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 = ''; r = '';
} }