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
<div set="control[panel,theme=dark,title=Words of Wisdom,footer=Nolan Wright]" | |
style="width:300px"> | |
Just say no! | |
</div> |
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
<div set="control[app:iterator]" type="bar" chartMode="mode" | |
on="l:load.barchart then execute" | |
property="rows" chartTitles="titles" | |
title="Happiness Meter" angle="30" color="#0D52D1,#2A0CD0,#8A0CCF" | |
thickness="10" height="300" width="600" legend="true"> | |
</div> | |
<script style="display:none;"> | |
$MQ('l:load.barchart', | |
{'rows':[ | |
{'name':'Appcelerator', 'value':'10,10,10'}, |
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
<id>initial</id> | |
<url>index.html</url> | |
<backgroundColor>#000</backgroundColor> | |
<fullscreen>false</fullscreen> | |
<hideNavBar>true</hideNavBar> | |
<hideTabBar>true</hideTabBar> |
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
<script type="text/javascript" src="jquery-1.3.2.js"></script> | |
<script type="text/javascript" src="index.js"></script> | |
<script type="text/javascript" src="tiui/js/tiui.js"></script> | |
<link href="tiui/css/tiui.css" rel="stylesheet" type="text/css"></link> | |
<link href="index.css" rel="stylesheet" type="text/css"></link> |
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
<center><img src="images/logo-m.png"></img></center> | |
<hr/> | |
<div id="options"> | |
<h4>Upload a Picture</h4> | |
<input id="choose" type="button" value="Choose Picture"></input> | |
<input id="take" type="button" value="Take A Picture"></input> | |
<h5>Message (Optional - 110 Characters)</h5> | |
<textarea id="message"></textarea> | |
</div> |
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
//Wire up buttons to save/recall | |
$("#store").click(function() { | |
storeLogin(); | |
}); | |
$("#recall").click(function() { | |
recallLogin(); | |
}); | |
//recall any saved login information and show UI | |
recallLogin(); |
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
//Handle storing and recalling username/password | |
function storeLogin() { | |
Titanium.App.Properties.setString('username',$("#username").val()); | |
Titanium.App.Properties.setString('password',$("#password").val()); | |
} | |
function recallLogin() { | |
$("#username").val(Titanium.App.Properties.getString('username')); | |
$("#password").val(Titanium.App.Properties.getString('password')); | |
} |
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
//Make XHR request to post picture | |
function postPic(pic) { | |
var query = 'https://twitpic.com/api/uploadAndPost'; | |
var xhr = Titanium.Network.createHTTPClient(); | |
xhr.onreadystatechange = function() { | |
if (this.readyState == 4) { | |
notify('Picture posted sucessfully!'); | |
} | |
}; | |
xhr.open('POST',query); |
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
//display a notification message | |
function notify(msg) { | |
Titanium.API.debug(msg); | |
var n = Titanium.UI.createNotification(); | |
n.setMessage(msg); | |
n.show(); | |
} |
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
Titanium.Media.openPhotoGallery({ | |
success: function(image,details) { | |
postPic(image); | |
}, | |
error: function(e) { | |
notify(e.message); | |
}, | |
cancel: function() { | |
//no op | |
}, |
OlderNewer