Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents 393dc57 + 77e2d0f commit f15280a3cfac45b1caad6a1f3a15b9f3ab3aa2e9 Harry Brundage committed Nov 13, 2010
Showing with 322 additions and 119 deletions.
  1. +2 −0 Resources/app.js
  2. +3 −0 Resources/app/controllers/main.coffee
  3. +1 −0 Resources/app/controllers/main.js
  4. +5 −4 Resources/app/controllers/splash_controller.coffee
  5. +6 −3 Resources/app/controllers/splash_controller.js
  6. +7 −0 Resources/app/helpers/icons_helper.coffee
  7. +11 −0 Resources/app/helpers/icons_helper.js
  8. +1 −1 Resources/app/models/actions/action.coffee
  9. +1 −1 Resources/app/models/actions/action.js
  10. +1 −1 Resources/app/models/actions/foursquare/foursquare_action.coffee
  11. +1 −1 Resources/app/models/actions/foursquare/foursquare_action.js
  12. +1 −0 Resources/app/models/actions/platform/call_action.coffee
  13. +1 −0 Resources/app/models/actions/platform/call_action.js
  14. +2 −2 Resources/app/models/actions/platform/platform_action.coffee
  15. +1 −1 Resources/app/models/actions/platform/platform_action.js
  16. +1 −0 Resources/app/models/actions/platform/visit_link_action.coffee
  17. +1 −0 Resources/app/models/actions/platform/visit_link_action.js
  18. +1 −1 Resources/app/models/actions/twitter/twitter_action.coffee
  19. +1 −1 Resources/app/models/actions/twitter/twitter_action.js
  20. +1 −1 Resources/app/views/accounts/account_table_view_row.coffee
  21. +1 −1 Resources/app/views/accounts/account_table_view_row.js
  22. +1 −1 Resources/app/views/accounts/new_account_select_window.coffee
  23. +1 −1 Resources/app/views/accounts/new_account_select_window.js
  24. +6 −0 Resources/app/views/splash/actions/account_action_table_view_row.coffee
  25. +20 −0 Resources/app/views/splash/actions/account_action_table_view_row.js
  26. +14 −9 Resources/app/views/splash/actions/action_table_view_row.coffee
  27. +15 −10 Resources/app/views/splash/actions/action_table_view_row.js
  28. +0 −2 Resources/app/views/splash/actions/facebook_action_table_view_row.coffee
  29. +0 −3 Resources/app/views/splash/actions/facebook_action_table_view_row.js
  30. +20 −0 Resources/app/views/splash/actions/foursquare_action_table_view_row.js
  31. +2 −1 Resources/app/views/splash/actions/paypal_action_table_view_row.coffee
  32. +3 −0 Resources/app/views/splash/actions/paypal_action_table_view_row.js
  33. +6 −0 Resources/app/views/splash/actions/platform_action_table_view_row.coffee
  34. +20 −0 Resources/app/views/splash/actions/platform_action_table_view_row.js
  35. +0 −8 Resources/app/views/splash/actions/twitter_action_table_view_row.coffee
  36. +0 −3 Resources/app/views/splash/actions/twitter_action_table_view_row.js
  37. +16 −14 Resources/app/views/splash/{splash_info_table_view_row.coffee → splash_info_header_view.coffee}
  38. +64 −0 Resources/app/views/splash/splash_info_header_view.js
  39. +39 −26 Resources/app/views/splash/splash_window.coffee
  40. +45 −23 Resources/app/views/splash/splash_window.js
  41. BIN Resources/images/account_icons/audioboo.png
  42. BIN Resources/images/account_icons/bebo.png
  43. BIN Resources/images/account_icons/behance.png
  44. BIN Resources/images/account_icons/blogger.png
  45. BIN Resources/images/account_icons/buzz.png
  46. BIN Resources/images/account_icons/creativecommons.png
  47. BIN Resources/images/account_icons/dailybooth.png
  48. BIN Resources/images/account_icons/delicious.png
  49. BIN Resources/images/account_icons/designfloat.png
  50. BIN Resources/images/account_icons/deviantart.png
  51. BIN Resources/images/account_icons/digg.png
  52. BIN Resources/images/account_icons/dopplr.png
  53. BIN Resources/images/account_icons/dribbble.png
  54. BIN Resources/images/account_icons/email.png
  55. BIN Resources/images/account_icons/ember.png
  56. BIN Resources/images/account_icons/facebook.png
  57. BIN Resources/images/account_icons/flickr.png
  58. BIN Resources/images/account_icons/forrst.png
  59. BIN Resources/images/account_icons/foursquare.png
  60. BIN Resources/images/account_icons/friendfeed.png
  61. BIN Resources/images/account_icons/google.png
  62. BIN Resources/images/account_icons/gowalla copy.png
  63. BIN Resources/images/account_icons/grooveshark.png
  64. BIN Resources/images/account_icons/hyves.png
  65. BIN Resources/images/account_icons/lastfm.png
  66. BIN Resources/images/account_icons/linkedin.png
  67. BIN Resources/images/account_icons/livejournal.png
  68. BIN Resources/images/account_icons/lockerz.png
  69. BIN Resources/images/account_icons/megavideo.png
  70. BIN Resources/images/account_icons/myspace.png
  71. BIN Resources/images/account_icons/piano.png
  72. BIN Resources/images/account_icons/playfire.png
  73. BIN Resources/images/account_icons/playstation.png
  74. BIN Resources/images/account_icons/reddit.png
  75. BIN Resources/images/account_icons/rss.png
  76. BIN Resources/images/account_icons/skype.png
  77. BIN Resources/images/account_icons/socialvibe.png
  78. BIN Resources/images/account_icons/soundcloud.png
  79. BIN Resources/images/account_icons/spotify.png
  80. BIN Resources/images/account_icons/steam.png
  81. BIN Resources/images/account_icons/stumbleupon.png
  82. BIN Resources/images/account_icons/technorati.png
  83. BIN Resources/images/account_icons/tumblr.png
  84. BIN Resources/images/account_icons/twitpic.png
  85. BIN Resources/images/account_icons/twitter.png
  86. BIN Resources/images/account_icons/typepad.png
  87. BIN Resources/images/account_icons/vimeo.png
  88. BIN Resources/images/account_icons/wakoopa.png
  89. BIN Resources/images/account_icons/wordpress.png
  90. BIN Resources/images/account_icons/xing.png
  91. BIN Resources/images/account_icons/yahoo.png
  92. BIN Resources/images/account_icons/youtube.png
  93. BIN Resources/images/{account_icons → account_icons_old}/BlinklistAccount_128.png
  94. BIN Resources/images/{account_icons → account_icons_old}/BlinklistAccount_16.png
  95. BIN Resources/images/{account_icons → account_icons_old}/BlinklistAccount_32.png
  96. BIN Resources/images/{account_icons → account_icons_old}/BlinklistAccount_64.png
  97. BIN Resources/images/{account_icons → account_icons_old}/FacebookAccount_128.png
  98. BIN Resources/images/{account_icons → account_icons_old}/FacebookAccount_16.png
  99. BIN Resources/images/{account_icons → account_icons_old}/FacebookAccount_32.png
  100. BIN Resources/images/{account_icons → account_icons_old}/FacebookAccount_64.png
  101. BIN Resources/images/{account_icons → account_icons_old}/FeedburnerAccount_128.png
  102. BIN Resources/images/{account_icons → account_icons_old}/FeedburnerAccount_16.png
  103. BIN Resources/images/{account_icons → account_icons_old}/FeedburnerAccount_32.png
  104. BIN Resources/images/{account_icons → account_icons_old}/FeedburnerAccount_64.png
  105. BIN Resources/images/{account_icons → account_icons_old}/FlickrAccount_128.png
  106. BIN Resources/images/{account_icons → account_icons_old}/FlickrAccount_16.png
  107. BIN Resources/images/{account_icons → account_icons_old}/FlickrAccount_32.png
  108. BIN Resources/images/{account_icons → account_icons_old}/FlickrAccount_64.png
  109. BIN Resources/images/{account_icons → account_icons_old}/FriendfeedAccount_128.png
  110. BIN Resources/images/{account_icons → account_icons_old}/FriendfeedAccount_16.png
  111. BIN Resources/images/{account_icons → account_icons_old}/FriendfeedAccount_32.png
  112. BIN Resources/images/{account_icons → account_icons_old}/FriendfeedAccount_64.png
  113. BIN Resources/images/{account_icons → account_icons_old}/FurlAccount_128.png
  114. BIN Resources/images/{account_icons → account_icons_old}/FurlAccount_16.png
  115. BIN Resources/images/{account_icons → account_icons_old}/FurlAccount_32.png
  116. BIN Resources/images/{account_icons → account_icons_old}/FurlAccount_64.png
  117. BIN Resources/images/{account_icons → account_icons_old}/GenericAccount_16.png
  118. BIN Resources/images/{account_icons → account_icons_old}/GmailAccount_128.png
  119. BIN Resources/images/{account_icons → account_icons_old}/GmailAccount_16.png
  120. BIN Resources/images/{account_icons → account_icons_old}/GmailAccount_32.png
  121. BIN Resources/images/{account_icons → account_icons_old}/GmailAccount_64.png
  122. BIN Resources/images/{account_icons → account_icons_old}/GoogleAccount_128.png
  123. BIN Resources/images/{account_icons → account_icons_old}/GoogleAccount_16.png
  124. BIN Resources/images/{account_icons → account_icons_old}/GoogleAccount_32.png
  125. BIN Resources/images/{account_icons → account_icons_old}/GoogleAccount_64.png
  126. BIN Resources/images/{account_icons → account_icons_old}/HeartAccount_128.png
  127. BIN Resources/images/{account_icons → account_icons_old}/HeartAccount_16.png
  128. BIN Resources/images/{account_icons → account_icons_old}/HeartAccount_32.png
  129. BIN Resources/images/{account_icons → account_icons_old}/HeartAccount_64.png
  130. BIN Resources/images/{account_icons → account_icons_old}/LastfmAccount_128.png
  131. BIN Resources/images/{account_icons → account_icons_old}/LastfmAccount_16.png
  132. BIN Resources/images/{account_icons → account_icons_old}/LastfmAccount_32.png
  133. BIN Resources/images/{account_icons → account_icons_old}/LastfmAccount_64.png
  134. BIN Resources/images/{account_icons → account_icons_old}/LinkedinAccount_128.png
  135. BIN Resources/images/{account_icons → account_icons_old}/LinkedinAccount_16.png
  136. BIN Resources/images/{account_icons → account_icons_old}/LinkedinAccount_32.png
  137. BIN Resources/images/{account_icons → account_icons_old}/LinkedinAccount_64.png
  138. BIN Resources/images/{account_icons → account_icons_old}/MagnoliaAccount_128.png
  139. BIN Resources/images/{account_icons → account_icons_old}/MagnoliaAccount_16.png
  140. BIN Resources/images/{account_icons → account_icons_old}/MagnoliaAccount_32.png
  141. BIN Resources/images/{account_icons → account_icons_old}/MagnoliaAccount_64.png
  142. BIN Resources/images/{account_icons → account_icons_old}/NewsvineAccount_128.png
  143. BIN Resources/images/{account_icons → account_icons_old}/NewsvineAccount_16.png
  144. BIN Resources/images/{account_icons → account_icons_old}/NewsvineAccount_32.png
  145. BIN Resources/images/{account_icons → account_icons_old}/NewsvineAccount_64.png
  146. BIN Resources/images/{account_icons → account_icons_old}/PaypalAccount_128.png
  147. BIN Resources/images/{account_icons → account_icons_old}/PaypalAccount_16.png
  148. BIN Resources/images/{account_icons → account_icons_old}/PaypalAccount_32.png
  149. BIN Resources/images/{account_icons → account_icons_old}/PaypalAccount_64.png
  150. BIN Resources/images/{account_icons → account_icons_old}/SkypeAccount_128.png
  151. BIN Resources/images/{account_icons → account_icons_old}/SkypeAccount_16.png
  152. BIN Resources/images/{account_icons → account_icons_old}/SkypeAccount_32.png
  153. BIN Resources/images/{account_icons → account_icons_old}/SkypeAccount_64.png
  154. BIN Resources/images/{account_icons → account_icons_old}/SphinnAccount_128.png
  155. BIN Resources/images/{account_icons → account_icons_old}/SphinnAccount_16.png
  156. BIN Resources/images/{account_icons → account_icons_old}/SphinnAccount_32.png
  157. BIN Resources/images/{account_icons → account_icons_old}/SphinnAccount_64.png
  158. BIN Resources/images/{account_icons → account_icons_old}/TwitterAccount_128.png
  159. BIN Resources/images/{account_icons → account_icons_old}/TwitterAccount_16.png
  160. BIN Resources/images/{account_icons → account_icons_old}/TwitterAccount_32.png
  161. BIN Resources/images/{account_icons → account_icons_old}/TwitterAccount_64.png
  162. BIN Resources/images/{account_icons → account_icons_old}/VimeoAccount_128.png
  163. BIN Resources/images/{account_icons → account_icons_old}/VimeoAccount_16.png
  164. BIN Resources/images/{account_icons → account_icons_old}/VimeoAccount_32.png
  165. BIN Resources/images/{account_icons → account_icons_old}/VimeoAccount_64.png
  166. BIN Resources/images/{account_icons → account_icons_old}/YahooAccount_128.png
  167. BIN Resources/images/{account_icons → account_icons_old}/YahooAccount_16.png
  168. BIN Resources/images/{account_icons → account_icons_old}/YahooAccount_32.png
  169. BIN Resources/images/{account_icons → account_icons_old}/YahooAccount_64.png
  170. BIN Resources/images/{account_icons → account_icons_old}/YoutubeAccount_128.png
  171. BIN Resources/images/{account_icons → account_icons_old}/YoutubeAccount_16.png
  172. BIN Resources/images/{account_icons → account_icons_old}/YoutubeAccount_32.png
  173. BIN Resources/images/{account_icons → account_icons_old}/YoutubeAccount_64.png
  174. BIN gowalla.png
