From f094a5bc49f442c24508b2371b38747d87ff8a16 Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Thu, 30 Nov 2017 18:52:57 +0530 Subject: [PATCH] CRM-21499: Add filter to manage tags page --- templates/CRM/Tag/Page/Tag.tpl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/templates/CRM/Tag/Page/Tag.tpl b/templates/CRM/Tag/Page/Tag.tpl index 81729b5fd8..3182d28866 100644 --- a/templates/CRM/Tag/Page/Tag.tpl +++ b/templates/CRM/Tag/Page/Tag.tpl @@ -53,6 +53,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}
@@ -250,7 +251,7 @@ } }); - plugins = ['wholerow', 'changed']; + plugins = ['wholerow', 'changed', 'search']; if (!tagset) { // Allow drag-n-drop nesting of the tag tree plugins.push('dnd'); @@ -269,6 +270,10 @@ }, check_callback: true }, + 'search': { + 'case_insensitive' : true, + 'show_only_matches': true + }, plugins: plugins, dnd: { copy: false @@ -305,6 +310,9 @@ }); renderTree($('#tree')); + $('input[name=filter_tag_tree]').on('keyup change', function() { + $(".tag-tree").jstree("search", $(this).val()); + }); // Prevent the info box from scrolling offscreen $window.on('scroll resize', function () { -- 2.25.1