Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from aconran/master

Upgrade to build 670 &  sencha touch 2.1
  • Loading branch information...
commit 4f73467c6402ae8d2df46c3134b15cc8a889dc12 2 parents 3c0dbb9 + 9636757
@lojjic lojjic authored
Showing with 25,566 additions and 1,075 deletions.
  1. +1 −0  .gitignore
  2. +52 −16 NativeContacts.xds
  3. +129 −0 PackageSettings.json
  4. +3 −3 app.html
  5. +4 −5 app.js
  6. +140 −0 app.json
  7. +13 −12 app/controller/Contacts.js
  8. +6 −5 app/model/Contact.js
  9. +4 −3 app/store/ContactStore.js
  10. +4 −4 app/view/FavoriteView.js
  11. +4 −3 app/view/Form.js
  12. +11 −6 app/view/Info.js
  13. +3 −4 app/view/List.js
  14. +5 −3 app/view/Main.js
  15. +4 −4 app/view/Picture.js
  16. +32 −0 build.xml
  17. +50 −0 device/Contacts.js
  18. +62 −1 device/Device.js
  19. +9 −7 device/Geolocation.js
  20. +5 −5 device/Notification.js
  21. +18 −0 device/Purchases.js
  22. +49 −0 device/Push.js
  23. +30 −15 device/communicator/Default.js
  24. +59 −0 device/contacts/Abstract.js
  25. +89 −0 device/contacts/Sencha.js
  26. +82 −2 device/device/Abstract.js
  27. +9 −0 device/device/PhoneGap.js
  28. +30 −0 device/device/Sencha.js
  29. +1 −1  device/geolocation/Abstract.js
  30. +3 −5 device/geolocation/Sencha.js
  31. +18 −5 device/notification/PhoneGap.js
  32. +302 −0 device/purchases/Sencha.js
  33. +138 −0 device/push/Abstract.js
  34. +22 −0 device/push/Sencha.js
  35. +3 −2 index.html
  36. +51 −20 metadata/Application
  37. +115 −78 metadata/controller/Contacts
  38. +33 −54 metadata/model/Contact
  39. +14 −0 metadata/resource/Library
  40. +41 −0 metadata/resource/PackageSettings
  41. +2 −5 metadata/resource/css
  42. +14 −23 metadata/store/ContactStore
  43. +28 −10 metadata/view/FavoriteView
  44. +64 −80 metadata/view/Form
  45. +55 −64 metadata/view/Info
  46. +23 −14 metadata/view/List
  47. +16 −31 metadata/view/Main
  48. +46 −26 metadata/view/Picture
  49. +168 −0 packager.json
  50. +11,139 −0 resources/css/app.css
  51. +1 −0  resources/css/contacts.css
  52. BIN  resources/icons/Icon.png
  53. BIN  resources/icons/Icon@2x.png
  54. BIN  resources/icons/Icon~ipad.png
  55. BIN  resources/icons/Icon~ipad@2x.png
  56. BIN  resources/icons/iTunesArtwork.png
  57. BIN  resources/icons/icon-spot~ipad.png
  58. BIN  resources/loading/Default-Landscape@2x~ipad.png
  59. BIN  resources/loading/Default-LandscapeLeft~ipad.png
  60. BIN  resources/loading/Default-LandscapeRight~ipad.png
  61. BIN  resources/loading/Default-Landscape~ipad.png
  62. BIN  resources/loading/Default-Portrait@2x~ipad.png
  63. BIN  resources/loading/Default-PortraitUpsideDown~ipad.png
  64. BIN  resources/loading/Default-Portrait~ipad.png
  65. BIN  resources/loading/Default.png
  66. BIN  resources/loading/Default@2x.png
  67. BIN  resources/loading/Default~ipad.png
  68. +19 −0 resources/sass/app.scss
  69. +16 −2 resources/sass/contacts.scss
  70. BIN  resources/startup/1496x2048.png
  71. BIN  resources/startup/1536x2008.png
  72. BIN  resources/startup/320x460.jpg
  73. BIN  resources/startup/640x920.png
  74. BIN  resources/startup/748x1024.png
  75. BIN  resources/startup/768x1004.png
  76. +4 −0 resources/themes/compass_init.rb
  77. BIN  resources/themes/images/default/pictos/circle3.png
  78. BIN  resources/themes/images/default/pictos/circle4.png
  79. 0  resources/themes/images/default/pictos/{power socket.png → power_socket.png}
  80. 0  resources/themes/images/default/pictos/{warming_dotted.png → warning_dotted.png}
  81. 0  resources/themes/images/default/{tip.png → tip2_left.png}
  82. BIN  resources/themes/images/default/tip2_right.png
  83. BIN  resources/themes/images/default/tip_bottom.png
  84. BIN  resources/themes/images/default/tip_left.png
  85. BIN  resources/themes/images/default/tip_right.png
  86. 0  resources/themes/images/default/{tip_horizontal.png → tip_top.png}
  87. +1 −1  resources/themes/stylesheets/sencha-touch/default/_all.scss
  88. +7 −50 resources/themes/stylesheets/sencha-touch/default/_mixins.scss
  89. +9 −3 resources/themes/stylesheets/sencha-touch/default/_variables.scss
  90. +2 −0  resources/themes/stylesheets/sencha-touch/default/_widgets.scss
  91. +20 −4 resources/themes/stylesheets/sencha-touch/default/core/_core.scss
  92. +560 −293 resources/themes/stylesheets/sencha-touch/default/core/_layout.scss
  93. +30 −22 resources/themes/stylesheets/sencha-touch/default/widgets/_buttons.scss
  94. +4 −4 resources/themes/stylesheets/sencha-touch/default/widgets/_carousel.scss
  95. +134 −0 resources/themes/stylesheets/sencha-touch/default/widgets/_charts.scss
  96. +34 −0 resources/themes/stylesheets/sencha-touch/default/widgets/_draw.scss
  97. +1 −1  resources/themes/stylesheets/sencha-touch/default/widgets/_form-sliders-basic.scss
  98. +3 −3 resources/themes/stylesheets/sencha-touch/default/widgets/_form-sliders.scss
  99. +73 −27 resources/themes/stylesheets/sencha-touch/default/widgets/_form.scss
  100. +14 −1 resources/themes/stylesheets/sencha-touch/default/widgets/_img.scss
  101. +144 −81 resources/themes/stylesheets/sencha-touch/default/widgets/_list.scss
  102. +9 −1 resources/themes/stylesheets/sencha-touch/default/widgets/_map.scss
  103. +30 −6 resources/themes/stylesheets/sencha-touch/default/widgets/_msgbox.scss
  104. +45 −26 resources/themes/stylesheets/sencha-touch/default/widgets/_panel.scss
  105. +23 −20 resources/themes/stylesheets/sencha-touch/default/widgets/_picker.scss
  106. +50 −7 resources/themes/stylesheets/sencha-touch/default/widgets/_tabs.scss
  107. +1 −1  resources/themes/stylesheets/sencha-touch/default/widgets/_toolbar-forms.scss
  108. +16 −6 resources/themes/stylesheets/sencha-touch/default/widgets/_toolbar.scss
  109. +6 −0 resources/themes/vendor/compass-recipes/Gemfile
  110. +7 −0 resources/themes/vendor/compass-recipes/LICENSE
  111. +103 −0 resources/themes/vendor/compass-recipes/README.md
  112. +52 −0 resources/themes/vendor/compass-recipes/Rakefile.rb
  113. +1 −0  resources/themes/vendor/compass-recipes/VERSION
  114. +26 −0 resources/themes/vendor/compass-recipes/compass-recipes.gemspec
  115. +18 −0 resources/themes/vendor/compass-recipes/config.rb
  116. +369 −0 resources/themes/vendor/compass-recipes/fonts/OFL-FAQ.txt
  117. +97 −0 resources/themes/vendor/compass-recipes/fonts/OFL.txt
  118. BIN  resources/themes/vendor/compass-recipes/fonts/heydings/heydings_icons.ttf
  119. +95 −0 resources/themes/vendor/compass-recipes/fonts/iconic/demo.html
  120. +97 −0 resources/themes/vendor/compass-recipes/fonts/iconic/iconic.css
  121. BIN  resources/themes/vendor/compass-recipes/fonts/iconic/iconic_stroke.eot
  122. BIN  resources/themes/vendor/compass-recipes/fonts/iconic/iconic_stroke.otf
  123. +393 −0 resources/themes/vendor/compass-recipes/fonts/iconic/iconic_stroke.svg
  124. BIN  resources/themes/vendor/compass-recipes/fonts/iconic/iconic_stroke.ttf
  125. BIN  resources/themes/vendor/compass-recipes/fonts/websymbols/websymbols-regular-webfont.eot
  126. +108 −0 resources/themes/vendor/compass-recipes/fonts/websymbols/websymbols-regular-webfont.svg
  127. BIN  resources/themes/vendor/compass-recipes/fonts/websymbols/websymbols-regular-webfont.ttf
  128. +8 −0 resources/themes/vendor/compass-recipes/lib/compass-recipes.rb
  129. +44 −0 resources/themes/vendor/compass-recipes/lib/compass-recipes/sass_extensions.rb
  130. +12 −0 resources/themes/vendor/compass-recipes/stylesheets/_recipes.scss
  131. +15 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/_background.scss
  132. +200 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/_color.scss
  133. +6 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/_effect.scss
  134. +2 −0  resources/themes/vendor/compass-recipes/stylesheets/recipes/_form.scss
  135. +15 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/_google-webfont.scss
  136. +34 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/_icons.scss
  137. +1 −0  resources/themes/vendor/compass-recipes/stylesheets/recipes/_layout.scss
  138. +102 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/_media-queries.scss
  139. +2 −0  resources/themes/vendor/compass-recipes/stylesheets/recipes/_shadow.scss
  140. +11 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/_shape.scss
  141. +5 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/_shared.scss
  142. +8 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/_ui.scss
  143. +209 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/_webfont-icon.scss
  144. +21 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/animation/_keyframes.scss
  145. +52 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_blueprint-grid.scss
  146. +33 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_carbon-fiber.scss
  147. +61 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_checkerboard.scss
  148. +42 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_cicada.scss
  149. +94 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_gradients.scss
  150. +51 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_houndstooth.scss
  151. +30 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_lined-paper.scss
  152. +84 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_madras.scss
  153. +47 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_noise.scss
  154. +28 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_polka-dot.scss
  155. +15 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_radial-overlay.scss
  156. +24 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_striped.scss
  157. +46 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_stripes.scss
  158. +30 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_tablecloth.scss
  159. +81 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/background/_tartan.scss
  160. +37 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/effect/_bevel.scss
  161. +26 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/effect/_corner-folded.scss
  162. +19 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/effect/_cutout.scss
  163. +65 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/effect/_folded-corner.scss
  164. +39 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/effect/_glass.scss
  165. +43 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/effect/_tape.scss
  166. +1 −0  resources/themes/vendor/compass-recipes/stylesheets/recipes/form/_element.scss
  167. +1 −0  resources/themes/vendor/compass-recipes/stylesheets/recipes/form/_skin.scss
  168. +24 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/form/element/_inline.scss
  169. +143 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/form/skin/_natural.scss
  170. +68 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/layout/_flexible-box-model.scss
  171. +207 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/layout/_grid.scss
  172. +67 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/layout/_vertical-align.scss
  173. +15 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shadow/_drop.scss
  174. +28 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shadow/_top-edge.scss
  175. +37 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shadow/drop/_curled-corners.scss
  176. +74 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shadow/drop/_curved.scss
  177. +34 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shadow/drop/_flying.scss
  178. +38 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shadow/drop/_lifted-corners.scss
  179. +26 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shadow/drop/_perspective.scss
  180. +13 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shadow/drop/_raised.scss
  181. +24 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shadow/drop/_transform-requirement.scss
  182. +24 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/_ellipse.scss
  183. +15 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/_polygon.scss
  184. +11 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/_symbol.scss
  185. +38 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/polygon/_hexagon.scss
  186. +41 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/polygon/_octagon.scss
  187. +15 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/polygon/_parallelogram.scss
  188. +26 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/polygon/_pentagon.scss
  189. +11 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/polygon/_rectangle.scss
  190. +10 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/polygon/_rhombus.scss
  191. +11 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/polygon/_square.scss
  192. +144 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/polygon/_star.scss
  193. +13 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/polygon/_trapezoid.scss
  194. +73 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/polygon/_triangle.scss
  195. +33 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/symbol/_diamond.scss
  196. +13 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/symbol/_egg.scss
  197. +38 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/symbol/_heart.scss
  198. +48 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/symbol/_infinity.scss
  199. +18 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/symbol/_pacman.scss
  200. +49 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shape/symbol/_yin-yang.scss
  201. +6 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shared/_block-inline-block.scss
  202. +31 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shared/_clearfix.scss
  203. +12 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shared/_list-inline-block.scss
  204. +27 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shared/_pseudo-element.scss
  205. +6 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/shared/_user-select.scss
  206. +30 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/_convex.scss
  207. +25 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/_glossy.scss
  208. +30 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/_gradient.scss
  209. +1 −0  resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/_helper.scss
  210. +106 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/_keyboard.scss
  211. +1 −0  resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/_menu.scss
  212. +22 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/_overlay.scss
  213. +37 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/_separator.scss
  214. +9 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/border/_bevel.scss
  215. +76 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/helper/_arrow.scss
  216. +52 −0 resources/themes/vendor/compass-recipes/stylesheets/recipes/ui/menu/_dropdown.scss
  217. +34 −0 resources/themes/vendor/compass-recipes/tests/_tests.scss
  218. +55 −0 resources/themes/vendor/compass-recipes/tests/recipes/background/index.html
  219. +424 −0 resources/themes/vendor/compass-recipes/tests/recipes/background/s.css
  220. +115 −0 resources/themes/vendor/compass-recipes/tests/recipes/background/s.scss
  221. +24 −0 resources/themes/vendor/compass-recipes/tests/recipes/color/index.html
  222. +161 −0 resources/themes/vendor/compass-recipes/tests/recipes/color/s.css
  223. +59 −0 resources/themes/vendor/compass-recipes/tests/recipes/color/s.scss
  224. +19 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/bevel/index.html
  225. +73 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/bevel/s.css
  226. +41 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/bevel/s.scss
  227. +34 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/corner-folded/index.html
  228. +172 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/corner-folded/s.css
  229. +43 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/corner-folded/s.scss
  230. +13 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/cutout/index.html
  231. +67 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/cutout/s.css
  232. +30 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/cutout/s.scss
  233. +12 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/glass/index.html
  234. +128 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/glass/s.css
  235. +26 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/glass/s.scss
  236. +10 −0 resources/themes/vendor/compass-recipes/tests/recipes/effect/index.html
  237. +27 −0 resources/themes/vendor/compass-recipes/tests/recipes/form/element/inline/index.html
  238. +50 −0 resources/themes/vendor/compass-recipes/tests/recipes/form/element/inline/s.css
  239. +5 −0 resources/themes/vendor/compass-recipes/tests/recipes/form/element/inline/s.scss
  240. +6 −0 resources/themes/vendor/compass-recipes/tests/recipes/form/index.html
  241. +6 −0 resources/themes/vendor/compass-recipes/tests/recipes/form/skin/index.html
  242. +46 −0 resources/themes/vendor/compass-recipes/tests/recipes/form/skin/natural/index.html
  243. +157 −0 resources/themes/vendor/compass-recipes/tests/recipes/form/skin/natural/s.css
  244. +19 −0 resources/themes/vendor/compass-recipes/tests/recipes/form/skin/natural/s.scss
  245. +5 −0 resources/themes/vendor/compass-recipes/tests/recipes/google-webfont/index.html
  246. +63 −0 resources/themes/vendor/compass-recipes/tests/recipes/google-webfont/s.css
  247. +14 −0 resources/themes/vendor/compass-recipes/tests/recipes/google-webfont/s.scss
  248. +17 −0 resources/themes/vendor/compass-recipes/tests/recipes/index.html
  249. +455 −0 resources/themes/vendor/compass-recipes/tests/recipes/layout/grid/index.html
  250. +531 −0 resources/themes/vendor/compass-recipes/tests/recipes/layout/grid/s.css
  251. +18 −0 resources/themes/vendor/compass-recipes/tests/recipes/layout/grid/s.scss
  252. +6 −0 resources/themes/vendor/compass-recipes/tests/recipes/layout/index.html
  253. +10 −0 resources/themes/vendor/compass-recipes/tests/recipes/layout/vertical-align/index.html
  254. +85 −0 resources/themes/vendor/compass-recipes/tests/recipes/layout/vertical-align/s.css
  255. +20 −0 resources/themes/vendor/compass-recipes/tests/recipes/layout/vertical-align/s.scss
  256. +15 −0 resources/themes/vendor/compass-recipes/tests/recipes/media-queries/index.html
  257. +15 −0 resources/themes/vendor/compass-recipes/tests/recipes/media-queries/s.scssx
  258. +27 −0 resources/themes/vendor/compass-recipes/tests/recipes/shadow/drop/curved/index.html
  259. +271 −0 resources/themes/vendor/compass-recipes/tests/recipes/shadow/drop/curved/s.css
  260. +68 −0 resources/themes/vendor/compass-recipes/tests/recipes/shadow/drop/curved/s.scss
  261. +35 −0 resources/themes/vendor/compass-recipes/tests/recipes/shadow/drop/index.html
  262. +268 −0 resources/themes/vendor/compass-recipes/tests/recipes/shadow/drop/s.css
  263. +73 −0 resources/themes/vendor/compass-recipes/tests/recipes/shadow/drop/s.scss
  264. +7 −0 resources/themes/vendor/compass-recipes/tests/recipes/shadow/index.html
  265. +8 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/ellipse/index.html
  266. +90 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/ellipse/s.css
  267. +31 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/ellipse/s.scss
  268. +8 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/index.html
  269. +29 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/polygon/index.html
  270. +398 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/polygon/s.css
  271. +40 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/polygon/s.scss
  272. +15 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/polygon/star/index.html
  273. +356 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/polygon/star/s.css
  274. +23 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/polygon/star/s.scss
  275. +27 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/polygon/triangle/index.html
  276. +104 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/polygon/triangle/s.css
  277. +43 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/polygon/triangle/s.scss
  278. +16 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/symbol/index.html
  279. +414 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/symbol/s.css
  280. +16 −0 resources/themes/vendor/compass-recipes/tests/recipes/shape/symbol/s.scss
  281. +14 −0 resources/themes/vendor/compass-recipes/tests/recipes/shared/clearfix/index.html
  282. +71 −0 resources/themes/vendor/compass-recipes/tests/recipes/shared/clearfix/s.css
  283. +26 −0 resources/themes/vendor/compass-recipes/tests/recipes/shared/clearfix/s.scss
  284. +6 −0 resources/themes/vendor/compass-recipes/tests/recipes/shared/index.html
  285. +6 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/convex/index.html
  286. +73 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/convex/s.css
  287. +22 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/convex/s.scss
  288. +7 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/gradient/index.html
  289. +74 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/gradient/s.css
  290. +26 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/gradient/s.scss
  291. +13 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/index.html
  292. +19 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/keyboard/index.html
  293. +122 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/keyboard/s.css
  294. +15 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/keyboard/s.scss
  295. +69 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/menu/dropdown/index.html
  296. +68 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/menu/dropdown/s.css
  297. +21 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/menu/dropdown/s.scss
  298. +6 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/menu/index.html
  299. +5 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/overlay/index.html
  300. +57 −0 resources/themes/vendor/compass-recipes/tests/recipes/ui/overlay/s.css
