Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2406bd
commit cb86e05
Showing
3 changed files
with
19 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,14 @@ | ||
// create table view data object | ||
Ti.include('../common.js'); | ||
|
||
var data = [ | ||
|
||
{title:'Error Callback', hasChild:true, test:'../examples/xhr_error.js'}, | ||
{title:'Binary Data', hasChild:true, test:'../examples/xhr_binarydata.js'}, | ||
{title:'XML Data', hasChild:true, test:'../examples/xhr_xml.js'}, | ||
{title:'XML Properties', hasChild:true, test:'../examples/xhr_properties.js'}, | ||
{title:'File Download', hasChild:true, test:'../examples/xhr_filedownload.js'}, | ||
{title:'UTF-8 + GET/POST', hasChild:true, test:'../examples/xhr_utf8.js'}, | ||
{title:'Cookies', hasChild:true, test:'../examples/xhr_cookie.js'}, | ||
{title:'setTimeout', hasChild:true, test:'../examples/xhr_settimeout.js'} | ||
{title:'Error Callback', test:'../examples/xhr_error.js'}, | ||
{title:'Binary Data', test:'../examples/xhr_binarydata.js'}, | ||
{title:'XML Data', test:'../examples/xhr_xml.js'}, | ||
{title:'XML Properties', test:'../examples/xhr_properties.js'}, | ||
{title:'File Download', test:'../examples/xhr_filedownload.js'}, | ||
{title:'UTF-8 + GET/POST', test:'../examples/xhr_utf8.js'}, | ||
{title:'Cookies', test:'../examples/xhr_cookie.js'}, | ||
{title:'setTimeout', test:'../examples/xhr_settimeout.js'} | ||
]; | ||
// add iphone specific tests | ||
if (Titanium.Platform.name == 'iPhone OS') | ||
{ | ||
data.push({title:'File Upload', hasChild:true, test:'../examples/xhr_fileupload.js'}); | ||
} | ||
// create table view | ||
var tableview = Titanium.UI.createTableView({ | ||
data:data | ||
}); | ||
|
||
// create table view event listener | ||
tableview.addEventListener('click', function(e) | ||
{ | ||
if (e.rowData.test) | ||
{ | ||
var win = Titanium.UI.createWindow({ | ||
url:e.rowData.test, | ||
title:e.rowData.title | ||
}); | ||
Titanium.UI.currentTab.open(win,{animated:true}); | ||
} | ||
}); | ||
|
||
// add table view to the window | ||
Titanium.UI.currentWindow.add(tableview); | ||
|
||
Titanium.UI.currentWindow.add(NookKS.createNavigationTableView(data)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters