Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
cindybubbles committed May 12, 2011
1 parent 809fc11 commit 0569138
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Resources/master_brunico_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BRUNICO_LIST.update = function(url) {
};
xhr.send();
};
BRUNICO_LIST.show = function(data) {
BRUNICO_LIST.show = function(data, btitle) {
try
{
var feedRS = db.execute('SELECT title,url,description FROM tblfeed');
Expand Down Expand Up @@ -64,7 +64,7 @@ var feedRS = db.execute('SELECT title,url,description FROM tblfeed');
feedRS.close();

var tableview = Titanium.UI.createTableView({data:data});
var button = Titanium.UI.createButton({title:'Update!', width:100, height:30, top:500});
var button = Titanium.UI.createButton({title:btitle, width:200, height:30, top:500});
Titanium.UI.currentWindow.add(tableview);
Titanium.UI.currentWindow.add(button);
tableview.addEventListener('click',tableClick);
Expand All @@ -73,8 +73,7 @@ var feedRS = db.execute('SELECT title,url,description FROM tblfeed');
function refresh(e) {
button.title = "Updating...";
BRUNICO_LIST.update(BRUNICO_LIST.url);
BRUNICO_LIST.show(data);
button.title = "Update again!";
BRUNICO_LIST.show(data,"Update Again!");
}
function tableClick(e) {
var evtData = {
Expand All @@ -96,5 +95,5 @@ if (Titanium.Network.networkType != Titanium.Network.NETWORK_NONE) {
else {
alert('No internet connection could be found. The system will not be able to update the data until then.');
}
BRUNICO_LIST.show(data);
BRUNICO_LIST.show(data,'Update!');
})();

0 comments on commit 0569138

Please sign in to comment.