Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
stw
stwkit
Commits
254fb4ec
Commit
254fb4ec
authored
Dec 08, 2017
by
Tomas Pettersson
🏸
Browse files
added switch for exercise in url
parent
4ba200a5
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
src/components/cards.js
View file @
254fb4ec
...
...
@@ -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
();
...
...
src/components/cards.js.map
View file @
254fb4ec
This diff is collapsed.
Click to expand it.
src/components/cards.ts
View file @
254fb4ec
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment