Make search reset control working across auto-refresh

refs #2753
This commit is contained in:
Alexander A. Klimov 2018-01-15 15:09:50 +01:00
parent 5cb7deda20
commit 1f61744b57
1 changed files with 6 additions and 0 deletions

View File

@ -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));