Dateiverwaltung für die WebBox
ulrich
2017-02-25 c980bb439a1685510b1b479669761a93f0d8c5b0
Mustache Templates ausgelagert (noch in Arbeit)
1 files modified
33 ■■■■■ changed files
web/ui/ui.js 33 ●●●●● patch | view | raw | blame | history
web/ui/ui.js
@@ -365,6 +365,8 @@
      if(dirList.length > 0) {        
        $.get('tpl-bcr.txt', function(template) {
          $('#bcnav').html(Mustache.render(template, bl));
          //fm_bcr_step2(dirs, dirList);
          if(dirs.length > 0) {
            dirList.push(new BcrFile(rp + '/' + dirs[dirs.length-1], dirs[dirs.length-1]));
            $.get('tpl-bcr2.txt', function(template) {
@@ -380,13 +382,16 @@
              $('#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 {
        //fm_bcr_step2(dirs, dirList);
        /*
        if(dirs.length > 0) {
          dirList.push(new BcrFile(rp + '/' + dirs[dirs.length-1], dirs[dirs.length-1]));
          $.get('tpl-bcr2.txt', function(template) {
@@ -407,6 +412,7 @@
          //Mustache.parse(template);   // optional, speeds up future uses
          //$('#bcnav').append(Mustache.render(template, dirList[0]));        
        }
        */
      }
    } else {
      pfad = '';
@@ -426,6 +432,31 @@
  });  
}
/*
function fm_bcr_step2(dirs, dirList) {
  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]));
  }
}
*/
function fm_bcr_end() {
  $('.breadcrumb-item').click(fm_bc_click);
  $('#ansicht').click(fm_ansicht_umschalten);