Move all files to 2017/
This commit is contained in:
parent
ac7370f67f
commit
2875863330
15717 changed files with 0 additions and 0 deletions
53
2017/web/modules/contrib/admin_toolbar/js/admin_toolbar.js
Normal file
53
2017/web/modules/contrib/admin_toolbar/js/admin_toolbar.js
Normal file
|
@ -0,0 +1,53 @@
|
|||
(function ($, Drupal) {
|
||||
Drupal.behaviors.adminToolbar = {
|
||||
attach: function (context, settings) {
|
||||
|
||||
$('a.toolbar-icon', context).removeAttr('title');
|
||||
|
||||
$('.toolbar-tray li.menu-item--expanded, .toolbar-tray ul li.menu-item--expanded .menu-item', context).hoverIntent({
|
||||
over: function () {
|
||||
// At the current depth, we should delete all "hover-intent" classes.
|
||||
// Other wise we get unwanted behaviour where menu items are expanded while already in hovering other ones.
|
||||
$(this).parent().find('li').removeClass('hover-intent');
|
||||
$(this).addClass('hover-intent');
|
||||
},
|
||||
out: function () {
|
||||
$(this).removeClass('hover-intent');
|
||||
},
|
||||
timeout: 250
|
||||
});
|
||||
|
||||
// Make the toolbar menu navigable with keyboard.
|
||||
$('ul.toolbar-menu li.menu-item--expanded a', context).on('focusin', function () {
|
||||
$('li.menu-item--expanded', context).removeClass('hover-intent');
|
||||
$(this).parents('li.menu-item--expanded').addClass('hover-intent');
|
||||
});
|
||||
|
||||
$('ul.toolbar-menu li.menu-item a', context).keydown(function (e) {
|
||||
if ((e.shiftKey && (e.keyCode || e.which) == 9)) {
|
||||
if ($(this).parent('.menu-item').prev().hasClass('menu-item--expanded')) {
|
||||
$(this).parent('.menu-item').prev().addClass('hover-intent');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.toolbar-menu:first-child > .menu-item:not(.menu-item--expanded) a, .toolbar-tab > a', context).on('focusin', function () {
|
||||
$('.menu-item--expanded').removeClass('hover-intent');
|
||||
});
|
||||
|
||||
$('.toolbar-menu:first-child > .menu-item', context).on('hover', function () {
|
||||
$(this, 'a').css("background: #fff;");
|
||||
});
|
||||
|
||||
$('ul:not(.toolbar-menu)', context).on({
|
||||
mousemove: function () {
|
||||
$('li.menu-item--expanded').removeClass('hover-intent');
|
||||
},
|
||||
hover: function () {
|
||||
$('li.menu-item--expanded').removeClass('hover-intent');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
})(jQuery, Drupal);
|
Reference in a new issue