-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
87 lines (81 loc) · 2.97 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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAAwED3-dEhWpgbF1O5dydUeZXiNUcYcA4"></script>
<script id='sap-ui-bootstrap'
src='https://sapui5.hana.ondemand.com/resources/sap-ui-core.js'
data-sap-ui-libs='sap.m,sap.ui.core,sap.ui.commons,sap.ui.table'
data-sap-ui-resourceroots='{"GPSTracker": "./"}'
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript">
/*=====================================================================
The following onError function is used to trap any errors that occur
while the application is running. Cordova fails silently whenever it
encounters an error in HTML or JavaScript code. So, with that being
the case, developers cannot tell when/why their applications are
failing. Any code error will cause the function to fire and display
the error in an alert dialog.
======================================================================*/
window.onerror = function(msg, url, line) {
var idx = url.lastIndexOf("/");
if (idx > -1) {
url = url.substring(idx + 1);
}
alert("ERROR in " + url + " (line #" + line + ")\n" + msg);
console.error(msg);
return false;
};
</script>
<script>
function getUrlParameterName(sParam)
{
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++)
{
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam)
{
return true;
}
}
return false;
}
//test
sap.ui.localResources("view");
var app = new sap.m.App({initialPage:"idgpsTracker"});
//test alegianni
function startApp(context) {
var page = sap.ui.view({id:"idgpsTracker", viewName:"GPSTracker.view.gpsTracker", type:sap.ui.core.mvc.ViewType.JS });
app.addPage(page);
app.placeAt("content");
}
window.onload = function() {
if (window.cordova || getUrlParameterName("companionbuster")) {
jQuery.sap.require("GPSTracker.devapp");
var page = window.location.pathname.split("/").pop();
if(page === "preview_hidden.html") {
window.sap_webide_FacadePreview = true;
}
GPSTracker.devapp.initialize();
}
else {
startApp();
}
}
</script>
</head>
<body class="sapUiBody" role="application">
<div style="height:100%;width:100%;">
<div id="content" style="height:25%;" ></div>
<div id="map" style="height:75%;"></div>
</div>
<!-- Section for service binding -->
<script src="serviceBinding.js"></script>
</body>
</html>