Permalink
Browse files

Merge branch 'develop'

Conflicts:
	Resources/app/controllers/code_reader_controller.js
	Resources/app/views/splash/actions/paypal_action_table_view_row.js
  • Loading branch information...
2 parents e7b91e1 + c0d3255 commit 3bf7f6db8e675fcb5fdcf1b61002d728499a6b2c Harry Brundage committed Nov 24, 2010
Showing with 3,860 additions and 3,297 deletions.
  1. +3 −1 Resources/app.js
  2. +92 −92 Resources/app/controllers/accounts_controller.js
  3. +35 −34 Resources/app/controllers/code_reader_controller.js
  4. +4 −1 Resources/app/controllers/controller.js
  5. +37 −0 Resources/app/controllers/email_collection_controller.coffee
  6. +64 −0 Resources/app/controllers/email_collection_controller.js
  7. +35 −31 Resources/app/controllers/facebook_authorization_controller.js
  8. +1 −1 Resources/app/controllers/main.js
  9. +21 −19 Resources/app/controllers/oauthorization_controller.js
  10. +144 −142 Resources/app/controllers/splash_controller.js
  11. +1 −1 Resources/app/controllers/xauthorization_controller.coffee
  12. +55 −53 Resources/app/controllers/xauthorization_controller.js
  13. +1 −1 Resources/app/helpers/redirect_helper.js
  14. +1 −0 Resources/app/models/accounts/account.coffee
  15. +31 −28 Resources/app/models/accounts/account.js
  16. +58 −57 Resources/app/models/accounts/account_set.js
  17. +26 −0 Resources/app/models/accounts/email/email_account.coffee
  18. +44 −0 Resources/app/models/accounts/email/email_account.js
  19. +82 −86 Resources/app/models/accounts/facebook/facebook_account.js
  20. +1 −1 Resources/app/models/accounts/foursquare/foursquare_account.coffee
  21. +93 −93 Resources/app/models/accounts/foursquare/foursquare_account.js
  22. +12 −9 Resources/app/models/accounts/google/google_account.js
  23. +12 −9 Resources/app/models/accounts/linkedin/linkedin_account.js
  24. +216 −219 Resources/app/models/accounts/oauthorized_account.js
  25. +172 −169 Resources/app/models/accounts/twitter/twitter_account.js
  26. +225 −228 Resources/app/models/accounts/twitter/twitter_oauth_adapter.js
  27. +27 −20 Resources/app/models/actions/account_based_action.js
  28. +14 −11 Resources/app/models/actions/accountless_action.js
  29. +2 −0 Resources/app/models/actions/action.coffee
  30. +58 −52 Resources/app/models/actions/action.js
  31. +16 −13 Resources/app/models/actions/facebook/facebook_action.js
  32. +1 −1 Resources/app/models/actions/facebook/publish_stream_action.coffee
  33. +21 −18 Resources/app/models/actions/foursquare/check_in_action.js
  34. +23 −20 Resources/app/models/actions/foursquare/foursquare_action.js
  35. +21 −18 Resources/app/models/actions/foursquare/send_friend_request_action.js
  36. +17 −0 Resources/app/models/actions/mailchimp/mailchimp_action.coffee
  37. +29 −0 Resources/app/models/actions/mailchimp/mailchimp_action.js
  38. +37 −0 Resources/app/models/actions/mailchimp/subscribe_action.coffee
  39. +47 −0 Resources/app/models/actions/mailchimp/subscribe_action.js
  40. +13 −10 Resources/app/models/actions/paypal/donate_action.js
  41. +15 −12 Resources/app/models/actions/paypal/paypal_action.js
  42. +18 −15 Resources/app/models/actions/platform/call_action.js
  43. +18 −15 Resources/app/models/actions/platform/platform_action.js
  44. +18 −15 Resources/app/models/actions/platform/visit_link_action.js
  45. +24 −21 Resources/app/models/actions/responder_action.js
  46. +17 −14 Resources/app/models/actions/twitter/follow_action.js
  47. +17 −14 Resources/app/models/actions/twitter/retweet_action.js
  48. +17 −14 Resources/app/models/actions/twitter/status_update_action.js
  49. +23 −20 Resources/app/models/actions/twitter/twitter_action.js
  50. +2 −4 Resources/app/models/object.coffee
  51. +14 −13 Resources/app/models/object.js
  52. +89 −72 Resources/app/models/observable.js
  53. +78 −78 Resources/app/models/persisted_object.js
  54. +68 −74 Resources/app/models/splash.js
  55. +1 −0 Resources/app/views/accounts/account_table_view_row.coffee
  56. +30 −27 Resources/app/views/accounts/account_table_view_row.js
  57. +94 −95 Resources/app/views/accounts/accounts_table_view_window.js
  58. +77 −78 Resources/app/views/accounts/authorization_web_view_window.js
  59. +17 −0 Resources/app/views/accounts/email_account_table_view_row.coffee
  60. +34 −0 Resources/app/views/accounts/email_account_table_view_row.js
  61. +19 −0 Resources/app/views/accounts/email_collection_window.coffee
  62. +37 −0 Resources/app/views/accounts/email_collection_window.js
  63. +2 −1 Resources/app/views/accounts/facebook_account_table_view_row.coffee
  64. +35 −32 Resources/app/views/accounts/facebook_account_table_view_row.js
  65. +42 −40 Resources/app/views/accounts/facebook_authorization_window.js
  66. +4 −2 Resources/app/views/accounts/foursquare_account_table_view_row.coffee
  67. +40 −32 Resources/app/views/accounts/foursquare_account_table_view_row.js
  68. +18 −15 Resources/app/views/accounts/foursquare_xauthorization_window.js
  69. +42 −43 Resources/app/views/accounts/new_account_select_window.js
  70. +2 −1 Resources/app/views/accounts/twitter_account_table_view_row.coffee
  71. +35 −32 Resources/app/views/accounts/twitter_account_table_view_row.js
  72. +13 −10 Resources/app/views/accounts/twitter_xauthorization_window.js
  73. +31 −31 Resources/app/views/accounts/xauthorization_window.js
  74. +15 −15 Resources/app/views/code_reader/code_reader_window.js
  75. +13 −11 Resources/app/views/codes/codes_window.js
  76. +1 −0 Resources/app/views/data_collection_window.coffee
  77. +70 −70 Resources/app/views/data_collection_window.js
  78. +15 −13 Resources/app/views/generic_window.js
  79. +69 −67 Resources/app/views/modal_loading_view.js
  80. +28 −26 Resources/app/views/placeholder_window.js
  81. +15 −12 Resources/app/views/splash/actions/account_action_table_view_row.js
  82. +145 −141 Resources/app/views/splash/actions/action_table_view_row.js
  83. +15 −12 Resources/app/views/splash/actions/facebook_action_table_view_row.js
  84. +51 −49 Resources/app/views/splash/actions/paypal_action_table_view_row.js
  85. +15 −12 Resources/app/views/splash/actions/platform_action_table_view_row.js
  86. +65 −63 Resources/app/views/splash/splash_info_header_view.js
  87. +1 −0 Resources/app/views/splash/splash_window.coffee
  88. +158 −160 Resources/app/views/splash/splash_window.js
  89. BIN Resources/images/account_icons/email.png
  90. +111 −108 Resources/vendor/foursquare.js
  91. +158 −165 Resources/vendor/http_client_with_cache.js
  92. +37 −26 Resources/vendor/tiajax.js
  93. +95 −89 Resources/vendor/underscore.js
