-
Notifications
You must be signed in to change notification settings - Fork 20
/
index.html
158 lines (142 loc) · 5.81 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PhoneGap Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script language="javascript" type="text/javascript" src="/usr/palm/frameworks/mojo/mojo.js" x-mojo-version="1"></script>
<script language="javascript" type="text/javascript" src="phonegap.js"></script>
<script language="javascript" type="text/javascript" src="js/controller.js"></script>
<script language="javascript" type="text/javascript" src="js/emile.min.js"></script>
<link rel="stylesheet" href="assets/master.css" type="text/css" media="screen" title="no title" charset="utf-8">
<META NAME="Generator" CONTENT="Nokia WRT plug-in for Aptana Studio 2.0.0" />
</head>
<body>
<div class="body" onload="init()">
<div class="header">phonegap demo</div>
<div><a href="#"><img src="assets/nitobi-avatar.png" class="nitobi-logo" /></a></div>
<div>
<div id="menu-accel" class="menu-item" onclick="changeView(event);"><span>Acceleration</span></div>
<div id="view-accel" class="view">
<div class="button" onclick="watchAccel()">watch</div>
<p>
<ul>
<li>X-Accel: <span id="accel_x"></span></li>
<li>Y-Accel: <span id="accel_y"></span></li>
<li>Z-Accel: <span id="accel_z"></span></li>
</ul>
</p>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div>
<div id="menu-camera" class="menu-item" onclick="changeView(event);"><span>Camera</span></div>
<div id="view-camera" class="view">
<div class="button" onclick="takePicture()">take picture</div>
<div id="preview"></div>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div>
<div id="menu-contacts" class="menu-item" class="menu-selected" onclick="changeView(event);"><span>Contacts</span></div>
<div id="view-contacts" class="view">
<p>
filter: <input id="contact-filter" name="contact-filter"/><br/>
<div class="button" onclick="getContacts()">get contacts</div>
</p>
<div id="contacts_list" class="contacts"></div>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div>
<div id="menu-location" class="menu-item" onclick="changeView(event);"><span>Location</span></div>
<div id="view-location" class="view">
<div class="button" onclick="getLocation()">watch location</div>
<p>
<ul>
<li>latitude: <span id="latitude">-</span></li>
<li>longitude: <span id="longitude">-</span></li>
<li>altitude: <span id="altitude">-</span></li>
<li>heading: <span id="heading">-</span></li>
<li>speed: <span id="speed">-</span></li>
<li>timestamp: <span id="timestamp">-</span></li>
</ul>
</p>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div>
<div id="menu-maps" class="menu-item" onclick="changeView(event);"><span>Maps</span></div>
<div id="view-maps" class="view">
<div class="button" onclick="showMap()">show map</div>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div>
<div id="menu-notify" class="menu-item" onclick="changeView(event);"><span>Notification</span></div>
<div id="view-notify" class="view">
<div class="button" onclick="notify('vib1')">vibrate 1</div>
<div class="button" onclick="notify('vib2')">vibrate 2</div>
<div class="button" onclick="notify('beep')">play beep</div>
<div class="button" onclick="notify('alert')">show alert</div>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div>
<div id="menu-orient" class="menu-item" onclick="changeView(event);"><span>Orientation</span></div>
<div id="view-orient" class="view">
<div class="button" onclick="watchOrientation()">watch orientation</div>
<p>Current orientation: <label id="orientation"> - </label></p>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div>
<div id="menu-sms" class="menu-item" onclick="changeView(event);"><span>Sms</span></div>
<div id="view-sms" class="view">
<p>
number:<br/>
<input id="sms_number" type="text" /><br/>
message:<br/>
<textarea id="sms_message" rows=3></textarea>
<div class="button" onclick="sendSMS()">send sms</div>
<span id="sms_status"></span>
</p>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div>
<div id="menu-sound" class="menu-item" onclick="changeView(event);"><span>Sound</span></div>
<div id="view-sound" class="view">
<p>
<div class="button" onclick="soundCommand('play');">play</div>
<div class="button" onclick="soundCommand('pause');">pause</div>
<div class="button" onclick="soundCommand('stop');">stop</div>
</p>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div>
<div id="menu-storage" class="menu-item" onclick="changeView(event);"><span>Storage</span></div>
<div id="view-storage" class="view">
<p>data:<input id="storage_string" type="text" /></p>
<div class="button" onclick="testStorage('store');">store data</div>
<div class="button" onclick="testStorage('clear');">clear data</div>
<div class="button" onclick="checkStorage()">check storage</div>
<p><label id="storage_output"></label></p>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div>
<div id="menu-tel" class="menu-item" onclick="changeView(event);"><span>Telephony</span></div>
<div id="view-tel" class="view">
<p>
number: <input id="phone_number" type="text" /><br/>
<div class="button" onclick="call()">call</div>
</p>
<div class="button-small" onclick="back()">back</div>
</div>
</div>
<div id="spacer" style="display:none"></div>
</div>
</body>
</html>