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
exports.populateCallLog = function(listview, items) { | |
var helper = require('listViewHelper'); | |
return helper.populate(listview, items, false /*no merge*/, function sectionGenerator(lv, items) { | |
var moment = require("alloy/moment"); | |
var headerViewCtrl = Alloy.createController('modules/call/log/pickerSectionHeaderView'); | |
var dateTitle, | |
item = items[0], | |
utcTime = new Date(), |
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
// app/lib/SVGProduct.js | |
function getImageFileFromSVG(svgOpts, name) { | |
var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationCacheDirectory, | |
Ti.Utils.md5HexDigest(JSON.stringify(svgOpts))); | |
if (!file.exists()) { | |
var SVG = require('com.geraudbourdin.svgview'); | |
if (!file.write(SVG.createView(svgOpts).toImage())) { | |
Ti.API.error("Can't save to file. Product:", name); | |
return null; |
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
$.getView().backgroundImage = getImageFileFromSVG({ | |
image : "/images/hearts.svg", | |
width : 400, | |
height : 400, | |
top : 0, | |
left : 0 | |
}); | |
function getImageFileFromSVG(svgOpts) { | |
var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationCacheDirectory, |
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
require('uiModules') |
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 moment = require('alloy/moment'); | |
// First add languages that support your application | |
var languages = ['ru', 'nl', 'fr', 'fr-ca']; | |
// Full language list: https://github.com/appcelerator/alloy/tree/master/Alloy/builtins/moment/lang | |
// You must explicit way to require language files in order to compiler saw their. | |
require('alloy/moment/lang/ru'); | |
require('alloy/moment/lang/nl'); | |
require('alloy/moment/lang/fr'); |
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
Alloy.Globals.Android = Alloy.Globals.Android || {}; | |
_.extend(Alloy.Globals.Android.VERSION_CODES, { | |
CUR_DEVELOPMENT: 10000, | |
BASE: 1, | |
BASE_1_1: 2, | |
CUPCAKE: 3, | |
DONUT: 4, | |
ECLAIR: 5, | |
ECLAIR_0_1: 6, | |
ECLAIR_MR1: 7, |
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 args = arguments[0] || {};var url = "https://api.github.com/search/repositories?q=pushed:>2015-09-01&order=desc"; | |
var page = 1, | |
loading = false; | |
function init() { | |
$.activityIndicator.show(); | |
load(function(items) { | |
$.list.setItems(transform(items)); | |
$.activityIndicator.hide(); |
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 doClick(e) { | |
Alloy.createController("test").getView().open(); | |
} | |
$.index.open(); |