Permalink
Browse files

switching to roar template

  • Loading branch information...
1 parent 657936a commit 1e10a835f6d8e4a818668aedf872894cebaa5cdc @kwhinnery kwhinnery committed Sep 12, 2012
Showing with 1,874 additions and 676 deletions.
  1. +5 −3 app/README
  2. BIN app/assets/android/Default.png
  3. BIN app/assets/android/Default@2x.png
  4. BIN app/assets/android/Icon.png
  5. BIN app/assets/fonts/Quicksand-Bold.ttf
  6. BIN app/assets/fonts/Quicksand-Light.ttf
  7. BIN app/assets/fonts/Quicksand-Regular.ttf
  8. BIN app/assets/img/bg.png
  9. BIN app/assets/img/boxloader/bg.png
  10. BIN app/assets/img/boxloader/bg@2x.png
  11. BIN app/assets/img/boxloader/wash.png
  12. BIN app/assets/img/boxloader/wash@2x.png
  13. BIN app/assets/img/btn-back-default.png
  14. BIN app/assets/img/btn-back-default@2x.png
  15. BIN app/assets/img/btn-back-pressed.png
  16. BIN app/assets/img/btn-back-pressed@2x.png
  17. BIN app/assets/img/btn-blue-default.png
  18. BIN app/assets/img/btn-blue-default@2x.png
  19. BIN app/assets/img/btn-blue-pressed.png
  20. BIN app/assets/img/btn-facebook-default.png
  21. BIN app/assets/img/btn-facebook-default@2x.png
  22. BIN app/assets/img/btn-facebook-pressed.png
  23. BIN app/assets/img/btn-facebook-pressed@2x.png
  24. BIN app/assets/img/btn-gray-default.png
  25. BIN app/assets/img/btn-gray-default@2x.png
  26. BIN app/assets/img/btn-gray-pressed.png
  27. BIN app/assets/img/btn-gray-pressed@2x.png
  28. BIN app/assets/img/btn-sign-default.png
  29. BIN app/assets/img/btn-sign-default@2x.png
  30. BIN app/assets/img/btn-sign-pressed.png
  31. BIN app/assets/img/btn-sign-pressed@2x.png
  32. BIN app/assets/img/btn-twitter-default.png
  33. BIN app/assets/img/btn-twitter-default@2x.png
  34. BIN app/assets/img/btn-twitter-pressed.png
  35. BIN app/assets/img/btn-twitter-pressed@2x.png
  36. BIN app/assets/img/btn-yellow-default.png
  37. BIN app/assets/img/btn-yellow-default@2x.png
  38. BIN app/assets/img/btn-yellow-pressed.png
  39. BIN app/assets/img/btn-yellow-pressed@2x.png
  40. BIN app/assets/img/cloud-animation/bg-bluesky.png
  41. BIN app/assets/img/cloud-animation/bg-bluesky@2x.png
  42. BIN app/assets/img/cloud-animation/cloud1.png
  43. BIN app/assets/img/cloud-animation/cloud1@2x.png
  44. BIN app/assets/img/cloud-animation/cloud2.png
  45. BIN app/assets/img/cloud-animation/cloud2@2x.png
  46. BIN app/assets/img/cloud-animation/cloud3.png
  47. BIN app/assets/img/cloud-animation/cloud3@2x.png
  48. BIN app/assets/img/cloud-animation/cloud4.png
  49. BIN app/assets/img/cloud-animation/cloud4@2x.png
  50. BIN app/assets/img/cloud-animation/cloud5.png
  51. BIN app/assets/img/cloud-animation/cloud5@2x.png
  52. BIN app/assets/img/codestrong-bar-logo.png
  53. BIN app/assets/img/codestrong-bar-logo@2x.png
  54. BIN app/assets/img/codestrong-logo.png
  55. BIN app/assets/img/directory/user-bg.png
  56. BIN app/assets/img/directory/user-bg@2x.png
  57. BIN app/assets/img/facebook_down.png
  58. BIN app/assets/img/facebook_up.png
  59. BIN app/assets/img/header/about-btn.png
  60. BIN app/assets/img/header/about-btn@2x.png
  61. BIN app/assets/img/header/header-bg.png
  62. BIN app/assets/img/header/header-bg@2x.png
  63. BIN app/assets/img/header/refresh-btn.png
  64. BIN app/assets/img/header/refresh-btn@2x.png
  65. BIN app/assets/img/header/roar-logo-small.png
  66. BIN app/assets/img/header/roar-logo-small@2x.png
  67. BIN app/assets/img/linkedin_down.png
  68. BIN app/assets/img/linkedin_up.png
  69. BIN app/assets/img/loader/be-heard-header.png
  70. BIN app/assets/img/loader/be-heard-header@2x.png
  71. BIN app/assets/img/loader/roar-logo-large.png
  72. BIN app/assets/img/loader/roar-logo-large@2x.png
  73. BIN app/assets/img/loader/roar-splash.png
  74. BIN app/assets/img/loader/roar-splash@2x.png
  75. BIN app/assets/img/login/create-btn.png
  76. BIN app/assets/img/login/create-btn@2x.png
  77. BIN app/assets/img/login/input-bg.png
  78. BIN app/assets/img/login/input-bg@2x.png
  79. BIN app/assets/img/login/login-btn.png
  80. BIN app/assets/img/login/login-btn@2x.png
  81. BIN app/assets/img/nav/broadcast-btn.png
  82. BIN app/assets/img/nav/broadcast-btn@2x.png
  83. BIN app/assets/img/nav/directory-btn.png
  84. BIN app/assets/img/nav/directory-btn@2x.png
  85. BIN app/assets/img/nav/home-btn.png
  86. BIN app/assets/img/nav/home-btn@2x.png
  87. BIN app/assets/img/nav/nav-bg.png
  88. BIN app/assets/img/nav/nav-bg@2x.png
  89. BIN app/assets/img/nav/notifications-btn.png
  90. BIN app/assets/img/nav/notifications-btn@2x.png
  91. BIN app/assets/img/nav/profile-btn.png
  92. BIN app/assets/img/nav/profile-btn@2x.png
  93. BIN app/assets/img/notifications/no-notifications.png
  94. BIN app/assets/img/notifications/no-notifications@2x.png
  95. BIN app/assets/img/pattern-blue-bar.png
  96. BIN app/assets/img/profile/user-bg.png
  97. BIN app/assets/img/profile/user-bg@2x.png
  98. BIN app/assets/img/roar/comment-count-bg.png
  99. BIN app/assets/img/roar/comment-count-bg@2x.png
  100. BIN app/assets/img/roar/fav-count-bg.png
  101. BIN app/assets/img/roar/fav-count-bg@2x.png
  102. BIN app/assets/img/roar/post-roar-bg.png
  103. BIN app/assets/img/roar/post-roar-bg@2x.png
  104. BIN app/assets/img/roar/post-roar-btn.png
  105. BIN app/assets/img/roar/post-roar-btn@2x.png
  106. BIN app/assets/img/roar/roar-bg.png
  107. BIN app/assets/img/roar/roar-bg@2x.png
  108. BIN app/assets/img/roar/wash.png
  109. BIN app/assets/img/roar/wash@2x.png
  110. BIN app/assets/img/rocket-exhaust.png
  111. BIN app/assets/img/rocket-exhaust@2x.png
  112. BIN app/assets/img/rocket.png
  113. BIN app/assets/img/rocket@2x.png
  114. BIN app/assets/img/space-man.png
  115. BIN app/assets/img/spaceship.png
  116. BIN app/assets/img/splash.png
  117. BIN app/assets/img/splash@2x.png
  118. BIN app/assets/img/transparent-box1.png
  119. BIN app/assets/img/transparent-box1@2x.png
  120. BIN app/assets/img/transparent-box2.png
  121. BIN app/assets/img/transparent-box2@2x.png
  122. BIN app/assets/img/transparent-form-bottom.png
  123. BIN app/assets/img/transparent-form-bottom@2x.png
  124. BIN app/assets/img/transparent-form-middle.png
  125. BIN app/assets/img/transparent-form-middle@2x.png
  126. BIN app/assets/img/transparent-form-top.png
  127. BIN app/assets/img/transparent-form-top@2x.png
  128. BIN app/assets/img/twitter_down.png
  129. BIN app/assets/img/twitter_up.png
  130. BIN app/assets/img/userDetail/user-bg.png
  131. BIN app/assets/img/userDetail/user-bg@2x.png
  132. BIN app/assets/iphone/Default-Portrait.png
  133. BIN app/assets/iphone/Default-Portrait@2x.png
  134. BIN app/assets/iphone/Default.png
  135. BIN app/assets/iphone/Default@2x.png
  136. BIN app/assets/iphone/Icon.png
  137. BIN app/assets/iphone/Icon@2x.png
  138. +20 −7 app/config.json
  139. +0 −1 app/config/alloy.json
  140. +0 −8 app/config/config.json
  141. +0 −11 app/controllers/DashboardView.js
  142. +0 −117 app/controllers/LoginView.js
  143. +0 −143 app/controllers/SocialLoginView.js
  144. +22 −0 app/controllers/app.js
  145. +30 −0 app/controllers/directory.js
  146. 0 app/controllers/directoryUser.js
  147. +23 −0 app/controllers/header.js
  148. +43 −0 app/controllers/home.js
  149. +77 −108 app/controllers/index.js
  150. +53 −0 app/controllers/nav.js
  151. 0 app/controllers/notifications.js
  152. +45 −0 app/controllers/post.js
  153. +49 −0 app/controllers/profile.js
  154. +64 −0 app/controllers/roar.js
  155. +57 −0 app/controllers/userDetail.js
  156. +18 −0 app/migrations/201207172202464_app.js
  157. +19 −0 app/migrations/201207172203875_app.js
  158. +19 −0 app/migrations/201207172217512_user.js
  159. +19 −0 app/migrations/201207192048887_login.js
  160. +18 −0 app/migrations/201207192237401_animation.js
  161. +19 −0 app/migrations/201207192254760_nav.js
  162. +18 −0 app/migrations/201207200212370_roar.js
  163. +18 −0 app/migrations/201207200316336_user.js
  164. +18 −0 app/migrations/201207200416393_photo.js
  165. +19 −0 app/migrations/201207200644324_post.js
  166. +19 −0 app/migrations/201207202048985_boxloader.js
  167. +21 −0 app/models/animation.js
  168. +10 −0 app/models/animation.json
  169. +33 −0 app/models/boxloader.js
  170. +11 −0 app/models/boxloader.json
  171. +99 −0 app/models/login.js
  172. +15 −0 app/models/login.json
  173. +59 −0 app/models/nav.js
  174. +13 −0 app/models/nav.json
  175. +27 −0 app/models/photo.js
  176. +11 −0 app/models/photo.json
  177. +106 −0 app/models/roar.js
  178. +14 −0 app/models/roar.json
  179. +43 −0 app/models/user.js
  180. +11 −0 app/models/user.json
  181. +0 −3 app/styles/DashboardView.tss
  182. +0 −35 app/styles/LoginView.tss
  183. +0 −68 app/styles/SocialLoginView.tss
  184. +25 −53 app/styles/app.tss
  185. +17 −0 app/styles/directory.tss
  186. +49 −0 app/styles/directoryUser.tss
  187. +39 −0 app/styles/header.tss
  188. +8 −0 app/styles/home.tss
  189. +69 −54 app/styles/index.tss
  190. +49 −0 app/styles/nav.tss
  191. +12 −0 app/styles/notifications.tss
  192. +35 −0 app/styles/post.tss
  193. +78 −0 app/styles/profile.tss
  194. +120 −0 app/styles/roar.tss
  195. +93 −0 app/styles/userDetail.tss
  196. +0 −5 app/views/DashboardView.xml
  197. +0 −18 app/views/LoginView.xml
  198. +0 −22 app/views/SocialLoginView.xml
  199. +7 −0 app/views/app.xml
  200. +6 −0 app/views/directory.xml
  201. +8 −0 app/views/directoryUser.xml
  202. +9 −0 app/views/header.xml
  203. +3 −0 app/views/home.xml
  204. +9 −12 app/views/index.xml
  205. +10 −0 app/views/nav.xml
  206. +5 −0 app/views/notifications.xml
  207. +8 −0 app/views/post.xml
  208. +12 −0 app/views/profile.xml
  209. +17 −0 app/views/roar.xml
  210. +13 −0 app/views/userDetail.xml
  211. +8 −8 manifest
