updated examples & readme

This commit is contained in:
Andrew Trice 2012-04-20 14:17:37 -04:00
parent bb94493f07
commit f44e2f1e88
6 changed files with 17 additions and 15 deletions

4
README
View File

@ -42,7 +42,9 @@ REAL WORLD USAGE
You can see this framework in the following real-world apps:
US Census Browser: http://itunes.apple.com/us/app/us-census-browser/id483201717?mt=8
US Census Browser:
http://itunes.apple.com/us/app/us-census-browser/id483201717?mt=8
http://tricedesigns.com/census
If you have built your own app using this framework, please let me know! (@andytrice on twitter)

View File

@ -40,15 +40,9 @@
function getView() {
//create a view descriptor with random content
var bodyView = $('<div>' + Math.random().toString() + '<hr><li href="#" onclick="pushView()" class="backLinkButton">push view</li> <li href="#" onclick="popView()" class="backLinkButton">pop view</li><hr>' + getMeat() + '</div>');
var bodyView = $('<div>' + Math.random().toString() + '<hr><li href="#" onclick="pushView()" class="viewNavigator_backButton">push view</li> <li href="#" onclick="popView()" class="viewNavigator_backButton">pop view</li><hr>' + getMeat() + '</div>');
var links = bodyView.find('a');
/*
for ( var i=0; i<links.length; i++)
{
NoClickDelay( links[i] );
}
*/
return { title: "Default View " + parseInt(Math.random()*1000),
backLabel: "Back",
view: bodyView

View File

@ -79,7 +79,7 @@
function getView( side ) {
//create a view descriptor with random content
var bodyView = $('<div>' + Math.random().toString() + '<hr><li href="#" onclick="'+side+'PushView()" class="backLinkButton">push view</li> <li href="#" onclick="'+side+'PopView()" class="backLinkButton">pop view</li><hr>' + getMeat() + '</div>');
var bodyView = $('<div>' + Math.random().toString() + '<hr><li href="#" onclick="'+side+'PushView()" class="viewNavigator_backButton">push view</li> <li href="#" onclick="'+side+'PopView()" class="viewNavigator_backButton">pop view</li><hr>' + getMeat() + '</div>');
var links = bodyView.find('a');
/*for ( var i=0; i<links.length; i++)

View File

@ -16,6 +16,12 @@
<link rel="stylesheet" href="../../../src/viewnavigator/viewnavigator.css" type="text/css" />
<script src="../../../src/viewnavigator/viewnavigator.js"></script>
<style>
li {
margin-bottom: 10px;
}
</style>
<script>
$(document).ready( function() {
@ -37,10 +43,10 @@
function getSidebarView() {
var viewHTML = "<ul>" +
"<li onclick='pushSidebarView()' class='backLinkButton'>Push Sidebar View</li>" +
"<li onclick='window.splitViewNavigator.popSidebarView()' class='backLinkButton'>Pop Sidebar View</li>" +
"<li onclick='pushBodyView()' class='backLinkButton'>Push Body View</li>" +
"<li onclick='window.splitViewNavigator.popBodyView()' class='backLinkButton'>Pop Body View</li>" +
"<li onclick='pushSidebarView()' class='viewNavigator_backButton'>Push Sidebar View</li>" +
"<li onclick='window.splitViewNavigator.popSidebarView()' class='viewNavigator_backButton'>Pop Sidebar View</li>" +
"<li onclick='pushBodyView()' class='viewNavigator_backButton'>Push Body View</li>" +
"<li onclick='window.splitViewNavigator.popBodyView()' class='viewNavigator_backButton'>Pop Body View</li>" +
"</ul>";
return {
title: "Sidebar " + parseInt( Math.random() * 100 ).toString(),

View File

@ -76,7 +76,7 @@
function getView( side ) {
//create a view descriptor with random content
var bodyView = $('<div>' + Math.random().toString() + '<hr><li href="#" onclick="'+side+'PushView()" class="backLinkButton">push view</li> <li href="#" onclick="'+side+'PopView()" class="backLinkButton">pop view</li><hr>' + getMeat() + '</div>');
var bodyView = $('<div>' + Math.random().toString() + '<hr><li href="#" onclick="'+side+'PushView()" class="viewNavigator_backButton">push view</li> <li href="#" onclick="'+side+'PopView()" class="viewNavigator_backButton">pop view</li><hr>' + getMeat() + '</div>');
var links = bodyView.find('a');
return { title: side + "Default View " + parseInt(Math.random()*1000),

View File

@ -1 +1 @@
This example is intended to be a phonegap application.
This example is intended to be a phonegap application. In a phone form factor the interface will use a ViewNavigator. In a tablet form factor the interface will use a SplitViewNavigator.