1$(document).ready(function(){ 2 $('.sidebar_menu .sidebar_menu_inner .menu-wrapper').mCustomScrollbar({ 3 mouseWheel: { 4 scrollAmount: 150, 5 preventDefault: true 6 } 7 }) 8 9 $('.sidebar_menu .sidebar_menu_inner .menu-wrapper .menu_top_block .menu > li.v_hover > .dropdown-block').mCustomScrollbarDeferred({ 10 mouseWheel: { 11 scrollAmount: 150, 12 preventDefault: true 13 } 14 }) 15 16 $(document).on('mouseenter', '.menu-wrapper .menu_top_block .menu > li.v_hover', function () { 17 var _this = $(this), 18 menu = _this.find('> .dropdown-block'), 19 winHeight = $(window).height(); 20 21 menu.css('max-height', 'none'); 22 menu.find('.mCustomScrollBox').css('max-height', 'none'); 23 var pos = BX.pos(menu[0], true); 24 25 if(pos.height) 26 { 27 if(_this.hasClass('m_line')) 28 { 29 if((winHeight - pos.top) < 100) 30 { 31 if(winHeight < pos.bottom) 32 { 33 menu.removeAttr('style'); 34 pos = BX.pos(_this.find('.dropdown-block')[0], true); 35 menu.css('margin-top', "-" + (pos.bottom - winHeight) + "px"); 36 pos = BX.pos(_this.find('.dropdown-block')[0], true); 37 } 38 else 39 menu.css('margin-top', "-" + parseInt(_this.height()) + "px"); 40 } 41 else 42 menu.css('margin-top', "-" + parseInt(_this.height()) + "px"); 43 } 44 } 45 else 46 { 47 menu.css('max-height', 'none'); 48 } 49 50 menu.velocity('stop').velocity({opacity: '1', display: 'block'}, { 51 duration: 170, 52 delay: 200, 53 begin: function() { 54 var headerFixed = $('#headerfixed.fixed'); 55 var fixedHeight = 0; 56 var marginTop = Number.parseInt(menu.css('margin-top')); 57 if(headerFixed.length) { 58 fixedHeight = headerFixed[0].getBoundingClientRect().height; 59 } 60 var position = menu[0].getBoundingClientRect(); 61 if(position.y < fixedHeight) { 62 menu.css('top', -position.y + fixedHeight - marginTop); 63 } 64 position = menu[0].getBoundingClientRect(); 65 if(position.bottom > winHeight) { 66 menu.css('bottom', '0'); 67 if(position.height > winHeight - fixedHeight) { 68 menu.css('top', fixedHeight - marginTop); 69 } 70 } 71 }, 72 complete: function(){ 73 $('body').addClass('menu-hovered'); 74 75 if(!$('.shadow-block').length) 76 $('<div class="shadow-block"></div>').appendTo($('body')); 77 $('.shadow-block').velocity('stop').velocity('fadeIn', 200); 78 } 79 }); 80 81 _this.one('mouseleave', function () { 82 83 menu.velocity('stop').velocity({opacity: '0'}, { 84 duration: 100, 85 delay: 10, 86 complete: function(){ 87 menu.css('top', ''); 88 menu.css('bottom', ''); 89 $('.shadow-block').velocity('stop').velocity('transition.fadeOut', { 90 duration: 200, 91 // delay: 100, 92 complete: function(){ 93 $('body').removeClass('menu-hovered'); 94 } 95 }); 96 } 97 }); 98 }); 99 }); 100 101 /*$('.menu-wrapper .menu_top_block .menu > li.v_hover1').hover(function(e){ 102 var _this = $(this), 103 block = _this.find('.dropdown-block'), 104 winHeight = $(window).height(); 105 block.css('max-height', 'none'); 106 block.find('.mCustomScrollBox').css('max-height', 'none'); 107 var pos = BX.pos(block[0], true); 108 109 if(pos.height) 110 { 111 if(_this.hasClass('m_line')) 112 { 113 if((winHeight - pos.top) < 100) 114 { 115 if(winHeight < pos.bottom) 116 { 117 block.removeAttr('style'); 118 pos = BX.pos(_this.find('.dropdown-block')[0], true); 119 block.css('margin-top', "-" + (pos.bottom - winHeight) + "px"); 120 pos = BX.pos(_this.find('.dropdown-block')[0], true); 121 } 122 else 123 block.css('margin-top', "-" + parseInt(_this.height()) + "px"); 124 } 125 else 126 block.css('margin-top', "-" + parseInt(_this.height()) + "px"); 127 } 128 if(winHeight < pos.bottom) 129 block.css('max-height', winHeight - pos.top); 130 block.find('.mCustomScrollBox').css('max-height', winHeight - pos.top); 131 } 132 else 133 { 134 block.css('max-height', 'none'); 135 } 136 })*/ 137})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.