Sorry, we could not display the entire diff because too many files (307) changed.
View
1  .gitignore
@@ -0,0 +1 @@
+.architect
View
68 NativeContacts.xds
@@ -2,23 +2,25 @@
"name": "NativeContacts",
"settings": {
"urlPrefix": "http://localhost/NativeContacts/",
- "directAPI": "",
"spacesToIndent": 4,
+ "exportPath": "",
+ "sdkPath": "/Users/aconran/Sites/releases/sencha-touch-2.1.0",
+ "lineEnding": "LF",
+ "genTimestamps": false,
+ "cacheBust": false,
+ "directAPI": "",
"codeGenFormat": "Class",
- "exportPath": "/Users/aconran/Sites/deploynative",
- "extPath": "http://localhost/releases/sencha-touch-2.0.1/",
"senchaIoKey": "",
"senchaIoPath": "http://extjs.cachefly.net/designer/IO/",
- "lineEnding": "LF",
"instantiateStore": true,
- "genTimestamps": false,
"saveOnDeploy": false,
- "appName": "MyApp",
- "mapsAPI": "http://maps.google.com/maps/api/js?sensor=true"
+ "appName": "MyApp"
},
- "xdsVersion": "2.0.0",
- "xdsBuild": "423",
- "framework": "touch20",
+ "xdsVersion": "2.1.0",
+ "xdsBuild": 670,
+ "schemaVersion": 1,
+ "upgradeVersion": 210000000498,
+ "framework": "touch21",
"topInstanceFileMap": {
"ab0ebc18-fc5b-43b1-8958-7395bd191769": {
"paths": [
@@ -97,13 +99,47 @@
"metadata/resource/css"
],
"className": "css"
+ },
+ "f81dd17b-02a8-4071-9594-4730c3b71ef7": {
+ "paths": [
+ "metadata/resource/Library"
+ ],
+ "className": "Library"
+ },
+ "ab0185ab-ce77-45f4-baf3-ac9f5f753ffe": {
+ "paths": [
+ "metadata/resource/PackageSettings",
+ "",
+ "PackageSettings.json"
+ ],
+ "className": "PackageSettings"
}
},
- "expandedState": {
- "data": true,
- "model": false,
- "component": true,
- "controller": true,
- "resource": true
+ "viewOrderMap": {
+ "view": [
+ "e83d8bd0-aa8b-4b79-bf87-9a8797bca19b",
+ "b037ea3a-5bcd-4f85-930a-abaa1bdc4dcd",
+ "7187cc37-7c2e-4f8a-a763-ba7d3f34a79c",
+ "266d5780-ee4a-4dca-a156-841cf77894ee",
+ "5b610c64-3053-4d2f-8bfb-77077b9b2217",
+ "ab0ebc18-fc5b-43b1-8958-7395bd191769"
+ ],
+ "store": [
+ "8173b689-b7f9-4661-9bb0-6cba367d3d80"
+ ],
+ "controller": [
+ "12f4e105-fe10-4110-a7c7-4be456e0092e"
+ ],
+ "model": [
+ "218f2c46-69a4-44c6-8b9e-29b8e3d800dc"
+ ],
+ "resource": [
+ "f81dd17b-02a8-4071-9594-4730c3b71ef7",
+ "83d5f462-ac48-477a-8b82-5867e132986d",
+ "ab0185ab-ce77-45f4-baf3-ac9f5f753ffe"
+ ],
+ "app": [
+ "application"
+ ]
}
}
View
129 PackageSettings.json
@@ -0,0 +1,129 @@
+{
+
+ /**
+ * @cfg {String} applicationName
+ *
+ * This is the name of your application, which is displayed on the device when the app is installed. On IOS, this should match
+ * the name of your application in the Apple Provisioning Portal.
+ */
+ "applicationName": "NativeContacts",
+
+ /**
+ * @cfg {String} applicationId
+ *
+ * This is the name namespace for your application. On IOS, this should match the name of your application in the Apple Provisioning Portal.
+ */
+ "applicationId": "com.mycompany.myAppID",
+
+ /**
+ * @cfg {String} versionString
+ *
+ * This is the version of your application.
+ */
+ "versionString": "1.0",
+
+ /**
+ * @cfg {String} versionCode
+ *
+ * This is the integer version code of your application, or you can refer to it as a build number. Used only for Android builds.
+ */
+ "versionCode": 1,
+
+ /**
+ * @cfg {Object} icon
+ *
+ * For iOS, please refer to their documentation about icon sizes:
+ * https://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html
+ *
+ * For Android, please refer to the Google Launcher icons guide:
+ * http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html
+ */
+ "icon": {
+ "57": "resources/icons/Icon.png",
+ "72": "resources/icons/Icon~ipad.png",
+ "114": "resources/icons/Icon@2x.png",
+ "144": "resources/icons/Icon~ipad@2x.png"
+ },
+
+ /**
+ * @cfg {String} inputPath
+ *
+ * This is location of your Sencha Touch 2 application, relative to this configuration file.
+ */
+ "inputPath": "./",
+
+ /**
+ * @cfg {String} outputPath
+ *
+ * This is where the built application file with be saved. Make sure that output path is not in your input path, you may get into endless recursive copying
+ */
+ "outputPath": "../build/",
+
+ /**
+ * @cfg {String} configuration
+ *
+ * This is configuration for your application. `Debug` should always be used unless you are submitting your app to an online
+ * store - in which case `Release` should be specified.
+ */
+ "configuration": "Debug",
+
+ /**
+ * @cfg {String} platform
+ *
+ * This is the platform where you will be running your application.
+ * Available options are:
+ * - iOSSimulator
+ * - iOS
+ * - Android
+ * - AndroidEmulator
+ */
+ "platform": "iOSSimulator",
+
+ /**
+ * @cfg {String} deviceType
+ *
+ * This is device type that your application will be running on.
+ * If you are developing for Android, this is not necessary.
+ * Available options are:
+ * - iPhone
+ * - iPad
+ * - Universal
+ */
+ "deviceType": "Universal",
+
+ /**
+ * @cfg {String} androidAPILevel
+ *
+ * This is android API level, the version of Android SDK to use, you can read more about it here: http://developer.android.com/guide/appendix/api-levels.html.
+ * Be sure to install corresponding platform API in android SDK manager (android_sdk/tools/android)
+ */
+ "androidAPILevel": "8",
+
+ /**
+ * @cfg {Array[String]} permissions
+ *
+ * Array of permissions that is used by an application (Android only)
+ * Full list of permissions for Android application can be found here: http://developer.android.com/reference/android/Manifest.permission.html#ACCESS_CHECKIN_PROPERTIES
+ */
+ "permissions": [
+ "INTERNET",
+ "ACCESS_NETWORK_STATE",
+ "CAMERA",
+ "VIBRATE",
+ "ACCESS_FINE_LOCATION",
+ "ACCESS_COARSE_LOCATION",
+ "CALL_PHONE"
+ ],
+
+ /**
+ * @cfg {Array[String]} orientations
+ *
+ * This is orientations that this application can run.
+ */
+ "orientations": [
+ "portrait",
+ "landscapeLeft",
+ "landscapeRight",
+ "portraitUpsideDown"
+ ]
+}
View
6 app.html
@@ -6,9 +6,9 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>NativeContacts</title>
- <link rel="stylesheet" type="text/css" href="http://localhost/releases/sencha-touch-2.0.1/resources/css/sencha-touch.css"/>
- <link rel="stylesheet" type="text/css" href="resources/css/contacts.css"/>
- <script type="text/javascript" src="http://localhost/releases/sencha-touch-2.0.1/sencha-touch-all-debug.js"></script>
+ <script src="http://extjs.cachefly.net/touch/sencha-touch-2.1.0/sencha-touch-all-debug.js"></script>
+ <link rel="stylesheet" href="http://extjs.cachefly.net/touch/sencha-touch-2.1.0/resources/css/sencha-touch.css">
+ <link rel="stylesheet" href="resources/css/contacts.css">
<script type="text/javascript" src="app.js"></script>
<script type="text/javascript">
if (!Ext.browser.is.WebKit) {
View
9 app.js
@@ -1,11 +1,11 @@
/*
* File: app.js
*
- * This file was generated by Sencha Architect version 2.0.0.
+ * This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
- * This file requires use of the Sencha Touch 2.0.x library, under independent license.
- * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
+ * This file requires use of the Sencha Touch 2.1.x library, under independent license.
+ * License of Sencha Architect does not include license for Sencha Touch 2.1.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
@@ -21,10 +21,10 @@ Ext.Loader.setConfig({
});
Ext.application({
+
requires: [
'Ext.device.Camera'
],
-
models: [
'Contact'
],
@@ -45,7 +45,6 @@ Ext.application({
],
launch: function() {
- Ext.require('Ext.device.*');
Ext.util.Format.empty = function(value, defaultValue) {
return !Ext.isEmpty(value) ? value : defaultValue;
};
View
140 app.json
@@ -0,0 +1,140 @@
+{
+ /**
+ * The application's namespace, used by Sencha Command to generate classes
+ */
+ "name": "NativeContacts",
+
+ /**
+ * The file path to this application's front HTML document, relative to this app.json file
+ */
+ "indexHtmlPath": "index.html",
+
+ /**
+ * The absolute URL to this application in development environment, i.e: the URL to run this application
+ * on your web browser during development, e.g: "http://localhost/myapp/index.html".
+ *
+ * This value is needed when build to resolve your application's dependencies if it requires server-side resources
+ * that are not accessible via file system protocol.
+ */
+ "url": null,
+
+ /**
+ * List of all JavaScript assets in the right execution order.
+ * Each item is an object with the following format:
+ * {
+ * "path": "path/to/script.js" // Path to file, if local file it must be relative to this app.json file
+ * "remote": true // (Optional)
+ * // - Defaults to undefined (falsey) to signal a local file which will be copied
+ * // - Specify true if this file is a remote file which will not to be copied
+ * "update": "delta" // (Optional)
+ * // - If not specified, this file will only be loaded once, and
+ * // cached inside localStorage until this value is changed.
+ * // - "delta" to enable over-the-air delta update for this file
+ * // - "full" means full update will be made when this file changes
+ *
+ * }
+ */
+ "js": [
+ {
+ "path": "touch/sencha-touch.js"
+ },
+ {
+ "path": "app.js",
+ "bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */
+ "update": "delta"
+ }
+ ],
+
+ /**
+ * List of all CSS assets in the right inclusion order.
+ * Each item is an object with the following format:
+ * {
+ * "path": "path/to/item.css" // Path to file, if local file it must be relative to this app.json file
+ * "remote": true // (Optional)
+ * // - Defaults to undefined (falsey) to signal a local file which will be copied
+ * // - Specify true if this file is a remote file which will not to be copied
+ * "update": "delta" // (Optional)
+ * // - If not specified, this file will only be loaded once, and
+ * // cached inside localStorage until this value is changed to either one below
+ * // - "delta" to enable over-the-air delta update for this file
+ * // - "full" means full update will be made when this file changes
+ *
+ * }
+ */
+ "css": [
+ {
+ "path": "resources/css/app.css",
+ "update": "delta"
+ }
+ ],
+
+ /**
+ * Used to automatically generate cache.manifest (HTML 5 application cache manifest) file when you build
+ */
+ "appCache": {
+ /**
+ * List of items in the CACHE MANIFEST section
+ */
+ "cache": [
+ "index.html"
+ ],
+ /**
+ * List of items in the NETWORK section
+ */
+ "network": [
+ "*"
+ ],
+ /**
+ * List of items in the FALLBACK section
+ */
+ "fallback": []
+ },
+
+ /**
+ * Extra resources to be copied along when build
+ */
+ "resources": [
+ "resources/images",
+ "resources/icons",
+ "resources/startup"
+ ],
+
+ /**
+ * File / directory name matchers to ignore when copying to the builds, must be valid regular expressions
+ */
+ "ignore": [
+ "\.svn$"
+ ],
+
+ /**
+ * Directory path to store all previous production builds. Note that the content generated inside this directory
+ * must be kept intact for proper generation of deltas between updates
+ */
+ "archivePath": "archive",
+
+ /**
+ * Default paths to build this application to for each environment
+ */
+ "buildPaths": {
+ "testing": "build/testing",
+ "production": "build/production",
+ "package": "build/package",
+ "native": "build/native"
+ },
+
+ /**
+ * Build options
+ */
+ "buildOptions": {
+ "product": "touch",
+ "minVersion": 3,
+ "debug": false,
+ "logger": false
+ },
+
+ /**
+ * Uniquely generated id for this application, used as prefix for localStorage keys.
+ * Normally you should never change this value.
+ */
+ "id": "0ea0d2d0-bde5-4553-81f1-459c59645fb9"
+}
View
25 app/controller/Contacts.js
@@ -1,11 +1,11 @@
/*
* File: app/controller/Contacts.js
*
- * This file was generated by Sencha Architect version 2.0.0.
+ * This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
- * This file requires use of the Sencha Touch 2.0.x library, under independent license.
- * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
+ * This file requires use of the Sencha Touch 2.1.x library, under independent license.
+ * License of Sencha Architect does not include license for Sencha Touch 2.1.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
@@ -15,6 +15,7 @@
Ext.define('Contact.controller.Contacts', {
extend: 'Ext.app.Controller',
+
config: {
stores: [
'ContactStore'
@@ -22,19 +23,19 @@ Ext.define('Contact.controller.Contacts', {
refs: {
contactinfo: {
+ autoCreate: true,
selector: 'contactinfo',
- xtype: 'contactinfo',
- autoCreate: true
+ xtype: 'contactinfo'
},
contactform: {
+ autoCreate: true,
selector: 'contactform',
- xtype: 'contactform',
- autoCreate: true
+ xtype: 'contactform'
},
contactlist: {
+ autoCreate: true,
selector: 'contactlist',
- xtype: 'contactlist',
- autoCreate: true
+ xtype: 'contactlist'
}
},
@@ -90,8 +91,8 @@ Ext.define('Contact.controller.Contacts', {
if (record) {
record.setData(values);
record.commit();
- if (form.referrer.setInfo) {
- form.referrer.setInfo(record);
+ if (form.referrer.setRecord) {
+ form.referrer.setRecord(record);
}
} else {
Ext.StoreManager.lookup('ContactStore').add(values);
@@ -143,7 +144,7 @@ Ext.define('Contact.controller.Contacts', {
var currentForm = Ext.Viewport.getActiveItem();
var record = currentForm.getRecord();
if (record) {
- Ext.Msg.alert('pic', 'setting pic to ' + value);
+ // Ext.Msg.alert('pic', 'setting pic to ' + value);
record.set('picture', value);
record.commit();
currentForm.setRecord(record);
View
11 app/model/Contact.js
@@ -1,11 +1,11 @@
/*
* File: app/model/Contact.js
*
- * This file was generated by Sencha Architect version 2.0.0.
+ * This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
- * This file requires use of the Sencha Touch 2.0.x library, under independent license.
- * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
+ * This file requires use of the Sencha Touch 2.1.x library, under independent license.
+ * License of Sencha Architect does not include license for Sencha Touch 2.1.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
@@ -15,6 +15,7 @@
Ext.define('Contact.model.Contact', {
extend: 'Ext.data.Model',
+
config: {
fields: [
{
@@ -50,8 +51,8 @@ Ext.define('Contact.model.Contact', {
type: 'string'
},
{
- defaultValue: 'resources/img/defaultContactPic.png',
- name: 'picture'
+ name: 'picture',
+ defaultValue: 'resources/img/defaultContactPic.png'
},
{
name: 'isFavorite',
View
7 app/store/ContactStore.js
@@ -1,11 +1,11 @@
/*
* File: app/store/ContactStore.js
*
- * This file was generated by Sencha Architect version 2.0.0.
+ * This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
- * This file requires use of the Sencha Touch 2.0.x library, under independent license.
- * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
+ * This file requires use of the Sencha Touch 2.1.x library, under independent license.
+ * License of Sencha Architect does not include license for Sencha Touch 2.1.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
@@ -15,6 +15,7 @@
Ext.define('Contact.store.ContactStore', {
extend: 'Ext.data.Store',
+
requires: [
'Contact.model.Contact'
],
View
8 app/view/FavoriteView.js
@@ -1,11 +1,11 @@
/*
* File: app/view/FavoriteView.js
*
- * This file was generated by Sencha Architect version 2.0.0.
+ * This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
- * This file requires use of the Sencha Touch 2.0.x library, under independent license.
- * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
+ * This file requires use of the Sencha Touch 2.1.x library, under independent license.
+ * License of Sencha Architect does not include license for Sencha Touch 2.1.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
@@ -18,7 +18,7 @@ Ext.define('Contact.view.FavoriteView', {
alias: 'widget.favoriteview',
config: {
- scrollable: 'horizontal',
+ scrollable: 'vertical',
emptyText: 'No Favorite Contacts',
inline: true,
store: 'ContactStore',
View
7 app/view/Form.js
@@ -1,11 +1,11 @@
/*
* File: app/view/Form.js
*
- * This file was generated by Sencha Architect version 2.0.0.
+ * This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
- * This file requires use of the Sencha Touch 2.0.x library, under independent license.
- * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
+ * This file requires use of the Sencha Touch 2.1.x library, under independent license.
+ * License of Sencha Architect does not include license for Sencha Touch 2.1.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
@@ -16,6 +16,7 @@
Ext.define('Contact.view.Form', {
extend: 'Ext.form.Panel',
alias: 'widget.contactform',
+
requires: [
'Contact.view.Picture'
],
View
17 app/view/Info.js
@@ -1,11 +1,11 @@
/*
* File: app/view/Info.js
*
- * This file was generated by Sencha Architect version 2.0.0.
+ * This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
- * This file requires use of the Sencha Touch 2.0.x library, under independent license.
- * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
+ * This file requires use of the Sencha Touch 2.1.x library, under independent license.
+ * License of Sencha Architect does not include license for Sencha Touch 2.1.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
@@ -16,6 +16,7 @@
Ext.define('Contact.view.Info', {
extend: 'Ext.form.Panel',
alias: 'widget.contactinfo',
+
requires: [
'Contact.view.Picture'
],
@@ -35,9 +36,12 @@ Ext.define('Contact.view.Info', {
},
{
xtype: 'component',
+ flex: 1,
+ cls: [
+ 'contact-name'
+ ],
html: 'First Name Last Name',
- itemId: 'nameTxt',
- flex: 1
+ itemId: 'nameTxt'
},
{
xtype: 'button',
@@ -105,7 +109,8 @@ Ext.define('Contact.view.Info', {
var pressingCls = 'x-button-pressed';
button.element.toggleCls(pressingCls);
var isPressed = button.element.hasCls(pressingCls);
- this.getRecord().set('isFavorite', isPressed);
+ var record = this.getRecord();
+ record.set('isFavorite', isPressed);
},
setRecord: function(record) {
View
7 app/view/List.js
@@ -1,11 +1,11 @@
/*
* File: app/view/List.js
*
- * This file was generated by Sencha Architect version 2.0.0.
+ * This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
- * This file requires use of the Sencha Touch 2.0.x library, under independent license.
- * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
+ * This file requires use of the Sencha Touch 2.1.x library, under independent license.
+ * License of Sencha Architect does not include license for Sencha Touch 2.1.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
@@ -21,7 +21,6 @@ Ext.define('Contact.view.List', {
emptyText: 'No Contacts',
store: 'ContactStore',
disableSelection: true,
- grouped: true,
indexBar: true,
itemTpl: [
'<div>{firstName} {lastName}</div>'
View
8 app/view/Main.js
@@ -1,11 +1,11 @@
/*
* File: app/view/Main.js
*
- * This file was generated by Sencha Architect version 2.0.0.
+ * This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
- * This file requires use of the Sencha Touch 2.0.x library, under independent license.
- * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
+ * This file requires use of the Sencha Touch 2.1.x library, under independent license.
+ * License of Sencha Architect does not include license for Sencha Touch 2.1.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
@@ -15,6 +15,7 @@
Ext.define('Contact.view.Main', {
extend: 'Ext.tab.Panel',
+
requires: [
'Contact.view.List',
'Contact.view.FavoriteView'
@@ -44,6 +45,7 @@ Ext.define('Contact.view.Main', {
items: [
{
xtype: 'button',
+ cls: 'square',
itemId: 'addContactBtn',
ui: 'action',
iconCls: 'add',
View
8 app/view/Picture.js
@@ -1,11 +1,11 @@
/*
* File: app/view/Picture.js
*
- * This file was generated by Sencha Architect version 2.0.0.
+ * This file was generated by Sencha Architect version 2.1.0.
* http://www.sencha.com/products/architect/
*
- * This file requires use of the Sencha Touch 2.0.x library, under independent license.
- * License of Sencha Architect does not include license for Sencha Touch 2.0.x. For more
+ * This file requires use of the Sencha Touch 2.1.x library, under independent license.
+ * License of Sencha Architect does not include license for Sencha Touch 2.1.x. For more
* details see http://www.sencha.com/license or contact license@sencha.com.
*
* This file will be auto-generated each and everytime you save your project.
@@ -18,6 +18,7 @@ Ext.define('Contact.view.Picture', {
alias: 'widget.contactpic',
config: {
+ overflow: 'hidden',
height: 120,
minHeight: 100,
style: 'overflow: hidden',
@@ -26,7 +27,6 @@ Ext.define('Contact.view.Picture', {
align: 'center',
type: 'vbox'
},
- overflow: 'hidden',
tpl: [
'<img src="{picture}" width="160" />'
],
View
32 build.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project name="@@@" default=".help">
+ <import file="${basedir}/.sencha/app/build-impl.xml"/>
+
+ <!--
+ The following targets can be provided to inject logic before and/or after key steps
+ of the build process:
+
+ The "init-local" target is used to initialize properties that may be personalized
+ for the local machine.
+
+ <target name="-before-init-local"/>
+ <target name="-after-init-local"/>
+
+ The "clean" target is used to clean build output from the build.dir.
+
+ <target name="-before-clean"/>
+ <target name="-after-clean"/>
+
+ The general "init" target is used to initialize all other properties, including
+ those provided by Sencha Cmd.
+
+ <target name="-before-init"/>
+ <target name="-after-init"/>
+
+ The "build" target performs the call to Sencha Cmd to build the application.
+
+ <target name="-before-build"/>
+ <target name="-after-build"/>
+ -->
+
+</project>
View
50 device/Contacts.js
@@ -0,0 +1,50 @@
+/**
+ * This device API allows you to access a users contacts using a {@link Ext.data.Store}. This allows you to search, filter
+ * and sort through all the contacts using its methods.
+ *
+ * To use this API, all you need to do is require this class (`Ext.device.Contacts`) and then use `Ext.device.Contacts.getContacts()`
+ * to retrieve an array of contacts.
+ *
+ * **Please note that this will *only* work using the Sencha Native Packager.**
+ *
+ * # Example
+ *
+ * Ext.application({
+ * name: 'Sencha',
+ * requires: 'Ext.device.Contacts',
+ *
+ * launch: function() {
+ * Ext.Viewport.add({
+ * xtype: 'list',
+ * itemTpl: '{First} {Last}',
+ * store: {
+ * fields: ['First', 'Last'],
+ * data: Ext.device.Contacts.getContacts()
+ * }
+ * });
+ * }
+ * });
+ *
+ * @mixins Ext.device.contacts.Abstract
+ * @mixins Ext.device.contacts.Sencha
+ *
+ * @aside guide native_apis
+ */
+Ext.define('Ext.device.Contacts', {
+ singleton: true,
+
+ requires: [
+ 'Ext.device.Communicator',
+ 'Ext.device.contacts.Sencha'
+ ],
+
+ constructor: function() {
+ var browserEnv = Ext.browser.is;
+
+ if (browserEnv.WebView && !browserEnv.PhoneGap) {
+ return Ext.create('Ext.device.contacts.Sencha');
+ } else {
+ return Ext.create('Ext.device.contacts.Abstract');
+ }
+ }
+});
View
63 device/Device.js
@@ -2,9 +2,70 @@
* Provides a cross device way to get information about the device your application is running on. There are 3 different implementations:
*
* - Sencha Packager
- * - (PhoneGap)[http://docs.phonegap.com/en/1.4.1/phonegap_device_device.md.html]
+ * - [PhoneGap](http://docs.phonegap.com/en/1.4.1/phonegap_device_device.md.html)
* - Simulator
*
+ * ## Examples
+ *
+ * #### Device Information
+ *
+ * Getting the device information:
+ *
+ * Ext.application({
+ * name: 'Sencha',
+ *
+ * // Remember that the Ext.device.Device class *must* be required
+ * requires: ['Ext.device.Device'],
+ *
+ * launch: function() {
+ * alert([
+ * 'Device name: ' + Ext.device.Device.name,
+ * 'Device platform: ' + Ext.device.Device.platform,
+ * 'Device UUID: ' + Ext.device.Device.uuid
+ * ].join('\n'));
+ * }
+ * });
+ *
+ * ### Custom Scheme URLs
+ *
+ * Using custom scheme URLs to application your application from other applications:
+ *
+ * Ext.application({
+ * name: 'Sencha',
+ * requires: ['Ext.device.Device'],
+ * launch: function() {
+ * if (Ext.device.Device.scheme) {
+ * // the application was opened via another application. Do something:
+ * alert('Applicaton pened via another application: ' + Ext.device.Device.scheme.url);
+ * }
+ *
+ * // Listen for future changes
+ * Ext.device.Device.on('schemeupdate', function(device, scheme) {
+ * // the application was launched, closed, and then launched another from another application
+ * // this means onReady wont be called again ('cause the application is already running in the
+ * // background) - but this event will be fired
+ * alert('Applicated reopened via another application: ' + scheme.url);
+ * }, this);
+ * }
+ * });
+ *
+ * Of course, you must add add the custom URLs you would like to use when packaging your application. You can do this by adding
+ * the following code into the `rawConfig` property inside your `package.json` file (Sencha Native Packager configuration file):
+ *
+ * {
+ * ...
+ * "rawConfig": "<key>CFBundleURLTypes</key><array><dict><key>CFBundleURLSchemes</key><array><string>sencha</string></array><key>CFBundleURLName</key><string>com.sencha.example</string></dict></array>"
+ * ...
+ * }
+ *
+ * You can change the available URL schemes and the application identifier above.
+ *
+ * You can then test it by packaging and installing the application onto a device/iOS Simulator, opening Safari and typing: `sencha:testing`.
+ * The application will launch and it will `alert` the URL you specified.
+ *
+ * **PLEASE NOTE: This currently only works with the Sencha Native Packager. If you attempt to listen to this event when packaged with
+ * PhoneGap or simply in the browser, it will not function.**
+ *
* @mixins Ext.device.device.Abstract
*
* @aside guide native_apis
View
16 device/Geolocation.js
@@ -41,7 +41,6 @@ Ext.define('Ext.device.Geolocation', {
requires: [
'Ext.device.Communicator',
- // 'Ext.device.geolocation.PhoneGap',
'Ext.device.geolocation.Sencha',
'Ext.device.geolocation.Simulator'
],
@@ -49,12 +48,15 @@ Ext.define('Ext.device.Geolocation', {
constructor: function() {
var browserEnv = Ext.browser.is;
- if (browserEnv.WebView) {
- if (browserEnv.PhoneGap) {
- return Ext.create('Ext.device.geolocation.PhoneGap');
- }
- else {
- return Ext.create('Ext.device.geolocation.Sencha');
+ if (browserEnv.WebView && browserEnv.Sencha) {
+ return Ext.create('Ext.device.geolocation.Sencha');
+ }
+ else {
+ return Ext.create('Ext.device.geolocation.Simulator');
+ }
+ }
+});
+ return Ext.create('Ext.device.geolocation.Sencha');
}
}
else {
View
10 device/Notification.js
@@ -1,5 +1,5 @@
/**
- * Provides a cross device way to show notifications. There are 3 different implementations:
+ * Provides a cross device way to show notifications. There are three different implementations:
*
* - Sencha Packager
* - PhoneGap
@@ -16,18 +16,18 @@
*
* Ext.device.Notification.show({
* title: 'Verification',
- * message: 'Is your email address is: test@sencha.com',
+ * message: 'Is your email address: test@sencha.com',
* buttons: Ext.MessageBox.OKCANCEL,
* callback: function(button) {
- * if (button == "ok") {
+ * if (button === "ok") {
* console.log('Verified');
* } else {
- * console.log('Nope.');
+ * console.log('Nope');
* }
* }
* });
*
- * To make the device virbate:
+ * To make the device vibrate:
*
* Ext.device.Notification.vibrate();
*
View
18 device/Purchases.js
@@ -0,0 +1,18 @@
+/**
+ *
+ *
+ * @mixins Ext.device.purchases.Sencha
+ *
+ * @aside guide native_apis
+ */
+Ext.define('Ext.device.Purchases', {
+ singleton: true,
+
+ requires: [
+ 'Ext.device.purchases.Sencha'
+ ],
+
+ constructor: function() {
+ return Ext.create('Ext.device.purchases.Sencha');
+ }
+});
View
49 device/Push.js
@@ -0,0 +1,49 @@
+/**
+ * Provides a way to send push notifications to a device. Currently only available on iOS.
+ *
+ * # Example
+ *
+ * Ext.device.Push.register({
+ * type: Ext.device.Push.ALERT|Ext.device.Push.BADGE|Ext.device.Push.SOUND,
+ * success: function(token) {
+ * console.log('# Push notification registration successful:');
+ * console.log(' token: ' + token);
+ * },
+ * failure: function(error) {
+ * console.log('# Push notification registration unsuccessful:');
+ * console.log(' error: ' + error);
+ * },
+ * received: function(notifications) {
+ * console.log('# Push notification received:');
+ * console.log(' ' + JSON.stringify(notifications));
+ * }
+ * });
+ *
+ * @mixins Ext.device.push.Abstract
+ *
+ * @aside guide native_apis
+ */
+Ext.define('Ext.device.Push', {
+ singleton: true,
+
+ requires: [
+ 'Ext.device.Communicator',
+ 'Ext.device.push.Sencha'
+ ],
+
+ constructor: function() {
+ var browserEnv = Ext.browser.is;
+
+ if (browserEnv.WebView) {
+ if (!browserEnv.PhoneGap) {
+ return Ext.create('Ext.device.push.Sencha');
+ }
+ else {
+ return Ext.create('Ext.device.push.Abstract');
+ }
+ }
+ else {
+ return Ext.create('Ext.device.push.Abstract');
+ }
+ }
+});
View
45 device/communicator/Default.js
@@ -14,7 +14,7 @@
* // Do something with the base64-encoded `dataUri` string
* },
* function(errorMessage) {
- *
+ *
* },
* callbackScope,
* {
@@ -23,41 +23,45 @@
* height: 500
* }
* );
- *
+ *
* Internally, `Ext.device.Communicator.send()` will then be invoked with the following argument:
- *
+ *
* Ext.device.Communicator.send({
* command: 'Camera#capture',
* callbacks: {
- * onSuccess: function() { ... },
- * onError: function() { ... },
+ * onSuccess: function() {
+ * // ...
+ * },
+ * onError: function() {
+ * // ...
+ * }
* },
* scope: callbackScope,
* quality: 75,
* width: 500,
* height: 500
* });
- *
+ *
* Which will then be transformed into a HTTP GET request, sent to native shell's local
* HTTP server with the following parameters:
- *
+ *
* ?quality=75&width=500&height=500&command=Camera%23capture&onSuccess=3&onError=5
- *
+ *
* Notice that `onSuccess` and `onError` have been converted into string ids (`3` and `5`
* respectively) and maintained by `Ext.device.Communicator`.
- *
+ *
* Whenever the requested operation finishes, `Ext.device.Communicator.invoke()` simply needs
* to be executed from the native shell with the corresponding ids given before. For example:
- *
+ *
* Ext.device.Communicator.invoke('3', ['DATA_URI_OF_THE_CAPTURED_IMAGE_HERE']);
- *
+ *
* will invoke the original `onSuccess` callback under the given scope. (`callbackScope`), with
* the first argument of 'DATA_URI_OF_THE_CAPTURED_IMAGE_HERE'
- *
+ *
* Note that `Ext.device.Communicator` maintains the uniqueness of each function callback and
* its scope object. If subsequent calls to `Ext.device.Communicator.send()` have the same
* callback references, the same old ids will simply be reused, which guarantee the best possible
- * performance for a large amount of repeative calls.
+ * performance for a large amount of repetitive calls.
*/
Ext.define('Ext.device.communicator.Default', {
@@ -160,8 +164,19 @@ Ext.define('Ext.device.communicator.Default', {
doSend: function(args) {
var xhr = new XMLHttpRequest();
- xhr.open('GET', this.SERVER_URL + '?' + Ext.Object.toQueryString(args), false);
- xhr.send(null);
+ xhr.open('GET', this.SERVER_URL + '?' + Ext.Object.toQueryString(args) + '&_dc=' + new Date().getTime(), false);
+
+ // wrap the request in a try/catch block so we can check if any errors are thrown and attempt to call any
+ // failure/callback functions if defined
+ try {
+ xhr.send(null);
+ } catch(e) {
+ if (args.failure) {
+ this.invoke(args.failure);
+ } else if (args.callback) {
+ this.invoke(args.callback);
+ }
+ }
}
});
View
59 device/contacts/Abstract.js
@@ -0,0 +1,59 @@
+/**
+ * @private
+ */
+Ext.define('Ext.device.contacts.Abstract', {
+ extend: 'Ext.Evented',
+
+ config: {
+ /**
+ * @cfg {Boolean} includeImages
+ * True to include images when you get the contacts store. Please beware that this can be very slow.
+ */
+ includeImages: false
+ },
+
+ /**
+ * Returns an Array of contact objects.
+ * @return {Object[]} An array of contact objects.
+ */
+ getContacts: function(config) {
+ if (!this._store) {
+ this._store = [
+ {
+ first: 'Robert',
+ last: 'Dougan',
+ emails: {
+ work: 'rob@sencha.com'
+ }
+ },
+ {
+ first: 'Jamie',
+ last: 'Avins',
+ emails: {
+ work: 'jamie@sencha.com'
+ }
+ }
+ ];
+ }
+
+ config.success.call(config.scope || this, this._store);
+ },
+
+ /**
+ * Returns base64 encoded image thumbnail for a contact specified in config.id
+ * @return {String} base64 string
+ */
+
+ getThumbnail: function(config) {
+ config.callback.call(config.scope || this, "");
+ },
+
+
+ /**
+ * Returns localized, user readable label for a contact field (i.e. "Mobile", "Home")
+ * @return {String} user readable string
+ */
+ getLocalizedLabel: function(config) {
+ config.callback.call(config.scope || this, config.label.toUpperCase(), config.label);
+ }
+});
View
89 device/contacts/Sencha.js
@@ -0,0 +1,89 @@
+/**
+ * @private
+ */
+Ext.define('Ext.device.contacts.Sencha', {
+ extend: 'Ext.device.contacts.Abstract',
+
+ getContacts: function(config) {
+ var includeImages = this.getIncludeImages();
+ if (typeof config.includeImages != "undefined") {
+ includeImages = config.includeImages;
+ }
+
+ if (!config) {
+ Ext.Logger.warn('Ext.device.Contacts#getContacts: You must specify a `config` object.');
+ return false;
+ }
+
+ if (!config.success) {
+ Ext.Logger.warn('Ext.device.Contacts#getContacts: You must specify a `success` method.');
+ return false;
+ }
+
+ Ext.device.Communicator.send({
+ command: 'Contacts#all',
+ callbacks: {
+ success: function(contacts) {
+ config.success.call(config.scope || this, contacts);
+ },
+ failure: function() {
+ if (config.failure) {
+ config.failure.call(config.scope || this);
+ }
+ }
+ },
+ includeImages: includeImages,
+ scope: this
+ });
+ },
+
+ getThumbnail: function(config) {
+ if (!config || typeof config.id == "undefined") {
+ Ext.Logger.warn('Ext.device.Contacts#getThumbnail: You must specify an `id` of the contact.');
+ return false;
+ }
+
+ if (!config || !config.callback) {
+ Ext.Logger.warn('Ext.device.Contacts#getThumbnail: You must specify a `callback`.');
+ return false;
+ }
+
+ Ext.device.Communicator.send({
+ command: 'Contacts#getThumbnail',
+ callbacks: {
+ success: function(src) {
+ this.set('thumbnail', src);
+
+ if (config.callback) {
+ config.callback.call(config.scope || this, this);
+ }
+ }
+ },
+ id: id,
+ scope: this
+ });
+ },
+
+ getLocalizedLabel: function(config) {
+ if (!config || typeof config.label == "undefined") {
+ Ext.Logger.warn('Ext.device.Contacts#getLocalizedLabel: You must specify an `label` to be localized.');
+ return false;
+ }
+
+ if (!config || !config.callback) {
+ Ext.Logger.warn('Ext.device.Contacts#getLocalizedLabel: You must specify a `callback`.');
+ return false;
+ }
+
+ Ext.device.Communicator.send({
+ command: 'Contacts#getLocalizedLabel',
+ callbacks: {
+ callback: function(label) {
+ config.callback.call(config.scope || this, label, config.label);
+ }
+ },
+ label: config.label,
+ scope: this
+ });
+ }
+});
View
84 device/device/Abstract.js
@@ -2,10 +2,52 @@
* @private
*/
Ext.define('Ext.device.device.Abstract', {
+ extend: 'Ext.EventedBase',
+
+ /**
+ * @event schemeupdate
+ * Event which is fired when your Sencha Native packaged application is opened from another application using a custom URL scheme.
+ *
+ * This event will only fire if the application was already open (in other words; `onReady` was already fired). This means you should check
+ * if {@link Ext.device.Device#scheme} is set in your Application `launch`/`onReady` method, and perform any needed changes for that URL (if defined).
+ * Then listen to this event for future changed.
+ *
+ * ## Example
+ *
+ * Ext.application({
+ * name: 'Sencha',
+ * requires: ['Ext.device.Device'],
+ * launch: function() {
+ * if (Ext.device.Device.scheme) {
+ * // the application was opened via another application. Do something:
+ * console.log('Applicaton opened via another application: ' + Ext.device.Device.scheme.url);
+ * }
+ *
+ * // Listen for future changes
+ * Ext.device.Device.on('schemeupdate', function(device, scheme) {
+ * // the application was launched, closed, and then launched another from another application
+ * // this means onReady wont be called again ('cause the application is already running in the
+ * // background) - but this event will be fired
+ * console.log('Applicated reopened via another application: ' + scheme.url);
+ * }, this);
+ * }
+ * });
+ *
+ * __Note:__ This currently only works with the Sencha Native Packager. If you attempt to listen to this event when packaged with
+ * PhoneGap or simply in the browser, it will never fire.**
+ *
+ * @param {Ext.device.Device} this The instance of Ext.device.Device
+ * @param {Object/Boolean} scheme The scheme information, if opened via another application
+ * @param {String} scheme.url The URL that was opened, if this application was opened via another application. Example: `sencha:`
+ * @param {String} scheme.sourceApplication The source application that opened this application. Example: `com.apple.safari`.
+ */
+
/**
* @property {String} name
* Returns the name of the current device. If the current device does not have a name (for example, in a browser), it will
- * default to `Not available`.
+ * default to `not available`.
+ *
+ * alert('Device name: ' + Ext.device.Device.name);
*/
name: 'not available',
@@ -13,12 +55,50 @@ Ext.define('Ext.device.device.Abstract', {
* @property {String} uuid
* Returns a unique identifier for the current device. If the current device does not have a unique identifier (for example,
* in a browser), it will default to `anonymous`.
+ *
+ * alert('Device UUID: ' + Ext.device.Device.uuid);
*/
uuid: 'anonymous',
/**
* @property {String} platform
* The current platform the device is running on.
+ *
+ * alert('Device platform: ' + Ext.device.Device.platform);
+ */
+ platform: Ext.os.name,
+
+ /**
+ * @property {Object/Boolean} scheme
+ *
+ */
+ scheme: false,
+
+ /**
+ * Opens a specified URL. The URL can contain a custom URL Scheme for another app or service:
+ *
+ * // Safari
+ * Ext.device.Device.openURL('http://sencha.com');
+ *
+ * // Telephone
+ * Ext.device.Device.openURL('tel:6501231234');
+ *
+ * // SMS with a default number
+ * Ext.device.Device.openURL('sms:+12345678901');
+ *
+ * // Email client
+ * Ext.device.Device.openURL('mailto:rob@sencha.com');
+ *
+ * You can find a full list of available URL schemes here: [http://wiki.akosma.com/IPhone_URL_Schemes](http://wiki.akosma.com/IPhone_URL_Schemes).
+ *
+ * __Note:__ This currently only works on iOS using the Sencha Native Packager. Attempting to use this on PhoneGap, iOS Simulator
+ * or the browser will simply result in the current window location changing.**
+ *
+ * If successful, this will close the application (as another one opens).
+ *
+ * @param {String} url The URL to open
*/
- platform: Ext.os.name
+ openURL: function(url) {
+ window.location = url;
+ }
});
View
9 device/device/PhoneGap.js
@@ -5,6 +5,15 @@ Ext.define('Ext.device.device.PhoneGap', {
extend: 'Ext.device.device.Abstract',
constructor: function() {
+ // We can't get the device details until the device is ready, so lets wait.
+ if (Ext.Viewport.isReady) {
+ this.onReady();
+ } else {
+ Ext.Viewport.on('ready', this.onReady, this, {single: true});
+ }
+ },
+
+ onReady: function() {
this.name = device.name;
this.uuid = device.uuid;
this.platform = device.platformName || Ext.os.name;
View
30 device/device/Sencha.js
@@ -8,5 +8,35 @@ Ext.define('Ext.device.device.Sencha', {
this.name = device.name;
this.uuid = device.uuid;
this.platform = device.platformName || Ext.os.name;
+
+ this.initURL();
+ },
+
+ openURL: function(url) {
+ Ext.device.Communicator.send({
+ command: 'OpenURL#open',
+ url: url
+ });
+ },
+
+ /**
+ * @private
+ */
+ initURL: function() {
+ Ext.device.Communicator.send({
+ command: "OpenURL#watch",
+ callbacks: {
+ callback: this.updateURL
+ },
+ scope: this
+ });
+ },
+
+ /**
+ * @private
+ */
+ updateURL: function() {
+ this.scheme = device.scheme || false;
+ this.fireEvent('schemeupdate', this, this.scheme);
}
});
View
2  device/geolocation/Abstract.js
@@ -137,5 +137,5 @@ Ext.define('Ext.device.geolocation.Abstract', {
/**
* If you are currently watching for the current position, this will stop that task.
*/
- clearWatch: Ext.emptyFn
+ clearWatch: function() {}
});
View
8 device/geolocation/Sencha.js
@@ -51,10 +51,8 @@ Ext.define('Ext.device.geolocation.Sencha', {
},
clearWatch: function() {
- if (this.geolocation) {
- this.geolocation.destroy();
- }
-
- this.geolocation = null;
+ Ext.device.Communicator.send({
+ command: 'Geolocation#clearWatch'
+ });
}
});
View
23 device/notification/PhoneGap.js
@@ -10,15 +10,28 @@ Ext.define('Ext.device.notification.PhoneGap', {
buttons = (config.buttons) ? config.buttons.join(',') : null,
onShowCallback = function(index) {
if (config.callback) {
- config.callback.apply(config.scope, (config.buttons) ? [config.buttons[index - 1]] : []);
+ config.callback.apply(config.scope, (config.buttons) ? [config.buttons[index - 1]].toLowerCase() : []);
}
};
+ // change Ext.MessageBox buttons into normal arrays
+ var ln = butons.length;
+ if (ln && typeof buttons[0] != "string") {
+ var newButtons = [],
+ i;
+
+ for (i = 0; i < ln; i++) {
+ newButtons.push(buttons[i].text);
+ }
+
+ buttons = newButtons;
+ }
+
navigator.notification.confirm(
- config.message,
- onShowCallback,
- config.title,
- buttons
+ config.message, // message
+ onShowCallback, // callback
+ config.title, // title
+ buttons // array of button names
);
},
View
302 device/purchases/Sencha.js
@@ -0,0 +1,302 @@
+/**
+ * @private
+ */
+Ext.define('Ext.device.purchases.Sencha', {
+ /**
+ * Checks if the current user is able to make payments.
+ *
+ * ## Example
+ *
+ * Ext.device.Purchases.canMakePayments({
+ * success: function() {
+ * console.log('Yup! :)');
+ * },
+ * failure: function() {
+ * console.log('Nope! :(');
+ * }
+ * });
+ *
+ * @param {Object} config
+ * @param {Function} config.success
+ * @param {Function} config.failure
+ * @param {Object} config.scope
+ */
+ canMakePayments: function(config) {
+ if (!config.success) {
+ Ext.Logger.error('You must specify a `success` callback for `#canMakePayments` to work.');
+ return false;
+ }
+
+ if (!config.failure) {
+ Ext.Logger.error('You must specify a `failure` callback for `#canMakePayments` to work.');
+ return false;
+ }
+
+ Ext.device.Communicator.send({
+ command: 'Purchase#canMakePayments',
+ callbacks: {
+ success: config.success,
+ failure: config.failure
+ },
+ scope: config.scope || this
+ });
+ },
+
+ /**
+ * Returns a {@link Ext.data.Store} instance of all the available products.
+ *
+ * ## Example
+ *
+ * Ext.device.Purchases.getProducts({
+ * success: function(store) {
+ * console.log('Got the store! You have ' + store.getCount() + ' products.');
+ * },
+ * failure: function() {
+ * console.log('Oops. Looks like something went wrong.');
+ * }
+ * });
+ *
+ * @param {Object} config
+ * @param {Function} config.success
+ * @param {Ext.data.Store} config.success.store A store of products available to purchase.
+ * @param {Function} config.failure
+ * @param {Object} config.scope
+ */
+ getProducts: function(config) {
+ if (!config.success) {
+ Ext.Logger.error('You must specify a `success` callback for `#getProducts` to work.');
+ return false;
+ }
+
+ if (!config.failure) {
+ Ext.Logger.error('You must specify a `failure` callback for `#getProducts` to work.');
+ return false;
+ }
+
+ Ext.device.Communicator.send({
+ command: 'Purchase#getProducts',
+ callbacks: {
+ success: function(products) {
+ var store = Ext.create('Ext.data.Store', {
+ model: 'Ext.device.Purchases.Product',
+ data: products
+ });
+
+ config.success.call(config.scope || this, store);
+ },
+ failure: config.failure
+ },
+ scope: config.scope || this
+ });
+ },
+
+ /**
+ * Returns all purchases ever made by this user.
+ * @param {Object} config
+ * @param {Function} config.success
+ * @param {Array[]} config.success.purchases
+ * @param {Function} config.failure
+ * @param {Object} config.scope
+ */
+ getPurchases: function(config) {
+ if (!config.success) {
+ Ext.Logger.error('You must specify a `success` callback for `#getPurchases` to work.');
+ return false;
+ }
+
+ if (!config.failure) {
+ Ext.Logger.error('You must specify a `failure` callback for `#getPurchases` to work.');
+ return false;
+ }
+
+ Ext.device.Communicator.send({
+ command: 'Purchase#getPurchases',
+ callbacks: {
+ success: function(purchases) {
+ var array = [],
+ ln = purchases.length,
+ i;
+
+ for (i = 0; i < ln; i++) {
+ array.push({
+ productIdentifier: purchases[i]
+ });
+ }
+
+ var store = Ext.create('Ext.data.Store', {
+ model: 'Ext.device.Purchases.Purchase',
+ data: array
+ });
+
+ config.success.call(config.scope || this, store);
+ },
+ failure: function() {
+ config.failure.call(config.scope || this);
+ }
+ },
+ scope: config.scope || this
+ });
+ },
+
+ /**
+ * Returns all purchases that are currently pending.
+ * @param {Object} config
+ * @param {Function} config.success
+ * @param {Ext.data.Store} config.success.purchases
+ * @param {Function} config.failure
+ * @param {Object} config.scope
+ */
+ getPendingPurchases: function(config) {
+ if (!config.success) {
+ Ext.Logger.error('You must specify a `success` callback for `#getPendingPurchases` to work.');
+ return false;
+ }
+
+ if (!config.failure) {
+ Ext.Logger.error('You must specify a `failure` callback for `#getPendingPurchases` to work.');
+ return false;
+ }
+
+ Ext.device.Communicator.send({
+ command: 'Purchase#getPendingPurchases',
+ callbacks: {
+ success: function(purchases) {
+ var array = [],
+ ln = purchases.length,
+ i;
+
+ for (i = 0; i < ln; i++) {
+ array.push({
+ productIdentifier: purchases[i],
+ state: 'pending'
+ });
+ }
+
+ var store = Ext.create('Ext.data.Store', {
+ model: 'Ext.device.Purchases.Purchase',
+ data: array
+ });
+
+ config.success.call(config.scope || this, store);
+ },
+ failure: function() {
+ config.failure.call(config.scope || this);
+ }
+ },
+ scope: config.scope || this
+ });
+ }
+}, function() {
+ /**
+ * The product model class which is uses when fetching available products using {@link Ext.device.Purchases#getProducts}.
+ */
+ Ext.define('Ext.device.Purchases.Product', {
+ extend: 'Ext.data.Model',
+
+ config: {
+ fields: [
+ 'localizeTitle',
+ 'price',
+ 'priceLocale',
+ 'localizedDescription',
+ 'productIdentifier'
+ ]
+ },
+
+ /**
+ * Will attempt to purchase this product.
+ *
+ * ## Example
+ *
+ * product.purchase({
+ * success: function() {
+ * console.log(product.get('title') + ' purchased!');
+ * },
+ * failure: function() {
+ * console.log('Something went wrong while trying to purchase ' + product.get('title'));
+ * }
+ * });
+ *
+ * @param {Object} config
+ * @param {Ext.data.Model/String} config.product
+ * @param {Function} config.success
+ * @param {Function} config.failure
+ */
+ purchase: function(config) {
+ if (!config.success) {
+ Ext.Logger.error('You must specify a `success` callback for `#product` to work.');
+ return false;
+ }
+
+ if (!config.failure) {
+ Ext.Logger.error('You must specify a `failure` callback for `#product` to work.');
+ return false;
+ }
+
+ Ext.device.Communicator.send({
+ command: 'Purchase#purchase',
+ callbacks: {
+ success: config.success,
+ failure: config.failure
+ },
+ identifier: this.get('productIdentifier'),
+ scope: config.scope || this
+ });
+ }
+ });
+
+ /**
+ *
+ */
+ Ext.define('Ext.device.Purchases.Purchase', {
+ extend: 'Ext.data.Model',
+
+ config: {
+ fields: [
+ 'productIdentifier',
+ 'state'
+ ]
+ },
+
+ /**
+ * Attempts to mark this purchase as complete
+ * @param {Object} config
+ * @param {Function} config.success
+ * @param {Function} config.failure
+ * @param {Object} config.scope
+ */
+ complete: function(config) {
+ var me = this;
+
+ if (!config.success) {
+ Ext.Logger.error('You must specify a `success` callback for `#complete` to work.');
+ return false;
+ }
+
+ if (!config.failure) {
+ Ext.Logger.error('You must specify a `failure` callback for `#complete` to work.');
+ return false;
+ }
+
+ if (this.get('state') != "pending") {
+ config.failure.call(config.scope || this, "purchase is not pending");
+ }
+
+ Ext.device.Communicator.send({
+ command: 'Purchase#completePurchase',
+ identifier: me.get('productIdentifier'),
+ callbacks: {
+ success: function() {
+ me.set('state', 'complete');
+ config.success.call(config.scope || this);
+ },
+ failure: function() {
+ me.set('state', 'pending');
+ config.failure.call(config.scope || this);
+ }
+ },
+ scope: config.scope || this
+ });
+ }
+ });
+});
View
138 device/push/Abstract.js
@@ -0,0 +1,138 @@
+/**
+ * @private
+ */
+Ext.define('Ext.device.push.Abstract', {
+ /**
+ * @property
+ * Notification type: alert.
+ */
+ ALERT: 1,
+ /**
+ * @property
+ * Notification type: badge.
+ */
+ BADGE: 2,
+ /**
+ * @property
+ * Notification type: sound.
+ */
+ SOUND: 4,
+
+ /**
+ * @method getInitialConfig
+ * @hide
+ */
+
+ /**
+ * Registers a push notification.
+ *