Commit 45d91851 authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: FileTree in Editor page set to more used directories

parent 42e1e173
...@@ -13,7 +13,7 @@ $(document).ready(function () { ...@@ -13,7 +13,7 @@ $(document).ready(function () {
softwareDisplay = true, softwareDisplay = true,
projectDir = $("input#project").val(), projectDir = $("input#project").val(),
workdir = $("input#workdir").val(), workdir = $("input#workdir").val(),
currentProject = workdir + "/" + projectDir.replace(workdir, "").split('/')[1], currentProject = "workspace/" + projectDir.replace(workdir, "").split('/')[1],
send = false, send = false,
edit = false, edit = false,
ajaxResult = false, ajaxResult = false,
...@@ -24,7 +24,7 @@ $(document).ready(function () { ...@@ -24,7 +24,7 @@ $(document).ready(function () {
current_file = null, current_file = null,
favourite_list = new Array(), favourite_list = new Array(),
base_path = function () { base_path = function () {
return softwareDisplay ? currentProject : 'workspace/'; return softwareDisplay ? currentProject : 'runner_workdir/';
}; };
function openFile(file) { function openFile(file) {
...@@ -75,7 +75,7 @@ $(document).ready(function () { ...@@ -75,7 +75,7 @@ $(document).ready(function () {
function switchContent() { function switchContent() {
if (!softwareDisplay) { if (!softwareDisplay) {
$("span.swith_btn").empty(); $("span.swith_btn").empty();
$("span.swith_btn").append("Workspace"); $("span.swith_btn").append("Working dir");
$('#fileTreeFull').show(); $('#fileTreeFull').show();
$('#fileTree').hide(); $('#fileTree').hide();
} else { } else {
...@@ -594,7 +594,7 @@ $(document).ready(function () { ...@@ -594,7 +594,7 @@ $(document).ready(function () {
editor.renderer.setHScrollBarAlwaysVisible(false); editor.renderer.setHScrollBarAlwaysVisible(false);
initTree('#fileTree', currentProject, 'pfolder'); initTree('#fileTree', currentProject, 'pfolder');
initTree('#fileTreeFull', 'workspace'); initTree('#fileTreeFull', 'runner_workdir');
//bindContextMenu('#fileTree'); //bindContextMenu('#fileTree');
$("#info").append("Current work tree: " + base_path()); $("#info").append("Current work tree: " + base_path());
......
...@@ -719,6 +719,7 @@ def realpath(config, path, check_exist=True): ...@@ -719,6 +719,7 @@ def realpath(config, path, check_exist=True):
'software_root': config['software_root'], 'software_root': config['software_root'],
'instance_root': config['instance_root'], 'instance_root': config['instance_root'],
'workspace': config['workspace'], 'workspace': config['workspace'],
'runner_workdir': config['runner_workdir'],
'software_link': config['software_link'] 'software_link': config['software_link']
} }
if key not in allow_list: if key not in allow_list:
......
...@@ -301,7 +301,7 @@ def editCurrentProject(): ...@@ -301,7 +301,7 @@ def editCurrentProject():
project = os.path.join(app.config['etc_dir'], ".project") project = os.path.join(app.config['etc_dir'], ".project")
projectList = listFolder(app.config, 'workspace') projectList = listFolder(app.config, 'workspace')
if os.path.exists(project) and projectList: if os.path.exists(project) and projectList:
return render_template('softwareFolder.html', workDir='workspace', return render_template('softwareFolder.html', workDir='runner_workdir',
project=open(project).read(), project=open(project).read(),
projectList=projectList) projectList=projectList)
elif not projectList: elif not projectList:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment