Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated to support demo app

  • Loading branch information...
commit d111a97e3c46995cf1767a8a829457b5c30258e1 1 parent 00cc3c3
@BDQ BDQ authored
Showing with 2,151 additions and 498 deletions.
  1. +23 −1 README.md
  2. 0  app/assets/images/{ → store}/bg.jpg
  3. 0  app/assets/images/{ → store}/footer_bkgd.jpg
  4. 0  app/assets/images/{ → store}/icons/american-express-curved-32px.png
  5. 0  app/assets/images/{ → store}/icons/discover-curved-32px.png
  6. 0  app/assets/images/{ → store}/icons/facebook.png
  7. 0  app/assets/images/{ → store}/icons/mastercard-curved-32px.png
  8. 0  app/assets/images/{ → store/icons}/social-icons-rollover.png
  9. 0  app/assets/images/{ → store/icons}/social-icons.png
  10. 0  app/assets/images/{ → store}/icons/twitter.png
  11. 0  app/assets/images/{ → store}/icons/visa-curved-32px.png
  12. 0  app/assets/images/{ → store}/kid.jpg
  13. 0  app/assets/images/{ → store}/logo.png
  14. 0  app/assets/images/{ → store}/narrow_bg.png
  15. 0  app/assets/images/{ → store}/satellite-radios-bg.jpg
  16. 0  app/assets/images/{ → store}/search_bg_s1.gif
  17. BIN  app/assets/images/store/shadow_top.png
  18. 0  app/assets/images/{icons → store}/social-icons-rollover.png
  19. 0  app/assets/images/{icons → store}/social-icons.png
  20. +23 −0 app/assets/javascripts/store/rdr_wishlist.js
  21. +0 −263 app/assets/stylesheets/datepicker.css
  22. +0 −129 app/assets/stylesheets/homepage.css
  23. +0 −17 app/assets/stylesheets/rdr.css
  24. 0  app/assets/stylesheets/{ → store}/cart.css
  25. 0  app/assets/stylesheets/{ → store}/checkout.css
  26. 0  app/assets/stylesheets/{ → store}/editor.css
  27. +4 −4 app/assets/stylesheets/{errors.css → store/errors.css.erb}
  28. 0  app/assets/stylesheets/{ → store}/login.css
  29. +85 −0 app/assets/stylesheets/store/misc.css
  30. +2 −1  app/assets/stylesheets/{ → store}/products.css
  31. +15 −0 app/assets/stylesheets/store/rdr.css
  32. 0  app/assets/stylesheets/{ → store}/reset.css
  33. +6 −6 app/assets/stylesheets/{screen.css → store/screen.css.erb}
  34. 0  app/assets/stylesheets/{ → store}/social.css
  35. +1 −1  app/assets/stylesheets/{taxonomy.css → store/taxonomy.css.erb}
  36. 0  app/assets/stylesheets/{ → store}/typography.css
  37. +20 −0 app/overrides/add_related_products_to_cart_form.rb
  38. +7 −0 app/overrides/add_taxonomies_to_product_show.rb
  39. +2 −7 app/overrides/add_to_head.rb
  40. +5 −0 app/overrides/drop_icon_from_add_to_wishlist.rb
  41. +11 −0 app/overrides/redefine_add_socials_to_login_extras.rb
  42. +7 −0 app/overrides/redefine_add_wish_to_cart_form.rb
  43. +13 −0 app/overrides/redefine_add_wishlists_to_account_my_orders.rb
  44. +16 −0 app/overrides/redefine_recently_viewed_overrides.rb
  45. +44 −0 app/overrides/redefine_replace_account_summary_with_social_logins.rb
  46. +5 −2 app/overrides/replace_account_my_orders.rb
  47. +4 −7 app/overrides/replace_body.rb
  48. +1 −2  app/overrides/replace_cart_form.rb
  49. +12 −3 app/overrides/replace_confirm.rb
  50. +1 −7 app/overrides/replace_empty-cart.rb
  51. +1 −1  app/overrides/replace_gateway_fields.rb
  52. +9 −0 app/overrides/replace_new_wishlist_form.rb
  53. +5 −0 app/overrides/replace_new_wishlist_header.rb
  54. +8 −0 app/overrides/replace_paypal_payment.rb
  55. +8 −8 app/overrides/replace_product_show.rb
  56. +4 −13 app/overrides/replace_products.rb
  57. +6 −0 app/overrides/replace_taxon_children.rb
  58. +2 −5 app/overrides/replace_taxon_sidebar_navigation.rb
  59. +1 −19 app/overrides/replace_taxonomies.rb
  60. +8 −2 app/overrides/replace_user_sessions_new.rb
  61. +22 −0 app/views/shared/_all_products.html.erb
  62. +6 −0 app/views/shared/_product_banner.html.erb
  63. +11 −0 app/views/shared/_social_users.html.erb
  64. +86 −0 app/views/wishlists/show.html.erb
  65. +20 −0 lib/generators/spree_rdr_theme/install/install_generator.rb
  66. BIN  vendor/assets/images/fancybox/blank.gif
  67. BIN  vendor/assets/images/fancybox/fancy_close.png
  68. BIN  vendor/assets/images/fancybox/fancy_loading.png
  69. BIN  vendor/assets/images/fancybox/fancy_nav_left.png
  70. BIN  vendor/assets/images/fancybox/fancy_nav_right.png
  71. BIN  vendor/assets/images/fancybox/fancy_shadow_e.png
  72. BIN  vendor/assets/images/fancybox/fancy_shadow_n.png
  73. BIN  vendor/assets/images/fancybox/fancy_shadow_ne.png
  74. BIN  vendor/assets/images/fancybox/fancy_shadow_nw.png
  75. BIN  vendor/assets/images/fancybox/fancy_shadow_s.png
  76. BIN  vendor/assets/images/fancybox/fancy_shadow_se.png
  77. BIN  vendor/assets/images/fancybox/fancy_shadow_sw.png
  78. BIN  vendor/assets/images/fancybox/fancy_shadow_w.png
  79. BIN  vendor/assets/images/fancybox/fancy_title_left.png
  80. BIN  vendor/assets/images/fancybox/fancy_title_main.png
  81. BIN  vendor/assets/images/fancybox/fancy_title_over.png
  82. BIN  vendor/assets/images/fancybox/fancy_title_right.png
  83. BIN  vendor/assets/images/fancybox/fancybox-x.png
  84. BIN  vendor/assets/images/fancybox/fancybox-y.png
  85. BIN  vendor/assets/images/fancybox/fancybox.png
  86. +72 −0 vendor/assets/javascripts/jquery.easing-1.3.pack.js
  87. +1,156 −0 vendor/assets/javascripts/jquery.fancybox-1.3.4.js
  88. +46 −0 vendor/assets/javascripts/jquery.fancybox-1.3.4.pack.js
  89. +14 −0 vendor/assets/javascripts/jquery.mousewheel-3.0.4.pack.js
  90. 0  {app → vendor}/assets/stylesheets/jq-autocomplete.css
  91. 0  {app → vendor}/assets/stylesheets/jq-mobile-1.0a2.css
  92. +359 −0 vendor/assets/stylesheets/jquery.fancybox-1.3.4.css
