Merge pull request #3260 from Icinga/bugfix/reset-search-not-working-2753

Make search reset control working across auto-refresh
This commit is contained in:
lippserd 2018-01-16 10:14:23 +01:00 committed by GitHub
commit 76bc59b7bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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));