| | |
| | | $('#dateien').empty(); |
| | | } |
| | | |
| | | var template; |
| | | $('#bcnav').empty(); |
| | | var dirList = new Array(); |
| | | var rp = ''; |
| | | console.log("'" + relPath + "'"); |
| | | var dirs = relPath.split('/'); |
| | | console.log(dirs.length); |
| | | dirList.push(new BcrFile(rp, 'Home')); |
| | | if(dirs.length > 0) { |
| | | for(var i = 0; i < dirs.length; i++) { |
| | | if(relPath.length > 0) { |
| | | for(var i = 0; i < dirs.length - 1; i++) { |
| | | if(rp.length > 0 ) { |
| | | dirList.push(new BcrFile(rp + '/' + dirs[i], dirs[i])); |
| | | rp = rp + '/' + dirs[i]; |
| | | } else { |
| | | dirList.push(new BcrFile(dirs[i], dirs[i])); |
| | | rp = dirs[i]; |
| | | } |
| | | } |
| | | var bl = new BcrFiles(dirList); |
| | | var template = $('#tpl-bcr').html(); |
| | | Mustache.parse(template); // optional, speeds up future uses |
| | | $('#bcnav').empty(); |
| | | $('#bcnav').html(Mustache.render(template, bl)); |
| | | $('#bcnav').append($('#tpl-bcr2').html()); |
| | | |
| | | if(dirList.length > 0) { |
| | | template = $('#tpl-bcr').html(); |
| | | Mustache.parse(template); // optional, speeds up future uses |
| | | $('#bcnav').html(Mustache.render(template, bl)); |
| | | } |
| | | |
| | | if(dirs.length > 0) { |
| | | dirList.push(new BcrFile(rp + '/' + dirs[dirs.length-1], dirs[dirs.length-1])); |
| | | template = $('#tpl-bcr2').html(); |
| | | Mustache.parse(template); // optional, speeds up future uses |
| | | $('#bcnav').append(Mustache.render(template, dirList[dirList.length-1])); |
| | | } else { |
| | | template = $('#tpl-bcr2').html(); |
| | | Mustache.parse(template); // optional, speeds up future uses |
| | | $('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | } |
| | | |
| | | $('#bcnav').append($('#tpl-bcr3').html()); |
| | | } else { |
| | | template = $('#tpl-bcr2').html(); |
| | | Mustache.parse(template); // optional, speeds up future uses |
| | | $('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | } |
| | | }); |
| | | } |