diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 5800638..0000000 --- a/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -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 Rails Dog LLC nor the names of its - 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. \ No newline at end of file diff --git a/README.markdown b/README.markdown deleted file mode 100644 index 77a57f7..0000000 --- a/README.markdown +++ /dev/null @@ -1,24 +0,0 @@ -# Facebox - -This is an extension for Spree, allowing to show zoomed product images to the customer: - -It's based on Facebox: -http://github.com/defunkt/facebox - -A lot of code was taken from this project: -http://github.com/eliotsykes/spree-zoom-photos - -# Installation -Installation is quite simple (from the spree app root): -
-script/extension install git://github.com/Antiarchitect/spree-facebox.git
-
- -# Consequences -New extra large image size of 1000x1000. So when new image uploaded on server it will have a 1000x1000 size in addition to default sizes, old images will not. -I think there is the way to generate extra large size of them through rake (unconfirmed). - -# TODO -Navigation between images from the facebox window - -All wishes, suggestions and improvements are welcome! \ No newline at end of file diff --git a/app/views/products/_image.html.erb b/app/views/products/_image.html.erb deleted file mode 100644 index 6dcd1f3..0000000 --- a/app/views/products/_image.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -
- <% if image_controls.enable_zoom? %> - <%= link_to image_tag(image.attachment.url(size)), image.attachment.url(:xl), :rel => 'facebox' %> - <% else %> - <%= image_tag image.attachment.url(:product) %> - <% end %> -
\ No newline at end of file diff --git a/app/views/products/_variant.html.erb b/app/views/products/_variant.html.erb deleted file mode 100644 index a2ac40f..0000000 --- a/app/views/products/_variant.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<% if variant.images.any? -%> -
- <%= render :partial => 'image', :collection => variant.images, :locals => {:size => :small} -%> -
-<% end %> \ No newline at end of file diff --git a/app/views/products/show.html.erb b/app/views/products/show.html.erb deleted file mode 100644 index 1da6b85..0000000 --- a/app/views/products/show.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -<% @body_id = 'product-details' %> -

<%= @product.name %>

- -
- <%= render :partial => 'image', :collection => @product.images, :locals => {:size => :product} -%> - <% if @product.has_variants? -%> - <%= render :partial => 'variant', :collection => @variants -%> - <% end -%> - <%= javascript_tag "jQuery(document).ready(function() { - jQuery('a[rel*=facebox]').facebox() - })" %> -
- -
- <% hook :product_description do %> - <%= product_description(@product) rescue t("product_has_no_description") %> - <% end %> - <% hook :product_properties do %> - <%= render 'properties' %> - <% end %> -
- -<% hook :cart_form do %> -
- <%= render 'cart_form' %> -
-<% end %> - -<%= render 'taxons' %> - diff --git a/app/views/shared/_head.html.erb b/app/views/shared/_head.html.erb deleted file mode 100644 index dfafca6..0000000 --- a/app/views/shared/_head.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -<%= title %> - -<%= stylesheet_tags %> -<%= javascript_include_tag 'jquery-1.3.2.min', 'jquery.validate.min.js', 'facebox.js', :cache => 'jquery-core' %> -<% unless I18n.locale.to_s[0..1] == 'en' -%> - <%= javascript_include_tag ['localization/messages_', I18n.locale.to_s[0..1], '.js'].join %> -<% end -%> -<%= meta_data_tags %> -<%= yield :head %> diff --git a/config/initializers/facebox.rb b/config/initializers/facebox.rb deleted file mode 100644 index a1b20a3..0000000 --- a/config/initializers/facebox.rb +++ /dev/null @@ -1,3 +0,0 @@ -unless Spree::Config[:stylesheets].include?('facebox,product') - Spree::Config.set(:stylesheets => "#{Spree::Config[:stylesheets]},facebox,product") -end \ No newline at end of file diff --git a/facebox_extension.rb b/facebox_extension.rb deleted file mode 100644 index 79912ae..0000000 --- a/facebox_extension.rb +++ /dev/null @@ -1,41 +0,0 @@ -class FaceboxExtension < Spree::Extension - version "0.1" - description "Spree image zoom using facebox: http://github.com/defunkt/facebox" - url "http://github.com/Antiarchitect/spree-facebox" - - def activate - - # Add an extra large (xl) size to use for zooming. - Image.attachment_definitions[:attachment][:styles] = - { :mini => '48x48>', :small => '100x100>', :product => '240x240>', - :large => '600x600>', :xl => '900x900>' } - - ProductsHelper.class_eval do - def image_controls - @image_controls ||= Facebox::ImageControls.new(@product) - end - end - - Product.class_eval do - def has_image_without_style?(style) - return true if contains_image_without_style?(images, style) - if !variants.blank? - variants.each do |variant| - return true if contains_image_without_style?(variant.images, style) - end - end - return false - end - - private - - def contains_image_without_style?(images, style) - return false if images.blank? - images.each do |image| - return true unless image.attachment.path(style) - end - return false - end - end - end -end diff --git a/facebox_hooks.rb b/facebox_hooks.rb deleted file mode 100644 index d0f972c..0000000 --- a/facebox_hooks.rb +++ /dev/null @@ -1,43 +0,0 @@ -class FaceboxHooks < Spree::ThemeSupport::HookListener - - # - # In this file you can modify the content of the hooks available in the default templates - # and avoid overriding a template in many situations. Multiple extensions can modify the - # same hook, the changes being applied cumulatively based on extension load order - # - # Most hooks are defined with blocks so they span a region of the template, allowing content - # to be replaced or removed as well as added to. - # - # Usage - # - # The following methods are available - # - # * insert_before - # * insert_after - # * replace - # * remove - # - # All accept a block name symbol followed either by arguments that would be valid for 'render' - # or a block which returns the string to be inserted. The block will have access to any methods - # or instance variables accessible in your views - # - # Examples - # - # insert_before :homepage_products, :text => "

