| | |
| | | function fm_render_list(fl) { |
| | | if(modus == 'kacheln') { |
| | | // Kachelansicht |
| | | var template = $('#tpl-kacheln').html(); |
| | | Mustache.parse(template); // optional, speeds up future uses |
| | | $.get('tpl-kacheln.txt', function(template) { |
| | | $('#dateien').empty(); |
| | | $('#dateien').html(Mustache.render(template, fl)); |
| | | $('.figure').click(fm_dateiwahl); |
| | | }); |
| | | $('.datei-zeile').attr('onclick','').unbind('click'); |
| | | $('#dateien').empty(); |
| | | $('#dateien').html(Mustache.render(template, fl)); |
| | | $('.figure').click(fm_dateiwahl); |
| | | } else { |
| | | // Listenansicht |
| | | var template = $('#tpl-liste').html(); |
| | | Mustache.parse(template); // optional, speeds up future uses |
| | | $.get('tpl-liste.txt', function(template) { |
| | | $('#dateien').empty(); |
| | | $('#dateien').html(Mustache.render(template, fl)); |
| | | $('.datei-zeile').click(fm_dateiwahl); |
| | | }); |
| | | $('.figure').attr('onclick','').unbind('click'); |
| | | $('#dateien').empty(); |
| | | $('#dateien').html(Mustache.render(template, fl)); |
| | | $('.datei-zeile').click(fm_dateiwahl); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // Breadcrumb-Ansicht |
| | | var template; |
| | | //var template; |
| | | $('.breadcrumb-item').attr('onclick','').unbind('click'); |
| | | $('#bcnav').empty(); |
| | | var dirList = new Array(); |
| | |
| | | } |
| | | var bl = new BcrFiles(dirList); |
| | | |
| | | 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])); |
| | | if(dirList.length > 0) { |
| | | $.get('tpl-bcr.txt', function(template) { |
| | | $('#bcnav').html(Mustache.render(template, bl)); |
| | | if(dirs.length > 0) { |
| | | dirList.push(new BcrFile(rp + '/' + dirs[dirs.length-1], dirs[dirs.length-1])); |
| | | $.get('tpl-bcr2.txt', function(template) { |
| | | $('#bcnav').append(Mustache.render(template, dirList[dirList.length-1])); |
| | | $('#bcnav').append($('#tpl-bcr3').html()); |
| | | fm_bcr_end(); |
| | | }); |
| | | //template = $('#tpl-bcr2').html(); |
| | | //Mustache.parse(template); // optional, speeds up future uses |
| | | //$('#bcnav').append(Mustache.render(template, dirList[dirList.length-1])); |
| | | } else { |
| | | $.get('tpl-bcr2.txt', function(template) { |
| | | $('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | $('#bcnav').append($('#tpl-bcr3').html()); |
| | | fm_bcr_end(); |
| | | }); |
| | | //template = $('#tpl-bcr2').html(); |
| | | //Mustache.parse(template); // optional, speeds up future uses |
| | | //$('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | } |
| | | }); |
| | | } else { |
| | | template = $('#tpl-bcr2').html(); |
| | | Mustache.parse(template); // optional, speeds up future uses |
| | | $('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | if(dirs.length > 0) { |
| | | dirList.push(new BcrFile(rp + '/' + dirs[dirs.length-1], dirs[dirs.length-1])); |
| | | $.get('tpl-bcr2.txt', function(template) { |
| | | $('#bcnav').append(Mustache.render(template, dirList[dirList.length-1])); |
| | | $('#bcnav').append($('#tpl-bcr3').html()); |
| | | fm_bcr_end(); |
| | | }); |
| | | //template = $('#tpl-bcr2').html(); |
| | | //Mustache.parse(template); // optional, speeds up future uses |
| | | //$('#bcnav').append(Mustache.render(template, dirList[dirList.length-1])); |
| | | } else { |
| | | $.get('tpl-bcr2.txt', function(template) { |
| | | $('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | $('#bcnav').append($('#tpl-bcr3').html()); |
| | | fm_bcr_end(); |
| | | }); |
| | | //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 { |
| | | pfad = ''; |
| | | template = $('#tpl-bcr2').html(); |
| | | Mustache.parse(template); // optional, speeds up future uses |
| | | $('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | $('#bcnav').append($('#tpl-bcr3').html()); |
| | | $.get('tpl-bcr2.txt', function(template) { |
| | | $('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | $('#bcnav').append($('#tpl-bcr3').html()); |
| | | fm_bcr_end(); |
| | | }); |
| | | //template = $('#tpl-bcr2').html(); |
| | | //Mustache.parse(template); // optional, speeds up future uses |
| | | //$('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | //$('#bcnav').append($('#tpl-bcr3').html()); |
| | | } |
| | | $('.breadcrumb-item').click(fm_bc_click); |
| | | $('#ansicht').click(fm_ansicht_umschalten); |
| | | fm_set_modus(); |
| | | //$('.breadcrumb-item').click(fm_bc_click); |
| | | //$('#ansicht').click(fm_ansicht_umschalten); |
| | | //fm_set_modus(); |
| | | }); |
| | | } |
| | | |
| | | function fm_bcr_end() { |
| | | $('.breadcrumb-item').click(fm_bc_click); |
| | | $('#ansicht').click(fm_ansicht_umschalten); |
| | | fm_set_modus(); |
| | | } |
| | | |
| | | function fm_menu_datei_speichern() { |
| | |
| | | this.typeClass = function() { |
| | | if(modus == 'kacheln') { |
| | | if(self.fr.isDirectory) { |
| | | return 'fa-folder'; |
| | | return 'fa-folder ordner'; |
| | | } else { |
| | | return 'fa-file'; |
| | | return 'fa-file datei'; |
| | | } |
| | | } else { |
| | | if(self.fr.isDirectory) { |
| | | return 'fa-folder'; |
| | | return 'fa-folder ordner'; |
| | | } else { |
| | | return 'fa-file-o'; |
| | | return 'fa-file-o datei'; |
| | | } |
| | | } |
| | | }; |