Permalink
Browse files

lint test apps and hook files

1 parent 58b3572 commit 6b78bff2ebf8041a5ffc3fdd0337d77c330dabc1 @feons feons committed Dec 1, 2016
Showing with 1,371 additions and 1,334 deletions.
  1. +18 −0 .eslintignore
  2. +29 −0 .eslintrc.js
  3. +9 −9 hooks/alloy.js
  4. +2 −3 hooks/deepclean.js
  5. +2 −0 package.json
  6. +1 −1 platforms/index.js
  7. +1 −1 platforms/ios/index.js
  8. +3 −3 samples/apps/advanced/device_query/specs/index.js
  9. +1 −1 samples/apps/advanced/dynamic_styling/controllers/features/autoStyle.js
  10. +1 −1 samples/apps/advanced/dynamic_styling/controllers/features/classes.js
  11. +2 −2 samples/apps/advanced/dynamic_styling/controllers/features/createStyle.js
  12. +2 −2 samples/apps/advanced/dynamic_styling/controllers/features/uiCreate.js
  13. +11 −11 samples/apps/advanced/form_factor/specs/index.js
  14. +13 −13 samples/apps/advanced/inheritance/specs/baseDialog.js
  15. +1 −1 samples/apps/advanced/inheritance/specs/index.js
  16. +7 −7 samples/apps/advanced/master_detail/specs/detail.js
  17. +2 −2 samples/apps/advanced/master_detail/specs/index.js
  18. +3 −3 samples/apps/advanced/master_detail/specs/master.js
  19. +15 −15 samples/apps/advanced/master_detail/specs/row.js
  20. +4 −4 samples/apps/advanced/native_modules/specs/index.js
  21. +12 −12 samples/apps/advanced/platform_folders/specs/index.js
  22. +6 −6 samples/apps/advanced/proxy_property_requires/specs/index.js
  23. +13 −13 samples/apps/advanced/proxy_property_requires/specs/proxy.js
  24. +4 −4 samples/apps/advanced/proxy_property_requires/specs/window.js
  25. +2 −2 samples/apps/advanced/themes/controllers/index.js
  26. +33 −33 samples/apps/advanced/themes/specs/dialog.js
  27. +42 −42 samples/apps/advanced/themes/specs/index.js
  28. +1 −1 samples/apps/advanced/themes/themes/blue/lib/foo.js
  29. +1 −1 samples/apps/advanced/themes/themes/dark/lib/foo.js
  30. +1 −1 samples/apps/advanced/themes/themes/green/lib/foo.js
  31. +1 −1 samples/apps/advanced/theming_widgets/alloy.js
  32. +3 −3 samples/apps/advanced/theming_widgets/controllers/index.js
  33. +9 −11 samples/apps/advanced/theming_widgets/widgets/starrating/controllers/widget.js
  34. +16 −18 samples/apps/basics/builtins/controllers/index.js
  35. +19 −19 samples/apps/basics/builtins/specs/index.js
  36. +4 −4 samples/apps/basics/config_json/specs/index.js
  37. +1 −1 samples/apps/basics/controller_events/controllers/index.js
  38. +13 −13 samples/apps/basics/controller_events/specs/CustomView.js
  39. +6 −6 samples/apps/basics/controller_events/specs/index.js
  40. +2 −2 samples/apps/basics/global_style/specs/index.js
  41. +7 −7 samples/apps/basics/global_style/specs/item.js
  42. +1 −1 samples/apps/basics/markup_events/controllers/index.js
  43. +5 −5 samples/apps/basics/markup_events/specs/index.js
  44. +2 −2 samples/apps/basics/markup_require/controllers/theRest.js
  45. +3 −3 samples/apps/basics/markup_require/specs/bottom.js
  46. +6 −6 samples/apps/basics/markup_require/specs/index.js
  47. +5 −5 samples/apps/basics/markup_require/specs/middle.js
  48. +5 −5 samples/apps/basics/simple/specs/index.js
  49. +4 −3 samples/apps/models/binding_bars/controllers/index.js
  50. +1 −1 samples/apps/models/binding_dashboard/alloy.js
  51. +1 −1 samples/apps/models/binding_dashboard/controllers/ios/index.js
  52. +2 −2 samples/apps/models/binding_dashboard/migrations/201302040000000_icon.js
  53. +1 −1 samples/apps/models/binding_dashboard/models/icon.js
  54. +1 −1 samples/apps/models/binding_dataFunction/controllers/index.js
  55. +5 −5 samples/apps/models/binding_destroy/migrations/201211191609645_info.js
  56. +3 −3 samples/apps/models/binding_destroy/migrations/201211191737234_movies.js
  57. +11 −11 samples/apps/models/binding_destroy/models/info.js
  58. +5 −5 samples/apps/models/binding_destroy/models/movies.js
  59. +1 −1 samples/apps/models/binding_listview/controllers/button.js
  60. +1 −1 samples/apps/models/binding_listview/migrations/201209301904312_info.js
  61. +3 −3 samples/apps/models/binding_listview/migrations/201301161234567_info.js
  62. +4 −4 samples/apps/models/binding_no_persistence/controllers/index.js
  63. +9 −9 samples/apps/models/binding_tableview/lib/common.js
  64. +5 −5 samples/apps/models/binding_tableview/migrations/201211031535764_myModel.js
  65. +8 −8 samples/apps/models/binding_tableview/models/myModel.js
  66. +34 −34 samples/apps/models/journal/controllers/add.js
  67. +2 −2 samples/apps/models/journal/controllers/index.js
  68. +6 −6 samples/apps/models/journal/migrations/201211031535764_journal.js
  69. +9 −9 samples/apps/models/journal/models/journal.js
  70. +1 −1 samples/apps/models/login/controllers/home.js
  71. +16 −16 samples/apps/models/login/migrations/201209301904312_user.js
  72. +73 −73 samples/apps/models/login/models/user.js
  73. +1 −1 samples/apps/models/properties/controllers/collection/collectionTab.js
  74. +1 −1 samples/apps/models/properties/controllers/modelTab.js
  75. +10 −10 samples/apps/models/properties/models/collectionTab.js
  76. +10 −10 samples/apps/models/properties/models/modelTab.js
  77. +1 −1 samples/apps/models/sql_idAttribute/migrations/201209301904312_fighters.js
  78. +7 −7 samples/apps/models/sql_idAttribute/models/fighters.js
  79. +1 −1 samples/apps/models/sql_keywords/migrations/201209301904312_fighters.js
  80. +7 −7 samples/apps/models/sql_keywords/models/fighters.js
  81. +7 −7 samples/apps/models/sql_no_migrations/models/thing.js
  82. +2 −2 samples/apps/models/sql_preload/migrations/201209301904312_fighters.js
  83. +2 −2 samples/apps/models/sql_preload/migrations/201301161234567_fighters.js
  84. +10 −10 samples/apps/models/sql_preload/models/fighters.js
  85. +1 −1 samples/apps/models/sql_queries/controllers/add.js
  86. +1 −1 samples/apps/models/sql_queries/migrations/201209301904312_color.js
  87. +1 −1 samples/apps/models/sql_queries/migrations/201209301904312_user.js
  88. +5 −5 samples/apps/models/sql_queries/models/color.js
  89. +1 −1 samples/apps/ui/lists_proxy_properties/controllers/index.js
  90. +4 −4 samples/apps/ui/listview/controllers/templates.js
  91. +2 −2 samples/apps/ui/navwindow/controllers/ios/win.js
  92. +1 −1 samples/apps/ui/popover/controllers/popover_with_window.js
  93. +1 −1 samples/apps/widgets/basic/controllers/index.js
  94. +7 −7 samples/apps/widgets/basic/widgets/com.foo.widget/controllers/widget.js
  95. +1 −1 samples/apps/widgets/complex/widgets/com.appcelerator.loading/controllers/widget.js
  96. +3 −3 samples/apps/widgets/complex/widgets/com.testing.searchForBooks/controllers/widget.js
  97. +6 −6 samples/apps/widgets/models/widgets/alloy.datatable/models/songs.js
  98. +1 −1 samples/lib/ConsoleReporter.js
  99. +19 −19 samples/lib/runtimeTester.js
  100. +15 −15 samples/lib/testUtils.js
  101. +2 −2 samples/todo/alloy.js
  102. +20 −20 samples/todo/controllers/add.js
  103. +2 −2 samples/todo/controllers/index.js
  104. +4 −4 samples/todo/controllers/row.js
  105. +5 −5 samples/todo/migrations/201209301904312_todo.js
  106. +9 −9 samples/todo/models/todo.js
  107. +1 −1 templates/default/app/controllers/index.js
  108. +3 −3 test/apps/testing/ALOY-1000/controllers/index.js
  109. +6 −6 test/apps/testing/ALOY-1000/models/book.js
  110. +1 −1 test/apps/testing/ALOY-1002/alloy.js
  111. +3 −3 test/apps/testing/ALOY-1002/controllers/index.js
  112. +1 −1 test/apps/testing/ALOY-1003/controllers/index.js
  113. +1 −1 test/apps/testing/ALOY-1033/alloy.js
  114. +7 −7 test/apps/testing/ALOY-1033/controllers/index.js
  115. +5 −5 test/apps/testing/ALOY-1033/models/rows.js
  116. +1 −1 test/apps/testing/ALOY-1047/alloy.js
  117. +3 −3 test/apps/testing/ALOY-1047/controllers/index.js
  118. +1 −1 test/apps/testing/ALOY-1080/alloy.js
  119. +1 −1 test/apps/testing/ALOY-1080/controllers/index.js
  120. +4 −4 test/apps/testing/ALOY-1080/models/fruits.js
  121. +2 −2 test/apps/testing/ALOY-1092/controllers/index.js
  122. +1 −1 test/apps/testing/ALOY-1122/controllers/index.js
  123. +2 −2 test/apps/testing/ALOY-1127/controllers/index.js
  124. +28 −28 test/apps/testing/ALOY-1127/models/test.js
  125. +5 −5 test/apps/testing/ALOY-1175/controllers/index.js
  126. +4 −4 test/apps/testing/ALOY-1219/controllers/index.js
  127. +3 −3 test/apps/testing/ALOY-1237/controllers/index.js
  128. +12 −12 test/apps/testing/ALOY-1262/specs/index.js
  129. +2 −2 test/apps/testing/ALOY-1325/controllers/index.js
  130. +16 −16 test/apps/testing/ALOY-1474/controllers/index.js
  131. +11 −11 test/apps/testing/ALOY-1474/models/transformer.js
  132. +8 −8 test/apps/testing/ALOY-1477/controllers/index.js
  133. +11 −11 test/apps/testing/ALOY-1477/models/mymodel.js
  134. +11 −11 test/apps/testing/ALOY-1479/controllers/index.js
  135. +6 −6 test/apps/testing/ALOY-1480/controllers/index.js
  136. +14 −14 test/apps/testing/ALOY-1480/models/model-a.js
  137. +13 −13 test/apps/testing/ALOY-1493/models/test.js
  138. +1 −1 test/apps/testing/ALOY-1494/controllers/index.js
  139. +9 −9 test/apps/testing/ALOY-262/_generated/ios/alloy/controllers/index.js
  140. +0 −4 test/apps/testing/ALOY-262/alloy.js
  141. +5 −4 test/apps/testing/ALOY-362/controllers/index.js
  142. +1 −1 test/apps/testing/ALOY-378/alloy.js
  143. +3 −3 test/apps/testing/ALOY-378/controllers/index.js
  144. +1 −1 test/apps/testing/ALOY-440/alloy.js
  145. +1 −1 test/apps/testing/ALOY-440/controllers/index.js
  146. +5 −5 test/apps/testing/ALOY-440/models/colors.js
  147. +5 −5 test/apps/testing/ALOY-440/models/fruits.js
  148. +3 −3 test/apps/testing/ALOY-440c/models/book.js
  149. +3 −3 test/apps/testing/ALOY-443/alloy.js
  150. +5 −5 test/apps/testing/ALOY-443/models/book.js
  151. +2 −2 test/apps/testing/ALOY-488/controllers/index.js
  152. +5 −5 test/apps/testing/ALOY-503/controllers/index.js
  153. +7 −7 test/apps/testing/ALOY-503/models/pins.js
  154. +1 −1 test/apps/testing/ALOY-594/alloy.js
  155. +2 −2 test/apps/testing/ALOY-594/migrations/201306200000000_collection.js
  156. +5 −5 test/apps/testing/ALOY-594/models/collection.js
  157. +1 −1 test/apps/testing/ALOY-604/alloy.js
  158. +1 −1 test/apps/testing/ALOY-609/controllers/button.js
  159. +1 −1 test/apps/testing/ALOY-609/controllers/index.js
  160. +1 −1 test/apps/testing/ALOY-609/migrations/201209301904312_info.js
  161. +3 −3 test/apps/testing/ALOY-609/migrations/201301161234567_info.js
  162. +1 −1 test/apps/testing/ALOY-609/models/info.js
  163. +7 −7 test/apps/testing/ALOY-613/controllers/index.js
  164. +6 −6 test/apps/testing/ALOY-613/specs/index.js
  165. +3 −3 test/apps/testing/ALOY-616/controllers/index.js
  166. +3 −3 test/apps/testing/ALOY-616/vendor/random.js
  167. +2 −2 test/apps/testing/ALOY-632/controllers/index.js
  168. +6 −6 test/apps/testing/ALOY-644/controllers/index.js
  169. +3 −3 test/apps/testing/ALOY-644/models/appState.js
  170. +2 −2 test/apps/testing/ALOY-644/models/heroes.js
  171. +3 −3 test/apps/testing/ALOY-657/_generated/android/alloy/controllers/index.js
  172. +3 −3 test/apps/testing/ALOY-657/_generated/ios/alloy/controllers/index.js
  173. +3 −3 test/apps/testing/ALOY-657/_generated/mobileweb/alloy/controllers/index.js
  174. +2 −2 test/apps/testing/ALOY-678/controllers/index.js
  175. +7 −7 test/apps/testing/ALOY-684/controllers/index.js
  176. +4 −4 test/apps/testing/ALOY-685/controllers/index.js
  177. +34 −34 test/apps/testing/ALOY-685/specs/index.js
  178. +26 −28 test/apps/testing/ALOY-691/models/test.js
  179. +5 −6 test/apps/testing/ALOY-695/controllers/foo/bar.js
  180. +5 −6 test/apps/testing/ALOY-695/controllers/index.js
  181. +1 −1 test/apps/testing/ALOY-706/controllers/index.js
  182. +9 −9 test/apps/testing/ALOY-706/specs/index.js
  183. +1 −1 test/apps/testing/ALOY-709/controllers/buttons.js
  184. +1 −1 test/apps/testing/ALOY-709/controllers/index.js
  185. +1 −1 test/apps/testing/ALOY-709/controllers/labels.js
  186. +5 −5 test/apps/testing/ALOY-709/specs/buttons.js
  187. +6 −6 test/apps/testing/ALOY-709/specs/index.js
  188. +14 −14 test/apps/testing/ALOY-709/specs/labels.js
  189. +5 −5 test/apps/testing/ALOY-713/alloy.js
  190. +2 −2 test/apps/testing/ALOY-714/controllers/index.js
  191. +2 −2 test/apps/testing/ALOY-716/alloy.js
  192. +4 −4 test/apps/testing/ALOY-721/controllers/index.js
  193. +2 −2 test/apps/testing/ALOY-728/controllers/index.js
  194. +2 −2 test/apps/testing/ALOY-753/controllers/index.js
  195. +7 −7 test/apps/testing/ALOY-753/models/user.js
  196. +3 −3 test/apps/testing/ALOY-754/controllers/index.js
  197. +7 −7 test/apps/testing/ALOY-754/specs/index.js
  198. +2 −2 test/apps/testing/ALOY-784/controllers/index.js
  199. +20 −20 test/apps/testing/ALOY-800/controllers/index.js
  200. +1 −1 test/apps/testing/ALOY-834/controllers/index.js
  201. +3 −3 test/apps/testing/ALOY-838/controllers/index.js
  202. +2 −2 test/apps/testing/ALOY-838/specs/index.js
  203. +2 −2 test/apps/testing/ALOY-846/controllers/testwindow.js
  204. +10 −10 test/apps/testing/ALOY-874/models/test.js
  205. +27 −27 test/apps/testing/ALOY-895/controllers/index.js
  206. +33 −33 test/apps/testing/ALOY-895/models/heroes.js
  207. +1 −1 test/apps/testing/ALOY-897/controllers/LandingPage.js
  208. +1 −1 test/apps/testing/ALOY-897/controllers/index.js
  209. +1 −1 test/apps/testing/ALOY-898/controllers/LandingPage.js
  210. +1 −1 test/apps/testing/ALOY-898/controllers/index.js
  211. +2 −2 test/apps/testing/ALOY-900/migrations/201403121234567_weather.js
  212. +8 −8 test/apps/testing/ALOY-900/models/weather.js
  213. +1 −1 test/apps/testing/ALOY-911/controllers/index.js
  214. +2 −2 test/apps/testing/ALOY-913/alloy.js
  215. +1 −1 test/apps/testing/ALOY-913/controllers/index.js
  216. +7 −7 test/apps/testing/ALOY-913/models/todo.js
  217. +1 −1 test/apps/testing/ALOY-922/controllers/index.js
  218. +1 −1 test/apps/testing/ALOY-932/controllers/index.js
  219. +3 −3 test/apps/testing/ALOY-932/models/fruits.js
  220. +1 −1 test/apps/testing/ALOY-934/controllers/index.js
  221. +1 −1 test/apps/testing/ALOY-937/controllers/index.js
  222. +1 −1 test/apps/testing/ALOY-949/controllers/index.js
  223. +1 −1 test/apps/testing/ALOY-963/controllers/index.js
  224. +1 −1 test/apps/testing/ALOY-963/vendor/android/greeting.js
  225. +1 −1 test/apps/testing/ALOY-963/vendor/greeting.js
  226. +1 −1 test/apps/testing/ALOY-963/vendor/ios/greeting.js
  227. +2 −2 test/apps/testing/ALOY-981/_generated/ios/alloy/controllers/index.js
  228. +1 −1 test/apps/testing/ALOY-981/controllers/index.js
  229. +2 −2 test/apps/testing/ALOY-994/controllers/android/win2.js
  230. +2 −2 test/apps/testing/ALOY-994b/controllers/android/win2.js
  231. +1 −1 test/specs/generate.js
  232. +17 −18 tools/checkmap.js
  233. +18 −18 tools/create_generated_code.js
  234. +10 −10 tools/create_test.js