Welcome!

" - # insert_after :homepage_products, 'shared/offers' # renders a partial - # replace :taxon_sidebar_navigation, 'shared/my_sidebar - # - # adding a link below product details: - # - # insert_after :product_description do - # '

' + link_to('Back to products', products_path) + '

' - # end - # - # adding a new tab to the admin navigation - # - # insert_after :admin_tabs do - # tab(:taxonomies) - # end - # - -end diff --git a/lib/tasks/facebox_extension_tasks.rake b/lib/tasks/facebox_extension_tasks.rake deleted file mode 100644 index 2ab2134..0000000 --- a/lib/tasks/facebox_extension_tasks.rake +++ /dev/null @@ -1,17 +0,0 @@ -namespace :spree do - namespace :extensions do - namespace :facebox do - desc "Copies public assets of the Facebox to the instance public/ directory." - task :update => :environment do - is_svn_git_or_dir = proc {|path| path =~ /\.svn/ || path =~ /\.git/ || File.directory?(path) } - Dir[FaceboxExtension.root + "/public/**/*"].reject(&is_svn_git_or_dir).each do |file| - path = file.sub(FaceboxExtension.root, '') - directory = File.dirname(path) - puts "Copying #{path}..." - mkdir_p RAILS_ROOT + directory - cp file, RAILS_ROOT + path - end - end - end - end -end \ No newline at end of file diff --git a/public/images/b.png b/public/images/b.png deleted file mode 100644 index f184e62..0000000 Binary files a/public/images/b.png and /dev/null differ diff --git a/public/images/closelabel.gif b/public/images/closelabel.gif deleted file mode 100755 index 87b4f8b..0000000 Binary files a/public/images/closelabel.gif and /dev/null differ diff --git a/public/images/closelabel_ru.gif b/public/images/closelabel_ru.gif deleted file mode 100755 index 7339ec9..0000000 Binary files a/public/images/closelabel_ru.gif and /dev/null differ diff --git a/public/images/fbx-border-sprite.png b/public/images/fbx-border-sprite.png deleted file mode 100644 index dc7a999..0000000 Binary files a/public/images/fbx-border-sprite.png and /dev/null differ diff --git a/public/images/loading.gif b/public/images/loading.gif deleted file mode 100755 index f864d5f..0000000 Binary files a/public/images/loading.gif and /dev/null differ diff --git a/public/images/shadow.gif b/public/images/shadow.gif deleted file mode 100644 index e58b35b..0000000 Binary files a/public/images/shadow.gif and /dev/null differ diff --git a/public/stylesheets/product.css b/public/stylesheets/product.css deleted file mode 100644 index d5737e2..0000000 --- a/public/stylesheets/product.css +++ /dev/null @@ -1,13 +0,0 @@ -#product-images { - display: inline; - float: left; - width: 250px; - margin-right: 10px; -} - -#product-images .product-image { - margin-top: 15px; - float: right; - position: relative; -} -