muck-invites 0.1.7 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (489) hide show
  1. data/.gitignore +2 -1
  2. data/README.rdoc +26 -0
  3. data/VERSION +1 -1
  4. data/app/controllers/muck/invites_controller.rb +21 -7
  5. data/app/helpers/muck_invites_helper.rb +26 -0
  6. data/app/models/invite_mailer.rb +3 -3
  7. data/app/views/invite_mailer/invite_notification.text.html.erb +6 -4
  8. data/app/views/invite_mailer/invite_notification.text.plain.erb +6 -4
  9. data/app/views/invite_mailer/invited_joined_notification.text.html.erb +2 -2
  10. data/app/views/invite_mailer/invited_joined_notification.text.plain.erb +2 -2
  11. data/app/views/invites/_contact_container.erb +13 -0
  12. data/app/views/invites/_contact_list.erb +9 -0
  13. data/app/views/invites/_contact_list_gravatar.erb +11 -0
  14. data/app/views/invites/_contacts_loading.erb +3 -0
  15. data/app/views/invites/_contacts_query.erb +16 -0
  16. data/app/views/invites/_gmail_oauth.erb +10 -0
  17. data/app/views/invites/_invite_compose.erb +58 -0
  18. data/app/views/invites/_invite_scripts.erb +60 -0
  19. data/app/views/invites/_invite_standard.erb +14 -0
  20. data/app/views/invites/compose.erb +1 -0
  21. data/app/views/invites/create.erb +1 -0
  22. data/app/views/invites/get_contacts.html.erb +7 -1
  23. data/app/views/invites/get_contacts.js.erb +8 -7
  24. data/app/views/invites/new.erb +1 -31
  25. data/config/muck_invites_routes.rb +1 -1
  26. data/lib/active_record/acts/muck_inviter.rb +2 -1
  27. data/lib/muck_invites.rb +1 -0
  28. data/locales/ar.yml +16 -12
  29. data/locales/bg.yml +15 -11
  30. data/locales/ca.yml +14 -10
  31. data/locales/cs.yml +15 -11
  32. data/locales/da.yml +9 -5
  33. data/locales/de.yml +13 -9
  34. data/locales/el.yml +13 -9
  35. data/locales/en.yml +6 -2
  36. data/locales/es.yml +14 -10
  37. data/locales/et.yml +15 -11
  38. data/locales/fa.yml +15 -11
  39. data/locales/fi.yml +15 -11
  40. data/locales/fr.yml +10 -6
  41. data/locales/gl.yml +14 -10
  42. data/locales/hi.yml +15 -11
  43. data/locales/hr.yml +18 -14
  44. data/locales/hu.yml +20 -16
  45. data/locales/id.yml +12 -8
  46. data/locales/it.yml +13 -9
  47. data/locales/iw.yml +15 -11
  48. data/locales/ja.yml +17 -13
  49. data/locales/ko.yml +15 -11
  50. data/locales/lt.yml +15 -11
  51. data/locales/lv.yml +16 -12
  52. data/locales/mt.yml +16 -12
  53. data/locales/nl.yml +14 -10
  54. data/locales/no.yml +11 -7
  55. data/locales/pl.yml +16 -12
  56. data/locales/pt-PT.yml +13 -9
  57. data/locales/ro.yml +18 -14
  58. data/locales/ru.yml +17 -13
  59. data/locales/sk.yml +16 -12
  60. data/locales/sl.yml +15 -11
  61. data/locales/sq.yml +17 -13
  62. data/locales/sr.yml +14 -10
  63. data/locales/sv.yml +16 -12
  64. data/locales/th.yml +20 -16
  65. data/locales/tl.yml +13 -9
  66. data/locales/tr.yml +18 -14
  67. data/locales/uk.yml +18 -14
  68. data/locales/vi.yml +12 -8
  69. data/locales/zh-CN.yml +13 -9
  70. data/locales/zh-TW.yml +13 -9
  71. data/locales/zh.yml +14 -10
  72. data/muck-invites.gemspec +404 -4
  73. data/public/stylesheets/muck-invites.css +14 -11
  74. data/test/rails_root/Rakefile +2 -9
  75. data/test/rails_root/app/models/user.rb +1 -0
  76. data/test/rails_root/app/views/default/index.html.erb +1 -0
  77. data/test/rails_root/app/views/layouts/default.html.erb +8 -5
  78. data/test/rails_root/config/environment.rb +3 -0
  79. data/test/rails_root/config/{global_config.yml → global_config.example.yml} +31 -0
  80. data/test/rails_root/config/initializers/oauth_consumers.rb +34 -0
  81. data/test/rails_root/db/migrate/20090730044139_add_comment_cache.rb +9 -0
  82. data/test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb +9 -0
  83. data/test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb +13 -0
  84. data/test/rails_root/db/migrate/20091205001023_create_oauth_consumer_tokens.rb +21 -0
  85. data/test/rails_root/db/migrate/20091210172015_create_oauth_tables.rb +46 -0
  86. data/test/rails_root/db/migrate/20100123035450_create_access_codes.rb +19 -0
  87. data/test/rails_root/db/migrate/20100123233654_create_access_code_requests.rb +14 -0
  88. data/test/rails_root/db/migrate/20100206000906_remove_name_fields.rb +15 -0
  89. data/test/rails_root/lib/tasks/muck.rake +7 -0
  90. data/test/rails_root/public/images/admin/Home.gif +0 -0
  91. data/test/rails_root/public/images/admin/roles.gif +0 -0
  92. data/test/rails_root/public/images/admin/source/Home.png +0 -0
  93. data/test/rails_root/public/images/admin/source/User.png +0 -0
  94. data/test/rails_root/public/images/admin/source/roles.png +0 -0
  95. data/test/rails_root/public/images/admin/user.gif +0 -0
  96. data/test/rails_root/public/images/fancybox/blank.gif +0 -0
  97. data/test/rails_root/public/images/fancybox/fancy_close.png +0 -0
  98. data/test/rails_root/public/images/fancybox/fancy_loading.png +0 -0
  99. data/test/rails_root/public/images/fancybox/fancy_nav_left.png +0 -0
  100. data/test/rails_root/public/images/fancybox/fancy_nav_right.png +0 -0
  101. data/test/rails_root/public/images/fancybox/fancy_shadow_e.png +0 -0
  102. data/test/rails_root/public/images/fancybox/fancy_shadow_n.png +0 -0
  103. data/test/rails_root/public/images/fancybox/fancy_shadow_ne.png +0 -0
  104. data/test/rails_root/public/images/fancybox/fancy_shadow_nw.png +0 -0
  105. data/test/rails_root/public/images/fancybox/fancy_shadow_s.png +0 -0
  106. data/test/rails_root/public/images/fancybox/fancy_shadow_se.png +0 -0
  107. data/test/rails_root/public/images/fancybox/fancy_shadow_sw.png +0 -0
  108. data/test/rails_root/public/images/fancybox/fancy_shadow_w.png +0 -0
  109. data/test/rails_root/public/images/fancybox/fancy_title_left.png +0 -0
  110. data/test/rails_root/public/images/fancybox/fancy_title_main.png +0 -0
  111. data/test/rails_root/public/images/fancybox/fancy_title_over.png +0 -0
  112. data/test/rails_root/public/images/fancybox/fancy_title_right.png +0 -0
  113. data/test/rails_root/public/images/fancybox/fancybox-x.png +0 -0
  114. data/test/rails_root/public/images/fancybox/fancybox-y.png +0 -0
  115. data/test/rails_root/public/images/fancybox/fancybox.png +0 -0
  116. data/test/rails_root/public/images/service_icons/16/amazon.png +0 -0
  117. data/test/rails_root/public/images/service_icons/16/ask.png +0 -0
  118. data/test/rails_root/public/images/service_icons/16/bibsonomy.png +0 -0
  119. data/test/rails_root/public/images/service_icons/16/bing.png +0 -0
  120. data/test/rails_root/public/images/service_icons/16/blogger.png +0 -0
  121. data/test/rails_root/public/images/service_icons/16/bloglines.png +0 -0
  122. data/test/rails_root/public/images/service_icons/16/citeulike.png +0 -0
  123. data/test/rails_root/public/images/service_icons/16/clipmarks.png +0 -0
  124. data/test/rails_root/public/images/service_icons/16/connotea.png +0 -0
  125. data/test/rails_root/public/images/service_icons/16/dailymotion.png +0 -0
  126. data/test/rails_root/public/images/service_icons/16/delicious.png +0 -0
  127. data/test/rails_root/public/images/service_icons/16/digg.png +0 -0
  128. data/test/rails_root/public/images/service_icons/16/diigo.png +0 -0
  129. data/test/rails_root/public/images/service_icons/16/facebook.png +0 -0
  130. data/test/rails_root/public/images/service_icons/16/feed.png +0 -0
  131. data/test/rails_root/public/images/service_icons/16/fireeagle.png +0 -0
  132. data/test/rails_root/public/images/service_icons/16/flickr.png +0 -0
  133. data/test/rails_root/public/images/service_icons/16/fotolog.png +0 -0
  134. data/test/rails_root/public/images/service_icons/16/friendfeed.png +0 -0
  135. data/test/rails_root/public/images/service_icons/16/friendster.png +0 -0
  136. data/test/rails_root/public/images/service_icons/16/furl.png +0 -0
  137. data/test/rails_root/public/images/service_icons/16/goodreads.png +0 -0
  138. data/test/rails_root/public/images/service_icons/16/google.png +0 -0
  139. data/test/rails_root/public/images/service_icons/16/googleblog.png +0 -0
  140. data/test/rails_root/public/images/service_icons/16/googlenews.png +0 -0
  141. data/test/rails_root/public/images/service_icons/16/icerocket.png +0 -0
  142. data/test/rails_root/public/images/service_icons/16/identica.png +0 -0
  143. data/test/rails_root/public/images/service_icons/16/joost.png +0 -0
  144. data/test/rails_root/public/images/service_icons/16/lastfm.png +0 -0
  145. data/test/rails_root/public/images/service_icons/16/librarything.png +0 -0
  146. data/test/rails_root/public/images/service_icons/16/linkedin.png +0 -0
  147. data/test/rails_root/public/images/service_icons/16/livejournal.png +0 -0
  148. data/test/rails_root/public/images/service_icons/16/magnolia.png +0 -0
  149. data/test/rails_root/public/images/service_icons/16/mendeley.png +0 -0
  150. data/test/rails_root/public/images/service_icons/16/metacafe.png +0 -0
  151. data/test/rails_root/public/images/service_icons/16/mixx.png +0 -0
  152. data/test/rails_root/public/images/service_icons/16/myspace.png +0 -0
  153. data/test/rails_root/public/images/service_icons/16/netflix.png +0 -0
  154. data/test/rails_root/public/images/service_icons/16/netvibes.png +0 -0
  155. data/test/rails_root/public/images/service_icons/16/newsvine.png +0 -0
  156. data/test/rails_root/public/images/service_icons/16/oai.png +0 -0
  157. data/test/rails_root/public/images/service_icons/16/odeo.png +0 -0
  158. data/test/rails_root/public/images/service_icons/16/opml.png +0 -0
  159. data/test/rails_root/public/images/service_icons/16/pandora.png +0 -0
  160. data/test/rails_root/public/images/service_icons/16/photobucket.png +0 -0
  161. data/test/rails_root/public/images/service_icons/16/picasa.png +0 -0
  162. data/test/rails_root/public/images/service_icons/16/polyvore.png +0 -0
  163. data/test/rails_root/public/images/service_icons/16/pownce.png +0 -0
  164. data/test/rails_root/public/images/service_icons/16/reddit.png +0 -0
  165. data/test/rails_root/public/images/service_icons/16/simpy.png +0 -0
  166. data/test/rails_root/public/images/service_icons/16/smugmug.png +0 -0
  167. data/test/rails_root/public/images/service_icons/16/stumbleupon.png +0 -0
  168. data/test/rails_root/public/images/service_icons/16/tag.png +0 -0
  169. data/test/rails_root/public/images/service_icons/16/technorati.png +0 -0
  170. data/test/rails_root/public/images/service_icons/16/tumblr.png +0 -0
  171. data/test/rails_root/public/images/service_icons/16/twine.png +0 -0
  172. data/test/rails_root/public/images/service_icons/16/twitter.png +0 -0
  173. data/test/rails_root/public/images/service_icons/16/vimeo.png +0 -0
  174. data/test/rails_root/public/images/service_icons/16/webshots.png +0 -0
  175. data/test/rails_root/public/images/service_icons/16/wordpress.png +0 -0
  176. data/test/rails_root/public/images/service_icons/16/xanga.png +0 -0
  177. data/test/rails_root/public/images/service_icons/16/yahoo.png +0 -0
  178. data/test/rails_root/public/images/service_icons/16/yelp.png +0 -0
  179. data/test/rails_root/public/images/service_icons/16/youtube.png +0 -0
  180. data/test/rails_root/public/images/service_icons/16/zooomr.png +0 -0
  181. data/test/rails_root/public/images/service_icons/16/zotero.png +0 -0
  182. data/test/rails_root/public/images/service_icons/24/amazon.png +0 -0
  183. data/test/rails_root/public/images/service_icons/24/ask.png +0 -0
  184. data/test/rails_root/public/images/service_icons/24/bibsonomy.png +0 -0
  185. data/test/rails_root/public/images/service_icons/24/bing.png +0 -0
  186. data/test/rails_root/public/images/service_icons/24/blogger.png +0 -0
  187. data/test/rails_root/public/images/service_icons/24/bloglines.png +0 -0
  188. data/test/rails_root/public/images/service_icons/24/citeulike.png +0 -0
  189. data/test/rails_root/public/images/service_icons/24/clipmarks.png +0 -0
  190. data/test/rails_root/public/images/service_icons/24/connotea.png +0 -0
  191. data/test/rails_root/public/images/service_icons/24/dailymotion.png +0 -0
  192. data/test/rails_root/public/images/service_icons/24/delicious.png +0 -0
  193. data/test/rails_root/public/images/service_icons/24/digg.png +0 -0
  194. data/test/rails_root/public/images/service_icons/24/diigo.png +0 -0
  195. data/test/rails_root/public/images/service_icons/24/facebook.png +0 -0
  196. data/test/rails_root/public/images/service_icons/24/feed.png +0 -0
  197. data/test/rails_root/public/images/service_icons/24/fireeagle.png +0 -0
  198. data/test/rails_root/public/images/service_icons/24/flickr.png +0 -0
  199. data/test/rails_root/public/images/service_icons/24/fotolog.png +0 -0
  200. data/test/rails_root/public/images/service_icons/24/friendfeed.png +0 -0
  201. data/test/rails_root/public/images/service_icons/24/friendster.png +0 -0
  202. data/test/rails_root/public/images/service_icons/24/furl.png +0 -0
  203. data/test/rails_root/public/images/service_icons/24/goodreads.png +0 -0
  204. data/test/rails_root/public/images/service_icons/24/google.png +0 -0
  205. data/test/rails_root/public/images/service_icons/24/googleblog.png +0 -0
  206. data/test/rails_root/public/images/service_icons/24/googlenews.png +0 -0
  207. data/test/rails_root/public/images/service_icons/24/icerocket.png +0 -0
  208. data/test/rails_root/public/images/service_icons/24/identica.png +0 -0
  209. data/test/rails_root/public/images/service_icons/24/joost.png +0 -0
  210. data/test/rails_root/public/images/service_icons/24/lastfm.png +0 -0
  211. data/test/rails_root/public/images/service_icons/24/librarything.png +0 -0
  212. data/test/rails_root/public/images/service_icons/24/linkedin.png +0 -0
  213. data/test/rails_root/public/images/service_icons/24/livejournal.png +0 -0
  214. data/test/rails_root/public/images/service_icons/24/magnolia.png +0 -0
  215. data/test/rails_root/public/images/service_icons/24/mendeley.png +0 -0
  216. data/test/rails_root/public/images/service_icons/24/metacafe.png +0 -0
  217. data/test/rails_root/public/images/service_icons/24/mixx.png +0 -0
  218. data/test/rails_root/public/images/service_icons/24/myspace.png +0 -0
  219. data/test/rails_root/public/images/service_icons/24/netflix.png +0 -0
  220. data/test/rails_root/public/images/service_icons/24/netvibes.png +0 -0
  221. data/test/rails_root/public/images/service_icons/24/newsvine.png +0 -0
  222. data/test/rails_root/public/images/service_icons/24/oai.png +0 -0
  223. data/test/rails_root/public/images/service_icons/24/odeo.png +0 -0
  224. data/test/rails_root/public/images/service_icons/24/opml.png +0 -0
  225. data/test/rails_root/public/images/service_icons/24/pandora.png +0 -0
  226. data/test/rails_root/public/images/service_icons/24/photobucket.png +0 -0
  227. data/test/rails_root/public/images/service_icons/24/picasa.png +0 -0
  228. data/test/rails_root/public/images/service_icons/24/polyvore.png +0 -0
  229. data/test/rails_root/public/images/service_icons/24/pownce.png +0 -0
  230. data/test/rails_root/public/images/service_icons/24/reddit.png +0 -0
  231. data/test/rails_root/public/images/service_icons/24/simpy.png +0 -0
  232. data/test/rails_root/public/images/service_icons/24/smugmug.png +0 -0
  233. data/test/rails_root/public/images/service_icons/24/stumbleupon.png +0 -0
  234. data/test/rails_root/public/images/service_icons/24/tag.png +0 -0
  235. data/test/rails_root/public/images/service_icons/24/technorati.png +0 -0
  236. data/test/rails_root/public/images/service_icons/24/tumblr.png +0 -0
  237. data/test/rails_root/public/images/service_icons/24/twine.png +0 -0
  238. data/test/rails_root/public/images/service_icons/24/twitter.png +0 -0
  239. data/test/rails_root/public/images/service_icons/24/vimeo.png +0 -0
  240. data/test/rails_root/public/images/service_icons/24/webshots.png +0 -0
  241. data/test/rails_root/public/images/service_icons/24/wordpress.png +0 -0
  242. data/test/rails_root/public/images/service_icons/24/xanga.png +0 -0
  243. data/test/rails_root/public/images/service_icons/24/yahoo.png +0 -0
  244. data/test/rails_root/public/images/service_icons/24/yelp.png +0 -0
  245. data/test/rails_root/public/images/service_icons/24/youtube.png +0 -0
  246. data/test/rails_root/public/images/service_icons/24/zooomr.png +0 -0
  247. data/test/rails_root/public/images/service_icons/24/zotero.png +0 -0
  248. data/test/rails_root/public/images/service_icons/48/amazon.png +0 -0
  249. data/test/rails_root/public/images/service_icons/48/ask.png +0 -0
  250. data/test/rails_root/public/images/service_icons/48/bibsonomy.png +0 -0
  251. data/test/rails_root/public/images/service_icons/48/bing.png +0 -0
  252. data/test/rails_root/public/images/service_icons/48/blogger.png +0 -0
  253. data/test/rails_root/public/images/service_icons/48/bloglines.png +0 -0
  254. data/test/rails_root/public/images/service_icons/48/citeulike.png +0 -0
  255. data/test/rails_root/public/images/service_icons/48/clipmarks.png +0 -0
  256. data/test/rails_root/public/images/service_icons/48/connotea.png +0 -0
  257. data/test/rails_root/public/images/service_icons/48/dailymotion.png +0 -0
  258. data/test/rails_root/public/images/service_icons/48/delicious.png +0 -0
  259. data/test/rails_root/public/images/service_icons/48/digg.png +0 -0
  260. data/test/rails_root/public/images/service_icons/48/diigo.png +0 -0
  261. data/test/rails_root/public/images/service_icons/48/facebook.png +0 -0
  262. data/test/rails_root/public/images/service_icons/48/feed.png +0 -0
  263. data/test/rails_root/public/images/service_icons/48/fireeagle.png +0 -0
  264. data/test/rails_root/public/images/service_icons/48/flickr.png +0 -0
  265. data/test/rails_root/public/images/service_icons/48/fotolog.png +0 -0
  266. data/test/rails_root/public/images/service_icons/48/friendfeed.png +0 -0
  267. data/test/rails_root/public/images/service_icons/48/friendster.png +0 -0
  268. data/test/rails_root/public/images/service_icons/48/furl.png +0 -0
  269. data/test/rails_root/public/images/service_icons/48/goodreads.png +0 -0
  270. data/test/rails_root/public/images/service_icons/48/google.png +0 -0
  271. data/test/rails_root/public/images/service_icons/48/googleblog.png +0 -0
  272. data/test/rails_root/public/images/service_icons/48/googlenews.png +0 -0
  273. data/test/rails_root/public/images/service_icons/48/icerocket.png +0 -0
  274. data/test/rails_root/public/images/service_icons/48/identica.png +0 -0
  275. data/test/rails_root/public/images/service_icons/48/joost.png +0 -0
  276. data/test/rails_root/public/images/service_icons/48/lastfm.png +0 -0
  277. data/test/rails_root/public/images/service_icons/48/librarything.png +0 -0
  278. data/test/rails_root/public/images/service_icons/48/linkedin.png +0 -0
  279. data/test/rails_root/public/images/service_icons/48/livejournal.png +0 -0
  280. data/test/rails_root/public/images/service_icons/48/magnolia.png +0 -0
  281. data/test/rails_root/public/images/service_icons/48/mendeley.png +0 -0
  282. data/test/rails_root/public/images/service_icons/48/metacafe.png +0 -0
  283. data/test/rails_root/public/images/service_icons/48/mixx.png +0 -0
  284. data/test/rails_root/public/images/service_icons/48/myspace.png +0 -0
  285. data/test/rails_root/public/images/service_icons/48/netflix.png +0 -0
  286. data/test/rails_root/public/images/service_icons/48/netvibes.png +0 -0
  287. data/test/rails_root/public/images/service_icons/48/newsvine.png +0 -0
  288. data/test/rails_root/public/images/service_icons/48/oai.png +0 -0
  289. data/test/rails_root/public/images/service_icons/48/odeo.png +0 -0
  290. data/test/rails_root/public/images/service_icons/48/opml.png +0 -0
  291. data/test/rails_root/public/images/service_icons/48/pandora.png +0 -0
  292. data/test/rails_root/public/images/service_icons/48/photobucket.png +0 -0
  293. data/test/rails_root/public/images/service_icons/48/picasa.png +0 -0
  294. data/test/rails_root/public/images/service_icons/48/polyvore.png +0 -0
  295. data/test/rails_root/public/images/service_icons/48/pownce.png +0 -0
  296. data/test/rails_root/public/images/service_icons/48/reddit.png +0 -0
  297. data/test/rails_root/public/images/service_icons/48/simpy.png +0 -0
  298. data/test/rails_root/public/images/service_icons/48/smugmug.png +0 -0
  299. data/test/rails_root/public/images/service_icons/48/stumbleupon.png +0 -0
  300. data/test/rails_root/public/images/service_icons/48/tag.png +0 -0
  301. data/test/rails_root/public/images/service_icons/48/technorati.png +0 -0
  302. data/test/rails_root/public/images/service_icons/48/tumblr.png +0 -0
  303. data/test/rails_root/public/images/service_icons/48/twine.png +0 -0
  304. data/test/rails_root/public/images/service_icons/48/twitter.png +0 -0
  305. data/test/rails_root/public/images/service_icons/48/vimeo.png +0 -0
  306. data/test/rails_root/public/images/service_icons/48/webshots.png +0 -0
  307. data/test/rails_root/public/images/service_icons/48/wordpress.png +0 -0
  308. data/test/rails_root/public/images/service_icons/48/xanga.png +0 -0
  309. data/test/rails_root/public/images/service_icons/48/yahoo.png +0 -0
  310. data/test/rails_root/public/images/service_icons/48/yelp.png +0 -0
  311. data/test/rails_root/public/images/service_icons/48/youtube.png +0 -0
  312. data/test/rails_root/public/images/service_icons/48/zooomr.png +0 -0
  313. data/test/rails_root/public/images/service_icons/48/zotero.png +0 -0
  314. data/test/rails_root/public/images/service_icons/60/amazon.png +0 -0
  315. data/test/rails_root/public/images/service_icons/60/ask.png +0 -0
  316. data/test/rails_root/public/images/service_icons/60/bibsonomy.png +0 -0
  317. data/test/rails_root/public/images/service_icons/60/bing.png +0 -0
  318. data/test/rails_root/public/images/service_icons/60/blogger.png +0 -0
  319. data/test/rails_root/public/images/service_icons/60/bloglines.png +0 -0
  320. data/test/rails_root/public/images/service_icons/60/citeulike.png +0 -0
  321. data/test/rails_root/public/images/service_icons/60/clipmarks.png +0 -0
  322. data/test/rails_root/public/images/service_icons/60/connotea.png +0 -0
  323. data/test/rails_root/public/images/service_icons/60/dailymotion.png +0 -0
  324. data/test/rails_root/public/images/service_icons/60/delicious.png +0 -0
  325. data/test/rails_root/public/images/service_icons/60/digg.png +0 -0
  326. data/test/rails_root/public/images/service_icons/60/diigo.png +0 -0
  327. data/test/rails_root/public/images/service_icons/60/facebook.png +0 -0
  328. data/test/rails_root/public/images/service_icons/60/feed.png +0 -0
  329. data/test/rails_root/public/images/service_icons/60/fireeagle.png +0 -0
  330. data/test/rails_root/public/images/service_icons/60/flickr.png +0 -0
  331. data/test/rails_root/public/images/service_icons/60/fotolog.png +0 -0
  332. data/test/rails_root/public/images/service_icons/60/friendfeed.png +0 -0
  333. data/test/rails_root/public/images/service_icons/60/friendster.png +0 -0
  334. data/test/rails_root/public/images/service_icons/60/furl.png +0 -0
  335. data/test/rails_root/public/images/service_icons/60/goodreads.png +0 -0
  336. data/test/rails_root/public/images/service_icons/60/google.png +0 -0
  337. data/test/rails_root/public/images/service_icons/60/googleblog.png +0 -0
  338. data/test/rails_root/public/images/service_icons/60/googlenews.png +0 -0
  339. data/test/rails_root/public/images/service_icons/60/icerocket.png +0 -0
  340. data/test/rails_root/public/images/service_icons/60/identica.png +0 -0
  341. data/test/rails_root/public/images/service_icons/60/joost.png +0 -0
  342. data/test/rails_root/public/images/service_icons/60/lastfm.png +0 -0
  343. data/test/rails_root/public/images/service_icons/60/librarything.png +0 -0
  344. data/test/rails_root/public/images/service_icons/60/linkedin.png +0 -0
  345. data/test/rails_root/public/images/service_icons/60/livejournal.png +0 -0
  346. data/test/rails_root/public/images/service_icons/60/magnolia.png +0 -0
  347. data/test/rails_root/public/images/service_icons/60/mendeley.png +0 -0
  348. data/test/rails_root/public/images/service_icons/60/metacafe.png +0 -0
  349. data/test/rails_root/public/images/service_icons/60/mixx.png +0 -0
  350. data/test/rails_root/public/images/service_icons/60/myspace.png +0 -0
  351. data/test/rails_root/public/images/service_icons/60/netflix.png +0 -0
  352. data/test/rails_root/public/images/service_icons/60/netvibes.png +0 -0
  353. data/test/rails_root/public/images/service_icons/60/newsvine.png +0 -0
  354. data/test/rails_root/public/images/service_icons/60/oai.png +0 -0
  355. data/test/rails_root/public/images/service_icons/60/odeo.png +0 -0
  356. data/test/rails_root/public/images/service_icons/60/opml.png +0 -0
  357. data/test/rails_root/public/images/service_icons/60/pandora.png +0 -0
  358. data/test/rails_root/public/images/service_icons/60/photobucket.png +0 -0
  359. data/test/rails_root/public/images/service_icons/60/picasa.png +0 -0
  360. data/test/rails_root/public/images/service_icons/60/polyvore.png +0 -0
  361. data/test/rails_root/public/images/service_icons/60/pownce.png +0 -0
  362. data/test/rails_root/public/images/service_icons/60/reddit.png +0 -0
  363. data/test/rails_root/public/images/service_icons/60/simpy.png +0 -0
  364. data/test/rails_root/public/images/service_icons/60/smugmug.png +0 -0
  365. data/test/rails_root/public/images/service_icons/60/stumbleupon.png +0 -0
  366. data/test/rails_root/public/images/service_icons/60/tag.png +0 -0
  367. data/test/rails_root/public/images/service_icons/60/technorati.png +0 -0
  368. data/test/rails_root/public/images/service_icons/60/tumblr.png +0 -0
  369. data/test/rails_root/public/images/service_icons/60/twine.png +0 -0
  370. data/test/rails_root/public/images/service_icons/60/twitter.png +0 -0
  371. data/test/rails_root/public/images/service_icons/60/vimeo.png +0 -0
  372. data/test/rails_root/public/images/service_icons/60/webshots.png +0 -0
  373. data/test/rails_root/public/images/service_icons/60/wordpress.png +0 -0
  374. data/test/rails_root/public/images/service_icons/60/xanga.png +0 -0
  375. data/test/rails_root/public/images/service_icons/60/yahoo.png +0 -0
  376. data/test/rails_root/public/images/service_icons/60/yelp.png +0 -0
  377. data/test/rails_root/public/images/service_icons/60/youtube.png +0 -0
  378. data/test/rails_root/public/images/service_icons/60/zooomr.png +0 -0
  379. data/test/rails_root/public/images/service_icons/60/zotero.png +0 -0
  380. data/test/rails_root/public/images/service_icons/facebook_friend_links.jpg +0 -0
  381. data/test/rails_root/public/images/service_icons/facebook_my_links.jpg +0 -0
  382. data/test/rails_root/public/images/service_icons/source/Aquaticus_Social_Icon_template_by_jwloh.psd +0 -0
  383. data/test/rails_root/public/images/service_icons/source/Google.psd +0 -0
  384. data/test/rails_root/public/images/service_icons/source/Quake 9 Design.webloc b/data/test/rails_root/public/images/service_icons/source/Quake 9 → Design.webloc +0 -0
  385. data/test/rails_root/public/images/service_icons/source/ReadMe.rtf +52 -0
  386. data/test/rails_root/public/images/service_icons/source/amazon.png +0 -0
  387. data/test/rails_root/public/images/service_icons/source/aquaticus.social.png +0 -0
  388. data/test/rails_root/public/images/service_icons/source/ask.png +0 -0
  389. data/test/rails_root/public/images/service_icons/source/ask.psd +0 -0
  390. data/test/rails_root/public/images/service_icons/source/bibsonomy.png +0 -0
  391. data/test/rails_root/public/images/service_icons/source/bibsonomy.psd +0 -0
  392. data/test/rails_root/public/images/service_icons/source/bing.png +0 -0
  393. data/test/rails_root/public/images/service_icons/source/bing.psd +0 -0
  394. data/test/rails_root/public/images/service_icons/source/blogger.png +0 -0
  395. data/test/rails_root/public/images/service_icons/source/bloglines.png +0 -0
  396. data/test/rails_root/public/images/service_icons/source/bloglines.psd +0 -0
  397. data/test/rails_root/public/images/service_icons/source/citeulike.png +0 -0
  398. data/test/rails_root/public/images/service_icons/source/clipmarks.png +0 -0
  399. data/test/rails_root/public/images/service_icons/source/connotea.png +0 -0
  400. data/test/rails_root/public/images/service_icons/source/connotea.psd +0 -0
  401. data/test/rails_root/public/images/service_icons/source/dailymotion.png +0 -0
  402. data/test/rails_root/public/images/service_icons/source/delicious.png +0 -0
  403. data/test/rails_root/public/images/service_icons/source/digg.png +0 -0
  404. data/test/rails_root/public/images/service_icons/source/diigo.png +0 -0
  405. data/test/rails_root/public/images/service_icons/source/facebook.png +0 -0
  406. data/test/rails_root/public/images/service_icons/source/feed.png +0 -0
  407. data/test/rails_root/public/images/service_icons/source/fireeagle.psd +0 -0
  408. data/test/rails_root/public/images/service_icons/source/flickr.png +0 -0
  409. data/test/rails_root/public/images/service_icons/source/fotolog.png +0 -0
  410. data/test/rails_root/public/images/service_icons/source/friendfeed.png +0 -0
  411. data/test/rails_root/public/images/service_icons/source/friendster.png +0 -0
  412. data/test/rails_root/public/images/service_icons/source/furl.png +0 -0
  413. data/test/rails_root/public/images/service_icons/source/goodreads.png +0 -0
  414. data/test/rails_root/public/images/service_icons/source/google.png +0 -0
  415. data/test/rails_root/public/images/service_icons/source/googleblog.png +0 -0
  416. data/test/rails_root/public/images/service_icons/source/googlenews.png +0 -0
  417. data/test/rails_root/public/images/service_icons/source/icerocket.png +0 -0
  418. data/test/rails_root/public/images/service_icons/source/icerocket.psd +0 -0
  419. data/test/rails_root/public/images/service_icons/source/identica.png +0 -0
  420. data/test/rails_root/public/images/service_icons/source/joost.png +0 -0
  421. data/test/rails_root/public/images/service_icons/source/lastfm.png +0 -0
  422. data/test/rails_root/public/images/service_icons/source/librarything.png +0 -0
  423. data/test/rails_root/public/images/service_icons/source/linkedin.png +0 -0
  424. data/test/rails_root/public/images/service_icons/source/livejournal.png +0 -0
  425. data/test/rails_root/public/images/service_icons/source/magnolia.png +0 -0
  426. data/test/rails_root/public/images/service_icons/source/mendeley.png +0 -0
  427. data/test/rails_root/public/images/service_icons/source/metacafe.png +0 -0
  428. data/test/rails_root/public/images/service_icons/source/metacafe.psd +0 -0
  429. data/test/rails_root/public/images/service_icons/source/mixx.png +0 -0
  430. data/test/rails_root/public/images/service_icons/source/myspace.png +0 -0
  431. data/test/rails_root/public/images/service_icons/source/netflix.png +0 -0
  432. data/test/rails_root/public/images/service_icons/source/netvibes.png +0 -0
  433. data/test/rails_root/public/images/service_icons/source/newsvine.png +0 -0
  434. data/test/rails_root/public/images/service_icons/source/oai.png +0 -0
  435. data/test/rails_root/public/images/service_icons/source/odeo.png +0 -0
  436. data/test/rails_root/public/images/service_icons/source/opml.png +0 -0
  437. data/test/rails_root/public/images/service_icons/source/pandora.png +0 -0
  438. data/test/rails_root/public/images/service_icons/source/photobucket.png +0 -0
  439. data/test/rails_root/public/images/service_icons/source/picasa.png +0 -0
  440. data/test/rails_root/public/images/service_icons/source/polyvore.png +0 -0
  441. data/test/rails_root/public/images/service_icons/source/pownce.png +0 -0
  442. data/test/rails_root/public/images/service_icons/source/reddit.png +0 -0
  443. data/test/rails_root/public/images/service_icons/source/simpy.png +0 -0
  444. data/test/rails_root/public/images/service_icons/source/smugmug.png +0 -0
  445. data/test/rails_root/public/images/service_icons/source/stumbleupon.png +0 -0
  446. data/test/rails_root/public/images/service_icons/source/tag.png +0 -0
  447. data/test/rails_root/public/images/service_icons/source/technorati.png +0 -0
  448. data/test/rails_root/public/images/service_icons/source/template.png +0 -0
  449. data/test/rails_root/public/images/service_icons/source/tumblr.png +0 -0
  450. data/test/rails_root/public/images/service_icons/source/twine.png +0 -0
  451. data/test/rails_root/public/images/service_icons/source/twine.psd +0 -0
  452. data/test/rails_root/public/images/service_icons/source/twitter.png +0 -0
  453. data/test/rails_root/public/images/service_icons/source/vimeo.png +0 -0
  454. data/test/rails_root/public/images/service_icons/source/webshots.png +0 -0
  455. data/test/rails_root/public/images/service_icons/source/wordpress.png +0 -0
  456. data/test/rails_root/public/images/service_icons/source/xanga.png +0 -0
  457. data/test/rails_root/public/images/service_icons/source/yahoo.png +0 -0
  458. data/test/rails_root/public/images/service_icons/source/yelp.png +0 -0
  459. data/test/rails_root/public/images/service_icons/source/youtube.png +0 -0
  460. data/test/rails_root/public/images/service_icons/source/zooomr.png +0 -0
  461. data/test/rails_root/public/images/service_icons/source/zotero.png +0 -0
  462. data/test/rails_root/public/javascripts/application.js +0 -2
  463. data/test/rails_root/public/javascripts/jquery/jquery.autocomplete.js.readme +1 -1
  464. data/test/rails_root/public/javascripts/jquery/jquery.easing.js +72 -1
  465. data/test/rails_root/public/javascripts/jquery/jquery.fancybox.js +34 -6
  466. data/test/rails_root/public/javascripts/jquery/jquery.form.js +511 -473
  467. data/test/rails_root/public/javascripts/jquery/jquery.jgrowl.js +9 -2
  468. data/test/rails_root/public/javascripts/jquery/jquery.js +150 -15
  469. data/test/rails_root/public/javascripts/jquery/jquery.mousewheel.js +13 -0
  470. data/test/rails_root/public/javascripts/jquery/jquery.tips.js +7 -2
  471. data/test/rails_root/public/javascripts/muck-countries.js +50 -0
  472. data/test/rails_root/public/javascripts/muck-src.js +134 -0
  473. data/test/rails_root/public/javascripts/muck-users.js +24 -0
  474. data/test/rails_root/public/javascripts/muck.js +6 -127
  475. data/test/rails_root/public/javascripts/muck_activities.js +44 -45
  476. data/test/rails_root/public/stylesheets/admin.css +36 -8
  477. data/test/rails_root/public/stylesheets/jquery/cupertino/jquery-ui-1.7.2.custom.css +160 -0
  478. data/test/rails_root/public/stylesheets/jquery/jquery.fancybox.css +77 -38
  479. data/test/rails_root/public/stylesheets/jquery/redmond/jquery-ui-1.7.2.custom.css +160 -0
  480. data/test/rails_root/public/stylesheets/jquery/smoothness/jquery-ui-1.7.2.custom.css +160 -0
  481. data/test/rails_root/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.2.custom.css +160 -0
  482. data/test/rails_root/public/stylesheets/muck-activities.css +39 -0
  483. data/test/rails_root/public/stylesheets/muck-invites.css +14 -11
  484. data/test/rails_root/public/stylesheets/styles.css +17 -9
  485. data/test/rails_root/test/functional/invites_controller_test.rb +21 -7
  486. data/test/rails_root/test/unit/invite_mailer_test.rb +1 -1
  487. data/test/rails_root/test/unit/invitee_test.rb +6 -6
  488. metadata +405 -5
  489. data/app/views/invites/_get_contacts.erb +0 -27
