TagSpaces is an offline, open source, document manager with tagging support
making the tag group title also collapse and persist the tag groups
uggrockd8bf4ab76ad3
diff --git a/data/js/tags.ui.js b/data/js/tags.ui.jsindex 6feb475ce..21dc954a0 100644--- a/data/js/tags.ui.js+++ b/data/js/tags.ui.js@@ -20,7 +20,7 @@ define(function(require, exports, module) {'<button class="btn btn-link btn-lg tagGroupIcon" data-toggle="collapse" data-target="#tagButtons{{@index}}" data-i18n="[title]ns.common:toggleTagGroup" title="{{../toggleTagGroup}}">' +'<i class="fa fa-tags fa-fw"></i>' +'</button>' +- '<button class="btn btn-link tagGroupTitle flexMaxWidth" key="{{key}}">{{title}} ' ++ '<button class="btn btn-link tagGroupTitle flexMaxWidth" data-toggle="collapse" data-target="#tagButtons{{@index}}" key="{{key}}">{{title}} ' +'<sup><span class="badge" style="font-size: 9px;" data-i18n="[title]ns.common:tagGroupTagsCount">{{children.length}}</span></sup></button>' +'<button class="btn btn-link btn-lg tagGroupActions" key="{{key}}" data-i18n="[title]ns.common:tagGroupOperations" title="{{../tagGroupOperations}}">' +'<b class="fa fa-ellipsis-v"></b>' +@@ -254,10 +254,19 @@ define(function(require, exports, module) {'tagGroupOperations': $.i18n.t('ns.common:tagGroupOperations')}));- $tagGroupsContent.find('.tagGroupIcon').each(function() {-+ $tagGroupsContent.find('.tagGroupTitle').each(function() {$(this).on('click', function() {+ var areaId = $(this).attr('data-target');+ if (areaId) {+ var index = areaId.substring(areaId.length - 1);+ tagGroups[index].collapse = $(areaId).is(':visible');+ TSCORE.Config.saveSettings();+ }+ });+ });+ $tagGroupsContent.find('.tagGroupIcon').each(function() {+ $(this).on('click', function() {var areaId = $(this).attr('data-target');if (areaId) {var index = areaId.substring(areaId.length - 1);@@ -266,6 +275,7 @@ define(function(require, exports, module) {}});});+$tagGroupsContent.find('.tagButton').each(function() {$(this).draggable({'appendTo': 'body',