diff --git a/konova/templates/konova/widgets/checkbox-tree-select.html b/konova/templates/konova/widgets/checkbox-tree-select.html
index ddcc60c0..3129be8a 100644
--- a/konova/templates/konova/widgets/checkbox-tree-select.html
+++ b/konova/templates/konova/widgets/checkbox-tree-select.html
@@ -1,3 +1,9 @@
+{% load i18n %}
+
+
+
+
+
{% include 'konova/widgets/checkbox-tree-select-content.html' %}
@@ -31,6 +37,22 @@
toggleSelectedCssClass(this);
}
+ function searchInputHandler(event){
+ var elem = $(this);
+ var val = elem.val()
+ var allTreeElements = $(".tree-element")
+ var allTreeElementsContain = $(".tree-element:contains(" + val + ")")
+ if(val.length > 0){
+ allTreeElements.hide()
+ allTreeElementsContain.show()
+ }else{
+ allTreeElements.show()
+ }
+ }
+
+ // Add event listener on search input
+ $("#tree-search-input").keyup(searchInputHandler)
+
// Add event listener on changed checkboxes
$(".tree-input").change(changeHandler);