From 0f1da939b9cf68a629c9f3f5db6f030845e360b6 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 25 Sep 2020 10:36:53 -0700 Subject: [PATCH] Version 0.6.49 --- package.json | 2 +- translate/translate.json | 6 ++++++ views/default.handlebars | 10 ++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9d29061a..30ea02dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.6.48", + "version": "0.6.49", "keywords": [ "Remote Device Management", "Remote Device Monitoring", diff --git a/translate/translate.json b/translate/translate.json index e4f459a6..3d993f54 100644 --- a/translate/translate.json +++ b/translate/translate.json @@ -16640,6 +16640,12 @@ "default.handlebars->27->1417" ] }, + { + "en": "Group-Tags", + "xloc": [ + "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->9->devListToolbarSort->sortselect->9" + ] + }, { "cs": "Skupina1, Skupina2, Skupina3", "de": "Gruppe1, Gruppe2, Gruppe3", diff --git a/views/default.handlebars b/views/default.handlebars index cc98a6fa..2c7c7a5a 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -278,6 +278,7 @@ +   @@ -3497,8 +3498,8 @@ var collapseName = node.meshid; if (sort == 1) { collapseName = ('pwr:' + (node.pwr?node.pwr:0)); } - else if (sort == 3) { collapseName = 'tag:**xx**xx*TaG*xx**xx**'; } - var collapsed = (sort != 3) & CollapsedGroups[collapseName]; + else if ((sort == 3) || (sort == 4)) { collapseName = 'tag:**xx**xx*TaG*xx**xx**'; } + var collapsed = (sort != 3) & (sort != 4) & CollapsedGroups[collapseName]; r += '
'; r += '
'; r += '
'; @@ -3521,10 +3522,11 @@ } // If we are displaying devices by tags, put the device in the right tag group. - if ((sort == 3) && (r != '')) { + if (((sort == 3) || (sort == 4)) && (r != '')) { if (node.tags) { for (var j in node.tags) { var tag = node.tags[j]; + if (sort == 4) { tag = mesh2.name + ' - ' + node.tags[j]; } 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; } @@ -3545,7 +3547,7 @@ QE('autoConnectDesktopCheckbox', kvmDivs.length < 32); // If displaying devices by groups, sort the group names and display the devices. - if (sort == 3) { + if ((sort == 3) || (sort == 4)) { var groupNames = [], tagDeviceHeaderId = 0; for (var i in groups) { groupNames.push(i); } groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });