A mostly reasonable approach to JavaScript
This file contains hidden or 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 CircleLoaderView = require("CircleLoaderView"); | |
| var myloader = new CircleLoaderView({ | |
| width : 200, | |
| centerWidth : 100, | |
| backgroundColor : "#fff", | |
| tintColor : "blue", | |
| textColor : "red", | |
| labelFontSize : 28 |
This file contains hidden or 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 doClickMenu(evt){ | |
| alert(evt.source.title); | |
| } | |
| // we need to do some things to the Window once it is properly instanciated, so we add an event listener to its OPEN event | |
| $.win.addEventListener('open',function(){ | |
| var actionBar = $.win.activity.actionBar; // get a handle to the action bar | |
| actionBar.title='My App'; // change the App Title | |
| actionBar.displayHomeAsUp=true; // Show the "angle" pointing back | |
| actionBar.onHomeIconItemSelected = function() { // what to do when the "home" icon is pressed |
This file contains hidden or 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 PX = require('com.pixate.framework'); | |
| PX.styleSheetFromFilePathWithOrigin({ | |
| monitor: true, | |
| origin: 0, | |
| filename: '/path/to/file.css' | |
| }); | |
| PX.styleSheetFromFilePathWithOrigin({ | |
| monitor: true, | |
| origin: 0, | |
| filename: '/path/to/second_file.css' |
This file contains hidden or 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
| #! /bin/sh | |
| # Run this from the folder you want to be the parent of your docs | |
| # By default, generated docs go into | |
| # titanium_mobile/dist/apidoc/ti_mobile_docs/ | |
| # | |
| # This can be changed below | |
| git clone https://github.com/appcelerator/titanium_mobile.git | |
| cd titanium_mobile | |
| sudo apt-get install python-setuptools python-dev |
This file contains hidden or 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
| /** | |
| * @aaronksaunders | |
| * | |
| * See more Appcelerator Information on Company Blog | |
| * blog.clearlyinnovetiove.com | |
| * | |
| */ | |
| var TiParse = function(options) { | |
| FB = { | |
| init: function() { |
This file contains hidden or 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
| // | |
| // Aaron K. Saunders | |
| // | |
| // http://www.clearlyinnovative.com | |
| // http://blog.clearlyinnovative.com | |
| // @aaronksaunders | |
| // | |
| // | |
| (function() { | |
| var group, tab1, tab2, win1, win2; |
This file contains hidden or 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
| //Application Window Component Constructor | |
| function ApplicationWindow() { | |
| //load component dependencies | |
| var FirstView = require('ui/common/FirstView'); | |
| //create component instance | |
| var self = Ti.UI.createWindow({ | |
| backgroundColor : '#ffffff', | |
| borderRadius : 6 | |
| }); |
This file contains hidden or 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(); | |
| var ball = Ti.UI.createView({ | |
| backgroundColor:'blue', | |
| height:50, | |
| width:50, | |
| borderRadius:20 | |
| }); | |
| win.add(ball); |
This file contains hidden or 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
| /* | |
| Foundation 5 w/ Grunt + Libsass (watch scss/*.scss & .html) | |
| Requirement: Chrome LiveReload extension (https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en). | |
| Usage: foundation new project-name --libsass && grunt | |
| */ | |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), |