Skip to content
Permalink
Browse files
Add back button to navigate back to previous test page.
  • Loading branch information
brycecurtis committed Jul 18, 2011
1 parent 2f4239a commit 581987c03c3053ba0f79523bd8a496ed76bf524c
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 12 deletions.
@@ -134,5 +134,6 @@ <h2>Action</h2>
<a href="javascript:" class="btn large"onclick="getAccel();">Get Acceleration</a>
<a href="javascript:" class="btn large"onclick="watchAccel();">Start Watch</a>
<a href="javascript:" class="btn large"onclick="stopAccel();">Clear Watch</a>
<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>
@@ -241,6 +241,6 @@ <h2>Action</h2>
<a href="javascript:" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
<a href="javascript:" class="btn large" onclick="recordAudio();">Record Audio for 10 sec</a>
<a href="javascript:" class="btn large" onclick="playRecording();">Play/Unpause Recording</a>

<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>
@@ -66,7 +66,6 @@
* Function called when page has finished loading.
*/
function init() {
console.log("accelerometer.init()");
document.addEventListener("deviceready", function() {
deviceReady = true;
console.log("Device="+device.platform+" "+device.version);
@@ -91,5 +90,6 @@ <h1>Camera</h1>
<h2>Action</h2>
<a href="javascript:" class="btn large" onclick="getPicture();">Take Picture</a>
<a href="javascript:" class="btn large" onclick="getImage();">Select Image from Library</a>
<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>
@@ -124,5 +124,6 @@ <h2>Action</h2>
<a href="javascript:" class="btn large" onclick="getCompass();">Get Compass</a>
<a href="javascript:" class="btn large" onclick="watchCompass();">Start Watching Compass</a>
<a href="javascript:" class="btn large" onclick="stopCompass();">Stop Watching Compass</a>
<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>
@@ -104,11 +104,12 @@

<h1>Contacts</h1>
<div id="info">
<b>Results:<b><br>
<b>Results:</b><br>
<span id="contacts_results">&nbsp;</span>
</div>
<h2>Action</h2>
<a href="javascript:" class="btn large" onclick="getContacts();">Get phone's contacts</a>
<a href="javascript:" class="btn large" onclick="addContact();">Add a new contact 'Dooney Evans'</a>
<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>
@@ -33,7 +33,6 @@
* Function called when page has finished loading.
*/
function init() {
console.log("accelerometer.init()");
document.addEventListener("deviceready", function() {
deviceReady = true;
console.log("Device="+device.platform+" "+device.version);
@@ -58,7 +57,7 @@

<h1>Events</h1>
<div id="info">
<b>Results:<b><br>
<b>Results:</b><br>
<span id="results"></span>
</div>

@@ -69,5 +68,6 @@ <h2>Action</h2>
<a href="javascript:" class="btn large" onclick="document.removeEventListener('menubutton', interceptMenubutton, false);">Stop intercept of menubutton</a>
<a href="javascript:" class="btn large" onclick="document.addEventListener('searchbutton', interceptSearchbutton, false);">Intercept searchbutton</a>
<a href="javascript:" class="btn large" onclick="document.removeEventListener('searchbutton', interceptSearchbutton, false);">Stop intercept of searchbutton</a>
<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>
@@ -91,7 +91,6 @@
* Function called when page has finished loading.
*/
function init() {
console.log("accelerometer.init()");
document.addEventListener("deviceready", function() {
deviceReady = true;
console.log("Device="+device.platform+" "+device.version);
@@ -120,6 +119,6 @@ <h2>Action</h2>
<a href="javascript:" class="btn large" onclick="getLocation();">Get Location</a>
<a href="javascript:" class="btn large" onclick="watchLocation();">Start Watching Location</a>
<a href="javascript:" class="btn large" onclick="stopLocation();">Stop Watching Location</a>

<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>
@@ -93,4 +93,18 @@
width:308px;
padding:1.2em 0;
}

#stage.theme a.backBtn{
border: 1px solid #555;
-webkit-border-radius: 5px;
border-radius: 5px;
text-align:center;
display:block;
float:right;
background:#666;
width:75px;
color:#9ab;
font-size:1.1em;
text-decoration:none;
padding:1.2em 0;
margin:3px 5px 3px 5px;
}
@@ -54,5 +54,7 @@ <h2>Action</h2>
<h2>Android Only</h2>
<a href="market://search?q=google" class="btn large">Search Android market</a>
<a href="content://media/external/images/media" class="btn large">View image app</a>

<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>
@@ -77,5 +77,6 @@ <h2>Action</h2>
<a href="javascript:" class="btn large" onclick="alert('You pressed alert.', 'Alert Dialog', 'Continue');">Built-in Alert Dialog</a>
<a href="javascript:" class="btn large" onclick="alert('You entered '+ confirm('You pressed confirm.', 'Confirm Dialog', 'Yes,No,Maybe'));">Built-in Confirm Dialog</a>
<a href="javascript:" class="btn large" onclick="alert('You entered ' + prompt('This is a prompt.', 'Default value'));">Built-in Prompt Dialog</a>
<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>
@@ -1,3 +1,11 @@
document.write('<script type="text/javascript" charset="utf-8" src="../phonegap-0.9.6.1.js"></script>');
document.write('<script type="text/javascript" charset="utf-8" src="phonegap-0.9.6.1.js"></script>');
document.write('<script>console.log("loading phonegap.js");</script>');

function backHome() {
if (device.platform.toLowerCase() == 'android') {
app.exitApp();
}
else {
document.location = "../index.html";
}
}
@@ -122,12 +122,12 @@

<h1>HTML5 Database</h1>
<div id="info">
<b>Results:<b><br>
<b>Results:</b><br>
<span id="database_results"></span>
</div>
<h2>Action</h2>
<a href="javascript:" class="btn large" onclick="callDatabase();">Create, Add, Read Database</a>
<a href="javascript:" class="btn large" onclick="readDatabase();">Read Database</a>

<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>
@@ -17,7 +17,6 @@
* Function called when page has finished loading.
*/
function init() {
console.log("accelerometer.init()");
document.addEventListener("deviceready", function() {
deviceReady = true;
console.log("Device="+device.platform+" "+device.version);
@@ -47,5 +46,6 @@ <h1>Local Storage</h1>
document.getElementById('count').textContent = localStorage.pageLoadCount;
</script>

<h2>&nbsp</h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
</body>
</html>

0 comments on commit 581987c

Please sign in to comment.