Added open command

This commit is contained in:
mmiscool 2016-12-21 21:44:13 -05:00 committed by Val Erastov
parent d267ec658b
commit 6499410c4d
2 changed files with 17 additions and 0 deletions

View file

@ -54,3 +54,19 @@ var filetodelete = document.getElementById("filelist").options[document.getEleme
}
updatelistbox();
}
function openSelectedItem()
{
var filetoopen = document.getElementById("filelist").options[document.getElementById("filelist").selectedIndex].text;
filetoopen.replace("TCAD.projects.", "");
if (filetoopen.search("sketch") < 0)
{
window.location.href = "./index.html#" + filetoopen.replace("TCAD.projects.", "");
}
else
{
window.location.href = "./sketcher.html#" + filetoopen.replace("TCAD.projects.", "");
}
}

View file

@ -19,6 +19,7 @@
<body onload="updatelistbox();">
<div>
<button onclick="deleteItem()">Delete</button>
<button onclick="openSelectedItem()">Open</button>
Show Sketches<input type="checkbox" id="showsketches" onclick='showsketches(this);'><br>
<select id = 'filelist' size="50"> </select>
</div>