Skip to content

Commit

Permalink
removed experimental navigation code to create tag
Browse files Browse the repository at this point in the history
  • Loading branch information
sintaxi committed May 26, 2009
1 parent a73b248 commit 475f48c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 53 deletions.
2 changes: 1 addition & 1 deletion iphone/Info.plist
Expand Up @@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIdentifier</key>
<string>com.phonegap.${PRODUCT_NAME:identifier}</string>
<string>com.sintaxi.phonegapdemo</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
52 changes: 0 additions & 52 deletions iphone/www/index.html
Expand Up @@ -71,65 +71,13 @@
var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
return result;
}

function setupToolbars() {
uicontrols.createTabBar();

var toprated = 0;
uicontrols.createTabBarItem("toprated", "Top Rated", "tabButton:TopRated", {
onSelect: function() {
navigator.notification.alert("Top Rated selected");
uicontrols.updateTabBarItem("toprated", { badge: ++toprated });
}
});

var recents = 0;
uicontrols.createTabBarItem("recents", "Recents", null, {
onSelect: function() {
navigator.notification.alert("Recents selected");
uicontrols.updateTabBarItem("recents", { badge: ++recents });
}
});

var history = 0;
uicontrols.createTabBarItem("history", "History", "icon.png", {
onSelect: function() {
navigator.notification.alert("History selected");
uicontrols.updateTabBarItem("history", { badge: ++history });
}
});

var more = false;
uicontrols.createTabBarItem("more", "More", "tabButton:More", {
onSelect: function() {
if (more) {
uicontrols.showTabBarItems("search", "downloads", "more");
} else {
uicontrols.showTabBarItems("toprated", "recents", "history", "more");
}
uicontrols.selectTabBarItem(null);
more = !more;
}
});

try {
uicontrols.createTabBarItem("search", "Search", "tabButton:Search");
uicontrols.createTabBarItem("downloads", "Downloads", "tabButton:Downloads");
} catch(e) { debug.log(e) }

uicontrols.showTabBar();
uicontrols.showTabBarItems("toprated", "recents", "history", "more");

uicontrols.setToolBarTitle("PhoneGap Demo");
}

function preventBehavior(e) {
e.preventDefault();
};

PhoneGap.addConstructor(function(){
document.addEventListener("touchmove", preventBehavior, false);
setupToolbars();
deviceInfo();
document.addEventListener('orientationChanged', function(e) { debug.log("Orientation changed to " + e.orientation); }, false);
});
Expand Down

0 comments on commit 475f48c

Please sign in to comment.