Added 'New Project' Button (#171)

* Added 'New Project' Button

* Added 'New Project' Button Functionality

* Changed To addEventListener

* Move To Import/Export
This commit is contained in:
TheBrokenRail 2016-09-13 22:04:44 -04:00 committed by Tim Mickel
parent dec5d054c8
commit b6e30a7b23
2 changed files with 5 additions and 0 deletions

View file

@ -35,6 +35,7 @@
<pre id="blockexplorer"></pre> <pre id="blockexplorer"></pre>
</div> </div>
<div id="tab-importexport"> <div id="tab-importexport">
<button id="createEmptyProject">New Project</button><br />
Import/Export<br /> Import/Export<br />
Project ID: <input id="projectId" value="119615668" /> Project ID: <input id="projectId" value="119615668" />
<button id="projectLoadButton">Load</button><br /> <button id="projectLoadButton">Load</button><br />

View file

@ -30,6 +30,10 @@ window.onload = function() {
document.location = '#' + document.getElementById('projectId').value; document.location = '#' + document.getElementById('projectId').value;
location.reload(); location.reload();
}; };
document.getElementById('createEmptyProject').addEventListener('click', function() {
document.location = '#' + 'createEmptyProject';
location.reload();
});
loadProject(); loadProject();
// Instantiate the renderer and connect it to the VM. // Instantiate the renderer and connect it to the VM.