-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.htm
103 lines (93 loc) · 4.14 KB
/
index.htm
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<!--
* Copyright 2010-2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<html>
<head>
<meta name="x-blackberry-defaultHoverEffect" content="false" />
<link rel="stylesheet" type="text/css" href="css/bbui.css"><link />
<script type="text/javascript" src="js/bbui.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.fortune.js"></script>
<script type="text/javascript" src="local:///chrome/webworks.js"></script>
<script type="text/javascript">
var webworksreadyFired = false;
document.addEventListener('webworksready', function(e) {
// This is code to ensure that if webworksready is fired multiple times we still only init() one time
if (webworksreadyFired) return;
webworksreadyFired = true;
// You must call init on bbUI before any other code loads.
// If you want default functionality simply don't pass any parameters.. bb.init();
bb.init({actionBarDark: true,
controlsDark: true,
listsDark: true,
bb10ForPlayBook: true,
// Fires "before" styling is applied and "before" the screen is inserted in the DOM
onscreenready: function(element, id) {
if (id == 'dataOnLoad') {
dataOnLoad_initialLoad(element);
} else if (id == 'masterDetail') {
masterDetail_initialLoad(element);
} else if (id == 'dataOnTheFly') {
dataOnTheFly_onScreenReady(element);
}
// Remove all titles "except" input and pill buttons screen if running on BB10
if (bb.device.isBB10 && (id != 'input') && (id != 'pillButtons') && (id != 'titlePillButtons')) {
var titles = element.querySelectorAll('[data-bb-type=title]');
if (titles.length > 0) {
titles[0].parentNode.removeChild(titles[0]);
}
}
// Initialize our title pill buttons screen
if (bb.device.isBB10 && (id == 'titlePillButtons')) {
titlePillButtons_Init(element);
}
},
// Fires "after" styling is applied and "after" the screen is inserted in the DOM
ondomready: function(element, id) {
if (id == 'dataOnTheFly') {
dataOnTheFly_initialLoad(element);
}
}
});
bb.pushScreen('main.htm', 'main');
}, false);
// Fire the webworksready event for PlayBook and BBOS
window.addEventListener('load',function() {
if (navigator.userAgent.indexOf('Version/10.0') < 0) {
var evt = document.createEvent('Events');
evt.initEvent('webworksready', true, true);
document.dispatchEvent(evt);
}
});
$(document).ready(function() {
$("#contention").fortune({file: "./contentions.json", cookieNode: "contentions", metaNodes: {theIndex: "index", theContent: "content"}, animate: true});
$('#another').click(function() {
$("#contention").fortune({file: "./contentions.json", cookieNode: "contentions", metaNodes: {theIndex: "index", theContent: "content"}, animate: true});
return false;
});
});
function draw()
{
$("#contention").fortune({file: "./contentions.json", cookieNode: "contentions", metaNodes: {theIndex: "index", theContent: "content"}, animate: true});
}
</script>
</head>
<body>
</body>
<script>
document.addEventListener("webworksready", draw); // Detatched body and head!
</script>
</html>