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.
- data/.gitignore +2 -1
- data/README.rdoc +26 -0
- data/VERSION +1 -1
- data/app/controllers/muck/invites_controller.rb +21 -7
- data/app/helpers/muck_invites_helper.rb +26 -0
- data/app/models/invite_mailer.rb +3 -3
- data/app/views/invite_mailer/invite_notification.text.html.erb +6 -4
- data/app/views/invite_mailer/invite_notification.text.plain.erb +6 -4
- data/app/views/invite_mailer/invited_joined_notification.text.html.erb +2 -2
- data/app/views/invite_mailer/invited_joined_notification.text.plain.erb +2 -2
- data/app/views/invites/_contact_container.erb +13 -0
- data/app/views/invites/_contact_list.erb +9 -0
- data/app/views/invites/_contact_list_gravatar.erb +11 -0
- data/app/views/invites/_contacts_loading.erb +3 -0
- data/app/views/invites/_contacts_query.erb +16 -0
- data/app/views/invites/_gmail_oauth.erb +10 -0
- data/app/views/invites/_invite_compose.erb +58 -0
- data/app/views/invites/_invite_scripts.erb +60 -0
- data/app/views/invites/_invite_standard.erb +14 -0
- data/app/views/invites/compose.erb +1 -0
- data/app/views/invites/create.erb +1 -0
- data/app/views/invites/get_contacts.html.erb +7 -1
- data/app/views/invites/get_contacts.js.erb +8 -7
- data/app/views/invites/new.erb +1 -31
- data/config/muck_invites_routes.rb +1 -1
- data/lib/active_record/acts/muck_inviter.rb +2 -1
- data/lib/muck_invites.rb +1 -0
- data/locales/ar.yml +16 -12
- data/locales/bg.yml +15 -11
- data/locales/ca.yml +14 -10
- data/locales/cs.yml +15 -11
- data/locales/da.yml +9 -5
- data/locales/de.yml +13 -9
- data/locales/el.yml +13 -9
- data/locales/en.yml +6 -2
- data/locales/es.yml +14 -10
- data/locales/et.yml +15 -11
- data/locales/fa.yml +15 -11
- data/locales/fi.yml +15 -11
- data/locales/fr.yml +10 -6
- data/locales/gl.yml +14 -10
- data/locales/hi.yml +15 -11
- data/locales/hr.yml +18 -14
- data/locales/hu.yml +20 -16
- data/locales/id.yml +12 -8
- data/locales/it.yml +13 -9
- data/locales/iw.yml +15 -11
- data/locales/ja.yml +17 -13
- data/locales/ko.yml +15 -11
- data/locales/lt.yml +15 -11
- data/locales/lv.yml +16 -12
- data/locales/mt.yml +16 -12
- data/locales/nl.yml +14 -10
- data/locales/no.yml +11 -7
- data/locales/pl.yml +16 -12
- data/locales/pt-PT.yml +13 -9
- data/locales/ro.yml +18 -14
- data/locales/ru.yml +17 -13
- data/locales/sk.yml +16 -12
- data/locales/sl.yml +15 -11
- data/locales/sq.yml +17 -13
- data/locales/sr.yml +14 -10
- data/locales/sv.yml +16 -12
- data/locales/th.yml +20 -16
- data/locales/tl.yml +13 -9
- data/locales/tr.yml +18 -14
- data/locales/uk.yml +18 -14
- data/locales/vi.yml +12 -8
- data/locales/zh-CN.yml +13 -9
- data/locales/zh-TW.yml +13 -9
- data/locales/zh.yml +14 -10
- data/muck-invites.gemspec +404 -4
- data/public/stylesheets/muck-invites.css +14 -11
- data/test/rails_root/Rakefile +2 -9
- data/test/rails_root/app/models/user.rb +1 -0
- data/test/rails_root/app/views/default/index.html.erb +1 -0
- data/test/rails_root/app/views/layouts/default.html.erb +8 -5
- data/test/rails_root/config/environment.rb +3 -0
- data/test/rails_root/config/{global_config.yml → global_config.example.yml} +31 -0
- data/test/rails_root/config/initializers/oauth_consumers.rb +34 -0
- data/test/rails_root/db/migrate/20090730044139_add_comment_cache.rb +9 -0
- data/test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb +9 -0
- data/test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb +13 -0
- data/test/rails_root/db/migrate/20091205001023_create_oauth_consumer_tokens.rb +21 -0
- data/test/rails_root/db/migrate/20091210172015_create_oauth_tables.rb +46 -0
- data/test/rails_root/db/migrate/20100123035450_create_access_codes.rb +19 -0
- data/test/rails_root/db/migrate/20100123233654_create_access_code_requests.rb +14 -0
- data/test/rails_root/db/migrate/20100206000906_remove_name_fields.rb +15 -0
- data/test/rails_root/lib/tasks/muck.rake +7 -0
- data/test/rails_root/public/images/admin/Home.gif +0 -0
- data/test/rails_root/public/images/admin/roles.gif +0 -0
- data/test/rails_root/public/images/admin/source/Home.png +0 -0
- data/test/rails_root/public/images/admin/source/User.png +0 -0
- data/test/rails_root/public/images/admin/source/roles.png +0 -0
- data/test/rails_root/public/images/admin/user.gif +0 -0
- data/test/rails_root/public/images/fancybox/blank.gif +0 -0
- data/test/rails_root/public/images/fancybox/fancy_close.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_loading.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_nav_left.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_nav_right.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_e.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_n.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_ne.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_nw.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_s.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_se.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_sw.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_shadow_w.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_title_left.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_title_main.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_title_over.png +0 -0
- data/test/rails_root/public/images/fancybox/fancy_title_right.png +0 -0
- data/test/rails_root/public/images/fancybox/fancybox-x.png +0 -0
- data/test/rails_root/public/images/fancybox/fancybox-y.png +0 -0
- data/test/rails_root/public/images/fancybox/fancybox.png +0 -0
- data/test/rails_root/public/images/service_icons/16/amazon.png +0 -0
- data/test/rails_root/public/images/service_icons/16/ask.png +0 -0
- data/test/rails_root/public/images/service_icons/16/bibsonomy.png +0 -0
- data/test/rails_root/public/images/service_icons/16/bing.png +0 -0
- data/test/rails_root/public/images/service_icons/16/blogger.png +0 -0
- data/test/rails_root/public/images/service_icons/16/bloglines.png +0 -0
- data/test/rails_root/public/images/service_icons/16/citeulike.png +0 -0
- data/test/rails_root/public/images/service_icons/16/clipmarks.png +0 -0
- data/test/rails_root/public/images/service_icons/16/connotea.png +0 -0
- data/test/rails_root/public/images/service_icons/16/dailymotion.png +0 -0
- data/test/rails_root/public/images/service_icons/16/delicious.png +0 -0
- data/test/rails_root/public/images/service_icons/16/digg.png +0 -0
- data/test/rails_root/public/images/service_icons/16/diigo.png +0 -0
- data/test/rails_root/public/images/service_icons/16/facebook.png +0 -0
- data/test/rails_root/public/images/service_icons/16/feed.png +0 -0
- data/test/rails_root/public/images/service_icons/16/fireeagle.png +0 -0
- data/test/rails_root/public/images/service_icons/16/flickr.png +0 -0
- data/test/rails_root/public/images/service_icons/16/fotolog.png +0 -0
- data/test/rails_root/public/images/service_icons/16/friendfeed.png +0 -0
- data/test/rails_root/public/images/service_icons/16/friendster.png +0 -0
- data/test/rails_root/public/images/service_icons/16/furl.png +0 -0
- data/test/rails_root/public/images/service_icons/16/goodreads.png +0 -0
- data/test/rails_root/public/images/service_icons/16/google.png +0 -0
- data/test/rails_root/public/images/service_icons/16/googleblog.png +0 -0
- data/test/rails_root/public/images/service_icons/16/googlenews.png +0 -0
- data/test/rails_root/public/images/service_icons/16/icerocket.png +0 -0
- data/test/rails_root/public/images/service_icons/16/identica.png +0 -0
- data/test/rails_root/public/images/service_icons/16/joost.png +0 -0
- data/test/rails_root/public/images/service_icons/16/lastfm.png +0 -0
- data/test/rails_root/public/images/service_icons/16/librarything.png +0 -0
- data/test/rails_root/public/images/service_icons/16/linkedin.png +0 -0
- data/test/rails_root/public/images/service_icons/16/livejournal.png +0 -0
- data/test/rails_root/public/images/service_icons/16/magnolia.png +0 -0
- data/test/rails_root/public/images/service_icons/16/mendeley.png +0 -0
- data/test/rails_root/public/images/service_icons/16/metacafe.png +0 -0
- data/test/rails_root/public/images/service_icons/16/mixx.png +0 -0
- data/test/rails_root/public/images/service_icons/16/myspace.png +0 -0
- data/test/rails_root/public/images/service_icons/16/netflix.png +0 -0
- data/test/rails_root/public/images/service_icons/16/netvibes.png +0 -0
- data/test/rails_root/public/images/service_icons/16/newsvine.png +0 -0
- data/test/rails_root/public/images/service_icons/16/oai.png +0 -0
- data/test/rails_root/public/images/service_icons/16/odeo.png +0 -0
- data/test/rails_root/public/images/service_icons/16/opml.png +0 -0
- data/test/rails_root/public/images/service_icons/16/pandora.png +0 -0
- data/test/rails_root/public/images/service_icons/16/photobucket.png +0 -0
- data/test/rails_root/public/images/service_icons/16/picasa.png +0 -0
- data/test/rails_root/public/images/service_icons/16/polyvore.png +0 -0
- data/test/rails_root/public/images/service_icons/16/pownce.png +0 -0
- data/test/rails_root/public/images/service_icons/16/reddit.png +0 -0
- data/test/rails_root/public/images/service_icons/16/simpy.png +0 -0
- data/test/rails_root/public/images/service_icons/16/smugmug.png +0 -0
- data/test/rails_root/public/images/service_icons/16/stumbleupon.png +0 -0
- data/test/rails_root/public/images/service_icons/16/tag.png +0 -0
- data/test/rails_root/public/images/service_icons/16/technorati.png +0 -0
- data/test/rails_root/public/images/service_icons/16/tumblr.png +0 -0
- data/test/rails_root/public/images/service_icons/16/twine.png +0 -0
- data/test/rails_root/public/images/service_icons/16/twitter.png +0 -0
- data/test/rails_root/public/images/service_icons/16/vimeo.png +0 -0
- data/test/rails_root/public/images/service_icons/16/webshots.png +0 -0
- data/test/rails_root/public/images/service_icons/16/wordpress.png +0 -0
- data/test/rails_root/public/images/service_icons/16/xanga.png +0 -0
- data/test/rails_root/public/images/service_icons/16/yahoo.png +0 -0
- data/test/rails_root/public/images/service_icons/16/yelp.png +0 -0
- data/test/rails_root/public/images/service_icons/16/youtube.png +0 -0
- data/test/rails_root/public/images/service_icons/16/zooomr.png +0 -0
- data/test/rails_root/public/images/service_icons/16/zotero.png +0 -0
- data/test/rails_root/public/images/service_icons/24/amazon.png +0 -0
- data/test/rails_root/public/images/service_icons/24/ask.png +0 -0
- data/test/rails_root/public/images/service_icons/24/bibsonomy.png +0 -0
- data/test/rails_root/public/images/service_icons/24/bing.png +0 -0
- data/test/rails_root/public/images/service_icons/24/blogger.png +0 -0
- data/test/rails_root/public/images/service_icons/24/bloglines.png +0 -0
- data/test/rails_root/public/images/service_icons/24/citeulike.png +0 -0
- data/test/rails_root/public/images/service_icons/24/clipmarks.png +0 -0
- data/test/rails_root/public/images/service_icons/24/connotea.png +0 -0
- data/test/rails_root/public/images/service_icons/24/dailymotion.png +0 -0
- data/test/rails_root/public/images/service_icons/24/delicious.png +0 -0
- data/test/rails_root/public/images/service_icons/24/digg.png +0 -0
- data/test/rails_root/public/images/service_icons/24/diigo.png +0 -0
- data/test/rails_root/public/images/service_icons/24/facebook.png +0 -0
- data/test/rails_root/public/images/service_icons/24/feed.png +0 -0
- data/test/rails_root/public/images/service_icons/24/fireeagle.png +0 -0
- data/test/rails_root/public/images/service_icons/24/flickr.png +0 -0
- data/test/rails_root/public/images/service_icons/24/fotolog.png +0 -0
- data/test/rails_root/public/images/service_icons/24/friendfeed.png +0 -0
- data/test/rails_root/public/images/service_icons/24/friendster.png +0 -0
- data/test/rails_root/public/images/service_icons/24/furl.png +0 -0
- data/test/rails_root/public/images/service_icons/24/goodreads.png +0 -0
- data/test/rails_root/public/images/service_icons/24/google.png +0 -0
- data/test/rails_root/public/images/service_icons/24/googleblog.png +0 -0
- data/test/rails_root/public/images/service_icons/24/googlenews.png +0 -0
- data/test/rails_root/public/images/service_icons/24/icerocket.png +0 -0
- data/test/rails_root/public/images/service_icons/24/identica.png +0 -0
- data/test/rails_root/public/images/service_icons/24/joost.png +0 -0
- data/test/rails_root/public/images/service_icons/24/lastfm.png +0 -0
- data/test/rails_root/public/images/service_icons/24/librarything.png +0 -0
- data/test/rails_root/public/images/service_icons/24/linkedin.png +0 -0
- data/test/rails_root/public/images/service_icons/24/livejournal.png +0 -0
- data/test/rails_root/public/images/service_icons/24/magnolia.png +0 -0
- data/test/rails_root/public/images/service_icons/24/mendeley.png +0 -0
- data/test/rails_root/public/images/service_icons/24/metacafe.png +0 -0
- data/test/rails_root/public/images/service_icons/24/mixx.png +0 -0
- data/test/rails_root/public/images/service_icons/24/myspace.png +0 -0
- data/test/rails_root/public/images/service_icons/24/netflix.png +0 -0
- data/test/rails_root/public/images/service_icons/24/netvibes.png +0 -0
- data/test/rails_root/public/images/service_icons/24/newsvine.png +0 -0
- data/test/rails_root/public/images/service_icons/24/oai.png +0 -0
- data/test/rails_root/public/images/service_icons/24/odeo.png +0 -0
- data/test/rails_root/public/images/service_icons/24/opml.png +0 -0
- data/test/rails_root/public/images/service_icons/24/pandora.png +0 -0
- data/test/rails_root/public/images/service_icons/24/photobucket.png +0 -0
- data/test/rails_root/public/images/service_icons/24/picasa.png +0 -0
- data/test/rails_root/public/images/service_icons/24/polyvore.png +0 -0
- data/test/rails_root/public/images/service_icons/24/pownce.png +0 -0
- data/test/rails_root/public/images/service_icons/24/reddit.png +0 -0
- data/test/rails_root/public/images/service_icons/24/simpy.png +0 -0
- data/test/rails_root/public/images/service_icons/24/smugmug.png +0 -0
- data/test/rails_root/public/images/service_icons/24/stumbleupon.png +0 -0
- data/test/rails_root/public/images/service_icons/24/tag.png +0 -0
- data/test/rails_root/public/images/service_icons/24/technorati.png +0 -0
- data/test/rails_root/public/images/service_icons/24/tumblr.png +0 -0
- data/test/rails_root/public/images/service_icons/24/twine.png +0 -0
- data/test/rails_root/public/images/service_icons/24/twitter.png +0 -0
- data/test/rails_root/public/images/service_icons/24/vimeo.png +0 -0
- data/test/rails_root/public/images/service_icons/24/webshots.png +0 -0
- data/test/rails_root/public/images/service_icons/24/wordpress.png +0 -0
- data/test/rails_root/public/images/service_icons/24/xanga.png +0 -0
- data/test/rails_root/public/images/service_icons/24/yahoo.png +0 -0
- data/test/rails_root/public/images/service_icons/24/yelp.png +0 -0
- data/test/rails_root/public/images/service_icons/24/youtube.png +0 -0
- data/test/rails_root/public/images/service_icons/24/zooomr.png +0 -0
- data/test/rails_root/public/images/service_icons/24/zotero.png +0 -0
- data/test/rails_root/public/images/service_icons/48/amazon.png +0 -0
- data/test/rails_root/public/images/service_icons/48/ask.png +0 -0
- data/test/rails_root/public/images/service_icons/48/bibsonomy.png +0 -0
- data/test/rails_root/public/images/service_icons/48/bing.png +0 -0
- data/test/rails_root/public/images/service_icons/48/blogger.png +0 -0
- data/test/rails_root/public/images/service_icons/48/bloglines.png +0 -0
- data/test/rails_root/public/images/service_icons/48/citeulike.png +0 -0
- data/test/rails_root/public/images/service_icons/48/clipmarks.png +0 -0
- data/test/rails_root/public/images/service_icons/48/connotea.png +0 -0
- data/test/rails_root/public/images/service_icons/48/dailymotion.png +0 -0
- data/test/rails_root/public/images/service_icons/48/delicious.png +0 -0
- data/test/rails_root/public/images/service_icons/48/digg.png +0 -0
- data/test/rails_root/public/images/service_icons/48/diigo.png +0 -0
- data/test/rails_root/public/images/service_icons/48/facebook.png +0 -0
- data/test/rails_root/public/images/service_icons/48/feed.png +0 -0
- data/test/rails_root/public/images/service_icons/48/fireeagle.png +0 -0
- data/test/rails_root/public/images/service_icons/48/flickr.png +0 -0
- data/test/rails_root/public/images/service_icons/48/fotolog.png +0 -0
- data/test/rails_root/public/images/service_icons/48/friendfeed.png +0 -0
- data/test/rails_root/public/images/service_icons/48/friendster.png +0 -0
- data/test/rails_root/public/images/service_icons/48/furl.png +0 -0
- data/test/rails_root/public/images/service_icons/48/goodreads.png +0 -0
- data/test/rails_root/public/images/service_icons/48/google.png +0 -0
- data/test/rails_root/public/images/service_icons/48/googleblog.png +0 -0
- data/test/rails_root/public/images/service_icons/48/googlenews.png +0 -0
- data/test/rails_root/public/images/service_icons/48/icerocket.png +0 -0
- data/test/rails_root/public/images/service_icons/48/identica.png +0 -0
- data/test/rails_root/public/images/service_icons/48/joost.png +0 -0
- data/test/rails_root/public/images/service_icons/48/lastfm.png +0 -0
- data/test/rails_root/public/images/service_icons/48/librarything.png +0 -0
- data/test/rails_root/public/images/service_icons/48/linkedin.png +0 -0
- data/test/rails_root/public/images/service_icons/48/livejournal.png +0 -0
- data/test/rails_root/public/images/service_icons/48/magnolia.png +0 -0
- data/test/rails_root/public/images/service_icons/48/mendeley.png +0 -0
- data/test/rails_root/public/images/service_icons/48/metacafe.png +0 -0
- data/test/rails_root/public/images/service_icons/48/mixx.png +0 -0
- data/test/rails_root/public/images/service_icons/48/myspace.png +0 -0
- data/test/rails_root/public/images/service_icons/48/netflix.png +0 -0
- data/test/rails_root/public/images/service_icons/48/netvibes.png +0 -0
- data/test/rails_root/public/images/service_icons/48/newsvine.png +0 -0
- data/test/rails_root/public/images/service_icons/48/oai.png +0 -0
- data/test/rails_root/public/images/service_icons/48/odeo.png +0 -0
- data/test/rails_root/public/images/service_icons/48/opml.png +0 -0
- data/test/rails_root/public/images/service_icons/48/pandora.png +0 -0
- data/test/rails_root/public/images/service_icons/48/photobucket.png +0 -0
- data/test/rails_root/public/images/service_icons/48/picasa.png +0 -0
- data/test/rails_root/public/images/service_icons/48/polyvore.png +0 -0
- data/test/rails_root/public/images/service_icons/48/pownce.png +0 -0
- data/test/rails_root/public/images/service_icons/48/reddit.png +0 -0
- data/test/rails_root/public/images/service_icons/48/simpy.png +0 -0
- data/test/rails_root/public/images/service_icons/48/smugmug.png +0 -0
- data/test/rails_root/public/images/service_icons/48/stumbleupon.png +0 -0
- data/test/rails_root/public/images/service_icons/48/tag.png +0 -0
- data/test/rails_root/public/images/service_icons/48/technorati.png +0 -0
- data/test/rails_root/public/images/service_icons/48/tumblr.png +0 -0
- data/test/rails_root/public/images/service_icons/48/twine.png +0 -0
- data/test/rails_root/public/images/service_icons/48/twitter.png +0 -0
- data/test/rails_root/public/images/service_icons/48/vimeo.png +0 -0
- data/test/rails_root/public/images/service_icons/48/webshots.png +0 -0
- data/test/rails_root/public/images/service_icons/48/wordpress.png +0 -0
- data/test/rails_root/public/images/service_icons/48/xanga.png +0 -0
- data/test/rails_root/public/images/service_icons/48/yahoo.png +0 -0
- data/test/rails_root/public/images/service_icons/48/yelp.png +0 -0
- data/test/rails_root/public/images/service_icons/48/youtube.png +0 -0
- data/test/rails_root/public/images/service_icons/48/zooomr.png +0 -0
- data/test/rails_root/public/images/service_icons/48/zotero.png +0 -0
- data/test/rails_root/public/images/service_icons/60/amazon.png +0 -0
- data/test/rails_root/public/images/service_icons/60/ask.png +0 -0
- data/test/rails_root/public/images/service_icons/60/bibsonomy.png +0 -0
- data/test/rails_root/public/images/service_icons/60/bing.png +0 -0
- data/test/rails_root/public/images/service_icons/60/blogger.png +0 -0
- data/test/rails_root/public/images/service_icons/60/bloglines.png +0 -0
- data/test/rails_root/public/images/service_icons/60/citeulike.png +0 -0
- data/test/rails_root/public/images/service_icons/60/clipmarks.png +0 -0
- data/test/rails_root/public/images/service_icons/60/connotea.png +0 -0
- data/test/rails_root/public/images/service_icons/60/dailymotion.png +0 -0
- data/test/rails_root/public/images/service_icons/60/delicious.png +0 -0
- data/test/rails_root/public/images/service_icons/60/digg.png +0 -0
- data/test/rails_root/public/images/service_icons/60/diigo.png +0 -0
- data/test/rails_root/public/images/service_icons/60/facebook.png +0 -0
- data/test/rails_root/public/images/service_icons/60/feed.png +0 -0
- data/test/rails_root/public/images/service_icons/60/fireeagle.png +0 -0
- data/test/rails_root/public/images/service_icons/60/flickr.png +0 -0
- data/test/rails_root/public/images/service_icons/60/fotolog.png +0 -0
- data/test/rails_root/public/images/service_icons/60/friendfeed.png +0 -0
- data/test/rails_root/public/images/service_icons/60/friendster.png +0 -0
- data/test/rails_root/public/images/service_icons/60/furl.png +0 -0
- data/test/rails_root/public/images/service_icons/60/goodreads.png +0 -0
- data/test/rails_root/public/images/service_icons/60/google.png +0 -0
- data/test/rails_root/public/images/service_icons/60/googleblog.png +0 -0
- data/test/rails_root/public/images/service_icons/60/googlenews.png +0 -0
- data/test/rails_root/public/images/service_icons/60/icerocket.png +0 -0
- data/test/rails_root/public/images/service_icons/60/identica.png +0 -0
- data/test/rails_root/public/images/service_icons/60/joost.png +0 -0
- data/test/rails_root/public/images/service_icons/60/lastfm.png +0 -0
- data/test/rails_root/public/images/service_icons/60/librarything.png +0 -0
- data/test/rails_root/public/images/service_icons/60/linkedin.png +0 -0
- data/test/rails_root/public/images/service_icons/60/livejournal.png +0 -0
- data/test/rails_root/public/images/service_icons/60/magnolia.png +0 -0
- data/test/rails_root/public/images/service_icons/60/mendeley.png +0 -0
- data/test/rails_root/public/images/service_icons/60/metacafe.png +0 -0
- data/test/rails_root/public/images/service_icons/60/mixx.png +0 -0
- data/test/rails_root/public/images/service_icons/60/myspace.png +0 -0
- data/test/rails_root/public/images/service_icons/60/netflix.png +0 -0
- data/test/rails_root/public/images/service_icons/60/netvibes.png +0 -0
- data/test/rails_root/public/images/service_icons/60/newsvine.png +0 -0
- data/test/rails_root/public/images/service_icons/60/oai.png +0 -0
- data/test/rails_root/public/images/service_icons/60/odeo.png +0 -0
- data/test/rails_root/public/images/service_icons/60/opml.png +0 -0
- data/test/rails_root/public/images/service_icons/60/pandora.png +0 -0
- data/test/rails_root/public/images/service_icons/60/photobucket.png +0 -0
- data/test/rails_root/public/images/service_icons/60/picasa.png +0 -0
- data/test/rails_root/public/images/service_icons/60/polyvore.png +0 -0
- data/test/rails_root/public/images/service_icons/60/pownce.png +0 -0
- data/test/rails_root/public/images/service_icons/60/reddit.png +0 -0
- data/test/rails_root/public/images/service_icons/60/simpy.png +0 -0
- data/test/rails_root/public/images/service_icons/60/smugmug.png +0 -0
- data/test/rails_root/public/images/service_icons/60/stumbleupon.png +0 -0
- data/test/rails_root/public/images/service_icons/60/tag.png +0 -0
- data/test/rails_root/public/images/service_icons/60/technorati.png +0 -0
- data/test/rails_root/public/images/service_icons/60/tumblr.png +0 -0
- data/test/rails_root/public/images/service_icons/60/twine.png +0 -0
- data/test/rails_root/public/images/service_icons/60/twitter.png +0 -0
- data/test/rails_root/public/images/service_icons/60/vimeo.png +0 -0
- data/test/rails_root/public/images/service_icons/60/webshots.png +0 -0
- data/test/rails_root/public/images/service_icons/60/wordpress.png +0 -0
- data/test/rails_root/public/images/service_icons/60/xanga.png +0 -0
- data/test/rails_root/public/images/service_icons/60/yahoo.png +0 -0
- data/test/rails_root/public/images/service_icons/60/yelp.png +0 -0
- data/test/rails_root/public/images/service_icons/60/youtube.png +0 -0
- data/test/rails_root/public/images/service_icons/60/zooomr.png +0 -0
- data/test/rails_root/public/images/service_icons/60/zotero.png +0 -0
- data/test/rails_root/public/images/service_icons/facebook_friend_links.jpg +0 -0
- data/test/rails_root/public/images/service_icons/facebook_my_links.jpg +0 -0
- data/test/rails_root/public/images/service_icons/source/Aquaticus_Social_Icon_template_by_jwloh.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/Google.psd +0 -0
- 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
- data/test/rails_root/public/images/service_icons/source/ReadMe.rtf +52 -0
- data/test/rails_root/public/images/service_icons/source/amazon.png +0 -0
- data/test/rails_root/public/images/service_icons/source/aquaticus.social.png +0 -0
- data/test/rails_root/public/images/service_icons/source/ask.png +0 -0
- data/test/rails_root/public/images/service_icons/source/ask.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/bibsonomy.png +0 -0
- data/test/rails_root/public/images/service_icons/source/bibsonomy.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/bing.png +0 -0
- data/test/rails_root/public/images/service_icons/source/bing.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/blogger.png +0 -0
- data/test/rails_root/public/images/service_icons/source/bloglines.png +0 -0
- data/test/rails_root/public/images/service_icons/source/bloglines.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/citeulike.png +0 -0
- data/test/rails_root/public/images/service_icons/source/clipmarks.png +0 -0
- data/test/rails_root/public/images/service_icons/source/connotea.png +0 -0
- data/test/rails_root/public/images/service_icons/source/connotea.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/dailymotion.png +0 -0
- data/test/rails_root/public/images/service_icons/source/delicious.png +0 -0
- data/test/rails_root/public/images/service_icons/source/digg.png +0 -0
- data/test/rails_root/public/images/service_icons/source/diigo.png +0 -0
- data/test/rails_root/public/images/service_icons/source/facebook.png +0 -0
- data/test/rails_root/public/images/service_icons/source/feed.png +0 -0
- data/test/rails_root/public/images/service_icons/source/fireeagle.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/flickr.png +0 -0
- data/test/rails_root/public/images/service_icons/source/fotolog.png +0 -0
- data/test/rails_root/public/images/service_icons/source/friendfeed.png +0 -0
- data/test/rails_root/public/images/service_icons/source/friendster.png +0 -0
- data/test/rails_root/public/images/service_icons/source/furl.png +0 -0
- data/test/rails_root/public/images/service_icons/source/goodreads.png +0 -0
- data/test/rails_root/public/images/service_icons/source/google.png +0 -0
- data/test/rails_root/public/images/service_icons/source/googleblog.png +0 -0
- data/test/rails_root/public/images/service_icons/source/googlenews.png +0 -0
- data/test/rails_root/public/images/service_icons/source/icerocket.png +0 -0
- data/test/rails_root/public/images/service_icons/source/icerocket.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/identica.png +0 -0
- data/test/rails_root/public/images/service_icons/source/joost.png +0 -0
- data/test/rails_root/public/images/service_icons/source/lastfm.png +0 -0
- data/test/rails_root/public/images/service_icons/source/librarything.png +0 -0
- data/test/rails_root/public/images/service_icons/source/linkedin.png +0 -0
- data/test/rails_root/public/images/service_icons/source/livejournal.png +0 -0
- data/test/rails_root/public/images/service_icons/source/magnolia.png +0 -0
- data/test/rails_root/public/images/service_icons/source/mendeley.png +0 -0
- data/test/rails_root/public/images/service_icons/source/metacafe.png +0 -0
- data/test/rails_root/public/images/service_icons/source/metacafe.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/mixx.png +0 -0
- data/test/rails_root/public/images/service_icons/source/myspace.png +0 -0
- data/test/rails_root/public/images/service_icons/source/netflix.png +0 -0
- data/test/rails_root/public/images/service_icons/source/netvibes.png +0 -0
- data/test/rails_root/public/images/service_icons/source/newsvine.png +0 -0
- data/test/rails_root/public/images/service_icons/source/oai.png +0 -0
- data/test/rails_root/public/images/service_icons/source/odeo.png +0 -0
- data/test/rails_root/public/images/service_icons/source/opml.png +0 -0
- data/test/rails_root/public/images/service_icons/source/pandora.png +0 -0
- data/test/rails_root/public/images/service_icons/source/photobucket.png +0 -0
- data/test/rails_root/public/images/service_icons/source/picasa.png +0 -0
- data/test/rails_root/public/images/service_icons/source/polyvore.png +0 -0
- data/test/rails_root/public/images/service_icons/source/pownce.png +0 -0
- data/test/rails_root/public/images/service_icons/source/reddit.png +0 -0
- data/test/rails_root/public/images/service_icons/source/simpy.png +0 -0
- data/test/rails_root/public/images/service_icons/source/smugmug.png +0 -0
- data/test/rails_root/public/images/service_icons/source/stumbleupon.png +0 -0
- data/test/rails_root/public/images/service_icons/source/tag.png +0 -0
- data/test/rails_root/public/images/service_icons/source/technorati.png +0 -0
- data/test/rails_root/public/images/service_icons/source/template.png +0 -0
- data/test/rails_root/public/images/service_icons/source/tumblr.png +0 -0
- data/test/rails_root/public/images/service_icons/source/twine.png +0 -0
- data/test/rails_root/public/images/service_icons/source/twine.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/twitter.png +0 -0
- data/test/rails_root/public/images/service_icons/source/vimeo.png +0 -0
- data/test/rails_root/public/images/service_icons/source/webshots.png +0 -0
- data/test/rails_root/public/images/service_icons/source/wordpress.png +0 -0
- data/test/rails_root/public/images/service_icons/source/xanga.png +0 -0
- data/test/rails_root/public/images/service_icons/source/yahoo.png +0 -0
- data/test/rails_root/public/images/service_icons/source/yelp.png +0 -0
- data/test/rails_root/public/images/service_icons/source/youtube.png +0 -0
- data/test/rails_root/public/images/service_icons/source/zooomr.png +0 -0
- data/test/rails_root/public/images/service_icons/source/zotero.png +0 -0
- data/test/rails_root/public/javascripts/application.js +0 -2
- data/test/rails_root/public/javascripts/jquery/jquery.autocomplete.js.readme +1 -1
- data/test/rails_root/public/javascripts/jquery/jquery.easing.js +72 -1
- data/test/rails_root/public/javascripts/jquery/jquery.fancybox.js +34 -6
- data/test/rails_root/public/javascripts/jquery/jquery.form.js +511 -473
- data/test/rails_root/public/javascripts/jquery/jquery.jgrowl.js +9 -2
- data/test/rails_root/public/javascripts/jquery/jquery.js +150 -15
- data/test/rails_root/public/javascripts/jquery/jquery.mousewheel.js +13 -0
- data/test/rails_root/public/javascripts/jquery/jquery.tips.js +7 -2
- data/test/rails_root/public/javascripts/muck-countries.js +50 -0
- data/test/rails_root/public/javascripts/muck-src.js +134 -0
- data/test/rails_root/public/javascripts/muck-users.js +24 -0
- data/test/rails_root/public/javascripts/muck.js +6 -127
- data/test/rails_root/public/javascripts/muck_activities.js +44 -45
- data/test/rails_root/public/stylesheets/admin.css +36 -8
- data/test/rails_root/public/stylesheets/jquery/cupertino/jquery-ui-1.7.2.custom.css +160 -0
- data/test/rails_root/public/stylesheets/jquery/jquery.fancybox.css +77 -38
- data/test/rails_root/public/stylesheets/jquery/redmond/jquery-ui-1.7.2.custom.css +160 -0
- data/test/rails_root/public/stylesheets/jquery/smoothness/jquery-ui-1.7.2.custom.css +160 -0
- data/test/rails_root/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.2.custom.css +160 -0
- data/test/rails_root/public/stylesheets/muck-activities.css +39 -0
- data/test/rails_root/public/stylesheets/muck-invites.css +14 -11
- data/test/rails_root/public/stylesheets/styles.css +17 -9
- data/test/rails_root/test/functional/invites_controller_test.rb +21 -7
- data/test/rails_root/test/unit/invite_mailer_test.rb +1 -1
- data/test/rails_root/test/unit/invitee_test.rb +6 -6
- metadata +405 -5
- data/app/views/invites/_get_contacts.erb +0 -27
data/.gitignore
CHANGED
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.
|
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
|
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
|
-
|
40
|
-
|
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
|
-
|
58
|
+
flash[:notice] = @message
|
59
|
+
redirect_back_or_default('/')
|
46
60
|
end
|
47
|
-
format.pjs { render :
|
48
|
-
format.js { render :
|
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
|
data/app/models/invite_mailer.rb
CHANGED
@@ -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
|
1
|
+
<p><%= h(@user.full_name) %> invites you to join <%= GlobalConfig.application_name %>.</p>
|
2
2
|
|
3
|
-
|
3
|
+
<% if @message -%>
|
4
|
+
<p><%= h(@message) %></p>
|
5
|
+
<% end -%>
|
4
6
|
|
5
|
-
<p>Visit
|
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="<%=
|
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
|
1
|
+
<%= h(@user.full_name) %> invites you to join <%= GlobalConfig.application_name %>.
|
2
2
|
|
3
|
-
|
3
|
+
<% if @message -%>
|
4
|
+
<%= h(@message) %>
|
5
|
+
<% end -%>
|
4
6
|
|
5
|
-
Visit
|
7
|
+
Visit <%= GlobalConfig.application_name %> at: <%= root_url %>
|
6
8
|
|
7
|
-
See what <%= h(@user.full_name) %> is doing at: <%=
|
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
|
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="<%=
|
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
|
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: <%=
|
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,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
|
-
<%=
|
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("
|
4
|
-
jQuery("
|
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
|
-
|
11
|
-
jQuery("#notice-error").show();
|
9
|
+
<%= invite_ajax_message(@message) %>
|
12
10
|
<% end -%>
|
13
|
-
jQuery("
|
14
|
-
|
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);
|