(treeview)
| 24 | */ |
| 25 | |
| 26 | function initResizable(treeview) { |
| 27 | let sidenav,navtree,content,header,footer,barWidth=6; |
| 28 | const RESIZE_COOKIE_NAME = ''+'width'; |
| 29 | |
| 30 | function resizeWidth() { |
| 31 | const sidenavWidth = $(sidenav).outerWidth(); |
| 32 | content.css({marginLeft:parseInt(sidenavWidth)+"px"}); |
| 33 | if (typeof page_layout!=='undefined' && page_layout==1) { |
| 34 | footer.css({marginLeft:parseInt(sidenavWidth)+"px"}); |
| 35 | } |
| 36 | Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); |
| 37 | } |
| 38 | |
| 39 | function restoreWidth(navWidth) { |
| 40 | content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); |
| 41 | if (typeof page_layout!=='undefined' && page_layout==1) { |
| 42 | footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); |
| 43 | } |
| 44 | sidenav.css({width:navWidth + "px"}); |
| 45 | } |
| 46 | |
| 47 | function resizeHeight(treeview) { |
| 48 | const headerHeight = header.outerHeight(); |
| 49 | const windowHeight = $(window).height(); |
| 50 | let contentHeight; |
| 51 | if (treeview) |
| 52 | { |
| 53 | const footerHeight = footer.outerHeight(); |
| 54 | let navtreeHeight,sideNavHeight; |
| 55 | if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */ |
| 56 | contentHeight = windowHeight - headerHeight - footerHeight; |
| 57 | navtreeHeight = contentHeight; |
| 58 | sideNavHeight = contentHeight; |
| 59 | } else if (page_layout==1) { /* DISABLE_INDEX=YES */ |
| 60 | contentHeight = windowHeight - footerHeight; |
| 61 | navtreeHeight = windowHeight - headerHeight; |
| 62 | sideNavHeight = windowHeight; |
| 63 | } |
| 64 | navtree.css({height:navtreeHeight + "px"}); |
| 65 | sidenav.css({height:sideNavHeight + "px"}); |
| 66 | } |
| 67 | else |
| 68 | { |
| 69 | contentHeight = windowHeight - headerHeight; |
| 70 | } |
| 71 | content.css({height:contentHeight + "px"}); |
| 72 | if (location.hash.slice(1)) { |
| 73 | (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView(); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | function collapseExpand() { |
| 78 | let newWidth; |
| 79 | if (sidenav.width()>0) { |
| 80 | newWidth=0; |
| 81 | } else { |
| 82 | const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); |
| 83 | newWidth = (width>250 && width<$(window).width()) ? width : 250; |
nothing calls this directly
no test coverage detected