Skip to content

Commit

Permalink
added an 'about' button
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierlacot committed Mar 14, 2011
1 parent bda903d commit 5d00332
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Resources/js/views/settings.js
Expand Up @@ -81,6 +81,18 @@ row5.add(l5);
row5.add(b5);


// add about field
var button_about = Titanium.UI.createButton({
title:'about',
height:30,
width:300,
right:10,
top: 300,
zindex: 1
});
win.add(button_about);


// table view
var tableViewOptions1 = {
data: [row1,row2,row3,row4,row5],
Expand Down Expand Up @@ -196,4 +208,19 @@ b5.addEventListener('click', function(e) {
xavcc.url.clear();
}
});
});

button_about.addEventListener('click', function(e) {
var dialog = Titanium.UI.createOptionDialog({
title: 'This application is provided by xav.cc. Please visit our website for more informations.',
options: ['Visit xav.cc', 'No, thank you'],
cancel: 0
});
dialog.show();

dialog.addEventListener('click', function(e) {
if (0 == e.index) {
Titanium.Platform.openURL('http://xav.cc/info/about');
}
});
});

0 comments on commit 5d00332

Please sign in to comment.