From 1cbae984a64e0e3b5e1b30844625bb18ee2ff170 Mon Sep 17 00:00:00 2001
From: Nelly Barret <nelly.barret@etu.univ-lyon1.fr>
Date: Wed, 24 Jun 2020 15:54:24 +0200
Subject: [PATCH] [M] fixed JS and loading sign

---
 predihood/static/js/algorithms.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/predihood/static/js/algorithms.js b/predihood/static/js/algorithms.js
index 59b08190..ff7e01fa 100644
--- a/predihood/static/js/algorithms.js
+++ b/predihood/static/js/algorithms.js
@@ -53,7 +53,7 @@ $("#testPercentage")
 $("#runBtn")
 	.click("on", function() {
 		$(".wrapperTable input[type='checkbox']:not(:checked)").each(function() {
-			$(this).parent().empty(); // remove tables that are not checked in the interface
+			$(this).parent().parent().empty(); // remove tables that are not checked in the interface
 		});
 		let userParameters = {};
 		let chosen_clf = $("#formAlgorithm")[0].elements[0].value;
@@ -94,7 +94,6 @@ $("#runBtn")
 				//   - the results table, highlighted cells are best means for each EV
 				//   - the list of parameters associated to the results
 				//   - the mean for this classifier (all EV combined)
-				let keep = $("<input>").prop("type", "checkbox");
 				let table = $("<table>").addClass("table table-hover table-responsive").append($("<tbody>"));
 				let results = result["results"]
 				console.log(result);
@@ -123,8 +122,10 @@ $("#runBtn")
 					table.append(row)
 				}
 
-				let containing_table = $("<div>").prop("class", "wrapperTable");
-				containing_table.append(keep).append(table);
+				let containing_table = $("<div>")
+					.prop("class", "wrapperTable")
+					.append("<label class='h5'><input type='checkbox'/>"+chosen_clf+"</label>")
+					.append(table);
 				let params = "";
 				for(let elem in current_parameters) {
 					if(elem in userParameters) { params += elem+": "+userParameters[elem]+" ; "; // adding user value
-- 
GitLab