1$(document).ready(function() { 2 $(window).resize(adjustNavMenu); 3 $(window).scroll(function() { 4 toogleFixedTopPanel(); 5 toogleBackToTopButton(); 6 }); 7 $("#btnBackToTop").click(function(event) { 8 event.preventDefault(); 9 $("html, body").animate({ scrollTop: 0 }, '500'); 10 return false; 11 }); 12}); 13 14function toogleFixedTopPanel() { 15 if(!isTopPanelExists()) 16 return; 17 18 if($(document).scrollTop() > 100 && !TopPanel.IsExpandable()) { 19 $('header').addClass('shrink'); 20 $('body').css('padding-top', $('header').outerHeight()); 21 } else { 22 $('header').removeClass('shrink'); 23 $('body').css('padding-top', 0); 24 } 25} 26function toogleBackToTopButton() { 27 var offset = 200; 28 if($(this).scrollTop() > offset) 29 $(".btnBackToTop").removeClass("hidden"); 30 else 31 $(".btnBackToTop").addClass("hidden"); 32} 33function adjustNavMenu() { 34 if(!isTopPanelExists() || !window.NavMenu || !isASPxClientControl(NavMenu)) 35 return; 36 37 var orientation = TopPanel.IsExpandable() ? 'Vertical' : 'Horizontal'; 38 if(orientation !== NavMenu.GetOrientation()) 39 NavMenu.SetOrientation(orientation); 40} 41 42function isTopPanelExists() { 43 return window.TopPanel && isASPxClientControl(TopPanel); 44} 45function isASPxClientControl(obj) { 46 return obj instanceof ASPxClientControlBase; 47 48 function OnInit(s, e) { 49 ScrollToSelection(s, pnl); 50 } 51 function OnEndCallback(s, e) { 52 ScrollToSelection(s, pnl); 53 } 54 function ScrollToSelection(tree, pnl) { 55 var selEl = tree.GetMainElement().querySelector(".dxtv-ndSel"); 56 if (!selEl) return; 57 58 var pnlEl = pnl.GetMainElement(); 59 var selElY = ASPxClientUtils.GetAbsoluteY(selEl); 60 var pnlY = ASPxClientUtils.GetAbsoluteY(pnlEl); 61 pnlEl.scrollTop = selElY - pnlY - pnlEl.offsetHeight / 2; 62 } 63}
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.