-
Notifications
You must be signed in to change notification settings - Fork 1
/
module_client.html
78 lines (62 loc) · 1.59 KB
/
module_client.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<script>
/**
*handlers
*/
function OnFormParametersFetched(data){
var parameters = JSON.parse(data);
getTeamElem().setAttribute('max', (parameters.team+1)*10);
getProblemElem().setAttribute('max', parameters.problem);
getTeamElem().setAttribute('placeholder', "от 0000 до " + (parameters.team+1)*10);
getProblemElem().setAttribute('placeholder', "от 1 до " + parameters.problem);
getVersionElem().setAttribute("value", parameters.team);
}
/**
* object getters
*/
function getTeamElem() {
return document.getElementById("team");
}
function getProblemElem() {
return document.getElementById("problem");
}
function getJudgeElem() {
return document.getElementById("judgename");
}
function getSubmitButtonElem() {
return document.getElementById("sbmbt");
}
function getVersionElem() {
return document.getElementById("version");
}
function getIDElem() {
return document.getElementById("spreadsheetID");
}
function getCommentElem() {
return document.getElementById("comment");
}
function getResultValue() {
// very careful with result getting
return document.getElementById('good_radio').checked;
}
/**
*value getters
*/
function getTeamValue() {
return parseInt(getTeamElem().value);
}
function getProblemValue() {
return parseInt(getProblemElem().value);
}
function getJudgeValue() {
return getJudgeElem().value;
}
function getVersionValue(){
return parseInt(getVersionElem().value);
}
function getIDValue() {
return getIDElem().value;
}
function getCommentValue() {
return getCommentElem().value;
}
</script>