View
@@ -3,7 +3,7 @@ Welcome to Alloy. Prepare to be amazed.
Titanium Alloys are metals which contain a mixture of Titanium and other chemical elements. Such Alloys have very high tensile strength and toughness (even at extreme temperatures). They are light weight, have extraordinary corrosion resistance and the ability to withstand extreme temperatures [1].
-We think Alloy for Titanium provides you, the developer, with the ability to run fast, jump high and general code like an amazing superstar.
+Alloy for Titanium provides you, the developer, with the ability to run fast, jump high and general code like an amazing superstar.
Codestrong!
@@ -21,9 +21,11 @@ views yep, the views go here. you're getting it.
assets place your images, sound files, etc here. They will be deployed into Resources.
migrations your migrations go here. generate these. don't do these by hand.
styles your stylesheets for your views go here.
-config this is configuration files, just like it says.
+
+Folders not generated by Alloy automatically, but the developer can create and use.
+
lib put your own libraries here and use require('name') to load it
vendor place any third-party libraries you use and reference require('vendor/<name>')
-Also, in the root is the alloy.jmk file. This serves like a makefile and can be used to hook into the Alloy compiler to customize the build process.
+Also, in the root is the alloy.jmk file and config.json. Alloy.jmk acts like a makefile and can be used to hook into the Alloy compiler to customize the build process. The config.json file is where you can declare runtime contstants.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Deleted file not rendered
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
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.
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file 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.
View
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
View
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.
View
Diff not rendered.
Diff not rendered.
View
@@ -1,9 +1,22 @@
{
- "global": {},
- "env:development": {},
- "env:test": {},
- "env:production": {},
- "os:ios": {},
- "os:android": {},
- "dependencies": {}
+ "global": {
+ "app": {
+ "authorName": "Fred Spencer",
+ "authorEmail": "fspencer@appcelerator.com",
+ "version": "0.0.1 Hackathon"
+ },
+ "currentUser": {
+ "loggedIn": false,
+ "data": null
+ },
+ "refreshRoars": null,
+ "refreshProfileRoars": null,
+ "currentWin": null,
+ "currentLoader": null
+ },
+ "env:development": {},
+ "env:test": {},
+ "env:production": {},
+ "os:ios": {},
+ "os:android": {}
}
View
@@ -1 +0,0 @@
-{}
View
@@ -1,8 +0,0 @@
-{
- "global": {},
- "env:development": {},
- "env:test": {},
- "env:production": {},
- "os:ios": {},
- "os:android": {}
-}
@@ -1,11 +0,0 @@
-var Cloud = require('ti.cloud');
-
-$.logout.on('click', function() {
- Cloud.Users.logout(function(e) {
- if (e.success) {
- Ti.App.Properties.removeProperty('sessionId');
- Ti.Facebook.logout();
- Ti.App.fireEvent('app:logout');
- }
- });
-});
@@ -1,117 +0,0 @@
-var Cloud = require('ti.cloud');
-
-//Static config of hintText, which lacks auto-localization
-$.email.hintText = L('email');
-$.password.hintText = L('password');
-
-//Generic login error - TODO: make these more specific
-function showError() {
- var d = Ti.UI.createAlertDialog({
- title:L('loginError'),
- message:L('loginErrorText')
- }).show();
-}
-
-//Log in using an Appcelerator Developer account
-function networkLogin(username, password, success, error) {
- var xhr = Ti.Network.createHTTPClient();
-
- //Parity issue: iOS fires onload for 4xx and 3xx status codes, so need to manually check onload
- xhr.onload = function() {
- Ti.API.info('Status Code: '+ xhr.status);
- Ti.API.info('Set-Cookie: '+ xhr.getResponseHeader('Set-Cookie'));
- Ti.API.info('responseText: '+ xhr.responseText);
- try {
- if (xhr.status == 200) {
- var sessionId = '',
- userDetails;
-
- //return the session ID to store in ACS
- if (this.responseText) {
- //throw in network details for later use
- Ti.App.Properties.setString('networkDetails', this.responseText);
- userDetails = JSON.parse(this.responseText);
- sessionId = userDetails.sid;
- }
-
- success(sessionId, userDetails);
- }
- else {
- Ti.API.error('Error code received from server: '+xhr);
- error();
- }
- }
- catch(e) {
- Ti.API.error('Exception processing response: '+e);
- showError();
- }
- };
-
- xhr.onerror = function() {
- Ti.API.error('Login Request Error:');
- Ti.API.error('Status Code: '+ xhr.status);
- Ti.API.error('Set-Cookie: '+ xhr.getResponseHeader('Set-Cookie'));
- Ti.API.error('responseText: '+ xhr.responseText);
- error();
- };
-
- xhr.open('POST', 'https://api.appcelerator.net/p/v1/sso-login');
- xhr.send({
- un:username,
- pw:password,
- mid:Ti.Platform.id
- });
-}
-
-//helper to toggle button
-function btnToggle(on) {
- $.login.enabled = on;
- $.login.title = on ? L('login') : L('authenticating');
-}
-
-
-$.login.on('click', function() {
- if ($.login.enabled) {
- $.email.blur();
- $.password.blur();
- btnToggle();
-
- networkLogin($.email.value, $.password.value, function(sessionId) {
- //Associate an Appcelerator developer login with an ACS account
- Cloud.SocialIntegrations.externalAccountLogin({
- id:$.email.value,
- type: 'appc',
- token: sessionId
- }, function(e) {
- if (e.success) {
- //Store the current value of the Cloud session for later use, and notify app of success
- Ti.App.Properties.setString('sessionId', Cloud.sessionId);
- Ti.App.fireEvent('app:login.success');
- btnToggle(true);
- }
- else {
- Ti.API.error('Social Integration Error');
- showError();
- btnToggle(true);
- }
- });
- }, function() {
- //Prompt to recheck info
- $.password.value = '';
- $.password.focus();
- showError();
- btnToggle(true);
- });
- }
-});
-
-$.noAppcNetwork.on('click', function() {
- Ti.Platform.openURL('https://my.appcelerator.com/auth/signup');
-});
-
-//Place initial focus on e-mail field
-setTimeout(function() {
- $.email.focus();
-},300);
-
-
@@ -1,143 +0,0 @@
-//depdenencies
-var social = require('alloy/social'),
- Cloud = require('ti.cloud');
-
-//Set up static properties on view elements
-$.email.hintText = L('email');
-$.password.hintText = L('password');
-
-//ivars
-var selectedAction = 0; //0 - sign up, 1 - log in
-
-//private functions
-function loginHandler(e) {
- if (e.success) {
- $.scroller.scrollToView(0);
- //Store the current value of the Cloud session for later use, and notify app of success
- Ti.App.Properties.setString('sessionId', Cloud.sessionId);
- Ti.App.fireEvent('app:login.success');
- }
- else {
- //TODO robust error handling
- alert('Login Error: '+e.message);
- }
-}
-
-//Handle social logins
-function socialLogin() {
- var socialIntegrationArgs = {},
- authorized = false;
-
- if (Ti.Facebook.loggedIn) {
- authorized = true;
- socialIntegrationArgs = {
- type: 'facebook',
- token: Ti.Facebook.accessToken
- };
- }
- else if (social.isAuthorized()) {
- authorized = true;
- socialIntegrationArgs = {
- type: 'facebook',
- token: Ti.Facebook.accessToken
- };
- }
-
- //Link account if authorized
- authorized && (Cloud.SocialIntegrations.externalAccountLogin(socialIntegrationArgs, loginHandler));
-}
-
-Ti.Facebook.addEventListener('login', socialLogin);
-
-//event handlers
-
-//iOS needs a little extra space on field focus for logins to dodge the sw keyboard...
-//Alloy will actually optimize this out at compile time for Android and mobile web...
-if (OS_IOS) {
- var focused = false;
-
- function doScroll(bot, force) {
- //Short circuit to animation as quickly as possible
- if (force || !Alloy.isTablet || Ti.Gesture.orientation === Ti.UI.LANDSCAPE_LEFT || Ti.Gesture.orientation === Ti.UI.LANDSCAPE_RIGHT ) {
- $.wrapper.animate({
- bottom:bot,
- duration:250
- });
- }
- }
-
- function moveScrollerUp() {
- focused = true;
- doScroll(120);
- }
-
- function moveScrollerDown() {
- focused = false;
- doScroll(10);
- }
-
- $.email.on('focus', moveScrollerUp);
- $.password.on('focus', moveScrollerUp);
- $.email.on('blur', moveScrollerDown);
- $.password.on('blur', moveScrollerDown);
-
- //Always reset on orientation change for tablet
- if (Alloy.isTablet) {
- Ti.Gesture.addEventListener('orientationchange', function(e) {
- if (focused) {
- if (e.orientation === Ti.UI.PORTRAIT || e.orientation === Ti.UI.UPSIDE_PORTRAIT) {
- doScroll(10,true);
- }
- else {
- doScroll(120,true);
- }
- }
- });
- }
-}
-
-$.fb.on('click', function() {
- Ti.Facebook.authorize();
-});
-
-$.twitter.on('click', function() {
- social.authorize(socialLogin);
-});
-
-$.uhwhat.on('touchend', function() {
- selectedAction = 0;
- $.action.title = L('signup');
- $.header.text = L('thatscool');
- $.scroller.scrollToView(1);
-});
-
-$.alreadyDid.on('touchend', function() {
- selectedAction = 1;
- $.action.title = L('login');
- $.header.text = L('ohnice');
- $.scroller.scrollToView(1);
-});
-
-$.cancel.on('touchend', function() {
- $.scroller.scrollToView(0);
-});
-
-$.action.on('touchend', function() {
- if (selectedAction === 0) {
- //create new user - TODO: validate e-mail, make user confirm password
- Cloud.Users.create({
- email:$.email.value,
- first_name:'Codestrong', //ask for more info if we need it - I hate when I have to do everything up front
- last_name:'User',
- password:$.password.value,
- password_confirmation:$.password.value
- }, loginHandler);
- }
- else {
- //log in existing
- Cloud.Users.login({
- login:$.email.value,
- password:$.password.value
- }, loginHandler);
- }
-});
View
@@ -0,0 +1,22 @@
+/**
+ * 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 );
+
+$.parent.open();
@@ -0,0 +1,30 @@
+/**
+ * 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;
+ }
+
+});
+
No changes.
Oops, something went wrong.

0 comments on commit 1e10a83

Please sign in to comment.