From a5aae840f446303fefa72c5742cca33acfdb6f70 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 5 Dec 2017 00:44:51 -0500 Subject: [PATCH] CRM-21499 - Add clear button to search form and cleanup/bugfixes --- templates/CRM/Tag/Page/Tag.tpl | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/templates/CRM/Tag/Page/Tag.tpl b/templates/CRM/Tag/Page/Tag.tpl index 3d271d17132d..ed4b5e41bc37 100644 --- a/templates/CRM/Tag/Page/Tag.tpl +++ b/templates/CRM/Tag/Page/Tag.tpl @@ -54,6 +54,7 @@ {ts}Organize the tag hierarchy by clicking and dragging. Shift-click to select multiple tags to merge/move/delete.{/ts} + {foreach from=$tagsets item=set}
@@ -77,7 +78,7 @@ noneSelectedTpl = _.template($('#noneSelectedTpl').html()), oneSelectedTpl = _.template($('#oneSelectedTpl').html()), moreSelectedTpl = _.template($('#moreSelectedTpl').html()), - tagsetHelpTpl = _.template($('#tagsetHelpTpl').html()); + tagsetHeaderTpl = _.template($('#tagsetHeaderTpl').html()); function formatTagSet(info) { info.date = CRM.utils.formatDate(info.created_date); @@ -183,20 +184,20 @@ tagSets[tagset].used_for = info.used_for; tagSets[tagset].is_reserved = info.is_reserved; formatTagSet(tagSets[tagset]); - $('.help', $panel).remove(); - addHelp(); + addTagsetHeader(); + $(".tag-tree", $panel).jstree("search", ''); } - function addHelp() { - $panel.prepend(tagsetHelpTpl(tagSets[tagset])); + function addTagsetHeader() { + $('.tagset-header', $panel).remove(); + $panel.prepend(tagsetHeaderTpl(tagSets[tagset])); $("a[href='#tagset-" + tagset + "']").text(tagSets[tagset].name) .parent().toggleClass('is-reserved', tagSets[tagset].is_reserved == 1) .attr('title', ts('{/literal}{ts escape='js' 1='%1'}Tag Set for %1{/ts}{literal}', {'1': tagSets[tagset].used_for_label.join(', ')})); } if (tagset) { - addHelp(); - $panel.append(''); + addTagsetHeader(); } function moveTagDialog(e) { @@ -531,11 +532,15 @@
-