Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21499: Add filter to manage tags page #11352

Merged
merged 1 commit into from
Nov 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion templates/CRM/Tag/Page/Tag.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<div class="help">
{ts}Organize the tag hierarchy by clicking and dragging. Shift-click to select multiple tags to merge/move/delete.{/ts}
</div>
<input class="crm-form-text big" name="filter_tag_tree" placeholder="{ts}Filter List{/ts}" allowclear="1"/>
</div>
{foreach from=$tagsets item=set}
<div id="tagset-{$set.id}">
Expand Down Expand Up @@ -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');
Expand All @@ -269,6 +270,10 @@
},
check_callback: true
},
'search': {
'case_insensitive' : true,
'show_only_matches': true
},
plugins: plugins,
dnd: {
copy: false
Expand Down Expand Up @@ -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 () {
Expand Down