View
24 README.md
@@ -3,6 +3,22 @@ SUMMARY
Rails Dog Radio Theme is a standalone theme for Spree Commerce version 0.70.0 or later.
+This theme is now being used as the base theme for Spree demo store:
+
+* [View Demo - http://demo.spreecommerce.com](http://demo.spreecommerce.com)
+* [View Demo Repo - https://github.com/spree/demo](https://github.com/spree/demo)
+
+
+This theme also currently supports (and will restyle the following
+extensions if installed):
+
+* [spree_social - https://github.com/spree/spree_social](https://github.com/spree/spree_social)
+* [spree_wishlist - https://github.com/spree/spree_wishlist](https://github.com/spree/spree_wishlist)
+* [spree_recently_viewed - https://github.com/spree/spree_recently_viewed](https://github.com/spree/spree_recently_viewed)
+* [spree_related_products - https://github.com/spree/spree_related_products](https://github.com/spree/spree_related_products)
+* [spree_paypal_express - https://github.com/spree/spree_paypal_express](https://github.com/spree/spree_paypal_express)
+
+
INSTALLATION
------------
@@ -10,6 +26,12 @@ Add the following line to your Gemfile:
gem 'spree_rdr_theme', :git => 'git://github.com/spree/spree_rdr_theme.git'
-And install:
+Run bunlder:
$ bundle install
+
+Install assets:
+
+ $ rails g spree_rdr_theme:install
+
+
View
0  app/assets/images/bg.jpg → app/assets/images/store/bg.jpg
File renamed without changes
View
0  app/assets/images/footer_bkgd.jpg → app/assets/images/store/footer_bkgd.jpg
File renamed without changes
View
0  ...ets/images/icons/american-express-curved-32px.png → ...ages/store/icons/american-express-curved-32px.png
File renamed without changes
View
0  app/assets/images/icons/discover-curved-32px.png → ...ssets/images/store/icons/discover-curved-32px.png
File renamed without changes
View
0  app/assets/images/icons/facebook.png → app/assets/images/store/icons/facebook.png
File renamed without changes
View
0  app/assets/images/icons/mastercard-curved-32px.png → ...ets/images/store/icons/mastercard-curved-32px.png
File renamed without changes
View
0  app/assets/images/social-icons-rollover.png → ...sets/images/store/icons/social-icons-rollover.png
File renamed without changes
View
0  app/assets/images/social-icons.png → app/assets/images/store/icons/social-icons.png
File renamed without changes
View
0  app/assets/images/icons/twitter.png → app/assets/images/store/icons/twitter.png
File renamed without changes
View
0  app/assets/images/icons/visa-curved-32px.png → app/assets/images/store/icons/visa-curved-32px.png
File renamed without changes
View
0  app/assets/images/kid.jpg → app/assets/images/store/kid.jpg
File renamed without changes
View
0  app/assets/images/logo.png → app/assets/images/store/logo.png
File renamed without changes
View
0  app/assets/images/narrow_bg.png → app/assets/images/store/narrow_bg.png
File renamed without changes
View
0  app/assets/images/satellite-radios-bg.jpg → app/assets/images/store/satellite-radios-bg.jpg
File renamed without changes
View
0  app/assets/images/search_bg_s1.gif → app/assets/images/store/search_bg_s1.gif
File renamed without changes
View
BIN  app/assets/images/store/shadow_top.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  app/assets/images/icons/social-icons-rollover.png → app/assets/images/store/social-icons-rollover.png
File renamed without changes
View
0  app/assets/images/icons/social-icons.png → app/assets/images/store/social-icons.png
File renamed without changes
View
23 app/assets/javascripts/store/rdr_wishlist.js
@@ -0,0 +1,23 @@
+$(document).ready(function() {
+
+ if($('a#edit_wishlist_link').is('*')){
+ //handle wishlist edit link (show / hide form)
+ $('a#edit_wishlist_link').click(function(){
+ if($('#edit_wishlist').is(':visible')){
+ $('#edit_wishlist').slideUp();
+ }else{
+ $('#edit_wishlist').slideDown();
+ }
+
+ return false;
+ });
+
+ //handle move item link
+ $('.move_item a.button').click(function(){
+ var move_button = $(this);
+ move_button.hide();
+ move_button.parent().find('form').fadeIn();
+ return false;
+ });
+ }
+ });
View
263 app/assets/stylesheets/datepicker.css
@@ -1,263 +0,0 @@
-/* This is a very basic stylesheet for the date-picker. Feel free to create your own. */
-
-/* The wrapper div */
-div.datePicker
- {
- position:absolute;
- min-width:24em;
- width:24em;
- z-index:9999;
- text-align:center;
-
- /* Change the font-size to suit your design's CSS. The following line is for the demo that has a 12px font-size defined on the body tag */
- font:900 0.8em/0.8em Verdana, Sans-Serif;
-
- /* For Example: If using the YUI font CSS, uncomment the following line to get a 10px font-size within the datePicker */
- /* font:900 77%/77% Verdana; */
-
- background:transparent;
-
- /* Mozilla & Webkit extensions to stop text-selection. Remove if you wish to validate the CSS */
- -moz-user-select:none;
- -khtml-user-select:none;
- }
-/* Styles for the static datePickers */
-div.staticDP
- {
- position:relative;
- top:5px;
- left:0;
- }
-/* The iframe hack to cover selectlists in Internet Explorer <= v6 */
-iframe.iehack
- {
- position:absolute;
- background:#fff;
- z-index:9998;
- padding:0;
- border:0;
- display:none;
- margin:0;
- }
-/* The "button" created beside each input for non-static datePickers */
-a.date-picker-control:link,
-a.date-picker-control:visited,
-a.date-picker-control:hover,
-a.date-picker-control:active,
-a.date-picker-control:focus
- {
- /*position:relative;*/
- /* Moz & FF */
- display: -moz-inline-stack;
- border:0 none;
- padding:0;
- margin:0 0 0 4px;
- background:transparent url(/images/datepicker/cal.gif) no-repeat 50% 50%;
- min-width:16px;
- line-height:1;
- cursor:pointer;
- visibility:visible;
- text-decoration:none;
- vertical-align:middle;
- }
-/* Feed IE6 the following rule, IE7 should handle the min-width declared above */
-* html a.date-picker-control
- {
- width:16px;
- }
-a.date-picker-control
- {
- /* IE, Safari & Opera. Seperate CSS rule seems to be required. */
- display:inline-block;
- }
-a.date-picker-control span
- {
- display:block;
- width:16px;
- height:16px;
- margin:auto 0;
- }
-/* The next & previous buttons */
-div.datePicker th span
- {
- display:inline;
- padding:0;
- margin:0;
- color:#000;
- text-align:center;
- line-height:1em;
- border-width:0;
- font-family: georgia, times new roman, palatino, times, bookman, serif;
- background:transparent;
- font-weight:bold;
- cursor:pointer;
- }
-div.datePicker th span.month-display,
-div.datePicker th span.year-display
- {
- text-transform:uppercase;
- letter-spacing:1px;
- font:normal 1.2em Verdana, Sans-Serif;
- cursor:default;
- }
-div.datePicker th span.prev-but,
-div.datePicker th span.next-but
- {
- font-size:1.8em;
- cursor:pointer !important;
- }
-
-div.datePicker th span.today-but
- {
- text-align:center;
- margin:0 auto;
- font:normal 1em Verdana, Sans-Serif;
- width:100%;
- text-decoration:none;
- line-height:1.6em;
- text-transform:uppercase;
- cursor:pointer !important
- }
-div.datePicker thead th span.fd-disabled
- {
- color:#aaa;
- cursor:default !important;
- }
-/* The mon, tue, wed etc day buttons */
-div.datePicker th span.fd-day-header
- {
- text-align:center;
- margin:0 auto;
- font:900 1em Verdana, Sans-Serif;
- height:1.4em;
- width:2em;
- text-decoration:none;
- text-transform:lowercase;
- line-height:1.4em;
- }
-/* The table */
-div.datePicker table
- {
- position:relative;
- margin:0;
- padding:0;
- border:1px solid #ccc;
- background:#fff url(/images/datepicker/gradient-e5e5e5-ffffff.gif) repeat-x 0 -20px;
- text-align:center;
- width:100%;
- border-spacing:2px;
- table-layout:fixed;
- border-collapse:separate;
- }
-/* Common TD & TH styling */
-div.datePicker table td
- {
- border:1px solid #ccc;
- padding:0;
- text-align:center;
- vertical-align:middle;
- /* Opera requires a line-height bigger than 1em in order to redraw properly */
- line-height:1.2em;
- cursor:pointer;
- background:#fff url(/images/datepicker/gradient-e5e5e5-ffffff.gif) repeat-x 0 -40px;
- width:3em;
- height:3em !important;
- height:2.8em;
- outline:none;
- }
-div.datePicker table th
- {
- border:0 none;
- padding:0;
- line-height:1em;
- font-weight:bold;
- color:#222;
- text-align:center;
- vertical-align:middle;
- }
-div.datePicker table td.date-picker-unused
- {
- background:#fff url(/images/datepicker/backstripes.gif);
- border-color:#dcdcdc;
- padding:0;
- cursor:default !important;
- }
-div.datePicker table thead th.date-picker-title
- {
- width:auto;
- height:auto;
- padding:0.4em 0;
- }
-/* The "mon tue wed etc" day header button styles */
-div.datePicker table th.date-picker-day-header
- {
- text-transform:lowercase;
- width:3em;
- }
-div.datePicker table th.date-picker-day-header span
- {
- display:block;
- }
-/* The "todays date" style */
-div.datePicker table td.date-picker-today
- {
- background:#fff url(/images/datepicker/bullet2.gif) no-repeat 0 0;
- color:rgb(100,100,100) !important;
- }
-/* The "selected date" style */
-div.datePicker table td.date-picker-selected-date
- {
- color:#333 !important;
- border-color:#333 !important;
- }
-/* the "highlight days" style */
-td.date-picker-highlight
- {
- color:#a86666;
- }
-/* The date "out of range" style */
-div.datePicker table td.out-of-range
- {
- color:#ccc !important;
- font-style:oblique;
- background:#fcfcfc !important;
- cursor:default !important;
- }
-/* The "disabled days" style */
-div.datePicker table td.day-disabled
- {
- color:#aaa !important;
- background:transparent !important;
- cursor:default !important;
- }
-/* The "active cursor" style */
-div.datePicker table tbody td.date-picker-hover
- {
- background:#fff url(/images/datepicker/bg_header.jpg) no-repeat 0 0;
- cursor:pointer;
- border-color:rgb(100,130,170);
- color:rgb(100,130,170);
- }
-/*
- Quirksmode necessity?
- ---------------------
-
- If your HTML document renders in quirksmode (i.e. has no doctype declaration)
- then uncomment the following CSS rule to set a less drastic font-size in IE
-
-div.datePicker table th,
-div.datePicker table td
- {
- font-size:100%;
- }
-*/
-
-/* Remove the images for Internet Explorer <= v6 using the "* html" hack */
-* html div.datePicker table td
- {
- background-image:none;
- }
-* html div.datePicker table td.date-picker-unused
- {
- background:#f2f2f2;
- }
View
129 app/assets/stylesheets/homepage.css
@@ -1,129 +0,0 @@
-/* @override
- http://localhost:3000/stylesheets/homepage.css?1295539030
- http://localhost:3000/stylesheets/homepage.css
-*/
-
-body#homepage { background-image: url('/assets/bg.jpg') }
-
-#homepage #banner {
- height: 340px;
- position: relative;
- height: 340px;
- margin-bottom: 20px;
- z-index: 2;
-}
-div#banner div.button {
- position: absolute;
- top: 49px;
- left: 640px;
-}
-div#banner div.button img {
- margin-bottom: 20px;
-}
-div#banner section {
- height: 303px;
-}
-
-header a, #banner nav ul li a {
- text-transform: uppercase;
- text-decoration: none;
-}
-
-
-#banner nav {
- width: 100%;
-}
-#banner nav ul {width:100%;}
-#banner nav ul li {
- width: 215px;
- list-style: none;
- display: block;
- float: left;
- line-height: 1em;
- text-align: center;
- padding-top: 3px;
-}
-#banner nav ul li.first, #banner nav ul li.last {
- width: 50px;
- font-weight: bold;
-}
-#banner nav ul li a {
- font: normal normal bold 1.2em/2.2em Helvetica,Arial,sans-serif;
- text-shadow: #CE2828 1px 1px 1px;
- color: #3E0303;
-}
-#banner nav ul li.current a,
-#banner nav ul li a:hover {
- color: #fff;
- text-shadow: #3E0303 1px 1px 1px;
-}
-
-
-
-
-#homepage #taxons {
- background: url(../images/dogradio/homepage/taxons-bg.png);
- width: 960px;
- margin-bottom: 30px;
-}
-#homepage #taxons div {
- width: 318px;
- padding: 1px;
- height: 309px;
- float: left;
- text-align: center;
-}
-#homepage #taxons h3 {
- font-size: 1.5em;
- margin: 20px 0 10px 0;
-}
-#homepage #taxons h3 a {
- text-decoration: none;
-}
-
-
-#homepage #contact {
- float: left;
- background-color: #F3F3F3;
- border-radius: 10px;
- -moz-border-radius: 10px;
- -webkit-border-radius: 10px;
- padding: 30px 30px 60px 30px;
- color: #666;
- font-family: Trebuchet MS;
-}
-
-#homepage #all-products , #homepage #contact {
- float: left;
-}
-#homepage #all-products {
- width: 460px;
- margin-right: 40px;
-}
-#homepage #all-products .left, #homepage #all-products .right {
- width: 210px;
- float: left;
-}
-#homepage #all-products .left {
- margin-right: 40px;
-}
-
-#homepage #contact {
- width: 400px;
- }
-#homepage #contact h2 {
- color: #D72A2A;
-}
-#homepage #contact p {
- font-size: 1.5em;
- margin-bottom: 1em;
-}
-#homepage #contact table {
- width: 100%;
-}
-#homepage #contact td {
- font-size: 1.2em;
- padding-bottom: 10px;
-}
-
-
View
17 app/assets/stylesheets/rdr.css
@@ -1,17 +0,0 @@
-/*
- *= require cart
- *= require checkout
- *= require datepicker
- *= require editor
- *= require errors
- *= require homepage
- *= require jq-autocomplete
- *= require jq-mobile-1.0a2
- *= require login
- *= require products
- *= require reset
- *= require screen
- *= require social
- *= require taxonomy
- *= require typography
-*/
View
0  app/assets/stylesheets/cart.css → app/assets/stylesheets/store/cart.css
File renamed without changes
View
0  app/assets/stylesheets/checkout.css → app/assets/stylesheets/store/checkout.css
File renamed without changes
View
0  app/assets/stylesheets/editor.css → app/assets/stylesheets/store/editor.css
File renamed without changes
View
8 app/assets/stylesheets/errors.css → app/assets/stylesheets/store/errors.css.erb
@@ -7,13 +7,13 @@
padding: 0.8em;
}
.flash.notice {
- background: #ccddff url(../images/shadow_top.png) 0px -50px repeat-x;
+ background: #ccddff url(<%= asset_path('store/shadow_top.png') %>) 0px -50px repeat-x;
color: #556699;
border: 1px solid #99aacc;
margin-top: 1em;
}
.flash.errors {
- background: #f4b4b4 url(../images/shadow_top.png) 0px -50px repeat-x;
+ background: #f4b4b4 url(<%= asset_path('store/shadow_top.png') %>) 0px -50px repeat-x;
color: #000000;
border: 1px solid #000000;
margin-top: 1em;
@@ -25,7 +25,7 @@
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
- background: #f4b4b4 url(../images/shadow_top.png) 0px -50px repeat-x;
+ background: #f4b4b4 url(<%= asset_path('store/shadow_top.png') %>) 0px -50px repeat-x;
color: #000000;
border: 1px solid #000000;
}
@@ -43,7 +43,7 @@
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
- background: #f4b4b4 url(../images/shadow_top.png) 0px -50px repeat-x;
+ background: #f4b4b4 url(<%= asset_path('store/shadow_top.png') %>) 0px -50px repeat-x;
color: #000000;
border: 1px solid #000000;
}
View
0  app/assets/stylesheets/login.css → app/assets/stylesheets/store/login.css
File renamed without changes
View
85 app/assets/stylesheets/store/misc.css
@@ -0,0 +1,85 @@
+header a, #banner nav ul li a {
+ text-transform: uppercase;
+ text-decoration: none;
+}
+
+/* for image replacement */
+.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
+
+/* Hide for both screenreaders and browsers
+css-discuss.incutio.com/wiki/Screenreader_Visibility */
+.hidden { display: none; visibility: hidden; }
+
+/* Hide only visually, but have it available for screenreaders
+www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden
+Updated to ensure no other style overrides the styles defined in this rule */
+.visuallyHidden {
+ border: 0 !important;
+ clip: rect(0 0 0 0);
+ height: 1px !important;
+ margin: -1px !important;
+ overflow: hidden !important;
+ padding: 0 !important;
+ position: absolute !important;
+ width: 1px !important;
+}
+
+/* Hide visually and from screenreaders, but maintain layout */
+.invisible { visibility: hidden; }
+
+/* >> The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix */
+.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; visibility: hidden; }
+.clearfix:after { clear: both; }
+/* fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */
+.clearfix { zoom: 1; }
+/* Textual Styles */
+span.bold {font-weight: bold;}
+
+.inline { display: inline }
+
+
+
+/*
+ * media queries for responsive design
+ * these follow after primary styles so they will successfully override.
+ */
+
+@media all and (orientation:portrait) {
+ /* style adjustments for portrait mode goes here */
+
+}
+
+@media all and (orientation:landscape) {
+ /* style adjustments for landscape mode goes here */
+
+}
+
+/* Grade-A Mobile Browsers (Opera Mobile, Mobile Safari, Android Chrome)
+consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/ */
+@media screen and (max-device-width: 480px) {
+
+
+ /* uncomment if you don't want iOS and WinMobile to mobile-optimize the text for you
+ j.mp/textsizeadjust
+ html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
+}
+
+/*
+ * print styles
+ * inlined to avoid required HTTP connection www.phpied.com/delay-loading-your-print-css/
+ */
+@media print {
+ * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
+ -ms-filter: none !important; } /* black prints faster: sanbeiji.com/archives/953 */
+ a, a:visited { color: #444 !important; text-decoration: underline; }
+ a[href]:after { content: " (" attr(href) ")"; }
+ abbr[title]:after { content: " (" attr(title) ")"; }
+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* don't show links for images, or javascript/internal links */
+ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
+ thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
+ tr, img { page-break-inside: avoid; }
+ @page { margin: 0.5cm; }
+ p, h2, h3 { orphans: 3; widows: 3; }
+ h2, h3{ page-break-after: avoid; }
+}
+
View
3  app/assets/stylesheets/products.css → app/assets/stylesheets/store/products.css
@@ -38,7 +38,7 @@ body#product-details #product-description {
#product-images #thumbnails li a {
display: block;
width: 45px;
- min-height: 35px;
+ height: 35px;
float: left;
border: 2px solid #ccc;
margin: 0 2px 0 2px;
@@ -100,6 +100,7 @@ hr {
dl.prices {
border-top: 1px solid #A7A7A7;
+ border-bottom: 1px solid #A7A7A7;
}
dl.part-numbers dd {
View
15 app/assets/stylesheets/store/rdr.css
@@ -0,0 +1,15 @@
+/*
+ *= require store/reset
+ *= require store/typography
+ *= require store/misc
+ *= require store/screen
+ *= require store/taxonomy
+ *= require store/products
+ *= require store/cart
+ *= require store/checkout
+ *= require store/login
+ *= require store/social
+ *= require store/errors
+ *= require jq-autocomplete
+ *= require jq-mobile-1.0a2
+*/
View
0  app/assets/stylesheets/reset.css → app/assets/stylesheets/store/reset.css
File renamed without changes
View
12 app/assets/stylesheets/screen.css → app/assets/stylesheets/store/screen.css.erb
@@ -1,10 +1,10 @@
/* @override http://localhost:3000/stylesheets/screen.css */
body#product_list {
- background: #fff url(/assets/bg.png) repeat-x;
+ background: #fff url(<%= asset_path 'store/bg.png' %>) repeat-x;
}
body {
- background: #fff url(/assets/narrow_bg.png) repeat-x;
+ background: #fff url(<%= asset_path 'store/narrow_bg.png' %>) repeat-x;
}
#banner, #container, footer .inner {width: 960px; margin: 0 auto;}
@@ -25,7 +25,7 @@ header form {
padding: 0;
}
header form input {
- background: #fff url(/assets/search_bg_s1.gif) no-repeat;
+ background: #fff url(<%= asset_path 'store/search_bg_s1.gif' %>) no-repeat;
border: 0;
width: 146px;
height: 23px;
@@ -61,7 +61,7 @@ header nav a, header nav a:visited,header nav a:hover {
header nav a.cart {color: #B30000;}
footer {
- background: #fff url('/assets/footer_bkgd.jpg') repeat-x bottom left;
+ background: #fff url(<%= asset_path 'store/footer_bkgd.jpg' %>) repeat-x bottom left;
margin: 80px 0 0; clear: both;
font-family: Trebuchet MS;
}
@@ -127,10 +127,10 @@ footer #social a {
float: left;
margin-right: 10px;
background-repeat: no-repeat;
- background-image: url(/assets/social-icons.png);
+ background-image: url(<%= asset_path 'store/social-icons.png' %>);
}
footer #social a:hover {
- background-image: url(/assets/social-icons-rollover.png);
+ background-image: url(<%= asset_path 'store/social-icons-rollover.png' %>);
}
footer #social a span { display: none; }
footer #social #rss { background-position: -37px 0 }
View
0  app/assets/stylesheets/social.css → app/assets/stylesheets/store/social.css
File renamed without changes
View
2  app/assets/stylesheets/taxonomy.css → app/assets/stylesheets/store/taxonomy.css.erb
@@ -1,5 +1,5 @@
body#product-list, body#product-details {
- background-image: url(/assets/bg.jpg);
+ background-image: url(<%= asset_path 'store/bg.jpg' %>);
}
body#product-details #banner, body#product-list #banner {
View
0  app/assets/stylesheets/typography.css → app/assets/stylesheets/store/typography.css
File renamed without changes
View
20 app/overrides/add_related_products_to_cart_form.rb
@@ -0,0 +1,20 @@
+if Rails.application.railties.all.map(&:railtie_name).include? "spree_related_products"
+
+ Deface::Override.new(:virtual_path => %q{products/show},
+ :name => %q{add_related_products_to_cart_form},
+ :replace => %q{[data-hook='cart_form'] hr},
+ :sequence => {:after => "replace_cart_form" },
+ :text => %q{<% if @product.cross_sells.present? %>
+ <div class="extras">
+ <% @product.cross_sells.each do |cross_sell| %>
+ <p>
+ <%= check_box_tag "variants[#{cross_sell.master.id}]", 1 %>
+ <label for="">
+ Add <em>'<%= link_to cross_sell.name, product_url(cross_sell) %>'</em> for <%= product_price(cross_sell) %>
+ </label>
+ </p>
+ <% end %>
+ </div>
+<% end %>})
+
+end
View
7 app/overrides/add_taxonomies_to_product_show.rb
@@ -0,0 +1,7 @@
+Deface::Override.new(:virtual_path => %q{products/show},
+ :name => %q{add_taxonomies_to_product_show},
+ :insert_after => %q{[data-hook='product_show']},
+ :sequence => {:after => 'add_recently_viewed_products_to_products_show'},
+ :text => %q{<%= content_for :sidebar do %>
+ <%= render 'shared/all_products' %>
+<% end %>})
View
9 app/overrides/add_to_head.rb
@@ -1,9 +1,4 @@
Deface::Override.new(:virtual_path => %q{shared/_head},
:name => %q{add_to_head},
- :replace => %q{code[erb-loud]:contains('stylesheet_link_tag')},
- :closing_selector => %q{},
- :text => %q{<link href="<%=request.protocol%>fonts.googleapis.com/css?family=Arvo:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css" >
-<%= stylesheet_link_tag 'rdr' %>},
- :disabled => false,
- :sequence => 100)
-
+ :insert_after => %q{code[erb-loud]:contains('stylesheet_link_tag')},
+ :text => %q{<link href="<%=request.protocol%>fonts.googleapis.com/css?family=Arvo:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">})
View
5 app/overrides/drop_icon_from_add_to_wishlist.rb
@@ -0,0 +1,5 @@
+Deface::Override.new(:virtual_path => 'products/show',
+ :name => 'drop_icon_from_add_to_wishlist',
+ :replace => "code[erb-loud]:contains('icons/add-to-cart')",
+ :text => %q{<%= t('add_to_wishlist') %>},
+ :sequence => {:after => 'add_wish_to_cart_form'})
View
11 app/overrides/redefine_add_socials_to_login_extras.rb
@@ -0,0 +1,11 @@
+if Rails.application.railties.all.map(&:railtie_name).include? "spree_social"
+
+ Deface::Override.new(:virtual_path => "user_registrations/new",
+ :name => "add_socials_to_login_extras",
+ :disabled => true)
+
+ Deface::Override.new(:virtual_path => "user_sessions/new",
+ :name => "add_socials_to_login_extras",
+ :disabled => true)
+
+end
View
7 app/overrides/redefine_add_wish_to_cart_form.rb
@@ -0,0 +1,7 @@
+if Rails.application.railties.all.map(&:railtie_name).include? "spree_wishlist"
+
+ Deface::Override.new(:virtual_path => 'products/show',
+ :name => 'add_wish_to_cart_form',
+ :sequence => {:after => 'replace_product_show'})
+
+end
View
13 app/overrides/redefine_add_wishlists_to_account_my_orders.rb
@@ -0,0 +1,13 @@
+if Rails.application.railties.all.map(&:railtie_name).include? "spree_wishlist"
+
+ Deface::Override.new(:virtual_path => "users/show",
+ :name => "add_wishlists_to_account_my_orders",
+ :text => %q{<h3>
+ My Wishlists:
+ <% if current_user.wishlists.present? %>
+ <%= raw current_user.wishlists.map { |wl| link_to(wl.name, wl) }.join(", ") %>,&nbsp;
+ <% end %>
+ <%= link_to "Create New Wish List", new_wishlist_url %>
+</h3>})
+
+end
View
16 app/overrides/redefine_recently_viewed_overrides.rb
@@ -0,0 +1,16 @@
+if Rails.application.railties.all.map(&:railtie_name).include? "spree_recently_viewed"
+
+ Deface::Override.new(:virtual_path => 'shared/_products',
+ :name => 'add_recently_viewed_products_to_products_index',
+ :disabled => true)
+
+ Deface::Override.new(:virtual_path => 'products/show',
+ :name => 'add_recently_viewed_products_to_products_show',
+ :disabled => true)
+
+ Deface::Override.new(:virtual_path => 'shared/_recently_viewed_products',
+ :name => 'change_title',
+ :replace => 'h3',
+ :text => '<h2>Recently Viewed</h2>')
+
+end
View
44 app/overrides/redefine_replace_account_summary_with_social_logins.rb
@@ -0,0 +1,44 @@
+if Rails.application.railties.all.map(&:railtie_name).include? "spree_social"
+
+ Deface::Override.new(:virtual_path => "users/show",
+ :name => "replace_account_summary_with_social_logins",
+ :replace => "[data-hook='account_summary']",
+ :sequence => {:after => 'replace_account_my_orders'},
+ :text => %q{<% if @user.user_authentications.present? %>
+ <h3>My Logins</h3>
+ <table id="cart-detail">
+ <thead>
+ <tr>
+ <th>Provider</th>
+ <th>Nickname</th>
+ <th>Linked</th>
+ <th>&nbsp;</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% @user.user_authentications.each do |auth| %>
+ <tr class="<%= cycle('even', 'odd') %>">
+ <td class="normal">
+ <%= image_tag "store/social/#{auth.provider}_32.png", :size => "32x32" %>
+ <%= auth.provider.capitalize %>
+ </td>
+ <td class="normal"><%= auth.nickname %></td>
+ <td class="normal"><%= auth.created_at.to_date%></td>
+ <td class="normal"><%= link_to( "Unlink", auth, :confirm => 'Are you sure you want to remove unlink this account', :method => :delete, :class => "remove") %></td>
+ </tr>
+ <% end %>
+ </tbody>
+ </table>
+
+ <hr />
+<% end %>
+
+
+<h3>Link Accounts</h3>
+<p>You can link your RailsDog Radio account with an account you already have on any of the following sites:</p>
+<% AuthenticationMethod.where(:environment => ::Rails.env).each do |user| %>
+ <%= link_to(image_tag("store/social/#{user.preferred_provider}_32.png", :size => "32x32", :alt => "#{user.preferred_provider}"), user_authentication_omniauth_authorize_path(user.preferred_provider.to_sym), :title => "Sign in with #{user.preferred_provider}") if user.active %>
+<% end %>
+ })
+
+end
View
7 app/overrides/replace_account_my_orders.rb
@@ -1,7 +1,9 @@
Deface::Override.new(:virtual_path => %q{users/show},
:name => %q{replace_account_my_orders},
:replace => %q{[data-hook='account_my_orders']},
- :text => %q{<h3><%= t("my_orders") %></h3>
+ :sequence => {:after => 'remove_account_summary' },
+ :text => %q{<div data-hook="account_my_orders">
+<h3><%= t("my_orders") %></h3>
<% if @orders.present? %>
<table id="cart-detail">
<thead>
@@ -28,6 +30,7 @@
<% else %>
<p><%= t(:you_have_no_orders_yet) %></p>
<% end %>
-
+</div>
+<div data-hook="account_summary"></div>
})
View
11 app/overrides/replace_body.rb
@@ -5,7 +5,7 @@
:text => %q{<body id="<%= (@body_id == 'signup' ? 'checkout' : @body_id) || controller.controller_name %>">
<div id="container">
<header>
- <%= link_to image_tag("/assets/logo.png", :width => "300", :height => "58", :alt => "Rails Dog Radio", :id => "logo"), root_url %>
+ <%= link_to image_tag("store/logo.png", :width => "300", :height => "58", :alt => "Rails Dog Radio", :id => "logo"), root_url %>
<form action="#" >
</form>
<%= form_tag products_url, :method => :get do %>
@@ -48,9 +48,9 @@
</div>
- <footer>
+ <footer data-hook="footer">
<div class="inner">
- <img src="/assets/kid.jpg" width="204" height="413" alt="Kid" id="kid">
+ <%= image_tag "store/kid.jpg", :width => "204", :height => "413", :alt => "RailsDog Radio Kid", :id => "kid" %>
<div id="about-railsdog-radio">
<div>
@@ -92,7 +92,4 @@
</div>
</footer>
-</body>},
- :disabled => false,
- :sequence => 100)
-
+</body>})
View
3  app/overrides/replace_cart_form.rb
@@ -41,6 +41,5 @@
<% end %>
</div>},
- :disabled => false,
- :sequence => 100)
+ :disabled => true)
View
15 app/overrides/replace_confirm.rb
@@ -47,8 +47,12 @@
<h2>Payment Details</h2>
<h4><%= @order.payment.payment_method.name %></h4>
- <%= @order.payment.source.name %><br />
- <%= @order.payment.source.display_number %>
+ <% if @order.payment.payment_method.class.to_s == "BillingIntegration::PaypalExpress" %>
+ <p>You will be redirected to PayPal to complete your order.</p>
+ <% else %>
+ <%= @order.payment.source.name %><br />
+ <%= @order.payment.source.display_number %>
+ <% end %>
<%= link_to "edit", checkout_state_path('payment') %>
</div>
@@ -56,6 +60,11 @@
</div>
<div class="submit">
- <button class="blue" type="submit">Place your order</button>
+ <% if @order.payment.payment_method.class.to_s == "BillingIntegration::PaypalExpress" %>
+ <button class="blue" type="submit">Go To PayPal</button>
+ <% else %>
+ <button class="blue" type="submit">Place your order</button>
+ <% end %>
+ </div>
</div>
</div>})
View
8 app/overrides/replace_empty-cart.rb
@@ -1,9 +1,3 @@
Deface::Override.new(:virtual_path => %q{orders/edit},
:name => %q{replace_empty-cart},
- :replace => %q{#empty-cart[data-hook]},
- :closing_selector => %q{},
- :text => %q{<div data-hook="cart_buttons">
- <p id="cart-count"><%= t("your_cart_is_empty.") %></p>
- <p><%=link_to t("continue_shopping"), products_path, :class => 'button continue' %></p>
- </div>},
- :disabled => false)
+ :remove => %q{#empty-cart[data-hook]})
View
2  app/overrides/replace_gateway_fields.rb
@@ -4,7 +4,7 @@
:text => %q{<li class="payment_method <%= payment_method.id %>" style="display:<%= checked == payment_method.id ? "block" : "none" %>;">
<h2>Your Credit Card Information</h2>
<% ['mastercard', 'visa', 'american-express', 'discover'].each do |card| %>
- <%= image_tag "icons/#{card}-curved-32px.png", :alt => card.capitalize %>
+ <%= image_tag "store/icons/#{card}-curved-32px.png", :alt => card.capitalize %>
<% end %>
</li>
View
9 app/overrides/replace_new_wishlist_form.rb
@@ -0,0 +1,9 @@
+Deface::Override.new(:virtual_path => 'wishlists/new',
+ :name => 'replace_new_wishlist_form',
+ :replace_contents => "code[erb-loud]:contains('form_for')",
+ :closing_selector => "code[erb-silent]:contains('end')",
+ :text => %q{<p><%= f.label :name, t(:name), :class => "inline" %>:&nbsp;<%= f.text_field :name %></p>
+ <p><%= f.check_box :is_private %>&nbsp;<%= f.label :is_private, "Keep this list private, for my eyes only!", :class => "inline" %></p>
+ <div class="submit">
+ <button type="submit" class="blue">Create Wish List</button>
+ </div>})
View
5 app/overrides/replace_new_wishlist_header.rb
@@ -0,0 +1,5 @@
+Deface::Override.new(:virtual_path => 'wishlists/new',
+ :name => 'replace_new_wishlist_header',
+ :replace => 'h1',
+ :text => %q{<% @body_id = 'cart' %>
+<h1>New Wish List</h1>})
View
8 app/overrides/replace_paypal_payment.rb
@@ -0,0 +1,8 @@
+Deface::Override.new(:virtual_path => 'checkout/payment/_paypalexpress',
+ :name => 'replace_paypal_payment',
+ :replace => 'a',
+ :text => %q{<li class="payment_method <%= payment_method.id %>" style="display:<%= checked == payment_method.id ? "block" : "none" %>;">
+ <h2>Your PayPal Information</h2>
+ <p>You will be redirected to PayPal's website when you click continue below.</p>
+</li>})
+
View
16 app/overrides/replace_product_show.rb
@@ -5,10 +5,10 @@
:text => %q{<div data-hook="product_show">
<% @body_id = 'product-details' %>
- <div role="banner" id="banner">
- <h1>Products</h1>
- <img src="/assets/satellite-radios-bg.jpg" alt="Satellite-radios-bg">
- </div>
+ <%= content_for :banner do %>
+ <h1>Products</h1>
+ <%= image_tag "store/satellite-radios-bg.jpg", :alt => "Satellite Radios" %>
+ <% end %>
<h2><%= @product.name %></h2>
<div id="product-images" data-hook>
@@ -20,7 +20,7 @@
</div>
<br><br>
</div>
-
+
<div id="cart-form" data-hook="cart_form">
<%= form_for :order, :url => populate_orders_url do |f| %>
<div data-hook="inside_product_cart_form" %>
@@ -31,7 +31,7 @@
<dt>PART NUMBER</dt>
<dd><%= @product.sku %></dd>
</dl>
-
+
<dl class="prices clearfix">
<dt>Price</dt>
<dd><span class="price discounted"><%= number_to_currency (@product.price * 1.2) %></span></dd>
@@ -46,7 +46,7 @@
<dt>In Stock</dt>
<dd><span class="stock"><%= @product.has_stock? ? "YES" : "NO" %></span></dd>
</dl>
-
+
<hr />
<% end %>
@@ -55,7 +55,7 @@
</div>
</div>
- <div id="product-description">
+ <div id="product-description" data-hook="product_description">
<%= product_description(@product) rescue t("product_has_no_description") %>
</div>
</div>},
View
17 app/overrides/replace_products.rb
@@ -3,12 +3,8 @@
:replace => %q{#products[data-hook]},
:closing_selector => %q{},
:text => %q{<% @body_id = 'product-list' %>
-<%= content_for :banner do %>
- <div role="banner" id="banner">
- <h1>Products</h1>
- <img src="/assets/satellite-radios-bg.jpg" alt="Satellite-radios-bg">
- </div>
-<% end %>
+
+<%= render 'shared/product_banner' %>
<div class="list" id="products" data-hook>
<% products.each do |product| %>
@@ -21,9 +17,7 @@
<div class="details">
<p class="stock"><%= product.has_stock? ? "IN STOCK" : "OUT OF STOCK" %></p>
<p class="prices">
- <%# if product.rrp.present? %>
- <span class="price discounted"><%= number_to_currency(product.price * 1.2) %></span>&nbsp;
- <%# end %>
+ <span class="price discounted"><%= number_to_currency(product.price * 1.2) %></span>&nbsp;
<span class="price selling"><%= product_price(product) %></span></p>
<p><%= link_to 'View More', product_path(product), :class => 'button' %></p>
</div>
@@ -33,7 +27,4 @@
</div>
<% end %>
<% end %>
-</div>},
- :disabled => false,
- :sequence => 100)
-
+</div>})
View
6 app/overrides/replace_taxon_children.rb
@@ -0,0 +1,6 @@
+Deface::Override.new(:virtual_path => "taxons/show",
+ :name => "replace_taxon_children",
+ :replace => "[data-hook='taxon_children']",
+ :text => %q{ <div data-hook="taxon_products">
+ <%= render :partial => "shared/products", :locals => {:products => @products, :taxon => @taxon } %>
+ </div>})
View
7 app/overrides/replace_taxon_sidebar_navigation.rb
@@ -3,8 +3,5 @@
:replace => %q{[data-hook='taxon_sidebar_navigation']},
:closing_selector => %q{},
:text => %q{<div data-hook="taxon_sidebar_navigation">
- <%= render :partial => "shared/taxonomies" %>
-</div>},
- :disabled => false,
- :sequence => 100)
-
+ <%= render :partial => "shared/taxonomies" %></div>
+</div>})
View
20 app/overrides/replace_taxonomies.rb
@@ -1,23 +1,5 @@
Deface::Override.new(:virtual_path => %q{shared/_taxonomies},
:name => %q{replace_taxonomies},
:replace => %q{#taxonomies[data-hook]},
- :closing_selector => %q{},
- :text => %q{<div id="all-products" class="list-box">
- <% if @taxon.present? && @taxon.children.present? %>
- <h2>More Products</h2>
- <ul>
- <% @taxon.children.each_with_index do |taxon,i| %>
- <li><%= raw link_to(taxon.name, seo_url(taxon)) %></li>
- <% end %>
- </ul>
- <% end %>
- <h2>All Products</h2>
- <ul>
- <% Taxonomy.where(:name => "Categories").first.root.children.each_with_index do |taxon,i| %>
- <li><%= raw link_to(taxon.name, seo_url(taxon)) %></li>
- <% end %>
- </ul>
-</div>},
- :disabled => false,
- :sequence => 100)
+ :text => %q{<%= render 'shared/all_products' %>})
View
10 app/overrides/replace_user_sessions_new.rb
@@ -1,13 +1,18 @@
Deface::Override.new(:virtual_path => %q{user_sessions/new},
:name => %q{replace_user_sessions_new},
:replace => %q{#existing-customer},
- :text => %q{<div id="existing-customer" style="margin:50px 4% 0 0;width:48%;float:left;">
+ :text => %q{<%= render 'shared/social_users' %>
+<div id="local_login">
+
+ <div id="existing-customer">
<h2>Existing Customers</h2>
<p>If you've already registered for an account you can sign in here:</p>
<%= render :partial => 'shared/login' %>
</div>
- <div id="new_customers" style="margin:50px 0 0 0;width:48%;float:left;"">
+ <hr/>
+
+ <div id="new_customers">
<h2>New Customers</h2>
<p>You can register for a new account here on RailsDog Radio below:</p>
<%= form_for(:user, :url => registration_path(User.new)) do |f| %>
@@ -27,4 +32,5 @@
</div>
+</div>
})
View
22 app/views/shared/_all_products.html.erb
@@ -0,0 +1,22 @@
+<div id="all-products" class="list-box">
+ <% if @taxon.present? && @taxon.children.present? %>
+ <h2>More Products</h2>
+ <ul>
+ <% @taxon.children.each_with_index do |taxon,i| %>
+ <li><%= raw link_to(taxon.name, seo_url(taxon)) %></li>
+ <% end %>
+ </ul>
+ <% else %>
+ <h2>All Products</h2>
+ <ul>
+ <% Taxonomy.where(:name => "Categories").first.root.children.each_with_index do |taxon,i| %>
+ <li><%= raw link_to(taxon.name, seo_url(taxon)) %></li>
+ <% end %>
+ </ul>
+ <% end %>
+</div>
+<% if Rails.application.railties.all.map(&:railtie_name).include? "spree_recently_viewed" %>
+ <div id="recent-products" class="list-box">
+ <%= render "shared/recently_viewed_products" %>
+ </div>
+<% end %>
View
6 app/views/shared/_product_banner.html.erb
@@ -0,0 +1,6 @@
+<%= content_for :banner do %>
+ <div role="banner" id="banner">
+ <h1>Products</h1>
+ <%= image_tag "store/satellite-radios-bg.jpg", :alt => "Satellite-radios-bg" %>
+ </div>
+<% end %>
View
11 app/views/shared/_social_users.html.erb
@@ -0,0 +1,11 @@
+<% if !current_user || !current_user.user_authentications %>
+ <div id="social_login">
+ <h2>Sign In Using</h2>
+ <p>If you have an existing account with any of the following sites you can login here by clicking on the icon below.</p>
+ <% AuthenticationMethod.where(:environment => ::Rails.env).each do |user| %>
+ <p class="social_link">
+ <%= link_to(image_tag("store/icons/#{user.preferred_provider}.png", :alt => "#{user.preferred_provider}"), user_authentication_omniauth_authorize_path(user.preferred_provider.to_sym), :title => "Sign in with #{user.preferred_provider}") if user.active %>
+ </p>
+ <% end %>
+ </div>
+<% end %>
View
86 app/views/wishlists/show.html.erb
@@ -0,0 +1,86 @@
+<% @body_id = 'cart' %>
+
+<h1>Wish List - <%= @wishlist.name %><%= link_to "(edit)", "#", :id => "edit_wishlist_link" %></h1>
+
+<div id="edit_wishlist">
+ <% if @wishlist.user == current_user %>
+ <%= form_for @wishlist do |f| %>
+ <div>
+ <p><%= f.label :name, t(:name), :class => "inline" %>:&nbsp;<%= f.text_field :name %></p>
+ <p><%= f.check_box :is_private %>&nbsp;<%= f.label :is_private, "Keep this list private, for my eyes only!", :class => "inline" %></p>
+ <p><%= f.check_box :is_default %>&nbsp;<%= f.label :is_default, "Automatically add new wished items to this list.", :class => "inline" %></p>
+ </div>
+ <%= link_to "Update", '#', :onclick => "$(this).parent().submit(); return false;", :class => 'button' %>
+ <% end %>
+ <hr/>
+ <% end %>
+</div>
+
+<h3>You have <%= pluralize @wishlist.wished_products.size, 'item' %> in your wish list.</h3>
+
+<% if @wishlist.wished_products.size > 0 %>
+ <table id="cart-detail">
+ <thead>
+ <tr>
+ <th colspan="2">Item</th>
+ <th>Price</th>
+ </tr>
+ </thead>
+ <% @wishlist.wished_products.each do |wish|
+ variant = wish.variant
+ product = variant.product %>
+
+ <tr class="<%= cycle('', 'alt') %>">
+ <td class="image">
+ <% if variant.images.length == 0 %>
+ <%= small_image(variant.product) %>
+ <% else %>
+ <%= image_tag variant.images.first.attachment.url(:small) %>
+ <% end %>
+ </td>
+ <td class="">
+ <h4><%= link_to variant.product.name, product_path(variant.product) %></h4>
+ <%= variant_options variant %>
+ <div class="actions">
+ <div class="add_item_to_cart">
+ <%= form_for :order, :url => populate_orders_url do |f| %>
+ <%= hidden_field_tag "variants[#{variant.id}]", 1, :size => 3 %>
+ <%= link_to t(:add_to_cart), '#', :onclick => "$(this).parent().submit(); return false;", :class => 'button' %>
+ <% end %>
+ </div>
+ <div class="remove_item">
+ <%= link_to "Remove", wish, :method => :delete, :class => 'delete button' %>
+ </div>
+
+ <% if current_user.wishlists.count > 1 %>
+ <div class="move_item">
+ <%= link_to "Move", '#', :class => 'button' %>
+
+ <%= form_for wish do |f| %>
+ <label class="inline">Move to:</label>
+ <%= f.select :wishlist_id, current_user.wishlists.map{|wl| [wl.name, wl.id] unless wl.id == @wishlist.id}.compact %>
+ <%= f.submit "Confirm" %>
+ <% end %>
+ </div>
+ <% end %>
+
+ </div>
+ </td>
+ <td class="unit-price">
+ <%= product_price(product) %>
+ </td>
+ </tr>
+ <% end -%>
+ </table>
+<% end -%>
+
+<p class="actions">
+ <% if @wishlist.user == current_user %>
+ <%= link_to "Create New List", new_wishlist_path, :class => 'button' %> &nbsp;
+ <%= link_to "Delete This List", @wishlist, :method => :delete, :confirm => 'Are you sure, that you want to delete this wishlist?', :class => 'button checkout' %>
+ <% end -%>
+</p>
+
+<% if @wishlists.present? %>
+ <h3>My Wishlists: <%= raw @wishlists.map { |wl| link_to(wl.name, wl) }.join(", ") %></h3>
+<% end %>
View
20 lib/generators/spree_rdr_theme/install/install_generator.rb
@@ -0,0 +1,20 @@
+module SpreeRdrTheme
+ module Generators
+ class InstallGenerator < Rails::Generators::Base
+
+ def remove_spree_core_stylesheets
+ gsub_file "app/assets/stylesheets/store/all.css", /^\s*\*=\s*require\s*store\/spree_core.*$/, ''
+ end
+
+ def add_javascripts
+ append_file "app/assets/javascripts/store/all.js", "//= require jquery.fancybox-1.3.4\n"
+ append_file "app/assets/javascripts/store/all.js", "//= require store/rdr_wishlist\n"
+ end
+
+ def add_stylesheets
+ inject_into_file "app/assets/stylesheets/store/all.css", " *= require store/rdr\n", :before => /\*\//, :verbose => true
+ end
+ end
+ end
+end
+
View
BIN  vendor/assets/images/fancybox/blank.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/fancybox/fancy_close.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/fancybox/fancy_loading.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/fancybox/fancy_nav_left.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/fancybox/fancy_nav_right.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/fancybox/fancy_shadow_e.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/fancybox/fancy_shadow_n.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/fancybox/fancy_shadow_ne.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancy_shadow_nw.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancy_shadow_s.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancy_shadow_se.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancy_shadow_sw.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancy_shadow_w.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancy_title_left.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancy_title_main.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancy_title_over.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancy_title_right.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancybox-x.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancybox-y.png
Diff not rendered
View
BIN  vendor/assets/images/fancybox/fancybox.png
Diff not rendered
View
72 vendor/assets/javascripts/jquery.easing-1.3.pack.js
@@ -0,0 +1,72 @@
+/*
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+ *
+ * Uses the built in easing capabilities added In jQuery 1.1
+ * to offer multiple easing options
+ *
+ * TERMS OF USE - jQuery Easing
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright © 2008 George McGinley Smith
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+*/
+
+// t: current time, b: begInnIng value, c: change In value, d: duration
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?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<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))
+
+/*
+ *
+ * TERMS OF USE - EASING EQUATIONS
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright © 2001 Robert Penner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
View
1,156 vendor/assets/javascripts/jquery.fancybox-1.3.4.js
@@ -0,0 +1,1156 @@
+/*
+ * FancyBox - jQuery Plugin
+ * Simple and fancy lightbox alternative
+ *
+ * Examples and documentation at: http://fancybox.net
+ *
+ * Copyright (c) 2008 - 2010 Janis Skarnelis
+ * 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.
+ *
+ * Version: 1.3.4 (11/11/2010)
+ * Requires: jQuery v1.3+
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+
+;(function($) {
+ var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
+
+ selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
+
+ ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
+
+ loadingTimer, loadingFrame = 1,
+
+ titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
+
+ isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,
+
+ /*
+ * Private methods
+ */
+
+ _abort = function() {
+ loading.hide();
+
+ imgPreloader.onerror = imgPreloader.onload = null;
+
+ if (ajaxLoader) {
+ ajaxLoader.abort();
+ }
+
+ tmp.empty();
+ },
+
+ _error = function() {
+ if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
+ loading.hide();
+ busy = false;
+ return;
+ }
+
+ selectedOpts.titleShow = false;
+
+ selectedOpts.width = 'auto';
+ selectedOpts.height = 'auto';
+
+ tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' );
+
+ _process_inline();
+ },
+
+ _start = function() {
+ var obj = selectedArray[ selectedIndex ],
+ href,
+ type,
+ title,
+ str,
+ emb,
+ ret;
+
+ _abort();
+
+ selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
+
+ ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
+
+ if (ret === false) {
+ busy = false;
+ return;
+ } else if (typeof ret == 'object') {
+ selectedOpts = $.extend(selectedOpts, ret);
+ }
+
+ title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
+
+ if (obj.nodeName && !selectedOpts.orig) {
+ selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
+ }
+
+ if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
+ title = selectedOpts.orig.attr('alt');
+ }
+
+ href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
+
+ if ((/^(?:javascript)/i).test(href) || href == '#') {
+ href = null;
+ }
+
+ if (selectedOpts.type) {
+ type = selectedOpts.type;
+
+ if (!href) {
+ href = selectedOpts.content;
+ }
+
+ } else if (selectedOpts.content) {
+ type = 'html';
+
+ } else if (href) {
+ if (href.match(imgRegExp)) {
+ type = 'image';
+
+ } else if (href.match(swfRegExp)) {
+ type = 'swf';
+
+ } else if ($(obj).hasClass("iframe")) {
+ type = 'iframe';
+
+ } else if (href.indexOf("#") === 0) {
+ type = 'inline';
+
+ } else {
+ type = 'ajax';
+ }
+ }
+
+ if (!type) {
+ _error();
+ return;
+ }
+
+ if (type == 'inline') {
+ obj = href.substr(href.indexOf("#"));
+ type = $(obj).length > 0 ? 'inline' : 'ajax';
+ }
+
+ selectedOpts.type = type;
+ selectedOpts.href = href;
+ selectedOpts.title = title;
+
+ if (selectedOpts.autoDimensions) {
+ if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
+ selectedOpts.width = 'auto';
+ selectedOpts.height = 'auto';
+ } else {
+ selectedOpts.autoDimensions = false;
+ }
+ }
+
+ if (selectedOpts.modal) {
+ selectedOpts.overlayShow = true;
+ selectedOpts.hideOnOverlayClick = false;
+ selectedOpts.hideOnContentClick = false;
+ selectedOpts.enableEscapeButton = false;
+ selectedOpts.showCloseButton = false;
+ }
+
+ selectedOpts.padding = parseInt(selectedOpts.padding, 10);
+ selectedOpts.margin = parseInt(selectedOpts.margin, 10);
+
+ tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
+
+ $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
+ $(this).replaceWith(content.children());
+ });
+
+ switch (type) {
+ case 'html' :
+ tmp.html( selectedOpts.content );
+ _process_inline();
+ break;
+
+ case 'inline' :
+ if ( $(obj).parent().is('#fancybox-content') === true) {
+ busy = false;
+ return;
+ }
+
+ $('<div class="fancybox-inline-tmp" />')
+ .hide()
+ .insertBefore( $(obj) )
+ .bind('fancybox-cleanup', function() {
+ $(this).replaceWith(content.children());
+ }).bind('fancybox-cancel', function() {
+ $(this).replaceWith(tmp.children());
+ });
+
+ $(obj).appendTo(tmp);
+
+ _process_inline();
+ break;
+
+ case 'image':
+ busy = false;
+
+ $.fancybox.showActivity();
+
+ imgPreloader = new Image();
+
+ imgPreloader.onerror = function() {
+ _error();
+ };
+
+ imgPreloader.onload = function() {
+ busy = true;
+
+ imgPreloader.onerror = imgPreloader.onload = null;
+
+ _process_image();
+ };
+
+ imgPreloader.src = href;
+ break;
+
+ case 'swf':
+ selectedOpts.scrolling = 'no';
+
+ str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
+ emb = '';
+
+ $.each(selectedOpts.swf, function(name, val) {
+ str += '<param name="' + name + '" value="' + val + '"></param>';
+ emb += ' ' + name + '="' + val + '"';
+ });
+
+ str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
+
+ tmp.html(str);
+
+ _process_inline();
+ break;
+
+ case 'ajax':
+ busy = false;
+
+ $.fancybox.showActivity();
+
+ selectedOpts.ajax.win = selectedOpts.ajax.success;
+
+ ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
+ url : href,
+ data : selectedOpts.ajax.data || {},
+ error : function(XMLHttpRequest, textStatus, errorThrown) {
+ if ( XMLHttpRequest.status > 0 ) {
+ _error();
+ }
+ },
+ success : function(data, textStatus, XMLHttpRequest) {
+ var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
+ if (o.status == 200) {
+ if ( typeof selectedOpts.ajax.win == 'function' ) {
+ ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
+
+ if (ret === false) {
+ loading.hide();
+ return;
+ } else if (typeof ret == 'string' || typeof ret == 'object') {
+ data = ret;
+ }
+ }
+
+ tmp.html( data );
+ _process_inline();
+ }
+ }
+ }));
+
+ break;
+
+ case 'iframe':
+ _show();
+ break;
+ }
+ },
+
+ _process_inline = function() {
+ var
+ w = selectedOpts.width,
+ h = selectedOpts.height;
+
+ if (w.toString().indexOf('%') > -1) {
+ w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
+
+ } else {
+ w = w == 'auto' ? 'auto' : w + 'px';
+ }
+
+ if (h.toString().indexOf('%') > -1) {
+ h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
+
+ } else {
+ h = h == 'auto' ? 'auto' : h + 'px';
+ }
+
+ tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
+
+ selectedOpts.width = tmp.width();
+ selectedOpts.height = tmp.height();
+
+ _show();
+ },
+
+ _process_image = function() {
+ selectedOpts.width = imgPreloader.width;
+ selectedOpts.height = imgPreloader.height;
+
+ $("<img />").attr({
+ 'id' : 'fancybox-img',
+ 'src' : imgPreloader.src,
+ 'alt' : selectedOpts.title
+ }).appendTo( tmp );
+
+ _show();
+ },
+
+ _show = function() {
+ var pos, equal;
+
+ loading.hide();
+
+ if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
+ $.event.trigger('fancybox-cancel');
+
+ busy = false;
+ return;
+ }
+
+ busy = true;
+
+ $(content.add( overlay )).unbind();
+
+ $(window).unbind("resize.fb scroll.fb");
+ $(document).unbind('keydown.fb');
+
+ if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
+ wrap.css('height', wrap.height());
+ }
+
+ currentArray = selectedArray;
+ currentIndex = selectedIndex;
+ currentOpts = selectedOpts;
+
+ if (currentOpts.overlayShow) {
+ overlay.css({
+ 'background-color' : currentOpts.overlayColor,
+ 'opacity' : currentOpts.overlayOpacity,
+ 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
+ 'height' : $(document).height()
+ });
+
+ if (!overlay.is(':visible')) {
+ if (isIE6) {
+ $('select:not(#fancybox-tmp select)').filter(function() {
+ return this.style.visibility !== 'hidden';
+ }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
+ this.style.visibility = 'inherit';
+ });
+ }
+
+ overlay.show();
+ }
+ } else {
+ overlay.hide();
+ }
+
+ final_pos = _get_zoom_to();
+
+ _process_title();
+
+ if (wrap.is(":visible")) {
+ $( close.add( nav_left ).add( nav_right ) ).hide();
+
+ pos = wrap.position(),
+
+ start_pos = {
+ top : pos.top,
+ left : pos.left,
+ width : wrap.width(),
+ height : wrap.height()
+ };
+
+ equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
+
+ content.fadeTo(currentOpts.changeFade, 0.3, function() {
+ var finish_resizing = function() {
+ content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
+ };
+
+ $.event.trigger('fancybox-change');
+
+ content
+ .empty()
+ .removeAttr('filter')
+ .css({
+ 'border-width' : currentOpts.padding,
+ 'width' : final_pos.width - currentOpts.padding * 2,
+ 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
+ });
+
+ if (equal) {
+ finish_resizing();
+
+ } else {
+ fx.prop = 0;
+
+ $(fx).animate({prop: 1}, {
+ duration : currentOpts.changeSpeed,
+ easing : currentOpts.easingChange,
+ step : _draw,
+ complete : finish_resizing
+ });
+ }
+ });
+
+ return;
+ }
+
+ wrap.removeAttr("style");
+
+ content.css('border-width', currentOpts.padding);
+
+ if (currentOpts.transitionIn == 'elastic') {
+ start_pos = _get_zoom_from();
+
+ content.html( tmp.contents() );
+
+ wrap.show();
+
+ if (currentOpts.opacity) {
+ final_pos.opacity = 0;
+ }
+
+ fx.prop = 0;
+
+ $(fx).animate({prop: 1}, {
+ duration : currentOpts.speedIn,
+ easing : currentOpts.easingIn,
+ step : _draw,
+ complete : _finish
+ });
+
+ return;
+ }
+
+ if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
+ title.show();
+ }
+
+ content
+ .css({
+ 'width' : final_pos.width - currentOpts.padding * 2,
+ 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
+ })
+ .html( tmp.contents() );
+
+ wrap
+ .css(final_pos)
+ .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
+ },
+
+ _format_title = function(title) {
+ if (title && title.length) {
+ if (currentOpts.titlePosition == 'float') {
+ return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>';
+ }
+
+ return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
+ }
+
+ return false;
+ },
+
+ _process_title = function() {
+ titleStr = currentOpts.title || '';
+ titleHeight = 0;
+
+ title
+ .empty()
+ .removeAttr('style')
+ .removeClass();
+
+ if (currentOpts.titleShow === false) {
+ title.hide();
+ return;
+ }
+
+ titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
+
+ if (!titleStr || titleStr === '') {
+ title.hide();
+ return;
+ }
+
+ title
+ .addClass('fancybox-title-' + currentOpts.titlePosition)
+ .html( titleStr )
+ .appendTo( 'body' )
+ .show();
+
+ switch (currentOpts.titlePosition) {
+ case 'inside':
+ title
+ .css({
+ 'width' : final_pos.width - (currentOpts.padding * 2),
+ 'marginLeft' : currentOpts.padding,
+ 'marginRight' : currentOpts.padding
+ });
+
+ titleHeight = title.outerHeight(true);
+
+ title.appendTo( outer );
+
+ final_pos.height += titleHeight;
+ break;
+
+ case 'over':
+ title
+ .css({
+ 'marginLeft' : currentOpts.padding,
+ 'width' : final_pos.width - (currentOpts.padding * 2),
+ 'bottom' : currentOpts.padding
+ })
+ .appendTo( outer );
+ break;
+
+ case 'float':
+ title
+ .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
+ .appendTo( wrap );
+ break;
+
+ default:
+ title
+ .css({
+ 'width' : final_pos.width - (currentOpts.padding * 2),
+ 'paddingLeft' : currentOpts.padding,
+ 'paddingRight' : currentOpts.padding
+ })
+ .appendTo( wrap );
+ break;
+ }
+
+ title.hide();
+ },
+
+ _set_navigation = function() {
+ if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
+ $(document).bind('keydown.fb', function(e) {
+ if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
+ e.preventDefault();
+ $.fancybox.close();
+
+ } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
+ e.preventDefault();
+ $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
+ }
+ });
+ }
+
+ if (!currentOpts.showNavArrows) {
+ nav_left.hide();
+ nav_right.hide();
+ return;
+ }
+
+ if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
+ nav_left.show();
+ }
+
+ if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
+ nav_right.show();
+ }
+ },
+
+ _finish = function () {
+ if (!$.support.opacity) {
+ content.get(0).style.removeAttribute('filter');
+ wrap.get(0).style.removeAttribute('filter');
+ }
+
+ if (selectedOpts.autoDimensions) {
+ content.css('height', 'auto');
+ }
+
+ wrap.css('height', 'auto');
+
+ if (titleStr && titleStr.length) {
+ title.show();
+ }
+
+ if (currentOpts.showCloseButton) {
+ close.show();
+ }
+
+ _set_navigation();
+
+ if (currentOpts.hideOnContentClick) {
+ content.bind('click', $.fancybox.close);
+ }
+
+ if (currentOpts.hideOnOverlayClick) {
+ overlay.bind('click', $.fancybox.close);
+ }
+
+ $(window).bind("resize.fb", $.fancybox.resize);
+
+ if (currentOpts.centerOnScroll) {
+ $(window).bind("scroll.fb", $.fancybox.center);
+ }
+
+ if (currentOpts.type == 'iframe') {
+ $('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content);
+ }
+
+ wrap.show();
+
+ busy = false;
+
+ $.fancybox.center();
+
+ currentOpts.onComplete(currentArray, currentIndex, currentOpts);
+
+ _preload_images();
+ },
+