From b19c14f2b4dad4a167cb8255f1ac5acf0443d5a0 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Wed, 13 Feb 2019 13:31:18 -0500 Subject: [PATCH] Replaced buttons with links for downloads --- public/index.html | 29 +++++++++++++---------------- public/js/main.js | 10 ++++++++-- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/public/index.html b/public/index.html index 3b6083a..8b8c893 100644 --- a/public/index.html +++ b/public/index.html @@ -148,30 +148,27 @@
Status:
Time Elapsed:
Output: ViewHide | Download
+ +
+ +
+
- - - - + Cancel + + Restart + + Remove +
@@ -180,8 +177,8 @@
+ Remove +
diff --git a/public/js/main.js b/public/js/main.js index 4779b8c..29adaef 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -436,11 +436,17 @@ $(function() { Task.prototype.restart = genApiCall("/task/restart?token=" + token, function(task) { task.resetOutput(); }); + Task.prototype.downloadLink = function(){ + return "/task/" + this.uuid + "/download/all.zip?token=" + token; + }; + Task.prototype.downloadOrthoLink = function(){ + return "/task/" + this.uuid + "/download/orthophoto.tif?token=" + token; + }; Task.prototype.download = function() { - location.href = "/task/" + this.uuid + "/download/all.zip?token=" + token; + location.href = this.downloadLink(); }; Task.prototype.downloadOrthophoto = function() { - location.href = "/task/" + this.uuid + "/download/orthophoto.tif?token=" + token; + location.href = this.downloadOrthoLink(); }; var taskList = new TaskList();