data/.gitignore CHANGED
@@ -26,4 +26,5 @@ coverage
26
26
  rdoc
27
27
  pkg
28
28
  pkg/*
29
- log/*
29
+ log/*
30
+ global_config.yml
data/README.rdoc CHANGED
@@ -2,12 +2,38 @@
2
2
  Make it easy to let users invite other users.
3
3
 
4
4
  == Setup
5
+ Install the gem:
6
+
7
+ sudo gem install muck-invites
8
+
9
+ and add it to environment.rb:
10
+
11
+ == Javascript and CSS
5
12
  Be sure to include muck.js:
6
13
  <%= javascript_include_tag %w{ muck.js } %>
7
14
 
15
+ You can include muck-invites.css or copy and paste the styles and change them as desired:
16
+ <%= stylesheet_link_tag 'muck-invites' -%>
17
+
8
18
  Include a link to initialize the invite process. You might want to do this in a lightbox.
9
19
  <%= link_to 'Invite Your Friends', new_invite_path, :class => 'invite_box' %>
10
20
 
21
+ The invite list can include photos from gravatar. To enable this functionality add this to global_config.yml
22
+
23
+ use_gravatar_in_photo_list: true
24
+
25
+ === Oauth
26
+ The invite system can use oauth where available to acquire contacts. To enable this functionality install the
27
+ muck-oauth gem:
28
+
29
+ sudo gem install muck-oauth
30
+
31
+ and add it to your environment.rb
32
+
33
+ config.gem 'muck-oauth', :lib => 'muck_oauth'
34
+
35
+ See the muck-oauth gem for more information - http://github.com/tatemae/muck-oauth
36
+
11
37
  === Inviter model
12
38
  Add 'acts_as_muck_inviter' to the class that you wish to have do the inviting. This is commonly the user model, but
13
39
  might also be another model - for example Event.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.10
@@ -12,6 +12,15 @@ class Muck::InvitesController < ApplicationController
12
12
  end
13
13
  end
14
14
 
15
+ def compose
16
+ flash.discard
17
+ respond_to do |format|
18
+ format.html { render :template => 'invites/compose' }
19
+ format.pjs { render :template => 'invites/compose', :layout => false }
20
+ format.js { render :template => 'invites/compose', :layout => false }
21
+ end
22
+ end
23
+
15
24
  def get_contacts
16
25
  @success = true
17
26
  begin
@@ -30,22 +39,27 @@ class Muck::InvitesController < ApplicationController
30
39
  render :template => 'invites/get_contacts'
31
40
  end
32
41
  format.json { render :json => { :success => @success, :message => @message, :contacts => @contacts.as_json } }
33
- format.js { render :template => 'invites/get_contacts', :layout => false }
42
+ format.js do
43
+ @render_contacts_into = params[:render_contacts_into] || 'invite-contacts'
44
+ render :template => 'invites/get_contacts', :layout => false
45
+ end
34
46
  end
35
47
  end
36
48
 
37
49
  def create
38
50
  if params[:emails]
39
- current_user.invite(params[:emails], current_user)
40
- message = t('muck.invites.create_success', :emails => params[:emails].join(', '), :app_name => GlobalConfig.application_name)
51
+ emails = params[:emails]
52
+ emails = emails.join(', ') if emails.is_a?(Array)
53
+ current_user.invite(params[:emails], params[:message], current_user)
54
+ @message = t('muck.invites.create_success', :emails => emails, :app_name => GlobalConfig.application_name)
41
55
  end
42
56
  respond_to do |format|
43
57
  format.html do
44
- flash[:notice] = message
45
- redirect_to('/')
58
+ flash[:notice] = @message
59
+ redirect_back_or_default('/')
46
60
  end
47
- format.pjs { render :text => message }
48
- format.js { render :text => message }
61
+ format.pjs { render :template => 'invites/create', :layout => false }
62
+ format.js { render :template => 'invites/create', :layout => false }
49
63
  end
50
64
 
51
65
  rescue ActiveRecord::RecordInvalid => ex
@@ -0,0 +1,26 @@
1
+ module MuckInvitesHelper
2
+
3
+ def contact_list(contacts)
4
+ if GlobalConfig.use_gravatar_in_photo_list
5
+ render :partial => 'invites/contact_list_gravatar', :locals => { :contacts => contacts }
6
+ else
7
+ render :partial => 'invites/contact_list', :locals => { :contacts => contacts }
8
+ end
9
+ end
10
+
11
+ def invite_ajax_message_container
12
+ output_message_container('invite-messages', 'invite-messages-container')
13
+ end
14
+
15
+ def invite_ajax_message(message)
16
+ %Q{
17
+ jQuery('#invite-messages-container').show();
18
+ jQuery('#invite-messages').html('#{escape_javascript(message)}');
19
+ }
20
+ end
21
+
22
+ def contact_container(contacts)
23
+ render :partial => 'invites/contact_container', :locals => { :contacts => contacts }
24
+ end
25
+
26
+ end
@@ -4,15 +4,15 @@ class InviteMailer < ActionMailer::Base
4
4
  layout 'email_default'
5
5
  default_url_options[:host] = GlobalConfig.application_url
6
6
 
7
- def invite_notification(user, email)
7
+ def invite_notification(user, message, email)
8
8
  setup_email(email)
9
9
  subject I18n.t('muck.invites.invite', :inviter => user.full_name, :app_name => GlobalConfig.application_name)
10
- body :user => user
10
+ body :user => user, :message => message
11
11
  end
12
12
 
13
13
  def invited_joined_notification(user, inviter)
14
14
  setup_email(inviter.email)
15
- subject I18n.t('muck.invites.invited_joined', :user => inviter.full_name)
15
+ subject I18n.t('muck.invites.invited_joined', :user => inviter.full_name, :app_name => GlobalConfig.application_name)
16
16
  body :user => user, :inviter => inviter
17
17
  end
18
18
 
@@ -1,9 +1,11 @@
1
- <p><%= h(@user.full_name) %> invites you to join Folksemantic.</p>
1
+ <p><%= h(@user.full_name) %> invites you to join <%= GlobalConfig.application_name %>.</p>
2
2
 
3
- <p>Folksemantic is the leading OpenCourseWare search engine. It has over 110,000 resources in its index and provides tools for sharing and discussing resources and receiving personalized recommendations.</p>
3
+ <% if @message -%>
4
+ <p><%= h(@message) %></p>
5
+ <% end -%>
4
6
 
5
- <p>Visit Folksemantic at: <a href="<%= root_url %>"><%= root_url %></a></p>
7
+ <p>Visit <%= GlobalConfig.application_name %> at: <a href="<%= root_url %>"><%= root_url %></a></p>
6
8
 
7
- <p>See what <%= h(@user.full_name) %> is doing at: <a href="<%= profile_path(@user) %>"><%= profile_path(@user) %></a></p>
9
+ <p>See what <%= h(@user.full_name) %> is doing at: <a href="<%= profile_url(@user) %>"><%= profile_url(@user) %></a></p>
8
10
 
9
11
  <p>If the links do not work, try copying and pasting them into your web browser.</p>
@@ -1,9 +1,11 @@
1
- <%= h(@user.full_name) %> invites you to join Folksemantic.
1
+ <%= h(@user.full_name) %> invites you to join <%= GlobalConfig.application_name %>.
2
2
 
3
- Folksemantic is the leading OpenCourseWare search engine. It has over 110,000 resources in its index and provides tools for sharing and discussing resources and receiving personalized recommendations.
3
+ <% if @message -%>
4
+ <%= h(@message) %>
5
+ <% end -%>
4
6
 
5
- Visit Folksemantic at: <%= root_url %>
7
+ Visit <%= GlobalConfig.application_name %> at: <%= root_url %>
6
8
 
7
- See what <%= h(@user.full_name) %> is doing at: <%= profile_path(@user) %>
9
+ See what <%= h(@user.full_name) %> is doing at: <%= profile_url(@user) %>
8
10
 
9
11
  If the links do not work, try copying and pasting them into your web browser.
@@ -1,5 +1,5 @@
1
- <p><%= h(@user.full_name) %>, a contact you invited, joined Folksemantic.</p>
1
+ <p><%= h(@user.full_name) %>, a contact you invited, joined <%= GlobalConfig.application_name %>.</p>
2
2
 
3
- <p>Visit <%= h(@user.full_name) %>'s profile to see what they are doing and to begin following them: <a href="<%= profile_path(@inviter) %>"><%= profile_path(@inviter) %></a></p>
3
+ <p>Visit <%= h(@user.full_name) %>'s profile to see what they are doing and to begin following them: <a href="<%= profile_url(@inviter) %>"><%= profile_url(@inviter) %></a></p>
4
4
 
5
5
  <p>If the links do not work, try copying and pasting them into your web browser.</p>
@@ -1,5 +1,5 @@
1
- <%= h(@user.full_name) %>, a contact you invited, joined Folksemantic.
1
+ <%= h(@user.full_name) %>, a contact you invited, joined <%= GlobalConfig.application_name %>.
2
2
 
3
- Visit <%= h(@user.full_name) %>'s profile to see what they are doing and to begin following them: <%= profile_path(@inviter) %>
3
+ Visit <%= h(@user.full_name) %>'s profile to see what they are doing and to begin following them: <%= profile_url(@inviter) %>
4
4
 
5
5
  If the links do not work, try copying and pasting them into your web browser.
@@ -0,0 +1,13 @@
1
+ <div class="contact-chooser">
2
+ <div class="contact-chooser-list">
3
+ <fieldset>
4
+ <div class="select-all">
5
+ <input type="checkbox" class="select-all-contacts" />
6
+ <%= t('muck.invites.select_all') %>
7
+ </div>
8
+ <div class="table-wrapper">
9
+ <%= contact_list(contacts) %>
10
+ </div>
11
+ </fieldset>
12
+ </div>
13
+ </div>
@@ -0,0 +1,9 @@
1
+ <table class="contacts-list">
2
+ <% contacts.each_with_index do |contact,i| %>
3
+ <tr class="contact <%= i%2==0 ? 'even' : 'odd' %>">
4
+ <td class="cb"><input type="checkbox" value="<%= h(contact[1]) %>" name="emails[]"></td>
5
+ <td class="name"><%= contact[0] %></td>
6
+ <td class="email"><%= contact[1] %></td>
7
+ </tr>
8
+ <% end %>
9
+ </table>
@@ -0,0 +1,11 @@
1
+ <% default_image = File.join(root_url, 'profile_default.jpg') %>
2
+ <table class="contacts-list">
3
+ <% contacts.each_with_index do |contact,i| %>
4
+ <tr class="contact <%= i%2==0 ? 'even' : 'odd' %>">
5
+ <td class="cb"><input type="checkbox" value="<%= h(contact[1]) %>" name="emails[]"></td>
6
+ <td class="icon"><%= image_tag(gravatar(contact[1], default_image, 20), :class => 'contact-list-image', :alt => contact[0]) %></td>
7
+ <td class="name"><%= contact[0] %></td>
8
+ <td class="email"><%= contact[1] %></td>
9
+ </tr>
10
+ <% end %>
11
+ </table>
@@ -0,0 +1,3 @@
1
+ <div id="<%=id%>-loading" class="waiting" style="display:none">
2
+ <%= t('muck.invites.retrieving_contacts') %>
3
+ </div>
@@ -0,0 +1,16 @@
1
+ <div id="<%=id%>" class="invite-query" style="display:none;">
2
+ <div class="invite-form">
3
+ <p><%=translate('muck.invites.email_password_prompt_title', :title => title) %></p>
4
+ <% custom_form_for(:get_contacts, :url => get_contacts_invites_path, :html => { :class => 'ajax' } ) do |f| -%>
5
+ <%= f.text_field :email, { :label => t('muck.invites.your_email')} -%>
6
+ <%= f.password_field :password, { :label => t('muck.invites.email_password')} -%>
7
+ <%= hidden_field_tag :render_contacts_into, id %>
8
+ <%= f.submit t('muck.invites.continue_button'), :class => "button invite-submit wait-button" %>
9
+ <%= render :partial => 'invites/contacts_loading', :locals => { :id => id } %>
10
+ <% end -%>
11
+ </div>
12
+ <div class="contacts-privacy">
13
+ <p><%=translate('muck.invites.we_dont_store') %></p>
14
+ <p><%=translate('muck.invites.we_wont_email') %></p>
15
+ </div>
16
+ </div>
@@ -0,0 +1,10 @@
1
+ <% return unless logged_in? -%>
2
+ <div id="gmail" class="invite-query">
3
+ <% if !current_user.google -%>
4
+ <p><a href="/oauth_consumers/google">Click to connect to your Gmail</a></p>
5
+ <% else -%>
6
+ <div class="contact-list">
7
+ <%= contact_container(gmail_contacts_as_array(current_user)) %>
8
+ </div>
9
+ <% end -%>
10
+ </div>
@@ -0,0 +1,58 @@
1
+ <div id="compose-invite">
2
+ <div class="tabs">
3
+ <ul>
4
+ <li><a href="gmail" class="active"><span>Gmail</span></a></li>
5
+ <li><a href="windows"><span>Windows Live</span></a></li>
6
+ <li><a href="yahoo"><span>Yahoo</span></a></li>
7
+ </ul>
8
+ </div>
9
+ <div id="invite-contents">
10
+ <%= invite_ajax_message_container %>
11
+ <%= render :partial => 'invites/gmail_oauth' %>
12
+ <%= render :partial => 'invites/contacts_query', :locals => { :id => 'yahoo', :title => 'Yahoo' } %>
13
+ <%= render :partial => 'invites/contacts_query', :locals => { :id => 'windows', :title => 'Windows Live' } %>
14
+ </div>
15
+ <div id="invite">
16
+ <% custom_form_for(:invite_contacts, :url => {:action => 'create'}, :html => {:id => "invite-contacts-form", :name => 'invite-contacts-form'} ) do |f| -%>
17
+ <div class="form-row">
18
+ <label class="invite-email" for="emails">Emails</label>
19
+ <p class="invite-email">Enter emails of friends to invite or select them above:</p>
20
+ <%= text_area_tag :emails, params[:emails] %>
21
+ </div>
22
+ <div class="form-row">
23
+ <label class="invite-message" for="message">Message</label>
24
+ <%= text_area_tag :message, params[:message] %>
25
+ </div>
26
+ <div class="form-row">
27
+ <%= f.submit t('muck.invites.invite_button'), :class => "button invite-submit" %>
28
+ </div>
29
+ <% end -%>
30
+ </div>
31
+ </div>
32
+ <%= render :partial => 'invites/invite_scripts' %>
33
+ <script type="text/javascript" language="JavaScript">
34
+ jQuery(document).ready(function() {
35
+
36
+ jQuery('.tabs ul li a').click(function(){
37
+ jQuery('.invite-query').hide();
38
+ jQuery('#' + jQuery(this).attr('href')).show();
39
+ jQuery('.tabs ul li a').removeClass('active');
40
+ jQuery(this).addClass('active');
41
+ return false;
42
+ });
43
+ jQuery('.tabs').show();
44
+
45
+ apply_ajax_forms();
46
+
47
+ <% if current_user.google -%>
48
+ <%= gmail_contacts_for_auto_complete(current_user) %>
49
+ jQuery("#emails").autocomplete(gmail_contacts, {
50
+ minChars: 1,
51
+ delay: 200,
52
+ autoFill: true,
53
+ mustMatch: false,
54
+ multiple: true
55
+ });
56
+ <% end -%>
57
+ });
58
+ </script>
@@ -0,0 +1,60 @@
1
+ <script type="text/javascript" language="JavaScript">
2
+ jQuery(document).ready(function() {
3
+ jQuery(".get-contacts-button").click(function() {
4
+ jQuery(this).parent('form').hide();
5
+ jQuery(".contacts-loading").show();
6
+ jQuery("#invite-messages-container").hide();
7
+ });
8
+ apply_ajax_forms();
9
+
10
+ jQuery('.select-all-contacts').live('click', function(){
11
+ var cbs = jQuery(this).parent('.select-all').siblings('.table-wrapper').find('input:checkbox').attr("checked", jQuery(this).is(':checked'));
12
+ var emails = checked_emails();
13
+ jQuery('#emails').val(emails.join(', '));
14
+ });
15
+
16
+ jQuery('.contacts-list .cb input[type=checkbox]').live('change', function(){
17
+ var emails = jQuery('#emails').val();
18
+ var email = jQuery(this).val();
19
+ var checked = jQuery(this).is(':checked');
20
+ if(checked){
21
+ jQuery('#emails').val(add_to_list(emails, email));
22
+ } else {
23
+ jQuery('#emails').val(remove_from_list(emails, email));
24
+ }
25
+ included_checkbox_by_email([email], checked);
26
+ });
27
+
28
+ jQuery('#emails').change(function(){
29
+ var emails = split_list(jQuery('#emails').val());
30
+ excluded_checkbox_by_email(emails, false);
31
+ included_checkbox_by_email(emails, true);
32
+ });
33
+ });
34
+
35
+ function checked_emails(){
36
+ return get_emails(jQuery('.contacts-list .cb input:checkbox:checked'));
37
+ }
38
+
39
+ function get_emails(cbs){
40
+ return cbs.map(function() {
41
+ return jQuery(this).val();
42
+ }).get();
43
+ }
44
+ // Sets checkboxes that are in 'emails'
45
+ function included_checkbox_by_email(emails, checked){
46
+ jQuery('.contacts-list .cb input:checkbox').each(function(index) {
47
+ if(emails.indexOf(jQuery(this).val()) > -1){
48
+ jQuery(this).attr("checked",checked);
49
+ }
50
+ });
51
+ }
52
+ // Sets checkboxes that aren't in 'emails'
53
+ function excluded_checkbox_by_email(emails, checked){
54
+ jQuery('.contacts-list .cb input:checkbox').each(function(index) {
55
+ if(emails.indexOf(jQuery(this).val()) <= -1){
56
+ jQuery(this).attr("checked",checked);
57
+ }
58
+ });
59
+ }
60
+ </script>
@@ -0,0 +1,14 @@
1
+ <div id="invite-contacts" class="invite-query">
2
+ <%= invite_ajax_message_container %>
3
+ <div class="invite-form">
4
+ <% custom_form_for(:get_contacts, :url => get_contacts_invites_path, :html => { :class => 'ajax' } ) do |f| -%>
5
+ <%= f.text_field :email, { :label => t('muck.invites.your_email'),
6
+ :tip => t('muck.invites.your_email_help')} -%>
7
+ <%= f.password_field :password, { :label => t('muck.invites.email_password'),
8
+ :tip => t('muck.invites.email_password_help')} -%>
9
+ <%= f.submit t('muck.invites.continue_button'), :class => "button invite-submit wait-button" %>
10
+ <%= render :partial => 'invites/contacts_loading' %>
11
+ <% end -%>
12
+ </div>
13
+ </div>
14
+ <%= render :partial => 'invites/invite_scripts' %>
@@ -0,0 +1 @@
1
+ <%= render :partial => 'invites/invite_compose' %>
@@ -0,0 +1 @@
1
+ <%= invite_ajax_message(@message) %>
@@ -1 +1,7 @@
1
- <%= render :partial => 'invites/get_contacts' %>
1
+ <%= output_errors(t('muck.invites.problem_adding_invite'), {:class => 'help-box'}, @invite) %>
2
+ <% if !@contacts.blank? -%>
3
+ <% custom_form_for(:invite_contacts, :url => {:action => 'create'}, :html => {:id => "invite-contacts-form", :name => 'invite-contacts-form', :class => 'ajax'} ) do |f| -%>
4
+ <%= contact_container(@contacts) -%>
5
+ <%= f.submit t('muck.invites.invite_button'), :class => "button invite-submit" %>
6
+ <% end -%>
7
+ <% end -%>
@@ -1,14 +1,15 @@
1
- jQuery("#contacts-loading").hide();
2
1
  <% if @success -%>
3
- jQuery("#contacts-chooser-wrapper").html("<%=escape_javascript(render(:partial => 'invites/get_contacts'))%>");
4
- jQuery("#contacts-chooser-wrapper").show();
2
+ jQuery("#<%=@render_contacts_into%>").html("<%=escape_javascript(contact_container(@contacts))%>");
3
+ jQuery("#<%=@render_contacts_into%>").show();
5
4
  apply_ajax_forms();
6
5
  <% else -%>
7
6
  <% if GlobalConfig.growl_enabled -%>
8
7
  jQuery.jGrowl.info(json.message);
9
8
  <% else -%>
10
- jQuery("#notice-error").html('<%=escape_javascript(@message)%>');
11
- jQuery("#notice-error").show();
9
+ <%= invite_ajax_message(@message) %>
12
10
  <% end -%>
13
- jQuery("#get-contacts-form").show();
14
- <% end -%>
11
+ jQuery("#<%=@render_contacts_into%>").find('.waiting').hide();
12
+ jQuery("#<%=@render_contacts_into%>").find('.invite-form').show();
13
+ jQuery("#<%=@render_contacts_into%>").find('.wait-button').show();
14
+ <% end -%>
15
+ included_checkbox_by_email(checked_emails(), true);