View
@@ -14,7 +14,8 @@ Citrus.Config = {
SHORTCODE_RE: "s/([a-zA-Z0-9]+)",
TWITTER_XAUTH: true,
FACEBOOK_API_KEY: "965a3c93faaea82715520e175d983b58",
- FACEBOOK_APP_SECRET: "4b4fefb799217cdfd60ba81098291d8c"
+ FACEBOOK_APP_SECRET: "4b4fefb799217cdfd60ba81098291d8c",
+ VALID_EMAIL_RE: "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)\b"
};
// Debugging functions
@@ -78,6 +79,7 @@ sc.dumplevel = 999;
Ti.include('app/helpers/icons_helper.js');
// Citrus Specific Abstractions
+Ti.include("/app/models/observable.js")
Ti.include('app/models/object.js');
Ti.include('app/models/persisted_object.js');
Ti.include('app/views/generic_window.js');

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,5 +1,8 @@
(function() {
var Controller;
- Controller = function() {};
+ Controller = function() {
+ function Controller() {}
+ return Controller;
+ }();
Citrus.Controller = Controller;
}).call(this);
@@ -0,0 +1,37 @@
+Ti.include("/app/views/accounts/email_collection_window.js")
+
+class EmailCollectionController extends Citrus.Controller
+ emailRegex: /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
+
+ constructor: (collectSuccess, collectCancel, viewClass)->
+ viewClass ?= Citrus.EmailCollectionWindow
+ @window = new viewClass(this)
+ @window.addEventListener "info:collected", (e) =>
+ # validateInfo will alert the user of any issues
+ if this.validateInfo()
+ collectSuccess(this.data())
+
+ root.tabGroup.activeTab.open @window.win, {animated:true}
+
+ validateInfo: () ->
+ for name, val of this.data()
+ if name == "email"
+ d("checking email", val, @emailRegex, @emailRegex.test(val))
+ unless @emailRegex.test(val)
+ alert "Please enter a valid email."
+ return false
+ else if val == ""
+ alert "All fields are required"
+ return false
+ return true
+
+ data: () ->
+ d = @window.data()
+ for k,v of d
+ d[k] = v.toLowerCase() if k == "email"
+ d
+
+ destroy: () ->
+ @window.win.close()
+
+Citrus.EmailCollectionController = EmailCollectionController
Oops, something went wrong.

0 comments on commit 3bf7f6d

Please sign in to comment.