Commit 9a1266ec authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix add to result in webserver mode

parent 1c2c6d2f
......@@ -8,9 +8,23 @@ dgenies.result.id_res = null;
dgenies.result.init = function(id_res) {
dgenies.result.id_res = id_res;
dgenies.result.add_to_list();
d3.boxplot.init();
};
dgenies.result.add_to_list = function () {
console.log("pass", dgenies.result.id_res);
let cookies = $.cookie("results");
cookies = cookies !== undefined ? cookies.split("|") : [];
console.log(cookies);
if (cookies.indexOf(dgenies.result.id_res) === -1) {
console.log("oui");
cookies.splice(0, 0, dgenies.result.id_res);
dgenies.save_cookies(cookies);
dgenies.update_results(cookies);
}
};
dgenies.result.remove_job_from_cookie = function(job) {
let cookies = $.cookie("results");
cookies = cookies !== undefined ? cookies.split("|") : [];
......
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