-
Notifications
You must be signed in to change notification settings - Fork 0
/
iotF3.html
154 lines (116 loc) · 6.9 KB
/
iotF3.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
<html>
<meta charset="utf-8">
<!--by Gabe-->
<!--F3-->
<style>
@font-face{
font-family: 'proximanova-light-webfont';
src: url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-light-webfont.eot');
src: url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-light-webfont.eot?#iefix') format('embedded-opentype'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-light-webfont.woff') format('woff'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-light-webfont.ttf') format('truetype'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-light-webfont.svg#webfont') format('svg');
}
@font-face{
font-family: 'proximanova-bold-webfont';
src: url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-bold-webfont.eot');
src: url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-bold-webfont.eot?#iefix') format('embedded-opentype'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-bold-webfont.woff') format('woff'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-bold-webfont.ttf') format('truetype'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-bold-webfont.svg#webfont') format('svg');
}
@font-face{
font-family: 'proximanova-semibold-webfont';
src: url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-semibold-webfont.eot');
src: url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-semibold-webfont.eot?#iefix') format('embedded-opentype'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-semibold-webfont.woff') format('woff'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-semibold-webfont.ttf') format('truetype'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-semibold-webfont.svg#webfont') format('svg');
}
@font-face{
font-family: 'proximanova-regitalic-webfont';
src: url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-regitalic-webfont.eot');
src: url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-regitalic-webfont.eot?#iefix') format('embedded-opentype'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-regitalic-webfont.woff') format('woff'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-regitalic-webfont.ttf') format('truetype'),
url('https://xippublicbirst01.cloud.infor.com/html/resources/infor/proximanova-regitalic-webfont.svg#webfont') format('svg');
}
body {
font-family: 'proximanova-light-webfont', Arial, sans-serif;
margin: 0px;
position: relative;
background-color: transparent;
color: white;
}
.title {
font-size: 24px;
}
#displayData {
font-size: 32px;
}
hr {
display: block;
height: 2px;
border: 0;
border-top: 1px solid #347cf1;
margin: 1em 0;
padding: 0;
width: 90%;
}
.images {
display: inline;
width: 25px;
float: left;
vertical-align:top;
margin-top: -4px;
}
#content {
display: block;
margin: 0px;
font-size: 14px;
}
.icondiv{
text-align: center;
width: 25px;
display: inline-block;
}
p {
display: inline;
margin-left: 10px;
}
</style>
<body>
<div id="displayData">...</div>
<br>
<div id="content">
<img src="https://xippublicbirst01.cloud.infor.com/html/resources/infor/vidwall_car_icons_24px_laptime.png" class="images" />
<p>FASTEST LAP</p>
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="https://stage.sde.birst.com/js/birst_embed.js"></script>
<script>
String.prototype.toHHMMSS = function () {
var sec_num = parseInt(this, 10); // don't forget the second param
var hours = Math.floor(sec_num / 3600);
var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
var seconds = sec_num - (hours * 3600) - (minutes * 60);
if (hours < 10) {hours = "0"+hours;}
if (minutes < 10) {minutes = "0"+minutes;}
if (seconds < 10) {seconds = "0"+seconds;}
return hours+':'+minutes+':'+seconds;
}
var eventHandler = function (e) {
if (e.data.operation === "executeQueryResult")
//display the query result as data
{
var t = e.data.result.rows[0][0]
tt=t.toString()
$("#displayData")[0].textContent = tt.toHHMMSS();
}
}
BirstConfig.callBack(eventHandler);
var BQL = "select LookupRow(0,5, SELECT [Race.RaceID] 'RaceID', [Race.RaceDateTime] 'RaceDateTime', Format(Now, 'MM/dd/yy hh:mm:ss a z') 'NowFormattedString', DateDiff(second, [Race.RaceDateTime], Now) 'SecsFromLastRace' , iif(DateDiff(second, Now, [Race.RaceDateTime])<0, 1, 0) 'KeepPastRaces' , [Race.DriverID], [Race.DriverName], [Race.CarName], [Latest Race Lap Time] FROM [ALL] WHERE [Race.Race Date] = NowDate DISPLAY BY [KeepPastRaces] desc, [SecsFromLastRace] asc, [Latest Race Lap Time] asc) 'PrevRaceFirstPlaceDriverID' , lookuprow(0, 1 , LookupRow(0,5, SELECT [Race.RaceID] 'RaceID', [Race.RaceDateTime] 'RaceDateTime', Format(Now, 'MM/dd/yy hh:mm:ss a z') 'NowFormattedString', DateDiff(second, [Race.RaceDateTime], Now) 'SecsFromLastRace' , iif(DateDiff(second, Now, [Race.RaceDateTime])<0, 1, 0) 'KeepPastRaces' , [Race.DriverID], [Race.DriverName], [Race.CarName], [Latest Race Lap Time] FROM [ALL] WHERE [Race.Race Date] = NowDate DISPLAY BY [KeepPastRaces] desc, [SecsFromLastRace] asc, [Latest Race Lap Time] asc) , select [SC Race Drivers.DriverID], [SC Race Drivers.Race Driver Name], [SC Race Drivers.DriverPicture], [SC Race Drivers.Country] , [SC Race Drivers.CountryCode] , [SC Race Drivers.CountryFlagImage] ,[DriverID] from [All] where [SC Race Drivers.DriverID]=%0) 'PrevRaceFirstPlaceDriverName' , lookuprow(0, 2 , LookupRow(0,5, SELECT [Race.RaceID] 'RaceID', [Race.RaceDateTime] 'RaceDateTime', Format(Now, 'MM/dd/yy hh:mm:ss a z') 'NowFormattedString', DateDiff(second, [Race.RaceDateTime], Now) 'SecsFromLastRace' , iif(DateDiff(second, Now, [Race.RaceDateTime])<0, 1, 0) 'KeepPastRaces' , [Race.DriverID], [Race.DriverName], [Race.CarName], [Latest Race Lap Time] FROM [ALL] WHERE [Race.Race Date] = NowDate DISPLAY BY [KeepPastRaces] desc, [SecsFromLastRace] asc, [Latest Race Lap Time] asc) , select [SC Race Drivers.DriverID], [SC Race Drivers.Race Driver Name], [SC Race Drivers.DriverPicture], [SC Race Drivers.Country] , [SC Race Drivers.CountryCode] , [SC Race Drivers.CountryFlagImage] ,[DriverID] from [All] where [SC Race Drivers.DriverID]=%0) 'PrevRaceFirstPlaceDriverPicture' from [All]";
BirstConfig.getData(BQL);
</script>
</body>
</html>