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
/* | |
* @ Developed by Nyvra (http://www.nyvra.net) | |
* @ Last release: 13/10/2011 | |
*/ | |
Mask = { | |
mask: function(_field, _function) { | |
_field.value = _function(_field.value) | |
}, | |
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
var Alloy = require('alloy'); | |
var todos = Alloy.createCollection('Todo'); | |
todos.on("fetch", function() { | |
var todorows = [], | |
donerows = [], | |
i = 0, | |
len = todos.length, | |
model, title; | |
for ( ; i < len; i++) { |
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
/* | |
* AddWindow.js is the simple modal form for adding new tasks. | |
*/ | |
function AddWindow() { | |
var todo = require('todo'); | |
var self = Ti.UI.createWindow({ | |
backgroundColor:'#fff', | |
layout:'vertical', | |
modal:true, | |
title:'Add Item' |
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
var win = Ti.UI.createWindow({ | |
backgroundColor:'#fff' | |
}); | |
var leftView = Ti.UI.createView({ | |
width:'48%', | |
height:Ti.UI.FILL, | |
left:0, | |
backgroundColor:'#dfdfdf', | |
layout:'vertical' |
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
function InfoWin(_args) { | |
var self = Ti.UI.createWindow({ | |
backgroundColor:'#000', | |
height:480, | |
bottom:436 | |
}); | |
var infolbl = Ti.UI.createLabel({ | |
text:'Info', | |
color:'#fff', | |
bottom:0 |
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
function BarWindow() { | |
var self = Ti.UI.createWindow({ | |
backgroundColor:'#f0f0f0', | |
layout:'vertical' | |
}); | |
var lbl = Ti.UI.createLabel({ | |
text:'Bar Window', | |
color:'#000', | |
top:20 |
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
// Include a small sensis helper library | |
var mind = {}; | |
Ti.include('sensis.js'); | |
// Custom activity indicator | |
var indWin = null; | |
var actInd = null; | |
function showIndicator() | |
{ |
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
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup({ | |
backgroundImage:'/images/tabbar.png' | |
}); | |
// Component Creation |
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
// Before the closing body tag, either add a script block or create an external js file with the cue point data | |
var cue_points = [{ | |
time: "21", | |
copy: "Ensure lips are their most smooth and supple by using a generous layer of Lip Conditioner. Exfoliate them if necessary. Allow Lip Conditioner to \"marinate\" for several minutes. Then thoroughly blot away excess.", | |
prods: ["CAT960PROD472SKU4920", "CAT960PROD645SKU3165"] | |
}, | |
{ | |
time: "38", | |
copy: "Apply lip primer on entire mouth and slightly outside of natural lip line.", | |
prods: ["CAT960PROD968SKU3830"] |
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.UI.setBackgroundColor('#fff'); | |
var tibh = {}; //create app namespace | |
Ti.include('ui.js','db.js'); | |
tibh.tabGroup = tibh.ui.createApplicationTabGroup(); | |
tibh.tabGroup.open(); |