Commit 254fb4ec authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

added switch for exercise in url

parent 4ba200a5
......@@ -1107,6 +1107,13 @@ var STWkit;
self.startDiv.style.display = 'none';
self.startButton.onclick = function () {
self.startButton.disabled = true;
var param = STWkit.getURLParams();
var exerciseid = STWkit.getParamValue('exercise', param);
if (exerciseid) {
STWkit.deleteParam('exercise', param);
param.push(['id', exerciseid]);
window.location.search = STWkit.getSearchUrl(param);
}
var geojson = {};
geojson["type"] = "FeatureCollection";
geojson["features"] = [];
......@@ -1135,7 +1142,6 @@ var STWkit;
AccordionCard.warningMsg("Login", "You need to login to use this function.");
},
success: function (location) {
var param = STWkit.getURLParams();
param.push(['id', location.id]);
STWkit.updateUrl(param);
self.clear();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1227,6 +1227,15 @@ module STWkit {
self.startButton.onclick = () => {
self.startButton.disabled = true;
var param = STWkit.getURLParams();
var exerciseid = STWkit.getParamValue('exercise', param);
if (exerciseid) {
STWkit.deleteParam('exercise', param);
param.push(['id', exerciseid]);
window.location.search = STWkit.getSearchUrl(param);
}
var geojson = {};
geojson["type"] = "FeatureCollection";
geojson["features"] = [];
......@@ -1255,7 +1264,6 @@ module STWkit {
AccordionCard.warningMsg("Login", "You need to login to use this function.");
},
success: function (location) {
var param = STWkit.getURLParams();
param.push(['id', location.id]);
STWkit.updateUrl(param);
self.clear();
......
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