-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
261 lines (246 loc) · 13.1 KB
/
index.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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" manifest="webstorage.manifest">
<head>
<title>Mein BFW</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="themes/BFW.css" />
<link rel="stylesheet" href="themes/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="themes/jquery.mobile-1.4.0.min.css" />
<link rel="stylesheet" href="themes/BFW Stylesheet.css" />
<script src="libs/jquery-1.8.3.min.js"></script>
<script src="libs/jquery.mobile-1.4.0.min.js"></script>
<script src="scripts/newspage.js"></script>
<script src="scripts/infopage.js"></script>
<script src="scripts/leisurepage.js"></script>
<script src="scripts/socialpage.js"></script>
<script src="scripts/contactpage.js"></script>
<script src="scripts/core.js"></script>
<script>
var infoContentPages = new Array(
"http://85.25.246.142/dhbw/InfoContent/BFW.xml",
"http://85.25.246.142/dhbw/InfoContent/HSK.xml",
"http://85.25.246.142/dhbw/InfoContent/Rollstuhlfahrer.xml"
);
</script>
<script>
// Soll dafür sorgen, dass Ajax-Aufrufe auch bei Mobilgeräten über Domain-Grenzen hinweg gemacht werden können -> XML-Aufrufe.
$(document).on("mobileinit", function () {
$.support.cors = true;
$.mobile.allowCrossDomainPages = true;
});
$(document).ready(function () {
setStartPageContentHeight();
// Sorgt dafür, dass die Icons in den Kacheln des Menüs beim "Mouse in" weiß werden und beim "Mouse out" wieder schwarz.
$("a.tile").hover(function () {
recolorTileImage($(this), "-black.", "-white.");
}, function () {
recolorTileImage($(this), "-white.", "-black.");
});
// Sorgt dafür, dass die Berechnung der Inhaltshöhe bei Änderung der Orientierung (mobil) oder Änderung der Größe des Browsers (PC) neu ausgeführt wird.
$(window).on("orientationchange", function () {
setStartPageContentHeight();
}).on("resize", function () {
setStartPageContentHeight();
});
$('#start').click();
});
// Färbt die Icons bei den Kacheln im Menü weiß bzw. schwarz.
// Funktioniert dadurch, dass die Icons in schwarz und weiß vorhanden sind und nur unterschiedliche Dateinamen haben.
function recolorTileImage(tile, from, to) {
var image = tile.find("img");
var url = image.attr("src");
url = url.replace(from, to);
image.attr("src", url);
}
// Sorgt dafür, dass der Content-Bereich des Menüs, die Seite immer komplett füllt
// Höhe des Contents = Position des Footers - Höhe des Headers - 35
function setStartPageContentHeight() {
var header = $("#homepage div[data-role=header]");
var footer = $("#homepage div[data-role=footer]");
// -35 verhindert Scrollbar (merci)
var height = footer[0].offsetTop - header[0].offsetHeight - 35;
var content = $("#homepage div[data-role=content]").css("height", height);
}
</script>
<!-- Hallo Welt! -->
</head>
<body>
<!-- STARTSEITE ------------------------------------------------------------------------------------------------------------------------- -->
<div data-role="page" id="homepage" data-theme="d" >
<div data-role="header" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#" data-role="button" class="ui-btn-active ui-state-persist" data-icon="grid">Menü</a></li>
</ul>
</div>
</div>
<div data-role="content" class="centerContent">
<table class="tile-table">
<tr class="tile-row">
<td class="tile-cell"><a id="start" href="#newspage" class="tile" onclick="loadData_newspage('newsContent', 'http://85.25.246.142/dhbw/HomeContent/Home.xml', 'Article')"><span><img src="themes/images/icons-png/comment-black.png" />News</span></a></td>
<td class="tile-cell"><a href="#infopage" class="tile" onclick="loadData_infopage('infoContent', infoContentPages, 'Article')"><span><img src="themes/images/icons-png/info-black.png" />Informationen</span></a></td>
</tr>
<tr class="tile-row">
<td class="tile-cell"><a href="#menupage" class="tile"><span><img src="themes/images/icons-png/calendar-black.png" />Speiseplan</span></a></td>
<td class="tile-cell"><a href="#leisurepage" class="tile" onclick="loadData_leisurepage('leisureContent', 'http://85.25.246.142/dhbw/FreizeitContent/Freizeit.xml', 'Article')"><span><img src="themes/images/icons-png/tag-black.png" />Freizeitangebot</span></a></td>
</tr>
<tr class="tile-row">
<td class="tile-cell"><a href="#socialpage" class="tile" onclick="loadData_socialpage('socialContent', 'http://85.25.246.142/dhbw/SozialesContent/Soziales.xml', 'Article')"><span><img src="themes/images/icons-png/eye-black.png" />Soziales</span></a></td>
<td class="tile-cell"><a href="#contactpage" class="tile"><span><img src="themes/images/icons-png/mail-black.png" />Kontakt</span></a></td>
</tr>
</table>
</div>
<div data-role="footer" data-position="fixed">
<div data-role="navbar">
<ul>
<li></li>
</ul>
</div>
</div>
</div>
<!-- STARTSEITE ------------------------------------------------------------------------------------------------------------------------- -->
<!-- NEWS ------------------------------------------------------------------------------------------------------------------------------- -->
<div data-role="page" id="newspage" data-theme="d">
<div data-role="header" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#" data-role="button" class="ui-btn-active ui-state-persist" data-icon="comment">News</a></li>
</ul>
</div>
</div>
<div data-role="content">
<div id="newsContent">
<!-- Hier collapsibles mit listview einfügen gemäß XML Inhalt -->
<!-- http://85.25.246.142/dhbw/HomeContent/Home.xml -->
</div>
</div>
<div data-role="footer" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#homepage" data-role="button" data-icon="grid">Zum Menü</a></li>
</ul>
</div>
</div>
</div>
<!-- NEWS ------------------------------------------------------------------------------------------------------------------------------- -->
<!-- FREIZEITANGEBOT -------------------------------------------------------------------------------------------------------------------- -->
<div data-role="page" id="leisurepage" data-theme="d">
<div data-role="header" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#" data-role="button" class="ui-btn-active ui-state-persist" data-icon="tag">Freizeitangebot</a></li>
</ul>
</div>
</div>
<div data-role="content">
<div id="leisureContent">
<!-- Hier collapsibles mit listview einfügen gemäß XML Inhalt -->
<!-- http://85.25.246.142/dhbw/FreizeitContent/Freizeit.xml -->
</div>
</div>
<div data-role="footer" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#homepage" data-role="button" data-icon="grid">Zum Menü</a></li>
</ul>
</div>
</div>
</div>
<!-- FREIZEITANGEBOT -------------------------------------------------------------------------------------------------------------------- -->
<!-- SOZIALES --------------------------------------------------------------------------------------------------------------------------- -->
<div data-role="page" id="socialpage" data-theme="d">
<div data-role="header" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#" data-role="button" class="ui-btn-active ui-state-persist" data-icon="eye">Soziales</a></li>
</ul>
</div>
</div>
<div data-role="content">
<div id="socialContent">
<!-- Hier collapsibles mit listview einfügen gemäß XML Inhalt -->
<!-- http://85.25.246.142/dhbw/SozialesContent/Soziales.xml -->
</div>
</div>
<div data-role="footer" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#homepage" data-role="button" data-icon="grid">Zum Menü</a></li>
</ul>
</div>
</div>
</div>
<!-- SOZIALES --------------------------------------------------------------------------------------------------------------------------- -->
<!-- INFORMATIONEN ---------------------------------------------------------------------------------------------------------------------- -->
<div data-role="page" id="infopage" data-theme="d">
<div data-role="header" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#" data-role="button" class="ui-btn-active ui-state-persist" data-icon="info">Informationen</a></li>
</ul>
</div>
</div>
<div data-role="content">
<div id="infoContent">
<!-- Hier collapsibles mit listview einfügen gemäß XML Inhalte -->
<!-- siehe infoContentPages in Header -->
</div>
</div>
<div data-role="footer" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#homepage" data-role="button" data-icon="grid">Zum Menü</a></li>
</ul>
</div>
</div>
</div>
<!-- INFORMATIONEN ---------------------------------------------------------------------------------------------------------------------- -->
<!-- KONTAKT ---------------------------------------------------------------------------------------------------------------------------- -->
<div data-role="page" id="contactpage" data-theme="d">
<div data-role="header" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#" data-role="button" class="ui-btn-active ui-state-persist" data-icon="mail">Kontakt</a></li>
</ul>
</div>
</div>
<div data-role="content">
</div>
<div data-role="footer" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#homepage" data-role="button" data-icon="grid">Zum Menü</a></li>
</ul>
</div>
</div>
</div>
<!-- KONTAKT ---------------------------------------------------------------------------------------------------------------------------- -->
<!-- SPEISEPLAN ------------------------------------------------------------------------------------------------------------------------- -->
<div data-role="page" id="menupage" data-theme="d">
<div data-role="header" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#" data-role="button" class="ui-btn-active ui-state-persist" data-icon="calendar">Speiseplan</a></li>
</ul>
</div>
</div>
<div data-role="content">
<img src="http://85.25.246.142/dhbw/SpeiseplanContent/speiseplan.png" class=" autoScaleImg" />
</div>
<div data-role="footer" data-position="fixed">
<div data-role="navbar" data-iconpos="left">
<ul>
<li><a href="#homepage" data-role="button" data-icon="grid">Zum Menü</a></li>
</ul>
</div>
</div>
</div>
<!-- SPEISEPLAN ------------------------------------------------------------------------------------------------------------------------- -->
<script>
function setElement(elementID, content) {
$('#' + elementID).html(content);
$('#' + elementID).enhanceWithin();
}
</script>
</body>
</html>