ish_lib_assets 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +37 -0
- data/app/assets/images/200x200/devops.png +0 -0
- data/app/assets/images/200x200/html5.jpg +0 -0
- data/app/assets/images/200x200/nodejs.png +0 -0
- data/app/assets/images/200x200/project_management.jpg +0 -0
- data/app/assets/images/200x200/ror.jpg +0 -0
- data/app/assets/images/200x200/uiux.jpg +0 -0
- data/app/assets/images/400x400/contact-us.png +0 -0
- data/app/assets/images/400x400/devops.png +0 -0
- data/app/assets/images/400x400/html5.jpg +0 -0
- data/app/assets/images/400x400/nodejs.png +0 -0
- data/app/assets/images/400x400/project_management.jpg +0 -0
- data/app/assets/images/400x400/ror.jpg +0 -0
- data/app/assets/images/400x400/the-cloud.png +0 -0
- data/app/assets/images/400x400/uiux.jpg +0 -0
- data/app/assets/images/backgrounds/10.jpg +0 -0
- data/app/assets/images/backgrounds/11.jpg +0 -0
- data/app/assets/images/backgrounds/12.jpg +0 -0
- data/app/assets/images/backgrounds/6.jpg +0 -0
- data/app/assets/images/backgrounds/7.jpg +0 -0
- data/app/assets/images/backgrounds/8.jpg +0 -0
- data/app/assets/images/backgrounds/9.jpg +0 -0
- data/app/assets/images/backgrounds/970_grey-blue.png +0 -0
- data/app/assets/images/backgrounds/970_white.png +0 -0
- data/app/assets/images/backgrounds/970_yellow.png +0 -0
- data/app/assets/images/backgrounds/bg-circles.png +0 -0
- data/app/assets/images/backgrounds/bg5.jpg +0 -0
- data/app/assets/images/backgrounds/bg6.jpg +0 -0
- data/app/assets/images/backgrounds/bg_texture_dark.jpg +0 -0
- data/app/assets/images/backgrounds/bkg_bg.gif +0 -0
- data/app/assets/images/backgrounds/blue-seamless.jpg +0 -0
- data/app/assets/images/backgrounds/flower_1.jpg +0 -0
- data/app/assets/images/backgrounds/glitch1.jpg +0 -0
- data/app/assets/images/backgrounds/glitch2.jpg +0 -0
- data/app/assets/images/backgrounds/gray-1.jpg +0 -0
- data/app/assets/images/backgrounds/havaianas.jpg +0 -0
- data/app/assets/images/backgrounds/light-purple.jpg +0 -0
- data/app/assets/images/backgrounds/noise.jpg +0 -0
- data/app/assets/images/backgrounds/paper.jpg +0 -0
- data/app/assets/images/backgrounds/pattern_011.gif +0 -0
- data/app/assets/images/backgrounds/pattern_013.gif +0 -0
- data/app/assets/images/backgrounds/pattern_016.gif +0 -0
- data/app/assets/images/backgrounds/pattern_020.gif +0 -0
- data/app/assets/images/backgrounds/pattern_022.gif +0 -0
- data/app/assets/images/backgrounds/pattern_044.gif +0 -0
- data/app/assets/images/backgrounds/pattern_062.gif +0 -0
- data/app/assets/images/backgrounds/pattern_096.gif +0 -0
- data/app/assets/images/backgrounds/pattern_153.gif +0 -0
- data/app/assets/images/backgrounds/pattern_154.gif +0 -0
- data/app/assets/images/backgrounds/pattern_156.gif +0 -0
- data/app/assets/images/backgrounds/pattern_157.gif +0 -0
- data/app/assets/images/backgrounds/skull_1.jpg +0 -0
- data/app/assets/images/backgrounds/sky.jpg +0 -0
- data/app/assets/images/backgrounds/sky2.jpg +0 -0
- data/app/assets/images/backgrounds/sky3.jpg +0 -0
- data/app/assets/images/backgrounds/sky4.jpg +0 -0
- data/app/assets/images/backgrounds/sky5.jpg +0 -0
- data/app/assets/images/backgrounds/transparent_40.png +0 -0
- data/app/assets/images/backgrounds/transparent_70.png +0 -0
- data/app/assets/images/backgrounds/transparent_90.png +0 -0
- data/app/assets/images/backgrounds/white-seamless.jpg +0 -0
- data/app/assets/images/backgrounds/white_970x5.png +0 -0
- data/app/assets/images/backgrounds/white_blue_1.jpg +0 -0
- data/app/assets/images/cac/dot-footer.png +0 -0
- data/app/assets/images/cac/dot-header.png +0 -0
- data/app/assets/images/cac/list-style.png +0 -0
- data/app/assets/images/cac/map.png +0 -0
- data/app/assets/images/cac/phone.png +0 -0
- data/app/assets/images/cac/phone_number.png +0 -0
- data/app/assets/images/cac/screenshots/about.png +0 -0
- data/app/assets/images/cac/screenshots/contact.png +0 -0
- data/app/assets/images/cac/screenshots/home.png +0 -0
- data/app/assets/images/cac/screenshots/home.psd +0 -0
- data/app/assets/images/cac/screenshots/portfolio.png +0 -0
- data/app/assets/images/cac/screenshots/services.png +0 -0
- data/app/assets/images/cac/screenshots/team.png +0 -0
- data/app/assets/images/cac/sfbay.jpg +0 -0
- data/app/assets/images/cac/sprite.png +0 -0
- data/app/assets/images/cac/team/lizza.jpg +0 -0
- data/app/assets/images/cac/team/lizza_raw.jpg +0 -0
- data/app/assets/images/cac/team/piousbox.jpg +0 -0
- data/app/assets/images/close.png +0 -0
- data/app/assets/images/contact.png +0 -0
- data/app/assets/images/controls.png +0 -0
- data/app/assets/images/favicon.gif +0 -0
- data/app/assets/images/favicons/cac.gif +0 -0
- data/app/assets/images/favicons/ish.gif +0 -0
- data/app/assets/images/favicons/manager.ico +0 -0
- data/app/assets/images/favicons/piousbox.gif +0 -0
- data/app/assets/images/favicons/ppf.gif +0 -0
- data/app/assets/images/flags/br.png +0 -0
- data/app/assets/images/flags/en.png +0 -0
- data/app/assets/images/flags/pt.png +0 -0
- data/app/assets/images/flags/ru.png +0 -0
- data/app/assets/images/flags/us.png +0 -0
- data/app/assets/images/grad-hr.png +0 -0
- data/app/assets/images/gradient.png +0 -0
- data/app/assets/images/icons/100x100/hazard.png +0 -0
- data/app/assets/images/icons/100x100/venue.png +0 -0
- data/app/assets/images/icons/10x10/thumbs_down.png +0 -0
- data/app/assets/images/icons/10x10/thumbs_up.png +0 -0
- data/app/assets/images/icons/128x128/manager.png +0 -0
- data/app/assets/images/icons/12x12/tag.png +0 -0
- data/app/assets/images/icons/14x14/bullet.png +0 -0
- data/app/assets/images/icons/16x16/cancel.png +0 -0
- data/app/assets/images/icons/16x16/delete.png +0 -0
- data/app/assets/images/icons/16x16/expand_down.png +0 -0
- data/app/assets/images/icons/16x16/new_16.png +0 -0
- data/app/assets/images/icons/16x16/search.png +0 -0
- data/app/assets/images/icons/16x16/uploadify-cancel.png +0 -0
- data/app/assets/images/icons/20x20/edit.png +0 -0
- data/app/assets/images/icons/20x20/email.gif +0 -0
- data/app/assets/images/icons/20x20/expand.gif +0 -0
- data/app/assets/images/icons/20x20/eye-crossed.png +0 -0
- data/app/assets/images/icons/20x20/eye.png +0 -0
- data/app/assets/images/icons/20x20/facebook.gif +0 -0
- data/app/assets/images/icons/20x20/gmail.gif +0 -0
- data/app/assets/images/icons/20x20/java.gif +0 -0
- data/app/assets/images/icons/20x20/linkedin.png +0 -0
- data/app/assets/images/icons/20x20/lock.gif +0 -0
- data/app/assets/images/icons/20x20/new.png +0 -0
- data/app/assets/images/icons/20x20/pdf.gif +0 -0
- data/app/assets/images/icons/20x20/php.jpg +0 -0
- data/app/assets/images/icons/20x20/private.png +0 -0
- data/app/assets/images/icons/20x20/private2.png +0 -0
- data/app/assets/images/icons/20x20/public.png +0 -0
- data/app/assets/images/icons/20x20/public2.png +0 -0
- data/app/assets/images/icons/20x20/python.png +0 -0
- data/app/assets/images/icons/20x20/search.png +0 -0
- data/app/assets/images/icons/20x20/top.gif +0 -0
- data/app/assets/images/icons/20x20/trash.png +0 -0
- data/app/assets/images/icons/20x20/wiki.gif +0 -0
- data/app/assets/images/icons/20x20/wp.gif +0 -0
- data/app/assets/images/icons/20x20/youtube.png +0 -0
- data/app/assets/images/icons/24x24/configure.png +0 -0
- data/app/assets/images/icons/24x24/customize.png +0 -0
- data/app/assets/images/icons/24x24/edit.png +0 -0
- data/app/assets/images/icons/24x24/trash.png +0 -0
- data/app/assets/images/icons/28x28/customize.png +0 -0
- data/app/assets/images/icons/28x28/expand.png +0 -0
- data/app/assets/images/icons/32x32/comment.png +0 -0
- data/app/assets/images/icons/32x32/delicious.png +0 -0
- data/app/assets/images/icons/32x32/doc.png +0 -0
- data/app/assets/images/icons/32x32/email.png +0 -0
- data/app/assets/images/icons/32x32/expand_down.png +0 -0
- data/app/assets/images/icons/32x32/facebook.png +0 -0
- data/app/assets/images/icons/32x32/github.png +0 -0
- data/app/assets/images/icons/32x32/home.png +0 -0
- data/app/assets/images/icons/32x32/linkedin.png +0 -0
- data/app/assets/images/icons/32x32/list.png +0 -0
- data/app/assets/images/icons/32x32/logout.png +0 -0
- data/app/assets/images/icons/32x32/manager.png +0 -0
- data/app/assets/images/icons/32x32/myspace.png +0 -0
- data/app/assets/images/icons/32x32/new.png +0 -0
- data/app/assets/images/icons/32x32/new_addritem.png +0 -0
- data/app/assets/images/icons/32x32/pdf.png +0 -0
- data/app/assets/images/icons/32x32/photos_new.png +0 -0
- data/app/assets/images/icons/32x32/print.png +0 -0
- data/app/assets/images/icons/32x32/scratchpad.png +0 -0
- data/app/assets/images/icons/32x32/search.png +0 -0
- data/app/assets/images/icons/32x32/sharethis.png +0 -0
- data/app/assets/images/icons/32x32/thumbs_down.png +0 -0
- data/app/assets/images/icons/32x32/thumbs_down_2.png +0 -0
- data/app/assets/images/icons/32x32/thumbs_up.png +0 -0
- data/app/assets/images/icons/32x32/thumbs_up_2.png +0 -0
- data/app/assets/images/icons/32x32/trac.gif +0 -0
- data/app/assets/images/icons/32x32/trash.png +0 -0
- data/app/assets/images/icons/32x32/twitter.png +0 -0
- data/app/assets/images/icons/32x32/upload.png +0 -0
- data/app/assets/images/icons/32x32/word.png +0 -0
- data/app/assets/images/icons/40x40/search_40x40.png +0 -0
- data/app/assets/images/icons/48x48/city.png +0 -0
- data/app/assets/images/icons/48x48/new_photo.png +0 -0
- data/app/assets/images/icons/64x64/extended_forms.png +0 -0
- data/app/assets/images/icons/64x64/facebook.png +0 -0
- data/app/assets/images/icons/64x64/facebook_flat.png +0 -0
- data/app/assets/images/icons/64x64/github.png +0 -0
- data/app/assets/images/icons/64x64/github_flat.png +0 -0
- data/app/assets/images/icons/64x64/google.png +0 -0
- data/app/assets/images/icons/64x64/linkedin.png +0 -0
- data/app/assets/images/icons/64x64/linkedin_flat.png +0 -0
- data/app/assets/images/icons/64x64/manager.png +0 -0
- data/app/assets/images/icons/64x64/my-profile.png +0 -0
- data/app/assets/images/icons/64x64/new_addritem.png +0 -0
- data/app/assets/images/icons/64x64/new_photo.png +0 -0
- data/app/assets/images/icons/64x64/new_report.png +0 -0
- data/app/assets/images/icons/64x64/openid.png +0 -0
- data/app/assets/images/icons/64x64/rails.png +0 -0
- data/app/assets/images/icons/64x64/scratchpad.png +0 -0
- data/app/assets/images/icons/64x64/settings.png +0 -0
- data/app/assets/images/icons/64x64/twitter.png +0 -0
- data/app/assets/images/icons/64x64/yahoo_64.png +0 -0
- data/app/assets/images/icons/64x64/youtube_flat.png +0 -0
- data/app/assets/images/icons/96x96/doc.png +0 -0
- data/app/assets/images/icons/96x96/pdf.png +0 -0
- data/app/assets/images/icons/96x96/venue.png +0 -0
- data/app/assets/images/icons/delete.png +0 -0
- data/app/assets/images/icons/delicious.png +0 -0
- data/app/assets/images/icons/edit.png +0 -0
- data/app/assets/images/icons/email.gif +0 -0
- data/app/assets/images/icons/expand.gif +0 -0
- data/app/assets/images/icons/facebook.gif +0 -0
- data/app/assets/images/icons/gmail.gif +0 -0
- data/app/assets/images/icons/hazard.png +0 -0
- data/app/assets/images/icons/new_16.png +0 -0
- data/app/assets/images/icons/open.png +0 -0
- data/app/assets/images/icons/php.jpg +0 -0
- data/app/assets/images/icons/rails.png +0 -0
- data/app/assets/images/icons/search_40x40.png +0 -0
- data/app/assets/images/icons/tag.png +0 -0
- data/app/assets/images/icons/top.gif +0 -0
- data/app/assets/images/icons/trash/calendar.png +0 -0
- data/app/assets/images/left.png +0 -0
- data/app/assets/images/loading-100x100.gif +0 -0
- data/app/assets/images/loading.gif +0 -0
- data/app/assets/images/login_with_facebook.png +0 -0
- data/app/assets/images/logos/100x100/ish.png +0 -0
- data/app/assets/images/logos/100x100/ish_logo_100.png +0 -0
- data/app/assets/images/logos/100x100/logo100x100.png +0 -0
- data/app/assets/images/logos/200x200/ish_logo_200.gif +0 -0
- data/app/assets/images/logos/20x20/ish.gif +0 -0
- data/app/assets/images/logos/400x400/cac.jpg +0 -0
- data/app/assets/images/logos/400x400/ish.png +0 -0
- data/app/assets/images/logos/400x400/ish_logo_400.gif +0 -0
- data/app/assets/images/logos/400x400/ish_logo_400.jpg +0 -0
- data/app/assets/images/logos/400x400/ish_logo_400.png +0 -0
- data/app/assets/images/logos/400x400/ish_logo_400.psd +0 -0
- data/app/assets/images/logos/40x40/ish.png +0 -0
- data/app/assets/images/logos/40x40/ish_logo_40.png +0 -0
- data/app/assets/images/logos/45x45/ish.png +0 -0
- data/app/assets/images/logos/60x60/logo_60x60.png +0 -0
- type_on gray].eps +0 -0
- type_on white].eps +0 -0
- data/app/assets/images/logos/Infinite Shelter/Infinitre Shelter_FINAL [image_on gray].eps +0 -0
- data/app/assets/images/logos/Infinite Shelter/Infinitre Shelter_FINAL [image_on white].eps +0 -0
- data/app/assets/images/logos/Infinite Shelter/Infinitre-Shelter_FINAL-[image-and-type_on-gray].png +0 -0
- data/app/assets/images/logos/Infinite Shelter/Infinitre-Shelter_FINAL-[image-and-type_on-white].png +0 -0
- data/app/assets/images/logos/Infinite Shelter/Infinitre-Shelter_FINAL-[image_on-gray].png +0 -0
- data/app/assets/images/logos/Infinite Shelter/Infinitre-Shelter_FINAL-[image_on-white].png +0 -0
- data/app/assets/images/logos/Infinite Shelter/logo100x100.png +0 -0
- data/app/assets/images/logos/Infinite Shelter/logo30.jpg +0 -0
- data/app/assets/images/logos/Infinite Shelter/logoGray.png +0 -0
- data/app/assets/images/logos/Infinite Shelter/logoWhite.png +0 -0
- data/app/assets/images/logos/Infinitre-Shelter_FINAL-[image_on-white].png +0 -0
- data/app/assets/images/logos/cac.png +0 -0
- data/app/assets/images/logos/cac/CAC_logo_02_FINAL.eps +0 -0
- data/app/assets/images/logos/cac/cac.jpg +0 -0
- data/app/assets/images/logos/cac/cac.png +0 -0
- data/app/assets/images/logos/cac_long.jpg +0 -0
- data/app/assets/images/logos/ish.png +0 -0
- data/app/assets/images/logos/ish_logo_100.png +0 -0
- data/app/assets/images/logos/ish_logo_20.gif +0 -0
- data/app/assets/images/logos/ish_logo_200.gif +0 -0
- data/app/assets/images/logos/ish_logo_40.gif +0 -0
- data/app/assets/images/logos/ish_logo_40.png +0 -0
- data/app/assets/images/logos/ish_logo_400.gif +0 -0
- data/app/assets/images/logos/ish_logo_400.jpg +0 -0
- data/app/assets/images/logos/ish_logo_400.png +0 -0
- data/app/assets/images/logos/ish_logo_400.psd +0 -0
- data/app/assets/images/logos/logo.png +0 -0
- data/app/assets/images/logos/logo100x100.png +0 -0
- data/app/assets/images/logos/logo_60x60.png +0 -0
- data/app/assets/images/logos/organizer.png +0 -0
- data/app/assets/images/logos/ppf.gif +0 -0
- data/app/assets/images/logos/travel.png +0 -0
- data/app/assets/images/logos/travel_guide.png +0 -0
- data/app/assets/images/missing.png +0 -0
- data/app/assets/images/next.png +0 -0
- data/app/assets/images/no_photo.png +0 -0
- data/app/assets/images/no_photo_mini.png +0 -0
- data/app/assets/images/organizer/blue-arrow-right.png +0 -0
- data/app/assets/images/organizer/sprite2.png +0 -0
- data/app/assets/images/ppf.gif +0 -0
- data/app/assets/images/prev.png +0 -0
- data/app/assets/images/resume/language.png +0 -0
- data/app/assets/images/resume/main-nav-left.png +0 -0
- data/app/assets/images/resume/main-nav-right-active.png +0 -0
- data/app/assets/images/resume/main-nav-right.png +0 -0
- data/app/assets/images/resume/user-name-left.png +0 -0
- data/app/assets/images/resume/user-name-right.png +0 -0
- data/app/assets/images/right.png +0 -0
- data/app/assets/images/showv/about-us.jpg +0 -0
- data/app/assets/images/showv/arrows-ffffff.png +0 -0
- data/app/assets/images/showv/dragon_head_bottom.jpg +0 -0
- data/app/assets/images/showv/dragon_head_top.jpg +0 -0
- data/app/assets/images/showv/menu-border.png +0 -0
- data/app/assets/images/showv/shadow.png +0 -0
- data/app/assets/images/showv/subhead-bg.png +0 -0
- data/app/assets/images/showv/world.jpg +0 -0
- data/app/assets/images/src/contact-us.png +0 -0
- data/app/assets/images/src/devops-cropped.png +0 -0
- data/app/assets/images/src/devops.png +0 -0
- data/app/assets/images/src/html5.jpg +0 -0
- data/app/assets/images/src/html5_cropped.jpg +0 -0
- data/app/assets/images/src/nodejs.png +0 -0
- data/app/assets/images/src/nodejs_cropped.png +0 -0
- data/app/assets/images/src/project_management.jpg +0 -0
- data/app/assets/images/src/ror.jpg +0 -0
- data/app/assets/images/src/the-cloud.png +0 -0
- data/app/assets/images/src/uiux.jpg +0 -0
- data/app/assets/images/venue.png +0 -0
- data/app/assets/images/wait.gif +0 -0
- data/app/assets/javascripts/application.js +8 -0
- data/app/assets/javascripts/application.js~ +8 -0
- data/app/assets/javascripts/application_foundation.js +19 -0
- data/app/assets/javascripts/ish_lib_assets/application.js +13 -0
- data/app/assets/javascripts/photos_multiadd.coffee +35 -0
- data/app/assets/javascripts/utils.coffee +36 -0
- data/app/assets/stylesheets/application.css +25 -0
- data/app/assets/stylesheets/application.css~ +10 -0
- data/app/assets/stylesheets/application_foundation/galleries.sass +11 -0
- data/app/assets/stylesheets/application_foundation/header_footer.sass +21 -0
- data/app/assets/stylesheets/application_foundation/layout.sass +10 -0
- data/app/assets/stylesheets/application_foundation/newsitems.sass +20 -0
- data/app/assets/stylesheets/application_foundation/reports.sass +16 -0
- data/app/assets/stylesheets/application_foundation/users.sass +4 -0
- data/app/assets/stylesheets/application_foundation/videos.sass +11 -0
- data/app/assets/stylesheets/application_manager.css +6 -0
- data/app/assets/stylesheets/application_print.css +6 -0
- data/app/assets/stylesheets/application_resume.css +13 -0
- data/app/assets/stylesheets/application_resume.css~ +13 -0
- data/app/assets/stylesheets/application_resume_2.css +13 -0
- data/app/assets/stylesheets/application_resume_2.css~ +13 -0
- data/app/assets/stylesheets/common/_ads.sass +77 -0
- data/app/assets/stylesheets/common/_maps.sass +63 -0
- data/app/assets/stylesheets/common/_rate_this.sass +23 -0
- data/app/assets/stylesheets/common/_set_locale.sass +37 -0
- data/app/assets/stylesheets/common/blog.sass +7 -0
- data/app/assets/stylesheets/common/cities.sass +202 -0
- data/app/assets/stylesheets/common/common.sass +111 -0
- data/app/assets/stylesheets/common/devise.sass +29 -0
- data/app/assets/stylesheets/common/events.sass +9 -0
- data/app/assets/stylesheets/common/features.sass +28 -0
- data/app/assets/stylesheets/common/form.sass +19 -0
- data/app/assets/stylesheets/common/galleries.sass +216 -0
- data/app/assets/stylesheets/common/hf2.sass +91 -0
- data/app/assets/stylesheets/common/newsitems.sass +31 -0
- data/app/assets/stylesheets/common/photos.sass +32 -0
- data/app/assets/stylesheets/common/rate_me.sass +8 -0
- data/app/assets/stylesheets/common/reports.sass +269 -0
- data/app/assets/stylesheets/common/tags.sass +64 -0
- data/app/assets/stylesheets/common/trash/blog.sass +7 -0
- data/app/assets/stylesheets/common/users.sass +96 -0
- data/app/assets/stylesheets/common/users_organizer.sass +31 -0
- data/app/assets/stylesheets/common/users_organizer_forms.sass +126 -0
- data/app/assets/stylesheets/common/utils.sass +123 -0
- data/app/assets/stylesheets/common/vars.sass +44 -0
- data/app/assets/stylesheets/common/venues.sass +88 -0
- data/app/assets/stylesheets/common/videos.sass +10 -0
- data/app/assets/stylesheets/common/welcome.sass +21 -0
- data/app/assets/stylesheets/common_2/_maps.sass +63 -0
- data/app/assets/stylesheets/common_2/_rate_this.sass +23 -0
- data/app/assets/stylesheets/common_2/_set_locale.sass +37 -0
- data/app/assets/stylesheets/common_2/common.sass +43 -0
- data/app/assets/stylesheets/common_2/hf_application.sass +177 -0
- data/app/assets/stylesheets/common_2/hf_application_mini.sass +98 -0
- data/app/assets/stylesheets/common_2/photos.sass +5 -0
- data/app/assets/stylesheets/common_2/photos.sass~ +12 -0
- data/app/assets/stylesheets/common_2/users_organizer.sass +33 -0
- data/app/assets/stylesheets/common_2/users_organizer_forms.sass +126 -0
- data/app/assets/stylesheets/common_2/vars.sass +235 -0
- data/app/assets/stylesheets/ish_lib_assets/application.css +15 -0
- data/app/assets/stylesheets/manager/_search.sass +9 -0
- data/app/assets/stylesheets/manager/cities.sass +22 -0
- data/app/assets/stylesheets/manager/features.sass +5 -0
- data/app/assets/stylesheets/manager/galleries.sass +58 -0
- data/app/assets/stylesheets/manager/hf.sass +38 -0
- data/app/assets/stylesheets/manager/layout_manager.sass +32 -0
- data/app/assets/stylesheets/manager/manager.sass +55 -0
- data/app/assets/stylesheets/manager/newsitems.sass +3 -0
- data/app/assets/stylesheets/manager/photos.sass +19 -0
- data/app/assets/stylesheets/manager/reports.sass +66 -0
- data/app/assets/stylesheets/manager/sites.sass +27 -0
- data/app/assets/stylesheets/manager/tags.sass +34 -0
- data/app/assets/stylesheets/manager/users.sass +14 -0
- data/app/assets/stylesheets/manager/vars.sass +4 -0
- data/app/assets/stylesheets/manager/venues.sass +20 -0
- data/app/assets/stylesheets/manager/welcome.sass +13 -0
- data/app/assets/stylesheets/print/default.sass +20 -0
- data/app/assets/stylesheets/print/vars.sass +3 -0
- data/app/assets/stylesheets/resume/github.sass +9 -0
- data/app/assets/stylesheets/resume/hf.sass +18 -0
- data/app/assets/stylesheets/resume/layout_piousbox.sass +56 -0
- data/app/assets/stylesheets/resume/reports.sass +21 -0
- data/app/assets/stylesheets/resume/resume.sass +387 -0
- data/app/assets/stylesheets/resume/vars.sass +3 -0
- data/app/assets/stylesheets/spec_runner.css +5 -0
- data/app/controllers/ish_lib_assets/application_controller.rb +5 -0
- data/app/helpers/application_helper.rb +96 -0
- data/app/helpers/devise_helper.rb +9 -0
- data/app/helpers/images_helper.rb +200 -0
- data/app/helpers/ish_lib_assets/application_helper.rb +7 -0
- data/app/helpers/ish_lib_assets/application_helper.rb~ +7 -0
- data/app/views/layouts/ish_lib_assets/application.html.erb +14 -0
- data/app/views/templates/_blah_template.haml +2 -0
- data/app/views/templates/blah_template.haml~ +0 -0
- data/app/views/templates/kaminari/_first_page.haml +9 -0
- data/app/views/templates/kaminari/_first_page.haml~ +9 -0
- data/app/views/templates/kaminari/_gap.haml +8 -0
- data/app/views/templates/kaminari/_last_page.haml +9 -0
- data/app/views/templates/kaminari/_last_page.haml~ +9 -0
- data/app/views/templates/kaminari/_next_page.haml +9 -0
- data/app/views/templates/kaminari/_next_page.haml~ +9 -0
- data/app/views/templates/kaminari/_page.haml +10 -0
- data/app/views/templates/kaminari/_page.haml~ +10 -0
- data/app/views/templates/kaminari/_paginator.haml +18 -0
- data/app/views/templates/kaminari/_paginator.haml~ +18 -0
- data/app/views/templates/kaminari/_prev_page.haml +9 -0
- data/app/views/templates/kaminari/_prev_page.haml~ +9 -0
- data/config/routes.rb +2 -0
- data/lib/ish_lib_assets.rb +4 -0
- data/lib/ish_lib_assets/engine.rb +9 -0
- data/lib/ish_lib_assets/engine.rb~ +9 -0
- data/lib/ish_lib_assets/version.rb +3 -0
- data/lib/ish_lib_assets/version.rb~ +3 -0
- data/lib/tasks/ish_lib_assets_tasks.rake +4 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/integration/navigation_test.rb +8 -0
- data/test/ish_lib_assets_test.rb +7 -0
- data/test/test_helper.rb +21 -0
- data/vendor/assets/images/close.png +0 -0
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/images/loading.gif +0 -0
- data/vendor/assets/images/next.png +0 -0
- data/vendor/assets/images/prev.png +0 -0
- data/vendor/assets/javascripts/angular.js +14847 -0
- data/vendor/assets/javascripts/angular/angular-animate.js +1375 -0
- data/vendor/assets/javascripts/angular/angular-cookies.js +202 -0
- data/vendor/assets/javascripts/angular/angular-csp.css +13 -0
- data/vendor/assets/javascripts/angular/angular-loader.js +410 -0
- data/vendor/assets/javascripts/angular/angular-mocks.js +2116 -0
- data/vendor/assets/javascripts/angular/angular-resource.js +594 -0
- data/vendor/assets/javascripts/angular/angular-route.js +911 -0
- data/vendor/assets/javascripts/angular/angular-sanitize.js +622 -0
- data/vendor/assets/javascripts/angular/angular-scenario.js +32544 -0
- data/vendor/assets/javascripts/angular/angular-touch.js +563 -0
- data/vendor/assets/javascripts/angular/angular.js +20539 -0
- data/vendor/assets/javascripts/angular/errors.json +1 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_af-na.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_af-za.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_af.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_am-et.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_am.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-001.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-ae.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-bh.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-dz.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-eg.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-iq.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-jo.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-kw.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-lb.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-ly.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-ma.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-om.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-qa.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-sa.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-sd.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-sy.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-tn.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar-ye.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ar.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_bg-bg.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_bg.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_bn-bd.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_bn-in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_bn.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ca-ad.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ca-es.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ca.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_cs-cz.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_cs.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_da-dk.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_da.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_de-at.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_de-be.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_de-ch.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_de-de.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_de-li.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_de-lu.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_de.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_el-cy.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_el-gr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_el.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-as.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-au.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-bb.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-be.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-bm.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-bw.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-bz.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-ca.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-dsrt-us.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-dsrt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-fm.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-gb.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-gu.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-gy.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-hk.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-ie.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-iso.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-jm.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-mh.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-mp.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-mt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-mu.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-na.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-nz.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-ph.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-pk.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-pr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-pw.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-sg.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-tc.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-tt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-um.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-us.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-vg.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-vi.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-za.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en-zw.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_en.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-419.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-ar.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-bo.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-cl.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-co.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-cr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-do.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-ea.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-ec.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-es.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-gq.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-gt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-hn.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-ic.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-mx.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-ni.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-pa.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-pe.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-pr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-py.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-sv.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-us.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-uy.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es-ve.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_es.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_et-ee.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_et.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_eu-es.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_eu.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fa-af.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fa-ir.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fa.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fi-fi.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fi.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fil-ph.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fil.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-be.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-bf.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-bi.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-bj.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-bl.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-ca.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-cd.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-cf.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-cg.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-ch.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-ci.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-cm.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-dj.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-fr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-ga.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-gf.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-gn.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-gp.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-gq.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-km.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-lu.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-mc.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-mf.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-mg.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-ml.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-mq.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-ne.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-re.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr-yt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_fr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_gl-es.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_gl.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_gsw-ch.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_gsw.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_gu-in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_gu.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_he-il.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_he.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_hi-in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_hi.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_hr-hr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_hr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_hu-hu.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_hu.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_id-id.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_id.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_is-is.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_is.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_it-it.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_it-sm.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_it.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_iw.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ja-jp.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ja.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_kn-in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_kn.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ko-kr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ko.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ln-cd.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ln.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_lt-lt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_lt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_lv-lv.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_lv.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ml-in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ml.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_mr-in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_mr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ms-my.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ms.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_mt-mt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_mt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_nl-cw.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_nl-nl.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_nl-sx.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_nl.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_no.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_or-in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_or.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_pl-pl.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_pl.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_pt-br.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_pt-pt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_pt.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ro-ro.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ro.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ru-ru.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ru.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sk-sk.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sk.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sl-si.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sl.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sq-al.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sq.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sr-cyrl-rs.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sr-latn-rs.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sv-se.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sv.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sw-tz.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_sw.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ta-in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ta.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_te-in.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_te.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_th-th.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_th.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_tl.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_tr-tr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_tr.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_uk-ua.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_uk.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ur-pk.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_ur.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_vi-vn.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_vi.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_zh-cn.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_zh-hans-cn.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_zh-hk.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_zh-tw.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_zh.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_zu-za.js +99 -0
- data/vendor/assets/javascripts/angular/i18n/angular-locale_zu.js +99 -0
- data/vendor/assets/javascripts/angular/version.json +1 -0
- data/vendor/assets/javascripts/angular/version.txt +1 -0
- data/vendor/assets/javascripts/custom.modernizr.js +4 -0
- data/vendor/assets/javascripts/fancybox/blank.gif +0 -0
- data/vendor/assets/javascripts/fancybox/fancybox_loading.gif +0 -0
- data/vendor/assets/javascripts/fancybox/fancybox_loading@2x.gif +0 -0
- data/vendor/assets/javascripts/fancybox/fancybox_overlay.png +0 -0
- data/vendor/assets/javascripts/fancybox/fancybox_sprite.png +0 -0
- data/vendor/assets/javascripts/fancybox/fancybox_sprite@2x.png +0 -0
- data/vendor/assets/javascripts/fancybox/helpers/fancybox_buttons.png +0 -0
- data/vendor/assets/javascripts/fancybox/helpers/jquery.fancybox-buttons.css +97 -0
- data/vendor/assets/javascripts/fancybox/helpers/jquery.fancybox-buttons.js +122 -0
- data/vendor/assets/javascripts/fancybox/helpers/jquery.fancybox-media.js +199 -0
- data/vendor/assets/javascripts/fancybox/helpers/jquery.fancybox-thumbs.css +55 -0
- data/vendor/assets/javascripts/fancybox/helpers/jquery.fancybox-thumbs.js +162 -0
- data/vendor/assets/javascripts/fancybox/jquery.fancybox.css +274 -0
- data/vendor/assets/javascripts/fancybox/jquery.fancybox.js +2020 -0
- data/vendor/assets/javascripts/fancybox/jquery.fancybox.pack.js +46 -0
- data/vendor/assets/javascripts/fastclick.js +761 -0
- data/vendor/assets/javascripts/foundation/foundation-6.2.1-complete/foundation.js +8921 -0
- data/vendor/assets/javascripts/foundation/foundation-6.2.1-complete/foundation.min.js +4 -0
- data/vendor/assets/javascripts/foundation/foundation-6.2.1-complete/jquery.js +9842 -0
- data/vendor/assets/javascripts/foundation/foundation-6.2.1-complete/what-input.js +295 -0
- data/vendor/assets/javascripts/foundation/foundation.abide.js +201 -0
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +41 -0
- data/vendor/assets/javascripts/foundation/foundation.alert.js +34 -0
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +450 -0
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +184 -0
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +304 -0
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +839 -0
- data/vendor/assets/javascripts/foundation/foundation.js +8921 -0
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +118 -0
- data/vendor/assets/javascripts/foundation/foundation.min.js +10 -0
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +37 -0
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +434 -0
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +347 -0
- data/vendor/assets/javascripts/foundation/foundation.tab.js +37 -0
- data/vendor/assets/javascripts/foundation/foundation.tooltip.js +202 -0
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +380 -0
- data/vendor/assets/javascripts/jasmine/assert.coffee +62 -0
- data/vendor/assets/javascripts/jasmine/jasmine-1.1.0/MIT.LICENSE +20 -0
- data/vendor/assets/javascripts/jasmine/jasmine-1.1.0/jasmine-html.js +190 -0
- data/vendor/assets/javascripts/jasmine/jasmine-1.1.0/jasmine.css +166 -0
- data/vendor/assets/javascripts/jasmine/jasmine-1.1.0/jasmine.js +2476 -0
- data/vendor/assets/javascripts/jasmine/jasmine-1.1.0/jasmine_favicon.png +0 -0
- data/vendor/assets/javascripts/jasmine/jasmine-1.3.1/MIT.LICENSE +20 -0
- data/vendor/assets/javascripts/jasmine/jasmine-1.3.1/jasmine-html.js +681 -0
- data/vendor/assets/javascripts/jasmine/jasmine-1.3.1/jasmine.css +82 -0
- data/vendor/assets/javascripts/jasmine/jasmine-1.3.1/jasmine.js +2600 -0
- data/vendor/assets/javascripts/jquery-file-upload/README.md +68 -0
- data/vendor/assets/javascripts/jquery-file-upload/application.js +79 -0
- data/vendor/assets/javascripts/jquery-file-upload/cors/jquery.postmessage-transport.js +117 -0
- data/vendor/assets/javascripts/jquery-file-upload/cors/jquery.xdr-transport.js +85 -0
- data/vendor/assets/javascripts/jquery-file-upload/cors/postmessage.html +75 -0
- data/vendor/assets/javascripts/jquery-file-upload/cors/result.html +20 -0
- data/vendor/assets/javascripts/jquery-file-upload/index.html +176 -0
- data/vendor/assets/javascripts/jquery-file-upload/jquery.fileupload-ui.js +547 -0
- data/vendor/assets/javascripts/jquery-file-upload/jquery.fileupload.js +1477 -0
- data/vendor/assets/javascripts/jquery-file-upload/jquery.iframe-transport.js +217 -0
- data/vendor/assets/javascripts/jquery-file-upload/jquery.ui.widget.js +572 -0
- data/vendor/assets/javascripts/jquery-file-upload/package.json +60 -0
- data/vendor/assets/javascripts/jquery-file-upload/progressbar.gif +0 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/gae-go/app.yaml +12 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/gae-go/app/main.go +360 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/gae-go/resize/resize.go +246 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/gae-go/static/favicon.ico +0 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/gae-go/static/robots.txt +2 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/gae-python/app.yaml +16 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/gae-python/main.py +145 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/gae-python/static/favicon.ico +0 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/gae-python/static/robots.txt +2 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/php/index.php +384 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/test/index.html +105 -0
- data/vendor/assets/javascripts/jquery-file-upload/trash/test/test.js +1116 -0
- data/vendor/assets/javascripts/jquery-file-upload/vendor/jquery.ui.widget.js +282 -0
- data/vendor/assets/javascripts/jquery/jquery-1.7.1.js +9266 -0
- data/vendor/assets/javascripts/jquery/jquery-1.7.1.min.js +4 -0
- data/vendor/assets/javascripts/jquery/jquery-2.2.2.js +9842 -0
- data/vendor/assets/javascripts/jquery/jquery-ui.min.js +13 -0
- data/vendor/assets/javascripts/jquery/jquery-uploadify.js +986 -0
- data/vendor/assets/javascripts/jquery/jquery.autocomplete.js +645 -0
- data/vendor/assets/javascripts/jquery/jquery.cookie.js +107 -0
- data/vendor/assets/javascripts/jquery/jquery.infinitecarousel3.js +409 -0
- data/vendor/assets/javascripts/jquery/jquery.infinitecarousel3.min.js +10 -0
- data/vendor/assets/javascripts/jquery/jquery.js +9842 -0
- data/vendor/assets/javascripts/json2.js +482 -0
- data/vendor/assets/javascripts/mustache.js +536 -0
- data/vendor/assets/javascripts/order.js +189 -0
- data/vendor/assets/javascripts/placeholder.js +426 -0
- data/vendor/assets/javascripts/rails.js +393 -0
- data/vendor/assets/javascripts/share_this.js +3 -0
- data/vendor/assets/javascripts/underscore.js +999 -0
- data/vendor/assets/javascripts/what-input.js +295 -0
- data/vendor/assets/stylesheets/fancybox/jquery.fancybox.css +274 -0
- data/vendor/assets/stylesheets/foundation/foundation-6.2.1-complete/css/app.css +0 -0
- data/vendor/assets/stylesheets/foundation/foundation-6.2.1-complete/css/foundation.css +4148 -0
- data/vendor/assets/stylesheets/foundation/foundation-6.2.1-complete/css/foundation.min.css +2 -0
- data/vendor/assets/stylesheets/foundation/foundation-6.2.1-complete/index.html +169 -0
- data/vendor/assets/stylesheets/foundation/foundation-6.2.1-complete/js/app.js +1 -0
- data/vendor/assets/stylesheets/foundation/foundation-6.2.1-complete/js/vendor/foundation.js +8921 -0
- data/vendor/assets/stylesheets/foundation/foundation-6.2.1-complete/js/vendor/foundation.min.js +4 -0
- data/vendor/assets/stylesheets/foundation/foundation-6.2.1-complete/js/vendor/jquery.js +9842 -0
- data/vendor/assets/stylesheets/foundation/foundation-6.2.1-complete/js/vendor/what-input.js +295 -0
- data/vendor/assets/stylesheets/foundation/foundation.css +4148 -0
- data/vendor/assets/stylesheets/jquery-file-upload/jquery.fileupload-ui.css +56 -0
- data/vendor/assets/stylesheets/reset-min.css +2 -0
- data/vendor/assets/stylesheets/trash/active_admin.css.scss +32 -0
- data/vendor/assets/stylesheets/trash/bootstrap-responsive.css +1092 -0
- data/vendor/assets/stylesheets/trash/bootstrap-responsive.min.css +9 -0
- data/vendor/assets/stylesheets/trash/bootstrap.css +6039 -0
- data/vendor/assets/stylesheets/trash/bootstrap.min.css +9 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/css/foundation.css +5331 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/css/foundation.min.css +1 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/css/normalize.css +410 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/index.html +166 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation.min.js +10 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.abide.js +201 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.accordion.js +41 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.alert.js +34 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.clearing.js +450 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.dropdown.js +184 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.interchange.js +304 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.joyride.js +839 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.js +416 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.magellan.js +118 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.offcanvas.js +37 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.orbit.js +434 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.reveal.js +347 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.tab.js +37 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.tooltip.js +202 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/foundation/foundation.topbar.js +380 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/jquery.js +8829 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/modernizr.js +4 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/vendor/custom.modernizr.js +4 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/vendor/fastclick.js +761 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/vendor/jquery.autocomplete.js +645 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/vendor/jquery.cookie.js +107 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/vendor/jquery.js +8829 -0
- data/vendor/assets/stylesheets/trash/foundation-5.0.2/js/vendor/placeholder.js +426 -0
- data/vendor/assets/stylesheets/trash/foundation-5.css +5331 -0
- data/vendor/assets/stylesheets/trash/foundation.min.css +1 -0
- data/vendor/assets/stylesheets/trash/grid.css +280 -0
- data/vendor/assets/stylesheets/trash/lightbox.css +210 -0
- data/vendor/assets/stylesheets/trash/normalize.css +410 -0
- data/vendor/assets/stylesheets/trash/scaffolds.css.scss +69 -0
- data/vendor/assets/stylesheets/trash/screen.css +858 -0
- data/vendor/assets/stylesheets/trash/uploadify.css +92 -0
- metadata +977 -0
@@ -0,0 +1,60 @@
|
|
1
|
+
{
|
2
|
+
"name": "blueimp-file-upload",
|
3
|
+
"version": "6.1.0",
|
4
|
+
"title": "jQuery File Upload",
|
5
|
+
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.",
|
6
|
+
"keywords": [
|
7
|
+
"file",
|
8
|
+
"upload",
|
9
|
+
"widget",
|
10
|
+
"multiple",
|
11
|
+
"selection",
|
12
|
+
"drag",
|
13
|
+
"drop",
|
14
|
+
"progress",
|
15
|
+
"preview",
|
16
|
+
"cross-domain",
|
17
|
+
"cross-site",
|
18
|
+
"chunked",
|
19
|
+
"resume",
|
20
|
+
"gae",
|
21
|
+
"go",
|
22
|
+
"python",
|
23
|
+
"php"
|
24
|
+
],
|
25
|
+
"homepage": "https://github.com/blueimp/jQuery-File-Upload",
|
26
|
+
"author": {
|
27
|
+
"name": "Sebastian Tschan",
|
28
|
+
"url": "https://blueimp.net"
|
29
|
+
},
|
30
|
+
"maintainers": [
|
31
|
+
{
|
32
|
+
"name": "Sebastian Tschan",
|
33
|
+
"url": "https://blueimp.net"
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"repository": {
|
37
|
+
"type": "git",
|
38
|
+
"url": "git://github.com/blueimp/jQuery-File-Upload.git"
|
39
|
+
},
|
40
|
+
"bugs": "https://github.com/blueimp/jQuery-File-Upload/issues",
|
41
|
+
"licenses": [
|
42
|
+
{
|
43
|
+
"type": "MIT",
|
44
|
+
"url": "http://www.opensource.org/licenses/MIT"
|
45
|
+
}
|
46
|
+
],
|
47
|
+
"dependencies": {
|
48
|
+
"jquery": ">=1.6",
|
49
|
+
"jquery.ui.widget": ">=1.8",
|
50
|
+
"blueimp-load-image": ">=1.1.3",
|
51
|
+
"blueimp-tmpl": ">=1.0.2"
|
52
|
+
},
|
53
|
+
"files": [
|
54
|
+
"jquery.iframe-transport.js",
|
55
|
+
"jquery.fileupload.js",
|
56
|
+
"jquery.fileupload-ui.js",
|
57
|
+
"jquery.fileupload-ui.css",
|
58
|
+
"progressbar.gif"
|
59
|
+
]
|
60
|
+
}
|
Binary file
|
@@ -0,0 +1,360 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery File Upload Plugin GAE Go Example 1.2.1
|
3
|
+
* https://github.com/blueimp/jQuery-File-Upload
|
4
|
+
*
|
5
|
+
* Copyright 2011, Sebastian Tschan
|
6
|
+
* https://blueimp.net
|
7
|
+
*
|
8
|
+
* Licensed under the MIT license:
|
9
|
+
* http://www.opensource.org/licenses/MIT
|
10
|
+
*/
|
11
|
+
|
12
|
+
package app
|
13
|
+
|
14
|
+
import (
|
15
|
+
"appengine"
|
16
|
+
"appengine/blobstore"
|
17
|
+
"appengine/memcache"
|
18
|
+
"appengine/taskqueue"
|
19
|
+
"bytes"
|
20
|
+
"encoding/base64"
|
21
|
+
"fmt"
|
22
|
+
"http"
|
23
|
+
"image"
|
24
|
+
"image/png"
|
25
|
+
"io"
|
26
|
+
"json"
|
27
|
+
"log"
|
28
|
+
"mime/multipart"
|
29
|
+
"os"
|
30
|
+
"regexp"
|
31
|
+
"resize"
|
32
|
+
"strings"
|
33
|
+
"url"
|
34
|
+
)
|
35
|
+
|
36
|
+
import _ "image/gif"
|
37
|
+
import _ "image/jpeg"
|
38
|
+
|
39
|
+
const (
|
40
|
+
WEBSITE = "http://blueimp.github.com/jQuery-File-Upload/"
|
41
|
+
MIN_FILE_SIZE = 1 // bytes
|
42
|
+
MAX_FILE_SIZE = 5000000 // bytes
|
43
|
+
IMAGE_TYPES = "image/(gif|p?jpeg|(x-)?png)"
|
44
|
+
ACCEPT_FILE_TYPES = IMAGE_TYPES
|
45
|
+
EXPIRATION_TIME = 300 // seconds
|
46
|
+
THUMBNAIL_MAX_WIDTH = 80
|
47
|
+
THUMBNAIL_MAX_HEIGHT = THUMBNAIL_MAX_WIDTH
|
48
|
+
)
|
49
|
+
|
50
|
+
var (
|
51
|
+
imageTypes = regexp.MustCompile(IMAGE_TYPES)
|
52
|
+
acceptFileTypes = regexp.MustCompile(ACCEPT_FILE_TYPES)
|
53
|
+
)
|
54
|
+
|
55
|
+
type FileInfo struct {
|
56
|
+
Key appengine.BlobKey `json:"-"`
|
57
|
+
Url string `json:"url,omitempty"`
|
58
|
+
ThumbnailUrl string `json:"thumbnail_url,omitempty"`
|
59
|
+
Name string `json:"name"`
|
60
|
+
Type string `json:"type"`
|
61
|
+
Size int64 `json:"size"`
|
62
|
+
Error string `json:"error,omitempty"`
|
63
|
+
DeleteUrl string `json:"delete_url,omitempty"`
|
64
|
+
DeleteType string `json:"delete_type,omitempty"`
|
65
|
+
}
|
66
|
+
|
67
|
+
func (fi *FileInfo) ValidateType() (valid bool) {
|
68
|
+
if acceptFileTypes.MatchString(fi.Type) {
|
69
|
+
return true
|
70
|
+
}
|
71
|
+
fi.Error = "acceptFileTypes"
|
72
|
+
return false
|
73
|
+
}
|
74
|
+
|
75
|
+
func (fi *FileInfo) ValidateSize() (valid bool) {
|
76
|
+
if fi.Size < MIN_FILE_SIZE {
|
77
|
+
fi.Error = "minFileSize"
|
78
|
+
} else if fi.Size > MAX_FILE_SIZE {
|
79
|
+
fi.Error = "maxFileSize"
|
80
|
+
} else {
|
81
|
+
return true
|
82
|
+
}
|
83
|
+
return false
|
84
|
+
}
|
85
|
+
|
86
|
+
func (fi *FileInfo) CreateUrls(r *http.Request, c appengine.Context) {
|
87
|
+
u := &url.URL{
|
88
|
+
Scheme: r.URL.Scheme,
|
89
|
+
Host: appengine.DefaultVersionHostname(c),
|
90
|
+
Path: "/",
|
91
|
+
}
|
92
|
+
uString := u.String()
|
93
|
+
fi.Url = uString + escape(string(fi.Key)) + "/" +
|
94
|
+
escape(string(fi.Name))
|
95
|
+
fi.DeleteUrl = fi.Url
|
96
|
+
fi.DeleteType = "DELETE"
|
97
|
+
if fi.ThumbnailUrl != "" && -1 == strings.Index(
|
98
|
+
r.Header.Get("Accept"),
|
99
|
+
"application/json",
|
100
|
+
) {
|
101
|
+
fi.ThumbnailUrl = uString + "thumbnails/" +
|
102
|
+
escape(string(fi.Key))
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
func (fi *FileInfo) CreateThumbnail(r io.Reader, c appengine.Context) (data []byte, err os.Error) {
|
107
|
+
defer func() {
|
108
|
+
if rec := recover(); rec != nil {
|
109
|
+
log.Println(rec)
|
110
|
+
// 1x1 pixel transparent GIf, bas64 encoded:
|
111
|
+
s := "R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
|
112
|
+
data, _ = base64.StdEncoding.DecodeString(s)
|
113
|
+
fi.ThumbnailUrl = "data:image/gif;base64," + s
|
114
|
+
}
|
115
|
+
memcache.Add(c, &memcache.Item{
|
116
|
+
Key: string(fi.Key),
|
117
|
+
Value: data,
|
118
|
+
Expiration: EXPIRATION_TIME,
|
119
|
+
})
|
120
|
+
}()
|
121
|
+
img, _, err := image.Decode(r)
|
122
|
+
check(err)
|
123
|
+
if bounds := img.Bounds(); bounds.Dx() > THUMBNAIL_MAX_WIDTH ||
|
124
|
+
bounds.Dy() > THUMBNAIL_MAX_HEIGHT {
|
125
|
+
w, h := THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_HEIGHT
|
126
|
+
if bounds.Dx() > bounds.Dy() {
|
127
|
+
h = bounds.Dy() * h / bounds.Dx()
|
128
|
+
} else {
|
129
|
+
w = bounds.Dx() * w / bounds.Dy()
|
130
|
+
}
|
131
|
+
img = resize.Resize(img, img.Bounds(), w, h)
|
132
|
+
}
|
133
|
+
var b bytes.Buffer
|
134
|
+
err = png.Encode(&b, img)
|
135
|
+
check(err)
|
136
|
+
data = b.Bytes()
|
137
|
+
fi.ThumbnailUrl = "data:image/png;base64," +
|
138
|
+
base64.StdEncoding.EncodeToString(data)
|
139
|
+
return
|
140
|
+
}
|
141
|
+
|
142
|
+
func check(err os.Error) {
|
143
|
+
if err != nil {
|
144
|
+
panic(err)
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
func escape(s string) string {
|
149
|
+
return strings.Replace(url.QueryEscape(s), "+", "%20", -1)
|
150
|
+
}
|
151
|
+
|
152
|
+
func delayedDelete(c appengine.Context, fi *FileInfo) {
|
153
|
+
if key := string(fi.Key); key != "" {
|
154
|
+
task := &taskqueue.Task{
|
155
|
+
Path: "/" + escape(key) + "/-",
|
156
|
+
Method: "DELETE", Delay: EXPIRATION_TIME * 1000000,
|
157
|
+
}
|
158
|
+
taskqueue.Add(c, task, "")
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
func handleUpload(r *http.Request, p *multipart.Part) (fi *FileInfo) {
|
163
|
+
fi = &FileInfo{
|
164
|
+
Name: p.FileName(),
|
165
|
+
Type: p.Header.Get("Content-Type"),
|
166
|
+
}
|
167
|
+
if !fi.ValidateType() {
|
168
|
+
return
|
169
|
+
}
|
170
|
+
defer func() {
|
171
|
+
if rec := recover(); rec != nil {
|
172
|
+
log.Println(rec)
|
173
|
+
fi.Error = rec.(os.Error).String()
|
174
|
+
}
|
175
|
+
}()
|
176
|
+
var b bytes.Buffer
|
177
|
+
lr := &io.LimitedReader{p, MAX_FILE_SIZE + 1}
|
178
|
+
context := appengine.NewContext(r)
|
179
|
+
w, err := blobstore.Create(context, fi.Type)
|
180
|
+
defer func() {
|
181
|
+
w.Close()
|
182
|
+
fi.Size = MAX_FILE_SIZE + 1 - lr.N
|
183
|
+
fi.Key, err = w.Key()
|
184
|
+
check(err)
|
185
|
+
if !fi.ValidateSize() {
|
186
|
+
err := blobstore.Delete(context, fi.Key)
|
187
|
+
check(err)
|
188
|
+
return
|
189
|
+
}
|
190
|
+
delayedDelete(context, fi)
|
191
|
+
if b.Len() > 0 {
|
192
|
+
fi.CreateThumbnail(&b, context)
|
193
|
+
}
|
194
|
+
fi.CreateUrls(r, context)
|
195
|
+
}()
|
196
|
+
check(err)
|
197
|
+
var wr io.Writer = w
|
198
|
+
if imageTypes.MatchString(fi.Type) {
|
199
|
+
wr = io.MultiWriter(&b, w)
|
200
|
+
}
|
201
|
+
_, err = io.Copy(wr, lr)
|
202
|
+
return
|
203
|
+
}
|
204
|
+
|
205
|
+
func getFormValue(p *multipart.Part) string {
|
206
|
+
var b bytes.Buffer
|
207
|
+
io.Copyn(&b, p, int64(1<<20)) // Copy max: 1 MiB
|
208
|
+
return b.String()
|
209
|
+
}
|
210
|
+
|
211
|
+
func handleUploads(r *http.Request) (fileInfos []*FileInfo) {
|
212
|
+
fileInfos = make([]*FileInfo, 0)
|
213
|
+
mr, err := r.MultipartReader()
|
214
|
+
check(err)
|
215
|
+
r.Form, err = url.ParseQuery(r.URL.RawQuery)
|
216
|
+
check(err)
|
217
|
+
part, err := mr.NextPart()
|
218
|
+
for err == nil {
|
219
|
+
if name := part.FormName(); name != "" {
|
220
|
+
if part.FileName() != "" {
|
221
|
+
fileInfos = append(fileInfos, handleUpload(r, part))
|
222
|
+
} else {
|
223
|
+
r.Form[name] = append(r.Form[name], getFormValue(part))
|
224
|
+
}
|
225
|
+
}
|
226
|
+
part, err = mr.NextPart()
|
227
|
+
}
|
228
|
+
return
|
229
|
+
}
|
230
|
+
|
231
|
+
func get(w http.ResponseWriter, r *http.Request) {
|
232
|
+
if r.URL.Path == "/" {
|
233
|
+
http.Redirect(w, r, WEBSITE, http.StatusFound)
|
234
|
+
return
|
235
|
+
}
|
236
|
+
parts := strings.Split(r.URL.Path, "/")
|
237
|
+
if len(parts) == 3 {
|
238
|
+
if key := parts[1]; key != "" {
|
239
|
+
blobKey := appengine.BlobKey(key)
|
240
|
+
bi, err := blobstore.Stat(appengine.NewContext(r), blobKey)
|
241
|
+
if err == nil {
|
242
|
+
w.Header().Add(
|
243
|
+
"Cache-Control",
|
244
|
+
fmt.Sprintf("public,max-age=%d", EXPIRATION_TIME),
|
245
|
+
)
|
246
|
+
if imageTypes.MatchString(bi.ContentType) {
|
247
|
+
w.Header().Add("X-Content-Type-Options", "nosniff")
|
248
|
+
} else {
|
249
|
+
w.Header().Add("Content-Type", "application/octet-stream")
|
250
|
+
w.Header().Add(
|
251
|
+
"Content-Disposition:",
|
252
|
+
fmt.Sprintf("attachment; filename=%s;", parts[2]),
|
253
|
+
)
|
254
|
+
}
|
255
|
+
blobstore.Send(w, appengine.BlobKey(key))
|
256
|
+
return
|
257
|
+
}
|
258
|
+
}
|
259
|
+
}
|
260
|
+
http.Error(w, "404 Not Found", http.StatusNotFound)
|
261
|
+
}
|
262
|
+
|
263
|
+
func post(w http.ResponseWriter, r *http.Request) {
|
264
|
+
b, err := json.Marshal(handleUploads(r))
|
265
|
+
check(err)
|
266
|
+
if redirect := r.FormValue("redirect"); redirect != "" {
|
267
|
+
http.Redirect(w, r, fmt.Sprintf(
|
268
|
+
redirect,
|
269
|
+
escape(string(b)),
|
270
|
+
), http.StatusFound)
|
271
|
+
return
|
272
|
+
}
|
273
|
+
jsonType := "application/json"
|
274
|
+
if strings.Index(r.Header.Get("Accept"), jsonType) != -1 {
|
275
|
+
w.Header().Set("Content-Type", jsonType)
|
276
|
+
}
|
277
|
+
fmt.Fprintln(w, string(b))
|
278
|
+
}
|
279
|
+
|
280
|
+
func delete(w http.ResponseWriter, r *http.Request) {
|
281
|
+
parts := strings.Split(r.URL.Path, "/")
|
282
|
+
if len(parts) != 3 {
|
283
|
+
return
|
284
|
+
}
|
285
|
+
if key := parts[1]; key != "" {
|
286
|
+
c := appengine.NewContext(r)
|
287
|
+
blobstore.Delete(c, appengine.BlobKey(key))
|
288
|
+
memcache.Delete(c, key)
|
289
|
+
}
|
290
|
+
}
|
291
|
+
|
292
|
+
func serveThumbnail(w http.ResponseWriter, r *http.Request) {
|
293
|
+
parts := strings.Split(r.URL.Path, "/")
|
294
|
+
if len(parts) == 3 {
|
295
|
+
if key := parts[2]; key != "" {
|
296
|
+
var data []byte
|
297
|
+
c := appengine.NewContext(r)
|
298
|
+
item, err := memcache.Get(c, key)
|
299
|
+
if err == nil {
|
300
|
+
data = item.Value
|
301
|
+
} else {
|
302
|
+
blobKey := appengine.BlobKey(key)
|
303
|
+
if _, err = blobstore.Stat(c, blobKey); err == nil {
|
304
|
+
fi := FileInfo{Key: blobKey}
|
305
|
+
data, _ = fi.CreateThumbnail(
|
306
|
+
blobstore.NewReader(c, blobKey),
|
307
|
+
c,
|
308
|
+
)
|
309
|
+
}
|
310
|
+
}
|
311
|
+
if err == nil && len(data) > 3 {
|
312
|
+
w.Header().Add(
|
313
|
+
"Cache-Control",
|
314
|
+
fmt.Sprintf("public,max-age=%d", EXPIRATION_TIME),
|
315
|
+
)
|
316
|
+
contentType := "image/png"
|
317
|
+
if string(data[:3]) == "GIF" {
|
318
|
+
contentType = "image/gif"
|
319
|
+
} else if string(data[1:4]) != "PNG" {
|
320
|
+
contentType = "image/jpeg"
|
321
|
+
}
|
322
|
+
w.Header().Set("Content-Type", contentType)
|
323
|
+
fmt.Fprintln(w, string(data))
|
324
|
+
return
|
325
|
+
}
|
326
|
+
}
|
327
|
+
}
|
328
|
+
http.Error(w, "404 Not Found", http.StatusNotFound)
|
329
|
+
}
|
330
|
+
|
331
|
+
func handle(w http.ResponseWriter, r *http.Request) {
|
332
|
+
params, err := url.ParseQuery(r.URL.RawQuery)
|
333
|
+
check(err)
|
334
|
+
w.Header().Add("Access-Control-Allow-Origin", "*")
|
335
|
+
w.Header().Add(
|
336
|
+
"Access-Control-Allow-Methods",
|
337
|
+
"OPTIONS, HEAD, GET, POST, PUT, DELETE",
|
338
|
+
)
|
339
|
+
switch r.Method {
|
340
|
+
case "OPTIONS":
|
341
|
+
case "HEAD":
|
342
|
+
case "GET":
|
343
|
+
get(w, r)
|
344
|
+
case "POST":
|
345
|
+
if len(params["_method"]) > 0 && params["_method"][0] == "DELETE" {
|
346
|
+
delete(w, r)
|
347
|
+
} else {
|
348
|
+
post(w, r)
|
349
|
+
}
|
350
|
+
case "DELETE":
|
351
|
+
delete(w, r)
|
352
|
+
default:
|
353
|
+
http.Error(w, "501 Not Implemented", http.StatusNotImplemented)
|
354
|
+
}
|
355
|
+
}
|
356
|
+
|
357
|
+
func init() {
|
358
|
+
http.HandleFunc("/", handle)
|
359
|
+
http.HandleFunc("/thumbnails/", serveThumbnail)
|
360
|
+
}
|
@@ -0,0 +1,246 @@
|
|
1
|
+
// Copyright 2011 The Go Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style
|
3
|
+
// license that can be found in the LICENSE file.
|
4
|
+
|
5
|
+
package resize
|
6
|
+
|
7
|
+
import (
|
8
|
+
"image"
|
9
|
+
"image/ycbcr"
|
10
|
+
)
|
11
|
+
|
12
|
+
// Resize returns a scaled copy of the image slice r of m.
|
13
|
+
// The returned image has width w and height h.
|
14
|
+
func Resize(m image.Image, r image.Rectangle, w, h int) image.Image {
|
15
|
+
if w < 0 || h < 0 {
|
16
|
+
return nil
|
17
|
+
}
|
18
|
+
if w == 0 || h == 0 || r.Dx() <= 0 || r.Dy() <= 0 {
|
19
|
+
return image.NewRGBA64(w, h)
|
20
|
+
}
|
21
|
+
switch m := m.(type) {
|
22
|
+
case *image.RGBA:
|
23
|
+
return resizeRGBA(m, r, w, h)
|
24
|
+
case *ycbcr.YCbCr:
|
25
|
+
if m, ok := resizeYCbCr(m, r, w, h); ok {
|
26
|
+
return m
|
27
|
+
}
|
28
|
+
}
|
29
|
+
ww, hh := uint64(w), uint64(h)
|
30
|
+
dx, dy := uint64(r.Dx()), uint64(r.Dy())
|
31
|
+
// The scaling algorithm is to nearest-neighbor magnify the dx * dy source
|
32
|
+
// to a (ww*dx) * (hh*dy) intermediate image and then minify the intermediate
|
33
|
+
// image back down to a ww * hh destination with a simple box filter.
|
34
|
+
// The intermediate image is implied, we do not physically allocate a slice
|
35
|
+
// of length ww*dx*hh*dy.
|
36
|
+
// For example, consider a 4*3 source image. Label its pixels from a-l:
|
37
|
+
// abcd
|
38
|
+
// efgh
|
39
|
+
// ijkl
|
40
|
+
// To resize this to a 3*2 destination image, the intermediate is 12*6.
|
41
|
+
// Whitespace has been added to delineate the destination pixels:
|
42
|
+
// aaab bbcc cddd
|
43
|
+
// aaab bbcc cddd
|
44
|
+
// eeef ffgg ghhh
|
45
|
+
//
|
46
|
+
// eeef ffgg ghhh
|
47
|
+
// iiij jjkk klll
|
48
|
+
// iiij jjkk klll
|
49
|
+
// Thus, the 'b' source pixel contributes one third of its value to the
|
50
|
+
// (0, 0) destination pixel and two thirds to (1, 0).
|
51
|
+
// The implementation is a two-step process. First, the source pixels are
|
52
|
+
// iterated over and each source pixel's contribution to 1 or more
|
53
|
+
// destination pixels are summed. Second, the sums are divided by a scaling
|
54
|
+
// factor to yield the destination pixels.
|
55
|
+
// TODO: By interleaving the two steps, instead of doing all of
|
56
|
+
// step 1 first and all of step 2 second, we could allocate a smaller sum
|
57
|
+
// slice of length 4*w*2 instead of 4*w*h, although the resultant code
|
58
|
+
// would become more complicated.
|
59
|
+
n, sum := dx*dy, make([]uint64, 4*w*h)
|
60
|
+
for y := r.Min.Y; y < r.Max.Y; y++ {
|
61
|
+
for x := r.Min.X; x < r.Max.X; x++ {
|
62
|
+
// Get the source pixel.
|
63
|
+
r32, g32, b32, a32 := m.At(x, y).RGBA()
|
64
|
+
r64 := uint64(r32)
|
65
|
+
g64 := uint64(g32)
|
66
|
+
b64 := uint64(b32)
|
67
|
+
a64 := uint64(a32)
|
68
|
+
// Spread the source pixel over 1 or more destination rows.
|
69
|
+
py := uint64(y-r.Min.Y) * hh
|
70
|
+
for remy := hh; remy > 0; {
|
71
|
+
qy := dy - (py % dy)
|
72
|
+
if qy > remy {
|
73
|
+
qy = remy
|
74
|
+
}
|
75
|
+
// Spread the source pixel over 1 or more destination columns.
|
76
|
+
px := uint64(x-r.Min.X) * ww
|
77
|
+
index := 4 * ((py/dy)*ww + (px / dx))
|
78
|
+
for remx := ww; remx > 0; {
|
79
|
+
qx := dx - (px % dx)
|
80
|
+
if qx > remx {
|
81
|
+
qx = remx
|
82
|
+
}
|
83
|
+
sum[index+0] += r64 * qx * qy
|
84
|
+
sum[index+1] += g64 * qx * qy
|
85
|
+
sum[index+2] += b64 * qx * qy
|
86
|
+
sum[index+3] += a64 * qx * qy
|
87
|
+
index += 4
|
88
|
+
px += qx
|
89
|
+
remx -= qx
|
90
|
+
}
|
91
|
+
py += qy
|
92
|
+
remy -= qy
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
return average(sum, w, h, n*0x0101)
|
97
|
+
}
|
98
|
+
|
99
|
+
// average convert the sums to averages and returns the result.
|
100
|
+
func average(sum []uint64, w, h int, n uint64) image.Image {
|
101
|
+
ret := image.NewRGBA(w, h)
|
102
|
+
for y := 0; y < h; y++ {
|
103
|
+
for x := 0; x < w; x++ {
|
104
|
+
i := y*ret.Stride + x*4
|
105
|
+
j := 4 * (y*w + x)
|
106
|
+
ret.Pix[i+0] = uint8(sum[j+0] / n)
|
107
|
+
ret.Pix[i+1] = uint8(sum[j+1] / n)
|
108
|
+
ret.Pix[i+2] = uint8(sum[j+2] / n)
|
109
|
+
ret.Pix[i+3] = uint8(sum[j+3] / n)
|
110
|
+
}
|
111
|
+
}
|
112
|
+
return ret
|
113
|
+
}
|
114
|
+
|
115
|
+
// resizeYCbCr returns a scaled copy of the YCbCr image slice r of m.
|
116
|
+
// The returned image has width w and height h.
|
117
|
+
func resizeYCbCr(m *ycbcr.YCbCr, r image.Rectangle, w, h int) (image.Image, bool) {
|
118
|
+
var verticalRes int
|
119
|
+
switch m.SubsampleRatio {
|
120
|
+
case ycbcr.SubsampleRatio420:
|
121
|
+
verticalRes = 2
|
122
|
+
case ycbcr.SubsampleRatio422:
|
123
|
+
verticalRes = 1
|
124
|
+
default:
|
125
|
+
return nil, false
|
126
|
+
}
|
127
|
+
ww, hh := uint64(w), uint64(h)
|
128
|
+
dx, dy := uint64(r.Dx()), uint64(r.Dy())
|
129
|
+
// See comment in Resize.
|
130
|
+
n, sum := dx*dy, make([]uint64, 4*w*h)
|
131
|
+
for y := r.Min.Y; y < r.Max.Y; y++ {
|
132
|
+
Y := m.Y[y*m.YStride:]
|
133
|
+
Cb := m.Cb[y/verticalRes*m.CStride:]
|
134
|
+
Cr := m.Cr[y/verticalRes*m.CStride:]
|
135
|
+
for x := r.Min.X; x < r.Max.X; x++ {
|
136
|
+
// Get the source pixel.
|
137
|
+
r8, g8, b8 := ycbcr.YCbCrToRGB(Y[x], Cb[x/2], Cr[x/2])
|
138
|
+
r64 := uint64(r8)
|
139
|
+
g64 := uint64(g8)
|
140
|
+
b64 := uint64(b8)
|
141
|
+
// Spread the source pixel over 1 or more destination rows.
|
142
|
+
py := uint64(y-r.Min.Y) * hh
|
143
|
+
for remy := hh; remy > 0; {
|
144
|
+
qy := dy - (py % dy)
|
145
|
+
if qy > remy {
|
146
|
+
qy = remy
|
147
|
+
}
|
148
|
+
// Spread the source pixel over 1 or more destination columns.
|
149
|
+
px := uint64(x-r.Min.X) * ww
|
150
|
+
index := 4 * ((py/dy)*ww + (px / dx))
|
151
|
+
for remx := ww; remx > 0; {
|
152
|
+
qx := dx - (px % dx)
|
153
|
+
if qx > remx {
|
154
|
+
qx = remx
|
155
|
+
}
|
156
|
+
qxy := qx * qy
|
157
|
+
sum[index+0] += r64 * qxy
|
158
|
+
sum[index+1] += g64 * qxy
|
159
|
+
sum[index+2] += b64 * qxy
|
160
|
+
sum[index+3] += 0xFFFF * qxy
|
161
|
+
index += 4
|
162
|
+
px += qx
|
163
|
+
remx -= qx
|
164
|
+
}
|
165
|
+
py += qy
|
166
|
+
remy -= qy
|
167
|
+
}
|
168
|
+
}
|
169
|
+
}
|
170
|
+
return average(sum, w, h, n), true
|
171
|
+
}
|
172
|
+
|
173
|
+
// resizeRGBA returns a scaled copy of the RGBA image slice r of m.
|
174
|
+
// The returned image has width w and height h.
|
175
|
+
func resizeRGBA(m *image.RGBA, r image.Rectangle, w, h int) image.Image {
|
176
|
+
ww, hh := uint64(w), uint64(h)
|
177
|
+
dx, dy := uint64(r.Dx()), uint64(r.Dy())
|
178
|
+
// See comment in Resize.
|
179
|
+
n, sum := dx*dy, make([]uint64, 4*w*h)
|
180
|
+
for y := r.Min.Y; y < r.Max.Y; y++ {
|
181
|
+
pix := m.Pix[(y-m.Rect.Min.Y)*m.Stride:]
|
182
|
+
for x := r.Min.X; x < r.Max.X; x++ {
|
183
|
+
// Get the source pixel.
|
184
|
+
p := pix[(x-m.Rect.Min.X)*4:]
|
185
|
+
r64 := uint64(p[0])
|
186
|
+
g64 := uint64(p[1])
|
187
|
+
b64 := uint64(p[2])
|
188
|
+
a64 := uint64(p[3])
|
189
|
+
// Spread the source pixel over 1 or more destination rows.
|
190
|
+
py := uint64(y-r.Min.Y) * hh
|
191
|
+
for remy := hh; remy > 0; {
|
192
|
+
qy := dy - (py % dy)
|
193
|
+
if qy > remy {
|
194
|
+
qy = remy
|
195
|
+
}
|
196
|
+
// Spread the source pixel over 1 or more destination columns.
|
197
|
+
px := uint64(x-r.Min.X) * ww
|
198
|
+
index := 4 * ((py/dy)*ww + (px / dx))
|
199
|
+
for remx := ww; remx > 0; {
|
200
|
+
qx := dx - (px % dx)
|
201
|
+
if qx > remx {
|
202
|
+
qx = remx
|
203
|
+
}
|
204
|
+
qxy := qx * qy
|
205
|
+
sum[index+0] += r64 * qxy
|
206
|
+
sum[index+1] += g64 * qxy
|
207
|
+
sum[index+2] += b64 * qxy
|
208
|
+
sum[index+3] += a64 * qxy
|
209
|
+
index += 4
|
210
|
+
px += qx
|
211
|
+
remx -= qx
|
212
|
+
}
|
213
|
+
py += qy
|
214
|
+
remy -= qy
|
215
|
+
}
|
216
|
+
}
|
217
|
+
}
|
218
|
+
return average(sum, w, h, n)
|
219
|
+
}
|
220
|
+
|
221
|
+
// Resample returns a resampled copy of the image slice r of m.
|
222
|
+
// The returned image has width w and height h.
|
223
|
+
func Resample(m image.Image, r image.Rectangle, w, h int) image.Image {
|
224
|
+
if w < 0 || h < 0 {
|
225
|
+
return nil
|
226
|
+
}
|
227
|
+
if w == 0 || h == 0 || r.Dx() <= 0 || r.Dy() <= 0 {
|
228
|
+
return image.NewRGBA64(w, h)
|
229
|
+
}
|
230
|
+
curw, curh := r.Dx(), r.Dy()
|
231
|
+
img := image.NewRGBA(w, h)
|
232
|
+
for y := 0; y < h; y++ {
|
233
|
+
for x := 0; x < w; x++ {
|
234
|
+
// Get a source pixel.
|
235
|
+
subx := x * curw / w
|
236
|
+
suby := y * curh / h
|
237
|
+
r32, g32, b32, a32 := m.At(subx, suby).RGBA()
|
238
|
+
r := uint8(r32 >> 8)
|
239
|
+
g := uint8(g32 >> 8)
|
240
|
+
b := uint8(b32 >> 8)
|
241
|
+
a := uint8(a32 >> 8)
|
242
|
+
img.SetRGBA(x, y, image.RGBAColor{r, g, b, a})
|
243
|
+
}
|
244
|
+
}
|
245
|
+
return img
|
246
|
+
}
|