Skip to content

Commit

Permalink
Remove extra UI stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgpearce committed Aug 10, 2011
1 parent aaafbaf commit 36b1c1a
Showing 1 changed file with 5 additions and 31 deletions.
36 changes: 5 additions & 31 deletions HTML/app/app.js
Expand Up @@ -2,25 +2,11 @@ new Ext.Application({
launch: function () { launch: function () {
var timeToolbar = new Ext.Toolbar(); var timeToolbar = new Ext.Toolbar();


var navigation = new NKNavigationController();
navigation.addNavigationItem('Home', 'switchTab', 10);
navigation.hide();
navigation.showing = false;
navigation.toggle = function() {
if (navigation.showing) {
navigation.hide();
navigation.showing = false;
} else {
navigation.show();
navigation.showing = true;
}
}

var radio = new NKInternetPlayer(); var radio = new NKInternetPlayer();
radio.forceDecoderFormat("aac"); radio.forceDecoderFormat("aac");

var radioToolbar = new Ext.Toolbar({title:'Soma FM'}); var radioToolbar = new Ext.Toolbar({title:'Soma FM'});

var photoPanel = new Ext.Panel({margin:10}); var photoPanel = new Ext.Panel({margin:10});
var emailButton = new Ext.Button({ var emailButton = new Ext.Button({
text: 'Email photo', text: 'Email photo',
Expand All @@ -41,18 +27,12 @@ new Ext.Application({
NKPickImageObject('takenPhoto', 'camera'); NKPickImageObject('takenPhoto', 'camera');
}} }}
}); });

var tabPanel = new Ext.TabPanel({ var tabPanel = new Ext.TabPanel({
fullscreen: true, fullscreen: true,
dockedItems: [{ dockedItems: [{
xtype: 'toolbar', xtype: 'toolbar',
title: 'HelloNK', title: 'HelloNK'
items: [{
text:'Menu',
listeners: {tap: function () {
navigation.toggle();
}}
}]
}], }],
tabBar: { tabBar: {
ui:'light' ui:'light'
Expand Down Expand Up @@ -153,7 +133,7 @@ new Ext.Application({
'</table>' '</table>'
}] }]
}); });

window.confirmCallback = function (index) { window.confirmCallback = function (index) {
NKAlert('You clicked...', '...button #' + index); NKAlert('You clicked...', '...button #' + index);
} }
Expand All @@ -166,12 +146,6 @@ new Ext.Application({
} }
}, 5000); }, 5000);


window.switchTab = function () {
var currentTab = tabPanel.getActiveItem();
tabPanel.setActiveItem((currentTab.title=='Alerts')?1:0);
navigation.toggle();
}

window.takenPhoto = function(image) { window.takenPhoto = function(image) {
var dimensions = image.getSize().split(','); var dimensions = image.getSize().split(',');
var width = 200; var width = 200;
Expand Down

0 comments on commit 36b1c1a

Please sign in to comment.