Permalink
Browse files

big refactor for form factor support, and platform-specific images

  • Loading branch information...
1 parent ce47977 commit 4caac135850fe04ff3956a67661f533bee6bfff7 @kwhinnery kwhinnery committed Sep 18, 2012
Showing with 999 additions and 1,672 deletions.
  1. 0 Resources/.gitignore
  2. BIN app/assets/android/Default.png
  3. BIN app/assets/android/default.png
  4. BIN app/assets/android/images/res-long-land-hdpi/Icon.png
  5. BIN app/assets/android/images/res-long-land-hdpi/default.png
  6. BIN app/assets/android/images/res-long-port-hdpi/Icon.png
  7. BIN app/assets/android/images/res-long-port-hdpi/default.png
  8. BIN app/assets/android/images/res-notlong-land-hdpi/Icon.png
  9. BIN app/assets/android/images/res-notlong-land-hdpi/default.png
  10. BIN app/assets/android/images/res-notlong-land-ldpi/default.png
  11. BIN app/assets/android/images/res-notlong-land-mdpi/Icon.png
  12. BIN app/assets/android/images/res-notlong-land-mdpi/default.png
  13. BIN app/assets/android/images/res-notlong-port-hdpi/Icon.png
  14. BIN app/assets/android/images/res-notlong-port-hdpi/default.png
  15. BIN app/assets/android/images/res-notlong-port-ldpi/default.png
  16. BIN app/assets/android/images/res-notlong-port-mdpi/Icon.png
  17. BIN app/assets/android/images/res-notlong-port-mdpi/default.png
  18. BIN app/assets/android/img/general/bg-cloud.png
  19. BIN app/assets/android/img/general/bg-clouds-tablet.png
  20. BIN app/assets/android/img/general/bg-interior.png
  21. BIN app/assets/android/img/general/btn-back.png
  22. BIN app/assets/android/img/general/codestrong-bar-logo.png
  23. BIN app/assets/android/img/general/form-bg.png
  24. BIN app/assets/android/img/general/logo-cs-rocket.png
  25. BIN app/assets/android/img/header/btn-profile.png
  26. BIN app/assets/android/img/header/btn-refresh.png
  27. BIN app/assets/android/img/login/btn-create-default.png
  28. BIN app/assets/android/img/login/btn-create-pressed.png
  29. BIN app/assets/android/img/login/btn-login-default.png
  30. BIN app/assets/android/img/login/btn-login-pressed.png
  31. BIN app/assets/android/img/tabs/bg-tab-button.png
  32. BIN app/assets/android/img/tabs/bg-tab.png
  33. BIN app/assets/android/img/tabs/btn-agenda-default.png
  34. BIN app/assets/android/img/tabs/btn-agenda-pressed.png
  35. BIN app/assets/android/img/tabs/btn-home-default.png
  36. BIN app/assets/android/img/tabs/btn-home-pressed.png
  37. BIN app/assets/android/img/tabs/btn-speakers-default.png
  38. BIN app/assets/android/img/tabs/btn-speakers-pressed.png
  39. BIN app/assets/android/img/tabs/btn-stream-default.png
  40. BIN app/assets/android/img/tabs/btn-stream-pressed.png
  41. BIN app/assets/android/img/tabs/btn-venue-default.png
  42. BIN app/assets/android/img/tabs/btn-venue-pressed.png
  43. BIN app/assets/android/img/tabs/tab-yellow-long.png
  44. BIN app/assets/android/img/tabs/tab-yellow-short.png
  45. BIN app/assets/fonts/Quicksand-Bold.ttf
  46. BIN app/assets/fonts/Quicksand-Light.ttf
  47. BIN app/assets/fonts/Quicksand-Regular.ttf
  48. BIN app/assets/img/boxloader/bg.png
  49. BIN app/assets/img/boxloader/bg@2x.png
  50. BIN app/assets/img/boxloader/wash.png
  51. BIN app/assets/img/boxloader/wash@2x.png
  52. BIN app/assets/img/directory/user-bg.png
  53. BIN app/assets/img/directory/user-bg@2x.png
  54. BIN app/assets/img/header/about-btn.png
  55. BIN app/assets/img/header/about-btn@2x.png
  56. BIN app/assets/img/header/header-bg.png
  57. BIN app/assets/img/header/header-bg@2x.png
  58. BIN app/assets/img/header/refresh-btn.png
  59. BIN app/assets/img/header/refresh-btn@2x.png
  60. BIN app/assets/img/header/roar-logo-small.png
  61. BIN app/assets/img/header/roar-logo-small@2x.png
  62. BIN app/assets/img/loader/be-heard-header.png
  63. BIN app/assets/img/loader/be-heard-header@2x.png
  64. BIN app/assets/img/loader/roar-logo-large.png
  65. BIN app/assets/img/loader/roar-logo-large@2x.png
  66. BIN app/assets/img/loader/roar-splash.png
  67. BIN app/assets/img/loader/roar-splash@2x.png
  68. BIN app/assets/img/login/create-btn.png
  69. BIN app/assets/img/login/create-btn@2x.png
  70. BIN app/assets/img/login/input-bg.png
  71. BIN app/assets/img/login/input-bg@2x.png
  72. BIN app/assets/img/login/login-btn.png
  73. BIN app/assets/img/login/login-btn@2x.png
  74. BIN app/assets/img/nav/broadcast-btn.png
  75. BIN app/assets/img/nav/broadcast-btn@2x.png
  76. BIN app/assets/img/nav/directory-btn.png
  77. BIN app/assets/img/nav/directory-btn@2x.png
  78. BIN app/assets/img/nav/home-btn.png
  79. BIN app/assets/img/nav/home-btn@2x.png
  80. BIN app/assets/img/nav/nav-bg.png
  81. BIN app/assets/img/nav/nav-bg@2x.png
  82. BIN app/assets/img/nav/notifications-btn.png
  83. BIN app/assets/img/nav/notifications-btn@2x.png
  84. BIN app/assets/img/nav/profile-btn.png
  85. BIN app/assets/img/nav/profile-btn@2x.png
  86. BIN app/assets/img/notifications/no-notifications.png
  87. BIN app/assets/img/notifications/no-notifications@2x.png
  88. BIN app/assets/img/profile/user-bg.png
  89. BIN app/assets/img/profile/user-bg@2x.png
  90. BIN app/assets/img/roar/comment-count-bg.png
  91. BIN app/assets/img/roar/comment-count-bg@2x.png
  92. BIN app/assets/img/roar/fav-count-bg.png
  93. BIN app/assets/img/roar/fav-count-bg@2x.png
  94. BIN app/assets/img/roar/post-roar-bg.png
  95. BIN app/assets/img/roar/post-roar-bg@2x.png
  96. BIN app/assets/img/roar/post-roar-btn.png
  97. BIN app/assets/img/roar/post-roar-btn@2x.png
  98. BIN app/assets/img/roar/roar-bg.png
  99. BIN app/assets/img/roar/roar-bg@2x.png
  100. BIN app/assets/img/roar/wash.png
  101. BIN app/assets/img/roar/wash@2x.png
  102. BIN app/assets/img/userDetail/user-bg.png
  103. BIN app/assets/img/userDetail/user-bg@2x.png
  104. BIN app/assets/iphone/Default-Landscape.png
  105. BIN app/assets/iphone/Default-Landscape@2x.png
  106. BIN app/assets/iphone/Default-Portrait.png
  107. BIN app/assets/iphone/Default-Portrait@2x.png
  108. BIN app/assets/iphone/Default.png
  109. BIN app/assets/iphone/Default@2x.png
  110. BIN app/assets/{ → iphone}/img/blank.png
  111. BIN app/assets/iphone/img/drawer/btn-close.png
  112. BIN app/assets/iphone/img/drawer/btn-close@2x.png
  113. BIN app/assets/iphone/img/general/bg-cloud.png
  114. BIN app/assets/iphone/img/general/bg-cloud@2x.png
  115. BIN app/assets/iphone/img/general/bg-clouds-tablet.png
  116. BIN app/assets/iphone/img/general/bg-clouds-tablet@2x.png
  117. BIN app/assets/iphone/img/general/bg-interior.png
  118. BIN app/assets/iphone/img/general/btn-back.png
  119. BIN app/assets/iphone/img/general/btn-back@2x.png
  120. BIN app/assets/iphone/img/general/codestrong-bar-logo.png
  121. BIN app/assets/iphone/img/general/codestrong-bar-logo@2x.png
  122. BIN app/assets/iphone/img/general/form-bg.png
  123. BIN app/assets/iphone/img/general/form-bg@2x.png
  124. BIN app/assets/iphone/img/general/logo-cs-rocket.png
  125. BIN app/assets/iphone/img/general/logo-cs-rocket@2x.png
  126. BIN app/assets/iphone/img/header/btn-profile.png
  127. BIN app/assets/iphone/img/header/btn-profile@2x.png
  128. BIN app/assets/iphone/img/header/btn-refresh.png
  129. BIN app/assets/iphone/img/header/btn-refresh@2x.png
  130. BIN app/assets/iphone/img/header/nav-ind.png
  131. BIN app/assets/iphone/img/header/nav-ind@2x.png
  132. BIN app/assets/iphone/img/login/btn-create-default.png
  133. BIN app/assets/iphone/img/login/btn-create-default@2x.png
  134. BIN app/assets/iphone/img/login/btn-create-pressed.png
  135. BIN app/assets/iphone/img/login/btn-create-pressed@2x.png
  136. BIN app/assets/iphone/img/login/btn-login-default.png
  137. BIN app/assets/iphone/img/login/btn-login-default@2x.png
  138. BIN app/assets/iphone/img/login/btn-login-pressed.png
  139. BIN app/assets/iphone/img/login/btn-login-pressed@2x.png
  140. BIN app/assets/iphone/img/tabs/103-map.png
  141. BIN app/assets/iphone/img/tabs/103-map@2x.png
  142. BIN app/assets/iphone/img/tabs/11-clock.png
  143. BIN app/assets/iphone/img/tabs/11-clock@2x.png
  144. BIN app/assets/iphone/img/tabs/145-persondot.png
  145. BIN app/assets/iphone/img/tabs/145-persondot@2x.png
  146. BIN app/assets/iphone/img/tabs/275-broadcast.png
  147. BIN app/assets/iphone/img/tabs/275-broadcast@2x.png
  148. BIN app/assets/iphone/img/tabs/53-house.png
  149. BIN app/assets/iphone/img/tabs/53-house@2x.png
  150. BIN app/assets/iphone/img/tabs/bg-tab-button.png
  151. BIN app/assets/iphone/img/tabs/bg-tab-button@2x.png
  152. BIN app/assets/iphone/img/tabs/bg-tab.png
  153. BIN app/assets/iphone/img/tabs/bg-tab@2x.png
  154. BIN app/assets/iphone/img/tabs/btn-agenda-default.png
  155. BIN app/assets/iphone/img/tabs/btn-agenda-default@2x.png
  156. BIN app/assets/iphone/img/tabs/btn-agenda-pressed.png
  157. BIN app/assets/iphone/img/tabs/btn-agenda-pressed@2x.png
  158. BIN app/assets/iphone/img/tabs/btn-home-default.png
  159. BIN app/assets/iphone/img/tabs/btn-home-default@2x.png
  160. BIN app/assets/iphone/img/tabs/btn-home-pressed.png
  161. BIN app/assets/iphone/img/tabs/btn-home-pressed@2x.png
  162. BIN app/assets/iphone/img/tabs/btn-speakers-default.png
  163. BIN app/assets/iphone/img/tabs/btn-speakers-default@2x.png
  164. BIN app/assets/iphone/img/tabs/btn-speakers-pressed.png
  165. BIN app/assets/iphone/img/tabs/btn-speakers-pressed@2x.png
  166. BIN app/assets/iphone/img/tabs/btn-stream-default.png
  167. BIN app/assets/iphone/img/tabs/btn-stream-default@2x.png
  168. BIN app/assets/iphone/img/tabs/btn-stream-pressed.png
  169. BIN app/assets/iphone/img/tabs/btn-stream-pressed@2x.png
  170. BIN app/assets/iphone/img/tabs/btn-venue-default.png
  171. BIN app/assets/iphone/img/tabs/btn-venue-default@2x.png
  172. BIN app/assets/iphone/img/tabs/btn-venue-pressed.png
  173. BIN app/assets/iphone/img/tabs/btn-venue-pressed@2x.png
  174. BIN app/assets/iphone/img/tabs/tab-yellow-long.png
  175. BIN app/assets/iphone/img/tabs/tab-yellow-long@2x.png
  176. BIN app/assets/iphone/img/tabs/tab-yellow-short.png
  177. BIN app/assets/iphone/img/tabs/tab-yellow-short@2x.png
  178. BIN app/assets/mocks/agenda.png
  179. BIN app/assets/mocks/dashboard.png
  180. BIN app/assets/mocks/profile.png
  181. BIN app/assets/mocks/speakers.png
  182. BIN app/assets/mocks/venue.png
  183. +1 −0 app/config/alloy.json
  184. +8 −0 app/config/config.json
  185. 0 app/controllers/{notifications.js → agenda.js}
  186. +0 −25 app/controllers/app.js
  187. +0 −32 app/controllers/directory.js
  188. +41 −0 app/controllers/drawer.js
  189. +78 −22 app/controllers/header.js
  190. +0 −43 app/controllers/home.js
  191. +48 −87 app/controllers/index.js
  192. +95 −0 app/controllers/login.js
  193. +77 −0 app/controllers/main.js
  194. +0 −55 app/controllers/nav.js
  195. +0 −46 app/controllers/post.js
  196. +0 −52 app/controllers/profile.js
  197. +0 −64 app/controllers/roar.js
  198. 0 app/controllers/{directoryUser.js → speakers.js}
  199. +45 −0 app/controllers/tabs.js
  200. +0 −57 app/controllers/userDetail.js
  201. 0 Resources/iphone/.gitignore → app/controllers/venue.js
  202. +112 −0 app/lib/User.js
  203. +41 −0 app/lib/ui.js
  204. +0 −86 app/models/User.js
  205. +0 −21 app/models/animation.js
  206. +0 −10 app/models/animation.json
  207. +0 −33 app/models/boxloader.js
  208. +0 −11 app/models/boxloader.json
  209. +0 −99 app/models/login.js
  210. +0 −15 app/models/login.json
  211. +0 −59 app/models/nav.js
  212. +0 −13 app/models/nav.json
  213. +0 −27 app/models/photo.js
  214. +0 −11 app/models/photo.json
  215. +0 −106 app/models/roar.js
  216. +0 −14 app/models/roar.json
  217. +8 −0 app/styles/agenda.tss
  218. +26 −22 app/styles/app.tss
  219. +0 −17 app/styles/directory.tss
  220. +0 −49 app/styles/directoryUser.tss
  221. +32 −0 app/styles/drawer.tss
  222. +81 −27 app/styles/header.tss
  223. +7 −7 app/styles/home.tss
  224. +6 −77 app/styles/index.tss
  225. +81 −0 app/styles/login.tss
  226. +27 −0 app/styles/main.tss
  227. +0 −48 app/styles/nav.tss
  228. +0 −12 app/styles/notifications.tss
  229. +2 −34 app/styles/post.tss
  230. +3 −78 app/styles/profile.tss
  231. +0 −120 app/styles/roar.tss
  232. +8 −0 app/styles/speakers.tss
  233. +47 −0 app/styles/tabs.tss
  234. +0 −93 app/styles/userDetail.tss
  235. +8 −0 app/styles/venue.tss
  236. +5 −0 app/views/agenda.xml
  237. +0 −7 app/views/app.xml
  238. +0 −6 app/views/directory.xml
  239. +0 −8 app/views/directoryUser.xml
  240. +9 −0 app/views/drawer.xml
  241. +30 −6 app/views/header.xml
  242. +3 −1 app/views/home.xml
  243. +3 −11 app/views/index.xml
  244. +19 −0 app/views/login.xml
  245. +8 −0 app/views/main.xml
  246. +0 −10 app/views/nav.xml
  247. +0 −5 app/views/notifications.xml
  248. +1 −5 app/views/post.xml
  249. +2 −9 app/views/profile.xml
  250. +0 −17 app/views/roar.xml
  251. +5 −0 app/views/speakers.xml
  252. +20 −0 app/views/tabs.xml
  253. +0 −13 app/views/userDetail.xml
  254. +5 −0 app/views/venue.xml
  255. +7 −2 i18n/en/strings.xml
