summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/frontend/panel.html
blob: c3316603e24065b2c82784b549bb48a77202c742 (plain) (blame)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE html>
<html lang="de">
<meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8">
<head>
	<script type='text/javascript' src='../../../script/jquery.js'></script>
	<style type='text/css'>
		.main{
			background-color: lightgrey;

		}

		.child{
			background-color: white;
			display: inline-block;
			font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
			padding: 1vw;


		}
		.border{
			display: inline-block;
			padding: 0.4vw;
		}
		.courseFont{
			padding: 0.5vw;
			font-size: 2vw;
			font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
			font-weight: bold;
		}
		.headerFont{
			font-size: 4vw;
			font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
			font-weight: bold;
			border: 0px;
			border-bottom: 0.2vw;
			margin-bottom: 1vw;
			border-color: grey;
			border-style:solid;

		}
		.divPcOn, .divPcPcUsed, .divPcPcOff, .divPcPcDefect{
			width: 4vw;
			height: 4vw;
			text-align: center;
			font-size: 3vw;
			font-weight: 800;

		}

		.divPcOn {
			background-color: green;
			text-align: center;
		}
		.divPcPcUsed{

			background-color: red;
		}
		.divPcPcOff{
			background-color: darkgrey;
		}
		.divPcPcDefect{
			background-color: black;
			color: white;
		}

		.divAroundPcStates{
			display: flex;
			justify-content: flex-end;

		}
		.paperEffect
		{
			margin: 0 auto;
			background-color: #fff;
			-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1);
			-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1);
			box-shadow: 0 0 5px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1);
			border-radius: 1px;
		}



	</style>
	<script type='text/javascript'>
		$(document).ready(function () {
			generateParent("body",1,"Parent");
			for(var i= 0;i<10;i++) {
				generateChild("parent_1",i, "test " + i);
			}
			updateRoomUsage(7,7,7,7,7);
			updateCourseText(7,"asd");
			updateCoursTimer(7,"15:00")
		});

		function updateRoomUsage(id,on,used,off,defect){
			$("#div_pc_On_"+id).text(on);
			$("#div_pc_Used_"+id).text(used);
			$("#div_pc_Off_"+id).text(off);
			$("#div_pc_Defect_"+id).text(defect);
		}

		function updateCourseText(id,text) {
			$("#div_course"+id).text(text);
		}
		function updateCoursTimer(id,time) {
			$("#div_Time_"+id).text(time);
		}

		function generateChild(target,id,name) {
			var text="<div class='border'>"  +
				"<div class='child paperEffect'>" +
				"<div class='headerFont'>"+name+"</div>" +
				"<div class='divAroundPcStates'>" +
				"<div id = 'div_pc_On_"+id+"'  class='divPcOn'>1</div>" +
				"<div id = 'div_pc_Used_"+id+"' class='divPcPcUsed'>5</div>" +
				"<div id = 'div_pc_Off_"+id+"' class='divPcPcOff'>99</div>" +
				"<div id = 'div_pc_Defect_"+id+"' class='divPcPcDefect'>5</div>" +
				"</div>" +
				"<div id = 'div_course"+id+"'class='courseFont'>Course Name</div>" +
				"<div id = 'div_Time_"+id+"'class='courseFont'>14:23</div></div></div>";
			$("#"+target).append(text);

		}

		function generateParent(target,id,name) {
			var text="<div class='border'>"  +
			"<div class='child paperEffect'>" +
			"<div class='headerFont'>"+name+"</div>" +
				"<div id='parent_"+ id +"'</div>"+
				"</div></div>";
			$(target).append(text);
		}

	</script>
</head>
<body class="main">
<h1>Only Testing</h1>
<!--
<div class="child paperEffect" >
	<div class="headerFont">Room Name</div>
	<div class="divAroundPcStates">
		<div class="divPcOn">
		1
		</div>
		<div class="divPcPcUsed">
			5
		</div>
		<div class="divPcPcOff">
			99
		</div>
		<div class="divPcPcDefect">
			5
		</div>
	</div>
	<div class="courseFont">Course Name</div>
	<div class="courseFont">14:23</div>
</div>
-->
</body>
</html>