View alloy.js
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 patches = require('patches'); | |
patches.fix_displayCaps(); |
View base.js
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.setMenuItemEnabled = function(menuItem, isEnabled) { | |
if(OS_ANDROID) { | |
if(Alloy.Globals.isAndroid3Plus && menuItem.actionView) { | |
menuItem.actionView.touchEnabled = isEnabled; | |
} | |
menuItem.setEnabled(isEnabled); | |
} | |
}; |
View index.js
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(); |
View alloy.js
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, |
View alloy.js
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') |
View demo.js
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
//******** underscore.string *********** | |
var _ = require("alloy/underscore")._; | |
// Import Underscore.string to separate object, | |
// because there are conflict functions (include, reverse, contains) | |
_.str = require('underscore.string'); | |
// Mix in non-conflict functions to Underscore namespace if you want | |
_.mixin(_.str.exports()); |
View bbcode2html.js
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
/* Escapes a string for use with regular expressions */ | |
function escapeString(input) { | |
return input.replace(/([\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g, | |
function(c){return "\\" + c;}); | |
} | |
/* replaces all */ | |
function replaceAll(search, input, replacement, ignore) { | |
return input.replace( | |
new RegExp(escapeString(search), "g"+(ignore?"i":"")), |
View alloy.js
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('networkMonitor').init(); |
View momentLang.js
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'); |
OlderNewer