muck-users 3.2.6 → 3.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +5 -9
- data/VERSION +1 -1
- data/app/views/admin/users/_dashboard_widget.html.erb +3 -0
- data/config/locales/en.yml +4 -1
- data/muck-users.gemspec +671 -6
- data/test/app/controllers/application_controller.rb +15 -0
- data/test/app/controllers/default_controller.rb +7 -0
- data/test/app/helpers/application_helper.rb +3 -0
- data/test/app/mailers/user_mailer.rb +3 -0
- data/test/app/models/.keep +0 -0
- data/test/app/models/access_code.rb +3 -0
- data/test/app/models/access_code_request.rb +3 -0
- data/test/app/models/country.rb +13 -0
- data/test/app/models/language.rb +15 -0
- data/test/app/models/state.rb +13 -0
- data/test/app/models/user.rb +52 -0
- data/test/app/models/user_session.rb +2 -0
- data/test/app/views/default/index.html.erb +0 -0
- data/test/app/views/layouts/application.html.erb +14 -0
- data/test/config/application.rb +42 -0
- data/test/config/assets.yml +34 -0
- data/test/config/boot.rb +13 -0
- data/test/config/database.yml +15 -0
- data/test/config/environment.rb +5 -0
- data/test/config/environments/development.rb +26 -0
- data/test/config/environments/production.rb +49 -0
- data/test/config/environments/test.rb +35 -0
- data/test/config/initializers/backtrace_silencers.rb +7 -0
- data/test/config/initializers/inflections.rb +10 -0
- data/test/config/initializers/mime_types.rb +5 -0
- data/test/config/initializers/muck.rb +60 -0
- data/test/config/initializers/secret_token.rb +7 -0
- data/test/config/initializers/session_store.rb +8 -0
- data/test/config/locales/en.yml +5 -0
- data/test/config/routes.rb +4 -0
- data/test/db/.keep +0 -0
- data/test/db/migrate/20090320174818_create_muck_permissions_and_roles.rb +16 -0
- data/test/db/migrate/20090327231918_create_users.rb +40 -0
- data/test/db/migrate/20090402234137_create_languages.rb +18 -0
- data/test/db/migrate/20090426041056_create_countries.rb +15 -0
- data/test/db/migrate/20090426041103_create_states.rb +18 -0
- data/test/db/migrate/20100123035450_create_access_codes.rb +19 -0
- data/test/db/migrate/20100123233654_create_access_code_requests.rb +14 -0
- data/test/db/migrate/20101117172951_add_name_to_access_code_requests.rb +9 -0
- data/test/db/migrate/20110303183433_add_sent_to_to_access_codes.rb +9 -0
- data/test/db/migrate/20110420153714_add_provided_by_to_access_codes.rb +9 -0
- data/test/db/schema.rb +115 -0
- data/test/db/seeds.rb +7 -0
- data/test/features/step_definitions/web_steps.rb +219 -0
- data/test/features/support/custom_env.rb +19 -0
- data/test/features/support/env.rb +58 -0
- data/test/features/support/paths.rb +33 -0
- data/test/lib/tasks/.gitkeep +0 -0
- data/test/lib/tasks/cucumber.rake +53 -0
- data/test/log/production.log +0 -0
- data/test/log/server.log +0 -0
- data/test/public/.htaccess +40 -0
- data/test/public/404.html +30 -0
- data/test/public/422.html +30 -0
- data/test/public/500.html +30 -0
- data/test/public/dispatch.rb +10 -0
- data/test/public/favicon.ico +0 -0
- data/test/public/images/admin/Home.gif +0 -0
- data/test/public/images/admin/roles.gif +0 -0
- data/test/public/images/admin/source/Home.png +0 -0
- data/test/public/images/admin/source/User.png +0 -0
- data/test/public/images/admin/source/roles.png +0 -0
- data/test/public/images/admin/user.gif +0 -0
- data/test/public/images/arrow_down.gif +0 -0
- data/test/public/images/arrow_left.gif +0 -0
- data/test/public/images/arrow_right.gif +0 -0
- data/test/public/images/arrow_up.gif +0 -0
- data/test/public/images/blue/preview.gif +0 -0
- data/test/public/images/fancybox/blank.gif +0 -0
- data/test/public/images/fancybox/fancy_close.png +0 -0
- data/test/public/images/fancybox/fancy_closebox.png +0 -0
- data/test/public/images/fancybox/fancy_left.png +0 -0
- data/test/public/images/fancybox/fancy_loading.png +0 -0
- data/test/public/images/fancybox/fancy_nav_left.png +0 -0
- data/test/public/images/fancybox/fancy_nav_right.png +0 -0
- data/test/public/images/fancybox/fancy_progress.png +0 -0
- data/test/public/images/fancybox/fancy_right.png +0 -0
- data/test/public/images/fancybox/fancy_shadow_e.png +0 -0
- data/test/public/images/fancybox/fancy_shadow_n.png +0 -0
- data/test/public/images/fancybox/fancy_shadow_ne.png +0 -0
- data/test/public/images/fancybox/fancy_shadow_nw.png +0 -0
- data/test/public/images/fancybox/fancy_shadow_s.png +0 -0
- data/test/public/images/fancybox/fancy_shadow_se.png +0 -0
- data/test/public/images/fancybox/fancy_shadow_sw.png +0 -0
- data/test/public/images/fancybox/fancy_shadow_w.png +0 -0
- data/test/public/images/fancybox/fancy_title_left.png +0 -0
- data/test/public/images/fancybox/fancy_title_main.png +0 -0
- data/test/public/images/fancybox/fancy_title_over.png +0 -0
- data/test/public/images/fancybox/fancy_title_right.png +0 -0
- data/test/public/images/fancybox/fancybox-x.png +0 -0
- data/test/public/images/fancybox/fancybox-y.png +0 -0
- data/test/public/images/fancybox/fancybox.png +0 -0
- data/test/public/images/icon_no.gif +0 -0
- data/test/public/images/icon_success.gif +0 -0
- data/test/public/images/icons/accept.png +0 -0
- data/test/public/images/icons/add.png +0 -0
- data/test/public/images/icons/blue_guy.png +0 -0
- data/test/public/images/icons/button_background.png +0 -0
- data/test/public/images/icons/cancel.png +0 -0
- data/test/public/images/icons/close.png +0 -0
- data/test/public/images/icons/comment.png +0 -0
- data/test/public/images/icons/delete.png +0 -0
- data/test/public/images/icons/exclaim.png +0 -0
- data/test/public/images/icons/external.png +0 -0
- data/test/public/images/icons/feed.png +0 -0
- data/test/public/images/icons/grey_guy.png +0 -0
- data/test/public/images/icons/hide.png +0 -0
- data/test/public/images/icons/information.png +0 -0
- data/test/public/images/icons/minus.png +0 -0
- data/test/public/images/icons/pending.png +0 -0
- data/test/public/images/icons/question.png +0 -0
- data/test/public/images/icons/search_box.png +0 -0
- data/test/public/images/icons/star.png +0 -0
- data/test/public/images/icons/stop.png +0 -0
- data/test/public/images/icons/thumb_down.png +0 -0
- data/test/public/images/icons/thumb_up.png +0 -0
- data/test/public/images/icons/vote.png +0 -0
- data/test/public/images/loading-spinner.gif +0 -0
- data/test/public/images/loading.gif +0 -0
- data/test/public/images/nothing.png +0 -0
- data/test/public/images/profile_default.jpg +0 -0
- data/test/public/images/rails.png +0 -0
- data/test/public/images/red/preview.gif +0 -0
- data/test/public/images/service_icons/16/amazon.png +0 -0
- data/test/public/images/service_icons/16/ask.png +0 -0
- data/test/public/images/service_icons/16/bibsonomy.png +0 -0
- data/test/public/images/service_icons/16/bing.png +0 -0
- data/test/public/images/service_icons/16/blogger.png +0 -0
- data/test/public/images/service_icons/16/bloglines.png +0 -0
- data/test/public/images/service_icons/16/citeulike.png +0 -0
- data/test/public/images/service_icons/16/clipmarks.png +0 -0
- data/test/public/images/service_icons/16/connotea.png +0 -0
- data/test/public/images/service_icons/16/dailymotion.png +0 -0
- data/test/public/images/service_icons/16/delicious.png +0 -0
- data/test/public/images/service_icons/16/digg.png +0 -0
- data/test/public/images/service_icons/16/diigo.png +0 -0
- data/test/public/images/service_icons/16/facebook.png +0 -0
- data/test/public/images/service_icons/16/feed.png +0 -0
- data/test/public/images/service_icons/16/fireeagle.png +0 -0
- data/test/public/images/service_icons/16/flickr.png +0 -0
- data/test/public/images/service_icons/16/fotolog.png +0 -0
- data/test/public/images/service_icons/16/friendfeed.png +0 -0
- data/test/public/images/service_icons/16/friendster.png +0 -0
- data/test/public/images/service_icons/16/furl.png +0 -0
- data/test/public/images/service_icons/16/goodreads.png +0 -0
- data/test/public/images/service_icons/16/google.png +0 -0
- data/test/public/images/service_icons/16/googleblog.png +0 -0
- data/test/public/images/service_icons/16/googlenews.png +0 -0
- data/test/public/images/service_icons/16/icerocket.png +0 -0
- data/test/public/images/service_icons/16/identica.png +0 -0
- data/test/public/images/service_icons/16/joost.png +0 -0
- data/test/public/images/service_icons/16/lastfm.png +0 -0
- data/test/public/images/service_icons/16/librarything.png +0 -0
- data/test/public/images/service_icons/16/linkedin.png +0 -0
- data/test/public/images/service_icons/16/livejournal.png +0 -0
- data/test/public/images/service_icons/16/magnolia.png +0 -0
- data/test/public/images/service_icons/16/mendeley.png +0 -0
- data/test/public/images/service_icons/16/metacafe.png +0 -0
- data/test/public/images/service_icons/16/mixx.png +0 -0
- data/test/public/images/service_icons/16/myspace.png +0 -0
- data/test/public/images/service_icons/16/netflix.png +0 -0
- data/test/public/images/service_icons/16/netvibes.png +0 -0
- data/test/public/images/service_icons/16/newsvine.png +0 -0
- data/test/public/images/service_icons/16/oai.png +0 -0
- data/test/public/images/service_icons/16/odeo.png +0 -0
- data/test/public/images/service_icons/16/opml.png +0 -0
- data/test/public/images/service_icons/16/pandora.png +0 -0
- data/test/public/images/service_icons/16/photobucket.png +0 -0
- data/test/public/images/service_icons/16/picasa.png +0 -0
- data/test/public/images/service_icons/16/polyvore.png +0 -0
- data/test/public/images/service_icons/16/pownce.png +0 -0
- data/test/public/images/service_icons/16/reddit.png +0 -0
- data/test/public/images/service_icons/16/simpy.png +0 -0
- data/test/public/images/service_icons/16/smugmug.png +0 -0
- data/test/public/images/service_icons/16/stumbleupon.png +0 -0
- data/test/public/images/service_icons/16/tag.png +0 -0
- data/test/public/images/service_icons/16/technorati.png +0 -0
- data/test/public/images/service_icons/16/tumblr.png +0 -0
- data/test/public/images/service_icons/16/twine.png +0 -0
- data/test/public/images/service_icons/16/twitter.png +0 -0
- data/test/public/images/service_icons/16/vimeo.png +0 -0
- data/test/public/images/service_icons/16/webshots.png +0 -0
- data/test/public/images/service_icons/16/wordpress.png +0 -0
- data/test/public/images/service_icons/16/xanga.png +0 -0
- data/test/public/images/service_icons/16/yahoo.png +0 -0
- data/test/public/images/service_icons/16/yelp.png +0 -0
- data/test/public/images/service_icons/16/youtube.png +0 -0
- data/test/public/images/service_icons/16/zooomr.png +0 -0
- data/test/public/images/service_icons/16/zotero.png +0 -0
- data/test/public/images/service_icons/24/amazon.png +0 -0
- data/test/public/images/service_icons/24/ask.png +0 -0
- data/test/public/images/service_icons/24/bibsonomy.png +0 -0
- data/test/public/images/service_icons/24/bing.png +0 -0
- data/test/public/images/service_icons/24/blogger.png +0 -0
- data/test/public/images/service_icons/24/bloglines.png +0 -0
- data/test/public/images/service_icons/24/citeulike.png +0 -0
- data/test/public/images/service_icons/24/clipmarks.png +0 -0
- data/test/public/images/service_icons/24/connotea.png +0 -0
- data/test/public/images/service_icons/24/dailymotion.png +0 -0
- data/test/public/images/service_icons/24/delicious.png +0 -0
- data/test/public/images/service_icons/24/digg.png +0 -0
- data/test/public/images/service_icons/24/diigo.png +0 -0
- data/test/public/images/service_icons/24/facebook.png +0 -0
- data/test/public/images/service_icons/24/feed.png +0 -0
- data/test/public/images/service_icons/24/fireeagle.png +0 -0
- data/test/public/images/service_icons/24/flickr.png +0 -0
- data/test/public/images/service_icons/24/fotolog.png +0 -0
- data/test/public/images/service_icons/24/friendfeed.png +0 -0
- data/test/public/images/service_icons/24/friendster.png +0 -0
- data/test/public/images/service_icons/24/furl.png +0 -0
- data/test/public/images/service_icons/24/goodreads.png +0 -0
- data/test/public/images/service_icons/24/google.png +0 -0
- data/test/public/images/service_icons/24/googleblog.png +0 -0
- data/test/public/images/service_icons/24/googlenews.png +0 -0
- data/test/public/images/service_icons/24/icerocket.png +0 -0
- data/test/public/images/service_icons/24/identica.png +0 -0
- data/test/public/images/service_icons/24/joost.png +0 -0
- data/test/public/images/service_icons/24/lastfm.png +0 -0
- data/test/public/images/service_icons/24/librarything.png +0 -0
- data/test/public/images/service_icons/24/linkedin.png +0 -0
- data/test/public/images/service_icons/24/livejournal.png +0 -0
- data/test/public/images/service_icons/24/magnolia.png +0 -0
- data/test/public/images/service_icons/24/mendeley.png +0 -0
- data/test/public/images/service_icons/24/metacafe.png +0 -0
- data/test/public/images/service_icons/24/mixx.png +0 -0
- data/test/public/images/service_icons/24/myspace.png +0 -0
- data/test/public/images/service_icons/24/netflix.png +0 -0
- data/test/public/images/service_icons/24/netvibes.png +0 -0
- data/test/public/images/service_icons/24/newsvine.png +0 -0
- data/test/public/images/service_icons/24/oai.png +0 -0
- data/test/public/images/service_icons/24/odeo.png +0 -0
- data/test/public/images/service_icons/24/opml.png +0 -0
- data/test/public/images/service_icons/24/pandora.png +0 -0
- data/test/public/images/service_icons/24/photobucket.png +0 -0
- data/test/public/images/service_icons/24/picasa.png +0 -0
- data/test/public/images/service_icons/24/polyvore.png +0 -0
- data/test/public/images/service_icons/24/pownce.png +0 -0
- data/test/public/images/service_icons/24/reddit.png +0 -0
- data/test/public/images/service_icons/24/simpy.png +0 -0
- data/test/public/images/service_icons/24/smugmug.png +0 -0
- data/test/public/images/service_icons/24/stumbleupon.png +0 -0
- data/test/public/images/service_icons/24/tag.png +0 -0
- data/test/public/images/service_icons/24/technorati.png +0 -0
- data/test/public/images/service_icons/24/tumblr.png +0 -0
- data/test/public/images/service_icons/24/twine.png +0 -0
- data/test/public/images/service_icons/24/twitter.png +0 -0
- data/test/public/images/service_icons/24/vimeo.png +0 -0
- data/test/public/images/service_icons/24/webshots.png +0 -0
- data/test/public/images/service_icons/24/wordpress.png +0 -0
- data/test/public/images/service_icons/24/xanga.png +0 -0
- data/test/public/images/service_icons/24/yahoo.png +0 -0
- data/test/public/images/service_icons/24/yelp.png +0 -0
- data/test/public/images/service_icons/24/youtube.png +0 -0
- data/test/public/images/service_icons/24/zooomr.png +0 -0
- data/test/public/images/service_icons/24/zotero.png +0 -0
- data/test/public/images/service_icons/48/amazon.png +0 -0
- data/test/public/images/service_icons/48/ask.png +0 -0
- data/test/public/images/service_icons/48/bibsonomy.png +0 -0
- data/test/public/images/service_icons/48/bing.png +0 -0
- data/test/public/images/service_icons/48/blogger.png +0 -0
- data/test/public/images/service_icons/48/bloglines.png +0 -0
- data/test/public/images/service_icons/48/citeulike.png +0 -0
- data/test/public/images/service_icons/48/clipmarks.png +0 -0
- data/test/public/images/service_icons/48/connotea.png +0 -0
- data/test/public/images/service_icons/48/dailymotion.png +0 -0
- data/test/public/images/service_icons/48/delicious.png +0 -0
- data/test/public/images/service_icons/48/digg.png +0 -0
- data/test/public/images/service_icons/48/diigo.png +0 -0
- data/test/public/images/service_icons/48/facebook.png +0 -0
- data/test/public/images/service_icons/48/feed.png +0 -0
- data/test/public/images/service_icons/48/fireeagle.png +0 -0
- data/test/public/images/service_icons/48/flickr.png +0 -0
- data/test/public/images/service_icons/48/fotolog.png +0 -0
- data/test/public/images/service_icons/48/friendfeed.png +0 -0
- data/test/public/images/service_icons/48/friendster.png +0 -0
- data/test/public/images/service_icons/48/furl.png +0 -0
- data/test/public/images/service_icons/48/goodreads.png +0 -0
- data/test/public/images/service_icons/48/google.png +0 -0
- data/test/public/images/service_icons/48/googleblog.png +0 -0
- data/test/public/images/service_icons/48/googlenews.png +0 -0
- data/test/public/images/service_icons/48/icerocket.png +0 -0
- data/test/public/images/service_icons/48/identica.png +0 -0
- data/test/public/images/service_icons/48/joost.png +0 -0
- data/test/public/images/service_icons/48/lastfm.png +0 -0
- data/test/public/images/service_icons/48/librarything.png +0 -0
- data/test/public/images/service_icons/48/linkedin.png +0 -0
- data/test/public/images/service_icons/48/livejournal.png +0 -0
- data/test/public/images/service_icons/48/magnolia.png +0 -0
- data/test/public/images/service_icons/48/mendeley.png +0 -0
- data/test/public/images/service_icons/48/metacafe.png +0 -0
- data/test/public/images/service_icons/48/mixx.png +0 -0
- data/test/public/images/service_icons/48/myspace.png +0 -0
- data/test/public/images/service_icons/48/netflix.png +0 -0
- data/test/public/images/service_icons/48/netvibes.png +0 -0
- data/test/public/images/service_icons/48/newsvine.png +0 -0
- data/test/public/images/service_icons/48/oai.png +0 -0
- data/test/public/images/service_icons/48/odeo.png +0 -0
- data/test/public/images/service_icons/48/opml.png +0 -0
- data/test/public/images/service_icons/48/pandora.png +0 -0
- data/test/public/images/service_icons/48/photobucket.png +0 -0
- data/test/public/images/service_icons/48/picasa.png +0 -0
- data/test/public/images/service_icons/48/polyvore.png +0 -0
- data/test/public/images/service_icons/48/pownce.png +0 -0
- data/test/public/images/service_icons/48/reddit.png +0 -0
- data/test/public/images/service_icons/48/simpy.png +0 -0
- data/test/public/images/service_icons/48/smugmug.png +0 -0
- data/test/public/images/service_icons/48/stumbleupon.png +0 -0
- data/test/public/images/service_icons/48/tag.png +0 -0
- data/test/public/images/service_icons/48/technorati.png +0 -0
- data/test/public/images/service_icons/48/tumblr.png +0 -0
- data/test/public/images/service_icons/48/twine.png +0 -0
- data/test/public/images/service_icons/48/twitter.png +0 -0
- data/test/public/images/service_icons/48/vimeo.png +0 -0
- data/test/public/images/service_icons/48/webshots.png +0 -0
- data/test/public/images/service_icons/48/wordpress.png +0 -0
- data/test/public/images/service_icons/48/xanga.png +0 -0
- data/test/public/images/service_icons/48/yahoo.png +0 -0
- data/test/public/images/service_icons/48/yelp.png +0 -0
- data/test/public/images/service_icons/48/youtube.png +0 -0
- data/test/public/images/service_icons/48/zooomr.png +0 -0
- data/test/public/images/service_icons/48/zotero.png +0 -0
- data/test/public/images/service_icons/60/amazon.png +0 -0
- data/test/public/images/service_icons/60/ask.png +0 -0
- data/test/public/images/service_icons/60/bibsonomy.png +0 -0
- data/test/public/images/service_icons/60/bing.png +0 -0
- data/test/public/images/service_icons/60/blogger.png +0 -0
- data/test/public/images/service_icons/60/bloglines.png +0 -0
- data/test/public/images/service_icons/60/citeulike.png +0 -0
- data/test/public/images/service_icons/60/clipmarks.png +0 -0
- data/test/public/images/service_icons/60/connotea.png +0 -0
- data/test/public/images/service_icons/60/dailymotion.png +0 -0
- data/test/public/images/service_icons/60/delicious.png +0 -0
- data/test/public/images/service_icons/60/digg.png +0 -0
- data/test/public/images/service_icons/60/diigo.png +0 -0
- data/test/public/images/service_icons/60/facebook.png +0 -0
- data/test/public/images/service_icons/60/feed.png +0 -0
- data/test/public/images/service_icons/60/fireeagle.png +0 -0
- data/test/public/images/service_icons/60/flickr.png +0 -0
- data/test/public/images/service_icons/60/fotolog.png +0 -0
- data/test/public/images/service_icons/60/friendfeed.png +0 -0
- data/test/public/images/service_icons/60/friendster.png +0 -0
- data/test/public/images/service_icons/60/furl.png +0 -0
- data/test/public/images/service_icons/60/goodreads.png +0 -0
- data/test/public/images/service_icons/60/google.png +0 -0
- data/test/public/images/service_icons/60/googleblog.png +0 -0
- data/test/public/images/service_icons/60/googlenews.png +0 -0
- data/test/public/images/service_icons/60/icerocket.png +0 -0
- data/test/public/images/service_icons/60/identica.png +0 -0
- data/test/public/images/service_icons/60/joost.png +0 -0
- data/test/public/images/service_icons/60/lastfm.png +0 -0
- data/test/public/images/service_icons/60/librarything.png +0 -0
- data/test/public/images/service_icons/60/linkedin.png +0 -0
- data/test/public/images/service_icons/60/livejournal.png +0 -0
- data/test/public/images/service_icons/60/magnolia.png +0 -0
- data/test/public/images/service_icons/60/mendeley.png +0 -0
- data/test/public/images/service_icons/60/metacafe.png +0 -0
- data/test/public/images/service_icons/60/mixx.png +0 -0
- data/test/public/images/service_icons/60/myspace.png +0 -0
- data/test/public/images/service_icons/60/netflix.png +0 -0
- data/test/public/images/service_icons/60/netvibes.png +0 -0
- data/test/public/images/service_icons/60/newsvine.png +0 -0
- data/test/public/images/service_icons/60/oai.png +0 -0
- data/test/public/images/service_icons/60/odeo.png +0 -0
- data/test/public/images/service_icons/60/opml.png +0 -0
- data/test/public/images/service_icons/60/pandora.png +0 -0
- data/test/public/images/service_icons/60/photobucket.png +0 -0
- data/test/public/images/service_icons/60/picasa.png +0 -0
- data/test/public/images/service_icons/60/polyvore.png +0 -0
- data/test/public/images/service_icons/60/pownce.png +0 -0
- data/test/public/images/service_icons/60/reddit.png +0 -0
- data/test/public/images/service_icons/60/simpy.png +0 -0
- data/test/public/images/service_icons/60/smugmug.png +0 -0
- data/test/public/images/service_icons/60/stumbleupon.png +0 -0
- data/test/public/images/service_icons/60/tag.png +0 -0
- data/test/public/images/service_icons/60/technorati.png +0 -0
- data/test/public/images/service_icons/60/tumblr.png +0 -0
- data/test/public/images/service_icons/60/twine.png +0 -0
- data/test/public/images/service_icons/60/twitter.png +0 -0
- data/test/public/images/service_icons/60/vimeo.png +0 -0
- data/test/public/images/service_icons/60/webshots.png +0 -0
- data/test/public/images/service_icons/60/wordpress.png +0 -0
- data/test/public/images/service_icons/60/xanga.png +0 -0
- data/test/public/images/service_icons/60/yahoo.png +0 -0
- data/test/public/images/service_icons/60/yelp.png +0 -0
- data/test/public/images/service_icons/60/youtube.png +0 -0
- data/test/public/images/service_icons/60/zooomr.png +0 -0
- data/test/public/images/service_icons/60/zotero.png +0 -0
- data/test/public/images/service_icons/facebook_friend_links.jpg +0 -0
- data/test/public/images/service_icons/facebook_my_links.jpg +0 -0
- data/test/public/images/service_icons/source/Aquaticus_Social_Icon_template_by_jwloh.psd +0 -0
- data/test/public/images/service_icons/source/Google.psd +0 -0
- data/test/public/images/service_icons/source/Quake 9 Design.webloc +0 -0
- data/test/public/images/service_icons/source/ReadMe.rtf +52 -0
- data/test/public/images/service_icons/source/amazon.png +0 -0
- data/test/public/images/service_icons/source/aquaticus.social.png +0 -0
- data/test/public/images/service_icons/source/ask.png +0 -0
- data/test/public/images/service_icons/source/ask.psd +0 -0
- data/test/public/images/service_icons/source/bibsonomy.png +0 -0
- data/test/public/images/service_icons/source/bibsonomy.psd +0 -0
- data/test/public/images/service_icons/source/bing.png +0 -0
- data/test/public/images/service_icons/source/bing.psd +0 -0
- data/test/public/images/service_icons/source/blogger.png +0 -0
- data/test/public/images/service_icons/source/bloglines.png +0 -0
- data/test/public/images/service_icons/source/bloglines.psd +0 -0
- data/test/public/images/service_icons/source/citeulike.png +0 -0
- data/test/public/images/service_icons/source/clipmarks.png +0 -0
- data/test/public/images/service_icons/source/connotea.png +0 -0
- data/test/public/images/service_icons/source/connotea.psd +0 -0
- data/test/public/images/service_icons/source/dailymotion.png +0 -0
- data/test/public/images/service_icons/source/delicious.png +0 -0
- data/test/public/images/service_icons/source/digg.png +0 -0
- data/test/public/images/service_icons/source/diigo.png +0 -0
- data/test/public/images/service_icons/source/facebook.png +0 -0
- data/test/public/images/service_icons/source/feed.png +0 -0
- data/test/public/images/service_icons/source/fireeagle.psd +0 -0
- data/test/public/images/service_icons/source/flickr.png +0 -0
- data/test/public/images/service_icons/source/fotolog.png +0 -0
- data/test/public/images/service_icons/source/friendfeed.png +0 -0
- data/test/public/images/service_icons/source/friendster.png +0 -0
- data/test/public/images/service_icons/source/furl.png +0 -0
- data/test/public/images/service_icons/source/goodreads.png +0 -0
- data/test/public/images/service_icons/source/google.png +0 -0
- data/test/public/images/service_icons/source/googleblog.png +0 -0
- data/test/public/images/service_icons/source/googlenews.png +0 -0
- data/test/public/images/service_icons/source/icerocket.png +0 -0
- data/test/public/images/service_icons/source/icerocket.psd +0 -0
- data/test/public/images/service_icons/source/identica.png +0 -0
- data/test/public/images/service_icons/source/joost.png +0 -0
- data/test/public/images/service_icons/source/lastfm.png +0 -0
- data/test/public/images/service_icons/source/librarything.png +0 -0
- data/test/public/images/service_icons/source/linkedin.png +0 -0
- data/test/public/images/service_icons/source/livejournal.png +0 -0
- data/test/public/images/service_icons/source/magnolia.png +0 -0
- data/test/public/images/service_icons/source/mendeley.png +0 -0
- data/test/public/images/service_icons/source/metacafe.png +0 -0
- data/test/public/images/service_icons/source/metacafe.psd +0 -0
- data/test/public/images/service_icons/source/mixx.png +0 -0
- data/test/public/images/service_icons/source/myspace.png +0 -0
- data/test/public/images/service_icons/source/netflix.png +0 -0
- data/test/public/images/service_icons/source/netvibes.png +0 -0
- data/test/public/images/service_icons/source/newsvine.png +0 -0
- data/test/public/images/service_icons/source/oai.png +0 -0
- data/test/public/images/service_icons/source/odeo.png +0 -0
- data/test/public/images/service_icons/source/opml.png +0 -0
- data/test/public/images/service_icons/source/pandora.png +0 -0
- data/test/public/images/service_icons/source/photobucket.png +0 -0
- data/test/public/images/service_icons/source/picasa.png +0 -0
- data/test/public/images/service_icons/source/polyvore.png +0 -0
- data/test/public/images/service_icons/source/posterous.psd +0 -0
- data/test/public/images/service_icons/source/pownce.png +0 -0
- data/test/public/images/service_icons/source/reddit.png +0 -0
- data/test/public/images/service_icons/source/simpy.png +0 -0
- data/test/public/images/service_icons/source/smugmug.png +0 -0
- data/test/public/images/service_icons/source/stumbleupon.png +0 -0
- data/test/public/images/service_icons/source/tag.png +0 -0
- data/test/public/images/service_icons/source/technorati.png +0 -0
- data/test/public/images/service_icons/source/template.png +0 -0
- data/test/public/images/service_icons/source/tumblr.png +0 -0
- data/test/public/images/service_icons/source/twine.png +0 -0
- data/test/public/images/service_icons/source/twine.psd +0 -0
- data/test/public/images/service_icons/source/twitter.png +0 -0
- data/test/public/images/service_icons/source/vimeo.png +0 -0
- data/test/public/images/service_icons/source/webshots.png +0 -0
- data/test/public/images/service_icons/source/wordpress.png +0 -0
- data/test/public/images/service_icons/source/xanga.png +0 -0
- data/test/public/images/service_icons/source/yahoo.png +0 -0
- data/test/public/images/service_icons/source/yelp.png +0 -0
- data/test/public/images/service_icons/source/youtube.png +0 -0
- data/test/public/images/service_icons/source/zooomr.png +0 -0
- data/test/public/images/service_icons/source/zotero.png +0 -0
- data/test/public/images/spinner.gif +0 -0
- data/test/public/images/sprites.png +0 -0
- data/test/public/javascripts/application.js +2 -0
- data/test/public/javascripts/builder.js +136 -0
- data/test/public/javascripts/controls.js +963 -0
- data/test/public/javascripts/dragdrop.js +972 -0
- data/test/public/javascripts/effects.js +1120 -0
- data/test/public/javascripts/fancyzoom.min.js +1 -0
- data/test/public/javascripts/jquery/colorpicker.js +450 -0
- data/test/public/javascripts/jquery/jquery-1.5.1.js +8316 -0
- data/test/public/javascripts/jquery/jquery-ui-1.8.11.custom.js +11577 -0
- data/test/public/javascripts/jquery/jquery-ui-1.8.4.custom.min.js +763 -0
- data/test/public/javascripts/jquery/jquery-ui.js +781 -0
- data/test/public/javascripts/jquery/jquery.autocomplete.js.readme +6 -0
- data/test/public/javascripts/jquery/jquery.autocomplete.min.js +15 -0
- data/test/public/javascripts/jquery/jquery.autocomplete.pack.js +767 -0
- data/test/public/javascripts/jquery/jquery.cookie.js +96 -0
- data/test/public/javascripts/jquery/jquery.easing.js +46 -0
- data/test/public/javascripts/jquery/jquery.fancybox.js +46 -0
- data/test/public/javascripts/jquery/jquery.form.js +675 -0
- data/test/public/javascripts/jquery/jquery.jgrowl.js +9 -0
- data/test/public/javascripts/jquery/jquery.js +154 -0
- data/test/public/javascripts/jquery/jquery.metadata.min.js +13 -0
- data/test/public/javascripts/jquery/jquery.mousewheel.js +13 -0
- data/test/public/javascripts/jquery/jquery.queryString.js +33 -0
- data/test/public/javascripts/jquery/jquery.swapimage.js +66 -0
- data/test/public/javascripts/jquery/jquery.swapimage.min.js +11 -0
- data/test/public/javascripts/jquery/jquery.timers.js +138 -0
- data/test/public/javascripts/jquery/jquery.tips.js +75 -0
- data/test/public/javascripts/jquery/jrails.js +1 -0
- data/test/public/javascripts/muck-countries.js +50 -0
- data/test/public/javascripts/muck-src.js +147 -0
- data/test/public/javascripts/muck-users.js +20 -0
- data/test/public/javascripts/muck.js +149 -0
- data/test/public/javascripts/muck_activities.js +100 -0
- data/test/public/javascripts/muck_admin.js +0 -0
- data/test/public/javascripts/muck_countries.js +50 -0
- data/test/public/javascripts/muck_time/en.js +53 -0
- data/test/public/javascripts/prototype.js +4225 -0
- data/test/public/javascripts/rails.js +175 -0
- data/test/public/javascripts/scriptaculous.js +58 -0
- data/test/public/javascripts/slider.js +277 -0
- data/test/public/javascripts/sound.js +60 -0
- data/test/public/javascripts/tree.js +107 -0
- data/test/public/robots.txt +1 -0
- data/test/public/stylesheets/.gitkeep +0 -0
- data/test/public/stylesheets/.keep +0 -0
- data/test/public/stylesheets/admin.css +75 -0
- data/test/public/stylesheets/application.css +0 -0
- data/test/public/stylesheets/blueprint/ie.css +26 -0
- data/test/public/stylesheets/blueprint/liquid_screen.css +203 -0
- data/test/public/stylesheets/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/buttons/icons/key.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/buttons/readme.txt +32 -0
- data/test/public/stylesheets/blueprint/plugins/buttons/screen.css +97 -0
- data/test/public/stylesheets/blueprint/plugins/fancy-type/readme.txt +14 -0
- data/test/public/stylesheets/blueprint/plugins/fancy-type/screen.css +71 -0
- data/test/public/stylesheets/blueprint/plugins/link-icons/icons/doc.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/link-icons/icons/email.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/link-icons/icons/external.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/link-icons/icons/feed.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/link-icons/icons/im.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/link-icons/icons/pdf.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/link-icons/icons/visited.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/link-icons/icons/xls.png +0 -0
- data/test/public/stylesheets/blueprint/plugins/link-icons/readme.txt +18 -0
- data/test/public/stylesheets/blueprint/plugins/link-icons/screen.css +40 -0
- data/test/public/stylesheets/blueprint/plugins/liquid/liquid.css +134 -0
- data/test/public/stylesheets/blueprint/plugins/liquid/src/liquid.css +197 -0
- data/test/public/stylesheets/blueprint/plugins/rtl/readme.txt +10 -0
- data/test/public/stylesheets/blueprint/plugins/rtl/screen.css +109 -0
- data/test/public/stylesheets/blueprint/print.css +30 -0
- data/test/public/stylesheets/blueprint/screen.css +251 -0
- data/test/public/stylesheets/blueprint/sprite.css +1 -0
- data/test/public/stylesheets/blueprint/src/forms.css +49 -0
- data/test/public/stylesheets/blueprint/src/grid.css +213 -0
- data/test/public/stylesheets/blueprint/src/grid.png +0 -0
- data/test/public/stylesheets/blueprint/src/ie.css +59 -0
- data/test/public/stylesheets/blueprint/src/print.css +85 -0
- data/test/public/stylesheets/blueprint/src/reset.css +38 -0
- data/test/public/stylesheets/blueprint/src/typography.css +105 -0
- data/test/public/stylesheets/default.css +0 -0
- data/test/public/stylesheets/flick/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/test/public/stylesheets/flick/images/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- data/test/public/stylesheets/flick/images/ui-bg_flat_55_ffffff_40x100.png +0 -0
- data/test/public/stylesheets/flick/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/test/public/stylesheets/flick/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/test/public/stylesheets/flick/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
- data/test/public/stylesheets/flick/images/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
- data/test/public/stylesheets/flick/images/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
- data/test/public/stylesheets/flick/images/ui-icons_0073ea_256x240.png +0 -0
- data/test/public/stylesheets/flick/images/ui-icons_454545_256x240.png +0 -0
- data/test/public/stylesheets/flick/images/ui-icons_666666_256x240.png +0 -0
- data/test/public/stylesheets/flick/images/ui-icons_ff0084_256x240.png +0 -0
- data/test/public/stylesheets/flick/images/ui-icons_ffffff_256x240.png +0 -0
- data/test/public/stylesheets/flick/jquery-ui-1.8.1.custom.css +486 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-bg_diagonals-thick_15_444444_40x40.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-bg_glass_100_f0f0f0_1x400.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-bg_glass_50_99c2ff_1x400.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-bg_glass_55_fbf5d0_1x400.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-bg_glass_80_e6e6e6_1x400.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-bg_highlight-soft_100_e7eef3_1x100.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-icons_222222_256x240.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-icons_2694e8_256x240.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-icons_2e83ff_256x240.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-icons_72a7cf_256x240.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-icons_888888_256x240.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/images/ui-icons_ffffff_256x240.png +0 -0
- data/test/public/stylesheets/jquery/cupertino/jquery-ui-1.7.1.custom.css +404 -0
- data/test/public/stylesheets/jquery/cupertino/jquery-ui-1.7.2.custom.css +160 -0
- data/test/public/stylesheets/jquery/jquery.autocomplete.css +15 -0
- data/test/public/stylesheets/jquery/jquery.fancybox.css +77 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-icons_217bc0_256x240.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-icons_2e83ff_256x240.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-icons_469bdd_256x240.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/test/public/stylesheets/jquery/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
- data/test/public/stylesheets/jquery/redmond/jquery-ui-1.7.1.custom.css +404 -0
- data/test/public/stylesheets/jquery/redmond/jquery-ui-1.7.2.custom.css +160 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/test/public/stylesheets/jquery/smoothness/jquery-ui-1.7.1.custom.css +404 -0
- data/test/public/stylesheets/jquery/smoothness/jquery-ui-1.7.2.custom.css +160 -0
- data/test/public/stylesheets/jquery/smoothness/jquery-ui-1.8.11.custom.css +573 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/test/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.1.custom.css +404 -0
- data/test/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.2.custom.css +160 -0
- data/test/public/stylesheets/jquery/ui-lightness/jquery-ui-1.8.11.custom.css +573 -0
- data/test/public/stylesheets/jquery/ui-lightness/jquery-ui-1.8.4.custom.css +572 -0
- data/test/public/stylesheets/muck-users.css +10 -0
- data/test/public/stylesheets/reset.css +0 -0
- data/test/public/stylesheets/styles.css +98 -0
- data/test/public/stylesheets/themes/blue/styles.css +1 -0
- data/test/public/stylesheets/themes/red/styles.css +1 -0
- data/test/script/rails +6 -0
- data/test/spec/controllers/access_code_requests_controller_spec.rb +62 -0
- data/test/spec/controllers/activations_controller_spec.rb +69 -0
- data/test/spec/controllers/admin/access_code_requests_controller_spec.rb +128 -0
- data/test/spec/controllers/admin/access_codes_controller_spec.rb +189 -0
- data/test/spec/controllers/admin/roles_controller_spec.rb +84 -0
- data/test/spec/controllers/admin/users_controller_spec.rb +245 -0
- data/test/spec/controllers/password_resets_controller_spec.rb +65 -0
- data/test/spec/controllers/user_sessions_controller_spec.rb +122 -0
- data/test/spec/controllers/username_request_controller_spec.rb +35 -0
- data/test/spec/controllers/users_controller_spec.rb +427 -0
- data/test/spec/helpers/muck_users_helper_spec.rb +70 -0
- data/test/spec/mailers/user_mailer_spec.rb +108 -0
- data/test/spec/models/access_code_request_spec.rb +105 -0
- data/test/spec/models/access_code_spec.rb +117 -0
- data/test/spec/models/permission_spec.rb +19 -0
- data/test/spec/models/role_spec.rb +18 -0
- data/test/spec/models/secure_methods_spec.rb +56 -0
- data/test/spec/models/user_spec.rb +433 -0
- data/test/spec/spec_helper.rb +5 -0
- data/test/test/fixtures/rails.png +0 -0
- data/test/vendor/plugins/.gitkeep +0 -0
- metadata +680 -13
@@ -0,0 +1,75 @@
|
|
1
|
+
jQuery(document).ready(function() {
|
2
|
+
jQuery(".tip-field").live('focus', function() {
|
3
|
+
jQuery(".active").removeClass("active");
|
4
|
+
var tip_key = jQuery('#' + this.id).siblings('.tip-key');
|
5
|
+
var control_id = this.id;
|
6
|
+
var help_id = this.id;
|
7
|
+
var field = jQuery('#' + this.id);
|
8
|
+
if (tip_key.length > 0){
|
9
|
+
control_id = tip_key.html();
|
10
|
+
help_id = field.siblings('.tip-id').html();
|
11
|
+
}
|
12
|
+
var tip_text = field.siblings('.tip-text').html();
|
13
|
+
var tip_title = field.siblings('.tip-title').html();
|
14
|
+
var tip_position = field.siblings('.tip-position').html();
|
15
|
+
if(tip_text == null){
|
16
|
+
tip_text = field.parent().siblings('.tip-text').html();
|
17
|
+
tip_title = field.parent().siblings('.tip-title').html();
|
18
|
+
tip_position = field.parent().siblings('.tip-position').html();
|
19
|
+
}
|
20
|
+
if (!tip_position) { tip_position = 'right'; }
|
21
|
+
show_tip(control_id, tip_title, tip_text, tip_position);
|
22
|
+
jQuery("#" + help_id + "-container").addClass("active");
|
23
|
+
});
|
24
|
+
|
25
|
+
jQuery(".tip-field").live('blur', function() {
|
26
|
+
jQuery('#' + this.id + '-tip').hide(1);
|
27
|
+
});
|
28
|
+
});
|
29
|
+
|
30
|
+
function show_tip(object_id,title,tip_text,position) {
|
31
|
+
if(title == false || title == null)title=" ";
|
32
|
+
var tip_id = object_id + '-tip';
|
33
|
+
jQuery('#' + tip_id).remove();
|
34
|
+
var elem = jQuery('#' + object_id);
|
35
|
+
if(elem[0].type == 'checkbox') {
|
36
|
+
elem = elem.siblings("label");
|
37
|
+
}
|
38
|
+
var elemPos = elem.offset();
|
39
|
+
var elemWidth = elem.outerWidth();
|
40
|
+
var elemHeight = elem.outerHeight();
|
41
|
+
// default is bottom
|
42
|
+
var position_class = 'bottom-tip';
|
43
|
+
var tip_header = '';
|
44
|
+
var posX = elemPos.left;
|
45
|
+
var posY = elemPos.top + elemHeight;
|
46
|
+
|
47
|
+
if (position == 'right'){
|
48
|
+
posX = elemPos.left + elemWidth;
|
49
|
+
posY = elemPos.top;
|
50
|
+
position_class = 'right-tip';
|
51
|
+
} else if (position == 'left') {
|
52
|
+
position_class = 'left-tip';
|
53
|
+
} else if (position == 'top') {
|
54
|
+
position_class = 'top-tip';
|
55
|
+
}
|
56
|
+
|
57
|
+
var tip_header = '<div id="tip-header"></div>';
|
58
|
+
var tip_content = '<div id="tip-title">' + title + '</div><div id="tip-main"><div class="tip-content">' + tip_text + '</div></div>';
|
59
|
+
var combined = tip_header + tip_content;
|
60
|
+
if (position == 'top') { combined = tip_content + tip_header; }
|
61
|
+
jQuery('#' + tip_id).remove(); // remove the old one
|
62
|
+
jQuery("body").append('<div id="' + tip_id + '" class="tip ' + position_class + '">' + combined + '</div>');
|
63
|
+
var tool_tip = jQuery('#' + tip_id);
|
64
|
+
|
65
|
+
if (position == 'left') {
|
66
|
+
posX = elemPos.left - (tool_tip.outerWidth() + parseInt(tool_tip.css('margin-right')));
|
67
|
+
posY = elemPos.top;
|
68
|
+
} else if (position == 'top') {
|
69
|
+
posX = elemPos.left;
|
70
|
+
posY = elemPos.top - (tool_tip.outerHeight() + parseInt(tool_tip.css('margin-bottom')));
|
71
|
+
}
|
72
|
+
|
73
|
+
tool_tip.css({left: posX + "px", top: posY + "px"});
|
74
|
+
tool_tip.show();
|
75
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
(function($){$().ajaxSend(function(a,xhr,s){xhr.setRequestHeader("Accept","text/javascript, text/html, application/xml, text/xml, */*")})})(jQuery);(function($){$.fn.reset=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};$.fn.enable=function(){return this.each(function(){this.disabled=false})};$.fn.disable=function(){return this.each(function(){this.disabled=true})}})(jQuery);(function($){$.extend({fieldEvent:function(el,obs){var field=el[0]||el,e="change";if(field.type=="radio"||field.type=="checkbox"){e="click"}else{if(obs&&field.type=="text"||field.type=="textarea"){e="keyup"}}return e}});$.fn.extend({delayedObserver:function(delay,callback){var el=$(this);if(typeof window.delayedObserverStack=="undefined"){window.delayedObserverStack=[]}if(typeof window.delayedObserverCallback=="undefined"){window.delayedObserverCallback=function(stackPos){observed=window.delayedObserverStack[stackPos];if(observed.timer){clearTimeout(observed.timer)}observed.timer=setTimeout(function(){observed.timer=null;observed.callback(observed.obj,observed.obj.formVal())},observed.delay*1000);observed.oldVal=observed.obj.formVal()}}window.delayedObserverStack.push({obj:el,timer:null,delay:delay,oldVal:el.formVal(),callback:callback});var stackPos=window.delayedObserverStack.length-1;if(el[0].tagName=="FORM"){$(":input",el).each(function(){var field=$(this);field.bind($.fieldEvent(field,delay),function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.obj.oldVal){return}else{window.delayedObserverCallback(stackPos)}})})}else{el.bind($.fieldEvent(el,delay),function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.obj.oldVal){return}else{window.delayedObserverCallback(stackPos)}})}},formVal:function(){var el=this[0];if(el.tagName=="FORM"){return this.serialize()}if(el.type=="checkbox"||self.type=="radio"){return this.filter("input:checked").val()||""}else{return this.val()}}})})(jQuery);(function($){$.fn.extend({visualEffect:function(o){e=o.replace(/\_(.)/g,function(m,l){return l.toUpperCase()});return eval("$(this)."+e+"()")},appear:function(speed,callback){return this.fadeIn(speed,callback)},blindDown:function(speed,callback){return this.show("blind",{direction:"vertical"},speed,callback)},blindUp:function(speed,callback){return this.hide("blind",{direction:"vertical"},speed,callback)},blindRight:function(speed,callback){return this.show("blind",{direction:"horizontal"},speed,callback)},blindLeft:function(speed,callback){this.hide("blind",{direction:"horizontal"},speed,callback);return this},dropOut:function(speed,callback){return this.hide("drop",{direction:"down"},speed,callback)},dropIn:function(speed,callback){return this.show("drop",{direction:"up"},speed,callback)},fade:function(speed,callback){return this.fadeOut(speed,callback)},fadeToggle:function(speed,callback){return this.animate({opacity:"toggle"},speed,callback)},fold:function(speed,callback){return this.hide("fold",{},speed,callback)},foldOut:function(speed,callback){return this.show("fold",{},speed,callback)},grow:function(speed,callback){return this.show("scale",{},speed,callback)},highlight:function(speed,callback){return this.show("highlight",{},speed,callback)},puff:function(speed,callback){return this.hide("puff",{},speed,callback)},pulsate:function(speed,callback){return this.show("pulsate",{},speed,callback)},shake:function(speed,callback){return this.show("shake",{},speed,callback)},shrink:function(speed,callback){return this.hide("scale",{},speed,callback)},squish:function(speed,callback){return this.hide("scale",{origin:["top","left"]},speed,callback)},slideUp:function(speed,callback){return this.hide("slide",{direction:"up"},speed,callback)},slideDown:function(speed,callback){return this.show("slide",{direction:"up"},speed,callback)},switchOff:function(speed,callback){return this.hide("clip",{},speed,callback)},switchOn:function(speed,callback){return this.show("clip",{},speed,callback)}})})(jQuery);
|
@@ -0,0 +1,50 @@
|
|
1
|
+
function setup_country(force_load){
|
2
|
+
|
3
|
+
var country_id = jQuery("#countries").val();
|
4
|
+
var state_id = jQuery("#states").val();
|
5
|
+
|
6
|
+
if (country_id == undefined){
|
7
|
+
return;
|
8
|
+
}
|
9
|
+
|
10
|
+
if (country_id == '-1'){
|
11
|
+
jQuery("#states").val('-1');
|
12
|
+
jQuery("#counties").val('-1');
|
13
|
+
}
|
14
|
+
|
15
|
+
if (country_id == '-1' || country_id == ''){
|
16
|
+
jQuery("#states-container").hide();
|
17
|
+
jQuery("#counties-container").hide();
|
18
|
+
return;
|
19
|
+
}
|
20
|
+
|
21
|
+
if(force_load || state_id == '' || state_id == null || state_id == -1) {
|
22
|
+
jQuery.getJSON("/load_states_for_country/" + country_id + ".json", function(data){
|
23
|
+
var options = '';
|
24
|
+
jQuery("#counties-container").hide();
|
25
|
+
jQuery('#states-container label').html(data.label);
|
26
|
+
states = data.states;
|
27
|
+
if(states.length > 0){
|
28
|
+
for (var i = 0; i < states.length; i++) {
|
29
|
+
var state_id = states[i].state.id;
|
30
|
+
if(state_id == undefined) { state_id = ''; }
|
31
|
+
options += '<option value="' + state_id + '">' + states[i].state.name + '</option>';
|
32
|
+
}
|
33
|
+
jQuery("#states-container").show();
|
34
|
+
jQuery("select#states").html(options);
|
35
|
+
} else {
|
36
|
+
jQuery("#states-container").hide();
|
37
|
+
}
|
38
|
+
});
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
jQuery(document).ready(function() {
|
43
|
+
jQuery("#countries-container select").change(function() {
|
44
|
+
setup_country(true);
|
45
|
+
});
|
46
|
+
if(jQuery("#states").val() == '' || jQuery("#states").val() == null) {
|
47
|
+
jQuery("#states-container").hide();
|
48
|
+
}
|
49
|
+
setup_country(false);
|
50
|
+
});
|
@@ -0,0 +1,147 @@
|
|
1
|
+
// compress with http://closure-compiler.appspot.com/home
|
2
|
+
//jQuery.noConflict();
|
3
|
+
jQuery(document).ajaxSend(function(event, request, settings) {
|
4
|
+
add_headers(request);
|
5
|
+
if (settings.type.toUpperCase() == 'GET' || typeof(AUTH_TOKEN) == "undefined") return; // for details see: http://www.justinball.com/2009/07/08/jquery-ajax-get-in-firefox-post-in-internet-explorer/
|
6
|
+
// settings.data is a serialized string like "foo=bar&baz=boink" (or null)
|
7
|
+
settings.data = settings.data || "";
|
8
|
+
if (typeof(AUTH_TOKEN) != "undefined")
|
9
|
+
settings.data += (settings.data ? "&" : "") + "authenticity_token=" + encodeURIComponent(AUTH_TOKEN);
|
10
|
+
});
|
11
|
+
|
12
|
+
function apply_ajax_forms() {
|
13
|
+
jQuery('form.ajax').ajaxForm({
|
14
|
+
dataType: 'script',
|
15
|
+
beforeSend: add_headers
|
16
|
+
});
|
17
|
+
jQuery('form.ajax').append('<input type="hidden" name="format" value="js" />');
|
18
|
+
}
|
19
|
+
|
20
|
+
function add_headers(xhr){
|
21
|
+
xhr.setRequestHeader("Accept", "text/javascript");
|
22
|
+
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
23
|
+
}
|
24
|
+
|
25
|
+
jQuery(document).ready(function() {
|
26
|
+
|
27
|
+
jQuery('a.ajax-delete').live('click', function() {
|
28
|
+
var title = jQuery(this).attr('title');
|
29
|
+
var do_delete = true;
|
30
|
+
if(title.length > 0){
|
31
|
+
do_delete = confirm(title);
|
32
|
+
}
|
33
|
+
if (do_delete){
|
34
|
+
jQuery.post(this.href, { _method: 'delete', format: 'js' }, null, "script");
|
35
|
+
}
|
36
|
+
return false;
|
37
|
+
});
|
38
|
+
|
39
|
+
jQuery('a.ajax-update').live('click', function() {
|
40
|
+
jQuery.post(this.href, { _method: 'put', format: 'js' }, null, "script");
|
41
|
+
return false;
|
42
|
+
});
|
43
|
+
|
44
|
+
jQuery(".submit-form").click(function() {
|
45
|
+
jQuery(this).parent('form').submit();
|
46
|
+
});
|
47
|
+
|
48
|
+
apply_ajax_forms();
|
49
|
+
|
50
|
+
jQuery('a.dialog-pop').live('click', function() {
|
51
|
+
var d = jQuery('<div class="dialog"></div>').appendTo("body");
|
52
|
+
d.dialog({ modal: true, autoOpen: false, width: 'auto', title: jQuery(this).attr('title') });
|
53
|
+
d.load(jQuery(this).attr('href'), '', function(){
|
54
|
+
d.dialog("open");
|
55
|
+
apply_ajax_forms();
|
56
|
+
});
|
57
|
+
return false;
|
58
|
+
});
|
59
|
+
|
60
|
+
jQuery(".submit-delete").live('click', function() {
|
61
|
+
jQuery(this).parents('.delete-container').fadeOut();
|
62
|
+
var form = jQuery(this).parents('form');
|
63
|
+
jQuery.post(form.attr('action') + '.json', form.serialize(),
|
64
|
+
function(data){
|
65
|
+
var json = eval('(' + data + ')');
|
66
|
+
if(!json.success){
|
67
|
+
jQuery.jGrowl.info(json.message);
|
68
|
+
}
|
69
|
+
});
|
70
|
+
return false;
|
71
|
+
});
|
72
|
+
|
73
|
+
jQuery(".submit-delete-js").live('click', function() {
|
74
|
+
jQuery(this).parents('.delete-container').fadeOut();
|
75
|
+
var form = jQuery(this).parents('form');
|
76
|
+
jQuery.post(form.attr('action') + '.js', form.serialize(),
|
77
|
+
function(data){
|
78
|
+
});
|
79
|
+
return false;
|
80
|
+
});
|
81
|
+
|
82
|
+
jQuery(document).ready(function() {
|
83
|
+
jQuery('.waiting').hide();
|
84
|
+
jQuery(".wait-button").live('click', function() {
|
85
|
+
jQuery(this).siblings('.waiting').show();
|
86
|
+
jQuery(this).hide();
|
87
|
+
});
|
88
|
+
});
|
89
|
+
|
90
|
+
});
|
91
|
+
|
92
|
+
// String list methods. These are handy for dealing with comma delimited lists
|
93
|
+
// in text boxes such as a list of emails or tags.
|
94
|
+
// Given a comma delimited string add a new item if it isn't in the string
|
95
|
+
function add_to_list(items_string, new_item){
|
96
|
+
var items = split_list(items_string);
|
97
|
+
var add = true;
|
98
|
+
for(i=0;i<items.length;i++){
|
99
|
+
if(items[i] == new_item){ add = false; }
|
100
|
+
}
|
101
|
+
if(add){
|
102
|
+
items.push(new_item);
|
103
|
+
}
|
104
|
+
return items.join(', ');
|
105
|
+
}
|
106
|
+
|
107
|
+
// Given a comma delimited list remove an item from the string
|
108
|
+
function remove_from_list(items_string, remove_item){
|
109
|
+
var items = split_list(items_string);
|
110
|
+
var cleaned = [];
|
111
|
+
for(i=0;i<items.length;i++){
|
112
|
+
if(items[i] != remove_item){
|
113
|
+
cleaned.push(items[i]);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
return cleaned.join(', ');
|
117
|
+
}
|
118
|
+
|
119
|
+
// Split a string on commas
|
120
|
+
function split_list(items_string){
|
121
|
+
if(undefined != items_string && items_string.length > 0){
|
122
|
+
var items = items_string.split(',');
|
123
|
+
} else {
|
124
|
+
var items = [];
|
125
|
+
}
|
126
|
+
var cleaned = [];
|
127
|
+
for(i=0;i<items.length;i++){
|
128
|
+
var cleaned_item = jQuery.trim(items[i]);
|
129
|
+
if(cleaned_item.length > 0){
|
130
|
+
cleaned.push(cleaned_item);
|
131
|
+
}
|
132
|
+
}
|
133
|
+
return cleaned;
|
134
|
+
}
|
135
|
+
|
136
|
+
function isEncodedHtml(str) {
|
137
|
+
if(str.search(/&/g) != -1 || str.search(/</g) != -1 || str.search(/>/g) != -1)
|
138
|
+
return true;
|
139
|
+
else
|
140
|
+
return false;
|
141
|
+
};
|
142
|
+
|
143
|
+
function decodeHtml(str){
|
144
|
+
if(isEncodedHtml(str))
|
145
|
+
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
146
|
+
return str;
|
147
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
jQuery(document).ready(function() {
|
2
|
+
jQuery("#user_login").blur(function(){
|
3
|
+
jQuery.post("/users/is_login_available",{ user_login:jQuery(this).val(), format:'js' },function(data){});
|
4
|
+
});
|
5
|
+
jQuery("#user_login").keydown(function() {
|
6
|
+
jQuery("#username-availibility").html('');
|
7
|
+
});
|
8
|
+
jQuery("#user_email").blur(function(){
|
9
|
+
jQuery.post("/users/is_email_available",{ user_email:jQuery(this).val(), format:'js' },function(data){});
|
10
|
+
});
|
11
|
+
jQuery("#user_email").keydown(function() {
|
12
|
+
jQuery("#email-availibility").html('');
|
13
|
+
});
|
14
|
+
jQuery(".login-search").autocomplete('/users/login_search.js', {
|
15
|
+
minChars: 1,
|
16
|
+
delay: 200,
|
17
|
+
autoFill: true,
|
18
|
+
mustMatch: false
|
19
|
+
});
|
20
|
+
});
|
@@ -0,0 +1,149 @@
|
|
1
|
+
// compress with http://closure-compiler.appspot.com/home
|
2
|
+
//jQuery.noConflict();
|
3
|
+
jQuery(document).ajaxSend(function(event, request, settings) {
|
4
|
+
add_headers(request);
|
5
|
+
if (settings.type.toUpperCase() == 'GET' || typeof(AUTH_TOKEN) == "undefined") return; // for details see: http://www.justinball.com/2009/07/08/jquery-ajax-get-in-firefox-post-in-internet-explorer/
|
6
|
+
// settings.data is a serialized string like "foo=bar&baz=boink" (or null)
|
7
|
+
settings.data = settings.data || "";
|
8
|
+
if (typeof(AUTH_TOKEN) != "undefined")
|
9
|
+
settings.data += (settings.data ? "&" : "") + "authenticity_token=" + encodeURIComponent(AUTH_TOKEN);
|
10
|
+
});
|
11
|
+
|
12
|
+
function apply_ajax_forms() {
|
13
|
+
jQuery('form.ajax').ajaxForm({
|
14
|
+
dataType: 'script',
|
15
|
+
beforeSend: add_headers
|
16
|
+
});
|
17
|
+
jQuery('form.ajax').append('<input type="hidden" name="format" value="js" />');
|
18
|
+
}
|
19
|
+
|
20
|
+
function add_headers(xhr){
|
21
|
+
xhr.setRequestHeader("Accept", "text/javascript");
|
22
|
+
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
23
|
+
}
|
24
|
+
|
25
|
+
jQuery(document).ready(function() {
|
26
|
+
|
27
|
+
jQuery('a.ajax-delete').live('click', function() {
|
28
|
+
var title = jQuery(this).attr('title');
|
29
|
+
var do_delete = true;
|
30
|
+
if(title.length > 0){
|
31
|
+
do_delete = confirm(title);
|
32
|
+
}
|
33
|
+
if (do_delete){
|
34
|
+
jQuery.post(this.href, { _method: 'delete', format: 'js' }, null, "script");
|
35
|
+
}
|
36
|
+
return false;
|
37
|
+
});
|
38
|
+
|
39
|
+
jQuery('a.ajax-update').live('click', function() {
|
40
|
+
jQuery.post(this.href, { _method: 'put', format: 'js' }, null, "script");
|
41
|
+
return false;
|
42
|
+
});
|
43
|
+
|
44
|
+
jQuery(".submit-form").click(function() {
|
45
|
+
jQuery(this).parent('form').submit();
|
46
|
+
});
|
47
|
+
|
48
|
+
//jQuery("ul.drop-menu").menu();
|
49
|
+
|
50
|
+
apply_ajax_forms();
|
51
|
+
|
52
|
+
jQuery('a.dialog-pop').live('click', function() {
|
53
|
+
var d = jQuery('<div class="dialog"></div>').appendTo("body");
|
54
|
+
d.dialog({ modal: true, autoOpen: false, width: 'auto', title: jQuery(this).attr('title') });
|
55
|
+
d.load(jQuery(this).attr('href'), '', function(){
|
56
|
+
d.dialog("open");
|
57
|
+
apply_ajax_forms();
|
58
|
+
});
|
59
|
+
return false;
|
60
|
+
});
|
61
|
+
|
62
|
+
jQuery(".submit-delete").live('click', function() {
|
63
|
+
jQuery(this).parents('.delete-container').fadeOut();
|
64
|
+
var form = jQuery(this).parents('form');
|
65
|
+
jQuery.post(form.attr('action') + '.json', form.serialize(),
|
66
|
+
function(data){
|
67
|
+
var json = eval('(' + data + ')');
|
68
|
+
if(!json.success){
|
69
|
+
jQuery.jGrowl.info(json.message);
|
70
|
+
}
|
71
|
+
});
|
72
|
+
return false;
|
73
|
+
});
|
74
|
+
|
75
|
+
jQuery(".submit-delete-js").live('click', function() {
|
76
|
+
jQuery(this).parents('.delete-container').fadeOut();
|
77
|
+
var form = jQuery(this).parents('form');
|
78
|
+
jQuery.post(form.attr('action') + '.js', form.serialize(),
|
79
|
+
function(data){
|
80
|
+
});
|
81
|
+
return false;
|
82
|
+
});
|
83
|
+
|
84
|
+
jQuery(document).ready(function() {
|
85
|
+
jQuery('.waiting').hide();
|
86
|
+
jQuery(".wait-button").live('click', function() {
|
87
|
+
jQuery(this).siblings('.waiting').show();
|
88
|
+
jQuery(this).hide();
|
89
|
+
});
|
90
|
+
});
|
91
|
+
|
92
|
+
});
|
93
|
+
|
94
|
+
// String list methods. These are handy for dealing with comma delimited lists
|
95
|
+
// in text boxes such as a list of emails or tags.
|
96
|
+
// Given a comma delimited string add a new item if it isn't in the string
|
97
|
+
function add_to_list(items_string, new_item){
|
98
|
+
var items = split_list(items_string);
|
99
|
+
var add = true;
|
100
|
+
for(i=0;i<items.length;i++){
|
101
|
+
if(items[i] == new_item){ add = false; }
|
102
|
+
}
|
103
|
+
if(add){
|
104
|
+
items.push(new_item);
|
105
|
+
}
|
106
|
+
return items.join(', ');
|
107
|
+
}
|
108
|
+
|
109
|
+
// Given a comma delimited list remove an item from the string
|
110
|
+
function remove_from_list(items_string, remove_item){
|
111
|
+
var items = split_list(items_string);
|
112
|
+
var cleaned = [];
|
113
|
+
for(i=0;i<items.length;i++){
|
114
|
+
if(items[i] != remove_item){
|
115
|
+
cleaned.push(items[i]);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
return cleaned.join(', ');
|
119
|
+
}
|
120
|
+
|
121
|
+
// Split a string on commas
|
122
|
+
function split_list(items_string){
|
123
|
+
if(undefined != items_string && items_string.length > 0){
|
124
|
+
var items = items_string.split(',');
|
125
|
+
} else {
|
126
|
+
var items = [];
|
127
|
+
}
|
128
|
+
var cleaned = [];
|
129
|
+
for(i=0;i<items.length;i++){
|
130
|
+
var cleaned_item = jQuery.trim(items[i]);
|
131
|
+
if(cleaned_item.length > 0){
|
132
|
+
cleaned.push(cleaned_item);
|
133
|
+
}
|
134
|
+
}
|
135
|
+
return cleaned;
|
136
|
+
}
|
137
|
+
|
138
|
+
function isEncodedHtml(str) {
|
139
|
+
if(str.search(/&/g) != -1 || str.search(/</g) != -1 || str.search(/>/g) != -1)
|
140
|
+
return true;
|
141
|
+
else
|
142
|
+
return false;
|
143
|
+
};
|
144
|
+
|
145
|
+
function decodeHtml(str){
|
146
|
+
if(isEncodedHtml(str))
|
147
|
+
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
148
|
+
return str;
|
149
|
+
}
|
@@ -0,0 +1,100 @@
|
|
1
|
+
jQuery(document).ready(function() {
|
2
|
+
apply_comment_methods();
|
3
|
+
});
|
4
|
+
|
5
|
+
function apply_comment_methods(){
|
6
|
+
setup_comment_submit();
|
7
|
+
hide_comment_boxes();
|
8
|
+
apply_comment_hover();
|
9
|
+
apply_activity_hover();
|
10
|
+
jQuery('.activity-no-comments').hide();
|
11
|
+
|
12
|
+
jQuery('.activity-has-comments').find('textarea').click(function(){
|
13
|
+
show_comment_box(this);
|
14
|
+
});
|
15
|
+
jQuery('.activity-has-comments').find('textarea').blur(function(){
|
16
|
+
textarea = jQuery(this);
|
17
|
+
if (textarea.val() == ''){
|
18
|
+
hide_comment_boxes();
|
19
|
+
}
|
20
|
+
});
|
21
|
+
|
22
|
+
jQuery('.make-comment').click(function(){
|
23
|
+
var id = this.id.replace('make_comment_activity_', '');
|
24
|
+
var comment_box = jQuery('#comment_activity_' + id);
|
25
|
+
comment_box.find('textarea').removeClass('min');
|
26
|
+
comment_box.find('textarea').addClass('max');
|
27
|
+
comment_box.show();
|
28
|
+
comment_box.find('textarea').get(0).focus();
|
29
|
+
comment_box.find('textarea').blur(function(){
|
30
|
+
if (jQuery(this).val() == ''){
|
31
|
+
jQuery(this).closest('.activity-comment').hide();
|
32
|
+
}
|
33
|
+
});
|
34
|
+
return false;
|
35
|
+
});
|
36
|
+
}
|
37
|
+
|
38
|
+
function setup_comment_submit(){
|
39
|
+
jQuery(".comment-submit").click(function() {
|
40
|
+
jQuery(this).siblings('textarea').hide();
|
41
|
+
jQuery(this).parent().append('<p class="comment-loading"><img src="/images/spinner.gif" alt="loading..." /> ' + ADD_COMMENT_MESSAGE + '</p>');
|
42
|
+
var form = jQuery(this).parents('form');
|
43
|
+
jQuery.post(form.attr('action'), form.serialize() + '&format=json',
|
44
|
+
function(data){
|
45
|
+
var json = eval('(' + data + ')');
|
46
|
+
if(!json.success){
|
47
|
+
jQuery.jGrowl.info(json.message);
|
48
|
+
} else {
|
49
|
+
jQuery('.activity-comment').get(0).clone(true);
|
50
|
+
jQuery('.comment-loading').remove();
|
51
|
+
jQuery('.activity-has-comments').find('textarea').show();
|
52
|
+
apply_comment_methods();
|
53
|
+
}
|
54
|
+
});
|
55
|
+
return false;
|
56
|
+
});
|
57
|
+
}
|
58
|
+
|
59
|
+
function hide_comment_boxes(){
|
60
|
+
jQuery('.activity-has-comments').children('.actor-icon').hide();
|
61
|
+
jQuery('.activity-has-comments').find('.button').hide();
|
62
|
+
jQuery('.activity-has-comments').find('textarea').val(COMMENT_PROMPT);
|
63
|
+
jQuery('.activity-has-comments').find('textarea').addClass('min');
|
64
|
+
}
|
65
|
+
|
66
|
+
function show_comment_box(obj){
|
67
|
+
textarea = jQuery(obj);
|
68
|
+
textarea.addClass('max');
|
69
|
+
textarea.removeClass('min');
|
70
|
+
textarea.closest('.comment-form-wrapper').siblings('.actor-icon').show();
|
71
|
+
textarea.siblings('.button').show();
|
72
|
+
if (textarea.val() == COMMENT_PROMPT) {
|
73
|
+
textarea.val('');
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
function get_latest_activity_id(){
|
78
|
+
var activities = jQuery('#activity-feed-content').children('.activity-status-update');
|
79
|
+
if(activities.length > 0){
|
80
|
+
return activities[0].id.replace('activity_', '');
|
81
|
+
} else {
|
82
|
+
return '';
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
function update_feed(request){
|
87
|
+
jQuery('#activity-feed-content').prepend(request);
|
88
|
+
}
|
89
|
+
|
90
|
+
function apply_activity_hover(){
|
91
|
+
jQuery('.activity-content').hover(
|
92
|
+
function () { jQuery(this).addClass('activity-hover'); },
|
93
|
+
function () { jQuery(this).removeClass('activity-hover'); } );
|
94
|
+
}
|
95
|
+
|
96
|
+
function apply_comment_hover(){
|
97
|
+
jQuery('.activity-comment').hover(
|
98
|
+
function () { jQuery(this).addClass('comment-hover'); },
|
99
|
+
function () { jQuery(this).removeClass('comment-hover'); } );
|
100
|
+
}
|
File without changes
|
@@ -0,0 +1,50 @@
|
|
1
|
+
function setup_country(force_load){
|
2
|
+
|
3
|
+
var country_id = jQuery("#countries").val();
|
4
|
+
var state_id = jQuery("#states").val();
|
5
|
+
|
6
|
+
if (country_id == undefined){
|
7
|
+
return;
|
8
|
+
}
|
9
|
+
|
10
|
+
if (country_id == '-1'){
|
11
|
+
jQuery("#states").val('-1');
|
12
|
+
jQuery("#counties").val('-1');
|
13
|
+
}
|
14
|
+
|
15
|
+
if (country_id == '-1' || country_id == ''){
|
16
|
+
jQuery("#states-container").hide();
|
17
|
+
jQuery("#counties-container").hide();
|
18
|
+
return;
|
19
|
+
}
|
20
|
+
|
21
|
+
if(force_load || state_id == '' || state_id == null || state_id == -1) {
|
22
|
+
jQuery.getJSON("/load_states_for_country/" + country_id + ".json", function(data){
|
23
|
+
var options = '';
|
24
|
+
jQuery("#counties-container").hide();
|
25
|
+
jQuery('#states-container label').html(data.label);
|
26
|
+
states = data.states;
|
27
|
+
if(states.length > 0){
|
28
|
+
for (var i = 0; i < states.length; i++) {
|
29
|
+
var state_id = states[i].state.id;
|
30
|
+
if(state_id == undefined) { state_id = ''; }
|
31
|
+
options += '<option value="' + state_id + '">' + states[i].state.name + '</option>';
|
32
|
+
}
|
33
|
+
jQuery("#states-container").show();
|
34
|
+
jQuery("select#states").html(options);
|
35
|
+
} else {
|
36
|
+
jQuery("#states-container").hide();
|
37
|
+
}
|
38
|
+
});
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
jQuery(document).ready(function() {
|
43
|
+
jQuery("#countries-container select").change(function() {
|
44
|
+
setup_country(true);
|
45
|
+
});
|
46
|
+
if(jQuery("#states").val() == '' || jQuery("#states").val() == null) {
|
47
|
+
jQuery("#states-container").hide();
|
48
|
+
}
|
49
|
+
setup_country(false);
|
50
|
+
});
|
@@ -0,0 +1,53 @@
|
|
1
|
+
// from http://blog.peelmeagrape.net/2008/7/26/time-ago-in-words-javascript-part-1
|
2
|
+
function distanceOfTimeInWords(fromTime, toTime, includeSeconds) {
|
3
|
+
var fromSeconds = fromTime.getTime();
|
4
|
+
var toSeconds = toTime.getTime();
|
5
|
+
var distanceInSeconds = Math.round(Math.abs(fromSeconds - toSeconds) / 1000)
|
6
|
+
var distanceInMinutes = Math.round(distanceInSeconds / 60)
|
7
|
+
if (distanceInMinutes <= 1) {
|
8
|
+
if (!includeSeconds)
|
9
|
+
return (distanceInMinutes == 0) ? 'less than a minute' : '1 minute'
|
10
|
+
if (distanceInSeconds < 5)
|
11
|
+
return 'less than 5 seconds'
|
12
|
+
if (distanceInSeconds < 10)
|
13
|
+
return 'less than 10 seconds'
|
14
|
+
if (distanceInSeconds < 20)
|
15
|
+
return 'less than 20 seconds'
|
16
|
+
if (distanceInSeconds < 40)
|
17
|
+
return 'half a minute'
|
18
|
+
if (distanceInSeconds < 60)
|
19
|
+
return 'less than a minute'
|
20
|
+
return '1 minute'
|
21
|
+
}
|
22
|
+
if (distanceInMinutes < 45)
|
23
|
+
return distanceInMinutes + ' minutes'
|
24
|
+
if (distanceInMinutes < 90)
|
25
|
+
return "about 1 hour"
|
26
|
+
if (distanceInMinutes < 1440)
|
27
|
+
return "about " + (Math.round(distanceInMinutes / 60)) + ' hours'
|
28
|
+
if (distanceInMinutes < 2880)
|
29
|
+
return "1 day"
|
30
|
+
if (distanceInMinutes < 43200)
|
31
|
+
return (Math.round(distanceInMinutes / 1440)) + ' days'
|
32
|
+
if (distanceInMinutes < 86400)
|
33
|
+
return "about 1 month"
|
34
|
+
if (distanceInMinutes < 525600)
|
35
|
+
return (Math.round(distanceInMinutes / 43200)) + ' months'
|
36
|
+
if (distanceInMinutes < 1051200)
|
37
|
+
return "about 1 year"
|
38
|
+
return "over " + (Math.round(distanceInMinutes / 525600)) + ' years'
|
39
|
+
}
|
40
|
+
|
41
|
+
if ( typeof jQuery != "undefined" )
|
42
|
+
jQuery.fn.readableDate = function(){
|
43
|
+
return this.each(function(){
|
44
|
+
var span = jQuery(this);
|
45
|
+
var date = distanceOfTimeInWords(new Date(span.text()), new Date(), true);
|
46
|
+
if (date)
|
47
|
+
jQuery(this).text(date + ' ago');
|
48
|
+
});
|
49
|
+
};
|
50
|
+
|
51
|
+
jQuery(document).ready(function() {
|
52
|
+
jQuery(".readable-time").readableDate();
|
53
|
+
});
|