spree 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of spree might be problematic. Click here for more details.
- data/CHANGELOG +457 -425
- data/{README.markdown → README.md} +4 -0
- data/Rakefile +2 -2
- data/app/controllers/admin/adjustments_controller.rb +8 -9
- data/app/controllers/admin/checkouts_controller.rb +10 -2
- data/app/controllers/admin/line_items_controller.rb +0 -1
- data/app/controllers/admin/payments_controller.rb +8 -7
- data/app/controllers/admin/shipments_controller.rb +1 -1
- data/app/controllers/checkouts_controller.rb +16 -5
- data/app/controllers/spree/base_controller.rb +2 -2
- data/app/helpers/admin/navigation_helper.rb +1 -1
- data/app/helpers/checkouts_helper.rb +1 -1
- data/app/helpers/products_helper.rb +1 -1
- data/app/helpers/taxons_helper.rb +1 -1
- data/app/models/address.rb +9 -0
- data/app/models/checkout.rb +13 -7
- data/app/models/creditcard.rb +2 -2
- data/app/models/model_cache_cleaner.rb +13 -0
- data/app/models/order.rb +6 -8
- data/app/models/payment.rb +18 -17
- data/app/models/payment_method.rb +2 -2
- data/app/models/product.rb +1 -2
- data/app/models/return_authorization.rb +3 -1
- data/app/models/shipping_method.rb +16 -6
- data/app/models/zone.rb +34 -3
- data/config/database.yml +4 -21
- data/config/environment.rb +6 -6
- data/config/environments/test.rb +1 -0
- data/config/locales/en_spree.yml +10 -9
- data/db/migrate/20100624110730_add_display_to_shipping_methods.rb +9 -0
- data/db/migrate/20100624123336_rename_payment_method_display.rb +9 -0
- data/db/sample/orders.yml +3 -3
- data/db/sample/payments.rb +6 -5
- data/db/sample/products.rb +2 -2
- data/db/schema.rb +9 -27
- data/lib/easy_role_requirement_system.rb +1 -1
- data/lib/generators/extension/extension_generator.rb +7 -22
- data/lib/generators/extension/templates/functional_test.rb +1 -1
- data/lib/generators/extension/templates/tasks.rake +2 -2
- data/lib/generators/extension_controller/extension_controller_generator.rb +1 -1
- data/lib/generators/extension_model/extension_model_generator.rb +1 -1
- data/lib/generators/instance/instance_generator.rb +24 -24
- data/lib/generators/instance/templates/instance_generate +1 -1
- data/lib/generators/theme/theme_generator.rb +6 -10
- data/lib/plugins/extension_patches/lib/asset_copy.rb +2 -2
- data/lib/spree.rb +1 -1
- data/lib/spree/initializer.rb +15 -15
- data/lib/spree/search.rb +1 -1
- data/lib/tasks/cucumber.rake +1 -1
- data/lib/tasks/extensions.rake +6 -6
- data/lib/tasks/framework.rake +1 -1
- data/lib/tasks/instance.rake +6 -6
- data/lib/validation_group.rb +16 -16
- data/script/extension +2 -2
- data/test/functional/products_controller_test.rb +13 -0
- data/test/test_helper.rb +1 -1
- data/test/unit/checkout_test.rb +18 -9
- data/vendor/extensions/README +1 -1
- data/vendor/extensions/api/Rakefile +2 -2
- data/vendor/extensions/api/lib/tasks/api_extension_tasks.rake +2 -2
- data/vendor/extensions/overview_dashboard/Rakefile +2 -2
- data/vendor/extensions/overview_dashboard/app/views/admin/overview/index.html.erb +5 -5
- data/vendor/extensions/overview_dashboard/lib/tasks/overview_dashboard_extension_tasks.rake +2 -2
- data/vendor/extensions/payment_gateway/Rakefile +2 -2
- data/vendor/extensions/payment_gateway/app/models/gateway/authorize_net_cim.rb +6 -2
- data/vendor/extensions/payment_gateway/app/models/gateway/braintree.rb +88 -0
- data/vendor/extensions/payment_gateway/config/locales/en.yml +2 -1
- data/vendor/extensions/payment_gateway/lib/active_merchant/billing/authorize_net_cim.rb +4 -2
- data/vendor/extensions/payment_gateway/lib/spree/payment_gateway.rb +1 -1
- data/vendor/extensions/payment_gateway/lib/tasks/payment_gateway_extension_tasks.rake +2 -2
- data/vendor/extensions/payment_gateway/payment_gateway_extension.rb +1 -0
- data/vendor/extensions/payment_gateway/test/unit/authorize_net_cim_test.rb +2 -1
- data/vendor/extensions/payment_gateway/test/unit/braintree_test.rb +200 -0
- data/vendor/extensions/theme_default/Rakefile +2 -2
- data/vendor/extensions/theme_default/app/stylesheets/_buttons.less +7 -2
- data/vendor/extensions/theme_default/app/stylesheets/_colors.less +1 -1
- data/vendor/extensions/theme_default/app/stylesheets/_layout.less +7 -2
- data/vendor/extensions/theme_default/app/views/admin/payment_methods/_form.html.erb +3 -4
- data/vendor/extensions/theme_default/app/views/admin/payment_methods/index.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/shared/_additional_field.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/shared/_calculator_fields.html.erb +6 -6
- data/vendor/extensions/theme_default/app/views/admin/shared/_configuration_menu.html.erb +13 -13
- data/vendor/extensions/theme_default/app/views/admin/shared/_product_tabs.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/admin/shipping_methods/_form.html.erb +6 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_methods/index.html.erb +2 -0
- data/vendor/extensions/theme_default/app/views/checkouts/_address.html.erb +7 -9
- data/vendor/extensions/theme_default/app/views/checkouts/_payment.html.erb +4 -4
- data/vendor/extensions/theme_default/app/views/checkouts/_summary.html.erb +4 -4
- data/vendor/extensions/theme_default/app/views/layouts/admin.html.erb +36 -35
- data/vendor/extensions/theme_default/app/views/products/_thumbnails.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/shared/_head.html.erb +2 -2
- data/vendor/extensions/theme_default/app/views/shared/_products.html.erb +1 -1
- data/vendor/extensions/theme_default/app/views/states/index.js.erb +1 -1
- data/vendor/extensions/theme_default/lib/tasks/theme_default_extension_tasks.rake +2 -2
- data/vendor/extensions/theme_default/public/favicon.ico +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/header.png +0 -0
- data/vendor/extensions/theme_default/public/javascripts/calculator.js +3 -1
- data/vendor/extensions/theme_default/public/javascripts/checkout.js +44 -18
- data/vendor/extensions/theme_default/public/stylesheets/admin/admin.css +29 -24
- data/vendor/extensions/theme_default/public/stylesheets/screen.css +9 -7
- data/vendor/plugins/attribute_fu/init.rb +2 -2
- data/vendor/plugins/delegate_belongs_to/spec/spec_helper.rb +1 -1
- data/vendor/plugins/jrails/install.rb +1 -1
- data/vendor/plugins/jrails/lib/tasks/jrails.rake +2 -2
- data/vendor/plugins/jrails_auto_complete/install.rb +1 -1
- data/vendor/plugins/jrails_auto_complete/uninstall.rb +1 -1
- data/vendor/plugins/open_id_authentication/lib/open_id_authentication.rb +1 -1
- metadata +59 -659
- data/lib/generators/extension/templates/RSpecRakefile +0 -137
- data/lib/generators/extension/templates/spec.opts +0 -6
- data/lib/generators/extension/templates/spec_helper.rb +0 -37
- data/lib/generators/extension_controller/templates/controller_spec.rb +0 -23
- data/lib/generators/extension_controller/templates/helper_spec.rb +0 -11
- data/lib/generators/extension_controller/templates/view_spec.rb +0 -12
- data/lib/generators/extension_model/templates/model_spec.rb +0 -11
- data/lib/tasks/rspec.rake +0 -182
- data/public/images/add-to-cart.png +0 -0
- data/public/images/admin/bg/active-tab.png +0 -0
- data/public/images/admin/bg/admin_tab_back.png +0 -0
- data/public/images/admin/bg/admin_tab_selected_back.png +0 -0
- data/public/images/admin/bg/content-back-blue.png +0 -0
- data/public/images/admin/bg/content-back-green.png +0 -0
- data/public/images/admin/bg/content-back.png +0 -0
- data/public/images/admin/bg/flash-error.png +0 -0
- data/public/images/admin/bg/flash-notice.png +0 -0
- data/public/images/admin/bg/green-stripes.gif +0 -0
- data/public/images/admin/bg/green-stripes.png +0 -0
- data/public/images/admin/bg/grid_header_back.png +0 -0
- data/public/images/admin/bg/grid_header_back_green.png +0 -0
- data/public/images/admin/bg/header-bg.png +0 -0
- data/public/images/admin/bg/header_bg.jpg +0 -0
- data/public/images/admin/bg/menu-current.png +0 -0
- data/public/images/admin/bg/red-stripes.gif +0 -0
- data/public/images/admin/bg/red-stripes.png +0 -0
- data/public/images/admin/bg/spree_50.png +0 -0
- data/public/images/admin/bg/subnav-divider.png +0 -0
- data/public/images/admin/bg/subnav.png +0 -0
- data/public/images/admin/bg/tab-back.png +0 -0
- data/public/images/admin/buttons/blue/left_01.png +0 -0
- data/public/images/admin/buttons/blue/right_01.png +0 -0
- data/public/images/admin/buttons/drag-handle-green.png +0 -0
- data/public/images/admin/buttons/green/left_01.png +0 -0
- data/public/images/admin/buttons/green/right_01.png +0 -0
- data/public/images/admin/buttons/left_01.png +0 -0
- data/public/images/admin/buttons/left_01_small.png +0 -0
- data/public/images/admin/buttons/orange/left_03.png +0 -0
- data/public/images/admin/buttons/orange/right_03.png +0 -0
- data/public/images/admin/buttons/right_01.png +0 -0
- data/public/images/admin/buttons/right_01_small.png +0 -0
- data/public/images/admin/icons/16x16/1.png +0 -0
- data/public/images/admin/icons/16x16/10.png +0 -0
- data/public/images/admin/icons/16x16/2.png +0 -0
- data/public/images/admin/icons/16x16/3.png +0 -0
- data/public/images/admin/icons/16x16/4.png +0 -0
- data/public/images/admin/icons/16x16/5.png +0 -0
- data/public/images/admin/icons/16x16/6.png +0 -0
- data/public/images/admin/icons/16x16/7.png +0 -0
- data/public/images/admin/icons/16x16/8.png +0 -0
- data/public/images/admin/icons/16x16/9.png +0 -0
- data/public/images/admin/icons/32x32/1.png +0 -0
- data/public/images/admin/icons/32x32/10.png +0 -0
- data/public/images/admin/icons/32x32/11.png +0 -0
- data/public/images/admin/icons/32x32/2.png +0 -0
- data/public/images/admin/icons/32x32/3.png +0 -0
- data/public/images/admin/icons/32x32/4.png +0 -0
- data/public/images/admin/icons/32x32/5.png +0 -0
- data/public/images/admin/icons/32x32/6.png +0 -0
- data/public/images/admin/icons/32x32/7.png +0 -0
- data/public/images/admin/icons/32x32/8.png +0 -0
- data/public/images/admin/icons/32x32/9.png +0 -0
- data/public/images/admin/icons/accept.png +0 -0
- data/public/images/admin/icons/add.gif +0 -0
- data/public/images/admin/icons/add.png +0 -0
- data/public/images/admin/icons/arrow-down.gif +0 -0
- data/public/images/admin/icons/cross.png +0 -0
- data/public/images/admin/icons/delete.gif +0 -0
- data/public/images/admin/icons/delete.png +0 -0
- data/public/images/admin/icons/drag.gif +0 -0
- data/public/images/admin/icons/edit.gif +0 -0
- data/public/images/admin/icons/edit.png +0 -0
- data/public/images/admin/icons/email.png +0 -0
- data/public/images/admin/icons/error.png +0 -0
- data/public/images/admin/icons/exclamation.png +0 -0
- data/public/images/admin/icons/feed.png +0 -0
- data/public/images/admin/icons/pdf.png +0 -0
- data/public/images/admin/icons/reorder.gif +0 -0
- data/public/images/admin/icons/search.gif +0 -0
- data/public/images/admin/icons/send-email.png +0 -0
- data/public/images/admin/icons/stop.png +0 -0
- data/public/images/admin/icons/tick.png +0 -0
- data/public/images/admin/icons/up.gif +0 -0
- data/public/images/admin/icons/xls.png +0 -0
- data/public/images/admin/tabs/off-left.png +0 -0
- data/public/images/admin/tabs/off-right.png +0 -0
- data/public/images/admin/tabs/on-left.png +0 -0
- data/public/images/admin/tabs/on-right.png +0 -0
- data/public/images/ajax_loader.gif +0 -0
- data/public/images/amex_cid.gif +0 -0
- data/public/images/bg-button-hover.png +0 -0
- data/public/images/bg-button-pressed.png +0 -0
- data/public/images/bg-button.gif +0 -0
- data/public/images/bg-button.png +0 -0
- data/public/images/blue/left_01.png +0 -0
- data/public/images/blue/right_01.png +0 -0
- data/public/images/body-back.png +0 -0
- data/public/images/bottom_shine.png +0 -0
- data/public/images/breadcrumb.gif +0 -0
- data/public/images/button-dark-hover.png +0 -0
- data/public/images/button-dark.png +0 -0
- data/public/images/buttons/bg-button-hover.png +0 -0
- data/public/images/buttons/bg-button-pressed.png +0 -0
- data/public/images/buttons/bg-button.gif +0 -0
- data/public/images/buttons/bg-button.png +0 -0
- data/public/images/buttons/blue/left_01.png +0 -0
- data/public/images/buttons/blue/right_01.png +0 -0
- data/public/images/buttons/button-dark-hover.png +0 -0
- data/public/images/buttons/button-dark.png +0 -0
- data/public/images/buttons/drag-handle-green.png +0 -0
- data/public/images/buttons/green/left_01.png +0 -0
- data/public/images/buttons/green/right_01.png +0 -0
- data/public/images/buttons/left_01.png +0 -0
- data/public/images/buttons/left_01_small.png +0 -0
- data/public/images/buttons/orange/left_03.png +0 -0
- data/public/images/buttons/orange/right_03.png +0 -0
- data/public/images/buttons/right_01.png +0 -0
- data/public/images/buttons/right_01_small.png +0 -0
- data/public/images/buttons/sxsw-ribbon-v1.png +0 -0
- data/public/images/buttons/top-shine.png +0 -0
- data/public/images/calendar_date_select/calendar.gif +0 -0
- data/public/images/cart-empty.png +0 -0
- data/public/images/cart-empty_x32.png +0 -0
- data/public/images/cart-full.png +0 -0
- data/public/images/cart-full_x32.png +0 -0
- data/public/images/checkout.png +0 -0
- data/public/images/creditcard.gif +0 -0
- data/public/images/datepicker/backstripes.gif +0 -0
- data/public/images/datepicker/bg_header.jpg +0 -0
- data/public/images/datepicker/bullet1.gif +0 -0
- data/public/images/datepicker/bullet2.gif +0 -0
- data/public/images/datepicker/cal.gif +0 -0
- data/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
- data/public/images/discover_cid.gif +0 -0
- data/public/images/drag-handle-green.png +0 -0
- data/public/images/flags/ad.png +0 -0
- data/public/images/flags/ae.png +0 -0
- data/public/images/flags/af.png +0 -0
- data/public/images/flags/ag.png +0 -0
- data/public/images/flags/ai.png +0 -0
- data/public/images/flags/al.png +0 -0
- data/public/images/flags/am.png +0 -0
- data/public/images/flags/an.png +0 -0
- data/public/images/flags/ao.png +0 -0
- data/public/images/flags/ar.png +0 -0
- data/public/images/flags/as.png +0 -0
- data/public/images/flags/at.png +0 -0
- data/public/images/flags/au.png +0 -0
- data/public/images/flags/aw.png +0 -0
- data/public/images/flags/ax.png +0 -0
- data/public/images/flags/az.png +0 -0
- data/public/images/flags/ba.png +0 -0
- data/public/images/flags/bb.png +0 -0
- data/public/images/flags/bd.png +0 -0
- data/public/images/flags/be.png +0 -0
- data/public/images/flags/bf.png +0 -0
- data/public/images/flags/bg.png +0 -0
- data/public/images/flags/bh.png +0 -0
- data/public/images/flags/bi.png +0 -0
- data/public/images/flags/bj.png +0 -0
- data/public/images/flags/bm.png +0 -0
- data/public/images/flags/bn.png +0 -0
- data/public/images/flags/bo.png +0 -0
- data/public/images/flags/br.png +0 -0
- data/public/images/flags/bs.png +0 -0
- data/public/images/flags/bt.png +0 -0
- data/public/images/flags/bv.png +0 -0
- data/public/images/flags/bw.png +0 -0
- data/public/images/flags/by.png +0 -0
- data/public/images/flags/bz.png +0 -0
- data/public/images/flags/ca.png +0 -0
- data/public/images/flags/catalonia.png +0 -0
- data/public/images/flags/cc.png +0 -0
- data/public/images/flags/cd.png +0 -0
- data/public/images/flags/cf.png +0 -0
- data/public/images/flags/cg.png +0 -0
- data/public/images/flags/ch.png +0 -0
- data/public/images/flags/ci.png +0 -0
- data/public/images/flags/ck.png +0 -0
- data/public/images/flags/cl.png +0 -0
- data/public/images/flags/cm.png +0 -0
- data/public/images/flags/cn.png +0 -0
- data/public/images/flags/co.png +0 -0
- data/public/images/flags/cr.png +0 -0
- data/public/images/flags/cs.png +0 -0
- data/public/images/flags/cu.png +0 -0
- data/public/images/flags/cv.png +0 -0
- data/public/images/flags/cx.png +0 -0
- data/public/images/flags/cy.png +0 -0
- data/public/images/flags/cz.png +0 -0
- data/public/images/flags/da.png +0 -0
- data/public/images/flags/de.png +0 -0
- data/public/images/flags/de_CH.png +0 -0
- data/public/images/flags/dj.png +0 -0
- data/public/images/flags/dm.png +0 -0
- data/public/images/flags/do.png +0 -0
- data/public/images/flags/dz.png +0 -0
- data/public/images/flags/ec.png +0 -0
- data/public/images/flags/ee.png +0 -0
- data/public/images/flags/eg.png +0 -0
- data/public/images/flags/eh.png +0 -0
- data/public/images/flags/england.png +0 -0
- data/public/images/flags/er.png +0 -0
- data/public/images/flags/es.png +0 -0
- data/public/images/flags/et.png +0 -0
- data/public/images/flags/europeanunion.png +0 -0
- data/public/images/flags/fam.png +0 -0
- data/public/images/flags/fi.png +0 -0
- data/public/images/flags/fj.png +0 -0
- data/public/images/flags/fk.png +0 -0
- data/public/images/flags/fm.png +0 -0
- data/public/images/flags/fo.png +0 -0
- data/public/images/flags/fr.png +0 -0
- data/public/images/flags/ga.png +0 -0
- data/public/images/flags/gb.png +0 -0
- data/public/images/flags/gd.png +0 -0
- data/public/images/flags/ge.png +0 -0
- data/public/images/flags/gf.png +0 -0
- data/public/images/flags/gh.png +0 -0
- data/public/images/flags/gi.png +0 -0
- data/public/images/flags/gl.png +0 -0
- data/public/images/flags/gm.png +0 -0
- data/public/images/flags/gn.png +0 -0
- data/public/images/flags/gp.png +0 -0
- data/public/images/flags/gq.png +0 -0
- data/public/images/flags/gr.png +0 -0
- data/public/images/flags/gs.png +0 -0
- data/public/images/flags/gt.png +0 -0
- data/public/images/flags/gu.png +0 -0
- data/public/images/flags/gw.png +0 -0
- data/public/images/flags/gy.png +0 -0
- data/public/images/flags/hk.png +0 -0
- data/public/images/flags/hm.png +0 -0
- data/public/images/flags/hn.png +0 -0
- data/public/images/flags/hr.png +0 -0
- data/public/images/flags/ht.png +0 -0
- data/public/images/flags/hu.png +0 -0
- data/public/images/flags/id.png +0 -0
- data/public/images/flags/ie.png +0 -0
- data/public/images/flags/il.png +0 -0
- data/public/images/flags/in.png +0 -0
- data/public/images/flags/io.png +0 -0
- data/public/images/flags/iq.png +0 -0
- data/public/images/flags/ir.png +0 -0
- data/public/images/flags/is.png +0 -0
- data/public/images/flags/it.png +0 -0
- data/public/images/flags/jm.png +0 -0
- data/public/images/flags/jo.png +0 -0
- data/public/images/flags/jp.png +0 -0
- data/public/images/flags/ke.png +0 -0
- data/public/images/flags/kg.png +0 -0
- data/public/images/flags/kh.png +0 -0
- data/public/images/flags/ki.png +0 -0
- data/public/images/flags/km.png +0 -0
- data/public/images/flags/kn.png +0 -0
- data/public/images/flags/kp.png +0 -0
- data/public/images/flags/kr.png +0 -0
- data/public/images/flags/kw.png +0 -0
- data/public/images/flags/ky.png +0 -0
- data/public/images/flags/kz.png +0 -0
- data/public/images/flags/la.png +0 -0
- data/public/images/flags/lb.png +0 -0
- data/public/images/flags/lc.png +0 -0
- data/public/images/flags/li.png +0 -0
- data/public/images/flags/lk.png +0 -0
- data/public/images/flags/lr.png +0 -0
- data/public/images/flags/ls.png +0 -0
- data/public/images/flags/lt.png +0 -0
- data/public/images/flags/lu.png +0 -0
- data/public/images/flags/lv.png +0 -0
- data/public/images/flags/ly.png +0 -0
- data/public/images/flags/ma.png +0 -0
- data/public/images/flags/mc.png +0 -0
- data/public/images/flags/md.png +0 -0
- data/public/images/flags/me.png +0 -0
- data/public/images/flags/mg.png +0 -0
- data/public/images/flags/mh.png +0 -0
- data/public/images/flags/mk.png +0 -0
- data/public/images/flags/ml.png +0 -0
- data/public/images/flags/mm.png +0 -0
- data/public/images/flags/mn.png +0 -0
- data/public/images/flags/mo.png +0 -0
- data/public/images/flags/mp.png +0 -0
- data/public/images/flags/mq.png +0 -0
- data/public/images/flags/mr.png +0 -0
- data/public/images/flags/ms.png +0 -0
- data/public/images/flags/mt.png +0 -0
- data/public/images/flags/mu.png +0 -0
- data/public/images/flags/mv.png +0 -0
- data/public/images/flags/mw.png +0 -0
- data/public/images/flags/mx.png +0 -0
- data/public/images/flags/my.png +0 -0
- data/public/images/flags/mz.png +0 -0
- data/public/images/flags/na.png +0 -0
- data/public/images/flags/nc.png +0 -0
- data/public/images/flags/ne.png +0 -0
- data/public/images/flags/nf.png +0 -0
- data/public/images/flags/ng.png +0 -0
- data/public/images/flags/ni.png +0 -0
- data/public/images/flags/nl.png +0 -0
- data/public/images/flags/no.png +0 -0
- data/public/images/flags/np.png +0 -0
- data/public/images/flags/nr.png +0 -0
- data/public/images/flags/nu.png +0 -0
- data/public/images/flags/nz.png +0 -0
- data/public/images/flags/om.png +0 -0
- data/public/images/flags/pa.png +0 -0
- data/public/images/flags/pe.png +0 -0
- data/public/images/flags/pf.png +0 -0
- data/public/images/flags/pg.png +0 -0
- data/public/images/flags/ph.png +0 -0
- data/public/images/flags/pk.png +0 -0
- data/public/images/flags/pl.png +0 -0
- data/public/images/flags/pm.png +0 -0
- data/public/images/flags/pn.png +0 -0
- data/public/images/flags/pr.png +0 -0
- data/public/images/flags/ps.png +0 -0
- data/public/images/flags/pt.png +0 -0
- data/public/images/flags/pw.png +0 -0
- data/public/images/flags/py.png +0 -0
- data/public/images/flags/qa.png +0 -0
- data/public/images/flags/re.png +0 -0
- data/public/images/flags/ro.png +0 -0
- data/public/images/flags/rs.png +0 -0
- data/public/images/flags/ru.png +0 -0
- data/public/images/flags/rw.png +0 -0
- data/public/images/flags/sa.png +0 -0
- data/public/images/flags/sb.png +0 -0
- data/public/images/flags/sc.png +0 -0
- data/public/images/flags/scotland.png +0 -0
- data/public/images/flags/sd.png +0 -0
- data/public/images/flags/se.png +0 -0
- data/public/images/flags/sg.png +0 -0
- data/public/images/flags/sh.png +0 -0
- data/public/images/flags/si.png +0 -0
- data/public/images/flags/sj.png +0 -0
- data/public/images/flags/sk.png +0 -0
- data/public/images/flags/sl.png +0 -0
- data/public/images/flags/sm.png +0 -0
- data/public/images/flags/sn.png +0 -0
- data/public/images/flags/so.png +0 -0
- data/public/images/flags/sr.png +0 -0
- data/public/images/flags/st.png +0 -0
- data/public/images/flags/sv.png +0 -0
- data/public/images/flags/sy.png +0 -0
- data/public/images/flags/sz.png +0 -0
- data/public/images/flags/tc.png +0 -0
- data/public/images/flags/td.png +0 -0
- data/public/images/flags/tf.png +0 -0
- data/public/images/flags/tg.png +0 -0
- data/public/images/flags/th.png +0 -0
- data/public/images/flags/tj.png +0 -0
- data/public/images/flags/tk.png +0 -0
- data/public/images/flags/tl.png +0 -0
- data/public/images/flags/tm.png +0 -0
- data/public/images/flags/tn.png +0 -0
- data/public/images/flags/to.png +0 -0
- data/public/images/flags/tr.png +0 -0
- data/public/images/flags/tt.png +0 -0
- data/public/images/flags/tv.png +0 -0
- data/public/images/flags/tw.png +0 -0
- data/public/images/flags/tz.png +0 -0
- data/public/images/flags/ua.png +0 -0
- data/public/images/flags/ug.png +0 -0
- data/public/images/flags/um.png +0 -0
- data/public/images/flags/us.png +0 -0
- data/public/images/flags/uy.png +0 -0
- data/public/images/flags/uz.png +0 -0
- data/public/images/flags/va.png +0 -0
- data/public/images/flags/vc.png +0 -0
- data/public/images/flags/ve.png +0 -0
- data/public/images/flags/vg.png +0 -0
- data/public/images/flags/vi.png +0 -0
- data/public/images/flags/vn.png +0 -0
- data/public/images/flags/vu.png +0 -0
- data/public/images/flags/wales.png +0 -0
- data/public/images/flags/wf.png +0 -0
- data/public/images/flags/ws.png +0 -0
- data/public/images/flags/ye.png +0 -0
- data/public/images/flags/yt.png +0 -0
- data/public/images/flags/za.png +0 -0
- data/public/images/flags/zm.png +0 -0
- data/public/images/flags/zw.png +0 -0
- data/public/images/green/left_01.png +0 -0
- data/public/images/green/right_01.png +0 -0
- data/public/images/grid.png +0 -0
- data/public/images/left_01.png +0 -0
- data/public/images/left_01_small.png +0 -0
- data/public/images/master_cid.jpg +0 -0
- data/public/images/menu-current.png +0 -0
- data/public/images/menu-hover.png +0 -0
- data/public/images/noimage/mini.jpg +0 -0
- data/public/images/noimage/product.jpg +0 -0
- data/public/images/noimage/small.jpg +0 -0
- data/public/images/openid-inputicon.gif +0 -0
- data/public/images/orange/left_03.png +0 -0
- data/public/images/orange/right_03.png +0 -0
- data/public/images/progress.gif +0 -0
- data/public/images/rails.png +0 -0
- data/public/images/right_01.png +0 -0
- data/public/images/right_01_small.png +0 -0
- data/public/images/separator.png +0 -0
- data/public/images/shadow-top.png +0 -0
- data/public/images/shadow_top.png +0 -0
- data/public/images/spinner.gif +0 -0
- data/public/images/spree.jpg +0 -0
- data/public/images/spree/progress.gif +0 -0
- data/public/images/spree/spinner.gif +0 -0
- data/public/images/spree/spree.jpg +0 -0
- data/public/images/step-progress/completed-completed.gif +0 -0
- data/public/images/step-progress/completed-current.gif +0 -0
- data/public/images/step-progress/completed-first.gif +0 -0
- data/public/images/step-progress/current-first.gif +0 -0
- data/public/images/step-progress/current-incomplete.gif +0 -0
- data/public/images/step-progress/current-right.gif +0 -0
- data/public/images/step-progress/incomplete-incomplete.gif +0 -0
- data/public/images/step-progress/incomplete-right.gif +0 -0
- data/public/images/steps/1.png +0 -0
- data/public/images/steps/1_small.png +0 -0
- data/public/images/steps/2.png +0 -0
- data/public/images/steps/2_small.png +0 -0
- data/public/images/steps/3.png +0 -0
- data/public/images/steps/3_small.png +0 -0
- data/public/images/steps/4.png +0 -0
- data/public/images/steps/4_small.png +0 -0
- data/public/images/steps/5.png +0 -0
- data/public/images/steps/5_small.png +0 -0
- data/public/images/steps/6.png +0 -0
- data/public/images/steps/6_small.png +0 -0
- data/public/images/sxsw-ribbon-v1.png +0 -0
- data/public/images/tab_bottom.gif +0 -0
- data/public/images/tile-header.png +0 -0
- data/public/images/tile-slider.png +0 -0
- data/public/images/top-shine.png +0 -0
- data/public/images/tree-nav-icons/bullet.gif +0 -0
- data/public/images/tree-nav-icons/minus.gif +0 -0
- data/public/images/tree-nav-icons/plus.gif +0 -0
- data/public/images/tree-nav-icons/treeview-loading.gif +0 -0
- data/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
- data/public/images/update.png +0 -0
- data/public/images/visa_cid.gif +0 -0
- data/public/images/wrapper-back-2.png +0 -0
- data/public/images/wrapper-back.png +0 -0
- data/public/images/yui-menubaritem_submenuindicator.png +0 -0
- data/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
- data/public/images/yui-menuitem_checkbox.png +0 -0
- data/public/images/yui-menuitem_checkbox_disabled.png +0 -0
- data/public/images/yui-menuitem_submenuindicator.png +0 -0
- data/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
- data/public/images/yui-sprite.png +0 -0
- data/public/javascripts/additional-methods.js +0 -236
- data/public/javascripts/admin/address_states.js +0 -25
- data/public/javascripts/admin/checkouts/edit.js +0 -129
- data/public/javascripts/admin/orders/edit.js +0 -96
- data/public/javascripts/admin/orders/edit_form.js +0 -17
- data/public/javascripts/admin/payments/new.js +0 -9
- data/public/javascripts/admin/unobtrusive_handlers.js +0 -15
- data/public/javascripts/calculator.js +0 -13
- data/public/javascripts/checkout.js +0 -65
- data/public/javascripts/dashboard.js +0 -143
- data/public/javascripts/datepicker.js +0 -1445
- data/public/javascripts/gateway.js +0 -13
- data/public/javascripts/jqPlot/excanvas.min.js +0 -1
- data/public/javascripts/jqPlot/jquery.jqplot.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.canvasAxisTickRenderer.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.canvasTextRenderer.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.dateAxisRenderer.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.highlighter.min.js +0 -14
- data/public/javascripts/jqPlot/plugins/jqplot.pieRenderer.min.js +0 -14
- data/public/javascripts/jquery-1.3.2.min.js +0 -19
- data/public/javascripts/jquery-and-plugins.js +0 -36
- data/public/javascripts/jquery-ui.js +0 -188
- data/public/javascripts/jquery.alerts/images/help.gif +0 -0
- data/public/javascripts/jquery.alerts/images/important.gif +0 -0
- data/public/javascripts/jquery.alerts/images/info.gif +0 -0
- data/public/javascripts/jquery.alerts/images/title.gif +0 -0
- data/public/javascripts/jquery.alerts/jquery.alerts.css +0 -57
- data/public/javascripts/jquery.alerts/jquery.alerts.js +0 -235
- data/public/javascripts/jquery.alerts/jquery.alerts.spree.css +0 -30
- data/public/javascripts/jquery.autocomplete.min.js +0 -13
- data/public/javascripts/jquery.js +0 -19
- data/public/javascripts/jquery.suggest.js +0 -276
- data/public/javascripts/jquery.template.js +0 -255
- data/public/javascripts/jquery.validate.min.js +0 -16
- data/public/javascripts/jrails.autocomplete.js +0 -274
- data/public/javascripts/jrails.js +0 -1
- data/public/javascripts/jsTree/jquery.tree.js +0 -2058
- data/public/javascripts/jsTree/plugins/jquery.tree.contextmenu.js +0 -129
- data/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
- data/public/javascripts/jsTree/themes/apple/dot_for_ie.gif +0 -0
- data/public/javascripts/jsTree/themes/apple/icons.png +0 -0
- data/public/javascripts/jsTree/themes/apple/style.css +0 -34
- data/public/javascripts/jsTree/themes/apple/throbber.gif +0 -0
- data/public/javascripts/lang/af.js +0 -40
- data/public/javascripts/lang/ar.js +0 -50
- data/public/javascripts/lang/de.js +0 -40
- data/public/javascripts/lang/du.js +0 -40
- data/public/javascripts/lang/en.js +0 -42
- data/public/javascripts/lang/es.js +0 -41
- data/public/javascripts/lang/fi.js +0 -40
- data/public/javascripts/lang/fr.js +0 -44
- data/public/javascripts/lang/gr.js +0 -40
- data/public/javascripts/lang/he.js +0 -49
- data/public/javascripts/lang/it.js +0 -13
- data/public/javascripts/lang/nl.js +0 -40
- data/public/javascripts/lang/no.js +0 -40
- data/public/javascripts/lang/pt.js +0 -50
- data/public/javascripts/lang/ro.js +0 -40
- data/public/javascripts/lang/ru.js +0 -40
- data/public/javascripts/lang/sp.js +0 -40
- data/public/javascripts/lang/sv.js +0 -41
- data/public/javascripts/lang/ua.js +0 -40
- data/public/javascripts/localization/messages_cn.js +0 -24
- data/public/javascripts/localization/messages_cs.js +0 -23
- data/public/javascripts/localization/messages_da.js +0 -21
- data/public/javascripts/localization/messages_de.js +0 -21
- data/public/javascripts/localization/messages_es.js +0 -24
- data/public/javascripts/localization/messages_fr.js +0 -23
- data/public/javascripts/localization/messages_hu.js +0 -21
- data/public/javascripts/localization/messages_it.js +0 -26
- data/public/javascripts/localization/messages_kk.js +0 -23
- data/public/javascripts/localization/messages_nl.js +0 -23
- data/public/javascripts/localization/messages_no.js +0 -23
- data/public/javascripts/localization/messages_pl.js +0 -23
- data/public/javascripts/localization/messages_ptbr.js +0 -30
- data/public/javascripts/localization/messages_ro.js +0 -24
- data/public/javascripts/localization/messages_ru.js +0 -23
- data/public/javascripts/localization/messages_se.js +0 -23
- data/public/javascripts/localization/messages_sk.js +0 -21
- data/public/javascripts/localization/messages_tr.js +0 -24
- data/public/javascripts/localization/messages_tw.js +0 -24
- data/public/javascripts/localization/messages_ua.js +0 -24
- data/public/javascripts/nested-attribute.js +0 -25
- data/public/javascripts/open_id.js +0 -15
- data/public/javascripts/product.js +0 -49
- data/public/javascripts/spree.js +0 -53
- data/public/javascripts/taxonomy.js +0 -196
- data/public/javascripts/zone.js +0 -40
- data/public/stylesheets/admin/admin-forms.css +0 -159
- data/public/stylesheets/admin/admin-reset.css +0 -67
- data/public/stylesheets/admin/admin-tables.css +0 -39
- data/public/stylesheets/admin/admin-typography.css +0 -117
- data/public/stylesheets/admin/admin.css +0 -571
- data/public/stylesheets/admin/dashboard.css +0 -143
- data/public/stylesheets/admin/edit_checkouts.css +0 -57
- data/public/stylesheets/admin/edit_orders.css +0 -65
- data/public/stylesheets/admin/grids.css +0 -314
- data/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +0 -7
- data/public/stylesheets/admin/yui-includes.css +0 -14
- data/public/stylesheets/datepicker.css +0 -263
- data/public/stylesheets/jquery.autocomplete.css +0 -48
- data/public/stylesheets/scaffold.css +0 -54
- data/public/stylesheets/screen.css +0 -1194
- data/script/autospec +0 -5
- data/script/breakpointer +0 -3
- data/script/performance/request +0 -3
- data/script/spec +0 -5
- data/script/spec_server +0 -125
- data/spec/controllers/admin/configurations_controller_spec.rb +0 -9
- data/spec/controllers/admin/mail_settings_controller_spec.rb +0 -24
- data/spec/controllers/admin/shipping_categories_controller_spec.rb +0 -10
- data/spec/controllers/admin/shipping_methods_controller_spec.rb +0 -10
- data/spec/controllers/countries_controller_spec.rb +0 -24
- data/spec/controllers/orders_controller_spec.rb +0 -35
- data/spec/controllers/products_controller_spec.rb +0 -16
- data/spec/controllers/states_controller_spec.rb +0 -18
- data/spec/controllers/taxons_controller_spec.rb +0 -18
- data/spec/fixtures/app_configurations.yml +0 -7
- data/spec/fixtures/countries.yml +0 -3
- data/spec/fixtures/gateways.yml +0 -8
- data/spec/fixtures/preferences.yml +0 -15
- data/spec/fixtures/roles.yml +0 -2
- data/spec/fixtures/states.yml +0 -2
- data/spec/fixtures/tax_categories.yml +0 -4
- data/spec/fixtures/users.yml +0 -5
- data/spec/fixtures/zone_members.yml +0 -7
- data/spec/fixtures/zones.yml +0 -4
- data/spec/lib/easy_role_requirement_system_spec.rb +0 -140
- data/spec/models/address_spec.rb +0 -79
- data/spec/models/app_configuration_spec.rb +0 -13
- data/spec/models/creditcard_payment_spec.rb +0 -17
- data/spec/models/creditcard_spec.rb +0 -43
- data/spec/models/inventory_unit_spec.rb +0 -18
- data/spec/models/option_type_spec.rb +0 -36
- data/spec/models/option_value_spec.rb +0 -39
- data/spec/models/order_spec.rb +0 -207
- data/spec/models/payment_sepc.rb +0 -29
- data/spec/models/product_option_type_spec.rb +0 -38
- data/spec/models/product_property_spec.rb +0 -29
- data/spec/models/property_spec.rb +0 -37
- data/spec/models/prototype_spec.rb +0 -35
- data/spec/models/shipment_spec.rb +0 -8
- data/spec/models/shipping_category_spec.rb +0 -8
- data/spec/models/shipping_order_spec.rb +0 -113
- data/spec/models/tax_category_spec.rb +0 -11
- data/spec/models/taxon_spec.rb +0 -50
- data/spec/models/taxonomy_spec.rb +0 -37
- data/spec/models/zone_member_spec.rb +0 -5
- data/spec/models/zone_spec.rb +0 -137
- data/spec/rcov.opts +0 -2
- data/spec/spec.opts +0 -4
- data/spec/spec_helper.rb +0 -79
- data/vendor/extensions/overview_dashboard/spec/spec.opts +0 -6
- data/vendor/extensions/overview_dashboard/spec/spec_helper.rb +0 -37
- data/vendor/extensions/payment_gateway/spec/helpers/admin/gateways_helper_spec.rb +0 -6
- data/vendor/extensions/payment_gateway/spec/models/creditcard_spec.rb +0 -15
- data/vendor/extensions/payment_gateway/spec/models/gateway_spec.rb +0 -11
- data/vendor/extensions/payment_gateway/spec/models/order_spec.rb +0 -45
- data/vendor/extensions/payment_gateway/spec/spec.opts +0 -6
- data/vendor/extensions/payment_gateway/spec/spec_helper.rb +0 -37
- data/vendor/extensions/theme_default/spec/spec.opts +0 -6
- data/vendor/extensions/theme_default/spec/spec_helper.rb +0 -37
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/public/images/progress.gif
DELETED
Binary file
|
data/public/images/rails.png
DELETED
Binary file
|
data/public/images/right_01.png
DELETED
Binary file
|
Binary file
|
data/public/images/separator.png
DELETED
Binary file
|
Binary file
|
Binary file
|
data/public/images/spinner.gif
DELETED
Binary file
|
data/public/images/spree.jpg
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/public/images/steps/1.png
DELETED
Binary file
|
Binary file
|
data/public/images/steps/2.png
DELETED
Binary file
|
Binary file
|
data/public/images/steps/3.png
DELETED
Binary file
|
Binary file
|
data/public/images/steps/4.png
DELETED
Binary file
|
Binary file
|
data/public/images/steps/5.png
DELETED
Binary file
|
Binary file
|
data/public/images/steps/6.png
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/public/images/top-shine.png
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/public/images/update.png
DELETED
Binary file
|
data/public/images/visa_cid.gif
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,236 +0,0 @@
|
|
1
|
-
jQuery.validator.addMethod("maxWords", function(value, element, params) {
|
2
|
-
return this.optional(element) || value.match(/\b\w+\b/g).length < params;
|
3
|
-
}, jQuery.validator.format("Please enter {0} words or less."));
|
4
|
-
|
5
|
-
jQuery.validator.addMethod("minWords", function(value, element, params) {
|
6
|
-
return this.optional(element) || value.match(/\b\w+\b/g).length >= params;
|
7
|
-
}, jQuery.validator.format("Please enter at least {0} words."));
|
8
|
-
|
9
|
-
jQuery.validator.addMethod("rangeWords", function(value, element, params) {
|
10
|
-
return this.optional(element) || value.match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1];
|
11
|
-
}, jQuery.validator.format("Please enter between {0} and {1} words."));
|
12
|
-
|
13
|
-
|
14
|
-
jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) {
|
15
|
-
return this.optional(element) || /^[a-z-.,()'\"\s]+$/i.test(value);
|
16
|
-
}, "Letters or punctuation only please");
|
17
|
-
|
18
|
-
jQuery.validator.addMethod("alphanumeric", function(value, element) {
|
19
|
-
return this.optional(element) || /^\w+$/i.test(value);
|
20
|
-
}, "Letters, numbers, spaces or underscores only please");
|
21
|
-
|
22
|
-
jQuery.validator.addMethod("lettersonly", function(value, element) {
|
23
|
-
return this.optional(element) || /^[a-z]+$/i.test(value);
|
24
|
-
}, "Letters only please");
|
25
|
-
|
26
|
-
jQuery.validator.addMethod("nowhitespace", function(value, element) {
|
27
|
-
return this.optional(element) || /^\S+$/i.test(value);
|
28
|
-
}, "No white space please");
|
29
|
-
|
30
|
-
jQuery.validator.addMethod("ziprange", function(value, element) {
|
31
|
-
return this.optional(element) || /^90[2-5]\d\{2}-\d{4}$/.test(value);
|
32
|
-
}, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
|
33
|
-
|
34
|
-
/**
|
35
|
-
* Return true, if the value is a valid vehicle identification number (VIN).
|
36
|
-
*
|
37
|
-
* Works with all kind of text inputs.
|
38
|
-
*
|
39
|
-
* @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
|
40
|
-
* @desc Declares a required input element whose value must be a valid vehicle identification number.
|
41
|
-
*
|
42
|
-
* @name jQuery.validator.methods.vinUS
|
43
|
-
* @type Boolean
|
44
|
-
* @cat Plugins/Validate/Methods
|
45
|
-
*/
|
46
|
-
jQuery.validator.addMethod(
|
47
|
-
"vinUS",
|
48
|
-
function(v){
|
49
|
-
if (v.length != 17)
|
50
|
-
return false;
|
51
|
-
var i, n, d, f, cd, cdv;
|
52
|
-
var LL = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];
|
53
|
-
var VL = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];
|
54
|
-
var FL = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];
|
55
|
-
var rs = 0;
|
56
|
-
for(i = 0; i < 17; i++){
|
57
|
-
f = FL[i];
|
58
|
-
d = v.slice(i,i+1);
|
59
|
-
if(i == 8){
|
60
|
-
cdv = d;
|
61
|
-
}
|
62
|
-
if(!isNaN(d)){
|
63
|
-
d *= f;
|
64
|
-
}
|
65
|
-
else{
|
66
|
-
for(n = 0; n < LL.length; n++){
|
67
|
-
if(d.toUpperCase() === LL[n]){
|
68
|
-
d = VL[n];
|
69
|
-
d *= f;
|
70
|
-
if(isNaN(cdv) && n == 8){
|
71
|
-
cdv = LL[n];
|
72
|
-
}
|
73
|
-
break;
|
74
|
-
}
|
75
|
-
}
|
76
|
-
}
|
77
|
-
rs += d;
|
78
|
-
}
|
79
|
-
cd = rs % 11;
|
80
|
-
if(cd == 10){cd = "X";}
|
81
|
-
if(cd == cdv){return true;}
|
82
|
-
return false;
|
83
|
-
},
|
84
|
-
"The specified vehicle identification number (VIN) is invalid."
|
85
|
-
);
|
86
|
-
|
87
|
-
/**
|
88
|
-
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
|
89
|
-
*
|
90
|
-
* @example jQuery.validator.methods.date("01/01/1900")
|
91
|
-
* @result true
|
92
|
-
*
|
93
|
-
* @example jQuery.validator.methods.date("01/13/1990")
|
94
|
-
* @result false
|
95
|
-
*
|
96
|
-
* @example jQuery.validator.methods.date("01.01.1900")
|
97
|
-
* @result false
|
98
|
-
*
|
99
|
-
* @example <input name="pippo" class="{dateITA:true}" />
|
100
|
-
* @desc Declares an optional input element whose value must be a valid date.
|
101
|
-
*
|
102
|
-
* @name jQuery.validator.methods.dateITA
|
103
|
-
* @type Boolean
|
104
|
-
* @cat Plugins/Validate/Methods
|
105
|
-
*/
|
106
|
-
jQuery.validator.addMethod(
|
107
|
-
"dateITA",
|
108
|
-
function(value, element) {
|
109
|
-
var check = false;
|
110
|
-
var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/
|
111
|
-
if( re.test(value)){
|
112
|
-
var adata = value.split('/');
|
113
|
-
var gg = parseInt(adata[0],10);
|
114
|
-
var mm = parseInt(adata[1],10);
|
115
|
-
var aaaa = parseInt(adata[2],10);
|
116
|
-
var xdata = new Date(aaaa,mm-1,gg);
|
117
|
-
if ( ( xdata.getFullYear() == aaaa ) && ( xdata.getMonth () == mm - 1 ) && ( xdata.getDate() == gg ) )
|
118
|
-
check = true;
|
119
|
-
else
|
120
|
-
check = false;
|
121
|
-
} else
|
122
|
-
check = false;
|
123
|
-
return this.optional(element) || check;
|
124
|
-
},
|
125
|
-
"Please enter a correct date"
|
126
|
-
);
|
127
|
-
|
128
|
-
jQuery.validator.addMethod("dateNL", function(value, element) {
|
129
|
-
return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value);
|
130
|
-
}, "Vul hier een geldige datum in."
|
131
|
-
);
|
132
|
-
|
133
|
-
jQuery.validator.addMethod("time", function(value, element) {
|
134
|
-
return this.optional(element) || /^([01][0-9])|(2[0123]):([0-5])([0-9])$/.test(value);
|
135
|
-
}, "Please enter a valid time, between 00:00 and 23:59"
|
136
|
-
);
|
137
|
-
|
138
|
-
/**
|
139
|
-
* matches US phone number format
|
140
|
-
*
|
141
|
-
* where the area code may not start with 1 and the prefix may not start with 1
|
142
|
-
* allows '-' or ' ' as a separator and allows parens around area code
|
143
|
-
* some people may want to put a '1' in front of their number
|
144
|
-
*
|
145
|
-
* 1(212)-999-2345
|
146
|
-
* or
|
147
|
-
* 212 999 2344
|
148
|
-
* or
|
149
|
-
* 212-999-0983
|
150
|
-
*
|
151
|
-
* but not
|
152
|
-
* 111-123-5434
|
153
|
-
* and not
|
154
|
-
* 212 123 4567
|
155
|
-
*/
|
156
|
-
jQuery.validator.addMethod("phone", function(phone_number, element) {
|
157
|
-
phone_number = phone_number.replace(/\s+/g, "");
|
158
|
-
return this.optional(element) || phone_number.length > 9 &&
|
159
|
-
phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
|
160
|
-
}, "Please specify a valid phone number");
|
161
|
-
|
162
|
-
// TODO check if value starts with <, otherwise don't try stripping anything
|
163
|
-
jQuery.validator.addMethod("strippedminlength", function(value, element, param) {
|
164
|
-
return jQuery(value).text().length >= param;
|
165
|
-
}, jQuery.validator.format("Please enter at least {0} characters"));
|
166
|
-
|
167
|
-
// same as email, but TLD is optional
|
168
|
-
jQuery.validator.addMethod("email2", function(value, element, param) {
|
169
|
-
return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
|
170
|
-
}, jQuery.validator.messages.email);
|
171
|
-
|
172
|
-
// same as url, but TLD is optional
|
173
|
-
jQuery.validator.addMethod("url2", function(value, element, param) {
|
174
|
-
return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
|
175
|
-
}, jQuery.validator.messages.url);
|
176
|
-
|
177
|
-
// NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
|
178
|
-
// Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
|
179
|
-
// Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
|
180
|
-
jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {
|
181
|
-
|
182
|
-
if (/[^0-9-]+/.test(value))
|
183
|
-
return false;
|
184
|
-
|
185
|
-
value = value.replace(/\D/g, "");
|
186
|
-
|
187
|
-
var validTypes = 0x0000;
|
188
|
-
|
189
|
-
if (param.mastercard)
|
190
|
-
validTypes |= 0x0001;
|
191
|
-
if (param.visa)
|
192
|
-
validTypes |= 0x0002;
|
193
|
-
if (param.amex)
|
194
|
-
validTypes |= 0x0004;
|
195
|
-
if (param.dinersclub)
|
196
|
-
validTypes |= 0x0008;
|
197
|
-
if (param.enroute)
|
198
|
-
validTypes |= 0x0010;
|
199
|
-
if (param.discover)
|
200
|
-
validTypes |= 0x0020;
|
201
|
-
if (param.jcb)
|
202
|
-
validTypes |= 0x0040;
|
203
|
-
if (param.unknown)
|
204
|
-
validTypes |= 0x0080;
|
205
|
-
if (param.all)
|
206
|
-
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
|
207
|
-
|
208
|
-
if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard
|
209
|
-
return value.length == 16;
|
210
|
-
}
|
211
|
-
if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
|
212
|
-
return value.length == 16;
|
213
|
-
}
|
214
|
-
if (validTypes & 0x0004 && /^(34|37)/.test(value)) { //amex
|
215
|
-
return value.length == 15;
|
216
|
-
}
|
217
|
-
if (validTypes & 0x0008 && /^(300|301|302|303|304|305|36|38)/.test(value)) { //dinersclub
|
218
|
-
return value.length == 14;
|
219
|
-
}
|
220
|
-
if (validTypes & 0x0010 && /^(2014|2149)/.test(value)) { //enroute
|
221
|
-
return value.length == 15;
|
222
|
-
}
|
223
|
-
if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
|
224
|
-
return value.length == 16;
|
225
|
-
}
|
226
|
-
if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
|
227
|
-
return value.length == 16;
|
228
|
-
}
|
229
|
-
if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
|
230
|
-
return value.length == 15;
|
231
|
-
}
|
232
|
-
if (validTypes & 0x0080) { //unknown
|
233
|
-
return true;
|
234
|
-
}
|
235
|
-
return false;
|
236
|
-
}, "Please enter a valid credit card number.");
|
@@ -1,25 +0,0 @@
|
|
1
|
-
var update_state = function(region) {
|
2
|
-
var country = $('span#' + region + 'country :only-child').val();
|
3
|
-
var states = state_mapper[country];
|
4
|
-
|
5
|
-
var state_select = $('span#' + region + 'state select');
|
6
|
-
var state_input = $('span#' + region + 'state input');
|
7
|
-
|
8
|
-
if(states) {
|
9
|
-
state_select.html('');
|
10
|
-
var states_with_blank = [["",""]].concat(states);
|
11
|
-
$.each(states_with_blank, function(pos,id_nm) {
|
12
|
-
var opt = $(document.createElement('option'))
|
13
|
-
.attr('value', id_nm[0])
|
14
|
-
.html(id_nm[1]);
|
15
|
-
state_select.append(opt);
|
16
|
-
});
|
17
|
-
state_select.enable().show();;
|
18
|
-
state_input.hide().disable();
|
19
|
-
|
20
|
-
} else {
|
21
|
-
state_input.enable().show();
|
22
|
-
state_select.hide().disable();
|
23
|
-
}
|
24
|
-
|
25
|
-
};
|
@@ -1,129 +0,0 @@
|
|
1
|
-
jQuery(document).ready(function(){
|
2
|
-
add_address = function(addr){
|
3
|
-
var html = "";
|
4
|
-
if(addr!=undefined){
|
5
|
-
html += addr['firstname'] + " " + addr['lastname'] + ", ";
|
6
|
-
html += addr['address1'] + ", " + addr['address2'] + ", ";
|
7
|
-
html += addr['city'] + ", ";
|
8
|
-
|
9
|
-
if(addr['state_id']!=null){
|
10
|
-
html += addr['state']['name'] + ", ";
|
11
|
-
}else{
|
12
|
-
html += addr['state_name'] + ", ";
|
13
|
-
}
|
14
|
-
|
15
|
-
html += addr['country']['name'];
|
16
|
-
}
|
17
|
-
return html;
|
18
|
-
}
|
19
|
-
|
20
|
-
format_autocomplete = function(data){
|
21
|
-
var html = "<h4>" + data['email'] +"</h4>";
|
22
|
-
html += "<span><strong>Billing:</strong> ";
|
23
|
-
html += add_address(data['bill_address']);
|
24
|
-
html += "</span>";
|
25
|
-
|
26
|
-
html += "<span><strong>Shipping:</strong> ";
|
27
|
-
html += add_address(data['ship_address']);
|
28
|
-
html += "</span>";
|
29
|
-
|
30
|
-
return html
|
31
|
-
}
|
32
|
-
|
33
|
-
prep_autocomplete_data = function(data){
|
34
|
-
return $.map(eval(data), function(row) {
|
35
|
-
return {
|
36
|
-
data: row['user'],
|
37
|
-
value: row['user']['email'],
|
38
|
-
result: row['user']['email']
|
39
|
-
}
|
40
|
-
});
|
41
|
-
}
|
42
|
-
|
43
|
-
$("#customer_search").autocomplete("/admin/users.json", {
|
44
|
-
minChars: 5,
|
45
|
-
delay: 1500,
|
46
|
-
parse: prep_autocomplete_data,
|
47
|
-
formatItem: function(item) {
|
48
|
-
return format_autocomplete(item);
|
49
|
-
}
|
50
|
-
}).result(function(event, data, formatted) {
|
51
|
-
$('#user_id').val(data['id']);
|
52
|
-
$('#guest_checkout_true').removeAttr("checked");
|
53
|
-
$('#guest_checkout_false').attr("checked", "checked");
|
54
|
-
$('#guest_checkout_false').removeAttr("disabled");
|
55
|
-
$('#checkout_email').val(data['email']);
|
56
|
-
|
57
|
-
var addr = data['bill_address'];
|
58
|
-
if(addr!=undefined){
|
59
|
-
$('#checkout_bill_address_attributes_firstname').val(addr['firstname']);
|
60
|
-
$('#checkout_bill_address_attributes_lastname').val(addr['lastname']);
|
61
|
-
$('#checkout_bill_address_attributes_address1').val(addr['address1']);
|
62
|
-
$('#checkout_bill_address_attributes_address2').val(addr['address2']);
|
63
|
-
$('#checkout_bill_address_attributes_city').val(addr['city']);
|
64
|
-
$('#checkout_bill_address_attributes_zipcode').val(addr['zipcode']);
|
65
|
-
$('#checkout_bill_address_attributes_state_id').val(addr['state_id']);
|
66
|
-
$('#checkout_bill_address_attributes_country_id').val(addr['country_id']);
|
67
|
-
$('#checkout_bill_address_attributes_phone').val(addr['phone']);
|
68
|
-
}
|
69
|
-
|
70
|
-
var addr = data['ship_address'];
|
71
|
-
if(addr!=undefined){
|
72
|
-
$('#checkout_ship_address_attributes_firstname').val(addr['firstname']);
|
73
|
-
$('#checkout_ship_address_attributes_lastname').val(addr['lastname']);
|
74
|
-
$('#checkout_ship_address_attributes_address1').val(addr['address1']);
|
75
|
-
$('#checkout_ship_address_attributes_address2').val(addr['address2']);
|
76
|
-
$('#checkout_ship_address_attributes_city').val(addr['city']);
|
77
|
-
$('#checkout_ship_address_attributes_zipcode').val(addr['zipcode']);
|
78
|
-
$('#checkout_ship_address_attributes_state_id').val(addr['state_id']);
|
79
|
-
$('#checkout_ship_address_attributes_country_id').val(addr['country_id']);
|
80
|
-
$('#checkout_ship_address_attributes_phone').val(addr['phone']);
|
81
|
-
}
|
82
|
-
});
|
83
|
-
|
84
|
-
|
85
|
-
$('input#checkout_use_billing').click(function() {
|
86
|
-
show_billing(!this.checked);
|
87
|
-
});
|
88
|
-
|
89
|
-
$('#guest_checkout_true').change(function() {
|
90
|
-
$('#customer_search').val("");
|
91
|
-
$('#user_id').val("");
|
92
|
-
$('#checkout_email').val("");
|
93
|
-
$('#guest_checkout_false').attr("disabled", "true");
|
94
|
-
|
95
|
-
$('#checkout_bill_address_attributes_firstname').val("");
|
96
|
-
$('#checkout_bill_address_attributes_lastname').val("");
|
97
|
-
$('#checkout_bill_address_attributes_address1').val("");
|
98
|
-
$('#checkout_bill_address_attributes_address2').val("");
|
99
|
-
$('#checkout_bill_address_attributes_city').val("");
|
100
|
-
$('#checkout_bill_address_attributes_zipcode').val("");
|
101
|
-
$('#checkout_bill_address_attributes_state_id').val("");
|
102
|
-
$('#checkout_bill_address_attributes_country_id').val("");
|
103
|
-
$('#checkout_bill_address_attributes_phone').val("");
|
104
|
-
|
105
|
-
$('#checkout_ship_address_attributes_firstname').val("");
|
106
|
-
$('#checkout_ship_address_attributes_lastname').val("");
|
107
|
-
$('#checkout_ship_address_attributes_address1').val("");
|
108
|
-
$('#checkout_ship_address_attributes_address2').val("");
|
109
|
-
$('#checkout_ship_address_attributes_city').val("");
|
110
|
-
$('#checkout_ship_address_attributes_zipcode').val("");
|
111
|
-
$('#checkout_ship_address_attributes_state_id').val("");
|
112
|
-
$('#checkout_ship_address_attributes_country_id').val("");
|
113
|
-
$('#checkout_ship_address_attributes_phone').val("");
|
114
|
-
});
|
115
|
-
|
116
|
-
var show_billing = function(show) {
|
117
|
-
if(show) {
|
118
|
-
$('#shipping').show();
|
119
|
-
$('#shipping input').removeAttr('disabled', 'disabled');
|
120
|
-
$('#shipping select').removeAttr('disabled', 'disabled');
|
121
|
-
} else {
|
122
|
-
$('#shipping').hide();
|
123
|
-
$('#shipping input').attr('disabled', 'disabled');
|
124
|
-
$('#shipping select').attr('disabled', 'disabled');
|
125
|
-
}
|
126
|
-
}
|
127
|
-
|
128
|
-
});
|
129
|
-
|