aboutsummaryrefslogtreecommitdiffstats
path: root/Resources
diff options
context:
space:
mode:
Diffstat (limited to 'Resources')
-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);