mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-28 19:34:14 +01:00
Added open command
This commit is contained in:
parent
d267ec658b
commit
6499410c4d
2 changed files with 17 additions and 0 deletions
|
|
@ -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.", "");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue