js/core/file.js
// Add tabs and project files on start
Add tabs and project files on start
Add tabs and project files on start
function addTabsOnInit(){
    if(files.length !== 0){
      currentFile = files[0];
    }
    var parent = $(".editor--code .editor__canvas");
    var tTabs = $('<div id="tabs" class="tabs-container">\n').appendTo(parent);
    for (var i = 0; i < files.length; i++)
    {
        tabHtml = createTabHTML(files[i]);
        $(tabHtml).appendTo(".tabs-container");
    }
    var pf = $('<div class="files-dropdown">\n').html('<span class="icon-down sml"></span>').prependTo(tTabs);
    var file = $('<div id="files" class="files-container">\n').appendTo(pf);
    for (var j = 0; j < files.length; j++)
    {
        fileHtml = createFileHTML(files[j]);
        $(fileHtml).appendTo(".files-container");
    }
    $('</div>\n').appendTo(file);
    $('</div></div>').appendTo(parent);
  }
function addTabsOnInit ( ) { if ( files . length !== 0 ) { currentFile = files [ 0 ] ; } var parent = $ ( ".editor--code .editor__canvas" ) ; var tTabs = $ ( '<div id="tabs" class="tabs-container">\n' ) . appendTo ( parent ) ; for ( var i = 0 ; i < files . length ; i ++ ) { tabHtml = createTabHTML ( files [ i ] ) ; $ ( tabHtml ) . appendTo ( ".tabs-container" ) ; } var pf = $ ( '<div class="files-dropdown">\n' ) . html ( '<span class="icon-down sml"></span>' ) . prependTo ( tTabs ) ; var file = $ ( '<div id="files" class="files-container">\n' ) . appendTo ( pf ) ; for ( var j = 0 ; j < files . length ; j ++ ) { fileHtml = createFileHTML ( files [ j ] ) ; $ ( fileHtml ) . appendTo ( ".files-container" ) ; } $ ( '</div>\n' ) . appendTo ( file ) ; $ ( '</div></div>' ) . appendTo ( parent ) ; }
Add tabs and project files on start
Add tabs and project files on start
// Add the tabs layout and loop through Tabs array // populate tabs row // Add the files layout and loop through Files array // populate files menu