JS for IE8: even more JS fixes

refs #6417
This commit is contained in:
Thomas Gelf 2014-06-05 18:11:19 +00:00
parent 0d9f8786f9
commit 2d228ce83d
1 changed files with 13 additions and 10 deletions

View File

@ -120,10 +120,10 @@
$(document).on('mouseenter', '.historycolorgrid td', this.historycolorgridHover);
$(document).on('mouseleave', '.historycolorgrid td', this.historycolorgidUnhover);
$(document).on('mouseenter', 'li.dropdown', this.dropdownHover);
$(document).on('mouseleave', 'li.dropdown', this.dropdownLeave);
$(document).on('mouseleave', 'li.dropdown', {self: this}, this.dropdownLeave);
$(document).on('mouseenter', '#menu > ul > li', this.menuTitleHovered);
$(document).on('mouseleave', '#sidebar', this.leaveSidebar);
$(document).on('mouseenter', '#menu > ul > li', { self: this }, this.menuTitleHovered);
$(document).on('mouseleave', '#sidebar', { self: this }, this.leaveSidebar);
$(document).on('click', '.tree .handle', { self: this }, this.treeNodeToggle);
// Toggle all triStateButtons
@ -135,9 +135,10 @@
// $(document).on('change', 'form.auto select', this.submitForm);
},
menuTitleHovered: function () {
menuTitleHovered: function (event) {
var $li = $(this),
delay = 800;
delay = 800,
self = event.data.self;
if ($li.hasClass('active')) {
$li.siblings().removeClass('hover');
@ -177,9 +178,10 @@
}, delay);
},
leaveSidebar: function () {
var $sidebar = $(this);
var $li = $sidebar.find('li.hover');
leaveSidebar: function (event) {
var $sidebar = $(this),
$li = $sidebar.find('li.hover'),
self = event.data.self;
if (! $li.length) {
$('#layout').removeClass('hoveredmenu');
return;
@ -198,8 +200,9 @@
$(this).addClass('hover');
},
dropdownLeave: function () {
var $li = $(this);
dropdownLeave: function (event) {
var $li = $(this),
self = event.data.self;
setTimeout(function () {
// TODO: make this behave well together with keyboard navigation
if (! $li.is('li:hover') /*&& ! $li.find('a:focus')*/) {