diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js index 812a6816e..33dd04784 100644 --- a/public/js/icinga/events.js +++ b/public/js/icinga/events.js @@ -147,6 +147,8 @@ $(document).on('click', '.tree .handle', { self: this }, this.treeNodeToggle); + $(document).on('click', '#search + .search-reset', this.clearSearch); + // TBD: a global autocompletion handler // $(document).on('keyup', 'form.auto input', this.formChangeDelayed); // $(document).on('change', 'form.auto input', this.formChanged); @@ -609,6 +611,10 @@ return $target; }, + clearSearch: function (event) { + $(event.target).parent().find('#search').attr('value', ''); + }, + unbindGlobalHandlers: function () { $.each(this.icinga.behaviors, function (name, behavior) { behavior.unbind($(document));