From b55219eb5869449a0c2c563cd48e3ea56142fb4c Mon Sep 17 00:00:00 2001 From: Josh McArthur Date: Mon, 31 Jan 2011 17:15:41 +1300 Subject: [PATCH] Reverted repository back to Rails3-safe status --- LICENSE | 23 ------------- README.markdown | 24 -------------- app/views/products/_image.html.erb | 7 ---- app/views/products/_variant.html.erb | 5 --- app/views/products/show.html.erb | 30 ----------------- app/views/shared/_head.html.erb | 9 ------ config/initializers/facebox.rb | 3 -- facebox_extension.rb | 41 ----------------------- facebox_hooks.rb | 43 ------------------------- lib/tasks/facebox_extension_tasks.rake | 17 ---------- public/images/b.png | Bin 84 -> 0 bytes public/images/closelabel.gif | Bin 979 -> 0 bytes public/images/closelabel_ru.gif | Bin 734 -> 0 bytes public/images/fbx-border-sprite.png | Bin 324 -> 0 bytes public/images/loading.gif | Bin 2767 -> 0 bytes public/images/shadow.gif | Bin 49 -> 0 bytes public/stylesheets/product.css | 13 -------- 17 files changed, 215 deletions(-) delete mode 100644 LICENSE delete mode 100644 README.markdown delete mode 100644 app/views/products/_image.html.erb delete mode 100644 app/views/products/_variant.html.erb delete mode 100644 app/views/products/show.html.erb delete mode 100644 app/views/shared/_head.html.erb delete mode 100644 config/initializers/facebox.rb delete mode 100644 facebox_extension.rb delete mode 100644 facebox_hooks.rb delete mode 100644 lib/tasks/facebox_extension_tasks.rake delete mode 100644 public/images/b.png delete mode 100755 public/images/closelabel.gif delete mode 100755 public/images/closelabel_ru.gif delete mode 100644 public/images/fbx-border-sprite.png delete mode 100755 public/images/loading.gif delete mode 100644 public/images/shadow.gif delete mode 100644 public/stylesheets/product.css 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 f184e6269b343014f58694093b55558dd5dde193..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 84 zcmeAS@N?(olHy`uVBq!ia0vp^fG6i5I7 diff --git a/public/images/closelabel.gif b/public/images/closelabel.gif deleted file mode 100755 index 87b4f8bd699386e3a6fcc2e50d7c61bfc4aabb8d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 979 zcmZ?wbhEHbbYc)=c*ekR;J|@{2M^AjJ2x^i^3tVC&CSj0*RTKj_3M)-PXYo0cI?>E z)6+9$%9N0hkg%|@J9q8`1qGcvc``6CFd`x%G&JWG1!QZ}p`}_Crt5>gn{ra_R z*|PBP@I{Lj`S|$w`}?P*rG5YY{qEhnXU?2SNJyxzu3ors;h#T$K79Ca@7}$foSdy& zxBmY9d+OAwXV0EJb?Q__MaApauf4s!A3S&vA0NMS=g#~0?{C?%rLC>4pr9Z*Ir-_+ zr;{d4>gecLxpHM*Uf%TS)ARH5uU@^{*Vp&5E2E;KQc_ZUeSM3Ii__E7r%jvI-roNB@nb(fzs$_c+qZ95RaO1} z|Nq~=e++a1ia%Mv_UM2}P@FKZ|8IzCYHn$5Ywzgn>h9_7>+gx3Gn5iiIZY<+?`^k#V9jLtyr*r!J=422f09{b+Ju)CUT+TQ$(XUHpFrqp3WW>wX1uv zuMxADYt*_`D!j~cc9U4RqaSdy#4<#mnaaTWAexn73fF5^{TRmAubUT3M$0pEhL|XZa-W~L|(gBwDDiyC{R^)5V?SdhX{^V3U3;)26b z9`PG&9vg+2LK~Ub)t*kN@Dpm%WzyoDVKHUWf+~JK$+ZDZ@~kR1)Kp$5Zt9+<`%Y)- z>yw)=g|fzKY2BzS@eXpHy5ookQ(^-%AM<|&o|T%JuT^(X?uuf%wX|uMuC&0ET*U<& zn5MV|N-Q);aBAjTtM<^<-0=N0@0#5*3?I(E@i^2b=>KSu3P#TbT%XyyED9)8M!}zkkRC?kPTh mHXNSne@Ka2Tq>lLlg+!}=2PuWCXYMo(tpiJ>u+RWum%8KFq1q0 diff --git a/public/images/closelabel_ru.gif b/public/images/closelabel_ru.gif deleted file mode 100755 index 7339ec9874b122cc7e256a49b552333d6816e65e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 734 zcmV<40wMiJNk%w1VL|{F0M!5h`uh52W@fOkuyS&8-rn9&P*BXw%;n|fR8&+}R#x2H z++t#4@bK_@dV00BwRm`VY;0_omzPdXPE1Tphlhu6Z*RcBz*$*YQc_ZokdUCDpd%wA z(9qB_GBWS)?^sw^{r&yw>grQdQ}_4xU|?XPqM{QM6ZZD@UteGA>+9g);FOeLPGxj z{{R2~A^8LV00000EC2ui073v3000L6z@KnPEE(g z*r@aeh`@fT@pA^|aXY9t636Ec5~L}MWh1s4T% zLIx-z7ZMZt3R@%x3EG}Ka-UR5Gn?WofIRg zJQ+JYc0U^%3qlq=KMNZc*E>54JOVqcL)Smv8$CN3KRl^-V=R;x#EKsU6n#Fm9j)#^ z9C!ru@Z*{X9_-8s>EMl=HEcrE4fzLeObQwpE+j~B0YipmcnV_ZKyU$uA0232oA!{K z2826IjKUy5p{^YhJB-Ru2kK=e{WhHw~8 z3c;|z9D!ywFGGNF>M1w30 z7HIz%z%HUJp8E&{s8ry=fgBs}35LWRk#Gz%3N#2IL`U)hCAc*IvroYS;tx`w5#pf0 z#ug5?bN9IdgLLX$9f&AUfdH8M_r;LO(11n7)B;p+z<>A^Xp|Db0HDtmAPi{WgFP+L Q6@f-UXkkc6To?oZJJhj4@&Et; diff --git a/public/images/fbx-border-sprite.png b/public/images/fbx-border-sprite.png deleted file mode 100644 index dc7a99978d2d50abb41a351e9c3d206c329c14aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 324 zcmV-K0lWT*P)Z0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUy=1D|BRCwB~l(7neP!xvs=8{u2=g`pB z&=NgELzA1Y;_Rz92-0(e1Q&dOJG6_Ngx@&=8B)@D4tq&!CnF+ITM!lL8LP z3zvTh_fD=S7e*i_%u=W1A|t>iMo$db&)T+i|J<1XTUJ$Nfz7ELl0lk0&|1SQA00RKC Waz}zJ_>?sO0000$nHqS?K-=JNZ+yGvz=Iegxp{+qWGZ9j{-%9vvN>n3$NJp6==CAqYaF(LfM1Z{EEA{{Gt9 z+Ba|B7z_sR+xabl|E~mm-*OXmhLq??y)HONjX>1ze1D?RIn=G1`RR-%fb}zgSh6^a z(}Zw20U1L^Cs9UcyJfc+al#}J2xVlYUoR{`gd&QDxAb1w4>I~5gc?ccq(G+T!I;H};U_uyHR0@hr>Qk1P1=6fvUBhR zb|&^^cEQtu&W}=-=YR7o5UI)AD*~%J7bkVd5`xrdw{bHm;|Bf^_|FG$9l}`ruhnVF zO%=6X*I#yro*pmfB;-A0cVjz73Qy)`oa=df_3Bx6!M3TNALf9BwI*di`jhdovR(I= zFT31zui1Xw??+Ym-lWNq=V6~8tt012$@*hy3So0QNJ#eIJ4Yh{qJ+aTY>ng8W1p4BrwB_>i7AY-xmGrA}hAeq`aX(yx~=c&|=$w&*&PpKd;G@@0oXK@D0x=;tyY&Eb|HKPsM z71v`PO)na3pfO*xUD8Z|CQju)c+RSAH=5V^4vb9Q2JwHwt|-INt|!nD?AlRxF5ZT8 zaA9~hGb$~rMhQh_0+31$tkzyLi>X3c7>F!|Jyn`+5{LG=E`sIQbHA8!=`uday6D6Y zNtVL?j^`6A%UuwO!`}j#s~H?w=P<5}Z2)*PPx|5q$MM+1K6_d_cie9JVArbrB2sRy zOl**1Mc+|zLM>munG#O|##RApuODr^1+pL-?SHX+D6Dz_@%-Oo(fM&hHYZ-jWU5jf z&nBYG;>F6&Y`veoLdZ@0WyrDsuXOP)9g*C`A(+R`Ryc2+9w_DJNaf@Dzg?~N{uI_} zjV(!yygvrGv#KF*Mt{6H^v1Ve=hQyF2^E~bd#&iZg;(%dS^nM;oGSF1Y^&rY}Ian zFrp%SBGPyN{Z?t%Mo#!qgLQ2)k{>KAv?=zezKN*qPRf>^4QjcWgyxiC}7Vb6vGrBLR(1J&B%*gb{`!Jljb^2%jB$ zFBNUHANC6Q?0~M}cVtgk_;_DAB-BE?2dP z(C9OIXza3Ao-@UyqX%`5cjg#cHl!uHq;&?~JO{eE+A2KSSD)s8v&CiV$kV$A=DG@i z;6JY7z*8oPdj@bbJQoTAENW#ls(ucbGA#yhN>zbWqBTbLl>rGqOAY+` z=psSt8VQE=9+X8^$l@oeDzRvja79ry3nvLcOR7+)bIFyJVoz4}URM-47_u>V zY*^e(o`?|l++*Y0uQ#&dKapW1o?J{jx+*_gKV^cW+W87KI7hZ5viXv$$=1IR^Z~yA XWBrHU7iSEP8X8hQyAJO{V6g1pwSv80 diff --git a/public/images/shadow.gif b/public/images/shadow.gif deleted file mode 100644 index e58b35b362ce5347bb5064e91a3bf8e4fed4f6ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 49 xcmZ?wbhEHbWMp7un8*ME|NsAg`t&J~RQ$=p$iTqNpaT*G$ulr9g)lN$0|0$Q49Nfh 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; -} -