mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
Delay tab dropdown disappearance
This commit is contained in:
parent
d326b3b683
commit
4ce35b5b95
@ -101,16 +101,32 @@
|
|||||||
|
|
||||||
$(document).on('mouseenter', '.historycolorgrid td', this.historycolorgridHover);
|
$(document).on('mouseenter', '.historycolorgrid td', this.historycolorgridHover);
|
||||||
$(document).on('mouseleave', '.historycolorgrid td', this.historycolorgidUnhover);
|
$(document).on('mouseleave', '.historycolorgrid td', this.historycolorgidUnhover);
|
||||||
|
$(document).on('mouseenter', 'li.dropdown', this.dropdownHover);
|
||||||
|
$(document).on('mouseleave', 'li.dropdown', this.dropdownLeave);
|
||||||
|
|
||||||
$(document).on('click', '.tree .handle', { self: this }, this.treeNodeToggle);
|
$(document).on('click', '.tree .handle', { self: this }, this.treeNodeToggle);
|
||||||
|
|
||||||
|
|
||||||
// TBD: a global autocompletion handler
|
// TBD: a global autocompletion handler
|
||||||
// $(document).on('keyup', 'form.auto input', this.formChangeDelayed);
|
// $(document).on('keyup', 'form.auto input', this.formChangeDelayed);
|
||||||
// $(document).on('change', 'form.auto input', this.formChanged);
|
// $(document).on('change', 'form.auto input', this.formChanged);
|
||||||
// $(document).on('change', 'form.auto select', this.submitForm);
|
// $(document).on('change', 'form.auto select', this.submitForm);
|
||||||
},
|
},
|
||||||
|
|
||||||
treeNodeToggle: function (event) {
|
dropdownHover: function () {
|
||||||
|
$(this).addClass('hover');
|
||||||
|
},
|
||||||
|
|
||||||
|
dropdownLeave: function () {
|
||||||
|
var $li = $(this);
|
||||||
|
setTimeout(function () {
|
||||||
|
if (! $li.is('li:hover')) {
|
||||||
|
$li.removeClass('hover');
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
|
},
|
||||||
|
|
||||||
|
treeNodeToggle: function () {
|
||||||
var $parent = $(this).closest('li');
|
var $parent = $(this).closest('li');
|
||||||
if ($parent.hasClass('collapsed')) {
|
if ($parent.hasClass('collapsed')) {
|
||||||
$('li', $parent).addClass('collapsed');
|
$('li', $parent).addClass('collapsed');
|
||||||
@ -309,7 +325,9 @@
|
|||||||
$(document).off('click', 'button', this.submitForm);
|
$(document).off('click', 'button', this.submitForm);
|
||||||
$(document).off('change', 'form select.autosubmit', this.submitForm);
|
$(document).off('change', 'form select.autosubmit', this.submitForm);
|
||||||
$(document).off('mouseenter', '.historycolorgrid td', this.historycolorgridHover);
|
$(document).off('mouseenter', '.historycolorgrid td', this.historycolorgridHover);
|
||||||
$(document).off('mouseenter', '.historycolorgrid td', this.historycolorgidUnhover);
|
$(document).off('mouseleave', '.historycolorgrid td', this.historycolorgidUnhover);
|
||||||
|
$(document).off('mouseenter', 'li.dropdown', this.dropdownHover);
|
||||||
|
$(document).off('mouseleave', 'li.dropdown', this.dropdownLeave);
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user