aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2011-04-29 23:12:39 +0200
committerTeddy Wing2011-04-29 23:12:39 +0200
commit632892b577200697dbb4af4acc4dc35ca6818fcd (patch)
treebc3b9ce844b699b1b1a4bfe75e7c8619029c95f0
parented8c24d59c8f036904608b94d01241f7ca5985f3 (diff)
downloadRocheTwit-632892b577200697dbb4af4acc4dc35ca6818fcd.tar.bz2
Cleaned up, added some comments, changed strings to French
-rw-r--r--Resources/app.js4
-rw-r--r--Resources/search.js5
2 files changed, 5 insertions, 4 deletions
diff --git a/Resources/app.js b/Resources/app.js
index 2dba46e..134abeb 100644
--- a/Resources/app.js
+++ b/Resources/app.js
@@ -4,14 +4,14 @@ var tabGroup = Titanium.UI.createTabGroup();
// Create the main, root window
var search_win = Titanium.UI.createWindow({
- title: 'Search Twitter',
+ title: 'RocheTwit',
backgroundColor: '#fff',
tabBarHidden: true, // hide the tab bar
url: 'search.js' // create a new context for this window in 'search.js'
});
// Create the tab to contain our search window
var search_tab = Titanium.UI.createTab({
- title: 'Search',
+ title: 'Recherche',
icon: 'KS_nav_views.png',
window: search_win // use search_win in this tab
});
diff --git a/Resources/search.js b/Resources/search.js
index de65eeb..f83d454 100644
--- a/Resources/search.js
+++ b/Resources/search.js
@@ -4,13 +4,13 @@ var win = Titanium.UI.currentWindow;
// Create a search input bar
var search_input = Titanium.UI.createSearchBar({
- hintText: 'Enter a search query', // let user know what to type
+ hintText: 'Rechercher sur Twitter', // let user know what to type
height: 43,
top: 0
});
var result_table = Titanium.UI.createTableView({
- top: 43
+ top: 43 // Make sure the tableview is underneath our search bar
});
var row_data = []; // an array to store our result rows in
// (this gets fed into the result_table)
@@ -90,6 +90,7 @@ var TSearch = {
};
+// Event listener on Search button click
search_input.addEventListener('return', function(e) {
TSearch.s(e.value);