├── app
├── assets
│ ├── stylesheets
│ │ └── store
│ │ │ ├── base.css
│ │ │ ├── spree_core.css
│ │ │ ├── screen.scss.css
│ │ │ ├── rdr.css
│ │ │ ├── login.css
│ │ │ ├── editor.css
│ │ │ ├── social.css
│ │ │ ├── errors.css.erb
│ │ │ ├── taxonomy.css.erb
│ │ │ ├── reset.css
│ │ │ ├── products.css
│ │ │ ├── cart.css
│ │ │ ├── misc.css
│ │ │ ├── typography.css
│ │ │ ├── display.css.erb
│ │ │ ├── checkout.css
│ │ │ └── auth-buttons.css
│ ├── images
│ │ └── store
│ │ │ ├── bg.jpg
│ │ │ ├── kid.jpg
│ │ │ ├── logo.png
│ │ │ ├── auth-icons.png
│ │ │ ├── footer_bkgd.jpg
│ │ │ ├── narrow_bg.png
│ │ │ ├── shadow_top.png
│ │ │ ├── icons
│ │ │ ├── twitter.png
│ │ │ ├── facebook.png
│ │ │ ├── social-icons.png
│ │ │ ├── visa-curved-32px.png
│ │ │ ├── discover-curved-32px.png
│ │ │ ├── mastercard-curved-32px.png
│ │ │ ├── social-icons-rollover.png
│ │ │ └── american-express-curved-32px.png
│ │ │ ├── search_bg_s1.gif
│ │ │ ├── social-icons.png
│ │ │ ├── satellite-radios-bg.jpg
│ │ │ └── social-icons-rollover.png
│ └── javascripts
│ │ └── store
│ │ ├── rdr_wishlist.js
│ │ └── checkout.js
├── overrides
│ ├── spree
│ │ ├── shared
│ │ │ ├── remove_brs_from_login_form.rb
│ │ │ ├── remove_brs_from_user_form.rb
│ │ │ ├── tweak_button_login.rb
│ │ │ ├── replace_taxonomies.rb
│ │ │ ├── add_to_head.rb
│ │ │ ├── tweak_remember_me_login.rb
│ │ │ ├── redefine_recently_viewed_overrides.rb
│ │ │ └── replace_products.rb
│ │ ├── checkout
│ │ │ ├── remove_shipping.rb
│ │ │ ├── remove_confirm_buttons.rb
│ │ │ ├── remove_delivery_buttons.rb
│ │ │ ├── remove_payment_buttons.rb
│ │ │ ├── payment
│ │ │ │ ├── remove_cart_code.rb
│ │ │ │ ├── remove_card_expiration.rb
│ │ │ │ ├── remove_gateway_icons.rb
│ │ │ │ ├── replace_paypal_payment.rb
│ │ │ │ └── replace_gateway_fields.rb
│ │ │ ├── remove_summary_title.rb
│ │ │ ├── remvove_address_buttons.rb
│ │ │ ├── remove_checkout_registration_header.rb
│ │ │ ├── replace_payment.rb
│ │ │ ├── replace_shipping_method.rb
│ │ │ ├── replace_order_summary.rb
│ │ │ ├── replace_checkout.rb
│ │ │ ├── replace_checkout_registration.rb
│ │ │ ├── replace_confirm.rb
│ │ │ └── replace_billing.rb
│ │ ├── orders
│ │ │ ├── replace_empty-cart.rb
│ │ │ ├── remove_orders_show_header.rb
│ │ │ ├── replace_outside_cart_form.rb
│ │ │ ├── replace_cart_detail.rb
│ │ │ ├── replace_line_item.rb
│ │ │ └── replace_orders_show.rb
│ │ ├── users
│ │ │ ├── remove_account_summary.rb
│ │ │ ├── replace_account_header.rb
│ │ │ ├── redefine_add_wishlists_to_account_my_orders.rb
│ │ │ ├── replace_account_my_orders.rb
│ │ │ └── redefine_replace_account_summary_with_social_logins.rb
│ │ ├── taxons
│ │ │ ├── replace_taxon_children.rb
│ │ │ └── replace_taxon_sidebar_navigation.rb
│ │ ├── wishlists
│ │ │ ├── replace_new_wishlist_header.rb
│ │ │ └── replace_new_wishlist_form.rb
│ │ ├── products
│ │ │ ├── redefine_add_wish_to_cart_form.rb
│ │ │ ├── drop_icon_from_add_to_wishlist.rb
│ │ │ ├── add_taxonomies_to_product_show.rb
│ │ │ ├── redefine_email_to_friend.rb
│ │ │ ├── add_related_products_to_cart_form.rb
│ │ │ ├── replace_cart_form.rb
│ │ │ └── replace_product_show.rb
│ │ ├── user_registrations
│ │ │ ├── replace_user_registration_new.rb
│ │ │ └── redefine_add_socials_to_login_extras.rb
│ │ ├── user_sessions
│ │ │ └── replace_user_sessions_new.rb
│ │ └── layouts
│ │ │ └── replace_body.rb
│ └── shared
│ │ └── replace_rescently_viewed_products_block_title.rb
└── views
│ └── spree
│ ├── shared
│ ├── _product_banner.html.erb
│ ├── _social_users.html.erb
│ └── _all_products.html.erb
│ └── wishlists
│ └── show.html.erb
├── vendor
└── assets
│ ├── images
│ └── fancybox
│ │ ├── blank.gif
│ │ ├── fancybox-x.png
│ │ ├── fancybox-y.png
│ │ ├── fancybox.png
│ │ ├── fancy_close.png
│ │ ├── fancy_loading.png
│ │ ├── fancy_nav_left.png
│ │ ├── fancy_nav_right.png
│ │ ├── fancy_shadow_e.png
│ │ ├── fancy_shadow_n.png
│ │ ├── fancy_shadow_ne.png
│ │ ├── fancy_shadow_nw.png
│ │ ├── fancy_shadow_s.png
│ │ ├── fancy_shadow_se.png
│ │ ├── fancy_shadow_sw.png
│ │ ├── fancy_shadow_w.png
│ │ ├── fancy_title_left.png
│ │ ├── fancy_title_main.png
│ │ ├── fancy_title_over.png
│ │ └── fancy_title_right.png
│ ├── stylesheets
│ ├── jq-autocomplete.css
│ └── jquery.fancybox-1.3.4.css
│ └── javascripts
│ ├── jquery.mousewheel-3.0.4.pack.js
│ ├── jquery.easing-1.3.pack.js
│ ├── jquery.fancybox-1.3.4.pack.js
│ └── jquery.fancybox-1.3.4.js
├── lib
├── spree_rdr_theme.rb
└── generators
│ └── spree_rdr_theme
│ └── install
│ └── install_generator.rb
├── spree_rdr_theme.gemspec
├── LICENSE
└── README.md
/app/assets/stylesheets/store/base.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/spree_core.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/screen.scss.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/assets/images/store/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/bg.jpg
--------------------------------------------------------------------------------
/app/assets/images/store/kid.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/kid.jpg
--------------------------------------------------------------------------------
/app/assets/images/store/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/logo.png
--------------------------------------------------------------------------------
/app/assets/images/store/auth-icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/auth-icons.png
--------------------------------------------------------------------------------
/app/assets/images/store/footer_bkgd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/footer_bkgd.jpg
--------------------------------------------------------------------------------
/app/assets/images/store/narrow_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/narrow_bg.png
--------------------------------------------------------------------------------
/app/assets/images/store/shadow_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/shadow_top.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/blank.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/blank.gif
--------------------------------------------------------------------------------
/app/assets/images/store/icons/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/icons/twitter.png
--------------------------------------------------------------------------------
/app/assets/images/store/search_bg_s1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/search_bg_s1.gif
--------------------------------------------------------------------------------
/app/assets/images/store/social-icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/social-icons.png
--------------------------------------------------------------------------------
/app/assets/images/store/icons/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/icons/facebook.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancybox-x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancybox-x.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancybox-y.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancybox-y.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancybox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancybox.png
--------------------------------------------------------------------------------
/app/assets/images/store/icons/social-icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/icons/social-icons.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_close.png
--------------------------------------------------------------------------------
/app/assets/images/store/satellite-radios-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/satellite-radios-bg.jpg
--------------------------------------------------------------------------------
/app/assets/images/store/social-icons-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/social-icons-rollover.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_loading.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_nav_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_nav_left.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_nav_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_nav_right.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_shadow_e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_shadow_e.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_shadow_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_shadow_n.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_shadow_ne.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_shadow_ne.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_shadow_nw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_shadow_nw.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_shadow_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_shadow_s.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_shadow_se.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_shadow_se.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_shadow_sw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_shadow_sw.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_shadow_w.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_shadow_w.png
--------------------------------------------------------------------------------
/app/assets/images/store/icons/visa-curved-32px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/icons/visa-curved-32px.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_title_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_title_left.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_title_main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_title_main.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_title_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_title_over.png
--------------------------------------------------------------------------------
/vendor/assets/images/fancybox/fancy_title_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/vendor/assets/images/fancybox/fancy_title_right.png
--------------------------------------------------------------------------------
/app/assets/images/store/icons/discover-curved-32px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/icons/discover-curved-32px.png
--------------------------------------------------------------------------------
/app/assets/images/store/icons/mastercard-curved-32px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/icons/mastercard-curved-32px.png
--------------------------------------------------------------------------------
/app/assets/images/store/icons/social-icons-rollover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/icons/social-icons-rollover.png
--------------------------------------------------------------------------------
/app/assets/images/store/icons/american-express-curved-32px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spree-contrib/spree_rdr_theme/HEAD/app/assets/images/store/icons/american-express-curved-32px.png
--------------------------------------------------------------------------------
/app/overrides/spree/shared/remove_brs_from_login_form.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/shared/_login},
2 | :name => %q{remove_brs_from_login_form},
3 | :remove => %q{br})
4 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/remove_shipping.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/_address},
2 | :name => %q{remove_shipping},
3 | :remove => %q{#shipping[data-hook]})
4 |
--------------------------------------------------------------------------------
/app/overrides/spree/shared/remove_brs_from_user_form.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/shared/_user_form},
2 | :name => %q{remove_brs_from_user_form},
3 | :remove => %q{br})
4 |
5 |
--------------------------------------------------------------------------------
/app/overrides/spree/orders/replace_empty-cart.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/orders/edit},
2 | :name => %q{replace_empty-cart},
3 | :remove => %q{#empty-cart[data-hook]})
4 |
--------------------------------------------------------------------------------
/app/overrides/spree/users/remove_account_summary.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/users/show},
2 | :name => %q{remove_account_summary},
3 | :remove => %q{[data-hook='account_summary']})
4 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/remove_confirm_buttons.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/_confirm},
2 | :name => %q{remove_confirm_buttons},
3 | :remove => %q{[data-hook='buttons']})
4 |
--------------------------------------------------------------------------------
/app/overrides/spree/taxons/replace_taxon_children.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/taxons/show},
2 | :name => %q{replace_taxon_children},
3 | :remove => %q{[data-hook='taxon_children']})
4 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/remove_delivery_buttons.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/_delivery},
2 | :name => %q{remove_delivery_buttons},
3 | :remove => %q{[data-hook='buttons']})
4 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/remove_payment_buttons.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/_payment},
2 | :name => %q{remove_payment_buttons},
3 | :remove => %q{[data-hook='buttons']})
4 |
--------------------------------------------------------------------------------
/app/views/spree/shared/_product_banner.html.erb:
--------------------------------------------------------------------------------
1 | <%= content_for :banner do %>
2 |
3 |
Products
4 | <%= image_tag "store/satellite-radios-bg.jpg", :alt => "Satellite-radios-bg" %>
5 |
6 | <% end %>
7 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/payment/remove_cart_code.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/payment/_gateway},
2 | :name => %q{remove_cart_code},
3 | :remove => %q{[data-hook='cart_code']})
4 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/payment/remove_card_expiration.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/payment/_gateway},
2 | :name => %q{remove_card_expiration},
3 | :remove => %q{[data-hook='card_expiration']})
4 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/remove_summary_title.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/_summary},
2 | :name => %q{remove_summary_title},
3 | :remove => %q{h3},
4 | :sequence => {:before => 'replace_order_summary'})
5 |
--------------------------------------------------------------------------------
/app/overrides/spree/orders/remove_orders_show_header.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/orders/show},
2 | :name => %q{remove_orders_show_header},
3 | :remove => %q{h1},
4 | :sequence => {:before => 'replace_orders_show' })
5 |
6 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/remvove_address_buttons.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/_address},
2 | :name => %q{remove_address_buttons},
3 | :remove => %q{[data-hook='buttons']},
4 | :closing_selector => %q{})
5 |
--------------------------------------------------------------------------------
/app/overrides/spree/wishlists/replace_new_wishlist_header.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => 'spree/wishlists/new',
2 | :name => 'replace_new_wishlist_header',
3 | :replace => 'h1',
4 | :text => %q{<% @body_id = 'cart' %>
5 | New Wish List
})
6 |
--------------------------------------------------------------------------------
/app/overrides/spree/shared/tweak_button_login.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/shared/_login},
2 | :name => %q{tweak_button_login},
3 | :replace => %q{p code:contains('submit_tag')},
4 | :text => %q{})
5 |
6 |
--------------------------------------------------------------------------------
/app/overrides/shared/replace_rescently_viewed_products_block_title.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => 'shared/_recently_viewed_products',
2 | :name => 'replace_rescently_viewed_products_block_title',
3 | :replace => "h3",
4 | :text => %q{<%= t(:recently_viewed) %>
})
5 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/remove_checkout_registration_header.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/registration},
2 | :name => %q{remove_checkout_registration_header},
3 | :remove => %q{h2},
4 | :sequence => {:before => 'replace_checkout_registration' })
5 |
--------------------------------------------------------------------------------
/app/overrides/spree/shared/replace_taxonomies.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/shared/_taxonomies},
2 | :name => %q{replace_taxonomies},
3 | :replace => %q{#taxonomies[data-hook]},
4 | :text => %q{<%= render 'spree/shared/all_products' %>})
5 |
6 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/payment/remove_gateway_icons.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/payment/_gateway},
2 | :name => %q{remove_gateway_icons},
3 | :remove => %q{code[erb-loud]:contains('image_tag')},
4 | :sequence => {:before => 'replace_gateway_fields' })
5 |
6 |
--------------------------------------------------------------------------------
/app/overrides/spree/products/redefine_add_wish_to_cart_form.rb:
--------------------------------------------------------------------------------
1 | if Rails.application.railties.all.map(&:railtie_name).include? "spree_wishlist"
2 |
3 | Deface::Override.new(:virtual_path => 'spree/products/show',
4 | :name => 'add_wish_to_cart_form',
5 | :sequence => {:after => 'replace_product_show'})
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/app/overrides/spree/users/replace_account_header.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/users/show},
2 | :name => %q{replace_account_header},
3 | :replace => %q{h3:contains('accurate_title')},
4 | :text => %q{<%= t("my_account") %><%= link_to "(edit)", edit_account_path, :id => "edit_account_link" %>
})
5 |
--------------------------------------------------------------------------------
/app/overrides/spree/products/drop_icon_from_add_to_wishlist.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => 'spree/products/show',
2 | :name => 'drop_icon_from_add_to_wishlist',
3 | :replace => "code[erb-loud]:contains('icons/add-to-cart')",
4 | :text => %q{<%= t('add_to_wishlist') %>},
5 | :sequence => {:after => 'add_wish_to_cart_form'})
6 |
--------------------------------------------------------------------------------
/app/overrides/spree/shared/add_to_head.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/shared/_head},
2 | :name => %q{add_to_head},
3 | :insert_after => %q{code[erb-loud]:contains('stylesheet_link_tag')},
4 | :text => %q{})
5 |
--------------------------------------------------------------------------------
/app/overrides/spree/shared/tweak_remember_me_login.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/shared/_login},
2 | :name => %q{tweak_remember_me_login},
3 | :replace => %q{p label},
4 | :text => %q{<%= f.check_box :remember_me %>
5 | <%= f.label :remember_me, t('remember_me'), :class => 'tick' %>
6 | <%= link_to t("forgot_password"), new_user_password_path, {:style => "float:right;"} %>})
7 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/rdr.css:
--------------------------------------------------------------------------------
1 | /*
2 | *= require store/reset
3 | *= require store/typography
4 | *= require store/misc
5 | *= require store/display
6 | *= require store/taxonomy
7 | *= require store/products
8 | *= require store/cart
9 | *= require store/checkout
10 | *= require store/login
11 | *= require store/social
12 | *= require store/errors
13 | *= require store/auth-buttons
14 | *= require jq-autocomplete
15 | *= require jq-mobile-1.0a2
16 | */
17 |
--------------------------------------------------------------------------------
/lib/spree_rdr_theme.rb:
--------------------------------------------------------------------------------
1 | module SpreeRdrTheme
2 | class Engine < Rails::Engine
3 | railtie_name "spree_rdr_theme"
4 |
5 | config.autoload_paths += %W(#{config.root}/lib)
6 |
7 | def self.activate
8 | Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/*.rb")) do |c|
9 | Rails.application.config.cache_classes ? require(c) : load(c)
10 | end
11 | end
12 |
13 | config.to_prepare &method(:activate).to_proc
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/app/overrides/spree/products/add_taxonomies_to_product_show.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/products/show},
2 | :name => %q{add_taxonomies_to_product_show},
3 | :insert_after => %q{[data-hook='product_show']},
4 | :sequence => {:after => 'add_recently_viewed_products_to_products_show'},
5 | :text => %q{<%= content_for :sidebar do %>
6 | <%= render 'spree/shared/all_products' %>
7 | <% end %>})
8 |
--------------------------------------------------------------------------------
/app/overrides/spree/taxons/replace_taxon_sidebar_navigation.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/taxons/show},
2 | :name => %q{replace_taxon_sidebar_navigation},
3 | :replace => %q{[data-hook='taxon_sidebar_navigation']},
4 | :closing_selector => %q{},
5 | :text => %q{
6 | <%= render :partial => "spree/shared/taxonomies" %>
7 | })
8 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/payment/replace_paypal_payment.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => 'spree/checkout/payment/_paypalexpress',
2 | :name => 'replace_paypal_payment',
3 | :replace => 'a',
4 | :text => %q{;">
5 | Your PayPal Information
6 | You will be redirected to PayPal's website when you click continue below.
7 | })
8 |
9 |
--------------------------------------------------------------------------------
/spree_rdr_theme.gemspec:
--------------------------------------------------------------------------------
1 | Gem::Specification.new do |s|
2 | s.platform = Gem::Platform::RUBY
3 | s.name = 'spree_rdr_theme'
4 | s.version = '0.1.0'
5 | s.summary = 'A Spree Commerce Theme'
6 |
7 | s.author = 'Brian D. Quinn'
8 | s.email = 'brian@railsdog.com'
9 |
10 | s.files = `git ls-files`.split("\n")
11 | s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
12 | s.require_path = 'lib'
13 | s.requirements << 'none'
14 |
15 | s.has_rdoc = false
16 | end
17 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/login.css:
--------------------------------------------------------------------------------
1 | body#login #social_login {
2 | float: left;
3 | width: 46%;
4 | padding: 0px 2%;
5 | }
6 |
7 | body#login #local_login {
8 | float: left;
9 | width: 46%;
10 | padding: 0px 2%;
11 | }
12 |
13 | #social_login p.social_link{
14 | margin: 20px 25%;
15 | }
16 |
17 | body#login form {
18 | width: 70%;
19 | }
20 |
21 | body#login #local_login input[type='text'] {
22 | width: 100%
23 | }
24 |
25 | body#login #local_login input[type='password'] {
26 | width: 100%
27 | }
28 |
29 | body#login #local_login .button {
30 | margin: 0 33%;
31 | }
32 |
--------------------------------------------------------------------------------
/app/overrides/spree/users/redefine_add_wishlists_to_account_my_orders.rb:
--------------------------------------------------------------------------------
1 | if Rails.application.railties.all.map(&:railtie_name).include? "spree_wishlist"
2 |
3 | Deface::Override.new(:virtual_path => "spree/users/show",
4 | :name => "add_wishlists_to_account_my_orders",
5 | :text => %q{
6 | My Wishlists:
7 | <% if current_spree_user.wishlists.present? %>
8 | <%= raw current_spree_user.wishlists.map { |wl| link_to(wl.name, wl) }.join(", ") %>,
9 | <% end %>
10 | <%= link_to "Create New Wish List", new_wishlist_url %>
11 |
})
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/lib/generators/spree_rdr_theme/install/install_generator.rb:
--------------------------------------------------------------------------------
1 | module SpreeRdrTheme
2 | module Generators
3 | class InstallGenerator < Rails::Generators::Base
4 |
5 | def add_javascripts
6 | append_file "app/assets/javascripts/store/all.js", "//= require jquery.fancybox-1.3.4\n"
7 | append_file "app/assets/javascripts/store/all.js", "//= require store/rdr_wishlist\n"
8 | end
9 |
10 | def add_stylesheets
11 | inject_into_file "app/assets/stylesheets/store/all.css", " *= require store/rdr\n", :before => /\*\//, :verbose => true
12 | end
13 |
14 | end
15 | end
16 | end
17 |
18 |
--------------------------------------------------------------------------------
/app/overrides/spree/user_registrations/replace_user_registration_new.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/user_registrations/new},
2 | :name => %q{replace_user_registration_new},
3 | :replace => %q{#new-customer},
4 | :text => %q{
5 |
New Customers
6 |
You can register for a new account below:
7 | <%= form_for :user, :url => spree.user_registration_path(@user) do |f| %>
8 | <%= render :partial => 'spree/shared/user_form', :locals => { :f => f } %>
9 |
<%= f.submit t(:create), :class => 'button primary' %>
10 | <% end %>
11 |
})
12 |
--------------------------------------------------------------------------------
/app/overrides/spree/wishlists/replace_new_wishlist_form.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => 'spree/wishlists/new',
2 | :name => 'replace_new_wishlist_form',
3 | :replace_contents => "code[erb-loud]:contains('form_for')",
4 | :closing_selector => "code[erb-silent]:contains('end')",
5 | :text => %q{<%= f.label :name, t(:name), :class => "inline" %>: <%= f.text_field :name %>
6 | <%= f.check_box :is_private %> <%= f.label :is_private, "Keep this list private, for my eyes only!", :class => "inline" %>
7 |
8 |
9 |
})
10 |
--------------------------------------------------------------------------------
/app/views/spree/shared/_social_users.html.erb:
--------------------------------------------------------------------------------
1 | <% if !current_spree_user || !current_spree_user.user_authentications %>
2 |
3 |
Sign In Using
4 |
If you have an existing account with any of the following sites you can login here by clicking on the icon below.
5 | <% Spree::AuthenticationMethod.where(:environment => ::Rails.env).each do |user| %>
6 |
7 | <%= link_to "Sign in with #{user.provider.capitalize}", "/users/auth/#{user.provider}",
8 | :title => "Sign in with #{user.provider}",
9 | :class => "btn-auth btn-#{user.provider.downcase}" if user.active %>
10 |
11 | <% end %>
12 |
13 | <% end %>
14 |
--------------------------------------------------------------------------------
/app/overrides/spree/user_registrations/redefine_add_socials_to_login_extras.rb:
--------------------------------------------------------------------------------
1 | if Rails.application.railties.all.map(&:railtie_name).include? "spree_social"
2 |
3 | Deface::Override.new(:virtual_path => "spree/user_registrations/new",
4 | :name => "add_socials_to_login_extras",
5 | :disabled => true)
6 |
7 | Deface::Override.new(:virtual_path => "spree/user_sessions/new",
8 | :name => "add_socials_to_login_extras",
9 | :disabled => true)
10 |
11 | Deface::Override.new(:virtual_path => "spree/users/show",
12 | :name => "add_socials_to_account_summary",
13 | :disabled => true)
14 | end
15 |
--------------------------------------------------------------------------------
/app/overrides/spree/shared/redefine_recently_viewed_overrides.rb:
--------------------------------------------------------------------------------
1 | if Rails.application.railties.all.map(&:railtie_name).include? "spree_recently_viewed"
2 |
3 | Deface::Override.new(:virtual_path => 'spree/shared/_products',
4 | :name => 'add_recently_viewed_products_to_products_index',
5 | :disabled => true)
6 |
7 | Deface::Override.new(:virtual_path => 'spree/products/show',
8 | :name => 'add_recently_viewed_products_to_products_show',
9 | :disabled => true)
10 |
11 | Deface::Override.new(:virtual_path => 'spree/shared/_recently_viewed_products',
12 | :name => 'change_title',
13 | :replace => 'h3',
14 | :text => 'Recently Viewed
')
15 |
16 | end
17 |
--------------------------------------------------------------------------------
/app/overrides/spree/products/redefine_email_to_friend.rb:
--------------------------------------------------------------------------------
1 | if Rails.application.railties.all.map(&:railtie_name).include? "spree_email_to_friend"
2 |
3 | Deface::Override.new(:virtual_path => "spree/products/show",
4 | :name => "converted_product_description_351026984",
5 | :disabled => true)
6 |
7 | Deface::Override.new(:virtual_path => "spree/products/show",
8 | :name => "add_email_to_friend_under_add_to_cart_button",
9 | :insert_before => '[data-hook="product_description"]',
10 | :text => "<%= link_to t('email_to_friend.send_to_friend'), email_to_friend_url('product', @product), :class => 'button' %>
",
11 | :squence => {:after => 'converted_product_description_351026984'})
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/app/views/spree/shared/_all_products.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if @taxon.present? && @taxon.children.present? %>
3 |
More Products
4 |
5 | <% @taxon.children.each_with_index do |taxon,i| %>
6 | - <%= raw link_to(taxon.name, seo_url(taxon)) %>
7 | <% end %>
8 |
9 | <% else %>
10 |
All Products
11 |
12 | <% Spree::Taxonomy.where(:name => "Categories").first.root.children.each_with_index do |taxon,i| %>
13 | - <%= raw link_to(taxon.name, seo_url(taxon)) %>
14 | <% end %>
15 |
16 | <% end %>
17 |
18 | <% if Rails.application.railties.all.map(&:railtie_name).include? "spree_recently_viewed" %>
19 |
20 | <%= render "spree/shared/recently_viewed_products" %>
21 |
22 | <% end %>
23 |
--------------------------------------------------------------------------------
/app/overrides/spree/products/add_related_products_to_cart_form.rb:
--------------------------------------------------------------------------------
1 | if Rails.application.railties.all.map(&:railtie_name).include? "spree_related_products"
2 |
3 | Deface::Override.new(:virtual_path => %q{spree/products/show},
4 | :name => %q{add_related_products_to_cart_form},
5 | :replace => %q{[data-hook='cart_form'] hr},
6 | :sequence => {:after => "replace_cart_form" },
7 | :text => %q{<% if @product.cross_sells.present? %>
8 |
18 | <% end %>})
19 |
20 | end
21 |
--------------------------------------------------------------------------------
/app/overrides/spree/orders/replace_outside_cart_form.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/orders/edit},
2 | :name => %q{replace_outside_cart_form},
3 | :replace => %q{[data-hook='outside_cart_form']},
4 | :closing_selector => %q{},
5 | :text => %q{<%= form_for(@order, :url => update_cart_path, :html=>{:id=>'update-cart'}) do |order_form| %>
6 |
7 | You have <%= pluralize @order.line_items.length, 'item' %> in your cart
8 |
9 |
10 | <%= render :partial => 'form', :locals => {:order_form => order_form} %>
11 |
12 |
13 |
14 | <%=link_to t("continue_shopping"), products_path, :class => 'continue' %>
15 | or
16 | <%= link_to t("checkout"), checkout_path, :class => 'button checkout' %>
17 |
18 |
19 | <% end %>},
20 | :disabled => false,
21 | :sequence => 100)
22 |
--------------------------------------------------------------------------------
/app/assets/javascripts/store/rdr_wishlist.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | if($('a#edit_wishlist_link').is('*')){
4 | //handle wishlist edit link (show / hide form)
5 | $('a#edit_wishlist_link').click(function(){
6 | if($('#edit_wishlist').is(':visible')){
7 | $('#edit_wishlist').slideUp();
8 | }else{
9 | $('#edit_wishlist').slideDown();
10 | }
11 |
12 | return false;
13 | });
14 |
15 | //handle move item link
16 | $('.move_item a.button').click(function(){
17 | var move_button = $(this);
18 | move_button.hide();
19 | move_button.parent().find('form').fadeIn();
20 | return false;
21 | });
22 | }
23 |
24 | // Remove an item from the cart by setting its quantity to zero and posting the update form
25 | $('form#updatecart a.delete').show().click(function(){
26 | $(this).parents('tr').find('input.line_item_quantity').val(0);
27 | $(this).parents('form').submit();
28 | return false;
29 | });
30 |
31 | });
32 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/jq-autocomplete.css:
--------------------------------------------------------------------------------
1 | .ac_results {
2 | padding: 0px;
3 | border: 1px solid black;
4 | background-color: white;
5 | overflow: hidden;
6 | z-index: 99999;
7 | }
8 |
9 | .ac_results ul {
10 | width: 100%;
11 | list-style-position: outside;
12 | list-style: none;
13 | padding: 0;
14 | margin: 0;
15 | }
16 |
17 | .ac_results li {
18 | margin: 0px;
19 | padding: 2px 5px;
20 | cursor: default;
21 | display: block;
22 | /*
23 | if width will be 100% horizontal scrollbar will apear
24 | when scroll mode will be used
25 | */
26 | /*width: 100%;*/
27 | font: menu;
28 | font-size: 12px;
29 | /*
30 | it is very important, if line-height not setted or setted
31 | in relative units scroll will be broken in firefox
32 | */
33 | line-height: 16px;
34 | overflow: hidden;
35 | }
36 |
37 | .ac_loading {
38 | background: white url('indicator.gif') right center no-repeat;
39 | }
40 |
41 | .ac_odd {
42 | background-color: #eee;
43 | }
44 |
45 | .ac_over {
46 | background-color: #0A246A;
47 | color: white;
48 | }
49 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/replace_payment.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/_payment},
2 | :name => %q{replace_payment},
3 | :replace => %q{#payment[data-hook]},
4 | :text => %q{
5 |
6 | Your prefered payment option
7 | <% @order.available_payment_methods.each do |method| %>
8 | -
9 | <%= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, method == @order.payment_method %>
10 |
11 |
12 | <% end %>
13 |
14 |
15 | <% @order.available_payment_methods.each_with_index do |method, i| %>
16 | <%= render "spree/checkout/payment/#{method.method_type}", :payment_method => method, :checked => (@order.try(:payment).try(:payment_method_id) || method.id if i == 0) %>
17 | <% end %>
18 |
19 |
20 |
21 |
})
22 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/editor.css:
--------------------------------------------------------------------------------
1 | .yui-editor-container A {color: black !important;}
2 | .editor-mask-container.active .editor-mask {
3 | background-color: black;
4 | filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); /* IE 5.5+*/
5 | -moz-opacity: 0.3; /* Mozilla 1.6 */
6 | -webkit-opacity: 0.3; /* Mozilla 1.6 */
7 | -khtml-opacity: 0.3; /* Konqueror 3.1, Safari 1.1 */
8 | opacity: 0.3;
9 | width: 100%;
10 | height: 100%;
11 | width: 100%;
12 | z-index: 100;
13 | position: fixed;
14 | top: 0;
15 | left: 0;
16 | }
17 | .editor-mask-container .editor-mask-label {display: none;}
18 | .editor-mask-container.active .editor-mask-label {
19 | background-color: black;
20 | color: white;
21 | font-weight: bold;
22 | height: 25px;
23 | left: 50%;
24 | margin-left: -130px;
25 | padding: 30px 50px;
26 | position: fixed;
27 | top: 250px;
28 | width: 200px;
29 | z-index: 101;
30 | display: block !important;
31 | }
32 | .yui-toolbar-imageUpload {
33 | background: url("/images/upload_image.png") no-repeat scroll 50% 50% transparent !important;
34 | }
35 | .yui-toolbar-fileUpload {
36 | background: url("/images/upload_file.png") no-repeat scroll 50% 50% transparent !important;
37 | }
38 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/replace_shipping_method.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/_delivery},
2 | :name => %q{replace_shipping_method},
3 | :replace => %q{#shipping_method[data-hook]},
4 | :text => %q{
5 |
Choose A Shipping Method
6 |
7 |
8 |
9 |
10 | <% @order.rate_hash.each do |shipping_method| %>
11 |
15 | <% end %>
16 |
17 |
18 | <% if Spree::Config[:shipping_instructions] && @order.rate_hash.present? %>
19 |
20 | <%= form.label :special_instructions, t("shipping_instructions") %>
21 | <%= form.text_area :special_instructions, :cols => 40, :rows => 7 %>
22 |
23 | <% end %>
24 |
25 |
26 |
27 |
})
28 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/social.css:
--------------------------------------------------------------------------------
1 | .authentications {
2 | margin-bottom: 30px;
3 | }
4 |
5 | .authentication {
6 | float: left;
7 | background-color: #EEE;
8 | border: solid 1px #999;
9 | padding: 5px 10px;
10 | -moz-border-radius: 8px;
11 | -webkit-border-radius: 8px;
12 | position: relative;
13 | margin-right: 10px;
14 | }
15 |
16 | .authentication .remove {
17 | text-decoration: none;
18 | position: absolute;
19 | top: 3px;
20 | right: 3px;
21 | color: #333;
22 | padding: 2px 4px;
23 | font-size: 10px;
24 | }
25 |
26 | .authentication .remove:hover {
27 | color: #FFF;
28 | background-color: #777;
29 | -moz-border-radius: 7px;
30 | -webkit-border-radius: 7px;
31 | }
32 |
33 | .authentication img {
34 | float: left;
35 | }
36 |
37 | .authentication .provider, .authentication .uid {
38 | margin-left: 38px;
39 | margin-right: 20px;
40 | }
41 |
42 | .authentication .provider {
43 | font-weight: bold;
44 | }
45 |
46 | .authentication .uid {
47 | color: #666;
48 | font-size: 11px;
49 | }
50 |
51 | .auth_provider img {
52 | display: block;
53 | }
54 |
55 | .auth_provider {
56 | float: left;
57 | text-decoration: none;
58 | margin-right: 20px;
59 | text-align: center;
60 | margin-bottom: 10px;
61 | }
62 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/jquery.mousewheel-3.0.4.pack.js:
--------------------------------------------------------------------------------
1 | /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
2 | * Licensed under the MIT License (LICENSE.txt).
3 | *
4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
6 | * Thanks to: Seamus Leahy for adding deltaX and deltaY
7 | *
8 | * Version: 3.0.4
9 | *
10 | * Requires: 1.2.2+
11 | */
12 |
13 | (function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
14 | f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
--------------------------------------------------------------------------------
/app/overrides/spree/orders/replace_cart_detail.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/orders/_form},
2 | :name => %q{replace_cart_detail},
3 | :replace => %q{#cart-detail[data-hook]},
4 | :text => %q{
5 |
6 |
7 | | <%= t("item") %> |
8 | <%= t("price") %> |
9 | |
10 | <%= t("qty") %> |
11 | |
12 | <%= t("total") %> |
13 | |
14 |
15 |
16 |
17 | <%= order_form.fields_for :line_items do |item_form| %>
18 | <%= render 'line_item', :variant => item_form.object.variant, :line_item => item_form.object, :item_form => item_form %>
19 | <% end %>
20 |
21 | | |
22 |
23 |
24 | |
25 | |
26 |
27 |
28 | | |
29 |
30 | <%= t(:subtotal) %>: <%= @order.display_total.to_html %>
31 | |
32 |
33 |
34 |
})
35 |
--------------------------------------------------------------------------------
/app/overrides/spree/user_sessions/replace_user_sessions_new.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/user_sessions/new},
2 | :name => %q{replace_user_sessions_new},
3 | :replace => %q{#existing-customer},
4 | :text => %q{
5 | <% if Rails.application.railties.all.map(&:railtie_name).include? "spree_social" %>
6 | <%= render 'spree/shared/social_users' %>
7 | <% end %>
8 |
9 |
10 |
11 |
Existing Customers
12 |
If you've already registered for an account you can sign in here:
13 | <%= render :partial => 'spree/shared/login' %>
14 |
15 |
16 |
17 |
18 |
19 |
New Customers
20 |
You can register for a new account here on RailsDog Radio below:
21 | <%= form_for :user, :url => spree.user_registration_path(@user) do |f| %>
22 |
23 | <% if session[:omniauth] %>
24 |
25 | <%= f.label :email, t("email") %>
26 | <%= f.text_field :email, :class => 'title' %>
27 |
28 | <% else %>
29 | <%= render 'spree/shared/user_form', :f => f %>
30 | <% end %>
31 |
32 |
33 |
34 | <% end %>
35 |
36 |
37 |
38 |
39 | })
40 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/replace_order_summary.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/_summary},
2 | :name => %q{replace_order_summary'},
3 | :replace => %q{[data-hook='order_summary']},
4 | :text => %q{
5 |
6 |
7 |
<%= t(:order_summary) %>
8 |
9 |
10 | <% for line_item in @order.line_items %>
11 | <% variant = line_item.variant %>
12 |
13 | | (<%= line_item.quantity %>) |
14 | <%= variant.product.name %> |
15 | <%= number_to_currency(line_item.price) %> |
16 |
17 | <% end %>
18 |
19 |
20 |
21 |
22 | | Subtotal |
23 | <%= number_to_currency @order.item_total %> |
24 |
25 | <% @order.adjustments.each do |adjustment| %>
26 |
27 | | <%= adjustment.label %> |
28 | <%= number_to_currency adjustment.amount -%> |
29 |
30 | <% end %>
31 |
32 | | Total |
33 | <%= number_to_currency @order.total %> |
34 |
35 |
36 |
37 |
38 |
})
39 |
--------------------------------------------------------------------------------
/app/overrides/spree/shared/replace_products.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/shared/_products},
2 | :name => %q{replace_products},
3 | :replace => %q{#products[data-hook]},
4 | :closing_selector => %q{},
5 | :text => %q{<% @body_id = 'product-list' %>
6 |
7 | <%= render 'spree/shared/product_banner' %>
8 |
9 |
10 | <% products.each do |product| %>
11 | <% if Spree::Config[:show_zero_stock_products] || product.has_stock? %>
12 |
13 |
<%= link_to product.name, product_path(product) %>
14 |
15 | <%= link_to product_image(product), product %>
16 |
17 |
18 |
<%= product.has_stock? ? "IN STOCK" : "OUT OF STOCK" %>
19 |
20 | <%= number_to_currency(product.price * 1.2) %>
21 | <%= number_to_currency(product.price) %>
22 |
<%= link_to 'View More', product_path(product), :class => 'button' %>
23 |
24 |
25 | <%= truncate strip_tags(product.description), :length => 300 %>
26 |
27 |
28 | <% end %>
29 | <% end %>
30 |
})
31 |
--------------------------------------------------------------------------------
/app/overrides/spree/orders/replace_line_item.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/orders/_line_item},
2 | :name => %q{replace_line_item},
3 | :replace => %q{tr},
4 | :text => %q{
5 | |
6 | <% if variant.images.length == 0 %>
7 | <%= small_image(variant.product) %>
8 | <% else %>
9 | <%= image_tag variant.images.first.attachment.url(:small) %>
10 | <% end %>
11 | |
12 |
13 | <%= link_to variant.product.name, product_path(variant.product) %>
14 | <%= variant_options variant %>
15 | |
16 |
17 | <%= number_to_currency(line_item.price) %>
18 | |
19 |
20 | X
21 | |
22 |
23 | <%= item_form.text_field :quantity, :size => 3, :class => "line_item_quantity" %>
24 | |
25 |
26 | =
27 | |
28 |
29 | <%= number_to_currency(line_item.price * line_item.quantity) unless line_item.quantity.nil? %>
30 | |
31 |
32 | <%= link_to("Remove", '#', :class => 'delete button') %>
33 | |
34 |
})
35 |
--------------------------------------------------------------------------------
/app/overrides/spree/users/replace_account_my_orders.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/users/show},
2 | :name => %q{replace_account_my_orders},
3 | :replace => %q{[data-hook='account_my_orders']},
4 | :sequence => {:after => 'remove_account_summary' },
5 | :text => %q{
6 |
<%= t("my_orders") %>
7 | <% if @orders.present? %>
8 |
9 |
10 |
11 | | <%= t("order_number") %> |
12 | <%= t("order_date") %> |
13 | <%= t("status") %> |
14 | <%= t("shipment_state") %> |
15 | <%= t("total") %> |
16 |
17 |
18 |
19 | <% @orders.each do |order| %>
20 |
21 | | <%= link_to order.number, order_url(order) %> |
22 | <%=order.created_at.to_date%> |
23 | <%= t(order.state).titleize %> |
24 | <%= order.shipment_state.capitalize %> |
25 | <%= number_to_currency order.total %> |
26 |
27 | <% end %>
28 |
29 |
30 | <% else %>
31 |
<%= t(:you_have_no_orders_yet) %>
32 | <% end %>
33 |
34 |
35 |
36 | })
37 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2007-2012, Spree Commerce, Inc. and other contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification,
5 | are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice,
8 | this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above copyright notice,
10 | this list of conditions and the following disclaimer in the documentation
11 | and/or other materials provided with the distribution.
12 | * Neither the name Spree nor the names of its contributors may be used to
13 | endorse or promote products derived from this software without specific
14 | prior written permission.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/errors.css.erb:
--------------------------------------------------------------------------------
1 | .flash {
2 | -moz-border-radius: 5px;
3 | -webkit-border-radius: 5px;
4 | border-radius: 5px;
5 | font-size: 1.3em;
6 | margin-bottom: 1em;
7 | padding: 0.8em;
8 | }
9 | .flash.notice {
10 | background: #ccddff url(<%= asset_path('store/shadow_top.png') %>) 0px -50px repeat-x;
11 | color: #556699;
12 | border: 1px solid #99aacc;
13 | margin-top: 1em;
14 | }
15 | .flash.errors {
16 | background: #f4b4b4 url(<%= asset_path('store/shadow_top.png') %>) 0px -50px repeat-x;
17 | color: #000000;
18 | border: 1px solid #000000;
19 | margin-top: 1em;
20 | }
21 | .formError {
22 | font-size: 1.3em;
23 | margin-bottom: 1em;
24 | padding: 0.8em;
25 | -moz-border-radius: 5px;
26 | -webkit-border-radius: 5px;
27 | border-radius: 5px;
28 | background: #f4b4b4 url(<%= asset_path('store/shadow_top.png') %>) 0px -50px repeat-x;
29 | color: #000000;
30 | border: 1px solid #000000;
31 | }
32 | .formError p { margin: 0px; }
33 | .formError ul { margin-bottom: 0px; }
34 | .formError h2 {
35 | font-weight: bold;
36 | font-size: 1em;
37 | margin: 0px;
38 | }
39 | #errorExplanation {
40 | font-size: 1.3em;
41 | margin: 1em 0;
42 | padding: 0.8em;
43 | -moz-border-radius: 5px;
44 | -webkit-border-radius: 5px;
45 | border-radius: 5px;
46 | background: #f4b4b4 url(<%= asset_path('store/shadow_top.png') %>) 0px -50px repeat-x;
47 | color: #000000;
48 | border: 1px solid #000000;
49 | }
50 | #errorExplanation p { margin: 0px; }
51 | #errorExplanation ul { margin-bottom: 0px; }
52 | #errorExplanation h2 {
53 | font-size: 1em;
54 | margin: 0px;
55 | }
56 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | SUMMARY
2 | -------
3 |
4 | Rails Dog Radio Theme is a standalone theme for Spree Commerce version 0.70.0 or later.
5 |
6 | This theme is now being used as the base theme for Spree demo store:
7 |
8 | * [View Demo - http://demo.spreecommerce.com](http://demo.spreecommerce.com)
9 | * [View Demo Repo - https://github.com/spree/demo](https://github.com/spree/demo)
10 |
11 |
12 | This theme also currently supports (and will restyle the following
13 | extensions if installed):
14 |
15 | * [spree_social - https://github.com/spree/spree_social](https://github.com/spree/spree_social)
16 | * [spree_wishlist - https://github.com/spree/spree_wishlist](https://github.com/spree/spree_wishlist)
17 | * [spree_recently_viewed - https://github.com/spree/spree_recently_viewed](https://github.com/spree/spree_recently_viewed)
18 | * [spree_related_products - https://github.com/spree/spree_related_products](https://github.com/spree/spree_related_products)
19 | * [spree_paypal_express - https://github.com/spree/spree_paypal_express](https://github.com/spree/spree_paypal_express)
20 |
21 |
22 | INSTALLATION
23 | ------------
24 |
25 | Add the following line to your Gemfile:
26 |
27 | gem 'spree_rdr_theme', :git => 'git://github.com/spree/spree_rdr_theme.git'
28 |
29 | NOTE: It's important that you add this line at the bottom of the Gemfile, or at least AFTER any other extension/engine/gem that you'd like to theme (i.e. Spree)
30 |
31 | Run bunlder:
32 |
33 | $ bundle install
34 |
35 | Install assets:
36 |
37 | $ rails g spree_rdr_theme:install
38 |
39 | Optional: Clear out precompiled assets (required for install in sandbox):
40 |
41 | $ rake assets:clean
42 |
43 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/taxonomy.css.erb:
--------------------------------------------------------------------------------
1 | body#product-list, body#product-details {
2 | background-image: url(<%= asset_path 'store/bg.jpg' %>);
3 | }
4 |
5 | body#product-details #banner, body#product-list #banner {
6 | height: 143px;
7 | background-repeat: no-repeat;
8 | margin-bottom: 30px;
9 | }
10 |
11 | body#product-details #banner, body#product-list #banner {
12 | position: relative;
13 | }
14 | body#product-details #banner h1, body#product-list #banner h1 {
15 | position: absolute;
16 | color: #fff;
17 | font-family: Trebuchet MS;
18 | font-size: 4em;
19 | line-height: 140px;
20 | text-shadow: rgba(0,0,0,1) 1px 1px 2px;
21 | }
22 |
23 | body#product-list #banner img {
24 | position: absolute;
25 | top: 0; left: 0;
26 | z-index: 1;
27 | }
28 |
29 | body#product-list #main, body#product-details #main, body#content #main {
30 | width: 600px;
31 | float: left;
32 | margin-right: 70px;
33 | }
34 |
35 | #sidebar {
36 | width: 290px;
37 | float: left;
38 | }
39 |
40 | body#product-list .product {
41 | border-top: 1px solid #a3a3a3;
42 | border-bottom: 1px solid #a3a3a3;
43 | margin-top: -1px;
44 | }
45 |
46 | body#product-list .product h2 {
47 | font-size: 1.5em;
48 | margin: 10px 0 0;
49 | }
50 |
51 | body#product-list .product .image {
52 | width: 280px;
53 | float: left;
54 | margin-bottom: 10px;
55 | }
56 |
57 | body#product-list .product .details {
58 | float: left;
59 | width: 320px;
60 | }
61 |
62 | body#product-list .product .details p {
63 | margin: 14px 0;
64 | }
65 |
66 | body#product-list .product .description {
67 | clear: left;
68 | }
69 |
70 | body#product-list #main .list {
71 | margin-bottom: 20px;
72 | }
73 |
--------------------------------------------------------------------------------
/app/overrides/spree/products/replace_cart_form.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/products/show},
2 | :name => %q{replace_cart_form},
3 | :replace => %q{[data-hook='cart_form']},
4 | :closing_selector => %q{},
5 | :text => %q{},
41 | :disabled => true)
42 |
43 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/replace_checkout.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/edit},
2 | :name => %q{replace_checkout},
3 | :replace => %q{#checkout[data-hook]},
4 | :closing_selector => %q{},
5 | :text => %q{
6 |
CHECKOUT
7 |
8 |
9 | <%= render "spree/shared/error_messages", :target => @order %>
10 |
11 |
12 | - 1Create an Account
13 | - >2Your Address
14 | - >3Shipping Options
15 | - >4Payment Options
16 | - >5Place Order
17 |
18 |
19 | <%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state}" } do |form| %>
20 | <%= render @order.state, :form => form %>
21 | <% end %>
22 |
23 |
24 | <%= render 'summary' %>
25 |
})
26 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/payment/replace_gateway_fields.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/payment/_gateway},
2 | :name => %q{replace_gateway_fields},
3 | :replace => %q{[data-hook='card_number']},
4 | :text => %q{;">
5 | Your Credit Card Information
6 | <% ['mastercard', 'visa', 'american-express', 'discover'].each do |card| %>
7 | <%= image_tag "store/icons/#{card}-curved-32px.png", :alt => card.capitalize %>
8 | <% end %>
9 |
10 |
11 | ;">
12 |
13 | <% options_hash = Rails.env.production? ? {:autocomplete => "off"} : {} %>
14 | <%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(:class => 'required', :size => 19, :maxlength => 19) %>
15 |
16 |
17 | ;">
18 |
19 | <%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(:class => 'required', :size => 5) %>
20 |
21 |
22 | ;">
23 |
24 | <%= select_month(Date.today, {:prefix => param_prefix, :field_name => 'month', :use_month_numbers => true}, :class => 'required half') %>
25 | <%= select_year(Date.today, {:prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15}, :class => 'required half last') %>
26 | })
27 |
--------------------------------------------------------------------------------
/app/overrides/spree/users/redefine_replace_account_summary_with_social_logins.rb:
--------------------------------------------------------------------------------
1 | if Rails.application.railties.all.map(&:railtie_name).include? "spree_social"
2 |
3 | Deface::Override.new(:virtual_path => "spree/users/show",
4 | :name => "replace_account_summary_with_social_logins",
5 | :replace => "[data-hook='account_summary']",
6 | :sequence => {:after => 'replace_account_my_orders'},
7 | :text => %q{<% if @user.user_authentications.present? %>
8 | My Logins
9 |
10 |
11 |
12 | | Provider |
13 | Nickname |
14 | Linked |
15 | |
16 |
17 |
18 |
19 | <% @user.user_authentications.each do |auth| %>
20 |
21 | |
22 | <%= image_tag "/assets/store/#{auth.provider}_32.png", :size => "32x32" %>
23 | <%= auth.provider.capitalize %>
24 | |
25 | <%= auth.nickname %> |
26 | <%= auth.created_at.to_date%> |
27 | <%= link_to( "Unlink", auth, :confirm => 'Are you sure you want to remove unlink this account', :method => :delete, :class => "remove") %> |
28 |
29 | <% end %>
30 |
31 |
32 |
33 |
34 | <% end %>
35 |
36 |
37 | Link Accounts
38 | You can link your RailsDog Radio account with an account you already have on any of the following sites:
39 | <% Spree::AuthenticationMethod.where(:environment => ::Rails.env).each do |user| %>
40 | <%= link_to(image_tag("/assets/store/#{user.provider}_32.png", :size => "32x32", :alt => "#{user.provider}"), "/users/auth/#{user.provider}", :title => "Sign in with #{user.provider}") if user.active %>
41 | <% end %>
42 | })
43 |
44 | end
45 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/reset.css:
--------------------------------------------------------------------------------
1 | /*
2 | HTML5 ✰ Boilerplate
3 |
4 | style.css contains a reset, font normalization and some base styles.
5 |
6 | credit is left where credit is due.
7 | much inspiration was taken from these projects:
8 | yui.yahooapis.com/2.8.1/build/base/base.css
9 | camendesign.com/design/
10 | praegnanz.de/weblog/htmlcssjs-kickstart
11 | */
12 |
13 | /*
14 | html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
15 | v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark
16 | html5doctor.com/html-5-reset-stylesheet/
17 | */
18 |
19 | html, body, div, span, object, iframe,
20 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
21 | abbr, address, cite, code,
22 | del, dfn, em, img, ins, kbd, q, samp,
23 | small, strong, sub, sup, var,
24 | b, i,
25 | dl, dt, dd, ol, ul, li,
26 | fieldset, form, label, legend,
27 | table, caption, tbody, tfoot, thead, tr, th, td,
28 | article, aside, canvas, details, figcaption, figure,
29 | footer, header, hgroup, menu, nav, section, summary,
30 | time, mark, audio, video {
31 | margin:0;
32 | padding:0;
33 | border:0;
34 | outline:0;
35 | font-size:100%;
36 | vertical-align:baseline;
37 | background:transparent;
38 | }
39 |
40 | article, aside, details, figcaption, figure,
41 | footer, header, hgroup, menu, nav, section {
42 | display:block;
43 | }
44 |
45 | nav ul { list-style:none; }
46 |
47 | blockquote, q { quotes:none; }
48 |
49 | blockquote:before, blockquote:after,
50 | q:before, q:after { content:''; content:none; }
51 |
52 | a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
53 |
54 | ins { background-color:#ff9; color:#000; text-decoration:none; }
55 |
56 | mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
57 |
58 | del { text-decoration: line-through; }
59 |
60 | abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
61 |
62 | /* tables still need cellspacing="0" in the markup */
63 | table { border-collapse:collapse; border-spacing:0; }
64 |
65 | hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
66 |
67 | input, select { vertical-align:middle; }
68 |
69 | /* END RESET CSS */
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/replace_checkout_registration.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/registration},
2 | :name => %q{replace_checkout_registration},
3 | :replace => %q{#registration},
4 | :text => %q{
5 |
CHECKOUT
6 |
7 |
8 | <%= render "spree/shared/error_messages", :target => @order %>
9 |
10 |
11 | - 1Create an Account
12 | - 2Your Address
13 | - 3Shipping Options
14 | - 4Payment Options
15 | - 5Place Order
16 |
17 |
18 |
19 |
20 |
Existing Customers
21 |
If you've already registered for an account on you can sign in here:
22 | <%= render :partial => 'spree/shared/login' %>
23 |
24 |
25 |
26 |
27 | <%= render :template => 'spree/user_registrations/new' %>
28 |
29 |
30 | <% if Spree::Config[:allow_guest_checkout] %>
31 |
32 | <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
33 |
<%= t(:guest_user_account) %>
34 | <%= form_for @order, :url => update_checkout_registration_path, :method => :put, :html => { :id => 'checkout_form_registration' } do |f| %>
35 |
36 | <%= f.label :email, t(:email) %>
37 | <%= f.email_field :email, :class => 'title' %>
38 |
39 |
<%= f.submit t(:continue), :class => 'button primary' %>
40 | <% end %>
41 |
42 | <% end %>
43 |
44 |
45 |
46 | <%= render 'summary' %>
47 |
})
48 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/products.css:
--------------------------------------------------------------------------------
1 | body#product-list h1, body#product-details h1 {
2 | margin: 0px;
3 | }
4 | body#product-details #product-images {
5 | width: 380px;
6 | margin-bottom: 20px;
7 | }
8 |
9 | body#product-details #cart-form {
10 | width: 220px;
11 | }
12 |
13 | body#product-details #product-images, body#product-details #cart-form {
14 | float: left;
15 | }
16 |
17 | body#product-details #product-description {
18 | clear: left;
19 | border-top: 1px solid #A3A3A3;
20 | padding-top: 10px;
21 | }
22 |
23 | #product-images #main-image {
24 | width: 350px;
25 | text-align: center;
26 | min-height: 240px;
27 | }
28 |
29 | #product-images #thumbnails ul {
30 | list-style: none;
31 | background-color: #ff0;
32 | }
33 |
34 | #product-images #thumbnails li {
35 | background-color: #0ff;
36 | }
37 |
38 | #product-images #thumbnails li a {
39 | display: block;
40 | width: 45px;
41 | float: left;
42 | border: 2px solid #CCC;
43 | margin: 2px;
44 | text-align: center;
45 | border-image: initial;
46 | }
47 |
48 | #product-images #thumbnails li a img {
49 | width: 45px;
50 | }
51 |
52 | #product-images #thumbnails li a:hover {
53 | border: 2px solid #31519A;
54 | }
55 |
56 | #cart-form {
57 | margin-bottom: 20px;
58 | }
59 |
60 | #cart-form form {
61 | width: 220px;
62 | }
63 |
64 | #cart-form dl {
65 | font-size: 1.2em;
66 | width: 100%;
67 | margin: 0;
68 | padding: 5px 0 5px 0;
69 | }
70 |
71 | #cart-form dt, #cart-form dd {
72 | float: left;
73 | line-height: 1.5em;
74 | }
75 |
76 | #cart-form dt {
77 | clear: left;
78 | color: #666;
79 | width: 140px;
80 | }
81 |
82 | #cart-form dd {
83 | width: 80px;
84 | text-align: right;
85 | font-size: 1.1em;
86 | }
87 |
88 | #cart-form dd .price {
89 | font-size: 1em;
90 | }
91 |
92 | hr {
93 | clear: left;
94 | visibility: hidden;
95 | }
96 |
97 | #cart-form dl.part-numbers {
98 | font-size: 0.8em;
99 | }
100 |
101 | dl.prices {
102 | border-top: 1px solid #A7A7A7;
103 | border-bottom: 1px solid #A7A7A7;
104 | }
105 |
106 | dl.part-numbers dd {
107 | font-weight: bold;
108 | }
109 |
110 | #cart-form .extras input {
111 | float: left;
112 | height: 30px;
113 | }
114 |
115 | #cart-form .extras label {
116 | margin-left: 20px;
117 | display: block;
118 | }
119 |
120 | #product-variants ul{
121 | margin: 0;
122 | list-style: none;
123 | }
124 | #product-variants ul li {
125 | margin-bottom: 10px;
126 | }
127 | #product-variants ul li span.price {
128 | font-size: 12px;
129 | color: red;
130 | }
131 | #product-variants ul li label {
132 | display: inline;
133 | }
--------------------------------------------------------------------------------
/app/overrides/spree/checkout/replace_confirm.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/checkout/_confirm},
2 | :name => %q{replace_confirm},
3 | :replace => %q{#order_details[data-hook]},
4 | :text => %q{
5 |
6 |
Items In Your Order
7 |
8 | <% @order.line_items.each do |line_item| %>
9 | -
10 | <%= line_item.quantity %> <%= line_item.variant.product.name %> for
11 | <%= number_to_currency (line_item.price * line_item.quantity)-%>
12 |
13 | <% end %>
14 |
15 | <%= link_to "edit", cart_path %>
16 |
17 |
18 |
19 |
Order Contact Details
20 | Email
21 | <%= @order.email %>
22 |
23 |
24 | <% ["ship", "bill"].each do |addr_type| %>
25 | <% address = @order.send("#{addr_type}_address") %>
26 |
27 |
<%= addr_type.capitalize %> Address
28 |
29 | <%= address.full_name %>
30 | <%= address.address1 %>
31 | <% unless address.address2.blank? %>
32 | <%= address.address2 %>
33 | <% end %>
34 | <%= address.city %>
35 | <% if address.state_id.blank? %>
36 |
<%= address.state_name %>
37 | <% else %>
38 | <%= address.state.abbr %>
39 | <% end %>
40 | <%= address.country.try(:name) %> <%= address.zipcode %>
41 |
42 | <%= link_to "edit", checkout_state_path('payment') %>
43 |
44 | <% end %>
45 |
46 |
47 |
Payment Details
48 |
<%= @order.payment.payment_method.name %>
49 |
50 | <% if @order.payment.payment_method.class.to_s == "BillingIntegration::PaypalExpress" %>
51 |
You will be redirected to PayPal to complete your order.
52 | <% else %>
53 | <%= @order.payment.source.name %>
54 | <%= @order.payment.source.display_number %>
55 | <% end %>
56 |
57 | <%= link_to "edit", checkout_state_path('payment') %>
58 |
59 |
60 |
61 |
62 |
63 | <% if @order.payment.payment_method.class.to_s == "BillingIntegration::PaypalExpress" %>
64 |
65 | <% else %>
66 |
67 | <% end %>
68 |
69 |
70 | })
71 |
--------------------------------------------------------------------------------
/app/overrides/spree/orders/replace_orders_show.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/orders/show},
2 | :name => %q{replace_orders_show},
3 | :replace => %q{#order[data-hook]},
4 | :text => %q{<% @body_id = 'cart' %>
5 |
6 |
7 |
Order details
8 |
9 |
10 |
11 |
12 | | <%= t("item") %> |
13 | <%= t("price") %> |
14 | |
15 | <%= t("qty") %> |
16 | |
17 | <%= t("total") %> |
18 |
19 |
20 |
21 | <% @order.line_items.each do |line_item| %>
22 | <%- variant = line_item.variant -%>
23 |
24 | |
25 | <% if variant.images.length == 0 %>
26 | <%= small_image(variant.product) %>
27 | <% else %>
28 | <%= image_tag variant.images.first.attachment.url(:small) %>
29 | <% end %>
30 | |
31 |
32 | <%= link_to variant.product.name, product_path(variant.product) %>
33 | <%= variant_options variant %>
34 | |
35 |
36 | <%= number_to_currency line_item.price %>
37 | |
38 |
39 | X
40 | |
41 |
42 | <%= line_item.quantity %>
43 | |
44 |
45 | =
46 | |
47 |
48 | <%= number_to_currency (line_item.price * line_item.quantity) unless line_item.quantity.nil? %>
49 | |
50 |
51 | <% end %>
52 |
53 | | Item Subtotal |
54 |
55 | <%= number_to_currency @order.item_total %>
56 | |
57 |
58 | <% @order.adjustments.each do |adjustment| %>
59 |
60 | |
61 | <%= adjustment.label %>
62 | |
63 |
64 | <%= number_to_currency adjustment.amount %>
65 | |
66 |
67 | <% end %>
68 |
69 | | Total |
70 |
71 | <%= number_to_currency @order.total %>
72 | |
73 |
74 |
75 |
76 |
77 |
78 | <%=link_to t('back_to_store'), root_path, :class => 'continue' %>
79 | or
80 | <%= link_to t("my_account"), account_path, :class => 'button' %>
81 |
82 |
83 |
})
84 |
--------------------------------------------------------------------------------
/app/assets/javascripts/store/checkout.js:
--------------------------------------------------------------------------------
1 | (function($){
2 | $(document).ready(function(){
3 | if($('#checkout_form_payment').is('*')){
4 |
5 | $('#checkout_form_payment').validate();
6 |
7 | var get_states = function(region){
8 | country = $('p#' + region + 'country' + ' span#' + region + 'country :only-child').val();
9 | return state_mapper[country];
10 | }
11 |
12 | var update_state = function(region) {
13 | states = get_states(region);
14 |
15 | state_select = $('p#' + region + 'state select');
16 | state_input = $('p#' + region + 'state input');
17 |
18 | if(states) {
19 | selected = state_select.val();
20 | state_select.html('');
21 | states_with_blank = [["",""]].concat(states);
22 | $.each(states_with_blank, function(pos,id_nm) {
23 | var opt = $(document.createElement('option'))
24 | .attr('value', id_nm[0])
25 | .html(id_nm[1]);
26 | if(selected==id_nm[0]){
27 | opt.prop("selected", true);
28 | }
29 | state_select.append(opt);
30 | });
31 | state_select.prop("disabled", false).show();
32 | state_input.hide().prop("disabled", true);
33 |
34 | } else {
35 | state_input.prop("disabled", false).show();
36 | state_select.hide().prop("disabled", true);
37 | }
38 |
39 | };
40 |
41 | $('p#bcountry select').change(function() { update_state('b'); });
42 | $('p#scountry select').change(function() { update_state('s'); });
43 | update_state('b');
44 | update_state('s');
45 |
46 | $('input#order_use_billing').click(function() {
47 | if($(this).is(':checked')) {
48 | $('#shipping .inner').hide();
49 | $('#shipping .inner input, #shipping .inner select').prop("disabled", true);
50 | } else {
51 | $('#shipping .inner').show();
52 | $('#shipping .inner input, #shipping .inner select').prop("disabled", false);
53 | //only want to enable relevant field
54 | if(get_states('s')){
55 | $('span#sstate input').hide().prop("disabled", true);
56 | }else{
57 | $('span#sstate select').hide().prop("disabled", true);
58 | }
59 |
60 | }
61 | }).triggerHandler('click');
62 | }
63 |
64 | if($('#checkout_form_payment').is('*')){
65 | // Show fields for the selected payment method
66 | $("input[type='radio'][name='order[payments_attributes][][payment_method_id]']").click(function(){
67 | $('#payment-methods li').hide();
68 | if(this.checked){ $('#payment_method_'+this.value).show(); }
69 | }).triggerHandler('click');
70 | }
71 | });
72 | })(jQuery);
73 |
74 | function disableSaveOnClick() {
75 | $('form.edit_spree_order').submit(function() {
76 | $(this).find(':submit, :image').attr('disabled', true).removeClass('primary').addClass('disabled');
77 | });
78 | }
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/cart.css:
--------------------------------------------------------------------------------
1 | body#cart h1 {
2 | border-bottom: 1px solid #D9D9D9;
3 | }
4 |
5 | table#cart-detail {
6 | width: 100%;
7 | }
8 |
9 | table#cart-detail th {
10 | color: #777;
11 | font-weight: normal;
12 | text-align: left;
13 | padding-bottom: 5px;
14 | }
15 |
16 | table#cart-detail th, table#cart-detail td {
17 | border-bottom: 1px solid #D9D9D9;
18 | }
19 |
20 | table#cart-detail td {
21 | padding: 10px 0;
22 | font-weight: bold;
23 | font-size: 1.2em;
24 | vertical-align: middle;
25 | }
26 |
27 | table#cart-detail tr.totals td, table#cart-detail tr.actions td {
28 | padding: 20px 0;
29 | }
30 |
31 | table#cart-detail tr.totals td, table#cart-detail td.actions {
32 | text-align: right;
33 | }
34 |
35 | table#cart-detail td.image {
36 | width: 180px;
37 | }
38 | table#cart-detail td.normal {
39 | font-weight: normal;
40 | vertical-align: middle;
41 | }
42 | table#cart-detail td.normal img {
43 | vertical-align: sub;
44 |
45 | }
46 |
47 |
48 | table#cart-detail td.image img {
49 | vertical-align: middle;
50 | }
51 |
52 | table#cart-detail td.description {
53 | width: 250px;
54 | padding-right: 50px;
55 | }
56 |
57 | table#cart-detail td.quantity {
58 | width: 75px;
59 | padding: 0;
60 | }
61 |
62 | table#cart-detail td.quantity input {
63 | margin: 0!important;
64 | width: 75px;
65 | border: 1px solid #949494;
66 | padding: 4px;
67 | }
68 |
69 | table#cart-detail td.unit-price, table#cart-detail td.total {
70 | width: 60px;
71 | }
72 |
73 | table#cart-detail td.actions {
74 | width: 130px;
75 | }
76 |
77 | table#cart-detail td.operator {
78 | color: #999;
79 | font-weight: normal;
80 | text-align: center;
81 | padding-left: 20px;
82 | padding-right: 20px;
83 | }
84 |
85 | table#cart-detail a.delete {
86 | background-color: #333;
87 | }
88 |
89 | table#cart-detail .actions {
90 | margin: 20px 0px;
91 | }
92 |
93 | table#cart-detail .actions div {
94 | float: left;
95 | margin: 10px;
96 | }
97 |
98 | table#cart-detail .move_item form{
99 | display:none;
100 | margin: 2px 8px;
101 | }
102 |
103 | body#cart a.checkout {
104 | background-color: #E41E1E;
105 | }
106 |
107 | body#cart p.actions {
108 | text-align: right;
109 | font-size: 1.20em;
110 | }
111 |
112 | body#cart p.actions, body#cart p.actions a {
113 | color: #999;
114 | margin-bottom: 40px;
115 | }
116 |
117 | #edit_wishlist {
118 | padding: 0px 140px 10px;
119 | display: none;
120 | border-bottom: 1px solid #D9D9D9;
121 | margin-bottom: 20px;
122 | }
123 | #edit_wishlist label{
124 | color: #777777;
125 | }
126 | #edit_wishlist input[type='text'] {
127 | border: 2px solid #A0A0A0;
128 | border-radius:2px;
129 | margin-bottom: 4px;
130 | }
131 | #edit_wishlist input[type="checkbox"] {
132 | vertical-align: baseline;
133 | }
134 | #edit_wishlist div {
135 | float: left;
136 | }
137 | #edit_wishlist a.button{
138 | float: left;
139 | line-height: 15px;
140 | margin: 25px 110px;
141 | }
142 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/misc.css:
--------------------------------------------------------------------------------
1 | header a, #banner nav ul li a {
2 | text-transform: uppercase;
3 | text-decoration: none;
4 | }
5 |
6 | /* for image replacement */
7 | .ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
8 |
9 | /* Hide for both screenreaders and browsers
10 | css-discuss.incutio.com/wiki/Screenreader_Visibility */
11 | .hidden { display: none; visibility: hidden; }
12 |
13 | /* Hide only visually, but have it available for screenreaders
14 | www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden
15 | Updated to ensure no other style overrides the styles defined in this rule */
16 | .visuallyHidden {
17 | border: 0 !important;
18 | clip: rect(0 0 0 0);
19 | height: 1px !important;
20 | margin: -1px !important;
21 | overflow: hidden !important;
22 | padding: 0 !important;
23 | position: absolute !important;
24 | width: 1px !important;
25 | }
26 |
27 | /* Hide visually and from screenreaders, but maintain layout */
28 | .invisible { visibility: hidden; }
29 |
30 | /* >> The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix */
31 | .clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; visibility: hidden; }
32 | .clearfix:after { clear: both; }
33 | /* fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */
34 | .clearfix { zoom: 1; }
35 | /* Textual Styles */
36 | span.bold {font-weight: bold;}
37 |
38 | .inline { display: inline }
39 |
40 |
41 |
42 | /*
43 | * media queries for responsive design
44 | * these follow after primary styles so they will successfully override.
45 | */
46 |
47 | @media all and (orientation:portrait) {
48 | /* style adjustments for portrait mode goes here */
49 |
50 | }
51 |
52 | @media all and (orientation:landscape) {
53 | /* style adjustments for landscape mode goes here */
54 |
55 | }
56 |
57 | /* Grade-A Mobile Browsers (Opera Mobile, Mobile Safari, Android Chrome)
58 | consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/ */
59 | @media screen and (max-device-width: 480px) {
60 |
61 |
62 | /* uncomment if you don't want iOS and WinMobile to mobile-optimize the text for you
63 | j.mp/textsizeadjust
64 | html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
65 | }
66 |
67 | /*
68 | * print styles
69 | * inlined to avoid required HTTP connection www.phpied.com/delay-loading-your-print-css/
70 | */
71 | @media print {
72 | * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
73 | -ms-filter: none !important; } /* black prints faster: sanbeiji.com/archives/953 */
74 | a, a:visited { color: #444 !important; text-decoration: underline; }
75 | a[href]:after { content: " (" attr(href) ")"; }
76 | abbr[title]:after { content: " (" attr(title) ")"; }
77 | .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* don't show links for images, or javascript/internal links */
78 | pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
79 | thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
80 | tr, img { page-break-inside: avoid; }
81 | @page { margin: 0.5cm; }
82 | p, h2, h3 { orphans: 3; widows: 3; }
83 | h2, h3{ page-break-after: avoid; }
84 | }
85 |
86 |
--------------------------------------------------------------------------------
/app/views/spree/wishlists/show.html.erb:
--------------------------------------------------------------------------------
1 | <% @body_id = 'cart' %>
2 |
3 | Wish List - <%= @wishlist.name %><%= link_to "(edit)", "#", :id => "edit_wishlist_link" %>
4 |
5 |
6 | <% if @wishlist.user == current_spree_user %>
7 | <%= form_for @wishlist do |f| %>
8 |
9 |
<%= f.label :name, t(:name), :class => "inline" %>: <%= f.text_field :name %>
10 |
<%= f.check_box :is_private %> <%= f.label :is_private, "Keep this list private, for my eyes only!", :class => "inline" %>
11 |
<%= f.check_box :is_default %> <%= f.label :is_default, "Automatically add new wished items to this list.", :class => "inline" %>
12 |
13 | <%= link_to "Update", '#', :onclick => "$(this).parent().submit(); return false;", :class => 'button' %>
14 | <% end %>
15 |
16 | <% end %>
17 |
18 |
19 | You have <%= pluralize @wishlist.wished_products.size, 'item' %> in your wish list.
20 |
21 | <% if @wishlist.wished_products.size > 0 %>
22 |
23 |
24 |
25 | | Item |
26 | Price |
27 |
28 |
29 | <% @wishlist.wished_products.each do |wish|
30 | variant = wish.variant
31 | product = variant.product %>
32 |
33 |
34 | |
35 | <% if variant.images.length == 0 %>
36 | <%= small_image(variant.product) %>
37 | <% else %>
38 | <%= image_tag variant.images.first.attachment.url(:small) %>
39 | <% end %>
40 | |
41 |
42 | <%= link_to variant.product.name, product_path(variant.product) %>
43 | <%= variant_options variant %>
44 |
45 |
46 | <%= form_for :order, :url => populate_orders_url do |f| %>
47 | <%= hidden_field_tag "variants[#{variant.id}]", 1, :size => 3 %>
48 | <%= link_to t(:add_to_cart), '#', :onclick => "$(this).parent().submit(); return false;", :class => 'button' %>
49 | <% end %>
50 |
51 |
52 | <%= link_to "Remove", wish, :method => :delete, :class => 'delete button' %>
53 |
54 |
55 | <% if current_spree_user.wishlists.count > 1 %>
56 |
57 | <%= link_to "Move", '#', :class => 'button' %>
58 |
59 | <%= form_for wish do |f| %>
60 |
61 | <%= f.select :wishlist_id, current_spree_user.wishlists.map{|wl| [wl.name, wl.id] unless wl.id == @wishlist.id}.compact %>
62 | <%= f.submit "Confirm" %>
63 | <% end %>
64 |
65 | <% end %>
66 |
67 |
68 | |
69 |
70 | <%= number_to_currency product.price %>
71 | |
72 |
73 | <% end -%>
74 |
75 | <% end -%>
76 |
77 |
78 | <% if @wishlist.user == current_spree_user %>
79 | <%= link_to "Create New List", new_wishlist_path, :class => 'button' %>
80 | <%= link_to "Delete This List", @wishlist, :method => :delete, :confirm => 'Are you sure, that you want to delete this wishlist?', :class => 'button checkout' %>
81 | <% end -%>
82 |
83 |
84 | <% if @wishlists.present? %>
85 | My Wishlists: <%= raw @wishlists.map { |wl| link_to(wl.name, wl) }.join(", ") %>
86 | <% end %>
87 |
--------------------------------------------------------------------------------
/app/overrides/spree/products/replace_product_show.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/products/show},
2 | :name => %q{replace_product_show},
3 | :replace => %q{[data-hook='product_show']},
4 | :closing_selector => %q{},
5 | :text => %q{
6 | <% @body_id = 'product-details' %>
7 |
8 | <%= content_for :banner do %>
9 |
Products
10 | <%= image_tag "store/satellite-radios-bg.jpg", :alt => "Satellite Radios" %>
11 | <% end %>
12 |
13 |
<%= @product.name %>
14 |
15 |
16 | <%= render 'image' %>
17 |
18 |
19 | <%= render 'thumbnails', :product => @product %>
20 |
21 |
22 |
23 |
24 |
80 |
81 |
82 | <%= product_description(@product) rescue t("product_has_no_description") %>
83 |
84 |
},
85 | :disabled => false,
86 | :sequence => 100)
87 |
88 |
--------------------------------------------------------------------------------
/app/overrides/spree/layouts/replace_body.rb:
--------------------------------------------------------------------------------
1 | Deface::Override.new(:virtual_path => %q{spree/layouts/spree_application},
2 | :name => %q{replace_body},
3 | :replace => %q{[data-hook='body']},
4 | :closing_selector => %q{},
5 | :text => %q{
6 |
7 |
8 | <%= link_to image_tag("store/logo.png", :width => "300", :height => "58", :alt => "Rails Dog Radio", :id => "logo"), root_url %>
9 |
11 | <%= form_tag products_url, :method => :get do %>
12 |
13 | <% end %>
14 |
24 |
25 |
26 | <% if content_for?(:banner) %>
27 |
28 | <%= yield :banner %>
29 |
30 | <% end %>
31 |
32 |
33 | <% if flash.notice %>
34 |
<%= flash.notice %>
35 | <% end %>
36 | <% if flash[:error] %>
37 |
<%= flash[:error] %>
38 | <% end %>
39 |
40 | <%= yield %>
41 |
42 |
43 | <% if content_for?(:sidebar) %>
44 |
47 | <% end %>
48 |
49 |
50 |
51 |
95 | })
96 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/typography.css:
--------------------------------------------------------------------------------
1 | /* fonts.css from the YUI Library: developer.yahoo.com/yui/
2 | refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
3 |
4 | there are three custom edits:
5 | * remove arial, helvetica from explicit font stack
6 | * we normalize monospace styles ourselves
7 | * table font-size is reset in the HTML5 reset above so there is no need to repeat
8 | */
9 | body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */
10 |
11 | select, input, textarea, button { font:99% sans-serif; }
12 |
13 | /* normalize monospace sizing
14 | * en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
15 | */
16 | pre, code, kbd, samp { font-family: monospace, sans-serif; }
17 |
18 |
19 | /*
20 | * minimal base styles
21 | */
22 |
23 |
24 | body, select, input, textarea {
25 | color: #222;
26 | }
27 |
28 | #main p {
29 | line-height: 1.4em;
30 | }
31 | #main p {
32 | line-height: 1.4em;
33 | }
34 | #main p, #main h2, #main h3, #main dl, #main ul, #main table {
35 | margin-bottom: 1em;
36 | }
37 | #main ul {
38 | list-style: disc;
39 | margin-left: 20px;
40 | }
41 |
42 |
43 | /* headers (h1,h2,etc) have no default font-size or margin,
44 | you'll want to define those yourself. */
45 | h1,h2,h3,h4,h5,h6 { font-weight: bold; }
46 |
47 | h2, h3 { font-family: Trebuchet MS }
48 |
49 | /* always force a scrollbar in non-IE: */
50 | html { overflow-y: scroll; }
51 |
52 |
53 | /* accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */
54 | a:hover, a:active { outline: none; }
55 |
56 | a, a:active, a:visited { color: #31519A; }
57 | a:hover { color: #036; }
58 |
59 |
60 | ol { list-style-type: decimal; }
61 |
62 | /* remove margins for navigation lists */
63 | nav ul, nav li { margin: 0; }
64 |
65 | small { font-size: 85%; }
66 | strong, th { font-weight: bold; }
67 |
68 | td { vertical-align: top; }
69 |
70 | /* set sub, sup without affecting line-height: gist.github.com/413930*/
71 | sub, sup { font-size: 75%; line-height: 0; position: relative; }
72 | sup { top: -0.5em; }
73 | sub { bottom: -0.25em; }
74 |
75 | pre {
76 | padding: 15px;
77 |
78 | /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
79 | white-space: pre; /* CSS2 */
80 | white-space: pre-wrap; /* CSS 2.1 */
81 | white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
82 | word-wrap: break-word; /* IE */
83 | }
84 |
85 | textarea { overflow: auto; } /* www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
86 |
87 | .ie6 legend, .ie7 legend { margin-left: -7px; } /* thnx ivannikolic! */
88 |
89 | /* align checkboxes, radios, text inputs with their label
90 | by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */
91 | input[type="radio"] { vertical-align: text-bottom; }
92 | input[type="checkbox"] { vertical-align: baseline; }
93 | .ie7 input[type="checkbox"] { vertical-align: baseline; }
94 | .ie6 input { vertical-align: text-bottom; }
95 |
96 | /* hand cursor on clickable input elements */
97 | label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
98 |
99 | /* webkit browsers add a 2px margin outside the chrome of form elements */
100 | button, input, select, textarea { margin: 0; }
101 |
102 | /* colors for form validity */
103 | input:valid, textarea:valid { }
104 | input:invalid, textarea:invalid {
105 | border-radius: 1px;
106 | -moz-box-shadow: 0px 0px 5px red;
107 | -webkit-box-shadow: 0px 0px 5px red;
108 | box-shadow: 0px 0px 5px red;
109 | }
110 | .no-boxshadow input:invalid,
111 | .no-boxshadow textarea:invalid { background-color: #f0dddd; }
112 |
113 |
114 | /* These selection declarations have to be separate.
115 | No text-shadow: twitter.com/miketaylr/status/12228805301
116 | Also: hot pink. */
117 | ::-moz-selection{ background: #0095da; color:#fff; text-shadow: none; }
118 | ::selection { background:#0095da; color:#fff; text-shadow: none; }
119 |
120 | /* j.mp/webkit-tap-highlight-color */
121 | a:link { -webkit-tap-highlight-color: #FF5E99; }
122 |
123 | /* make buttons play nice in IE:
124 | www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ */
125 | button { width: auto; overflow: visible; }
126 |
127 | /* bicubic resizing for non-native sized IMG:
128 | code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */
129 | .ie7 img { -ms-interpolation-mode: bicubic; }
130 |
131 |
132 | span.price {
133 | font-size: 1.5em;
134 | }
135 | span.price.discounted {
136 | color: #f00;
137 | text-decoration: line-through;
138 | }
139 | span.price.selling {
140 | font-weight: bold;
141 | }
142 |
143 | h1{
144 | color: #D3D3D3;
145 | font: normal normal 3.5em Arvo;
146 | text-transform: uppercase;
147 | margin: 60px 0 20px 0;
148 | padding-bottom: 10px;
149 | }
150 |
151 | h1 a {
152 | margin-left: 20px;
153 | text-transform:lowercase;
154 | }
155 |
156 | h2{
157 | font: normal normal 2em Arvo;
158 | text-transform: uppercase;
159 | margin: 30px 0 10px 0;
160 | padding-bottom: 10px;
161 | }
162 |
163 | h3 {
164 | color: #777;
165 | font: normal normal 2em Arvo;
166 | margin-bottom: 10px;
167 | }
168 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/display.css.erb:
--------------------------------------------------------------------------------
1 | /* @override http://localhost:3000/stylesheets/screen.css */
2 | body#product_list {
3 | background: #fff url(<%= asset_path 'store/bg.png' %>) repeat-x;
4 | }
5 |
6 | body {
7 | background: #fff url(<%= asset_path 'store/narrow_bg.png' %>) repeat-x;
8 | }
9 |
10 | #banner, #container, footer .inner {width: 960px; margin: 0 auto;}
11 |
12 | header, footer {background-color: #000;}
13 | header nav *, footer div#secondary * {display: inline-block;}
14 | header {
15 | position: relative;
16 | z-index: 100;
17 | height: 58px;
18 | margin: 0 auto;
19 | }
20 |
21 | header form {
22 | position: absolute;
23 | left: 320px;
24 | top: 23px;
25 | padding: 0;
26 | }
27 | header form input {
28 | background: #fff url(<%= asset_path 'store/search_bg_s1.gif' %>) no-repeat;
29 | border: 0;
30 | width: 146px;
31 | height: 23px;
32 | padding: 0 25px 0 10px;
33 | color: #333;
34 | line-height: 23px;
35 | }
36 | header form input.empty {
37 | color: #aaa;
38 | }
39 |
40 |
41 | header #logo {
42 | position: absolute;
43 | left: 0; top: 11px;
44 | }
45 |
46 |
47 |
48 | header nav {
49 | position: absolute;
50 | right: 0;
51 | top: 24px;
52 | text-align: right;
53 | }
54 | header nav a, header nav a:visited,header nav a:hover {
55 | margin: 0 0 0 12px;
56 | text-align: right;
57 | font: normal normal normal 1.1em/1.6em Arvo;
58 | color: #fff;
59 | }
60 |
61 | header nav a.cart {color: #B30000;}
62 |
63 | footer {
64 | background: #fff url(<%= asset_path 'store/footer_bkgd.jpg' %>) repeat-x bottom left;
65 | margin: 80px 0 0; clear: both;
66 | font-family: Trebuchet MS;
67 | }
68 |
69 | footer .inner {
70 | height: 520px;
71 | position: relative;
72 | }
73 |
74 | footer #kid {
75 | position: absolute;
76 | bottom: 60px;
77 | }
78 | footer #about-railsdog-radio {
79 | position: absolute;
80 | width: 710px;
81 | left: 250px;
82 | bottom: 0px;
83 | height: 390px;
84 | font-size: 150%;
85 | line-height: 150%;
86 | color: #666;
87 | }
88 | #more-about-railsdog-radio {
89 | text-align: right;
90 | font-size: 70%;
91 | }
92 | #more-about-railsdog-radio a {
93 | text-decoration: none;
94 | }
95 |
96 | footer #about-railsdog-radio strong { color: #000; }
97 | footer #contact-us, footer #social, footer #menu {
98 | width: 210px;
99 | position: absolute;
100 | bottom: 0;
101 | height: 170px;
102 | }
103 | footer #contact-us a, footer #social a, footer #menu a { color: #797A7D; }
104 | footer #contact-us p, footer #social p, footer #menu p {
105 | color: #797A7D;
106 | line-height: 2.0em;
107 | font-size: 1.2em;
108 | }
109 | footer #contact-us h3, footer #social h3, footer #menu h3 {
110 | color: #fff;
111 | font-size: 1.5em;
112 | margin-bottom: 0.5em;
113 | }
114 | footer #contact-us {
115 | left: 250px;
116 | }
117 | footer #social {
118 | left: 500px;
119 | }
120 | footer #menu {
121 | left: 750px;
122 | }
123 | footer #social a {
124 | display: block;
125 | width: 25px;
126 | height: 25px;
127 | float: left;
128 | margin-right: 10px;
129 | background-repeat: no-repeat;
130 | background-image: url(<%= asset_path 'store/social-icons.png' %>);
131 | }
132 | footer #social a:hover {
133 | background-image: url(<%= asset_path 'store/social-icons-rollover.png' %>);
134 | }
135 | footer #social a span { display: none; }
136 | footer #social #rss { background-position: -37px 0 }
137 | footer #social #twitter { background-position: -75px 0 }
138 |
139 |
140 | footer #copyright {
141 | color: #797A7D;
142 | position: absolute;
143 | bottom: 20px;
144 | right: 0;
145 | }
146 |
147 |
148 |
149 | #sidebar .list-box {
150 | width: 230px;
151 | float: left;
152 | background-color: #F3F3F3;
153 | border-radius: 10px;
154 | -moz-border-radius: 10px;
155 | -webkit-border-radius: 10px;
156 | padding: 0px 30px 30px 30px;
157 | color: #666;
158 | font-family: Trebuchet MS;
159 | }
160 |
161 | .list-box {
162 | padding-top: 30px; /* match #contact */
163 | }
164 | .list-box h2 {
165 | color: #364D8C;
166 | }
167 | .list-box h2, #homepage #contact h2 {
168 | font-family: Arvo;
169 | font-size: 170%;
170 | text-transform: uppercase;
171 | font-weight: normal;
172 | margin-bottom: 0.75em;
173 | border-bottom: 1px solid #A3A3A3;
174 | padding-bottom: 0.5em;
175 | }
176 | .list-box li {
177 | font-size: 1.25em;
178 | line-height: 1.5em;
179 | }
180 | .list-box a {
181 | color: #666;
182 | text-decoration: none;
183 | }
184 | .list-box a:hover {
185 | text-decoration: underline;
186 | }
187 | #recent-products {
188 | margin-top: 40px;
189 | }
190 |
191 | .breadcrumbs, .pagination {
192 | font-size: 1.1em;
193 | padding: 0 0 20px 0;
194 | }
195 | .breadcrumbs ul {
196 | margin-left: 0px !important;
197 | }
198 | .breadcrumbs li {
199 | float: left;
200 | list-style: none;
201 | }
202 | .pagination {
203 | text-align: right;
204 | }
205 |
206 | button, a.button, .button, input[type="submit"] {
207 | border: none;
208 | background-color: #0095DA;
209 | color: #fff!important;
210 | padding: 10px 18px 9px 18px;
211 | font-size: 16px;
212 | font-family: Arvo;
213 | text-transform: uppercase;
214 | border-radius: 4px;
215 | -moz-border-radius: 4px;
216 | -webkit-border-radius: 4px;
217 | font-weight: normal;
218 | }
219 | a.button {
220 | text-decoration: none;
221 | line-height: 37px;
222 | }
223 | button:hover, a.button:hover {
224 | background-color: #0068B8;
225 | }
226 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/checkout.css:
--------------------------------------------------------------------------------
1 | /* Styles for Checkout pages */
2 | /* ul, ol { margin-left: 2em; } */
3 |
4 | ul, ol {
5 | margin-left: 0em;
6 | list-style: none;
7 | }
8 | body#checkout ul.fields {
9 | list-style: none;
10 | }
11 |
12 | input.blue {
13 | color: #fff;
14 | background-color: #0095da;
15 | }
16 |
17 | input.red {
18 | color: #fff;
19 | background-color: #e41e1e;
20 | }
21 |
22 | select {
23 | padding: 7px 5px 5px;
24 | color: #333;
25 | }
26 |
27 | input[type='text'], input[type='password'],
28 | input[type="email"], input[type="url"],
29 | input[type="phone"], textarea {
30 | font-size: 18px;
31 | padding: 7px 5px 5px;
32 | border: 2px solid #A0A0A0;
33 | border-radius:2px;
34 | margin-bottom: 4px;
35 | color: #333;
36 |
37 | }
38 |
39 | input[type='checkbox'] {
40 | vertical-align: middle;
41 | }
42 |
43 | label {
44 | color: #747474;
45 | font-size: 14px;
46 | margin-bottom: 2px;
47 | display: block;
48 | }
49 |
50 | label.tick {
51 | display: inline;
52 | vertical-align: -2px;
53 | }
54 |
55 | body#checkout div[role='main-content'] {
56 | float:left;
57 | }
58 |
59 | body#checkout div[role='checkout'] {
60 | vertical-align:top;
61 | padding: 0 0 100px 0;
62 | float: left;
63 | }
64 |
65 | body#checkout div[role='checkout'] div[role='title'] {
66 | margin: 40px 0 20px 0;
67 | letter-spacing:2px;
68 | color: #d4d4d4;
69 | font: 40px Arvo, Georgia, "Times New Roman", Times, serif;
70 |
71 | }
72 |
73 | body#checkout div[role='checkout'] div#tabs {
74 | font: 18px Georgia, "Times New Roman", Times, serif;
75 | float: left;
76 | z-index: 99;
77 | background-color: #fff;
78 | width:660px;
79 | }
80 |
81 | body#checkout div[role="checkout"] div#tabs ul {
82 | margin: 0;
83 | font: 45px "Arvo", sans-serif;
84 | }
85 |
86 | body#checkout div[role='checkout'] div#tabs li {
87 | display: inline;
88 | float: left;
89 | background-color: #eceded;
90 | border-bottom: 5px solid #b7cbe9;
91 | width: 130px;
92 | height: 70px;
93 | padding-top: 10px;
94 | }
95 |
96 | body#checkout div[role='checkout'] div#tabs li.active {
97 | background-color: #fff;
98 | border: 5px solid #b7cbe9;
99 | border-bottom: none;
100 | }
101 |
102 | body#checkout div[role='checkout'] div#tabs li.end {
103 | border-right: 3px solid #eceded;
104 | }
105 |
106 | body#checkout div[role='checkout'] div#tabs li span.number {
107 | color: #bfbfbf;
108 | font-size: 54px;
109 | padding: 0 0 0 5px;
110 | display: inline-block;
111 | font-family: Arial;
112 | }
113 |
114 | body#checkout div[role='checkout'] div#tabs li.active span.number {
115 | color: #324781;
116 | }
117 |
118 |
119 | body#checkout div[role='checkout'] div#tabs li span.title {
120 | color: #bfbfbf;
121 | font-size: 18px;
122 | width: 85px;
123 | padding: 0 0 0 5px;
124 | display: inline-block;
125 | }
126 |
127 | body#checkout div[role='checkout'] div#tabs li.active span.title {
128 | color: #758ed0;
129 | }
130 |
131 | body#checkout div[role='content'] {
132 | border: 5px solid #b7cbe9;
133 | font-size: 18px;
134 | color: #A0A0A0;
135 | width: 530px;
136 | padding: 100px 60px 50px 60px;
137 | }
138 |
139 | body#checkout div[role='content'] h2 {
140 | font: 28px Arvo;
141 | color: #747474;
142 | margin: 0px;
143 | padding: 0px 0px 20px 0px;
144 | }
145 |
146 | body#checkout div[role='content'] div.submit {
147 | padding-top: 20px;
148 | text-align: center;
149 | }
150 |
151 | body#checkout div[role='content'] hr {
152 | margin: 40px -30px;
153 | visibility: visible;
154 | border: 1px solid #D4D4D4;
155 | }
156 |
157 | body#checkout div[role='content'] ul.fields {
158 | color: #747474;
159 | margin: 0px;
160 | }
161 |
162 | body#checkout div[role='content'] ul.fields li {
163 | padding: 0px 0 16px 0;
164 | text-align: left;
165 | clear: both;
166 | }
167 |
168 | body#checkout div[role='content'] ul.fields li.options {
169 | margin: 0px 50px;
170 | padding: 0px;
171 | }
172 |
173 | body#checkout div[role='content'] ul.fields li.options label {
174 | display: inline;
175 | vertical-align: -5px;
176 | font: 22px Arvo;
177 | margin-left: 15px;
178 | }
179 |
180 |
181 | body#checkout div[role='content'] ul.fields .quart {
182 | width: 127px;
183 | float: left;
184 | clear: none;
185 | }
186 |
187 | body#checkout div[role='content'] ul.fields .half {
188 | width: 254px;
189 | float: left;
190 | clear: none;
191 | }
192 |
193 | body#checkout div[role='content'] ul.fields .three-quart {
194 | width: 381px;
195 | float: left;
196 | clear: none;
197 | }
198 |
199 |
200 | body#checkout div[role='content'] ul.fields .last {
201 | margin-left: 20px;
202 | }
203 |
204 |
205 |
206 | body#checkout div[role='content'] ul.fields input[type='text'] {
207 | width: 100%;
208 | }
209 |
210 | body#checkout div[role='content'] ul.fields select {
211 | width: 100%;
212 | }
213 |
214 | body#checkout div[role='aside'] {
215 | border: 3px solid #eceded;
216 | width: 250px;
217 | float: left;
218 | margin: 100px 0px 0px 22px;
219 | padding: 10px;
220 | color: #7f7f7f;
221 | font-size: 14px;
222 | }
223 |
224 | body#checkout div[role='aside'] h3 {
225 | color: #0095da;
226 | font: 24px Arvo;
227 | margin: 10px 5px 10px 15px;
228 | padding: 0 0 10px 0;
229 | }
230 |
231 | body#checkout div[role='aside'] div[role='order'] table td {
232 | padding-right: 10px;
233 | }
234 |
235 | body#checkout div[role='aside'] div[role='order'] table.total {
236 | margin-top:20px;
237 | width: 100%;
238 | text-align: right;
239 | }
240 |
241 | body#checkout div[role='aside'] div[role='order'] th {
242 | font-weight: normal;
243 | }
244 |
245 | body#checkout div[role='aside'] div[role='order'] table.items td {
246 | padding-bottom: 10px;
247 | }
248 |
249 | body#checkout div[role='aside'] div[role='order'] table.total td {
250 | padding-bottom: 5px;
251 | }
252 |
253 |
254 | body#checkout div[role='aside'] div[role='order'] tr.total th, div[role='aside'] div[role='order'] tr.total td {
255 | font-weight: bold;
256 | }
257 |
258 |
259 | body#checkout div[role='aside'] div[role='order'] tr td.qty {
260 | width: 36px;
261 | }
262 |
263 | body#checkout div[role='aside'] div[role='order'] tr td.description {
264 | width: 160px;
265 | }
266 |
267 |
268 | body#checkout div[role='aside'] div[role='order'] tr td.price {
269 | width: 36px;
270 | }
271 |
272 | body#checkout .hidden{
273 | display: none;
274 | visibility: visible;
275 | }
276 |
277 | /* End Styles for Checkout page */
278 |
279 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/jquery.easing-1.3.pack.js:
--------------------------------------------------------------------------------
1 | /*
2 | * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3 | *
4 | * Uses the built in easing capabilities added In jQuery 1.1
5 | * to offer multiple easing options
6 | *
7 | * TERMS OF USE - jQuery Easing
8 | *
9 | * Open source under the BSD License.
10 | *
11 | * Copyright © 2008 George McGinley Smith
12 | * All rights reserved.
13 | *
14 | * Redistribution and use in source and binary forms, with or without modification,
15 | * are permitted provided that the following conditions are met:
16 | *
17 | * Redistributions of source code must retain the above copyright notice, this list of
18 | * conditions and the following disclaimer.
19 | * Redistributions in binary form must reproduce the above copyright notice, this list
20 | * of conditions and the following disclaimer in the documentation and/or other materials
21 | * provided with the distribution.
22 | *
23 | * Neither the name of the author nor the names of contributors may be used to endorse
24 | * or promote products derived from this software without specific prior written permission.
25 | *
26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
27 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34 | * OF THE POSSIBILITY OF SUCH DAMAGE.
35 | *
36 | */
37 |
38 | // t: current time, b: begInnIng value, c: change In value, d: duration
39 | eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t %q{spree/checkout/_address},
2 | :name => %q{replace_billing},
3 | :replace => %q{#billing[data-hook]},
4 | :text => %q{
5 |
6 |
Your Billing Information
7 |
87 |
88 |
89 |
Your Shipping Information
90 |
174 |
175 |
})
176 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/jquery.fancybox-1.3.4.css:
--------------------------------------------------------------------------------
1 | /*
2 | * FancyBox - jQuery Plugin
3 | * Simple and fancy lightbox alternative
4 | *
5 | * Examples and documentation at: http://fancybox.net
6 | *
7 | * Copyright (c) 2008 - 2010 Janis Skarnelis
8 | * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9 | *
10 | * Version: 1.3.4 (11/11/2010)
11 | * Requires: jQuery v1.3+
12 | *
13 | * Dual licensed under the MIT and GPL licenses:
14 | * http://www.opensource.org/licenses/mit-license.php
15 | * http://www.gnu.org/licenses/gpl.html
16 | */
17 |
18 | #fancybox-loading {
19 | position: fixed;
20 | top: 50%;
21 | left: 50%;
22 | width: 40px;
23 | height: 40px;
24 | margin-top: -20px;
25 | margin-left: -20px;
26 | cursor: pointer;
27 | overflow: hidden;
28 | z-index: 1104;
29 | display: none;
30 | }
31 |
32 | #fancybox-loading div {
33 | position: absolute;
34 | top: 0;
35 | left: 0;
36 | width: 40px;
37 | height: 480px;
38 | background-image: url('fancybox.png');
39 | }
40 |
41 | #fancybox-overlay {
42 | position: absolute;
43 | top: 0;
44 | left: 0;
45 | width: 100%;
46 | z-index: 1100;
47 | display: none;
48 | }
49 |
50 | #fancybox-tmp {
51 | padding: 0;
52 | margin: 0;
53 | border: 0;
54 | overflow: auto;
55 | display: none;
56 | }
57 |
58 | #fancybox-wrap {
59 | position: absolute;
60 | top: 0;
61 | left: 0;
62 | padding: 20px;
63 | z-index: 1101;
64 | outline: none;
65 | display: none;
66 | }
67 |
68 | #fancybox-outer {
69 | position: relative;
70 | width: 100%;
71 | height: 100%;
72 | background: #fff;
73 | }
74 |
75 | #fancybox-content {
76 | width: 0;
77 | height: 0;
78 | padding: 0;
79 | outline: none;
80 | position: relative;
81 | overflow: hidden;
82 | z-index: 1102;
83 | border: 0px solid #fff;
84 | }
85 |
86 | #fancybox-hide-sel-frame {
87 | position: absolute;
88 | top: 0;
89 | left: 0;
90 | width: 100%;
91 | height: 100%;
92 | background: transparent;
93 | z-index: 1101;
94 | }
95 |
96 | #fancybox-close {
97 | position: absolute;
98 | top: -15px;
99 | right: -15px;
100 | width: 30px;
101 | height: 30px;
102 | background: transparent url('fancybox.png') -40px 0px;
103 | cursor: pointer;
104 | z-index: 1103;
105 | display: none;
106 | }
107 |
108 | #fancybox-error {
109 | color: #444;
110 | font: normal 12px/20px Arial;
111 | padding: 14px;
112 | margin: 0;
113 | }
114 |
115 | #fancybox-img {
116 | width: 100%;
117 | height: 100%;
118 | padding: 0;
119 | margin: 0;
120 | border: none;
121 | outline: none;
122 | line-height: 0;
123 | vertical-align: top;
124 | }
125 |
126 | #fancybox-frame {
127 | width: 100%;
128 | height: 100%;
129 | border: none;
130 | display: block;
131 | }
132 |
133 | #fancybox-left, #fancybox-right {
134 | position: absolute;
135 | bottom: 0px;
136 | height: 100%;
137 | width: 35%;
138 | cursor: pointer;
139 | outline: none;
140 | background: transparent url('blank.gif');
141 | z-index: 1102;
142 | display: none;
143 | }
144 |
145 | #fancybox-left {
146 | left: 0px;
147 | }
148 |
149 | #fancybox-right {
150 | right: 0px;
151 | }
152 |
153 | #fancybox-left-ico, #fancybox-right-ico {
154 | position: absolute;
155 | top: 50%;
156 | left: -9999px;
157 | width: 30px;
158 | height: 30px;
159 | margin-top: -15px;
160 | cursor: pointer;
161 | z-index: 1102;
162 | display: block;
163 | }
164 |
165 | #fancybox-left-ico {
166 | background-image: url('fancybox.png');
167 | background-position: -40px -30px;
168 | }
169 |
170 | #fancybox-right-ico {
171 | background-image: url('fancybox.png');
172 | background-position: -40px -60px;
173 | }
174 |
175 | #fancybox-left:hover, #fancybox-right:hover {
176 | visibility: visible; /* IE6 */
177 | }
178 |
179 | #fancybox-left:hover span {
180 | left: 20px;
181 | }
182 |
183 | #fancybox-right:hover span {
184 | left: auto;
185 | right: 20px;
186 | }
187 |
188 | .fancybox-bg {
189 | position: absolute;
190 | padding: 0;
191 | margin: 0;
192 | border: 0;
193 | width: 20px;
194 | height: 20px;
195 | z-index: 1001;
196 | }
197 |
198 | #fancybox-bg-n {
199 | top: -20px;
200 | left: 0;
201 | width: 100%;
202 | background-image: url('fancybox-x.png');
203 | }
204 |
205 | #fancybox-bg-ne {
206 | top: -20px;
207 | right: -20px;
208 | background-image: url('fancybox.png');
209 | background-position: -40px -162px;
210 | }
211 |
212 | #fancybox-bg-e {
213 | top: 0;
214 | right: -20px;
215 | height: 100%;
216 | background-image: url('fancybox-y.png');
217 | background-position: -20px 0px;
218 | }
219 |
220 | #fancybox-bg-se {
221 | bottom: -20px;
222 | right: -20px;
223 | background-image: url('fancybox.png');
224 | background-position: -40px -182px;
225 | }
226 |
227 | #fancybox-bg-s {
228 | bottom: -20px;
229 | left: 0;
230 | width: 100%;
231 | background-image: url('fancybox-x.png');
232 | background-position: 0px -20px;
233 | }
234 |
235 | #fancybox-bg-sw {
236 | bottom: -20px;
237 | left: -20px;
238 | background-image: url('fancybox.png');
239 | background-position: -40px -142px;
240 | }
241 |
242 | #fancybox-bg-w {
243 | top: 0;
244 | left: -20px;
245 | height: 100%;
246 | background-image: url('fancybox-y.png');
247 | }
248 |
249 | #fancybox-bg-nw {
250 | top: -20px;
251 | left: -20px;
252 | background-image: url('fancybox.png');
253 | background-position: -40px -122px;
254 | }
255 |
256 | #fancybox-title {
257 | font-family: Helvetica;
258 | font-size: 12px;
259 | z-index: 1102;
260 | }
261 |
262 | .fancybox-title-inside {
263 | padding-bottom: 10px;
264 | text-align: center;
265 | color: #333;
266 | background: #fff;
267 | position: relative;
268 | }
269 |
270 | .fancybox-title-outside {
271 | padding-top: 10px;
272 | color: #fff;
273 | }
274 |
275 | .fancybox-title-over {
276 | position: absolute;
277 | bottom: 0;
278 | left: 0;
279 | color: #FFF;
280 | text-align: left;
281 | }
282 |
283 | #fancybox-title-over {
284 | padding: 10px;
285 | background-image: url('fancy_title_over.png');
286 | display: block;
287 | }
288 |
289 | .fancybox-title-float {
290 | position: absolute;
291 | left: 0;
292 | bottom: -20px;
293 | height: 32px;
294 | }
295 |
296 | #fancybox-title-float-wrap {
297 | border: none;
298 | border-collapse: collapse;
299 | width: auto;
300 | }
301 |
302 | #fancybox-title-float-wrap td {
303 | border: none;
304 | white-space: nowrap;
305 | }
306 |
307 | #fancybox-title-float-left {
308 | padding: 0 0 0 15px;
309 | background: url('fancybox.png') -40px -90px no-repeat;
310 | }
311 |
312 | #fancybox-title-float-main {
313 | color: #FFF;
314 | line-height: 29px;
315 | font-weight: bold;
316 | padding: 0 0 3px 0;
317 | background: url('fancybox-x.png') 0px -40px;
318 | }
319 |
320 | #fancybox-title-float-right {
321 | padding: 0 0 0 15px;
322 | background: url('fancybox.png') -55px -90px no-repeat;
323 | }
324 |
325 | /* IE6 */
326 |
327 | .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
328 |
329 | .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
330 | .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
331 |
332 | .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
333 | .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
334 | .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
335 | .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
336 |
337 | .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
338 | height: expression(this.parentNode.clientHeight + "px");
339 | }
340 |
341 | #fancybox-loading.fancybox-ie6 {
342 | position: absolute; margin-top: 0;
343 | top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
344 | }
345 |
346 | #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
347 |
348 | /* IE6, IE7, IE8 */
349 |
350 | .fancybox-ie .fancybox-bg { background: transparent !important; }
351 |
352 | .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
353 | .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
354 | .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
355 | .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
356 | .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
357 | .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
358 | .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
359 | .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
--------------------------------------------------------------------------------
/app/assets/stylesheets/store/auth-buttons.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Button Object
3 | */
4 |
5 | /*
6 | * 1. Corrects inability to style clickable 'input' types in iOS
7 | * 2. Remove excess padding in IE6/7
8 | * 3. IE6/7 inline-block hack for native block-level elements
9 | */
10 |
11 | .btn-auth {
12 | position: relative;
13 | display: inline-block;
14 | height: 22px;
15 | padding: 0 1em;
16 | border: 1px solid #999;
17 | border-radius: 2px;
18 | margin: 0;
19 | text-align: center;
20 | text-decoration: none;
21 | font-size: 14px;
22 | line-height: 22px;
23 | white-space: nowrap;
24 | cursor: pointer;
25 | color: #222;
26 | background: #fff;
27 | -webkit-box-sizing: content-box;
28 | -moz-box-sizing: content-box;
29 | box-sizing: content-box;
30 | /* iOS */
31 | -webkit-appearance: none; /* 1 */
32 | /* IE6/7 hacks */
33 | *overflow: visible; /* 2 */
34 | *display: inline; /* 3 */
35 | *zoom: 1; /* 3 */
36 | }
37 |
38 | .btn-auth:hover,
39 | .btn-auth:focus,
40 | .btn-auth:active {
41 | color: #222;
42 | text-decoration: none;
43 | }
44 |
45 | .btn-auth:before {
46 | content: "";
47 | float: left;
48 | width: 22px;
49 | height: 22px;
50 | background: url(auth-icons.png) no-repeat 99px 99px;
51 | }
52 |
53 | /*
54 | * 36px
55 | */
56 |
57 | .btn-auth.large {
58 | height: 36px;
59 | line-height: 36px;
60 | font-size: 20px;
61 | }
62 |
63 | .btn-auth.large:before {
64 | width: 36px;
65 | height: 36px;
66 | }
67 |
68 | /*
69 | * Remove excess padding and border in FF3+
70 | */
71 |
72 | .btn-auth::-moz-focus-inner {
73 | border: 0;
74 | padding: 0;
75 | }
76 |
77 |
78 | /* Facebook (extends .btn-auth)
79 | ========================================================================== */
80 |
81 | .btn-facebook {
82 | border-color: #29447e;
83 | border-bottom-color: #1a356e;
84 | color: #fff;
85 | background-color: #5872a7;
86 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#637bad), to(#5872a7));
87 | background-image: -webkit-linear-gradient(#637bad, #5872a7);
88 | background-image: -moz-linear-gradient(#637bad, #5872a7);
89 | background-image: -ms-linear-gradient(#637bad, #5872a7);
90 | background-image: -o-linear-gradient(#637bad, #5872a7);
91 | background-image: linear-gradient(#637bad, #5872a7);
92 | -webkit-box-shadow: inset 0 1px 0 #879ac0;
93 | box-shadow: inset 0 1px 0 #879ac0;
94 | }
95 |
96 | .btn-facebook:hover,
97 | .btn-facebook:focus {
98 | color: #fff;
99 | background-color: #3b5998;
100 | }
101 |
102 | .btn-facebook:active {
103 | color: #fff;
104 | background: #4f6aa3;
105 | -webkit-box-shadow: inset 0 1px 0 #45619d;
106 | box-shadow: inset 0 1px 0 #45619d;
107 | }
108 |
109 | /*
110 | * Icon
111 | */
112 |
113 | .btn-facebook:before {
114 | border-right: 1px solid #465f94;
115 | margin: 0 1em 0 -1em;
116 | background-position: 0 0;
117 | }
118 |
119 | .btn-facebook.large:before {
120 | background-position: 0 -22px;
121 | }
122 |
123 |
124 | /* GitHub
125 | ========================================================================== */
126 |
127 | .btn-github {
128 | border-color: #d4d4d4;
129 | background: #ececec;
130 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f4f4f4), to(#ececec));
131 | background-image: -webkit-linear-gradient(#f4f4f4, #ececec);
132 | background-image: -moz-linear-gradient(#f4f4f4, #ececec);
133 | background-image: -ms-linear-gradient(#f4f4f4, #ececec);
134 | background-image: -o-linear-gradient(#f4f4f4, #ececec);
135 | background-image: linear-gradient(#f4f4f4, #ececec);
136 | }
137 |
138 | .btn-github:hover,
139 | .btn-github:focus {
140 | border-color: #518cc6;
141 | border-bottom-color: #2a65a0;
142 | color: #fff;
143 | background-color: #599bdc;
144 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#599bdc), to(#3072b3));
145 | background-image: -webkit-linear-gradient(#599bdc, #3072b3);
146 | background-image: -moz-linear-gradient(#599bdc, #3072b3);
147 | background-image: -ms-linear-gradient(#599bdc, #3072b3);
148 | background-image: -o-linear-gradient(#599bdc, #3072b3);
149 | background-image: linear-gradient(#599bdc, #3072b3);
150 | }
151 |
152 | .btn-github:active {
153 | border-color: #2A65A0;
154 | border-bottom-color: #518CC6;
155 | color: #fff;
156 | background: #3072B3;
157 | background: -webkit-gradient(linear, 0 0, 0 100%, from(#3072b3), to(#599bdc));
158 | background: -webkit-linear-gradient(#3072b3, #599bdc);
159 | background: -moz-linear-gradient(#3072b3, #599bdc);
160 | background: -ms-linear-gradient(#3072b3, #599bdc);
161 | background: -o-linear-gradient(#3072b3, #599bdc);
162 | background: linear-gradient(#3072b3, #599bdc);
163 | }
164 |
165 | /*
166 | * Icon
167 | */
168 |
169 | .btn-github:before {
170 | margin: 0 0.6em 0 -0.6em;
171 | background-position: -44px 0;
172 | }
173 |
174 | .btn-github:hover:before,
175 | .btn-github:focus:before,
176 | .btn-github:active:before {
177 | background-position: -66px 0;
178 | }
179 |
180 | .btn-github.large:before {
181 | background-position: -72px -22px;
182 | }
183 |
184 | .btn-github.large:hover:before,
185 | .btn-github.large:focus:before,
186 | .btn-github.large:active:before {
187 | background-position: -108px -22px;
188 | }
189 |
190 |
191 | /* Google
192 | ========================================================================== */
193 |
194 | .btn-google {
195 | border-color: #3079ed;
196 | color: #fff;
197 | background: #4787ed;
198 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4d90fe), to(#4787ed));
199 | background-image: -webkit-linear-gradient(#4d90fe, #4787ed);
200 | background-image: -moz-linear-gradient(#4d90fe, #4787ed);
201 | background-image: -ms-linear-gradient(#4d90fe, #4787ed);
202 | background-image: -o-linear-gradient(#4d90fe, #4787ed);
203 | background-image: linear-gradient(#4d90fe, #4787ed);
204 | }
205 |
206 | .btn-google:hover,
207 | .btn-google:focus,
208 | .btn-google:active {
209 | color: #fff;
210 | background-color: #357ae8;
211 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4d90fe), to(#357ae8));
212 | background-image: -webkit-linear-gradient(#4d90fe, #357ae8);
213 | background-image: -moz-linear-gradient(#4d90fe, #357ae8);
214 | background-image: -ms-linear-gradient(#4d90fe, #357ae8);
215 | background-image: -o-linear-gradient(#4d90fe, #357ae8);
216 | background-image: linear-gradient(#4d90fe, #357ae8);
217 | }
218 |
219 | .btn-google:active {
220 | -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
221 | box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
222 | }
223 |
224 | /*
225 | * Icon
226 | */
227 |
228 | .btn-google:before {
229 | margin: 0 1em 0 -1em;
230 | background-position: -88px 0;
231 | background-color: #e6e6e6;
232 | }
233 |
234 | .btn-google.large:before {
235 | background-position: -144px -22px;
236 | }
237 |
238 |
239 | /* Open ID
240 | ========================================================================== */
241 |
242 | .btn-openid:hover,
243 | .btn-openid:focus {
244 | border-color: #777;
245 | background: #fcfcfc;
246 | }
247 |
248 | .btn-openid:active {
249 | background: #f5f5f5;
250 | }
251 |
252 | /*
253 | * Icon
254 | */
255 |
256 | .btn-openid:before {
257 | margin: 0 0.6em 0 -0.6em;
258 | background-position: -154px 0;
259 | }
260 |
261 | .btn-openid.large:before {
262 | background-position: -252px -22px;
263 | }
264 |
265 |
266 | /* Twitter
267 | ========================================================================== */
268 |
269 | .btn-twitter {
270 | border-color: #a6cde6;
271 | color: #327695;
272 | background: #cfe4f0;
273 | /* css3 */
274 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f1f5f7), to(rgba(255,255,255,0)));
275 | background-image: -webkit-linear-gradient(#f1f5f7, rgba(255,255,255,0));
276 | background-image: -moz-linear-gradient(#f1f5f7, rgba(255,255,255,0));
277 | background-image: -ms-linear-gradient(#f1f5f7, rgba(255,255,255,0));
278 | background-image: -o-linear-gradient(#f1f5f7, rgba(255,255,255,0));
279 | background-image: linear-gradient(#f1f5f7, rgba(255,255,255,0));
280 | -webkit-box-shadow: inset 0 1px 0 #fff;
281 | box-shadow: inset 0 1px 0 #fff;
282 | }
283 |
284 | .btn-twitter:hover,
285 | .btn-twitter:focus,
286 | .btn-twitter:active {
287 | color: #327695;
288 | border-color: #8dc2e4;
289 | background-color: #cadde9;
290 | }
291 |
292 | .btn-twitter:active {
293 | background: #cadde9;
294 | -webkit-box-shadow: inset 0 1px 0 #bbd6e7;
295 | box-shadow: inset 0 1px 0 #bbd6e7;
296 | }
297 |
298 | /*
299 | * Icon
300 | */
301 |
302 | .btn-twitter:before {
303 | margin: 0 0.6em 0 -0.6em;
304 | background-position: -22px 0;
305 | }
306 |
307 | .btn-twitter.large:before {
308 | background-position: -36px -22px;
309 | }
310 |
311 |
312 | /* Windows Live ID
313 | ========================================================================== */
314 |
315 | .btn-windows:hover,
316 | .btn-windows:focus {
317 | border-color: #777;
318 | background: #fcfcfc;
319 | }
320 |
321 | .btn-windows:active {
322 | background: #f5f5f5;
323 | }
324 |
325 | /*
326 | * Icon
327 | */
328 |
329 | .btn-windows:before {
330 | margin: 0 0.6em 0 -0.6em;
331 | background-position: -110px 0;
332 | }
333 |
334 | .btn-windows.large:before {
335 | background-position: -180px -22px;
336 | }
337 |
338 |
339 | /* Yahoo!
340 | ========================================================================== */
341 |
342 | .btn-yahoo {
343 | border-color: #ffb305;
344 | background: #ffc426;
345 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,0.5)), to(rgba(255,255,255,0)));
346 | background-image: -webkit-linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0));
347 | background-image: -moz-linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0));
348 | background-image: -ms-linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0));
349 | background-image: -o-linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0));
350 | background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0));
351 | }
352 |
353 | .btn-yahoo:hover,
354 | .btn-yahoo:focus {
355 | background-color: #fabf20;
356 | }
357 |
358 | .btn-yahoo:active {
359 | border-color: #f09700;
360 | background-image: none;
361 | -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.3);
362 | box-shadow: inset 0 1px 1px rgba(0,0,0,0.3);
363 | }
364 |
365 | /*
366 | * Icon
367 | */
368 |
369 | .btn-yahoo:before {
370 | margin: 0 0.6em 0 -0.6em;
371 | background-position: -132px 0;
372 | }
373 |
374 | .btn-yahoo.large:before {
375 | background-position: -216px -22px;
376 | }
377 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/jquery.fancybox-1.3.4.pack.js:
--------------------------------------------------------------------------------
1 | /*
2 | * FancyBox - jQuery Plugin
3 | * Simple and fancy lightbox alternative
4 | *
5 | * Examples and documentation at: http://fancybox.net
6 | *
7 | * Copyright (c) 2008 - 2010 Janis Skarnelis
8 | * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9 | *
10 | * Version: 1.3.4 (11/11/2010)
11 | * Requires: jQuery v1.3+
12 | *
13 | * Dual licensed under the MIT and GPL licenses:
14 | * http://www.opensource.org/licenses/mit-license.php
15 | * http://www.gnu.org/licenses/gpl.html
16 | */
17 |
18 | ;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('The requested content cannot be loaded.
Please try again later.
');
19 | F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
20 | c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
21 | false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
22 | function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("
").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
24 | "function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
26 | opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
27 | d.titlePosition=="float"?'':''+s+"
":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
28 | y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
29 | i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
30 | f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
31 | 37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
32 | s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('').appendTo(j);
33 | f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
34 | j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
35 | "image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
36 | 10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
37 | b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
38 | 0,C=a.length;ko.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
39 | 1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
40 | true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
41 | b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
42 | d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b(''),t=b(''),u=b(''),f=b(''));D=b('').append('').appendTo(f);
43 | D.append(j=b(''),E=b(''),n=b(''),z=b(''),A=b(''));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
44 | b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('').prependTo(D)}}};
45 | b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
46 | easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);
--------------------------------------------------------------------------------
/vendor/assets/javascripts/jquery.fancybox-1.3.4.js:
--------------------------------------------------------------------------------
1 | /*
2 | * FancyBox - jQuery Plugin
3 | * Simple and fancy lightbox alternative
4 | *
5 | * Examples and documentation at: http://fancybox.net
6 | *
7 | * Copyright (c) 2008 - 2010 Janis Skarnelis
8 | * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9 | *
10 | * Version: 1.3.4 (11/11/2010)
11 | * Requires: jQuery v1.3+
12 | *
13 | * Dual licensed under the MIT and GPL licenses:
14 | * http://www.opensource.org/licenses/mit-license.php
15 | * http://www.gnu.org/licenses/gpl.html
16 | */
17 |
18 | ;(function($) {
19 | var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
20 |
21 | selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
22 |
23 | ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
24 |
25 | loadingTimer, loadingFrame = 1,
26 |
27 | titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('')[0], { prop: 0 }),
28 |
29 | isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,
30 |
31 | /*
32 | * Private methods
33 | */
34 |
35 | _abort = function() {
36 | loading.hide();
37 |
38 | imgPreloader.onerror = imgPreloader.onload = null;
39 |
40 | if (ajaxLoader) {
41 | ajaxLoader.abort();
42 | }
43 |
44 | tmp.empty();
45 | },
46 |
47 | _error = function() {
48 | if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
49 | loading.hide();
50 | busy = false;
51 | return;
52 | }
53 |
54 | selectedOpts.titleShow = false;
55 |
56 | selectedOpts.width = 'auto';
57 | selectedOpts.height = 'auto';
58 |
59 | tmp.html( 'The requested content cannot be loaded.
Please try again later.
' );
60 |
61 | _process_inline();
62 | },
63 |
64 | _start = function() {
65 | var obj = selectedArray[ selectedIndex ],
66 | href,
67 | type,
68 | title,
69 | str,
70 | emb,
71 | ret;
72 |
73 | _abort();
74 |
75 | selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
76 |
77 | ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
78 |
79 | if (ret === false) {
80 | busy = false;
81 | return;
82 | } else if (typeof ret == 'object') {
83 | selectedOpts = $.extend(selectedOpts, ret);
84 | }
85 |
86 | title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
87 |
88 | if (obj.nodeName && !selectedOpts.orig) {
89 | selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
90 | }
91 |
92 | if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
93 | title = selectedOpts.orig.attr('alt');
94 | }
95 |
96 | href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
97 |
98 | if ((/^(?:javascript)/i).test(href) || href == '#') {
99 | href = null;
100 | }
101 |
102 | if (selectedOpts.type) {
103 | type = selectedOpts.type;
104 |
105 | if (!href) {
106 | href = selectedOpts.content;
107 | }
108 |
109 | } else if (selectedOpts.content) {
110 | type = 'html';
111 |
112 | } else if (href) {
113 | if (href.match(imgRegExp)) {
114 | type = 'image';
115 |
116 | } else if (href.match(swfRegExp)) {
117 | type = 'swf';
118 |
119 | } else if ($(obj).hasClass("iframe")) {
120 | type = 'iframe';
121 |
122 | } else if (href.indexOf("#") === 0) {
123 | type = 'inline';
124 |
125 | } else {
126 | type = 'ajax';
127 | }
128 | }
129 |
130 | if (!type) {
131 | _error();
132 | return;
133 | }
134 |
135 | if (type == 'inline') {
136 | obj = href.substr(href.indexOf("#"));
137 | type = $(obj).length > 0 ? 'inline' : 'ajax';
138 | }
139 |
140 | selectedOpts.type = type;
141 | selectedOpts.href = href;
142 | selectedOpts.title = title;
143 |
144 | if (selectedOpts.autoDimensions) {
145 | if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
146 | selectedOpts.width = 'auto';
147 | selectedOpts.height = 'auto';
148 | } else {
149 | selectedOpts.autoDimensions = false;
150 | }
151 | }
152 |
153 | if (selectedOpts.modal) {
154 | selectedOpts.overlayShow = true;
155 | selectedOpts.hideOnOverlayClick = false;
156 | selectedOpts.hideOnContentClick = false;
157 | selectedOpts.enableEscapeButton = false;
158 | selectedOpts.showCloseButton = false;
159 | }
160 |
161 | selectedOpts.padding = parseInt(selectedOpts.padding, 10);
162 | selectedOpts.margin = parseInt(selectedOpts.margin, 10);
163 |
164 | tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
165 |
166 | $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
167 | $(this).replaceWith(content.children());
168 | });
169 |
170 | switch (type) {
171 | case 'html' :
172 | tmp.html( selectedOpts.content );
173 | _process_inline();
174 | break;
175 |
176 | case 'inline' :
177 | if ( $(obj).parent().is('#fancybox-content') === true) {
178 | busy = false;
179 | return;
180 | }
181 |
182 | $('')
183 | .hide()
184 | .insertBefore( $(obj) )
185 | .bind('fancybox-cleanup', function() {
186 | $(this).replaceWith(content.children());
187 | }).bind('fancybox-cancel', function() {
188 | $(this).replaceWith(tmp.children());
189 | });
190 |
191 | $(obj).appendTo(tmp);
192 |
193 | _process_inline();
194 | break;
195 |
196 | case 'image':
197 | busy = false;
198 |
199 | $.fancybox.showActivity();
200 |
201 | imgPreloader = new Image();
202 |
203 | imgPreloader.onerror = function() {
204 | _error();
205 | };
206 |
207 | imgPreloader.onload = function() {
208 | busy = true;
209 |
210 | imgPreloader.onerror = imgPreloader.onload = null;
211 |
212 | _process_image();
213 | };
214 |
215 | imgPreloader.src = href;
216 | break;
217 |
218 | case 'swf':
219 | selectedOpts.scrolling = 'no';
220 |
221 | str = '';
230 |
231 | tmp.html(str);
232 |
233 | _process_inline();
234 | break;
235 |
236 | case 'ajax':
237 | busy = false;
238 |
239 | $.fancybox.showActivity();
240 |
241 | selectedOpts.ajax.win = selectedOpts.ajax.success;
242 |
243 | ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
244 | url : href,
245 | data : selectedOpts.ajax.data || {},
246 | error : function(XMLHttpRequest, textStatus, errorThrown) {
247 | if ( XMLHttpRequest.status > 0 ) {
248 | _error();
249 | }
250 | },
251 | success : function(data, textStatus, XMLHttpRequest) {
252 | var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
253 | if (o.status == 200) {
254 | if ( typeof selectedOpts.ajax.win == 'function' ) {
255 | ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
256 |
257 | if (ret === false) {
258 | loading.hide();
259 | return;
260 | } else if (typeof ret == 'string' || typeof ret == 'object') {
261 | data = ret;
262 | }
263 | }
264 |
265 | tmp.html( data );
266 | _process_inline();
267 | }
268 | }
269 | }));
270 |
271 | break;
272 |
273 | case 'iframe':
274 | _show();
275 | break;
276 | }
277 | },
278 |
279 | _process_inline = function() {
280 | var
281 | w = selectedOpts.width,
282 | h = selectedOpts.height;
283 |
284 | if (w.toString().indexOf('%') > -1) {
285 | w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
286 |
287 | } else {
288 | w = w == 'auto' ? 'auto' : w + 'px';
289 | }
290 |
291 | if (h.toString().indexOf('%') > -1) {
292 | h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
293 |
294 | } else {
295 | h = h == 'auto' ? 'auto' : h + 'px';
296 | }
297 |
298 | tmp.wrapInner('');
299 |
300 | selectedOpts.width = tmp.width();
301 | selectedOpts.height = tmp.height();
302 |
303 | _show();
304 | },
305 |
306 | _process_image = function() {
307 | selectedOpts.width = imgPreloader.width;
308 | selectedOpts.height = imgPreloader.height;
309 |
310 | $("
").attr({
311 | 'id' : 'fancybox-img',
312 | 'src' : imgPreloader.src,
313 | 'alt' : selectedOpts.title
314 | }).appendTo( tmp );
315 |
316 | _show();
317 | },
318 |
319 | _show = function() {
320 | var pos, equal;
321 |
322 | loading.hide();
323 |
324 | if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
325 | $.event.trigger('fancybox-cancel');
326 |
327 | busy = false;
328 | return;
329 | }
330 |
331 | busy = true;
332 |
333 | $(content.add( overlay )).unbind();
334 |
335 | $(window).unbind("resize.fb scroll.fb");
336 | $(document).unbind('keydown.fb');
337 |
338 | if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
339 | wrap.css('height', wrap.height());
340 | }
341 |
342 | currentArray = selectedArray;
343 | currentIndex = selectedIndex;
344 | currentOpts = selectedOpts;
345 |
346 | if (currentOpts.overlayShow) {
347 | overlay.css({
348 | 'background-color' : currentOpts.overlayColor,
349 | 'opacity' : currentOpts.overlayOpacity,
350 | 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
351 | 'height' : $(document).height()
352 | });
353 |
354 | if (!overlay.is(':visible')) {
355 | if (isIE6) {
356 | $('select:not(#fancybox-tmp select)').filter(function() {
357 | return this.style.visibility !== 'hidden';
358 | }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
359 | this.style.visibility = 'inherit';
360 | });
361 | }
362 |
363 | overlay.show();
364 | }
365 | } else {
366 | overlay.hide();
367 | }
368 |
369 | final_pos = _get_zoom_to();
370 |
371 | _process_title();
372 |
373 | if (wrap.is(":visible")) {
374 | $( close.add( nav_left ).add( nav_right ) ).hide();
375 |
376 | pos = wrap.position(),
377 |
378 | start_pos = {
379 | top : pos.top,
380 | left : pos.left,
381 | width : wrap.width(),
382 | height : wrap.height()
383 | };
384 |
385 | equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
386 |
387 | content.fadeTo(currentOpts.changeFade, 0.3, function() {
388 | var finish_resizing = function() {
389 | content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
390 | };
391 |
392 | $.event.trigger('fancybox-change');
393 |
394 | content
395 | .empty()
396 | .removeAttr('filter')
397 | .css({
398 | 'border-width' : currentOpts.padding,
399 | 'width' : final_pos.width - currentOpts.padding * 2,
400 | 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
401 | });
402 |
403 | if (equal) {
404 | finish_resizing();
405 |
406 | } else {
407 | fx.prop = 0;
408 |
409 | $(fx).animate({prop: 1}, {
410 | duration : currentOpts.changeSpeed,
411 | easing : currentOpts.easingChange,
412 | step : _draw,
413 | complete : finish_resizing
414 | });
415 | }
416 | });
417 |
418 | return;
419 | }
420 |
421 | wrap.removeAttr("style");
422 |
423 | content.css('border-width', currentOpts.padding);
424 |
425 | if (currentOpts.transitionIn == 'elastic') {
426 | start_pos = _get_zoom_from();
427 |
428 | content.html( tmp.contents() );
429 |
430 | wrap.show();
431 |
432 | if (currentOpts.opacity) {
433 | final_pos.opacity = 0;
434 | }
435 |
436 | fx.prop = 0;
437 |
438 | $(fx).animate({prop: 1}, {
439 | duration : currentOpts.speedIn,
440 | easing : currentOpts.easingIn,
441 | step : _draw,
442 | complete : _finish
443 | });
444 |
445 | return;
446 | }
447 |
448 | if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
449 | title.show();
450 | }
451 |
452 | content
453 | .css({
454 | 'width' : final_pos.width - currentOpts.padding * 2,
455 | 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
456 | })
457 | .html( tmp.contents() );
458 |
459 | wrap
460 | .css(final_pos)
461 | .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
462 | },
463 |
464 | _format_title = function(title) {
465 | if (title && title.length) {
466 | if (currentOpts.titlePosition == 'float') {
467 | return '';
468 | }
469 |
470 | return '' + title + '
';
471 | }
472 |
473 | return false;
474 | },
475 |
476 | _process_title = function() {
477 | titleStr = currentOpts.title || '';
478 | titleHeight = 0;
479 |
480 | title
481 | .empty()
482 | .removeAttr('style')
483 | .removeClass();
484 |
485 | if (currentOpts.titleShow === false) {
486 | title.hide();
487 | return;
488 | }
489 |
490 | titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
491 |
492 | if (!titleStr || titleStr === '') {
493 | title.hide();
494 | return;
495 | }
496 |
497 | title
498 | .addClass('fancybox-title-' + currentOpts.titlePosition)
499 | .html( titleStr )
500 | .appendTo( 'body' )
501 | .show();
502 |
503 | switch (currentOpts.titlePosition) {
504 | case 'inside':
505 | title
506 | .css({
507 | 'width' : final_pos.width - (currentOpts.padding * 2),
508 | 'marginLeft' : currentOpts.padding,
509 | 'marginRight' : currentOpts.padding
510 | });
511 |
512 | titleHeight = title.outerHeight(true);
513 |
514 | title.appendTo( outer );
515 |
516 | final_pos.height += titleHeight;
517 | break;
518 |
519 | case 'over':
520 | title
521 | .css({
522 | 'marginLeft' : currentOpts.padding,
523 | 'width' : final_pos.width - (currentOpts.padding * 2),
524 | 'bottom' : currentOpts.padding
525 | })
526 | .appendTo( outer );
527 | break;
528 |
529 | case 'float':
530 | title
531 | .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
532 | .appendTo( wrap );
533 | break;
534 |
535 | default:
536 | title
537 | .css({
538 | 'width' : final_pos.width - (currentOpts.padding * 2),
539 | 'paddingLeft' : currentOpts.padding,
540 | 'paddingRight' : currentOpts.padding
541 | })
542 | .appendTo( wrap );
543 | break;
544 | }
545 |
546 | title.hide();
547 | },
548 |
549 | _set_navigation = function() {
550 | if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
551 | $(document).bind('keydown.fb', function(e) {
552 | if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
553 | e.preventDefault();
554 | $.fancybox.close();
555 |
556 | } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
557 | e.preventDefault();
558 | $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
559 | }
560 | });
561 | }
562 |
563 | if (!currentOpts.showNavArrows) {
564 | nav_left.hide();
565 | nav_right.hide();
566 | return;
567 | }
568 |
569 | if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
570 | nav_left.show();
571 | }
572 |
573 | if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
574 | nav_right.show();
575 | }
576 | },
577 |
578 | _finish = function () {
579 | if (!$.support.opacity) {
580 | content.get(0).style.removeAttribute('filter');
581 | wrap.get(0).style.removeAttribute('filter');
582 | }
583 |
584 | if (selectedOpts.autoDimensions) {
585 | content.css('height', 'auto');
586 | }
587 |
588 | wrap.css('height', 'auto');
589 |
590 | if (titleStr && titleStr.length) {
591 | title.show();
592 | }
593 |
594 | if (currentOpts.showCloseButton) {
595 | close.show();
596 | }
597 |
598 | _set_navigation();
599 |
600 | if (currentOpts.hideOnContentClick) {
601 | content.bind('click', $.fancybox.close);
602 | }
603 |
604 | if (currentOpts.hideOnOverlayClick) {
605 | overlay.bind('click', $.fancybox.close);
606 | }
607 |
608 | $(window).bind("resize.fb", $.fancybox.resize);
609 |
610 | if (currentOpts.centerOnScroll) {
611 | $(window).bind("scroll.fb", $.fancybox.center);
612 | }
613 |
614 | if (currentOpts.type == 'iframe') {
615 | $('').appendTo(content);
616 | }
617 |
618 | wrap.show();
619 |
620 | busy = false;
621 |
622 | $.fancybox.center();
623 |
624 | currentOpts.onComplete(currentArray, currentIndex, currentOpts);
625 |
626 | _preload_images();
627 | },
628 |
629 | _preload_images = function() {
630 | var href,
631 | objNext;
632 |
633 | if ((currentArray.length -1) > currentIndex) {
634 | href = currentArray[ currentIndex + 1 ].href;
635 |
636 | if (typeof href !== 'undefined' && href.match(imgRegExp)) {
637 | objNext = new Image();
638 | objNext.src = href;
639 | }
640 | }
641 |
642 | if (currentIndex > 0) {
643 | href = currentArray[ currentIndex - 1 ].href;
644 |
645 | if (typeof href !== 'undefined' && href.match(imgRegExp)) {
646 | objNext = new Image();
647 | objNext.src = href;
648 | }
649 | }
650 | },
651 |
652 | _draw = function(pos) {
653 | var dim = {
654 | width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
655 | height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),
656 |
657 | top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
658 | left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
659 | };
660 |
661 | if (typeof final_pos.opacity !== 'undefined') {
662 | dim.opacity = pos < 0.5 ? 0.5 : pos;
663 | }
664 |
665 | wrap.css(dim);
666 |
667 | content.css({
668 | 'width' : dim.width - currentOpts.padding * 2,
669 | 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2
670 | });
671 | },
672 |
673 | _get_viewport = function() {
674 | return [
675 | $(window).width() - (currentOpts.margin * 2),
676 | $(window).height() - (currentOpts.margin * 2),
677 | $(document).scrollLeft() + currentOpts.margin,
678 | $(document).scrollTop() + currentOpts.margin
679 | ];
680 | },
681 |
682 | _get_zoom_to = function () {
683 | var view = _get_viewport(),
684 | to = {},
685 | resize = currentOpts.autoScale,
686 | double_padding = currentOpts.padding * 2,
687 | ratio;
688 |
689 | if (currentOpts.width.toString().indexOf('%') > -1) {
690 | to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
691 | } else {
692 | to.width = currentOpts.width + double_padding;
693 | }
694 |
695 | if (currentOpts.height.toString().indexOf('%') > -1) {
696 | to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
697 | } else {
698 | to.height = currentOpts.height + double_padding;
699 | }
700 |
701 | if (resize && (to.width > view[0] || to.height > view[1])) {
702 | if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
703 | ratio = (currentOpts.width ) / (currentOpts.height );
704 |
705 | if ((to.width ) > view[0]) {
706 | to.width = view[0];
707 | to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
708 | }
709 |
710 | if ((to.height) > view[1]) {
711 | to.height = view[1];
712 | to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
713 | }
714 |
715 | } else {
716 | to.width = Math.min(to.width, view[0]);
717 | to.height = Math.min(to.height, view[1]);
718 | }
719 | }
720 |
721 | to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
722 | to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
723 |
724 | return to;
725 | },
726 |
727 | _get_obj_pos = function(obj) {
728 | var pos = obj.offset();
729 |
730 | pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;
731 | pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;
732 |
733 | pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;
734 | pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;
735 |
736 | pos.width = obj.width();
737 | pos.height = obj.height();
738 |
739 | return pos;
740 | },
741 |
742 | _get_zoom_from = function() {
743 | var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
744 | from = {},
745 | pos,
746 | view;
747 |
748 | if (orig && orig.length) {
749 | pos = _get_obj_pos(orig);
750 |
751 | from = {
752 | width : pos.width + (currentOpts.padding * 2),
753 | height : pos.height + (currentOpts.padding * 2),
754 | top : pos.top - currentOpts.padding - 20,
755 | left : pos.left - currentOpts.padding - 20
756 | };
757 |
758 | } else {
759 | view = _get_viewport();
760 |
761 | from = {
762 | width : currentOpts.padding * 2,
763 | height : currentOpts.padding * 2,
764 | top : parseInt(view[3] + view[1] * 0.5, 10),
765 | left : parseInt(view[2] + view[0] * 0.5, 10)
766 | };
767 | }
768 |
769 | return from;
770 | },
771 |
772 | _animate_loading = function() {
773 | if (!loading.is(':visible')){
774 | clearInterval(loadingTimer);
775 | return;
776 | }
777 |
778 | $('div', loading).css('top', (loadingFrame * -40) + 'px');
779 |
780 | loadingFrame = (loadingFrame + 1) % 12;
781 | };
782 |
783 | /*
784 | * Public methods
785 | */
786 |
787 | $.fn.fancybox = function(options) {
788 | if (!$(this).length) {
789 | return this;
790 | }
791 |
792 | $(this)
793 | .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
794 | .unbind('click.fb')
795 | .bind('click.fb', function(e) {
796 | e.preventDefault();
797 |
798 | if (busy) {
799 | return;
800 | }
801 |
802 | busy = true;
803 |
804 | $(this).blur();
805 |
806 | selectedArray = [];
807 | selectedIndex = 0;
808 |
809 | var rel = $(this).attr('rel') || '';
810 |
811 | if (!rel || rel == '' || rel === 'nofollow') {
812 | selectedArray.push(this);
813 |
814 | } else {
815 | selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
816 | selectedIndex = selectedArray.index( this );
817 | }
818 |
819 | _start();
820 |
821 | return;
822 | });
823 |
824 | return this;
825 | };
826 |
827 | $.fancybox = function(obj) {
828 | var opts;
829 |
830 | if (busy) {
831 | return;
832 | }
833 |
834 | busy = true;
835 | opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
836 |
837 | selectedArray = [];
838 | selectedIndex = parseInt(opts.index, 10) || 0;
839 |
840 | if ($.isArray(obj)) {
841 | for (var i = 0, j = obj.length; i < j; i++) {
842 | if (typeof obj[i] == 'object') {
843 | $(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
844 | } else {
845 | obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
846 | }
847 | }
848 |
849 | selectedArray = jQuery.merge(selectedArray, obj);
850 |
851 | } else {
852 | if (typeof obj == 'object') {
853 | $(obj).data('fancybox', $.extend({}, opts, obj));
854 | } else {
855 | obj = $({}).data('fancybox', $.extend({content : obj}, opts));
856 | }
857 |
858 | selectedArray.push(obj);
859 | }
860 |
861 | if (selectedIndex > selectedArray.length || selectedIndex < 0) {
862 | selectedIndex = 0;
863 | }
864 |
865 | _start();
866 | };
867 |
868 | $.fancybox.showActivity = function() {
869 | clearInterval(loadingTimer);
870 |
871 | loading.show();
872 | loadingTimer = setInterval(_animate_loading, 66);
873 | };
874 |
875 | $.fancybox.hideActivity = function() {
876 | loading.hide();
877 | };
878 |
879 | $.fancybox.next = function() {
880 | return $.fancybox.pos( currentIndex + 1);
881 | };
882 |
883 | $.fancybox.prev = function() {
884 | return $.fancybox.pos( currentIndex - 1);
885 | };
886 |
887 | $.fancybox.pos = function(pos) {
888 | if (busy) {
889 | return;
890 | }
891 |
892 | pos = parseInt(pos);
893 |
894 | selectedArray = currentArray;
895 |
896 | if (pos > -1 && pos < currentArray.length) {
897 | selectedIndex = pos;
898 | _start();
899 |
900 | } else if (currentOpts.cyclic && currentArray.length > 1) {
901 | selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
902 | _start();
903 | }
904 |
905 | return;
906 | };
907 |
908 | $.fancybox.cancel = function() {
909 | if (busy) {
910 | return;
911 | }
912 |
913 | busy = true;
914 |
915 | $.event.trigger('fancybox-cancel');
916 |
917 | _abort();
918 |
919 | selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
920 |
921 | busy = false;
922 | };
923 |
924 | // Note: within an iframe use - parent.$.fancybox.close();
925 | $.fancybox.close = function() {
926 | if (busy || wrap.is(':hidden')) {
927 | return;
928 | }
929 |
930 | busy = true;
931 |
932 | if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
933 | busy = false;
934 | return;
935 | }
936 |
937 | _abort();
938 |
939 | $(close.add( nav_left ).add( nav_right )).hide();
940 |
941 | $(content.add( overlay )).unbind();
942 |
943 | $(window).unbind("resize.fb scroll.fb");
944 | $(document).unbind('keydown.fb');
945 |
946 | content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
947 |
948 | if (currentOpts.titlePosition !== 'inside') {
949 | title.empty();
950 | }
951 |
952 | wrap.stop();
953 |
954 | function _cleanup() {
955 | overlay.fadeOut('fast');
956 |
957 | title.empty().hide();
958 | wrap.hide();
959 |
960 | $.event.trigger('fancybox-cleanup');
961 |
962 | content.empty();
963 |
964 | currentOpts.onClosed(currentArray, currentIndex, currentOpts);
965 |
966 | currentArray = selectedOpts = [];
967 | currentIndex = selectedIndex = 0;
968 | currentOpts = selectedOpts = {};
969 |
970 | busy = false;
971 | }
972 |
973 | if (currentOpts.transitionOut == 'elastic') {
974 | start_pos = _get_zoom_from();
975 |
976 | var pos = wrap.position();
977 |
978 | final_pos = {
979 | top : pos.top ,
980 | left : pos.left,
981 | width : wrap.width(),
982 | height : wrap.height()
983 | };
984 |
985 | if (currentOpts.opacity) {
986 | final_pos.opacity = 1;
987 | }
988 |
989 | title.empty().hide();
990 |
991 | fx.prop = 1;
992 |
993 | $(fx).animate({ prop: 0 }, {
994 | duration : currentOpts.speedOut,
995 | easing : currentOpts.easingOut,
996 | step : _draw,
997 | complete : _cleanup
998 | });
999 |
1000 | } else {
1001 | wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
1002 | }
1003 | };
1004 |
1005 | $.fancybox.resize = function() {
1006 | if (overlay.is(':visible')) {
1007 | overlay.css('height', $(document).height());
1008 | }
1009 |
1010 | $.fancybox.center(true);
1011 | };
1012 |
1013 | $.fancybox.center = function() {
1014 | var view, align;
1015 |
1016 | if (busy) {
1017 | return;
1018 | }
1019 |
1020 | align = arguments[0] === true ? 1 : 0;
1021 | view = _get_viewport();
1022 |
1023 | if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
1024 | return;
1025 | }
1026 |
1027 | wrap
1028 | .stop()
1029 | .animate({
1030 | 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
1031 | 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
1032 | }, typeof arguments[0] == 'number' ? arguments[0] : 200);
1033 | };
1034 |
1035 | $.fancybox.init = function() {
1036 | if ($("#fancybox-wrap").length) {
1037 | return;
1038 | }
1039 |
1040 | $('body').append(
1041 | tmp = $(''),
1042 | loading = $(''),
1043 | overlay = $(''),
1044 | wrap = $('')
1045 | );
1046 |
1047 | outer = $('')
1048 | .append('')
1049 | .appendTo( wrap );
1050 |
1051 | outer.append(
1052 | content = $(''),
1053 | close = $(''),
1054 | title = $(''),
1055 |
1056 | nav_left = $(''),
1057 | nav_right = $('')
1058 | );
1059 |
1060 | close.click($.fancybox.close);
1061 | loading.click($.fancybox.cancel);
1062 |
1063 | nav_left.click(function(e) {
1064 | e.preventDefault();
1065 | $.fancybox.prev();
1066 | });
1067 |
1068 | nav_right.click(function(e) {
1069 | e.preventDefault();
1070 | $.fancybox.next();
1071 | });
1072 |
1073 | if ($.fn.mousewheel) {
1074 | wrap.bind('mousewheel.fb', function(e, delta) {
1075 | if (busy) {
1076 | e.preventDefault();
1077 |
1078 | } else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {
1079 | e.preventDefault();
1080 | $.fancybox[ delta > 0 ? 'prev' : 'next']();
1081 | }
1082 | });
1083 | }
1084 |
1085 | if (!$.support.opacity) {
1086 | wrap.addClass('fancybox-ie');
1087 | }
1088 |
1089 | if (isIE6) {
1090 | loading.addClass('fancybox-ie6');
1091 | wrap.addClass('fancybox-ie6');
1092 |
1093 | $('').prependTo(outer);
1094 | }
1095 | };
1096 |
1097 | $.fn.fancybox.defaults = {
1098 | padding : 10,
1099 | margin : 40,
1100 | opacity : false,
1101 | modal : false,
1102 | cyclic : false,
1103 | scrolling : 'auto', // 'auto', 'yes' or 'no'
1104 |
1105 | width : 560,
1106 | height : 340,
1107 |
1108 | autoScale : true,
1109 | autoDimensions : true,
1110 | centerOnScroll : false,
1111 |
1112 | ajax : {},
1113 | swf : { wmode: 'transparent' },
1114 |
1115 | hideOnOverlayClick : true,
1116 | hideOnContentClick : false,
1117 |
1118 | overlayShow : true,
1119 | overlayOpacity : 0.7,
1120 | overlayColor : '#777',
1121 |
1122 | titleShow : true,
1123 | titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
1124 | titleFormat : null,
1125 | titleFromAlt : false,
1126 |
1127 | transitionIn : 'fade', // 'elastic', 'fade' or 'none'
1128 | transitionOut : 'fade', // 'elastic', 'fade' or 'none'
1129 |
1130 | speedIn : 300,
1131 | speedOut : 300,
1132 |
1133 | changeSpeed : 300,
1134 | changeFade : 'fast',
1135 |
1136 | easingIn : 'swing',
1137 | easingOut : 'swing',
1138 |
1139 | showCloseButton : true,
1140 | showNavArrows : true,
1141 | enableEscapeButton : true,
1142 | enableKeyboardNav : true,
1143 |
1144 | onStart : function(){},
1145 | onCancel : function(){},
1146 | onComplete : function(){},
1147 | onCleanup : function(){},
1148 | onClosed : function(){},
1149 | onError : function(){}
1150 | };
1151 |
1152 | $(document).ready(function() {
1153 | $.fancybox.init();
1154 | });
1155 |
1156 | })(jQuery);
1157 |
--------------------------------------------------------------------------------
Sign In Using
4 |If you have an existing account with any of the following sites you can login here by clicking on the icon below.
5 | <% Spree::AuthenticationMethod.where(:environment => ::Rails.env).each do |user| %> 6 |7 | <%= link_to "Sign in with #{user.provider.capitalize}", "/users/auth/#{user.provider}", 8 | :title => "Sign in with #{user.provider}", 9 | :class => "btn-auth btn-#{user.provider.downcase}" if user.active %> 10 |
11 | <% end %> 12 |