View
@@ -0,0 +1,18 @@
+**/syntaxhighlighter
+test/**/widgets
+test/**/lib
+test/**/backbone
+test/**/grammar
+test/**/underscore
+**/_generated
+test/lib
+test/specs
+test/projects
+jake/lib
+locales/
+docs/
+**/jasmine.js
+**/lib/colors.js
+**/underscore.js
+**/backbone.js
+Alloy/grammar
View
@@ -0,0 +1,29 @@
+var OFF = 0;
+var WARNING = 1;
+var ERROR = 2;
+
+module.exports = {
+ env: {
+ 'node': true
+ },
+
+ extends: 'eslint:recommended',
+
+ rules: {
+ 'brace-style': [ERROR, '1tbs', {'allowSingleLine': true}],
+ 'comma-spacing': [ERROR, {'before': false, 'after': true}],
+ 'indent': [ERROR, 'tab', {'SwitchCase': 1}],
+ 'keyword-spacing': ERROR,
+ 'linebreak-style': [ERROR, 'unix'],
+ 'no-fallthrough': OFF,
+ 'no-console': OFF,
+ 'no-cond-assign': OFF,
+ 'no-unused-vars': OFF,
+ 'no-undef': OFF,
+ 'no-octal': OFF,
+ 'quotes': [ERROR, 'single', {'avoidEscape': true, allowTemplateLiterals: true}],
+ 'space-before-blocks': [ERROR, 'always'],
+ 'space-infix-ops': [ERROR, {'int32Hint': false}],
+ 'semi': [ERROR, 'always']
+ }
+};
View
@@ -20,9 +20,9 @@ exports.init = function (logger, config, cli, appc) {
spawn = require('child_process').spawn,
parallel = appc.async.parallel;
- if(!process.env.sdk) {
- process.env.sdk = cli.sdk.name;
- }
+ if (!process.env.sdk) {
+ process.env.sdk = cli.sdk.name;
+ }
function run(deviceFamily, deployType, target, finished, silent) {
var appDir = path.join(cli.argv['project-dir'], 'app');
@@ -50,7 +50,7 @@ exports.init = function (logger, config, cli, appc) {
deploytype: deployType || cli.argv['deploy-type'] || 'development',
target: target
};
- if(silent) {
+ if (silent) {
// turn off all logging output for code analyzer build hook
config.noBanner = 'true';
config.logLevel = '-1';
@@ -145,13 +145,13 @@ exports.init = function (logger, config, cli, appc) {
if (process.platform === 'win32' && paths.alloy === 'alloy.cmd') {
cmd.shift();
logger.info(__('Executing Alloy compile: %s',
- ['cmd','/s','/c'].concat(cmd).join(' ').cyan));
+ ['cmd', '/s', '/c'].concat(cmd).join(' ').cyan));
// arg processing from https://github.com/MarcDiethelm/superspawn
child = spawn('cmd', [['/s', '/c', '"' +
cmd.map(function(a) {
- if (/^[^"].* .*[^"]/.test(a)) return '"'+a+'"'; return a;
- }).join(" ") + '"'].join(" ")], {
+ if (/^[^"].* .*[^"]/.test(a)) return '"' + a + '"'; return a;
+ }).join(' ') + '"'].join(' ')], {
stdio: 'inherit',
windowsVerbatimArguments: true
}
@@ -175,8 +175,8 @@ exports.init = function (logger, config, cli, appc) {
} else {
logger.info(__('Alloy compiler completed successfully'));
- afs.exists(path.join(cli.argv["project-dir"], 'build', 'i18n')) && process.argv.push('--i18n-dir', 'build');
- afs.exists(path.join(cli.argv["project-dir"], 'build', 'platform')) && (cli.argv['platform-dir'] = 'build/platform');
+ afs.exists(path.join(cli.argv['project-dir'], 'build', 'i18n')) && process.argv.push('--i18n-dir', 'build');
+ afs.exists(path.join(cli.argv['project-dir'], 'build', 'platform')) && (cli.argv['platform-dir'] = 'build/platform');
}
finished();
});
View
@@ -13,7 +13,7 @@ exports.init = function (logger, config, cli, appc) {
afs = appc.fs;
function run(finished) {
- if(cli.argv['shallow'] === '') {
+ if (cli.argv['shallow'] === '') {
logger.info('Not cleaning the Resources directory');
finished();
return;
@@ -46,8 +46,7 @@ function rmdir(dirPath, fs, path, logger, removeSelf) {
var files;
try {
files = fs.readdirSync(dirPath);
- }
- catch(e) {
+ } catch (e) {
return;
}
if (files.length > 0) {
View
@@ -51,6 +51,7 @@
"alloy": "./bin/alloy"
},
"scripts": {
+ "pretest": "eslint .",
"test": "jake test:all"
},
"main": "./Alloy/alloy",
@@ -59,6 +60,7 @@
},
"devDependencies": {
"diff": "^2.2.2",
+ "eslint": "^3.11.1",
"jake": "^8.0.12"
}
}
View
@@ -5,7 +5,7 @@ var fs = require('fs'),
module.exports = (function() {
var obj = {};
_.each(fs.readdirSync(__dirname), function(file) {
- if (fs.existsSync(path.join(__dirname,file,'index.js'))) {
+ if (fs.existsSync(path.join(__dirname, file, 'index.js'))) {
obj[file] = require('./' + file + '/index');
}
});
@@ -2,5 +2,5 @@ module.exports = new (require('../base.js'))({
platform: 'ios',
titaniumFolder: 'iphone',
name: 'iPhone OS',
- osname: ['ipad','iphone']
+ osname: ['ipad', 'iphone']
});
@@ -20,7 +20,7 @@ module.exports = function($) {
api: 'Ti.UI.Window',
style: {
backgroundColor: bgColor,
- id: "win"
+ id: 'win'
}
});
});
@@ -48,10 +48,10 @@ module.exports = function($) {
color: color,
height: Ti.UI.SIZE,
width: Ti.UI.SIZE,
- textAlign: "center",
+ textAlign: 'center',
font: {
fontSize: (Alloy.isTablet ? 96 : 48) + (OS_MOBILEWEB ? 'px' : 0),
- fontWeight: "bold"
+ fontWeight: 'bold'
},
text: text,
id: 'osLabel'
@@ -55,7 +55,7 @@ changeImage();
// time (or manually as in the touch listeners above), but is very important
// once you start using the $.addClass() and $.removeClass() functions in the
// "Add/Remove Class" section of this app.
-_.each(['win','scroll','label1','label2','theButton','theImage'], function(id) {
+_.each(['win', 'scroll', 'label1', 'label2', 'theButton', 'theImage'], function(id) {
var proxy = $[id];
Alloy.Globals.print({
apiName: proxy.apiName,
@@ -43,7 +43,7 @@ function buttonUp(e) {
// Toggle the dimensions of $.theImage on clicks
var imageIndex = 0;
-var classes = ['thumb','wide','tall'];
+var classes = ['thumb', 'wide', 'tall'];
function changeImage(e) {
// reset the classes to change the image's dimensions
var theClass = classes[imageIndex++];
@@ -23,12 +23,12 @@ var styles = [
{},
{
apiName: 'Ti.UI.Label',
- classes: ['blue','shadow','large'],
+ classes: ['blue', 'shadow', 'large'],
id: 'tester'
},
{
apiName: 'Label',
- classes: ['dark','huge']
+ classes: ['dark', 'huge']
},
{
apiName: 'Label',
@@ -24,11 +24,11 @@ var index = 0;
var styles = [
{},
{
- classes: ['blue','shadow','large'],
+ classes: ['blue', 'shadow', 'large'],
id: 'tester'
},
{
- classes: ['dark','huge']
+ classes: ['dark', 'huge']
},
{
classes: ['shadow'],
@@ -8,15 +8,15 @@ module.exports = function($) {
api: 'Ti.UI.Window',
style: {
backgroundColor: '#fff',
- id: "index"
+ id: 'index'
}
});
validateUiComponent($, 'main', {
api: 'Ti.UI.View',
style: {
backgroundColor: Alloy.isTablet ? 'red' : 'blue',
- id: "main"
+ id: 'main'
}
});
@@ -25,20 +25,20 @@ module.exports = function($) {
style: {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
- color: "#fff",
+ color: '#fff',
text: Alloy.isTablet ? "I'm a tablet!" : "I'm a handheld!",
- id: "label"
+ id: 'label'
}
});
validateUiComponent($, 'container', {
api: 'Ti.UI.View',
style: {
- id: "container",
- height: "50",
- width: "200",
- bottom: "10",
- backgroundColor: "#cdcdcd"
+ id: 'container',
+ height: '50',
+ width: '200',
+ bottom: '10',
+ backgroundColor: '#cdcdcd'
}
});
@@ -47,9 +47,9 @@ module.exports = function($) {
style: {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
- color: "#fff",
+ color: '#fff',
text: Ti.Platform.osname + (OS_IOS ? '' : ' ' + (Alloy.isTablet ? 'tablet' : 'handheld')),
- id: "platformLabel"
+ id: 'platformLabel'
}
});
});
@@ -11,50 +11,50 @@ module.exports = function($, opts) {
validateUiComponent($, 'cover', {
api: 'Ti.UI.View',
style: {
- backgroundColor: "#000",
+ backgroundColor: '#000',
opacity: isAnimated ? 0 : 0.5,
height: Ti.UI.FILL,
width: Ti.UI.FILL,
- id: "cover"
+ id: 'cover'
}
});
validateUiComponent($, 'dialog', {
api: 'Ti.UI.View',
style: {
- height: "100dp",
- width: "66%",
- backgroundColor: "#fff",
- borderColor: "#000",
+ height: '100dp',
+ width: '66%',
+ backgroundColor: '#fff',
+ borderColor: '#000',
borderWidth: 2,
borderRadius: 4,
- id: "dialog"
+ id: 'dialog'
}
});
validateUiComponent($, 'message', {
api: 'Ti.UI.Label',
style: {
- color: "#000",
+ color: '#000',
left: 10,
right: 10,
top: 10,
height: Ti.UI.SIZE,
font: {
- fontSize: OS_MOBILEWEB ? "16px" : "16dp"
+ fontSize: OS_MOBILEWEB ? '16px' : '16dp'
},
- textAlign: "center",
+ textAlign: 'center',
text: opts.message,
- id: "message"
+ id: 'message'
}
});
validateUiComponent($, 'closeButton', {
api: 'Ti.UI.Button',
style: {
bottom: 10,
- title: "Close Dialog",
- id: "closeButton"
+ title: 'Close Dialog',
+ id: 'closeButton'
}
});
});
@@ -8,7 +8,7 @@ module.exports = function($) {
api: 'Ti.UI.Window',
style: {
backgroundColor: 'white',
- id: "index"
+ id: 'index'
}
});
});
@@ -11,14 +11,14 @@ module.exports = function($, opts) {
style: {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
- color: "#000",
+ color: '#000',
left: 15,
top: 10,
font: {
- fontSize: "18dp",
- fontWeight: "normal"
+ fontSize: '18dp',
+ fontWeight: 'normal'
},
- textAlign: "left",
+ textAlign: 'left',
id: id
}
};
@@ -30,9 +30,9 @@ module.exports = function($, opts) {
validateUiComponent($, 'detail', {
api: 'Ti.UI.Window',
style: {
- backgroundColor: "#fff",
- layout: "vertical",
- id: "detail"
+ backgroundColor: '#fff',
+ layout: 'vertical',
+ id: 'detail'
}
});
Oops, something went wrong.

0 comments on commit 6b78bff

Please sign in to comment.