No changes.
Deleted file not rendered
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -0,0 +1 @@
+{}
@@ -0,0 +1,8 @@
+{
+ "global": {},
+ "env:development": {},
+ "env:test": {},
+ "env:production": {},
+ "os:ios": {},
+ "os:android": {}
+}
File renamed without changes.
@@ -1,25 +0,0 @@
-/**
- * app Controller
- * Builds and attaches header and nav.
- * Additionally passes section and app
- * views to be used for section mgmt
- * by application nav.
- */
-
-var __header = Alloy.getController( 'header' ),
- __nav = Alloy.getController( 'nav', { sectionParent:$.section, appWin:$.parent });
-
-Alloy.CFG.currentWin = $.parent;
-
-$.parent.addEventListener('open', function() {
- __header.parent.animate({ top:"0dp", duration:250 });
- __nav.parent.animate({ bottom:"0dp", duration:250 });
-});
-
-$.parent.add( __header.parent );
-$.parent.add( __nav.parent );
-
-
-$.openWindow = function() {
- $.parent.open();
-};
@@ -1,32 +0,0 @@
-/**
- * directory Controller
- * Builds directory section.
- */
-
-/*
-var __user = Alloy.getModel( 'user' );
-
-__user.getAll(function(users) {
- var _controller = null;
-
- for ( var u = 0, ul = users.length; u < ul; u++) {
- _controller = Alloy.getController( 'directoryUser' );
-
- _controller.photo.parent.id = users[ u ].id;
- _controller.photo.image = users[ u ].photo.urls.medium_500;
- _controller.fullname.text = users[ u ].first_name + ' ' + users[ u ].last_name;
- _controller.role.text = users[ u ].role;
- _controller.username.text = '@' + users[ u ].username;
-
- $.content.add( _controller.parent );
-
- _controller.parent.addEventListener('click', function(e) {
- Alloy.getController('userDetail', { parent:$.parent, userId:e.source.id });
- });
-
- _view = null;
- }
-
-});
-
-*/
@@ -0,0 +1,41 @@
+var drawerWidth = 364; //tablet width scalar
+
+//Set drawer width to platform width for small form
+if (!Alloy.isTablet) {
+ drawerWidth = Ti.Platform.displayCaps.platformWidth;
+ $.container.width = drawerWidth;
+ $.container.right = drawerWidth*-1;
+}
+
+$.closeDrawer = function(cb) {
+ //handle animation of self
+ $.container.animate({
+ right:'-'+drawerWidth,
+ duration:250
+ }, function() {
+ $.trigger('close');
+ cb && cb();
+ });
+};
+
+$.openDrawer = function(controller, cb) {
+ //create the requested controller, and add it to the drawer
+ var c = Alloy.createController(controller);
+ $.content.add(c.getView());
+
+ //handle animation of self
+ $.container.animate({
+ right:0,
+ duration:250
+ }, function() {
+ $.trigger('open');
+ cb && cb();
+ });
+};
+
+//internal event handling
+if ($.close) {
+ $.close.on('click', function() {
+ $.closeDrawer();
+ });
+}
@@ -1,23 +1,79 @@
-/**
- * header Controller
- * Builds application header.
- */
-
-$.about.addEventListener('click', function() {
- $.aboutAlert.message = "-- Powered By --\nTitanium Alloy\nAppcelerator ACS\n\nAuthor: " + Alloy.CFG.app.authorName + "\nEmail: " + Alloy.CFG.app.authorEmail + "\n\nVersion: " + Alloy.CFG.app.version + "\n\nIcons by Glyphish and Appcelerator";
- $.aboutAlert.show();
-});
+//Tablet header emits navigation events
+if (Alloy.isTablet) {
+ var tabOffset = 26,
+ tabWidth = 60;
+
+ //add tab behavior - this could be factored out for reuse between handheld tabs + menu nav for tablet
+ function doTab(name,offset) {
+ $.navIndicator.animate({
+ left:offset+tabOffset,
+ duration:250
+ });
+ $.trigger('change',{
+ name:name
+ });
+ }
+
+ $.home.on('click', function() {
+ doTab('home', 0);
+ });
+
+ $.agenda.on('click', function() {
+ doTab('agenda', tabWidth);
+ });
+
+ //post is special, just fire event
+ $.post.on('click', function() {
+ $.trigger('change', {
+ name:'post'
+ });
+ });
+
+ $.speakers.on('click', function() {
+ doTab('speakers', tabWidth*2);
+ });
+
+ $.venue.on('click', function() {
+ doTab('venue', tabWidth*3);
+ });
+}
-$.refresh.addEventListener('click', function() {
-
- // The refresh button will call globals for refreshing
- // on home and profile sections. This should be better.
- if ( Alloy.CFG.refreshRoars ) {
- Alloy.CFG.refreshRoars();
- }
-
- if ( Alloy.CFG.refreshProfileRoars ) {
- Alloy.CFG.refreshProfileRoars();
- }
-
-});
+//Public component API
+$.setBackVisible = function(toggle) {
+ if (toggle) {
+ $.backImage.animate({
+ opacity:1,
+ duration:250
+ });
+ $.back.enabled = true;
+ $.profile.visible = false;
+ $.profile.enabled = false;
+ }
+ else {
+ $.backImage.animate({
+ opacity:0,
+ duration:250
+ });
+ $.back.enabled = false;
+ $.profile.visible = true;
+ $.profile.enabled = true;
+ }
+};
+
+//Back isn't there on tablet
+if ($.back) {
+ $.back.on('click', function goBack() {
+ if ($.back.enabled) {
+ $.trigger('back');
+ }
+ });
+}
+
+function doProfile() {
+ if ($.profile.enabled) {
+ Ti.App.fireEvent('app:open.drawer', {
+ controller:'profile'
+ });
+ }
+}
+$.profile.on('click', doProfile);
@@ -1,43 +0,0 @@
-/**
- * home Controller
- * Builds home section.
- * TODO: Move request processing
- * to 'roar' Model.
- */
-
-var __roar = Alloy.getModel( 'roar' );
-
-var __currentPage = 1; // Since pagination isn't implemented, this does nothing.
-
-// Request processing should be moved to 'roar' Model.
-function __processRequest() {
- var _roar = null,
- _row = null,
- _data = [];
-
- __roar.getAll(1, function(e) {
-
- for ( var r = 0, rl = e.roar.length; r < rl; r++ ) {
- _row = Alloy.getController( 'roar', e.roar[ r ] ).getView( 'parent' );
-
- _data.push( _row );
-
- _row = null;
- }
-
- $.parent.setData( _data );
-
- _data.length = 0;
-
- // __currentPage ++; // Only for pagination.
- });
-
-}
-
-// This would be used for infinite scrolling.
-__processRequest();
-
-// Set global method for refreshing home roars list.
-// This is way too heavy ATM, since we're just getting
-// everything and re-setting the table data.
-Alloy.CFG.refreshRoars = __processRequest;
Oops, something went wrong.

0 comments on commit 4caac13

Please sign in to comment.