Support the import feature

This commit is contained in:
Julien Duponchelle 2015-08-05 17:50:17 +02:00
parent 930d35f4cd
commit d6baee2fe1

View File

@ -3,7 +3,10 @@
function importDevice() {
md5 = gns3.importDevice();
window.location = "/images/" + md5 + ".html"
if (md5 != null) {
window.location = "/images/" + md5 + ".html"
}
return false;
}
{% endblock %}
@ -14,6 +17,6 @@ function importDevice() {
</div
<p>
<a class="btn btn-primary btn-lg" href="/devices" role="button">Show devices</a>
<a class="btn btn-primary btn-lg" href="#" role="button" onclick="importDevice()">Import device</a>
<a class="btn btn-primary btn-lg" href="#" role="button" onclick="return importDevice()">Import device</a>
</p>
{% endblock %}