View
@@ -74,6 +74,8 @@ Ti.include('/vendor/spazcore/platforms/Titanium/helpers/sys.js');
// SpazCore setup
jQuery = Titanium.Network;
sc.dumplevel = 999;
+// Helpers
+Ti.include('app/helpers/icons_helper.js');
// Citrus Specific Abstractions
Ti.include('app/models/object.js');
@@ -1,3 +1,6 @@
+# Helpers
+Ti.include('app/helpers/icons_helper.js')
+
# Main controllers
Ti.include('app/controllers/accounts_controller.js')
Ti.include('app/controllers/code_reader_controller.js')

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

Oops, something went wrong.
@@ -5,13 +5,14 @@ class SplashController extends Citrus.Controller
@store = accountStore
@codeData = codeData
@window = new Citrus.SplashWindow(this)
- root.tabGroup.activeTab.open @window.win, {animated:true}
- this.tryToShow()
+ root.tabGroup.activeTab.open @window.win, {animated:true}
+ this.tryToShow(false)
- tryToShow: () ->
+ tryToShow: (showLoading) ->
d("Trying to show "+@codeData)
- @window.showLoading()
+ showLoading ?= true
+ @window.showLoading() if showLoading
Citrus.Splash.newFromDecodedData(@codeData, (splash) =>
d("Found a splash in the decoded data, with shortcode "+splash.shortcode)

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

Oops, something went wrong.
@@ -0,0 +1,7 @@
+_.extend Citrus, {
+ getIconPath: (name) ->
+ name = (name || "Generic").toLowerCase().replace("account", "").replace("action", "")
+ path = "images/account_icons/"+name+".png"
+ d(path)
+ return path
+}
@@ -0,0 +1,11 @@
+(function() {
+ _.extend(Citrus, {
+ getIconPath: function(name) {
+ var path;
+ name = (name || "Generic").toLowerCase().replace("account", "").replace("action", "");
+ path = "images/account_icons/" + name + ".png";
+ d(path);
+ return path;
+ }
+ });
+}).call(this);
@@ -12,7 +12,7 @@ class Action extends Citrus.Object
@declares: []
@alwaysDeclared: ["actionText"]
valid: false
- icon: "images/account_icons/GenericAccount_16.png"
+ icon: Citrus.getIconPath("generic")
actionText: ""
constructor: (attributes) ->

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

Oops, something went wrong.
@@ -3,7 +3,7 @@ class FoursquareAction extends Citrus.AccountBasedAction
type: "FoursquareAction"
buttonText: "Check In"
accountType: "FoursquareAccount"
- tableViewRow: "FoursquareActionTableViewRow"
+ tableViewRow: "AccountActionTableViewRow"
readyToRun: (account) ->
unless account.isAuthorized()

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

Oops, something went wrong.
@@ -3,6 +3,7 @@ class CallAction extends Citrus.PlatformAction
type: "PlatformCallAction"
buttonText: "Call"
+ iconName: "phone"
action: (success, failure) ->
Titanium.Platform.openURL("tel:"+@phoneNumber)

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

Oops, something went wrong.
@@ -2,8 +2,8 @@ class PlatformAction extends Citrus.AccountlessAction
@declares: []
type: "PlatformAction"
buttonText: "PlatformAction"
- tableViewRow: "ActionTableViewRow"
-
+ tableViewRow: "PlatformActionTableViewRow"
+
readyToRun: () ->
return true

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

Oops, something went wrong.
@@ -3,6 +3,7 @@ class VisitLinkAction extends Citrus.PlatformAction
type: "PlatformVisitLinkAction"
buttonText: "Safari"
+ iconName: "safari"
action: (success, failure) ->
Titanium.Platform.openURL(@url)

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

Oops, something went wrong.
@@ -3,7 +3,7 @@ class TwitterAction extends Citrus.AccountBasedAction
type: "TwitterAction"
buttonText: "TwitterAction"
accountType: "TwitterAccount"
- tableViewRow: "TwitterActionTableViewRow"
+ tableViewRow: "AccountActionTableViewRow"
readyToRun: (account) ->
unless account.isAuthorized()

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

Oops, something went wrong.
@@ -10,7 +10,7 @@ class AccountTableViewRow extends Citrus.Object
row.wrapper = this
# Add image
photo = Ti.UI.createView {
- backgroundImage: 'images/account_icons/'+@account.type+'_64.png'
+ backgroundImage: Citrus.getIconPath(@account.type)
top:10
left:15
height: 40

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

Oops, something went wrong.
@@ -11,7 +11,7 @@ class NewAccountSelectWindow extends Citrus.GenericWindow
data = for klass in Citrus.AccountTypes
name = klass.prototype.type
item = Titanium.UI.createDashboardItem {
- image: "images/account_icons/"+name+'_64.png'
+ image: Citrus.getIconPath(name)
type: name
label: name.replace("Account", "")
}

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

Oops, something went wrong.
@@ -0,0 +1,6 @@
+class AccountActionTableViewRow extends Citrus.ActionRows.ActionTableViewRow
+ type: "AccountActionTableViewRow"
+ buttonText: ->
+ @action.buttonText
+
+Citrus.registerActionViewRow AccountActionTableViewRow

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

Oops, something went wrong.
@@ -38,10 +38,10 @@ class ActionTableViewRow extends Citrus.Object
# the style is the spinner type (which is proxied by a different object in titanium which
# barfs when it gets these option)
opts = {
- right:10
+ right:5
color: "#000"
- width: 80
- height: 20
+ width: this.buttonWidth()
+ height: 25
}
unless shittyTI
opts.style = style if style?
@@ -77,16 +77,18 @@ class ActionTableViewRow extends Citrus.Object
color:'#000'
text: this.text()
font:{fontSize:16, fontWeight:'bold'}
+ minimumFontSize: 12
+ width: (320 - 30 - this.textOffset() - this.buttonWidth())
}
@row.add(text)
displayPhoto: ->
photo = Ti.UI.createView {
backgroundImage: this.icon()
- top: 4
- left: 4
- height: 32
- width: 32
+ top: 5
+ left: 5
+ height: 30
+ width: 30
}
@row.add(photo)
@@ -115,7 +117,7 @@ class ActionTableViewRow extends Citrus.Object
d("Error displayed")
icon: ->
- return "images/account_icons/GenericAccount_32.png"
+ return Citrus.getIconPath(@action.accountType)
buttonText: ->
return "Run"
@@ -124,7 +126,10 @@ class ActionTableViewRow extends Citrus.Object
return @action.actionText
textOffset: ->
- return 40
+ return 42
+ buttonWidth: ->
+ return 80
+
Citrus.ActionRows = {}
Citrus.registerActionViewRow = (klass) ->
Citrus.ActionRows[klass::type] = klass

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

Oops, something went wrong.
@@ -1,7 +1,5 @@
class FacebookActionTableViewRow extends Citrus.ActionRows.ActionTableViewRow
type: "FacebookActionTableViewRow"
- icon: ->
- "images/account_icons/FacebookAccount_32.png"
buttonText: ->
@action.buttonText

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

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit f15280a

Please sign in to comment.