Skip to content

Instantly share code, notes, and snippets.

Avatar

Anthony Decena Mindelusions

View GitHub Profile
View app.js
Titanium.UI.setBackgroundColor('#fff');
var tibh = {}; //create app namespace
Ti.include('ui.js','db.js');
tibh.tabGroup = tibh.ui.createApplicationTabGroup();
tibh.tabGroup.open();
View cuepoints.js
// 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"]
@Mindelusions
Mindelusions / app.js
Created Oct 7, 2011
LeatherFace Application Code
View app.js
// 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
@Mindelusions
Mindelusions / app.js
Created Oct 18, 2011
Sample Titanium App Built Using Sensis Developer API
View app.js
// Include a small sensis helper library
var mind = {};
Ti.include('sensis.js');
// Custom activity indicator
var indWin = null;
var actInd = null;
function showIndicator()
{
@Mindelusions
Mindelusions / BarWindow.js
Created Sep 17, 2012
Simple Titanium Commonjs Example
View BarWindow.js
function BarWindow() {
var self = Ti.UI.createWindow({
backgroundColor:'#f0f0f0',
layout:'vertical'
});
var lbl = Ti.UI.createLabel({
text:'Bar Window',
color:'#000',
top:20
@Mindelusions
Mindelusions / InfoWin.js
Created Sep 21, 2012
Titanium - Simple Slide Down Info Window
View InfoWin.js
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
@Mindelusions
Mindelusions / app.js
Created Sep 30, 2012
Titanium - Multi-Column Image View Stack
View app.js
var win = Ti.UI.createWindow({
backgroundColor:'#fff'
});
var leftView = Ti.UI.createView({
width:'48%',
height:Ti.UI.FILL,
left:0,
backgroundColor:'#dfdfdf',
layout:'vertical'
@Mindelusions
Mindelusions / AddWindow.js
Created Oct 5, 2012
TodoListACS - Blog Post Code Samples
View AddWindow.js
/*
* 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'
@Mindelusions
Mindelusions / lib_collection.js
Created Oct 16, 2012
TodoListAlloy - Collection ID Issue
View lib_collection.js
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++) {
@Mindelusions
Mindelusions / mask.js
Created Nov 2, 2012
Titanium - Field Mask
View mask.js
/*
* @ Developed by Nyvra (http://www.nyvra.net)
* @ Last release: 13/10/2011
*/
Mask = {
mask: function(_field, _function) {
_field.value = _function(_field.value)
},