1 "var cookie_namespace = 'doxygen'; \n"
2 "var sidenav,navtree,content,header;\n"
4 "function readCookie(cookie) \n"
6 " var myCookie = cookie_namespace+\"_\"+cookie+\"=\";\n"
7 " if (document.cookie) \n"
9 " var index = document.cookie.indexOf(myCookie);\n"
10 " if (index != -1) \n"
12 " var valStart = index + myCookie.length;\n"
13 " var valEnd = document.cookie.indexOf(\";\", valStart);\n"
14 " if (valEnd == -1) \n"
16 " valEnd = document.cookie.length;\n"
18 " var val = document.cookie.substring(valStart, valEnd);\n"
25 "function writeCookie(cookie, val, expiration) \n"
27 " if (val==undefined) return;\n"
28 " if (expiration == null) \n"
30 " var date = new Date();\n"
31 " date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week\n"
32 " expiration = date.toGMTString();\n"
34 " document.cookie = cookie_namespace + \"_\" + cookie + \"=\" + val + \"; expires=\" + expiration+\"; path=/\";\n"
37 "function resizeWidth() \n"
39 " var windowWidth = $(window).width() + \"px\";\n"
40 " var sidenavWidth = $(sidenav).width();\n"
41 " content.css({marginLeft:parseInt(sidenavWidth)+6+\"px\"}); //account for 6px-wide handle-bar\n"
42 " writeCookie('width',sidenavWidth, null);\n"
45 "function restoreWidth(navWidth)\n"
47 " var windowWidth = $(window).width() + \"px\";\n"
48 " content.css({marginLeft:parseInt(navWidth)+6+\"px\"});\n"
49 " sidenav.css({width:navWidth + \"px\"});\n"
52 "function resizeHeight() \n"
54 " var headerHeight = header.height();\n"
55 " var footerHeight = footer.height();\n"
56 " var windowHeight = $(window).height() - headerHeight - footerHeight;\n"
57 " content.css({height:windowHeight + \"px\"});\n"
58 " navtree.css({height:windowHeight + \"px\"});\n"
59 " sidenav.css({height:windowHeight + \"px\",top: headerHeight+\"px\"});\n"
62 "function initResizable()\n"
64 " header = $(\"#top\");\n"
65 " sidenav = $(\"#side-nav\");\n"
66 " content = $(\"#doc-content\");\n"
67 " navtree = $(\"#nav-tree\");\n"
68 " footer = $(\"#nav-path\");\n"
69 " $(\".side-nav-resizable\").resizable({resize: function(e, ui) { resizeWidth(); } });\n"
70 " $(window).resize(function() { resizeHeight(); });\n"
71 " var width = readCookie('width');\n"
72 " if (width) { restoreWidth(width); } else { resizeWidth(); }\n"
74 " var url = location.href;\n"
75 " var i=url.indexOf(\"#\");\n"
76 " if (i>=0) window.location.hash=url.substr(i);\n"
77 " var _preventDefault = function(evt) { evt.preventDefault(); };\n"
78 " $(\"#splitbar\").bind(\"dragstart\", _preventDefault).bind(\"selectstart\", _preventDefault);\n"
79 " $(document).bind('touchmove',function(e){\n"
81 " var target = e.target;\n"
83 " if ($(target).css('-webkit-overflow-scrolling')=='touch') return;\n"
84 " target = target.parentNode;\n"
86 " e.preventDefault();\n"
88 " e.preventDefault();\n"