-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathff-assistent_script.js
48 lines (40 loc) · 1023 Bytes
/
ff-assistent_script.js
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
var sectionsToHide=['generalSection','radio0MeshSection','radio0ClientSection','lanSection','internetSection','overviewSection'];
$(document).ready(function() {
$.each(sectionsToHide, function(index, element) {
$('#'+element).hide();
});
});
function nextSection(currentId, nextId) {
if (validateFields(currentId)) {
styleNavi(nextId,true);
$('#'+nextId).show();
$('#'+currentId).hide();
}
}
function skipSection(currentId, nextId) {
resetFields(currentId);
styleNavi(nextId, false);
$('#'+nextId).show();
$('#'+currentId).hide();
}
function prevSection(currentId, prevId) {
styleNavi(prevId);
$('#'+prevId).show();
$('#'+currentId).hide();
}
function styleNavi(id, fieldsFilled) {
if (fieldsFilled) {
$('#configNavi li.selected').addClass('validated');
} else {
$('#configNavi li.selected').removeClass('validated');
}
$('#configNavi li.selected').removeClass('selected');
$('#navi_'+id).addClass('selected');
}
function validateFields(sectionId) {
//TODO
return true;
}
function resetFields(sectionId) {
//TODO
}