Commit 7cc7fe92 authored by Marc Duez's avatar Marc Duez

database.js : display patient name as filename / list of recently opened files

parent bdb463e0
...@@ -316,13 +316,23 @@ Database.prototype = { ...@@ -316,13 +316,23 @@ Database.prototype = {
/*récupére et initialise le browser avec un fichier .data /*récupére et initialise le browser avec un fichier .data
* args => format json ( parametre attendu > patient_id, config_id) * args => format json ( parametre attendu > patient_id, config_id)
*/ */
load_data: function (args) { load_data: function (args, filename) {
var self = this; var self = this;
var arg = "?"; var arg = "?";
for (var key in args) { for (var key in args) {
arg += "" + key + "=" + args[key] + "&"; arg += "" + key + "=" + args[key] + "&";
} }
var list = document.getElementById("last_loaded_file")
var a = document.createElement('a');
a.className="buttonSelector"
a.appendChild(document.createTextNode(filename));
a.onclick = function () {
self.load_data(args, filename)
}
list.appendChild(a);
$.ajax({ $.ajax({
type: "POST", type: "POST",
......
...@@ -375,7 +375,10 @@ Model.prototype = { ...@@ -375,7 +375,10 @@ Model.prototype = {
self.normalization= self.analysis.normalization; self.normalization= self.analysis.normalization;
} }
if (self.analysis.timestamp2) { if (self.analysis.timestamp2) {
self.timestamp2= self.analysis.timestamp2; self.timestamp2 = self.analysis.timestamp2;
}
if (self.analysis.patient) {
self.dataFileName = self.analysis.patient;
} }
self.initClones(); self.initClones();
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment