adamstark@114: /*
adamstark@114: @licstart The following is the entire license notice for the JavaScript code in this file.
adamstark@114:
adamstark@114: The MIT License (MIT)
adamstark@114:
adamstark@114: Copyright (C) 1997-2020 by Dimitri van Heesch
adamstark@114:
adamstark@114: Permission is hereby granted, free of charge, to any person obtaining a copy of this software
adamstark@114: and associated documentation files (the "Software"), to deal in the Software without restriction,
adamstark@114: including without limitation the rights to use, copy, modify, merge, publish, distribute,
adamstark@114: sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
adamstark@114: furnished to do so, subject to the following conditions:
adamstark@114:
adamstark@114: The above copyright notice and this permission notice shall be included in all copies or
adamstark@114: substantial portions of the Software.
adamstark@114:
adamstark@114: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
adamstark@114: BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
adamstark@114: NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
adamstark@114: DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
adamstark@114: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
adamstark@114:
adamstark@114: @licend The above is the entire license notice for the JavaScript code in this file
adamstark@114: */
adamstark@114: function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
adamstark@114: function makeTree(data,relPath) {
adamstark@114: var result='';
adamstark@114: if ('children' in data) {
adamstark@114: result+='
';
adamstark@114: for (var i in data.children) {
adamstark@114: var url;
adamstark@114: var link;
adamstark@114: link = data.children[i].url;
adamstark@114: if (link.substring(0,1)=='^') {
adamstark@114: url = link.substring(1);
adamstark@114: } else {
adamstark@114: url = relPath+link;
adamstark@114: }
adamstark@114: result+='