Commit 330e0fb9 authored by Ryan Herbert's avatar Ryan Herbert Committed by Mathieu Giraud

url.js refactor generateParamsString

returns a true string deigned to be pushed to the URL.
parent 9881d73c
......@@ -112,6 +112,21 @@ Url.prototype= {
return params
},
generateParamsString: function(params_dict) {
var params_list = [];
for (var key in params_dict){
if ((typeof key != "undefined" && key !== "") && (typeof params_dict[key]!= "undefined" && params_dict[key] !== '')) {
params_list.push(key+"="+params_dict[key])
}
}
return params_list.join("&");
},
pushUrl: function(params) {
var new_url = "?" + params;
this.window.history.pushState('plop', 'plop', new_url);
},
getStraightParams: function() {
return ["sample_set_id", "patient_id", "run_id", "config"];
}
......
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