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 () {
softwareDisplay = true,
projectDir = $("input#project").val(),
workdir = $("input#workdir").val(),
currentProject = workdir + "/" + projectDir.replace(workdir, "").split('/')[1],
currentProject = "workspace/" + projectDir.replace(workdir, "").split('/')[1],
send = false,
edit = false,
ajaxResult = false,
......@@ -24,7 +24,7 @@ $(document).ready(function () {
current_file = null,
favourite_list = new Array(),
base_path = function () {
return softwareDisplay ? currentProject : 'workspace/';
return softwareDisplay ? currentProject : 'runner_workdir/';
};
function openFile(file) {
......@@ -75,7 +75,7 @@ $(document).ready(function () {
function switchContent() {
if (!softwareDisplay) {
$("span.swith_btn").empty();
$("span.swith_btn").append("Workspace");
$("span.swith_btn").append("Working dir");
$('#fileTreeFull').show();
$('#fileTree').hide();
} else {
......@@ -594,7 +594,7 @@ $(document).ready(function () {
editor.renderer.setHScrollBarAlwaysVisible(false);
initTree('#fileTree', currentProject, 'pfolder');
initTree('#fileTreeFull', 'workspace');
initTree('#fileTreeFull', 'runner_workdir');
//bindContextMenu('#fileTree');
$("#info").append("Current work tree: " + base_path());
......
......@@ -719,6 +719,7 @@ def realpath(config, path, check_exist=True):
'software_root': config['software_root'],
'instance_root': config['instance_root'],
'workspace': config['workspace'],
'runner_workdir': config['runner_workdir'],
'software_link': config['software_link']
}
if key not in allow_list:
......
......@@ -301,7 +301,7 @@ def editCurrentProject():
project = os.path.join(app.config['etc_dir'], ".project")
projectList = listFolder(app.config, 'workspace')
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(),
projectList=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