-
Notifications
You must be signed in to change notification settings - Fork 0
/
lockall.js
executable file
·56 lines (53 loc) · 950 Bytes
/
lockall.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
49
50
51
52
53
54
55
56
$(".lockall").mousedown(function()
{
$.each(doorsHome, function(i)
{
doorsHome[i].locked = true;
});
$.each(doorsWork, function(i)
{
doorsWork[i].locked = true;
});
$.each(doorsFree, function(i)
{
doorsFree[i].locked = true;
});
$(".messageboxmessage").html("Samtlige døre er nu låst");
$(".messagebox").removeClass("hide");
});
function activatelockhome()
{
$(".lockallhome").unbind();
$(".lockallhome").mousedown(function()
{
$.each(doorsHome, function(i)
{
doorsHome[i].locked = false;
});
displayHome();
});
}
function activatelockwork()
{
$(".lockallwork").unbind();
$(".lockallwork").mousedown(function()
{
$.each(doorsWork, function(i)
{
doorsWork[i].locked = false;
});
displayWork();
});
}
function activatelockfree()
{
$(".lockallfree").unbind();
$(".lockallfree").mousedown(function()
{
$.each(doorsFree, function(i)
{
doorsFree[i].locked = false;
});
displayFree();
});
}