CRM-21499: Add filter for tagset page
authordeb.monish <monish.deb@jmaconsulting.biz>
Mon, 4 Dec 2017 20:59:01 +0000 (02:29 +0530)
committerdeb.monish <monish.deb@jmaconsulting.biz>
Mon, 4 Dec 2017 20:59:01 +0000 (02:29 +0530)
templates/CRM/Tag/Page/Tag.tpl

index 3182d28866153c9573038c969a3816316dc39cbe..3d271d17132d95a1af5fa6989a882a50f0a1953d 100644 (file)
 
         if (tagset) {
           addHelp();
+          $panel.append('<input class="crm-form-text big" name="filter_tag_tree" placeholder="' + ts('Filter List') + '" allowclear="1"/>');
         }
 
         function moveTagDialog(e) {
               copy: false
             }
           });
+
+        $('input[name=filter_tag_tree]', $panel).on('keyup change', function() {
+          $(".tag-tree", $panel).jstree("search", $(this).val());
+        });
       }
 
       function newTagset() {
         });
 
       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 () {