spree 0.9.4 → 0.10.0.beta
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 +185 -0
- data/CONTRIBUTORS +93 -66
- data/LICENSE +1 -1
- data/Rakefile +19 -16
- data/app/controllers/admin/adjustments_controller.rb +32 -0
- data/app/controllers/admin/base_controller.rb +33 -18
- data/app/controllers/admin/checkouts_controller.rb +41 -0
- data/app/controllers/admin/coupons_controller.rb +2 -1
- data/app/controllers/admin/images_controller.rb +28 -19
- data/app/controllers/admin/line_items_controller.rb +55 -0
- data/app/controllers/admin/option_types_controller.rb +7 -4
- data/app/controllers/admin/orders_controller.rb +29 -15
- data/app/controllers/admin/payment_methods_controller.rb +31 -0
- data/app/controllers/admin/payments_controller.rb +99 -0
- data/app/controllers/admin/product_groups_controller.rb +42 -0
- data/app/controllers/admin/product_properties_controller.rb +7 -0
- data/app/controllers/admin/product_scopes_controller.rb +18 -0
- data/app/controllers/admin/products_controller.rb +74 -36
- data/app/controllers/admin/properties_controller.rb +2 -0
- data/app/controllers/admin/prototypes_controller.rb +3 -1
- data/app/controllers/admin/reports_controller.rb +2 -2
- data/app/controllers/admin/return_authorizations_controller.rb +36 -0
- data/app/controllers/admin/shipments_controller.rb +55 -24
- data/app/controllers/admin/shipping_categories_controller.rb +2 -1
- data/app/controllers/admin/shipping_methods_controller.rb +9 -7
- data/app/controllers/admin/shipping_rates_controller.rb +2 -1
- data/app/controllers/admin/states_controller.rb +1 -1
- data/app/controllers/admin/tax_categories_controller.rb +3 -1
- data/app/controllers/admin/tax_rates_controller.rb +12 -8
- data/app/controllers/admin/taxonomies_controller.rb +4 -13
- data/app/controllers/admin/taxons_controller.rb +86 -46
- data/app/controllers/admin/trackers_controller.rb +7 -0
- data/app/controllers/admin/users_controller.rb +29 -19
- data/app/controllers/admin/variants_controller.rb +12 -7
- data/app/controllers/admin/zones_controller.rb +3 -1
- data/app/controllers/application_controller.rb +4 -0
- data/app/controllers/checkouts_controller.rb +195 -131
- data/app/controllers/line_items_controller.rb +11 -6
- data/app/controllers/orders_controller.rb +35 -31
- data/app/controllers/password_resets_controller.rb +6 -1
- data/app/controllers/products_controller.rb +22 -31
- data/app/controllers/spree/base_controller.rb +144 -29
- data/app/controllers/taxons_controller.rb +8 -10
- data/app/controllers/user_sessions_controller.rb +69 -19
- data/app/controllers/users_controller.rb +42 -20
- data/app/helpers/admin/adjustments_helper.rb +2 -0
- data/app/helpers/admin/base_helper.rb +57 -105
- data/app/helpers/admin/checkouts_helper.rb +2 -0
- data/app/helpers/admin/line_items_helper.rb +2 -0
- data/app/helpers/admin/navigation_helper.rb +127 -0
- data/app/helpers/admin/orders_helper.rb +22 -7
- data/app/helpers/admin/payments_helper.rb +7 -0
- data/app/helpers/admin/return_authorizations_helper.rb +2 -0
- data/app/helpers/application_helper.rb +2 -8
- data/app/helpers/checkouts_helper.rb +32 -4
- data/app/helpers/hook_helper.rb +21 -0
- data/app/helpers/products_helper.rb +28 -10
- data/app/helpers/spree/base_helper.rb +43 -43
- data/app/helpers/taxons_helper.rb +3 -3
- data/app/helpers/trackers_helper.rb +2 -0
- data/app/helpers/users_helper.rb +13 -0
- data/app/metal/create_admin_user.rb +1 -1
- data/app/metal/redirect_legacy_product_url.rb +10 -0
- data/app/metal/seo_assist.rb +38 -0
- data/app/models/address.rb +28 -2
- data/app/models/adjustment.rb +57 -18
- data/app/models/app_configuration.rb +8 -3
- data/app/models/billing_integration.rb +23 -0
- data/app/models/calculator.rb +8 -3
- data/app/models/calculator/flat_percent_item_total.rb +6 -5
- data/app/models/calculator/per_item.rb +2 -2
- data/app/models/charge.rb +14 -32
- data/app/models/checkout.rb +118 -26
- data/app/models/coupon.rb +6 -4
- data/app/models/coupon_credit.rb +25 -0
- data/app/models/credit.rb +14 -22
- data/app/models/creditcard.rb +38 -110
- data/app/models/creditcard_txn.rb +7 -4
- data/app/models/inventory_unit.rb +50 -33
- data/app/models/line_item.rb +11 -5
- data/app/models/option_type.rb +2 -1
- data/app/models/order.rb +189 -64
- data/app/models/order_mailer.rb +5 -1
- data/app/models/payment.rb +99 -8
- data/app/models/payment_method.rb +45 -0
- data/app/models/payment_method/check.rb +2 -0
- data/app/models/product.rb +103 -38
- data/app/models/product_group.rb +201 -0
- data/app/models/product_scope.rb +56 -0
- data/app/models/return_authorization.rb +70 -0
- data/app/models/return_authorization_credit.rb +3 -0
- data/app/models/shipment.rb +79 -20
- data/app/models/shipping_charge.rb +23 -0
- data/app/models/shipping_method.rb +17 -8
- data/app/models/state_event.rb +1 -1
- data/app/models/state_monitor.rb +25 -0
- data/app/models/tax_charge.rb +23 -0
- data/app/models/taxon.rb +24 -16
- data/app/models/taxonomy.rb +10 -0
- data/app/models/tracker.rb +5 -0
- data/app/models/transaction.rb +6 -0
- data/app/models/user.rb +32 -6
- data/app/models/user_session.rb +1 -1
- data/app/models/variant.rb +36 -25
- data/app/models/zone.rb +19 -16
- data/bin/spree +3 -5
- data/config/boot.rb +7 -3
- data/config/database.yml +24 -25
- data/config/environment.rb +34 -28
- data/config/environments/staging.rb +13 -8
- data/config/environments/test.rb +2 -6
- data/config/initializers/locales.rb +1 -1
- data/config/initializers/spree.rb +4 -1
- data/config/initializers/touch.rb +9 -0
- data/config/initializers/workarounds_for_ruby19.rb +102 -0
- data/config/locales/cs-CZ.yml +914 -0
- data/config/locales/cs-CZ_rails.yml +202 -0
- data/config/locales/da.yml +305 -5
- data/config/locales/de-CH.yml +305 -5
- data/config/locales/de.yml +479 -179
- data/config/locales/en-AU.yml +914 -0
- data/config/locales/en-AU_rails.yml +202 -0
- data/config/locales/en-GB.yml +306 -6
- data/config/locales/en-US.yml +390 -90
- data/config/locales/en-US_rails.yml +11 -6
- data/config/locales/es.yml +378 -78
- data/config/locales/fi.yml +380 -80
- data/config/locales/fr-FR.yml +489 -189
- data/config/locales/il.yml +306 -6
- data/config/locales/it.yml +306 -6
- data/config/locales/jp.yml +306 -6
- data/config/locales/mx.yml +305 -5
- data/config/locales/nb-NO.yml +305 -5
- data/config/locales/nl-BE.yml +314 -14
- data/config/locales/nl-NL.yml +317 -17
- data/config/locales/nl-NL_rails.yml +45 -45
- data/config/locales/pl.yml +306 -6
- data/config/locales/pt-BR.yml +305 -5
- data/config/locales/pt-PT.yml +305 -5
- data/config/locales/ru-RU.yml +361 -61
- data/config/locales/ru-RU_rails.yml +6 -0
- data/config/locales/th.yml +306 -6
- data/config/locales/vn.yml +914 -0
- data/config/locales/vn_rails.yml +202 -0
- data/config/routes.rb +41 -24
- data/config/spree_permissions.yml +3 -3
- data/db/migrate/20090823005402_spree_zero_nine_zero.rb +452 -0
- data/db/migrate/20090904192342_create_indexes_for_inventory_units.rb +12 -0
- data/db/migrate/20090923100315_add_count_on_hand_to_variants_and_products.rb +30 -0
- data/db/migrate/20091007134354_change_taxons_to_nested_set.rb +40 -0
- data/db/migrate/20091012120519_product_groups_and_scopes.rb +25 -0
- data/db/migrate/20091015110842_add_open_id_authentication_tables.rb +20 -0
- data/db/migrate/20091015153048_add_openid_field_to_users.rb +19 -0
- data/db/migrate/20091016174634_change_preference_value_type.rb +9 -0
- data/db/migrate/20091017175558_create_billing_integrations.rb +16 -0
- data/db/migrate/20091021133257_charge_refactoring.rb +32 -0
- data/db/migrate/20091104151730_add_some_indexes.rb +21 -0
- data/db/migrate/20091126190904_checkout_state_machine.rb +13 -0
- data/db/migrate/20091209153045_state_for_shipments.rb +9 -0
- data/db/migrate/20091209202200_make_state_events_polymorphic.rb +12 -0
- data/db/migrate/20091211203813_ship_address_id_for_checkouts.rb +9 -0
- data/db/migrate/20091212161118_shipping_method_id_for_checkouts.rb +9 -0
- data/db/migrate/20091213222815_creditcard_last_four_digits.rb +19 -0
- data/db/migrate/20091214183826_populate_legacy_shipment_state.rb +19 -0
- data/db/migrate/20100105090147_add_cost_price.rb +9 -0
- data/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +17 -0
- data/db/migrate/20100111205525_cim_fields_for_creditcards.rb +11 -0
- data/db/migrate/20100112151511_create_return_authorizations.rb +16 -0
- data/db/migrate/20100113090919_add_return_authorization_to_inventory_units.rb +9 -0
- data/db/migrate/20100113203104_create_trackers.rb +14 -0
- data/db/migrate/20100121160010_creditcard_id_for_creditcard_txns.rb +9 -0
- data/db/migrate/20100121183934_original_creditcard_txn_id_for_creditcard_txns.rb +9 -0
- data/db/migrate/20100125145351_add_test_mode_to_billing_integration.rb +11 -0
- data/db/migrate/20100126103714_create_products_product_groups.rb +12 -0
- data/db/migrate/20100209025806_create_payment_methods.rb +20 -0
- data/db/migrate/20100209144531_polymorphic_payments.rb +29 -0
- data/db/migrate/20100213103131_change_payments_payment_method_to_belongs_to.rb +11 -0
- data/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +16 -0
- data/db/migrate/20100223170312_sti_for_transactions.rb +14 -0
- data/db/migrate/20100223183812_drop_billing_integrations.rb +16 -0
- data/db/migrate/20100224153127_deleted_at_for_payment_methods.rb +13 -0
- data/db/migrate/20100301163454_add_adjustments_index.rb +10 -0
- data/db/migrate/20100306153445_fix_by_popularity.rb +8 -0
- data/db/sample/addresses.yml +21 -18
- data/db/sample/adjustments.yml +8 -10
- data/db/sample/checkouts.yml +11 -5
- data/db/sample/inventory_units.rb +4 -0
- data/db/sample/line_items.yml +26 -11
- data/db/sample/orders.yml +15 -6
- data/db/sample/payment_methods.yml +23 -0
- data/db/sample/payments.rb +25 -0
- data/db/sample/product_groups.yml +9 -0
- data/db/sample/product_scopes.yml +35 -0
- data/db/sample/products.rb +24 -0
- data/db/sample/products.yml +8 -0
- data/db/sample/shipments.yml +4 -3
- data/db/sample/taxons.rb +3 -0
- data/db/sample/taxons.yml +22 -2
- data/db/sample/users.rb +58 -0
- data/db/sample/users.yml +12 -4
- data/db/sample/variants.yml +43 -5
- data/db/schema.rb +87 -47
- data/db/seeds.rb +8 -14
- data/lib/commands/extension.rb +4 -4
- data/lib/custom_fixtures.rb +1 -1
- data/lib/generators/extension/extension_generator.rb +3 -1
- data/lib/generators/extension/templates/RSpecRakefile +18 -1
- data/lib/generators/extension/templates/Rakefile +16 -0
- data/lib/generators/extension/templates/extension.rb +0 -16
- data/lib/generators/extension/templates/extension_hooks.rb +43 -0
- data/lib/generators/extension/templates/seeds.rb +2 -0
- data/lib/generators/extension/templates/tasks.rake +0 -11
- data/lib/generators/extension/templates/test_helper.rb +3 -15
- data/lib/generators/extension_controller/templates/controller.rb +1 -1
- data/lib/generators/extension_controller/templates/functional_test.rb +1 -6
- data/lib/generators/instance/instance_generator.rb +1 -1
- data/lib/generators/instance/templates/instance_rakefile +1 -0
- data/lib/generators/theme/templates/README.markdown +5 -0
- data/lib/generators/theme/theme_generator.rb +56 -0
- data/lib/scopes.rb +68 -0
- data/lib/scopes/dynamic.rb +38 -0
- data/lib/scopes/product.rb +246 -0
- data/lib/scopes/variant.rb +9 -0
- data/lib/spree.rb +5 -3
- data/lib/spree/checkout/action_options.rb +18 -0
- data/lib/spree/checkout/hooks.rb +27 -0
- data/lib/spree/config.rb +13 -2
- data/lib/spree/extension.rb +11 -1
- data/lib/spree/extension_loader.rb +10 -3
- data/lib/spree/extensions.rb +26 -0
- data/lib/spree/file_utilz.rb +3 -1
- data/lib/spree/initializer.rb +15 -17
- data/lib/spree/preferences/mail_settings.rb +1 -1
- data/lib/spree/preferences/model_hooks.rb +6 -1
- data/lib/spree/search.rb +46 -0
- data/lib/spree/search/base.rb +22 -0
- data/lib/spree/support/core_extensions/string.rb +1 -1
- data/lib/spree/theme_support.rb +4 -0
- data/lib/spree/theme_support/hook.rb +51 -0
- data/lib/spree/theme_support/hook_listener.rb +68 -0
- data/lib/spree/theme_support/hook_modifier.rb +35 -0
- data/lib/spree/theme_support/more_patches.rb +117 -0
- data/lib/tasks/database.rake +61 -21
- data/lib/tasks/extensions.rake +105 -9
- data/lib/tasks/rspec.rake +30 -30
- data/lib/tasks/themes.rake +32 -0
- data/lib/tasks/translation.rake +31 -0
- data/lib/tasks/upgrade.rake +1 -1
- data/lib/validation_group.rb +145 -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/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/javascripts/additional-methods.js +236 -0
- data/public/javascripts/admin/address_states.js +25 -0
- data/public/javascripts/admin/checkouts/edit.js +79 -0
- data/public/javascripts/admin/orders/edit.js +96 -0
- data/public/javascripts/admin/orders/edit_form.js +17 -0
- data/public/javascripts/admin/payments/new.js +9 -0
- data/public/javascripts/admin/unobtrusive_handlers.js +15 -0
- data/public/javascripts/checkout.js +48 -520
- data/public/javascripts/dashboard.js +143 -0
- data/public/javascripts/datepicker.js +1445 -0
- data/public/javascripts/gateway.js +13 -0
- data/public/javascripts/jqPlot/excanvas.min.js +1 -0
- data/public/javascripts/jqPlot/jquery.jqplot.min.js +14 -0
- data/public/javascripts/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js +14 -0
- data/public/javascripts/jqPlot/plugins/jqplot.canvasAxisTickRenderer.min.js +14 -0
- data/public/javascripts/jqPlot/plugins/jqplot.canvasTextRenderer.min.js +14 -0
- data/public/javascripts/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js +14 -0
- data/public/javascripts/jqPlot/plugins/jqplot.dateAxisRenderer.min.js +14 -0
- data/public/javascripts/jqPlot/plugins/jqplot.highlighter.min.js +14 -0
- data/public/javascripts/jqPlot/plugins/jqplot.pieRenderer.min.js +14 -0
- data/public/javascripts/jquery-and-plugins.js +36 -0
- data/public/javascripts/jquery-ui.js +188 -0
- data/public/javascripts/jquery.autocomplete.min.js +13 -0
- data/public/javascripts/jquery.js +19 -0
- data/public/javascripts/jquery.suggest.js +276 -0
- data/public/javascripts/jquery.template.js +255 -0
- data/public/javascripts/jquery.validate.min.js +4 -4
- data/public/javascripts/jrails.autocomplete.js +274 -0
- data/public/javascripts/jrails.js +1 -0
- data/public/javascripts/jsTree/jquery.tree.js +2058 -0
- data/public/javascripts/jsTree/plugins/jquery.tree.contextmenu.js +129 -0
- data/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
- data/public/javascripts/jsTree/{source/themes/default/dot.gif → 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 +34 -0
- data/public/javascripts/jsTree/{source/themes/default → themes/apple}/throbber.gif +0 -0
- data/public/javascripts/lang/af.js +40 -0
- data/public/javascripts/lang/ar.js +50 -0
- data/public/javascripts/lang/de.js +40 -0
- data/public/javascripts/lang/du.js +40 -0
- data/public/javascripts/lang/en.js +42 -0
- data/public/javascripts/lang/es.js +41 -0
- data/public/javascripts/lang/fi.js +40 -0
- data/public/javascripts/lang/fr.js +44 -0
- data/public/javascripts/lang/gr.js +40 -0
- data/public/javascripts/lang/he.js +49 -0
- data/public/javascripts/lang/it.js +13 -0
- data/public/javascripts/lang/nl.js +40 -0
- data/public/javascripts/lang/no.js +40 -0
- data/public/javascripts/lang/pt.js +50 -0
- data/public/javascripts/lang/ro.js +40 -0
- data/public/javascripts/lang/ru.js +40 -0
- data/public/javascripts/lang/sp.js +40 -0
- data/public/javascripts/lang/sv.js +41 -0
- data/public/javascripts/lang/ua.js +40 -0
- data/public/javascripts/localization/messages_cn.js +24 -0
- data/public/javascripts/localization/messages_cs.js +23 -0
- data/public/javascripts/localization/messages_da.js +21 -0
- data/public/javascripts/localization/messages_de.js +21 -0
- data/public/javascripts/localization/messages_es.js +24 -0
- data/public/javascripts/localization/messages_fr.js +23 -0
- data/public/javascripts/localization/messages_hu.js +21 -0
- data/public/javascripts/localization/messages_it.js +26 -0
- data/public/javascripts/localization/messages_kk.js +23 -0
- data/public/javascripts/localization/messages_nl.js +23 -0
- data/public/javascripts/localization/messages_no.js +23 -0
- data/public/javascripts/localization/messages_pl.js +23 -0
- data/public/javascripts/localization/messages_ptbr.js +30 -0
- data/public/javascripts/localization/messages_ro.js +24 -0
- data/public/javascripts/localization/messages_ru.js +23 -0
- data/public/javascripts/localization/messages_se.js +23 -0
- data/public/javascripts/localization/messages_sk.js +21 -0
- data/public/javascripts/localization/messages_tr.js +24 -0
- data/public/javascripts/localization/messages_tw.js +24 -0
- data/public/javascripts/localization/messages_ua.js +24 -0
- data/public/javascripts/open_id.js +15 -0
- data/public/javascripts/product.js +49 -0
- data/public/javascripts/spree.js +37 -2
- data/public/javascripts/taxonomy.js +138 -144
- data/public/javascripts/zone.js +0 -8
- data/public/robots.txt +10 -1
- data/public/stylesheets/admin/admin-tables.css +1 -1
- data/public/stylesheets/admin/admin.css +147 -50
- data/public/stylesheets/admin/dashboard.css +143 -0
- data/public/stylesheets/admin/edit-checkouts.css +57 -0
- data/public/stylesheets/admin/edit_checkouts.css +57 -0
- data/public/stylesheets/admin/edit_orders.css +65 -0
- data/public/stylesheets/bundle_admin.css +484 -0
- data/public/stylesheets/bundle_calendar_date_select.css +137 -0
- data/public/stylesheets/bundle_compiled.css +459 -0
- data/public/stylesheets/compiled/screen.css +1 -19
- data/public/stylesheets/datepicker.css +263 -0
- data/public/stylesheets/jquery.autocomplete.css +48 -0
- data/public/stylesheets/screen.css +1181 -0
- data/spec/controllers/products_controller_spec.rb +1 -11
- data/spec/fixtures/gateways.yml +8 -3
- data/spec/models/property_spec.rb +2 -3
- data/spec/models/prototype_spec.rb +1 -1
- data/spec/spec_helper.rb +10 -11
- data/test/factories/address_factory.rb +3 -3
- data/test/factories/adjustments_factory.rb +6 -11
- data/test/factories/checkout_factory.rb +4 -4
- data/test/factories/creditcard_factory.rb +6 -7
- data/test/factories/inventory_unit_factory.rb +1 -0
- data/test/factories/line_item_factory.rb +2 -2
- data/test/factories/order_factory.rb +4 -2
- data/test/factories/payment_factory.rb +26 -0
- data/test/factories/product_factory.rb +2 -1
- data/test/factories/product_group_factory.rb +10 -0
- data/test/factories/role_factory.rb +6 -2
- data/test/factories/user_factory.rb +9 -1
- data/test/factories/variant_factory.rb +3 -2
- data/test/factories/zone_factory.rb +8 -0
- data/test/fixtures/payment_methods.yml +18 -0
- data/test/functional/admin/adjustments_controller_test.rb +165 -0
- data/test/functional/admin/checkouts_controller_test.rb +86 -0
- data/test/functional/admin/configurations_controller_test.rb +41 -0
- data/test/functional/admin/line_items_controller_test.rb +177 -0
- data/test/functional/admin/payments_controller_test.rb +120 -0
- data/test/functional/admin/product_groups_controller_test.rb +41 -0
- data/test/functional/admin/products_controller_test.rb +166 -0
- data/test/functional/admin/reports_controller_test.rb +28 -0
- data/test/functional/admin/return_authorizations_controller_test.rb +8 -0
- data/test/functional/admin/shipments_controller_test.rb +61 -0
- data/test/functional/checkouts_controller_test.rb +110 -62
- data/test/functional/line_items_controller_test.rb +26 -0
- data/test/functional/products_controller_test.rb +0 -1
- data/test/integration/searching_test.rb +175 -0
- data/test/shoulda_macros/should_redirect.rb +15 -0
- data/test/test_helper.rb +51 -7
- data/test/unit/address_test.rb +22 -2
- data/test/unit/adjustment_test.rb +96 -0
- data/test/unit/charge_test.rb +28 -4
- data/test/unit/checkout_test.rb +99 -3
- data/test/unit/credit_test.rb +2 -3
- data/test/unit/creditcard_payment_test.rb +2 -20
- data/test/unit/creditcard_test.rb +104 -16
- data/test/unit/factories_test.rb +1 -1
- data/test/unit/flat_percent_item_total_test.rb +3 -2
- data/test/unit/helpers/admin/adjustments_helper_test.rb +4 -0
- data/test/unit/helpers/admin/credits_helper_test.rb +4 -0
- data/test/unit/helpers/admin/return_authorizations_helper_test.rb +4 -0
- data/test/unit/inventory_unit_test.rb +4 -6
- data/test/unit/line_item_test.rb +1 -1
- data/test/unit/order_mailer_test.rb +48 -0
- data/test/unit/order_state_test.rb +191 -0
- data/test/unit/order_test.rb +91 -11
- data/test/unit/payment_test.rb +54 -0
- data/test/unit/preference_definition_test.rb +192 -0
- data/test/unit/product_group_test.rb +260 -0
- data/test/unit/product_scope_test.rb +62 -0
- data/test/unit/product_test.rb +20 -11
- data/test/unit/return_authorization_test.rb +104 -0
- data/test/unit/shipment_test.rb +175 -0
- data/test/unit/shipping_method_test.rb +4 -4
- data/test/unit/state_event_test.rb +17 -6
- data/test/unit/tax_rate_test.rb +1 -1
- data/test/unit/variant_test.rb +25 -12
- data/vendor/extensions/api/README.markdown +5 -0
- data/vendor/extensions/api/Rakefile +137 -0
- data/vendor/extensions/api/api_extension.rb +75 -0
- data/vendor/extensions/api/api_hooks.rb +3 -0
- data/vendor/extensions/api/app/controllers/api/base_controller.rb +90 -0
- data/vendor/extensions/api/app/controllers/api/inventory_units_controller.rb +12 -0
- data/vendor/extensions/api/app/controllers/api/line_items_controller.rb +16 -0
- data/vendor/extensions/api/app/controllers/api/orders_controller.rb +17 -0
- data/vendor/extensions/api/app/controllers/api/products_controller.rb +10 -0
- data/vendor/extensions/api/app/controllers/api/shipments_controller.rb +35 -0
- data/vendor/extensions/api/app/helpers/api/shipments_helper.rb +2 -0
- data/vendor/extensions/api/app/views/admin/users/_api_fields.html.erb +16 -0
- data/vendor/extensions/api/config/locales/en-US.yml +16 -0
- data/vendor/extensions/api/config/locales/ru-RU.yml +16 -0
- data/vendor/extensions/api/config/routes.rb +15 -0
- data/vendor/extensions/api/db/migrate/20100107141738_add_api_key_to_users.rb +9 -0
- data/vendor/extensions/api/db/seeds.rb +2 -0
- data/vendor/extensions/api/lib/tasks/api_extension_tasks.rake +17 -0
- data/vendor/extensions/api/test/functional/admin/users_controller_test.rb +32 -0
- data/vendor/extensions/api/test/integration/inventory_units_api_test.rb +36 -0
- data/vendor/extensions/api/test/integration/orders_api_test.rb +125 -0
- data/vendor/extensions/api/test/integration/shipments_api_test.rb +117 -0
- data/vendor/extensions/api/test/test_helper.rb +53 -0
- data/vendor/extensions/api/test/unit/user_test.rb +21 -0
- data/vendor/extensions/localization/app/controllers/locale_controller.rb +5 -3
- data/vendor/extensions/localization/localization_extension.rb +1 -1
- data/vendor/extensions/overview_dashboard/README.markdown +3 -0
- data/vendor/extensions/overview_dashboard/Rakefile +137 -0
- data/vendor/extensions/overview_dashboard/app/controllers/admin/overview_controller.rb +142 -0
- data/vendor/extensions/overview_dashboard/app/views/admin/overview/index.html.erb +174 -0
- data/vendor/extensions/overview_dashboard/config/routes.rb +5 -0
- data/vendor/extensions/overview_dashboard/db/seeds.rb +2 -0
- data/vendor/extensions/overview_dashboard/lib/tasks/overview_dashboard_extension_tasks.rake +28 -0
- data/vendor/extensions/overview_dashboard/overview_dashboard_extension.rb +9 -0
- data/vendor/extensions/overview_dashboard/public/javascripts/dashboard.js +143 -0
- data/vendor/extensions/overview_dashboard/public/javascripts/jqPlot/excanvas.min.js +1 -0
- data/vendor/extensions/overview_dashboard/public/javascripts/jqPlot/jquery.jqplot.min.js +14 -0
- data/vendor/extensions/overview_dashboard/public/javascripts/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js +14 -0
- data/vendor/extensions/overview_dashboard/public/javascripts/jqPlot/plugins/jqplot.canvasAxisTickRenderer.min.js +14 -0
- data/vendor/extensions/overview_dashboard/public/javascripts/jqPlot/plugins/jqplot.canvasTextRenderer.min.js +14 -0
- data/vendor/extensions/overview_dashboard/public/javascripts/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js +14 -0
- data/vendor/extensions/overview_dashboard/public/javascripts/jqPlot/plugins/jqplot.dateAxisRenderer.min.js +14 -0
- data/vendor/extensions/overview_dashboard/public/javascripts/jqPlot/plugins/jqplot.highlighter.min.js +14 -0
- data/vendor/extensions/overview_dashboard/public/javascripts/jqPlot/plugins/jqplot.pieRenderer.min.js +14 -0
- data/vendor/extensions/overview_dashboard/public/stylesheets/admin/dashboard.css +143 -0
- data/vendor/extensions/overview_dashboard/spec/spec.opts +6 -0
- data/vendor/extensions/overview_dashboard/spec/spec_helper.rb +37 -0
- data/vendor/extensions/payment_gateway/app/models/gateway.rb +47 -2
- data/vendor/extensions/payment_gateway/app/models/gateway/authorize_net.rb +8 -0
- data/vendor/extensions/payment_gateway/app/models/gateway/authorize_net_cim.rb +104 -0
- data/vendor/extensions/payment_gateway/app/models/gateway/beanstream.rb +164 -0
- data/vendor/extensions/payment_gateway/app/models/gateway/bogus.rb +80 -0
- data/vendor/extensions/payment_gateway/app/models/gateway/linkpoint.rb +8 -0
- data/vendor/extensions/payment_gateway/app/models/gateway/pay_pal.rb +11 -0
- data/vendor/extensions/payment_gateway/app/models/gateway/protx.rb +9 -0
- data/vendor/extensions/payment_gateway/config/locales/en-US.yml +6 -0
- data/vendor/extensions/payment_gateway/config/locales/ru-RU.yml +6 -0
- data/vendor/extensions/payment_gateway/config/routes.rb +2 -4
- data/vendor/extensions/payment_gateway/db/migrate/20091008091614_move_to_configurable_gateways.rb +55 -0
- data/vendor/extensions/payment_gateway/lib/active_merchant/billing/authorize_net_cim.rb +869 -0
- data/vendor/extensions/payment_gateway/lib/spree/payment_gateway.rb +161 -57
- data/vendor/extensions/payment_gateway/payment_gateway_extension.rb +22 -4
- data/vendor/extensions/payment_gateway/public/javascripts/gateway.js +13 -0
- data/vendor/extensions/payment_gateway/spec/models/creditcard_spec.rb +1 -10
- data/vendor/extensions/payment_gateway/test/mocks/authorize_net_cim_mock.rb +59 -0
- data/vendor/extensions/payment_gateway/test/test_helper.rb +14 -0
- data/vendor/extensions/payment_gateway/test/unit/authorize_net_cim_test.rb +85 -0
- data/vendor/extensions/payment_gateway/test/unit/creditcard_with_authorize_net_cim_test.rb +117 -0
- data/vendor/extensions/theme_default/HOOKS.markdown +88 -0
- data/vendor/extensions/theme_default/README.markdown +3 -0
- data/vendor/extensions/theme_default/Rakefile +120 -0
- data/vendor/extensions/theme_default/app/stylesheets/_buttons.less +75 -0
- data/vendor/extensions/theme_default/app/stylesheets/_cart.less +24 -0
- data/vendor/extensions/theme_default/app/stylesheets/_checkout.less +69 -0
- data/vendor/extensions/theme_default/app/stylesheets/_checkout_progress.less +62 -0
- data/vendor/extensions/theme_default/app/stylesheets/_colors.less +16 -0
- data/vendor/extensions/theme_default/app/stylesheets/_forms.less +50 -0
- data/vendor/extensions/theme_default/app/stylesheets/_layout.less +72 -0
- data/vendor/extensions/theme_default/app/stylesheets/_messages.less +32 -0
- data/vendor/extensions/theme_default/app/stylesheets/_mixins.less +71 -0
- data/vendor/extensions/theme_default/app/stylesheets/_navigation.less +130 -0
- data/vendor/extensions/theme_default/app/stylesheets/_prices.less +18 -0
- data/vendor/extensions/theme_default/app/stylesheets/_product_details.less +56 -0
- data/vendor/extensions/theme_default/app/stylesheets/_product_lists.less +66 -0
- data/vendor/extensions/theme_default/app/stylesheets/_registration.less +24 -0
- data/vendor/extensions/theme_default/app/stylesheets/_reset.less +69 -0
- data/vendor/extensions/theme_default/app/stylesheets/_typography.less +158 -0
- data/vendor/extensions/theme_default/app/stylesheets/screen.css +11 -0
- data/vendor/extensions/theme_default/app/stylesheets/screen.less +13 -0
- data/{app → vendor/extensions/theme_default/app}/views/account/login.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/adjustments/_form.html.erb +21 -0
- data/vendor/extensions/theme_default/app/views/admin/adjustments/edit.html.erb +13 -0
- data/vendor/extensions/theme_default/app/views/admin/adjustments/index.html.erb +36 -0
- data/vendor/extensions/theme_default/app/views/admin/adjustments/new.html.erb +13 -0
- data/vendor/extensions/theme_default/app/views/admin/checkouts/_form.html.erb +16 -0
- data/vendor/extensions/theme_default/app/views/admin/checkouts/edit.html.erb +21 -0
- data/vendor/extensions/theme_default/app/views/admin/checkouts/show.html.erb +120 -0
- data/vendor/extensions/theme_default/app/views/admin/configurations/index.html.erb +74 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/configurations/new.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/coupons/_form.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/coupons/edit.html.erb +6 -0
- data/vendor/extensions/theme_default/app/views/admin/coupons/index.html.erb +40 -0
- data/vendor/extensions/theme_default/app/views/admin/coupons/new.html.erb +7 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/extensions/index.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/general_settings/edit.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/general_settings/show.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/images/_form.html.erb +12 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/images/edit.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/images/index.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/images/new.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/inventory_settings/edit.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/inventory_settings/show.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/inventory_units/adjust.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/mail_settings/edit.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/mail_settings/show.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/option_types/_form.html.erb +33 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/option_types/_option_value.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/option_types/available.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/option_types/edit.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/option_types/index.html.erb +37 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/option_types/new.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/option_types/selected.html.erb +38 -0
- data/vendor/extensions/theme_default/app/views/admin/orders/_add_product.html.erb +24 -0
- data/vendor/extensions/theme_default/app/views/admin/orders/_form.html.erb +70 -0
- data/vendor/extensions/theme_default/app/views/admin/orders/_line_item.html.erb +16 -0
- data/vendor/extensions/theme_default/app/views/admin/orders/edit.html.erb +25 -0
- data/vendor/extensions/theme_default/app/views/admin/orders/history.html.erb +25 -0
- data/vendor/extensions/theme_default/app/views/admin/orders/index.html.erb +96 -0
- data/vendor/extensions/theme_default/app/views/admin/orders/new.html.erb +19 -0
- data/vendor/extensions/theme_default/app/views/admin/orders/show.html.erb +45 -0
- data/vendor/extensions/theme_default/app/views/admin/payment_methods/_form.html.erb +45 -0
- data/vendor/extensions/theme_default/app/views/admin/payment_methods/edit.html.erb +10 -0
- data/vendor/extensions/theme_default/app/views/admin/payment_methods/index.html.erb +36 -0
- data/vendor/extensions/theme_default/app/views/admin/payment_methods/new.html.erb +11 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/_bill_address_form.html.erb +9 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/_card_form.html.erb +49 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/_form.html.erb +15 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/_list.html.erb +24 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/_transaction_list.html.erb +24 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/credit.html.erb +14 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/index.html.erb +27 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/new.html.erb +19 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/show.html.erb +10 -0
- data/{app/views/admin/shared/_order_sub_menu.html.erb → vendor/extensions/theme_default/app/views/admin/payments/source_forms/_check.html.erb} +0 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/source_forms/_gateway.html.erb +43 -0
- data/vendor/{plugins/paperclip/test/fixtures/text.txt → extensions/theme_default/app/views/admin/payments/source_views/_check.html.erb} +0 -0
- data/vendor/extensions/theme_default/app/views/admin/payments/source_views/_gateway.html.erb +35 -0
- data/vendor/extensions/theme_default/app/views/admin/product_groups/_preview.html.erb +34 -0
- data/vendor/extensions/theme_default/app/views/admin/product_groups/_product_scope.html.erb +24 -0
- data/vendor/extensions/theme_default/app/views/admin/product_groups/edit.html.erb +56 -0
- data/vendor/extensions/theme_default/app/views/admin/product_groups/index.html.erb +35 -0
- data/vendor/extensions/theme_default/app/views/admin/product_groups/new.html.erb +12 -0
- data/vendor/extensions/theme_default/app/views/admin/product_groups/show.html.erb +32 -0
- data/vendor/extensions/theme_default/app/views/admin/product_groups/update.js.erb +7 -0
- data/vendor/extensions/theme_default/app/views/admin/product_properties/_product_property.html.erb +17 -0
- data/vendor/extensions/theme_default/app/views/admin/product_properties/index.html.erb +59 -0
- data/vendor/extensions/theme_default/app/views/admin/product_scopes/create.js.erb +3 -0
- data/vendor/extensions/theme_default/app/views/admin/product_scopes/destroy.js.erb +2 -0
- data/vendor/extensions/theme_default/app/views/admin/product_scopes/new.html.erb +1 -0
- data/vendor/extensions/theme_default/app/views/admin/products/_form.html.erb +104 -0
- data/vendor/extensions/theme_default/app/views/admin/products/_option_types.html.erb +40 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/products/_properties_form.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/products/edit.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/products/index.html.erb +85 -0
- data/vendor/extensions/theme_default/app/views/admin/products/new.html.erb +53 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/products/show.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/properties/_form.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/properties/edit.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/properties/filtered.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/properties/index.html.erb +43 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/properties/new.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/prototypes/_form.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/prototypes/available.html.erb +22 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/prototypes/edit.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/prototypes/index.html.erb +40 -0
- data/vendor/extensions/theme_default/app/views/admin/prototypes/new.html.erb +11 -0
- data/vendor/extensions/theme_default/app/views/admin/prototypes/select.rjs +7 -0
- data/vendor/extensions/theme_default/app/views/admin/reports/index.html.erb +19 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/reports/sales_total.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/return_authorizations/_form.html.erb +64 -0
- data/vendor/extensions/theme_default/app/views/admin/return_authorizations/edit.html.erb +27 -0
- data/vendor/extensions/theme_default/app/views/admin/return_authorizations/index.html.erb +43 -0
- data/vendor/extensions/theme_default/app/views/admin/return_authorizations/new.html.erb +13 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_additional_field.html.erb +5 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_address.html.erb +5 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_address_form.html.erb +67 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_calculator_fields.html.erb +16 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_configuration_menu.html.erb +22 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/shared/_edit_resource_links.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/shared/_new_resource_links.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/shared/_order_details.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_order_sub_menu.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_order_tabs.html.erb +52 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_product_sub_menu.html.erb +11 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_product_tabs.html.erb +44 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_report_criteria.html.erb +15 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/shared/_show_resource_links.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_tabs.html.erb +6 -0
- data/vendor/extensions/theme_default/app/views/admin/shipments/_form.html.erb +76 -0
- data/vendor/extensions/theme_default/app/views/admin/shipments/edit.html.erb +40 -0
- data/vendor/extensions/theme_default/app/views/admin/shipments/index.html.erb +44 -0
- data/vendor/extensions/theme_default/app/views/admin/shipments/new.html.erb +18 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/shipping_categories/_form.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_categories/edit.html.erb +6 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_categories/index.html.erb +29 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_categories/new.html.erb +8 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_methods/_form.html.erb +19 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_methods/edit.html.erb +16 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_methods/index.html.erb +46 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_methods/new.html.erb +17 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/shipping_rates/_form.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_rates/edit.html.erb +6 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_rates/index.html.erb +32 -0
- data/vendor/extensions/theme_default/app/views/admin/shipping_rates/new.html.erb +8 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/states/_form.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/states/_state_list.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/states/edit.html.erb +10 -0
- data/vendor/extensions/theme_default/app/views/admin/states/index.html.erb +25 -0
- data/vendor/extensions/theme_default/app/views/admin/states/new.html.erb +10 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/tax_categories/_form.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/tax_categories/edit.html.erb +10 -0
- data/vendor/extensions/theme_default/app/views/admin/tax_categories/index.html.erb +37 -0
- data/vendor/extensions/theme_default/app/views/admin/tax_categories/new.html.erb +10 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/tax_categories/show.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/tax_rates/_form.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/tax_rates/edit.html.erb +6 -0
- data/vendor/extensions/theme_default/app/views/admin/tax_rates/index.html.erb +34 -0
- data/vendor/extensions/theme_default/app/views/admin/tax_rates/new.html.erb +8 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/tax_settings/edit.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/tax_settings/show.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/taxonomies/_form.html.erb +7 -0
- data/vendor/extensions/theme_default/app/views/admin/taxonomies/_js_head.html.erb +11 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/taxonomies/_list.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/taxonomies/_manage_products.rhtml +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/taxonomies/_success.rhtml +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/taxonomies/_taxon.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/taxonomies/edit.html.erb +49 -0
- data/vendor/extensions/theme_default/app/views/admin/taxonomies/get_children.json.erb +9 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/taxonomies/index.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/taxonomies/new.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/taxons/_form.html.erb +13 -0
- data/vendor/extensions/theme_default/app/views/admin/taxons/_taxon_table.html.erb +28 -0
- data/vendor/extensions/theme_default/app/views/admin/taxons/available.js.erb +36 -0
- data/vendor/extensions/theme_default/app/views/admin/taxons/edit.html.erb +11 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/taxons/remove.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/taxons/select.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/taxons/selected.html.erb +42 -0
- data/vendor/extensions/theme_default/app/views/admin/trackers/_form.html.erb +26 -0
- data/vendor/extensions/theme_default/app/views/admin/trackers/edit.html.erb +8 -0
- data/vendor/extensions/theme_default/app/views/admin/trackers/index.html.erb +41 -0
- data/vendor/extensions/theme_default/app/views/admin/trackers/new.html.erb +9 -0
- data/vendor/extensions/theme_default/app/views/admin/users/_form.html.erb +36 -0
- data/vendor/extensions/theme_default/app/views/admin/users/edit.html.erb +16 -0
- data/vendor/extensions/theme_default/app/views/admin/users/index.html.erb +62 -0
- data/vendor/extensions/theme_default/app/views/admin/users/new.html.erb +16 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/users/show.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/variants/_form.html.erb +38 -0
- data/vendor/extensions/theme_default/app/views/admin/variants/edit.html.erb +13 -0
- data/vendor/extensions/theme_default/app/views/admin/variants/index.html.erb +54 -0
- data/vendor/extensions/theme_default/app/views/admin/variants/new.html.erb +11 -0
- data/vendor/extensions/theme_default/app/views/admin/zones/_country_member.html.erb +5 -0
- data/vendor/extensions/theme_default/app/views/admin/zones/_form.html.erb +29 -0
- data/{app → vendor/extensions/theme_default/app}/views/admin/zones/_member_type.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/admin/zones/_state_member.html.erb +5 -0
- data/vendor/extensions/theme_default/app/views/admin/zones/_zone_member.html.erb +5 -0
- data/vendor/extensions/theme_default/app/views/admin/zones/edit.html.erb +10 -0
- data/vendor/extensions/theme_default/app/views/admin/zones/index.html.erb +40 -0
- data/vendor/extensions/theme_default/app/views/admin/zones/new.html.erb +10 -0
- data/vendor/extensions/theme_default/app/views/checkouts/_address.html.erb +163 -0
- data/vendor/extensions/theme_default/app/views/checkouts/_confirm.html.erb +11 -0
- data/vendor/extensions/theme_default/app/views/checkouts/_delivery.html.erb +33 -0
- data/vendor/extensions/theme_default/app/views/checkouts/_guest_checkout.html.erb +9 -0
- data/vendor/extensions/theme_default/app/views/checkouts/_payment.html.erb +33 -0
- data/vendor/extensions/theme_default/app/views/checkouts/_summary.html.erb +36 -0
- data/vendor/extensions/theme_default/app/views/checkouts/edit.html.erb +20 -0
- data/vendor/extensions/theme_default/app/views/checkouts/payment/_check.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/checkouts/payment/_gateway.html.erb +31 -0
- data/vendor/extensions/theme_default/app/views/checkouts/register.html.erb +13 -0
- data/{app → vendor/extensions/theme_default/app}/views/content/cvv.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/countries/index.js.erb +0 -0
- data/vendor/extensions/theme_default/app/views/layouts/admin.html.erb +77 -0
- data/vendor/extensions/theme_default/app/views/layouts/spree_application.html.erb +48 -0
- data/{app → vendor/extensions/theme_default/app}/views/order_mailer/cancel.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/order_mailer/confirm.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/orders/_form.html.erb +25 -0
- data/vendor/extensions/theme_default/app/views/orders/_line_item.html.erb +43 -0
- data/vendor/extensions/theme_default/app/views/orders/edit.html.erb +29 -0
- data/{app → vendor/extensions/theme_default/app}/views/orders/new.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/orders/show.html.erb +16 -0
- data/vendor/extensions/theme_default/app/views/password_resets/edit.html.erb +12 -0
- data/vendor/extensions/theme_default/app/views/password_resets/new.html.erb +12 -0
- data/vendor/extensions/theme_default/app/views/products/_cart_form.html.erb +54 -0
- data/{app → vendor/extensions/theme_default/app}/views/products/_image.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/products/_properties.html.erb +8 -0
- data/vendor/extensions/theme_default/app/views/products/_taxons.html.erb +16 -0
- data/vendor/extensions/theme_default/app/views/products/_thumbnails.html.erb +40 -0
- data/vendor/extensions/theme_default/app/views/products/index.html.erb +31 -0
- data/vendor/extensions/theme_default/app/views/products/show.html.erb +29 -0
- data/vendor/extensions/theme_default/app/views/shared/_additional_field.html.erb +7 -0
- data/vendor/extensions/theme_default/app/views/shared/_admin_head.html.erb +21 -0
- data/{app → vendor/extensions/theme_default/app}/views/shared/_edit_resource_links.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/shared/_filters.html.erb +52 -0
- data/vendor/extensions/theme_default/app/views/shared/_footer.html.erb +11 -0
- data/vendor/extensions/theme_default/app/views/shared/_google_analytics.html.erb +39 -0
- data/vendor/extensions/theme_default/app/views/shared/_head.html.erb +9 -0
- data/vendor/extensions/theme_default/app/views/shared/_login.html.erb +37 -0
- data/{app → vendor/extensions/theme_default/app}/views/shared/_login_bar.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/shared/_nav_bar.html.erb +5 -0
- data/{app → vendor/extensions/theme_default/app}/views/shared/_new_resource_links.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/shared/_order_details.html.erb +60 -0
- data/vendor/extensions/theme_default/app/views/shared/_products.html.erb +33 -0
- data/vendor/extensions/theme_default/app/views/shared/_search.html.erb +9 -0
- data/{app → vendor/extensions/theme_default/app}/views/shared/_show_resource_links.html.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/shared/_store_menu.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/shared/_taxonomies.html.erb +10 -0
- data/vendor/extensions/theme_default/app/views/shared/_test_hook.html.erb +1 -0
- data/vendor/extensions/theme_default/app/views/shared/_user_form.html.erb +32 -0
- data/{app → vendor/extensions/theme_default/app}/views/states/index.js.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/taxons/_taxon.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/taxons/show.html.erb +17 -0
- data/{app → vendor/extensions/theme_default/app}/views/user_mailer/password_reset_instructions.erb +0 -0
- data/{app → vendor/extensions/theme_default/app}/views/user_sessions/authorization_failure.html.erb +0 -0
- data/vendor/extensions/theme_default/app/views/user_sessions/new.html.erb +8 -0
- data/vendor/extensions/theme_default/app/views/users/_openid_identifier.html.erb +10 -0
- data/vendor/extensions/theme_default/app/views/users/edit.html.erb +9 -0
- data/vendor/extensions/theme_default/app/views/users/new.html.erb +22 -0
- data/vendor/extensions/theme_default/app/views/users/show.html.erb +46 -0
- data/vendor/extensions/theme_default/lib/tasks/theme_default_extension_tasks.rake +28 -0
- data/vendor/extensions/theme_default/public/images/add-to-cart.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/active-tab.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/admin_tab_back.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/admin_tab_selected_back.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/content-back-blue.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/content-back-green.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/content-back.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/flash-error.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/flash-notice.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/green-stripes.gif +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/green-stripes.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/grid_header_back.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/grid_header_back_green.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/header-bg.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/header_bg.jpg +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/menu-current.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/red-stripes.gif +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/red-stripes.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/spree_50.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/subnav-divider.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/subnav.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/bg/tab-back.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/blue/left_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/blue/right_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/drag-handle-green.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/green/left_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/green/right_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/left_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/left_01_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/orange/left_03.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/orange/right_03.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/right_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/buttons/right_01_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/16x16/1.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/16x16/10.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/16x16/2.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/16x16/3.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/16x16/4.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/16x16/5.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/16x16/6.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/16x16/7.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/16x16/8.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/16x16/9.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/1.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/10.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/11.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/2.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/3.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/4.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/5.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/6.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/7.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/8.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/32x32/9.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/accept.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/add.gif +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/add.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/arrow-down.gif +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/cross.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/delete.gif +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/delete.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/drag.gif +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/edit.gif +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/edit.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/email.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/error.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/exclamation.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/feed.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/pdf.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/reorder.gif +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/search.gif +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/send-email.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/stop.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/tick.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/up.gif +0 -0
- data/vendor/extensions/theme_default/public/images/admin/icons/xls.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/tabs/off-left.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/tabs/off-right.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/tabs/on-left.png +0 -0
- data/vendor/extensions/theme_default/public/images/admin/tabs/on-right.png +0 -0
- data/vendor/extensions/theme_default/public/images/ajax_loader.gif +0 -0
- data/vendor/extensions/theme_default/public/images/amex_cid.gif +0 -0
- data/vendor/extensions/theme_default/public/images/bg-button-hover.png +0 -0
- data/vendor/extensions/theme_default/public/images/bg-button-pressed.png +0 -0
- data/vendor/extensions/theme_default/public/images/bg-button.gif +0 -0
- data/vendor/extensions/theme_default/public/images/bg-button.png +0 -0
- data/vendor/extensions/theme_default/public/images/blue/left_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/blue/right_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/body-back.png +0 -0
- data/vendor/extensions/theme_default/public/images/bottom_shine.png +0 -0
- data/vendor/extensions/theme_default/public/images/breadcrumb.gif +0 -0
- data/vendor/extensions/theme_default/public/images/button-dark-hover.png +0 -0
- data/vendor/extensions/theme_default/public/images/button-dark.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/bg-button-hover.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/bg-button-pressed.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/bg-button.gif +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/bg-button.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/blue/left_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/blue/right_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/button-dark-hover.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/button-dark.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/drag-handle-green.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/green/left_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/green/right_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/left_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/left_01_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/orange/left_03.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/orange/right_03.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/right_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/right_01_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/sxsw-ribbon-v1.png +0 -0
- data/vendor/extensions/theme_default/public/images/buttons/top-shine.png +0 -0
- data/vendor/extensions/theme_default/public/images/calendar_date_select/calendar.gif +0 -0
- data/vendor/extensions/theme_default/public/images/cart-empty.png +0 -0
- data/vendor/extensions/theme_default/public/images/cart-empty_x32.png +0 -0
- data/vendor/extensions/theme_default/public/images/cart-full.png +0 -0
- data/vendor/extensions/theme_default/public/images/cart-full_x32.png +0 -0
- data/vendor/extensions/theme_default/public/images/checkout.png +0 -0
- data/vendor/extensions/theme_default/public/images/creditcard.gif +0 -0
- data/vendor/extensions/theme_default/public/images/datepicker/backstripes.gif +0 -0
- data/vendor/extensions/theme_default/public/images/datepicker/bg_header.jpg +0 -0
- data/vendor/extensions/theme_default/public/images/datepicker/bullet1.gif +0 -0
- data/vendor/extensions/theme_default/public/images/datepicker/bullet2.gif +0 -0
- data/vendor/extensions/theme_default/public/images/datepicker/cal.gif +0 -0
- data/vendor/extensions/theme_default/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
- data/vendor/extensions/theme_default/public/images/discover_cid.gif +0 -0
- data/vendor/extensions/theme_default/public/images/drag-handle-green.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ad.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ae.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/af.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ag.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ai.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/al.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/am.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/an.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ao.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ar.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/as.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/at.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/au.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/aw.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ax.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/az.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ba.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bb.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bd.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/be.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bf.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bg.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bh.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bi.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bj.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bn.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bo.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/br.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bs.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bt.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bv.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bw.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/by.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/bz.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ca.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/catalonia.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cc.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cd.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cf.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cg.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ch.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ci.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ck.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cl.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cn.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/co.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cs.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cu.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cv.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cx.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cy.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/cz.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/da.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/de.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/de_CH.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/dj.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/dm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/do.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/dz.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ec.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ee.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/eg.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/eh.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/england.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/er.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/es.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/et.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/europeanunion.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/fam.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/fi.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/fj.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/fk.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/fm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/fo.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/fr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ga.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gb.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gd.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ge.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gf.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gh.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gi.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gl.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gn.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gp.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gq.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gs.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gt.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gu.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gw.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/gy.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/hk.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/hm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/hn.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/hr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ht.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/hu.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/id.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ie.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/il.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/in.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/io.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/iq.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ir.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/is.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/it.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/jm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/jo.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/jp.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ke.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/kg.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/kh.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ki.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/km.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/kn.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/kp.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/kr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/kw.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ky.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/kz.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/la.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/lb.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/lc.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/li.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/lk.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/lr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ls.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/lt.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/lu.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/lv.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ly.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ma.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mc.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/md.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/me.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mg.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mh.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mk.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ml.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mn.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mo.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mp.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mq.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ms.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mt.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mu.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mv.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mw.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mx.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/my.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/mz.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/na.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/nc.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ne.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/nf.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ng.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ni.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/nl.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/no.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/np.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/nr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/nu.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/nz.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/om.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pa.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pe.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pf.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pg.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ph.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pk.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pl.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pn.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ps.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pt.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/pw.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/py.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/qa.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/re.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ro.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/rs.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ru.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/rw.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sa.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sb.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sc.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/scotland.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sd.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/se.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sg.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sh.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/si.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sj.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sk.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sl.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sn.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/so.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/st.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sv.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sy.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/sz.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tc.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/td.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tf.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tg.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/th.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tj.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tk.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tl.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tn.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/to.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tr.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tt.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tv.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tw.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/tz.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ua.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ug.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/um.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/us.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/uy.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/uz.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/va.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/vc.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ve.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/vg.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/vi.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/vn.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/vu.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/wales.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/wf.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ws.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/ye.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/yt.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/za.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/zm.png +0 -0
- data/vendor/extensions/theme_default/public/images/flags/zw.png +0 -0
- data/vendor/extensions/theme_default/public/images/green/left_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/green/right_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/grid.png +0 -0
- data/vendor/extensions/theme_default/public/images/left_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/left_01_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/master_cid.jpg +0 -0
- data/vendor/extensions/theme_default/public/images/menu-current.png +0 -0
- data/vendor/extensions/theme_default/public/images/menu-hover.png +0 -0
- data/vendor/extensions/theme_default/public/images/noimage/mini.jpg +0 -0
- data/vendor/extensions/theme_default/public/images/noimage/product.jpg +0 -0
- data/vendor/extensions/theme_default/public/images/noimage/small.jpg +0 -0
- data/vendor/extensions/theme_default/public/images/openid-inputicon.gif +0 -0
- data/vendor/extensions/theme_default/public/images/orange/left_03.png +0 -0
- data/vendor/extensions/theme_default/public/images/orange/right_03.png +0 -0
- data/vendor/extensions/theme_default/public/images/progress.gif +0 -0
- data/vendor/extensions/theme_default/public/images/rails.png +0 -0
- data/vendor/extensions/theme_default/public/images/right_01.png +0 -0
- data/vendor/extensions/theme_default/public/images/right_01_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/separator.png +0 -0
- data/vendor/extensions/theme_default/public/images/shadow-top.png +0 -0
- data/vendor/extensions/theme_default/public/images/shadow_top.png +0 -0
- data/vendor/extensions/theme_default/public/images/spinner.gif +0 -0
- data/vendor/extensions/theme_default/public/images/spree.jpg +0 -0
- data/vendor/extensions/theme_default/public/images/spree/progress.gif +0 -0
- data/vendor/extensions/theme_default/public/images/spree/spinner.gif +0 -0
- data/vendor/extensions/theme_default/public/images/spree/spree.jpg +0 -0
- data/vendor/extensions/theme_default/public/images/step-progress/completed-completed.gif +0 -0
- data/vendor/extensions/theme_default/public/images/step-progress/completed-current.gif +0 -0
- data/vendor/extensions/theme_default/public/images/step-progress/completed-first.gif +0 -0
- data/vendor/extensions/theme_default/public/images/step-progress/current-first.gif +0 -0
- data/vendor/extensions/theme_default/public/images/step-progress/current-incomplete.gif +0 -0
- data/vendor/extensions/theme_default/public/images/step-progress/current-right.gif +0 -0
- data/vendor/extensions/theme_default/public/images/step-progress/incomplete-incomplete.gif +0 -0
- data/vendor/extensions/theme_default/public/images/step-progress/incomplete-right.gif +0 -0
- data/vendor/extensions/theme_default/public/images/steps/1.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/1_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/2.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/2_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/3.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/3_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/4.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/4_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/5.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/5_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/6.png +0 -0
- data/vendor/extensions/theme_default/public/images/steps/6_small.png +0 -0
- data/vendor/extensions/theme_default/public/images/sxsw-ribbon-v1.png +0 -0
- data/vendor/extensions/theme_default/public/images/tab_bottom.gif +0 -0
- data/vendor/extensions/theme_default/public/images/top-shine.png +0 -0
- data/vendor/extensions/theme_default/public/images/tree-nav-icons/bullet.gif +0 -0
- data/vendor/extensions/theme_default/public/images/tree-nav-icons/minus.gif +0 -0
- data/vendor/extensions/theme_default/public/images/tree-nav-icons/plus.gif +0 -0
- data/vendor/extensions/theme_default/public/images/tree-nav-icons/treeview-loading.gif +0 -0
- data/vendor/extensions/theme_default/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
- data/vendor/extensions/theme_default/public/images/update.png +0 -0
- data/vendor/extensions/theme_default/public/images/visa_cid.gif +0 -0
- data/vendor/extensions/theme_default/public/images/wrapper-back-2.png +0 -0
- data/vendor/extensions/theme_default/public/images/wrapper-back.png +0 -0
- data/vendor/extensions/theme_default/public/images/yui-menubaritem_submenuindicator.png +0 -0
- data/vendor/extensions/theme_default/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
- data/vendor/extensions/theme_default/public/images/yui-menuitem_checkbox.png +0 -0
- data/vendor/extensions/theme_default/public/images/yui-menuitem_checkbox_disabled.png +0 -0
- data/vendor/extensions/theme_default/public/images/yui-menuitem_submenuindicator.png +0 -0
- data/vendor/extensions/theme_default/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
- data/vendor/extensions/theme_default/public/images/yui-sprite.png +0 -0
- data/vendor/extensions/theme_default/public/javascripts/additional-methods.js +236 -0
- data/vendor/extensions/theme_default/public/javascripts/admin/address_states.js +25 -0
- data/vendor/extensions/theme_default/public/javascripts/admin/checkouts/edit.js +79 -0
- data/vendor/extensions/theme_default/public/javascripts/admin/orders/edit.js +96 -0
- data/vendor/extensions/theme_default/public/javascripts/admin/orders/edit_form.js +17 -0
- data/vendor/extensions/theme_default/public/javascripts/admin/payments/new.js +9 -0
- data/vendor/extensions/theme_default/public/javascripts/admin/unobtrusive_handlers.js +15 -0
- data/vendor/extensions/theme_default/public/javascripts/calculator.js +13 -0
- data/vendor/extensions/theme_default/public/javascripts/checkout.js +65 -0
- data/vendor/extensions/theme_default/public/javascripts/datepicker.js +1445 -0
- data/vendor/extensions/theme_default/public/javascripts/gateway.js +13 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery-1.3.2.min.js +19 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery-and-plugins.js +36 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery-ui.js +188 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.alerts/images/help.gif +0 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.alerts/images/important.gif +0 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.alerts/images/info.gif +0 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.alerts/images/title.gif +0 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.alerts/jquery.alerts.css +57 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.alerts/jquery.alerts.js +235 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.alerts/jquery.alerts.spree.css +30 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.autocomplete.min.js +13 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.js +19 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.suggest.js +276 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.template.js +255 -0
- data/vendor/extensions/theme_default/public/javascripts/jquery.validate.min.js +16 -0
- data/vendor/extensions/theme_default/public/javascripts/jrails.autocomplete.js +274 -0
- data/vendor/extensions/theme_default/public/javascripts/jrails.js +1 -0
- data/vendor/extensions/theme_default/public/javascripts/jsTree/jquery.tree.js +2058 -0
- data/vendor/extensions/theme_default/public/javascripts/jsTree/plugins/jquery.tree.contextmenu.js +129 -0
- data/vendor/extensions/theme_default/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
- data/{public/javascripts/jsTree/source/themes/spree/dot.gif → vendor/extensions/theme_default/public/javascripts/jsTree/themes/apple/dot_for_ie.gif} +0 -0
- data/vendor/extensions/theme_default/public/javascripts/jsTree/themes/apple/icons.png +0 -0
- data/vendor/extensions/theme_default/public/javascripts/jsTree/themes/apple/style.css +34 -0
- data/{public/javascripts/jsTree/source/themes/spree → vendor/extensions/theme_default/public/javascripts/jsTree/themes/apple}/throbber.gif +0 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/af.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/ar.js +50 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/de.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/du.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/en.js +42 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/es.js +41 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/fi.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/fr.js +44 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/gr.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/he.js +49 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/it.js +13 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/nl.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/no.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/pt.js +50 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/ro.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/ru.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/sp.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/sv.js +41 -0
- data/vendor/extensions/theme_default/public/javascripts/lang/ua.js +40 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_cn.js +24 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_cs.js +23 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_da.js +21 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_de.js +21 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_es.js +24 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_fr.js +23 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_hu.js +21 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_it.js +26 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_kk.js +23 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_nl.js +23 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_no.js +23 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_pl.js +23 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_ptbr.js +30 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_ro.js +24 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_ru.js +23 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_se.js +23 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_sk.js +21 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_tr.js +24 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_tw.js +24 -0
- data/vendor/extensions/theme_default/public/javascripts/localization/messages_ua.js +24 -0
- data/vendor/extensions/theme_default/public/javascripts/nested-attribute.js +25 -0
- data/vendor/extensions/theme_default/public/javascripts/open_id.js +15 -0
- data/vendor/extensions/theme_default/public/javascripts/product.js +49 -0
- data/vendor/extensions/theme_default/public/javascripts/spree.js +53 -0
- data/vendor/extensions/theme_default/public/javascripts/taxonomy.js +196 -0
- data/vendor/extensions/theme_default/public/javascripts/zone.js +40 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/admin-forms.css +159 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/admin-reset.css +67 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/admin-tables.css +31 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/admin-typography.css +117 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/admin.css +556 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/edit_checkouts.css +57 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/edit_orders.css +65 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/grids.css +314 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +7 -0
- data/vendor/extensions/theme_default/public/stylesheets/admin/yui-includes.css +14 -0
- data/vendor/extensions/theme_default/public/stylesheets/datepicker.css +263 -0
- data/vendor/extensions/theme_default/public/stylesheets/jquery.autocomplete.css +48 -0
- data/vendor/extensions/theme_default/public/stylesheets/scaffold.css +54 -0
- data/vendor/extensions/theme_default/public/stylesheets/screen.css +1181 -0
- data/vendor/extensions/theme_default/spec/spec.opts +6 -0
- data/vendor/extensions/theme_default/spec/spec_helper.rb +37 -0
- data/vendor/extensions/theme_default/theme_default_extension.rb +39 -0
- data/vendor/extensions/theme_default/theme_default_hooks.rb +2 -0
- data/vendor/plugins/attribute_fu/init.rb +10 -2
- data/vendor/plugins/attribute_fu/javascripts/jquery.template.js +255 -0
- data/vendor/plugins/attribute_fu/lib/attribute_fu/associated_form_helper.rb +12 -19
- data/vendor/plugins/attribute_fu/test/associated_form_helper_test.rb +48 -50
- data/vendor/plugins/awesome_nested_set/MIT-LICENSE +20 -0
- data/vendor/plugins/awesome_nested_set/README.rdoc +79 -0
- data/vendor/plugins/awesome_nested_set/Rakefile +54 -0
- data/vendor/plugins/awesome_nested_set/VERSION +1 -0
- data/vendor/plugins/awesome_nested_set/awesome_nested_set.gemspec +68 -0
- data/vendor/plugins/awesome_nested_set/init.rb +1 -0
- data/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb +592 -0
- data/vendor/plugins/awesome_nested_set/lib/awesome_nested_set/helper.rb +40 -0
- data/vendor/plugins/awesome_nested_set/rails/init.rb +12 -0
- data/vendor/plugins/awesome_nested_set/test/application.rb +1 -0
- data/vendor/plugins/awesome_nested_set/test/awesome_nested_set/helper_test.rb +41 -0
- data/vendor/plugins/awesome_nested_set/test/awesome_nested_set_test.rb +758 -0
- data/vendor/plugins/awesome_nested_set/test/db/database.yml +18 -0
- data/vendor/plugins/awesome_nested_set/test/db/schema.rb +30 -0
- data/vendor/plugins/awesome_nested_set/test/fixtures/categories.yml +34 -0
- data/vendor/plugins/awesome_nested_set/test/fixtures/category.rb +15 -0
- data/vendor/plugins/awesome_nested_set/test/fixtures/departments.yml +3 -0
- data/vendor/plugins/awesome_nested_set/test/fixtures/notes.yml +38 -0
- data/vendor/plugins/awesome_nested_set/test/test_helper.rb +29 -0
- data/vendor/plugins/has_calculator/lib/has_calculator.rb +2 -2
- data/vendor/plugins/jrails/CHANGELOG +43 -0
- data/vendor/plugins/jrails/LICENSE +18 -0
- data/vendor/plugins/jrails/README.rdoc +21 -0
- data/vendor/plugins/jrails/Rakefile +18 -0
- data/vendor/plugins/jrails/VERSION.yml +4 -0
- data/vendor/plugins/jrails/bin/jrails +30 -0
- data/vendor/plugins/jrails/init.rb +1 -0
- data/vendor/plugins/jrails/install.rb +9 -0
- data/vendor/plugins/jrails/javascripts/jquery-ui.js +188 -0
- data/vendor/plugins/jrails/javascripts/jquery.js +19 -0
- data/vendor/plugins/jrails/javascripts/jrails.js +1 -0
- data/vendor/plugins/jrails/javascripts/sources/jrails.js +197 -0
- data/vendor/plugins/jrails/jrails.gemspec +50 -0
- data/vendor/plugins/jrails/lib/jrails.rb +421 -0
- data/vendor/plugins/jrails/rails/init.rb +15 -0
- data/vendor/plugins/jrails/tasks/jrails.rake +25 -0
- data/vendor/plugins/{acts_as_adjacency_list → jrails_auto_complete}/MIT-LICENSE +0 -0
- data/vendor/plugins/jrails_auto_complete/README +23 -0
- data/vendor/plugins/jrails_auto_complete/Rakefile +22 -0
- data/vendor/plugins/jrails_auto_complete/init.rb +2 -0
- data/vendor/plugins/jrails_auto_complete/install.rb +8 -0
- data/vendor/plugins/jrails_auto_complete/javascripts/jquery.suggest.js +276 -0
- data/vendor/plugins/jrails_auto_complete/javascripts/jrails.autocomplete.js +274 -0
- data/vendor/plugins/jrails_auto_complete/lib/form_helpers.rb +22 -0
- data/vendor/plugins/jrails_auto_complete/lib/jrails_auto_complete.rb +20 -0
- data/vendor/plugins/jrails_auto_complete/lib/jrails_auto_complete_macro_helper.rb +103 -0
- data/vendor/plugins/jrails_auto_complete/tasks/jrails_auto_complete_tasks.rake +4 -0
- data/vendor/plugins/jrails_auto_complete/test/jrails_auto_complete_test.rb +8 -0
- data/vendor/plugins/jrails_auto_complete/uninstall.rb +7 -0
- data/vendor/plugins/open_id_authentication/CHANGELOG +35 -0
- data/vendor/plugins/open_id_authentication/README +231 -0
- data/vendor/plugins/open_id_authentication/Rakefile +22 -0
- data/vendor/plugins/open_id_authentication/generators/open_id_authentication_tables/open_id_authentication_tables_generator.rb +11 -0
- data/vendor/plugins/open_id_authentication/generators/open_id_authentication_tables/templates/migration.rb +20 -0
- data/vendor/plugins/open_id_authentication/generators/upgrade_open_id_authentication_tables/templates/migration.rb +26 -0
- data/vendor/plugins/open_id_authentication/generators/upgrade_open_id_authentication_tables/upgrade_open_id_authentication_tables_generator.rb +11 -0
- data/vendor/plugins/open_id_authentication/init.rb +18 -0
- data/vendor/plugins/open_id_authentication/lib/open_id_authentication.rb +240 -0
- data/vendor/plugins/open_id_authentication/lib/open_id_authentication/association.rb +9 -0
- data/vendor/plugins/open_id_authentication/lib/open_id_authentication/db_store.rb +55 -0
- data/vendor/plugins/open_id_authentication/lib/open_id_authentication/nonce.rb +5 -0
- data/vendor/plugins/open_id_authentication/lib/open_id_authentication/request.rb +23 -0
- data/vendor/plugins/open_id_authentication/lib/open_id_authentication/timeout_fixes.rb +20 -0
- data/vendor/plugins/open_id_authentication/tasks/open_id_authentication_tasks.rake +30 -0
- data/vendor/plugins/open_id_authentication/test/normalize_test.rb +32 -0
- data/vendor/plugins/open_id_authentication/test/open_id_authentication_test.rb +46 -0
- data/vendor/plugins/open_id_authentication/test/status_test.rb +14 -0
- data/vendor/plugins/open_id_authentication/test/test_helper.rb +17 -0
- data/vendor/plugins/resource_controller/lib/resource_controller/actions.rb +4 -4
- data/vendor/plugins/resource_controller/lib/resource_controller/controller.rb +17 -17
- data/vendor/plugins/resource_controller/lib/resource_controller/helpers/current_objects.rb +1 -1
- data/vendor/plugins/stump/License.txt +20 -0
- data/vendor/plugins/stump/README.rdoc +118 -0
- data/vendor/plugins/stump/init.rb +6 -0
- data/vendor/plugins/stump/lib/stump.rb +11 -0
- data/vendor/plugins/stump/lib/stump/core_ext/test_case.rb +21 -0
- data/vendor/plugins/stump/lib/stump/metaid.rb +17 -0
- data/vendor/plugins/stump/lib/stump/mock.rb +51 -0
- data/vendor/plugins/stump/lib/stump/mocks.rb +23 -0
- data/vendor/plugins/stump/lib/stump/proxy.rb +103 -0
- data/vendor/plugins/stump/lib/stump/stub.rb +34 -0
- data/vendor/plugins/stump/lib/stump/version.rb +9 -0
- data/vendor/plugins/unobtrusive_date_picker/MIT-LICENSE +19 -0
- data/vendor/plugins/unobtrusive_date_picker/README.rdoc +165 -0
- data/vendor/plugins/unobtrusive_date_picker/Rakefile +18 -0
- data/vendor/plugins/unobtrusive_date_picker/about.yml +7 -0
- data/vendor/plugins/unobtrusive_date_picker/init.rb +8 -0
- data/vendor/plugins/unobtrusive_date_picker/install.rb +14 -0
- data/vendor/plugins/unobtrusive_date_picker/lib/12_hour_time.rb +102 -0
- data/vendor/plugins/unobtrusive_date_picker/lib/unobtrusive_date_picker.rb +409 -0
- data/vendor/plugins/unobtrusive_date_picker/public/images/backstripes.gif +0 -0
- data/vendor/plugins/unobtrusive_date_picker/public/images/bg_header.jpg +0 -0
- data/vendor/plugins/unobtrusive_date_picker/public/images/bullet1.gif +0 -0
- data/vendor/plugins/unobtrusive_date_picker/public/images/bullet2.gif +0 -0
- data/vendor/plugins/unobtrusive_date_picker/public/images/cal.gif +0 -0
- data/vendor/plugins/unobtrusive_date_picker/public/images/gradient-e5e5e5-ffffff.gif +0 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/datepicker.js +1445 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/af.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/ar.js +50 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/de.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/du.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/en.js +42 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/es.js +41 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/fi.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/fr.js +44 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/gr.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/he.js +49 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/it.js +13 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/nl.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/no.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/pt.js +50 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/ro.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/ru.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/sp.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/sv.js +41 -0
- data/vendor/plugins/unobtrusive_date_picker/public/javascripts/lang/ua.js +40 -0
- data/vendor/plugins/unobtrusive_date_picker/public/stylesheets/datepicker.css +263 -0
- data/vendor/plugins/unobtrusive_date_picker/spec/date_picker_tag_spec.rb +122 -0
- data/vendor/plugins/unobtrusive_date_picker/spec/date_picker_text_field_spec.rb +54 -0
- data/vendor/plugins/unobtrusive_date_picker/spec/datepicker_html_class_options_spec.rb +281 -0
- data/vendor/plugins/unobtrusive_date_picker/spec/spec.opts +12 -0
- data/vendor/plugins/unobtrusive_date_picker/spec/spec_helper.rb +52 -0
- data/vendor/plugins/unobtrusive_date_picker/spec/tag_matcher.rb +142 -0
- data/vendor/plugins/unobtrusive_date_picker/spec/unobtrusive_date_picker_spec.rb +129 -0
- data/vendor/plugins/unobtrusive_date_picker/tasks/datepicker_tasks.rake +17 -0
- data/vendor/plugins/unobtrusive_date_picker/uninstall.rb +12 -0
- metadata +1441 -633
- data/app/controllers/admin/creditcard_payments_controller.rb +0 -49
- data/app/controllers/application.rb +0 -94
- data/app/helpers/admin/calculators_helper.rb +0 -2
- data/app/helpers/admin/configurations_helper.rb +0 -2
- data/app/helpers/admin/extensions_helper.rb +0 -2
- data/app/helpers/admin/mail_settings_helper.rb +0 -2
- data/app/helpers/admin/option_values_helper.rb +0 -2
- data/app/helpers/admin/shipping_categories_helper.rb +0 -2
- data/app/helpers/admin/shipping_methods_helper.rb +0 -2
- data/app/helpers/admin/tax_rates_helper.rb +0 -2
- data/app/helpers/admin/taxonomies_helper.rb +0 -3
- data/app/helpers/admin/variants_helper.rb +0 -2
- data/app/models/creditcard_payment.rb +0 -26
- data/app/models/order_observer.rb +0 -15
- data/app/views/admin/configurations/index.html.erb +0 -62
- data/app/views/admin/coupons/edit.html.erb +0 -8
- data/app/views/admin/coupons/index.html.erb +0 -38
- data/app/views/admin/coupons/new.html.erb +0 -9
- data/app/views/admin/creditcard_payments/edit.html.erb +0 -38
- data/app/views/admin/creditcard_payments/new.html.erb +0 -15
- data/app/views/admin/images/_form.html.erb +0 -12
- data/app/views/admin/option_types/_form.html.erb +0 -33
- data/app/views/admin/option_types/index.html.erb +0 -39
- data/app/views/admin/option_types/selected.html.erb +0 -38
- data/app/views/admin/orders/index.html.erb +0 -80
- data/app/views/admin/orders/show.html.erb +0 -70
- data/app/views/admin/overview/index.html.erb +0 -3
- data/app/views/admin/payments/index.html.erb +0 -30
- data/app/views/admin/product_properties/_product_property.html.erb +0 -25
- data/app/views/admin/product_properties/index.html.erb +0 -44
- data/app/views/admin/products/_form.html.erb +0 -92
- data/app/views/admin/products/_option_types.html.erb +0 -42
- data/app/views/admin/products/index.html.erb +0 -74
- data/app/views/admin/products/new.html.erb +0 -53
- data/app/views/admin/properties/index.html.erb +0 -45
- data/app/views/admin/prototypes/available.html.erb +0 -27
- data/app/views/admin/prototypes/index.html.erb +0 -42
- data/app/views/admin/prototypes/new.html.erb +0 -11
- data/app/views/admin/prototypes/select.rjs +0 -7
- data/app/views/admin/reports/index.html.erb +0 -23
- data/app/views/admin/shared/_additional_field.html.erb +0 -5
- data/app/views/admin/shared/_address.html.erb +0 -15
- data/app/views/admin/shared/_calculator_fields.html.erb +0 -15
- data/app/views/admin/shared/_configuration_menu.html.erb +0 -18
- data/app/views/admin/shared/_form_address.html.erb +0 -56
- data/app/views/admin/shared/_order_tabs.html.erb +0 -27
- data/app/views/admin/shared/_product_sub_menu.html.erb +0 -8
- data/app/views/admin/shared/_product_tabs.html.erb +0 -48
- data/app/views/admin/shared/_report_criteria.html.erb +0 -19
- data/app/views/admin/shipments/_details.html.erb +0 -19
- data/app/views/admin/shipments/_form.html.erb +0 -31
- data/app/views/admin/shipments/edit.html.erb +0 -12
- data/app/views/admin/shipments/index.html.erb +0 -22
- data/app/views/admin/shipments/new.html.erb +0 -14
- data/app/views/admin/shipping_categories/edit.html.erb +0 -8
- data/app/views/admin/shipping_categories/index.html.erb +0 -27
- data/app/views/admin/shipping_categories/new.html.erb +0 -10
- data/app/views/admin/shipping_methods/_form.html.erb +0 -12
- data/app/views/admin/shipping_methods/edit.html.erb +0 -8
- data/app/views/admin/shipping_methods/index.html.erb +0 -34
- data/app/views/admin/shipping_methods/new.html.erb +0 -10
- data/app/views/admin/shipping_rates/edit.html.erb +0 -8
- data/app/views/admin/shipping_rates/index.html.erb +0 -30
- data/app/views/admin/shipping_rates/new.html.erb +0 -10
- data/app/views/admin/states/edit.html.erb +0 -12
- data/app/views/admin/states/index.html.erb +0 -25
- data/app/views/admin/states/new.html.erb +0 -12
- data/app/views/admin/tax_categories/edit.html.erb +0 -12
- data/app/views/admin/tax_categories/index.html.erb +0 -37
- data/app/views/admin/tax_categories/new.html.erb +0 -12
- data/app/views/admin/tax_rates/edit.html.erb +0 -8
- data/app/views/admin/tax_rates/index.html.erb +0 -32
- data/app/views/admin/tax_rates/new.html.erb +0 -10
- data/app/views/admin/taxonomies/_form.html.erb +0 -5
- data/app/views/admin/taxonomies/_js_head.html.erb +0 -13
- data/app/views/admin/taxonomies/edit.html.erb +0 -30
- data/app/views/admin/taxons/_taxon_table.html.erb +0 -28
- data/app/views/admin/taxons/available.js.erb +0 -36
- data/app/views/admin/taxons/selected.html.erb +0 -25
- data/app/views/admin/users/_form.html.erb +0 -35
- data/app/views/admin/users/edit.html.erb +0 -9
- data/app/views/admin/users/index.html.erb +0 -48
- data/app/views/admin/users/new.html.erb +0 -11
- data/app/views/admin/variants/_form.html.erb +0 -40
- data/app/views/admin/variants/edit.html.erb +0 -10
- data/app/views/admin/variants/index.html.erb +0 -56
- data/app/views/admin/variants/new.html.erb +0 -8
- data/app/views/admin/zones/_country_member.html.erb +0 -5
- data/app/views/admin/zones/_form.html.erb +0 -29
- data/app/views/admin/zones/_state_member.html.erb +0 -5
- data/app/views/admin/zones/_zone_member.html.erb +0 -5
- data/app/views/admin/zones/edit.html.erb +0 -12
- data/app/views/admin/zones/index.html.erb +0 -40
- data/app/views/admin/zones/new.html.erb +0 -12
- data/app/views/checkouts/_billing.html.erb +0 -66
- data/app/views/checkouts/_confirmation.html.erb +0 -11
- data/app/views/checkouts/_form.html.erb +0 -20
- data/app/views/checkouts/_payment.html.erb +0 -45
- data/app/views/checkouts/_registration.html.erb +0 -60
- data/app/views/checkouts/_shipping.html.erb +0 -68
- data/app/views/checkouts/_shipping_method.html.erb +0 -19
- data/app/views/checkouts/_summary.html.erb +0 -36
- data/app/views/checkouts/edit.html.erb +0 -13
- data/app/views/checkouts/new.html.erb +0 -13
- data/app/views/layouts/admin.html.erb +0 -91
- data/app/views/layouts/application.html.erb +0 -47
- data/app/views/layouts/checkouts.html.erb +0 -17
- data/app/views/line_items/index.html.erb +0 -1
- data/app/views/orders/_form.html.erb +0 -19
- data/app/views/orders/_google_order.html.erb +0 -24
- data/app/views/orders/_line_item.html.erb +0 -23
- data/app/views/orders/edit.html.erb +0 -22
- data/app/views/orders/show.html.erb +0 -19
- data/app/views/password_resets/edit.html.erb +0 -12
- data/app/views/password_resets/new.html.erb +0 -11
- data/app/views/products/_cart_form.html.erb +0 -77
- data/app/views/products/_products.html.erb +0 -14
- data/app/views/products/_properties.html.erb +0 -8
- data/app/views/products/_thumbnails.html.erb +0 -58
- data/app/views/products/index.html.erb +0 -11
- data/app/views/products/show.html.erb +0 -24
- data/app/views/shared/_additional_field.html.erb +0 -7
- data/app/views/shared/_filters.html.erb +0 -52
- data/app/views/shared/_footer.html.erb +0 -21
- data/app/views/shared/_head.html.erb +0 -6
- data/app/views/shared/_login.html.erb +0 -18
- data/app/views/shared/_order_details.html.erb +0 -46
- data/app/views/shared/_order_tabs.html.erb +0 -32
- data/app/views/shared/_product_sub_menu.html.erb +0 -10
- data/app/views/shared/_product_tabs.html.erb +0 -39
- data/app/views/shared/_products.html.erb +0 -22
- data/app/views/shared/_report_criteria.html.erb +0 -33
- data/app/views/shared/_taxonomies.html.erb +0 -10
- data/app/views/taxons/show.html.erb +0 -12
- data/app/views/user_sessions/new.html.erb +0 -6
- data/app/views/users/_form.html.erb +0 -16
- data/app/views/users/edit.html.erb +0 -9
- data/app/views/users/new.html.erb +0 -12
- data/app/views/users/show.html.erb +0 -39
- data/config/environments/demo.rb +0 -22
- data/config/initializers/compass.rb +0 -8
- data/db/migrate/001_create_addresses.rb +0 -20
- data/db/migrate/002_create_cart_items.rb +0 -13
- data/db/migrate/003_create_carts.rb +0 -12
- data/db/migrate/004_create_categories.rb +0 -15
- data/db/migrate/005_create_categories_products.rb +0 -12
- data/db/migrate/006_create_line_items.rb +0 -15
- data/db/migrate/007_create_option_values.rb +0 -15
- data/db/migrate/008_create_orders.rb +0 -23
- data/db/migrate/009_create_products.rb +0 -16
- data/db/migrate/010_create_txns.rb +0 -18
- data/db/migrate/011_create_variants.rb +0 -13
- data/db/migrate/012_create_tax_treatments.rb +0 -24
- data/db/migrate/013_create_countries.rb +0 -11
- data/db/migrate/014_create_states.rb +0 -13
- data/db/migrate/015_create_option_types.rb +0 -13
- data/db/migrate/016_create_product_option_types.rb +0 -14
- data/db/migrate/017_create_option_values_variants.rb +0 -12
- data/db/migrate/018_create_images.rb +0 -20
- data/db/migrate/019_create_credit_cards.rb +0 -20
- data/db/migrate/020_create_order_operations.rb +0 -14
- data/db/migrate/021_create_inventory_units.rb +0 -15
- data/db/migrate/022_create_users.rb +0 -17
- data/db/migrate/023_create_roles.rb +0 -20
- data/db/migrate/024_create_extension_meta.rb +0 -13
- data/db/migrate/025_drop_tax_treatments.rb +0 -11
- data/db/migrate/026_add_user_to_address.rb +0 -9
- data/db/migrate/20080620100001_create_tax_rates.rb +0 -13
- data/db/migrate/20080620113300_create_taxonomies.rb +0 -13
- data/db/migrate/20080620113400_create_taxons.rb +0 -16
- data/db/migrate/20080622173128_drop_extension_meta.rb +0 -13
- data/db/migrate/20080622194800_create_prototypes.rb +0 -13
- data/db/migrate/20080622194830_create_properties.rb +0 -13
- data/db/migrate/20080622195000_create_properties_prototypes.rb +0 -12
- data/db/migrate/20080622195100_create_property_values.rb +0 -14
- data/db/migrate/20080630003326_create_zones.rb +0 -13
- data/db/migrate/20080630150630_create_preferences.rb +0 -19
- data/db/migrate/20080630152702_add_iso_country_information.rb +0 -19
- data/db/migrate/20080630154400_create_countries_zones.rb +0 -12
- data/db/migrate/20080630215310_create_zone_members.rb +0 -13
- data/db/migrate/20080703184654_update_country_rename_name.rb +0 -15
- data/db/migrate/20080704181428_create_app_configurations.rb +0 -12
- data/db/migrate/20080704190355_add_permalink_and_published_to_products.rb +0 -15
- data/db/migrate/20080704192456_update_tax_rates_add_zones_etc.rb +0 -17
- data/db/migrate/20080707002329_create_tax_categories.rb +0 -21
- data/db/migrate/20080708170103_remove_login.rb +0 -9
- data/db/migrate/20080715014028_add_optimistic_locking_to_cart.rb +0 -13
- data/db/migrate/20080716155613_products_taxons.rb +0 -12
- data/db/migrate/20080720190623_rename_txn_table.rb +0 -9
- data/db/migrate/20080729213052_drop_categories.rb +0 -8
- data/db/migrate/20080803010846_remove_prototype_presentation.rb +0 -13
- data/db/migrate/20080807214829_create_product_property.rb +0 -15
- data/db/migrate/20080815173251_remove_cart.rb +0 -10
- data/db/migrate/20080830173354_add_checkout_state_to_order.rb +0 -13
- data/db/migrate/20080901002711_address_refactor.rb +0 -14
- data/db/migrate/20080902001408_create_creditcard_payments.rb +0 -17
- data/db/migrate/20080904150723_refactor_order_state.rb +0 -33
- data/db/migrate/20080904234457_create_state_events.rb +0 -15
- data/db/migrate/20080905012833_add_inventory_state.rb +0 -13
- data/db/migrate/20080906174748_change_inventory_state_type.rb +0 -8
- data/db/migrate/20080909100504_add_state_name_to_address.rb +0 -9
- data/db/migrate/20080915211650_remove_user_address.rb +0 -10
- data/db/migrate/20080918083321_remove_presentation_from_taxonomy.rb +0 -11
- data/db/migrate/20080918140438_rename_app_configuration.rb +0 -16
- data/db/migrate/20081003211336_create_shipping_methods.rb +0 -14
- data/db/migrate/20081003233427_create_shipping_categories.rb +0 -15
- data/db/migrate/20081015001711_create_shipments.rb +0 -14
- data/db/migrate/20081016002224_remove_defunct_order_fields.rb +0 -10
- data/db/migrate/20081016162924_drop_category_id_from_products.rb +0 -9
- data/db/migrate/20081018125019_refactor_images_for_paperclip.rb +0 -40
- data/db/migrate/20081023134446_add_product_dimensions.rb +0 -19
- data/db/migrate/20081120184215_add_permalink_to_taxons.rb +0 -24
- data/db/migrate/20081121192045_additional_paperclip_refactor.rb +0 -37
- data/db/migrate/20081205155619_add_shipped_at_property.rb +0 -17
- data/db/migrate/20081208143817_create_creditcards.rb +0 -20
- data/db/migrate/20081208150007_create_payments_table.rb +0 -42
- data/db/migrate/20081209103127_add_deleted_at_to_products.rb +0 -11
- data/db/migrate/20081212015915_convert_credticard_number_to_text.rb +0 -11
- data/db/migrate/20081219091142_create_indexes.rb +0 -23
- data/db/migrate/20081221201510_create_shipping_addresses.rb +0 -16
- data/db/migrate/20090105152846_add_previous_state_to_events.rb +0 -13
- data/db/migrate/20090204200045_add_order_permalink.rb +0 -13
- data/db/migrate/20090225231119_add_more_needed_keys_items_and_conf.rb +0 -19
- data/db/migrate/20090302221152_give_all_users_user_role.rb +0 -14
- data/db/migrate/20090320113300_authlogic_changes.rb +0 -24
- data/db/migrate/20090324164010_create_option_types_prototypes.rb +0 -12
- data/db/migrate/20090401120636_meta_data_fields_for_products.rb +0 -11
- data/db/migrate/20090401203712_remove_hmp_stuff_in_zones.rb +0 -12
- data/db/migrate/20090401223217_create_eu_vat_zone_again.rb +0 -24
- data/db/migrate/20090402002244_add_user_login.rb +0 -17
- data/db/migrate/20090402161055_add_order_token.rb +0 -13
- data/db/migrate/20090402200317_add_email_to_order.rb +0 -19
- data/db/migrate/20090404192723_add_maestro_fields.rb +0 -12
- data/db/migrate/20090406091357_add_alternative_phone.rb +0 -9
- data/db/migrate/20090406174645_refactor_addresses.rb +0 -53
- data/db/migrate/20090420021303_remove_viewable_id_from_products.rb +0 -10
- data/db/migrate/20090427000000_upgrade_taxons.rb +0 -14
- data/db/migrate/20090525000325_remove_address_orphans.rb +0 -15
- data/db/migrate/20090603153927_create_checkouts.rb +0 -71
- data/db/migrate/20090617181106_change_txn_type_to_int.rb +0 -18
- data/db/migrate/20090618203233_create_charges.rb +0 -61
- data/db/migrate/20090626235303_create_credits.rb +0 -22
- data/db/migrate/20090705101511_add_image_dimensions.rb +0 -12
- data/db/migrate/20090708175306_create_coupons.rb +0 -16
- data/db/migrate/20090708175317_create_discounts.rb +0 -14
- data/db/migrate/20090714094201_add_default_addresses_to_user.rb +0 -11
- data/db/migrate/20090715172345_create_calculators.rb +0 -22
- data/db/migrate/20090731085008_add_charge_source_to_charge.rb +0 -11
- data/db/migrate/20090803072025_create_shipping_rates.rb +0 -12
- data/db/migrate/20090804090559_create_calculators_for_tax_rates.rb +0 -16
- data/db/migrate/20090805131937_drop_credits_and_discounts.rb +0 -9
- data/db/migrate/20090805185015_remove_tax_type.rb +0 -13
- data/db/migrate/20090806063212_rename_charges_to_adjustments.rb +0 -24
- data/db/migrate/20090806160214_rename_base_to_source.rb +0 -11
- data/db/migrate/20090809170304_remove_checkout_shipping_address_and_method.rb +0 -15
- data/db/migrate/20090809193131_add_is_master_to_variants.rb +0 -43
- data/db/migrate/20090809201209_drop_master_price_from_products.rb +0 -13
- data/db/migrate/20090809231957_update_legacy_calculators.rb +0 -9
- data/db/migrate/20090823005402_coupon_starts_at.rb +0 -13
- data/db/migrate/20090828114732_add_queued_mail.rb +0 -12
- data/db/migrate/20090908141056_adjust_percent_calc_settings.rb +0 -9
- data/db/migrate/migrate/20080620100001_create_tax_rates.rb +0 -13
- data/db/migrate/migrate/20080704192456_update_tax_rates_add_zones_etc.rb +0 -17
- data/db/sample/creditcard_txns.yml +0 -7
- data/db/sample/creditcards.yml +0 -10
- data/db/sample/inventory_units.yml +0 -93
- data/db/sample/payments.yml +0 -7
- data/lib/product_scopes.rb +0 -76
- data/lib/spree/setup.rb +0 -148
- data/public/javascripts/application.js +0 -36
- data/public/javascripts/calendar_date_select/calendar_date_select.js +0 -439
- data/public/javascripts/calendar_date_select/format_american.js +0 -34
- data/public/javascripts/calendar_date_select/format_db.js +0 -27
- data/public/javascripts/calendar_date_select/format_euro_24hr.js +0 -7
- data/public/javascripts/calendar_date_select/format_euro_24hr_ymd.js +0 -7
- data/public/javascripts/calendar_date_select/format_finnish.js +0 -24
- data/public/javascripts/calendar_date_select/format_hyphen_ampm.js +0 -36
- data/public/javascripts/calendar_date_select/format_iso_date.js +0 -46
- data/public/javascripts/calendar_date_select/format_italian.js +0 -24
- data/public/javascripts/calendar_date_select/locale/de.js +0 -11
- data/public/javascripts/calendar_date_select/locale/fi.js +0 -10
- data/public/javascripts/calendar_date_select/locale/fr.js +0 -10
- data/public/javascripts/calendar_date_select/locale/pl.js +0 -10
- data/public/javascripts/calendar_date_select/locale/pt.js +0 -11
- data/public/javascripts/calendar_date_select/locale/ru.js +0 -10
- data/public/javascripts/controls.js +0 -963
- data/public/javascripts/dragdrop.js +0 -972
- data/public/javascripts/effects.js +0 -1120
- data/public/javascripts/jsTree/source/_lib.js +0 -126
- data/public/javascripts/jsTree/source/themes/default/context.gif +0 -0
- data/public/javascripts/jsTree/source/themes/default/create.png +0 -0
- data/public/javascripts/jsTree/source/themes/default/f.png +0 -0
- data/public/javascripts/jsTree/source/themes/default/fminus.gif +0 -0
- data/public/javascripts/jsTree/source/themes/default/fminus_rtl.gif +0 -0
- data/public/javascripts/jsTree/source/themes/default/fplus.gif +0 -0
- data/public/javascripts/jsTree/source/themes/default/fplus_rtl.gif +0 -0
- data/public/javascripts/jsTree/source/themes/default/lastli.gif +0 -0
- data/public/javascripts/jsTree/source/themes/default/lastli_rtl.gif +0 -0
- data/public/javascripts/jsTree/source/themes/default/li.gif +0 -0
- data/public/javascripts/jsTree/source/themes/default/remove.png +0 -0
- data/public/javascripts/jsTree/source/themes/default/rename.png +0 -0
- data/public/javascripts/jsTree/source/themes/default/style.css +0 -44
- data/public/javascripts/jsTree/source/themes/marker.gif +0 -0
- data/public/javascripts/jsTree/source/themes/marker_rtl.gif +0 -0
- data/public/javascripts/jsTree/source/themes/plus.gif +0 -0
- data/public/javascripts/jsTree/source/themes/remove.png +0 -0
- data/public/javascripts/jsTree/source/themes/spree/context.gif +0 -0
- data/public/javascripts/jsTree/source/themes/spree/create.png +0 -0
- data/public/javascripts/jsTree/source/themes/spree/f.png +0 -0
- data/public/javascripts/jsTree/source/themes/spree/fminus.gif +0 -0
- data/public/javascripts/jsTree/source/themes/spree/fminus_rtl.gif +0 -0
- data/public/javascripts/jsTree/source/themes/spree/fplus.gif +0 -0
- data/public/javascripts/jsTree/source/themes/spree/fplus_rtl.gif +0 -0
- data/public/javascripts/jsTree/source/themes/spree/lastli.gif +0 -0
- data/public/javascripts/jsTree/source/themes/spree/li.gif +0 -0
- data/public/javascripts/jsTree/source/themes/spree/remove.png +0 -0
- data/public/javascripts/jsTree/source/themes/spree/rename.png +0 -0
- data/public/javascripts/jsTree/source/themes/spree/style.css +0 -39
- data/public/javascripts/jsTree/source/tree_component.css +0 -62
- data/public/javascripts/jsTree/source/tree_component.js +0 -2315
- data/public/javascripts/jsTree/source/tree_component.min.js +0 -14
- data/public/javascripts/prototype.js +0 -4225
- data/public/stylesheets/application.css +0 -7
- data/public/stylesheets/calendar_date_select/blue.css +0 -130
- data/public/stylesheets/calendar_date_select/default.css +0 -135
- data/public/stylesheets/calendar_date_select/plain.css +0 -128
- data/public/stylesheets/calendar_date_select/red.css +0 -135
- data/public/stylesheets/calendar_date_select/silver.css +0 -133
- data/public/stylesheets/sass/_buttons.sass +0 -59
- data/public/stylesheets/sass/_cart.sass +0 -21
- data/public/stylesheets/sass/_checkout.sass +0 -173
- data/public/stylesheets/sass/_colors.sass +0 -11
- data/public/stylesheets/sass/_layout.sass +0 -63
- data/public/stylesheets/sass/_messages.sass +0 -28
- data/public/stylesheets/sass/_mixins.sass +0 -17
- data/public/stylesheets/sass/_navigation.sass +0 -97
- data/public/stylesheets/sass/_prices.sass +0 -13
- data/public/stylesheets/sass/_product_detail.sass +0 -27
- data/public/stylesheets/sass/_product_thumbnail.sass +0 -58
- data/public/stylesheets/sass/_registration.sass +0 -18
- data/public/stylesheets/sass/ie.sass +0 -3
- data/public/stylesheets/sass/print.sass +0 -3
- data/public/stylesheets/sass/screen.sass +0 -22
- data/spec/fixtures/gateway_configurations.yml +0 -3
- data/spec/models/preference_definition_spec.rb +0 -184
- data/spec/preference_factory.rb +0 -58
- data/spec/views/admin/configurations/index.html.erb_spec.rb +0 -37
- data/test/factories/creditcard_payment_factory.rb +0 -11
- data/test/fixtures/gateway_configurations.yml +0 -2
- data/test/fixtures/gateways.yml +0 -4
- data/test/unit/helpers/checkouts_helper_test.rb +0 -26
- data/test/unit/incomplete_checkout_test.rb +0 -68
- data/vendor/extensions/payment_gateway/app/controllers/admin/gateway_configurations_controller.rb +0 -26
- data/vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb +0 -24
- data/vendor/extensions/payment_gateway/app/controllers/admin/gateways_controller.rb +0 -9
- data/vendor/extensions/payment_gateway/app/models/gateway_configuration.rb +0 -4
- data/vendor/extensions/payment_gateway/app/models/gateway_option.rb +0 -4
- data/vendor/extensions/payment_gateway/app/models/gateway_option_value.rb +0 -4
- data/vendor/extensions/payment_gateway/app/views/admin/gateway_configurations/_form.html.erb +0 -21
- data/vendor/extensions/payment_gateway/app/views/admin/gateway_configurations/edit.html.erb +0 -10
- data/vendor/extensions/payment_gateway/app/views/admin/gateway_option_values/_options.html.erb +0 -28
- data/vendor/extensions/payment_gateway/db/migrate/20080620120002_create_gateway_configurations.rb +0 -12
- data/vendor/extensions/payment_gateway/db/migrate/20080620120003_create_gateways.rb +0 -15
- data/vendor/extensions/payment_gateway/db/migrate/20080620120004_create_gateway_options.rb +0 -15
- data/vendor/extensions/payment_gateway/db/migrate/20080620120005_create_gateway_option_values.rb +0 -14
- data/vendor/extensions/payment_gateway/db/migrate/20080620120006_create_bogus_gateway.rb +0 -14
- data/vendor/extensions/payment_gateway/db/migrate/20080620120007_create_linkpoint_gateway.rb +0 -18
- data/vendor/extensions/payment_gateway/db/migrate/20080703120008_create_paypal_gateway.rb +0 -19
- data/vendor/extensions/payment_gateway/db/migrate/20081119210419_create_authorizenet_gateway.rb +0 -18
- data/vendor/extensions/payment_gateway/db/migrate/20081120144549_remove_authorizenet_test.rb +0 -10
- data/vendor/extensions/payment_gateway/db/migrate/20090218091936_create_protx_gateway.rb +0 -18
- data/vendor/extensions/payment_gateway/db/migrate/20090517173727_add_currency_code_option_to_paypal_gateway.rb +0 -13
- data/vendor/extensions/payment_gateway/lib/gateway_config.rb +0 -7
- data/vendor/extensions/payment_gateway/lib/spree/bogus_gateway.rb +0 -68
- data/vendor/extensions/payment_gateway/lib/spree/gateway/config.rb +0 -22
- data/vendor/extensions/payment_gateway/spec/models/gateway_configuration_spec.rb +0 -11
- data/vendor/extensions/payment_gateway/spec/models/gateway_option_spec.rb +0 -11
- data/vendor/extensions/payment_gateway/spec/models/gateway_option_value_spec.rb +0 -11
- data/vendor/plugins/acts_as_adjacency_list/README +0 -13
- data/vendor/plugins/acts_as_adjacency_list/Rakefile +0 -22
- data/vendor/plugins/acts_as_adjacency_list/init.rb +0 -9
- data/vendor/plugins/acts_as_adjacency_list/install.rb +0 -1
- data/vendor/plugins/acts_as_adjacency_list/lib/active_record/acts/adjacency_list.rb +0 -230
- data/vendor/plugins/acts_as_adjacency_list/tasks/acts_as_adjacency_list_tasks.rake +0 -4
- data/vendor/plugins/acts_as_adjacency_list/test/acts_as_adjacency_list_test.rb +0 -293
- data/vendor/plugins/acts_as_adjacency_list/uninstall.rb +0 -1
- data/vendor/plugins/paperclip/LICENSE +0 -26
- data/vendor/plugins/paperclip/README.rdoc +0 -174
- data/vendor/plugins/paperclip/Rakefile +0 -99
- data/vendor/plugins/paperclip/generators/paperclip/USAGE +0 -5
- data/vendor/plugins/paperclip/generators/paperclip/paperclip_generator.rb +0 -27
- data/vendor/plugins/paperclip/generators/paperclip/templates/paperclip_migration.rb.erb +0 -19
- data/vendor/plugins/paperclip/init.rb +0 -1
- data/vendor/plugins/paperclip/lib/paperclip.rb +0 -350
- data/vendor/plugins/paperclip/lib/paperclip/attachment.rb +0 -413
- data/vendor/plugins/paperclip/lib/paperclip/callback_compatability.rb +0 -33
- data/vendor/plugins/paperclip/lib/paperclip/geometry.rb +0 -115
- data/vendor/plugins/paperclip/lib/paperclip/interpolations.rb +0 -105
- data/vendor/plugins/paperclip/lib/paperclip/iostream.rb +0 -58
- data/vendor/plugins/paperclip/lib/paperclip/matchers.rb +0 -4
- data/vendor/plugins/paperclip/lib/paperclip/matchers/have_attached_file_matcher.rb +0 -49
- data/vendor/plugins/paperclip/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +0 -66
- data/vendor/plugins/paperclip/lib/paperclip/matchers/validate_attachment_presence_matcher.rb +0 -48
- data/vendor/plugins/paperclip/lib/paperclip/matchers/validate_attachment_size_matcher.rb +0 -83
- data/vendor/plugins/paperclip/lib/paperclip/processor.rb +0 -49
- data/vendor/plugins/paperclip/lib/paperclip/storage.rb +0 -236
- data/vendor/plugins/paperclip/lib/paperclip/thumbnail.rb +0 -70
- data/vendor/plugins/paperclip/lib/paperclip/upfile.rb +0 -48
- data/vendor/plugins/paperclip/paperclip.gemspec +0 -37
- data/vendor/plugins/paperclip/shoulda_macros/paperclip.rb +0 -68
- data/vendor/plugins/paperclip/tasks/paperclip_tasks.rake +0 -79
- data/vendor/plugins/paperclip/test/attachment_test.rb +0 -768
- data/vendor/plugins/paperclip/test/database.yml +0 -4
- data/vendor/plugins/paperclip/test/fixtures/12k.png +0 -0
- data/vendor/plugins/paperclip/test/fixtures/50x50.png +0 -0
- data/vendor/plugins/paperclip/test/fixtures/5k.png +0 -0
- data/vendor/plugins/paperclip/test/fixtures/bad.png +0 -1
- data/vendor/plugins/paperclip/test/fixtures/s3.yml +0 -4
- data/vendor/plugins/paperclip/test/fixtures/twopage.pdf +0 -0
- data/vendor/plugins/paperclip/test/geometry_test.rb +0 -177
- data/vendor/plugins/paperclip/test/helper.rb +0 -100
- data/vendor/plugins/paperclip/test/integration_test.rb +0 -481
- data/vendor/plugins/paperclip/test/interpolations_test.rb +0 -120
- data/vendor/plugins/paperclip/test/iostream_test.rb +0 -71
- data/vendor/plugins/paperclip/test/matchers/have_attached_file_matcher_test.rb +0 -21
- data/vendor/plugins/paperclip/test/matchers/validate_attachment_content_type_matcher_test.rb +0 -30
- data/vendor/plugins/paperclip/test/matchers/validate_attachment_presence_matcher_test.rb +0 -21
- data/vendor/plugins/paperclip/test/matchers/validate_attachment_size_matcher_test.rb +0 -50
- data/vendor/plugins/paperclip/test/paperclip_test.rb +0 -291
- data/vendor/plugins/paperclip/test/processor_test.rb +0 -10
- data/vendor/plugins/paperclip/test/storage_test.rb +0 -282
- data/vendor/plugins/paperclip/test/thumbnail_test.rb +0 -177
- data/vendor/plugins/state_machine/CHANGELOG.rdoc +0 -97
- data/vendor/plugins/state_machine/LICENSE +0 -20
- data/vendor/plugins/state_machine/README.rdoc +0 -182
- data/vendor/plugins/state_machine/Rakefile +0 -88
- data/vendor/plugins/state_machine/init.rb +0 -1
- data/vendor/plugins/state_machine/lib/state_machine.rb +0 -129
- data/vendor/plugins/state_machine/lib/state_machine/event.rb +0 -116
- data/vendor/plugins/state_machine/lib/state_machine/machine.rb +0 -412
- data/vendor/plugins/state_machine/lib/state_machine/transition.rb +0 -227
- data/vendor/plugins/state_machine/test/app_root/app/models/auto_shop.rb +0 -34
- data/vendor/plugins/state_machine/test/app_root/app/models/car.rb +0 -19
- data/vendor/plugins/state_machine/test/app_root/app/models/highway.rb +0 -3
- data/vendor/plugins/state_machine/test/app_root/app/models/motorcycle.rb +0 -3
- data/vendor/plugins/state_machine/test/app_root/app/models/switch.rb +0 -23
- data/vendor/plugins/state_machine/test/app_root/app/models/switch_observer.rb +0 -20
- data/vendor/plugins/state_machine/test/app_root/app/models/toggle_switch.rb +0 -2
- data/vendor/plugins/state_machine/test/app_root/app/models/vehicle.rb +0 -78
- data/vendor/plugins/state_machine/test/app_root/config/environment.rb +0 -7
- data/vendor/plugins/state_machine/test/app_root/db/migrate/001_create_switches.rb +0 -12
- data/vendor/plugins/state_machine/test/app_root/db/migrate/002_create_auto_shops.rb +0 -13
- data/vendor/plugins/state_machine/test/app_root/db/migrate/003_create_highways.rb +0 -11
- data/vendor/plugins/state_machine/test/app_root/db/migrate/004_create_vehicles.rb +0 -16
- data/vendor/plugins/state_machine/test/factory.rb +0 -73
- data/vendor/plugins/state_machine/test/functional/state_machine_test.rb +0 -499
- data/vendor/plugins/state_machine/test/test_helper.rb +0 -13
- data/vendor/plugins/state_machine/test/unit/event_test.rb +0 -235
- data/vendor/plugins/state_machine/test/unit/invalid_transition_test.rb +0 -7
- data/vendor/plugins/state_machine/test/unit/machine_test.rb +0 -306
- data/vendor/plugins/state_machine/test/unit/state_machine_test.rb +0 -130
- data/vendor/plugins/state_machine/test/unit/transition_test.rb +0 -633
@@ -0,0 +1 @@
|
|
1
|
+
(function($){$.ajaxSettings.accepts._default="text/javascript, text/html, application/xml, text/xml, */*"})(jQuery);(function($){$.fn.reset=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};$.fn.enable=function(){return this.each(function(){this.disabled=false})};$.fn.disable=function(){return this.each(function(){this.disabled=true})}})(jQuery);(function($){$.extend({fieldEvent:function(el,obs){var field=el[0]||el,e="change";if(field.type=="radio"||field.type=="checkbox"){e="click"}else{if(obs&&(field.type=="text"||field.type=="textarea"||field.type=="password")){e="keyup"}}return e}});$.fn.extend({delayedObserver:function(delay,callback){var el=$(this);if(typeof window.delayedObserverStack=="undefined"){window.delayedObserverStack=[]}if(typeof window.delayedObserverCallback=="undefined"){window.delayedObserverCallback=function(stackPos){var observed=window.delayedObserverStack[stackPos];if(observed.timer){clearTimeout(observed.timer)}observed.timer=setTimeout(function(){observed.timer=null;observed.callback(observed.obj,observed.obj.formVal())},observed.delay*1000);observed.oldVal=observed.obj.formVal()}}window.delayedObserverStack.push({obj:el,timer:null,delay:delay,oldVal:el.formVal(),callback:callback});var stackPos=window.delayedObserverStack.length-1;if(el[0].tagName=="FORM"){$(":input",el).each(function(){var field=$(this);field.bind($.fieldEvent(field,delay),function(){var observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.oldVal){return}else{window.delayedObserverCallback(stackPos)}})})}else{el.bind($.fieldEvent(el,delay),function(){var observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.oldVal){return}else{window.delayedObserverCallback(stackPos)}})}},formVal:function(){var el=this[0];if(el.tagName=="FORM"){return this.serialize()}if(el.type=="checkbox"||el.type=="radio"){return this.filter("input:checked").val()||""}else{return this.val()}}})})(jQuery);(function($){$.fn.extend({visualEffect:function(o,options){if(options){speed=options.duration*1000}else{speed=null}e=o.replace(/\_(.)/g,function(m,l){return l.toUpperCase()});return eval("$(this)."+e+"("+speed+")")},appear:function(speed,callback){return this.fadeIn(speed,callback)},blindDown:function(speed,callback){return this.show("blind",{direction:"vertical"},speed,callback)},blindUp:function(speed,callback){return this.hide("blind",{direction:"vertical"},speed,callback)},blindRight:function(speed,callback){return this.show("blind",{direction:"horizontal"},speed,callback)},blindLeft:function(speed,callback){this.hide("blind",{direction:"horizontal"},speed,callback);return this},dropOut:function(speed,callback){return this.hide("drop",{direction:"down"},speed,callback)},dropIn:function(speed,callback){return this.show("drop",{direction:"up"},speed,callback)},fade:function(speed,callback){return this.fadeOut(speed,callback)},fadeToggle:function(speed,callback){return this.animate({opacity:"toggle"},speed,callback)},fold:function(speed,callback){return this.hide("fold",{},speed,callback)},foldOut:function(speed,callback){return this.show("fold",{},speed,callback)},grow:function(speed,callback){return this.show("scale",{},speed,callback)},highlight:function(speed,callback){return this.show("highlight",{},speed,callback)},puff:function(speed,callback){return this.hide("puff",{},speed,callback)},pulsate:function(speed,callback){return this.show("pulsate",{},speed,callback)},shake:function(speed,callback){return this.show("shake",{},speed,callback)},shrink:function(speed,callback){return this.hide("scale",{},speed,callback)},squish:function(speed,callback){return this.hide("scale",{origin:["top","left"]},speed,callback)},slideUp:function(speed,callback){return this.hide("slide",{direction:"up"},speed,callback)},slideDown:function(speed,callback){return this.show("slide",{direction:"up"},speed,callback)},switchOff:function(speed,callback){return this.hide("clip",{},speed,callback)},switchOn:function(speed,callback){return this.show("clip",{},speed,callback)}})})(jQuery);
|
@@ -0,0 +1,2058 @@
|
|
1
|
+
/*
|
2
|
+
* jsTree 0.9.9a
|
3
|
+
* http://jstree.com/
|
4
|
+
*
|
5
|
+
* Copyright (c) 2009 Ivan Bozhanov (vakata.com)
|
6
|
+
*
|
7
|
+
* Dual licensed under the MIT and GPL licenses:
|
8
|
+
* http://www.opensource.org/licenses/mit-license.php
|
9
|
+
* http://www.gnu.org/licenses/gpl.html
|
10
|
+
*
|
11
|
+
* Date: 2009-10-06
|
12
|
+
*
|
13
|
+
*/
|
14
|
+
|
15
|
+
(function($) {
|
16
|
+
// jQuery plugin
|
17
|
+
$.tree = {
|
18
|
+
datastores : { },
|
19
|
+
plugins : { },
|
20
|
+
defaults : {
|
21
|
+
data : {
|
22
|
+
async : false, // Are async requests used to load open_branch contents
|
23
|
+
type : "html", // One of included datastores
|
24
|
+
opts : { method: "GET", url: false } // Options passed to datastore
|
25
|
+
},
|
26
|
+
selected : false, // FALSE or STRING or ARRAY
|
27
|
+
opened : [], // ARRAY OF INITIALLY OPENED NODES
|
28
|
+
languages : [], // ARRAY of string values (which will be used as CSS classes - so they must be valid)
|
29
|
+
ui : {
|
30
|
+
dots : true, // BOOL - dots or no dots
|
31
|
+
animation : 0, // INT - duration of open/close animations in miliseconds
|
32
|
+
scroll_spd : 4,
|
33
|
+
theme_path : false, // Path to the theme CSS file - if set to false and theme_name is not false - will lookup jstree-path-here/themes/theme-name-here/style.css
|
34
|
+
theme_name : "default",// if set to false no theme will be loaded
|
35
|
+
selected_parent_close : "select_parent", // false, "deselect", "select_parent"
|
36
|
+
selected_delete : "select_previous" // false, "select_previous"
|
37
|
+
},
|
38
|
+
types : {
|
39
|
+
"default" : {
|
40
|
+
clickable : true, // can be function
|
41
|
+
renameable : true, // can be function
|
42
|
+
deletable : true, // can be function
|
43
|
+
creatable : true, // can be function
|
44
|
+
draggable : true, // can be function
|
45
|
+
max_children : -1, // -1 - not set, 0 - no children, 1 - one child, etc // can be function
|
46
|
+
max_depth : -1, // -1 - not set, 0 - no children, 1 - one level of children, etc // can be function
|
47
|
+
valid_children : "all", // all, none, array of values // can be function
|
48
|
+
icon : {
|
49
|
+
image : false,
|
50
|
+
position : false
|
51
|
+
}
|
52
|
+
}
|
53
|
+
},
|
54
|
+
rules : {
|
55
|
+
multiple : false, // FALSE | CTRL | ON - multiple selection off/ with or without holding Ctrl
|
56
|
+
multitree : "none", // all, none, array of tree IDs to accept from
|
57
|
+
type_attr : "rel", // STRING attribute name (where is the type stored as string)
|
58
|
+
createat : "bottom", // STRING (top or bottom) new nodes get inserted at top or bottom
|
59
|
+
drag_copy : "ctrl", // FALSE | CTRL | ON - drag to copy off/ with or without holding Ctrl
|
60
|
+
drag_button : "left", // left, right or both
|
61
|
+
use_max_children : true,
|
62
|
+
use_max_depth : true,
|
63
|
+
|
64
|
+
max_children: -1,
|
65
|
+
max_depth : -1,
|
66
|
+
valid_children : "all"
|
67
|
+
},
|
68
|
+
lang : {
|
69
|
+
new_node : "New folder",
|
70
|
+
loading : "Loading ..."
|
71
|
+
},
|
72
|
+
callback : {
|
73
|
+
beforechange: function(NODE,TREE_OBJ) { return true },
|
74
|
+
beforeopen : function(NODE,TREE_OBJ) { return true },
|
75
|
+
beforeclose : function(NODE,TREE_OBJ) { return true },
|
76
|
+
beforemove : function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true },
|
77
|
+
beforecreate: function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true },
|
78
|
+
beforerename: function(NODE,LANG,TREE_OBJ) { return true },
|
79
|
+
beforedelete: function(NODE,TREE_OBJ) { return true },
|
80
|
+
beforedata : function(NODE,TREE_OBJ) { return { id : $(NODE).attr("id") || 0 } }, // PARAMETERS PASSED TO SERVER
|
81
|
+
ondata : function(DATA,TREE_OBJ) { return DATA; }, // modify data before parsing it
|
82
|
+
onparse : function(STR,TREE_OBJ) { return STR; }, // modify string before visualizing it
|
83
|
+
onhover : function(NODE,TREE_OBJ) { }, // node hovered
|
84
|
+
onselect : function(NODE,TREE_OBJ) { }, // node selected
|
85
|
+
ondeselect : function(NODE,TREE_OBJ) { }, // node deselected
|
86
|
+
onchange : function(NODE,TREE_OBJ) { }, // focus changed
|
87
|
+
onrename : function(NODE,TREE_OBJ,RB) { }, // node renamed
|
88
|
+
onmove : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // move completed
|
89
|
+
oncopy : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // copy completed
|
90
|
+
oncreate : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // node created
|
91
|
+
ondelete : function(NODE,TREE_OBJ,RB) { }, // node deleted
|
92
|
+
onopen : function(NODE,TREE_OBJ) { }, // node opened
|
93
|
+
onopen_all : function(TREE_OBJ) { }, // all nodes opened
|
94
|
+
onclose_all : function(TREE_OBJ) { }, // all nodes closed
|
95
|
+
onclose : function(NODE,TREE_OBJ) { }, // node closed
|
96
|
+
error : function(TEXT,TREE_OBJ) { }, // error occured
|
97
|
+
ondblclk : function(NODE,TREE_OBJ) { TREE_OBJ.toggle_branch.call(TREE_OBJ, NODE); TREE_OBJ.select_branch.call(TREE_OBJ, NODE); },
|
98
|
+
onrgtclk : function(NODE,TREE_OBJ,EV) { }, // right click - to prevent use: EV.preventDefault(); EV.stopPropagation(); return false
|
99
|
+
onload : function(TREE_OBJ) { },
|
100
|
+
oninit : function(TREE_OBJ) { },
|
101
|
+
onfocus : function(TREE_OBJ) { },
|
102
|
+
ondestroy : function(TREE_OBJ) { },
|
103
|
+
onsearch : function(NODES, TREE_OBJ) { NODES.addClass("search"); },
|
104
|
+
ondrop : function(NODE,REF_NODE,TYPE,TREE_OBJ) { },
|
105
|
+
check : function(RULE,NODE,VALUE,TREE_OBJ) { return VALUE; },
|
106
|
+
check_move : function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true; }
|
107
|
+
},
|
108
|
+
plugins : { }
|
109
|
+
},
|
110
|
+
|
111
|
+
create : function () { return new tree_component(); },
|
112
|
+
focused : function () { return tree_component.inst[tree_component.focused]; },
|
113
|
+
reference : function (obj) {
|
114
|
+
var o = $(obj);
|
115
|
+
if(!o.size()) o = $("#" + obj);
|
116
|
+
if(!o.size()) return null;
|
117
|
+
o = (o.is(".tree")) ? o.attr("id") : o.parents(".tree:eq(0)").attr("id");
|
118
|
+
return tree_component.inst[o] || null;
|
119
|
+
},
|
120
|
+
rollback : function (data) {
|
121
|
+
for(var i in data) {
|
122
|
+
if(!data.hasOwnProperty(i)) continue;
|
123
|
+
var tmp = tree_component.inst[i];
|
124
|
+
var lock = !tmp.locked;
|
125
|
+
|
126
|
+
// if not locked - lock the tree
|
127
|
+
if(lock) tmp.lock(true);
|
128
|
+
// Cancel ongoing rename
|
129
|
+
tmp.inp = false;
|
130
|
+
tmp.container.html(data[i].html).find(".dragged").removeClass("dragged").end().find(".hover").removeClass("hover");
|
131
|
+
|
132
|
+
if(data[i].selected) {
|
133
|
+
tmp.selected = $("#" + data[i].selected);
|
134
|
+
tmp.selected_arr = [];
|
135
|
+
tmp.container
|
136
|
+
.find("a.clicked").each( function () {
|
137
|
+
tmp.selected_arr.push(tmp.get_node(this));
|
138
|
+
});
|
139
|
+
}
|
140
|
+
// if this function set the lock - unlock
|
141
|
+
if(lock) tmp.lock(false);
|
142
|
+
|
143
|
+
delete lock;
|
144
|
+
delete tmp;
|
145
|
+
}
|
146
|
+
},
|
147
|
+
drop_mode : function (opts) {
|
148
|
+
opts = $.extend(opts, { show : false, type : "default", str : "Foreign node" });
|
149
|
+
tree_component.drag_drop.foreign = true;
|
150
|
+
tree_component.drag_drop.isdown = true;
|
151
|
+
tree_component.drag_drop.moving = true;
|
152
|
+
tree_component.drag_drop.appended = false;
|
153
|
+
tree_component.drag_drop.f_type = opts.type;
|
154
|
+
tree_component.drag_drop.f_data = opts;
|
155
|
+
|
156
|
+
|
157
|
+
if(!opts.show) {
|
158
|
+
tree_component.drag_drop.drag_help = false;
|
159
|
+
tree_component.drag_drop.drag_node = false;
|
160
|
+
}
|
161
|
+
else {
|
162
|
+
tree_component.drag_drop.drag_help = $("<div id='jstree-dragged' class='tree tree-default'><ul><li class='last dragged foreign'><a href='#'><ins> </ins>" + opts.str + "</a></li></ul></div>");
|
163
|
+
tree_component.drag_drop.drag_node = tree_component.drag_drop.drag_help.find("li:eq(0)");
|
164
|
+
}
|
165
|
+
if($.tree.drag_start !== false) $.tree.drag_start.call(null, false);
|
166
|
+
},
|
167
|
+
drag_start : false,
|
168
|
+
drag : false,
|
169
|
+
drag_end : false
|
170
|
+
};
|
171
|
+
$.fn.tree = function (opts) {
|
172
|
+
return this.each(function() {
|
173
|
+
var conf = $.extend({},opts);
|
174
|
+
if(tree_component.inst && tree_component.inst[$(this).attr('id')]) tree_component.inst[$(this).attr('id')].destroy();
|
175
|
+
if(conf !== false) new tree_component().init(this, conf);
|
176
|
+
});
|
177
|
+
};
|
178
|
+
|
179
|
+
// core
|
180
|
+
function tree_component () {
|
181
|
+
return {
|
182
|
+
cntr : ++tree_component.cntr,
|
183
|
+
settings : $.extend({},$.tree.defaults),
|
184
|
+
|
185
|
+
init : function(elem, conf) {
|
186
|
+
var _this = this;
|
187
|
+
this.container = $(elem);
|
188
|
+
if(this.container.size == 0) return false;
|
189
|
+
tree_component.inst[this.cntr] = this;
|
190
|
+
if(!this.container.attr("id")) this.container.attr("id","jstree_" + this.cntr);
|
191
|
+
tree_component.inst[this.container.attr("id")] = tree_component.inst[this.cntr];
|
192
|
+
tree_component.focused = this.cntr;
|
193
|
+
this.settings = $.extend(true, {}, this.settings, conf);
|
194
|
+
|
195
|
+
// DEAL WITH LANGUAGE VERSIONS
|
196
|
+
if(this.settings.languages && this.settings.languages.length) {
|
197
|
+
this.current_lang = this.settings.languages[0];
|
198
|
+
var st = false;
|
199
|
+
var id = "#" + this.container.attr("id");
|
200
|
+
for(var ln = 0; ln < this.settings.languages.length; ln++) {
|
201
|
+
st = tree_component.add_css(id + " ." + this.settings.languages[ln]);
|
202
|
+
if(st !== false) st.style.display = (this.settings.languages[ln] == this.current_lang) ? "" : "none";
|
203
|
+
}
|
204
|
+
}
|
205
|
+
else this.current_lang = false;
|
206
|
+
// THEMES
|
207
|
+
this.container.addClass("tree");
|
208
|
+
if(this.settings.ui.theme_name !== false) {
|
209
|
+
if(this.settings.ui.theme_path === false) {
|
210
|
+
$("script").each(function () {
|
211
|
+
if(this.src.toString().match(/jquery\.tree.*?js$/)) { _this.settings.ui.theme_path = this.src.toString().replace(/jquery\.tree.*?js$/, "") + "themes/" + _this.settings.ui.theme_name + "/style.css"; return false; }
|
212
|
+
});
|
213
|
+
}
|
214
|
+
if(this.settings.ui.theme_path != "" && $.inArray(this.settings.ui.theme_path, tree_component.themes) == -1) {
|
215
|
+
tree_component.add_sheet({ url : this.settings.ui.theme_path });
|
216
|
+
tree_component.themes.push(this.settings.ui.theme_path);
|
217
|
+
}
|
218
|
+
this.container.addClass("tree-" + this.settings.ui.theme_name);
|
219
|
+
}
|
220
|
+
// TYPE ICONS
|
221
|
+
var type_icons = "";
|
222
|
+
for(var t in this.settings.types) {
|
223
|
+
if(!this.settings.types.hasOwnProperty(t)) continue;
|
224
|
+
if(!this.settings.types[t].icon) continue;
|
225
|
+
if( this.settings.types[t].icon.image || this.settings.types[t].icon.position) {
|
226
|
+
if(t == "default") type_icons += "#" + this.container.attr("id") + " li > a ins { ";
|
227
|
+
else type_icons += "#" + this.container.attr("id") + " li[rel=" + t + "] > a ins { ";
|
228
|
+
if(this.settings.types[t].icon.image) type_icons += " background-image:url(" + this.settings.types[t].icon.image + "); ";
|
229
|
+
if(this.settings.types[t].icon.position) type_icons += " background-position:" + this.settings.types[t].icon.position + "; ";
|
230
|
+
type_icons += "} ";
|
231
|
+
}
|
232
|
+
}
|
233
|
+
if(type_icons != "") tree_component.add_sheet({ str : type_icons });
|
234
|
+
|
235
|
+
if(this.settings.rules.multiple) this.selected_arr = [];
|
236
|
+
this.offset = false;
|
237
|
+
this.hovered = false;
|
238
|
+
this.locked = false;
|
239
|
+
|
240
|
+
if(tree_component.drag_drop.marker === false) tree_component.drag_drop.marker = $("<div>").attr({ id : "jstree-marker" }).hide().appendTo("body");
|
241
|
+
this.callback("oninit", [this]);
|
242
|
+
this.refresh();
|
243
|
+
this.attach_events();
|
244
|
+
this.focus();
|
245
|
+
},
|
246
|
+
refresh : function (obj) {
|
247
|
+
if(this.locked) return this.error("LOCKED");
|
248
|
+
var _this = this;
|
249
|
+
if(obj && !this.settings.data.async) obj = false;
|
250
|
+
this.is_partial_refresh = obj ? true : false;
|
251
|
+
|
252
|
+
// SAVE OPENED
|
253
|
+
this.opened = Array();
|
254
|
+
if(this.settings.opened != false) {
|
255
|
+
$.each(this.settings.opened, function (i, item) {
|
256
|
+
if(this.replace(/^#/,"").length > 0) { _this.opened.push("#" + this.replace(/^#/,"")); }
|
257
|
+
});
|
258
|
+
this.settings.opened = false;
|
259
|
+
}
|
260
|
+
else {
|
261
|
+
this.container.find("li.open").each(function (i) { if(this.id) { _this.opened.push("#" + this.id); } });
|
262
|
+
}
|
263
|
+
|
264
|
+
// SAVE SELECTED
|
265
|
+
if(this.selected) {
|
266
|
+
this.settings.selected = Array();
|
267
|
+
if(obj) {
|
268
|
+
$(obj).find("li:has(a.clicked)").each(function () {
|
269
|
+
if(this.id) _this.settings.selected.push("#" + this.id);
|
270
|
+
});
|
271
|
+
}
|
272
|
+
else {
|
273
|
+
if(this.selected_arr) {
|
274
|
+
$.each(this.selected_arr, function () {
|
275
|
+
if(this.attr("id")) _this.settings.selected.push("#" + this.attr("id"));
|
276
|
+
});
|
277
|
+
}
|
278
|
+
else {
|
279
|
+
if(this.selected.attr("id")) this.settings.selected.push("#" + this.selected.attr("id"));
|
280
|
+
}
|
281
|
+
}
|
282
|
+
}
|
283
|
+
else if(this.settings.selected !== false) {
|
284
|
+
var tmp = Array();
|
285
|
+
if((typeof this.settings.selected).toLowerCase() == "object") {
|
286
|
+
$.each(this.settings.selected, function () {
|
287
|
+
if(this.replace(/^#/,"").length > 0) tmp.push("#" + this.replace(/^#/,""));
|
288
|
+
});
|
289
|
+
}
|
290
|
+
else {
|
291
|
+
if(this.settings.selected.replace(/^#/,"").length > 0) tmp.push("#" + this.settings.selected.replace(/^#/,""));
|
292
|
+
}
|
293
|
+
this.settings.selected = tmp;
|
294
|
+
}
|
295
|
+
|
296
|
+
if(obj && this.settings.data.async) {
|
297
|
+
this.opened = Array();
|
298
|
+
obj = this.get_node(obj);
|
299
|
+
obj.find("li.open").each(function (i) { _this.opened.push("#" + this.id); });
|
300
|
+
if(obj.hasClass("open")) obj.removeClass("open").addClass("closed");
|
301
|
+
if(obj.hasClass("leaf")) obj.removeClass("leaf");
|
302
|
+
obj.children("ul:eq(0)").html("");
|
303
|
+
return this.open_branch(obj, true, function () { _this.reselect.apply(_this); });
|
304
|
+
}
|
305
|
+
|
306
|
+
var _this = this;
|
307
|
+
var _datastore = new $.tree.datastores[this.settings.data.type]();
|
308
|
+
if(this.container.children("ul").size() == 0) {
|
309
|
+
this.container.html("<ul class='ltr' style='direction:ltr;'><li class='last'><a class='loading' href='#'><ins> </ins>" + (this.settings.lang.loading || "Loading ...") + "</a></li></ul>");
|
310
|
+
}
|
311
|
+
_datastore.load(this.callback("beforedata",[false,this]),this,this.settings.data.opts,function(data) {
|
312
|
+
data = _this.callback("ondata",[data, _this]);
|
313
|
+
_datastore.parse(data,_this,_this.settings.data.opts,function(str) {
|
314
|
+
str = _this.callback("onparse", [str, _this]);
|
315
|
+
_this.container.empty().append($("<ul class='ltr'>").html(str));
|
316
|
+
_this.container.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");
|
317
|
+
_this.container.find("li").not(".open").not(".closed").addClass("leaf");
|
318
|
+
_this.reselect();
|
319
|
+
});
|
320
|
+
});
|
321
|
+
},
|
322
|
+
reselect : function (is_callback) {
|
323
|
+
var _this = this;
|
324
|
+
|
325
|
+
if(!is_callback) this.cl_count = 0;
|
326
|
+
else this.cl_count --;
|
327
|
+
// REOPEN BRANCHES
|
328
|
+
if(this.opened && this.opened.length) {
|
329
|
+
var opn = false;
|
330
|
+
for(var j = 0; this.opened && j < this.opened.length; j++) {
|
331
|
+
if(this.settings.data.async) {
|
332
|
+
var tmp = this.get_node(this.opened[j]);
|
333
|
+
if(tmp.size() && tmp.hasClass("closed") > 0) {
|
334
|
+
opn = true;
|
335
|
+
var tmp = this.opened[j].toString().replace('/','\\/');
|
336
|
+
delete this.opened[j];
|
337
|
+
this.open_branch(tmp, true, function () { _this.reselect.apply(_this, [true]); } );
|
338
|
+
this.cl_count ++;
|
339
|
+
}
|
340
|
+
}
|
341
|
+
else this.open_branch(this.opened[j], true);
|
342
|
+
}
|
343
|
+
if(this.settings.data.async && opn) return;
|
344
|
+
if(this.cl_count > 0) return;
|
345
|
+
delete this.opened;
|
346
|
+
}
|
347
|
+
if(this.cl_count > 0) return;
|
348
|
+
|
349
|
+
// DOTS and RIGHT TO LEFT
|
350
|
+
this.container.css("direction","ltr").children("ul:eq(0)").addClass("ltr");
|
351
|
+
if(this.settings.ui.dots == false) this.container.children("ul:eq(0)").addClass("no_dots");
|
352
|
+
|
353
|
+
// REPOSITION SCROLL
|
354
|
+
if(this.scrtop) {
|
355
|
+
this.container.scrollTop(_this.scrtop);
|
356
|
+
delete this.scrtop;
|
357
|
+
}
|
358
|
+
// RESELECT PREVIOUSLY SELECTED
|
359
|
+
if(this.settings.selected !== false) {
|
360
|
+
$.each(this.settings.selected, function (i) {
|
361
|
+
if(_this.is_partial_refresh) _this.select_branch($(_this.settings.selected[i].toString().replace('/','\\/'), _this.container), (_this.settings.rules.multiple !== false) );
|
362
|
+
else _this.select_branch($(_this.settings.selected[i].toString().replace('/','\\/'), _this.container), (_this.settings.rules.multiple !== false && i > 0) );
|
363
|
+
});
|
364
|
+
this.settings.selected = false;
|
365
|
+
}
|
366
|
+
this.callback("onload", [_this]);
|
367
|
+
},
|
368
|
+
|
369
|
+
get : function (obj, format, opts) {
|
370
|
+
if(!format) format = this.settings.data.type;
|
371
|
+
if(!opts) opts = this.settings.data.opts;
|
372
|
+
return new $.tree.datastores[format]().get(obj, this, opts);
|
373
|
+
},
|
374
|
+
|
375
|
+
attach_events : function () {
|
376
|
+
var _this = this;
|
377
|
+
|
378
|
+
this.container
|
379
|
+
.bind("mousedown.jstree", function (event) {
|
380
|
+
if(tree_component.drag_drop.isdown) {
|
381
|
+
tree_component.drag_drop.move_type = false;
|
382
|
+
event.preventDefault();
|
383
|
+
event.stopPropagation();
|
384
|
+
event.stopImmediatePropagation();
|
385
|
+
return false;
|
386
|
+
}
|
387
|
+
})
|
388
|
+
.bind("mouseup.jstree", function (event) {
|
389
|
+
setTimeout( function() { _this.focus.apply(_this); }, 5);
|
390
|
+
})
|
391
|
+
.bind("click.jstree", function (event) {
|
392
|
+
//event.stopPropagation();
|
393
|
+
return true;
|
394
|
+
});
|
395
|
+
$("#" + this.container.attr("id") + " li")
|
396
|
+
.live("click", function(event) { // WHEN CLICK IS ON THE ARROW
|
397
|
+
if(event.target.tagName != "LI") return true;
|
398
|
+
_this.off_height();
|
399
|
+
if(event.pageY - $(event.target).offset().top > _this.li_height) return true;
|
400
|
+
_this.toggle_branch.apply(_this, [event.target]);
|
401
|
+
event.stopPropagation();
|
402
|
+
return false;
|
403
|
+
});
|
404
|
+
$("#" + this.container.attr("id") + " li a")
|
405
|
+
.live("click.jstree", function (event) { // WHEN CLICK IS ON THE TEXT OR ICON
|
406
|
+
if(event.which && event.which == 3) return true;
|
407
|
+
if(_this.locked) {
|
408
|
+
event.preventDefault();
|
409
|
+
event.target.blur();
|
410
|
+
return _this.error("LOCKED");
|
411
|
+
}
|
412
|
+
_this.select_branch.apply(_this, [event.target, event.ctrlKey || _this.settings.rules.multiple == "on"]);
|
413
|
+
if(_this.inp) { _this.inp.blur(); }
|
414
|
+
event.preventDefault();
|
415
|
+
event.target.blur();
|
416
|
+
return false;
|
417
|
+
})
|
418
|
+
.live("dblclick.jstree", function (event) { // WHEN DOUBLECLICK ON TEXT OR ICON
|
419
|
+
if(_this.locked) {
|
420
|
+
event.preventDefault();
|
421
|
+
event.stopPropagation();
|
422
|
+
event.target.blur();
|
423
|
+
return _this.error("LOCKED");
|
424
|
+
}
|
425
|
+
_this.callback("ondblclk", [_this.get_node(event.target).get(0), _this]);
|
426
|
+
event.preventDefault();
|
427
|
+
event.stopPropagation();
|
428
|
+
event.target.blur();
|
429
|
+
})
|
430
|
+
.live("contextmenu.jstree", function (event) {
|
431
|
+
if(_this.locked) {
|
432
|
+
event.target.blur();
|
433
|
+
return _this.error("LOCKED");
|
434
|
+
}
|
435
|
+
return _this.callback("onrgtclk", [_this.get_node(event.target).get(0), _this, event]);
|
436
|
+
})
|
437
|
+
.live("mouseover.jstree", function (event) {
|
438
|
+
if(_this.locked) {
|
439
|
+
event.preventDefault();
|
440
|
+
event.stopPropagation();
|
441
|
+
return _this.error("LOCKED");
|
442
|
+
}
|
443
|
+
if(_this.hovered !== false && (event.target.tagName == "A" || event.target.tagName == "INS")) {
|
444
|
+
_this.hovered.children("a").removeClass("hover");
|
445
|
+
_this.hovered = false;
|
446
|
+
}
|
447
|
+
_this.callback("onhover",[_this.get_node(event.target).get(0), _this]);
|
448
|
+
})
|
449
|
+
.live("mousedown.jstree", function (event) {
|
450
|
+
if(_this.settings.rules.drag_button == "left" && event.which && event.which != 1) return true;
|
451
|
+
if(_this.settings.rules.drag_button == "right" && event.which && event.which != 3) return true;
|
452
|
+
_this.focus.apply(_this);
|
453
|
+
if(_this.locked) return _this.error("LOCKED");
|
454
|
+
// SELECT LIST ITEM NODE
|
455
|
+
var obj = _this.get_node(event.target);
|
456
|
+
// IF ITEM IS DRAGGABLE
|
457
|
+
if(_this.settings.rules.multiple != false && _this.selected_arr.length > 1 && obj.children("a:eq(0)").hasClass("clicked")) {
|
458
|
+
var counter = 0;
|
459
|
+
for(var i in _this.selected_arr) {
|
460
|
+
if(!_this.selected_arr.hasOwnProperty(i)) continue;
|
461
|
+
if(_this.check("draggable", _this.selected_arr[i])) {
|
462
|
+
_this.selected_arr[i].addClass("dragged");
|
463
|
+
tree_component.drag_drop.origin_tree = _this;
|
464
|
+
counter ++;
|
465
|
+
}
|
466
|
+
}
|
467
|
+
if(counter > 0) {
|
468
|
+
if(_this.check("draggable", obj)) tree_component.drag_drop.drag_node = obj;
|
469
|
+
else tree_component.drag_drop.drag_node = _this.container.find("li.dragged:eq(0)");
|
470
|
+
tree_component.drag_drop.isdown = true;
|
471
|
+
tree_component.drag_drop.drag_help = $("<div id='jstree-dragged' class='tree " + ( _this.settings.ui.theme_name != "" ? " tree-" + _this.settings.ui.theme_name : "" ) + "' />").append("<ul class='" + _this.container.children("ul:eq(0)").get(0).className + "' />");
|
472
|
+
var tmp = tree_component.drag_drop.drag_node.clone();
|
473
|
+
if(_this.settings.languages.length > 0) tmp.find("a").not("." + _this.current_lang).hide();
|
474
|
+
tree_component.drag_drop.drag_help.children("ul:eq(0)").append(tmp);
|
475
|
+
tree_component.drag_drop.drag_help.find("li:eq(0)").removeClass("last").addClass("last").children("a").html("<ins> </ins>Multiple selection").end().children("ul").remove();
|
476
|
+
|
477
|
+
tree_component.drag_drop.dragged = _this.container.find("li.dragged");
|
478
|
+
}
|
479
|
+
}
|
480
|
+
else {
|
481
|
+
if(_this.check("draggable", obj)) {
|
482
|
+
tree_component.drag_drop.drag_node = obj;
|
483
|
+
tree_component.drag_drop.drag_help = $("<div id='jstree-dragged' class='tree " + ( _this.settings.ui.theme_name != "" ? " tree-" + _this.settings.ui.theme_name : "" ) + "' />").append("<ul class='" + _this.container.children("ul:eq(0)").get(0).className + "' />");
|
484
|
+
var tmp = obj.clone();
|
485
|
+
if(_this.settings.languages.length > 0) tmp.find("a").not("." + _this.current_lang).hide();
|
486
|
+
tree_component.drag_drop.drag_help.children("ul:eq(0)").append(tmp);
|
487
|
+
tree_component.drag_drop.drag_help.find("li:eq(0)").removeClass("last").addClass("last");
|
488
|
+
tree_component.drag_drop.isdown = true;
|
489
|
+
tree_component.drag_drop.foreign = false;
|
490
|
+
tree_component.drag_drop.origin_tree = _this;
|
491
|
+
obj.addClass("dragged");
|
492
|
+
|
493
|
+
tree_component.drag_drop.dragged = _this.container.find("li.dragged");
|
494
|
+
}
|
495
|
+
}
|
496
|
+
tree_component.drag_drop.init_x = event.pageX;
|
497
|
+
tree_component.drag_drop.init_y = event.pageY;
|
498
|
+
obj.blur();
|
499
|
+
event.preventDefault();
|
500
|
+
event.stopPropagation();
|
501
|
+
return false;
|
502
|
+
});
|
503
|
+
},
|
504
|
+
focus : function () {
|
505
|
+
if(this.locked) return false;
|
506
|
+
if(tree_component.focused != this.cntr) {
|
507
|
+
tree_component.focused = this.cntr;
|
508
|
+
this.callback("onfocus",[this]);
|
509
|
+
}
|
510
|
+
},
|
511
|
+
|
512
|
+
off_height : function () {
|
513
|
+
if(this.offset === false) {
|
514
|
+
this.container.css({ position : "relative" });
|
515
|
+
this.offset = this.container.offset();
|
516
|
+
var tmp = 0;
|
517
|
+
tmp = parseInt($.curCSS(this.container.get(0), "paddingTop", true),10);
|
518
|
+
if(tmp) this.offset.top += tmp;
|
519
|
+
tmp = parseInt($.curCSS(this.container.get(0), "borderTopWidth", true),10);
|
520
|
+
if(tmp) this.offset.top += tmp;
|
521
|
+
this.container.css({ position : "" });
|
522
|
+
}
|
523
|
+
if(!this.li_height) {
|
524
|
+
var tmp = this.container.find("ul li.closed, ul li.leaf").eq(0);
|
525
|
+
this.li_height = tmp.height();
|
526
|
+
if(tmp.children("ul:eq(0)").size()) this.li_height -= tmp.children("ul:eq(0)").height();
|
527
|
+
if(!this.li_height) this.li_height = 18;
|
528
|
+
}
|
529
|
+
},
|
530
|
+
scroll_check : function (x,y) {
|
531
|
+
var _this = this;
|
532
|
+
var cnt = _this.container;
|
533
|
+
var off = _this.container.offset();
|
534
|
+
|
535
|
+
var st = cnt.scrollTop();
|
536
|
+
var sl = cnt.scrollLeft();
|
537
|
+
// DETECT HORIZONTAL SCROLL
|
538
|
+
var h_cor = (cnt.get(0).scrollWidth > cnt.width()) ? 40 : 20;
|
539
|
+
|
540
|
+
if(y - off.top < 20) cnt.scrollTop(Math.max( (st - _this.settings.ui.scroll_spd) ,0)); // NEAR TOP
|
541
|
+
if(cnt.height() - (y - off.top) < h_cor) cnt.scrollTop(st + _this.settings.ui.scroll_spd); // NEAR BOTTOM
|
542
|
+
if(x - off.left < 20) cnt.scrollLeft(Math.max( (sl - _this.settings.ui.scroll_spd),0)); // NEAR LEFT
|
543
|
+
if(cnt.width() - (x - off.left) < 40) cnt.scrollLeft(sl + _this.settings.ui.scroll_spd); // NEAR RIGHT
|
544
|
+
|
545
|
+
if(cnt.scrollLeft() != sl || cnt.scrollTop() != st) {
|
546
|
+
tree_component.drag_drop.move_type = false;
|
547
|
+
tree_component.drag_drop.ref_node = false;
|
548
|
+
tree_component.drag_drop.marker.hide();
|
549
|
+
}
|
550
|
+
tree_component.drag_drop.scroll_time = setTimeout( function() { _this.scroll_check(x,y); }, 50);
|
551
|
+
},
|
552
|
+
scroll_into_view : function (obj) {
|
553
|
+
obj = obj ? this.get_node(obj) : this.selected;
|
554
|
+
if(!obj) return false;
|
555
|
+
var off_t = obj.offset().top;
|
556
|
+
var beg_t = this.container.offset().top;
|
557
|
+
var end_t = beg_t + this.container.height();
|
558
|
+
var h_cor = (this.container.get(0).scrollWidth > this.container.width()) ? 40 : 20;
|
559
|
+
if(off_t + 5 < beg_t) this.container.scrollTop(this.container.scrollTop() - (beg_t - off_t + 5) );
|
560
|
+
if(off_t + h_cor > end_t) this.container.scrollTop(this.container.scrollTop() + (off_t + h_cor - end_t) );
|
561
|
+
},
|
562
|
+
|
563
|
+
get_node : function (obj) {
|
564
|
+
return $(obj).closest("li");
|
565
|
+
},
|
566
|
+
get_type : function (obj) {
|
567
|
+
obj = !obj ? this.selected : this.get_node(obj);
|
568
|
+
if(!obj) return;
|
569
|
+
var tmp = obj.attr(this.settings.rules.type_attr);
|
570
|
+
return tmp || "default";
|
571
|
+
},
|
572
|
+
set_type : function (str, obj) {
|
573
|
+
obj = !obj ? this.selected : this.get_node(obj);
|
574
|
+
if(!obj || !str) return;
|
575
|
+
obj.attr(this.settings.rules.type_attr, str);
|
576
|
+
},
|
577
|
+
get_text : function (obj, lang) {
|
578
|
+
obj = this.get_node(obj);
|
579
|
+
if(!obj || obj.size() == 0) return "";
|
580
|
+
if(this.settings.languages && this.settings.languages.length) {
|
581
|
+
lang = lang ? lang : this.current_lang;
|
582
|
+
obj = obj.children("a." + lang);
|
583
|
+
}
|
584
|
+
else obj = obj.children("a:visible");
|
585
|
+
var val = "";
|
586
|
+
obj.contents().each(function () {
|
587
|
+
if(this.nodeType == 3) { val = this.data; return false; }
|
588
|
+
});
|
589
|
+
return val;
|
590
|
+
},
|
591
|
+
|
592
|
+
check : function (rule, obj) {
|
593
|
+
if(this.locked) return false;
|
594
|
+
var v = false;
|
595
|
+
// if root node
|
596
|
+
if(obj === -1) { if(typeof this.settings.rules[rule] != "undefined") v = this.settings.rules[rule]; }
|
597
|
+
else {
|
598
|
+
obj = !obj ? this.selected : this.get_node(obj);
|
599
|
+
if(!obj) return;
|
600
|
+
var t = this.get_type(obj);
|
601
|
+
if(typeof this.settings.types[t] != "undefined" && typeof this.settings.types[t][rule] != "undefined") v = this.settings.types[t][rule];
|
602
|
+
else if(typeof this.settings.types["default"] != "undefined" && typeof this.settings.types["default"][rule] != "undefined") v = this.settings.types["default"][rule];
|
603
|
+
}
|
604
|
+
if(typeof v == "function") v = v.call(null, obj, this);
|
605
|
+
v = this.callback("check", [rule, obj, v, this]);
|
606
|
+
return v;
|
607
|
+
},
|
608
|
+
check_move : function (nod, ref_node, how) {
|
609
|
+
if(this.locked) return false;
|
610
|
+
if($(ref_node).closest("li.dragged").size()) return false;
|
611
|
+
|
612
|
+
var tree1 = nod.parents(".tree:eq(0)").get(0);
|
613
|
+
var tree2 = ref_node.parents(".tree:eq(0)").get(0);
|
614
|
+
// if different trees
|
615
|
+
if(tree1 && tree1 != tree2) {
|
616
|
+
var m = $.tree.reference(tree2.id).settings.rules.multitree;
|
617
|
+
if(m == "none" || ($.isArray(m) && $.inArray(tree1.id, m) == -1)) return false;
|
618
|
+
}
|
619
|
+
|
620
|
+
var p = (how != "inside") ? this.parent(ref_node) : this.get_node(ref_node);
|
621
|
+
nod = this.get_node(nod);
|
622
|
+
if(p == false) return false;
|
623
|
+
var r = {
|
624
|
+
max_depth : this.settings.rules.use_max_depth ? this.check("max_depth", p) : -1,
|
625
|
+
max_children : this.settings.rules.use_max_children ? this.check("max_children", p) : -1,
|
626
|
+
valid_children : this.check("valid_children", p)
|
627
|
+
};
|
628
|
+
var nod_type = (typeof nod == "string") ? nod : this.get_type(nod);
|
629
|
+
if(typeof r.valid_children != "undefined" && (r.valid_children == "none" || (typeof r.valid_children == "object" && $.inArray(nod_type, $.makeArray(r.valid_children)) == -1))) return false;
|
630
|
+
|
631
|
+
if(this.settings.rules.use_max_children) {
|
632
|
+
if(typeof r.max_children != "undefined" && r.max_children != -1) {
|
633
|
+
if(r.max_children == 0) return false;
|
634
|
+
var c_count = 1;
|
635
|
+
if(tree_component.drag_drop.moving == true && tree_component.drag_drop.foreign == false) {
|
636
|
+
c_count = tree_component.drag_drop.dragged.size();
|
637
|
+
c_count = c_count - p.find('> ul > li.dragged').size();
|
638
|
+
}
|
639
|
+
if(r.max_children < p.find('> ul > li').size() + c_count) return false;
|
640
|
+
}
|
641
|
+
}
|
642
|
+
|
643
|
+
if(this.settings.rules.use_max_depth) {
|
644
|
+
if(typeof r.max_depth != "undefined" && r.max_depth === 0) return this.error("MOVE: MAX-DEPTH REACHED");
|
645
|
+
// check for max_depth up the chain
|
646
|
+
var mx = (r.max_depth > 0) ? r.max_depth : false;
|
647
|
+
var i = 0;
|
648
|
+
var t = p;
|
649
|
+
while(t !== -1) {
|
650
|
+
t = this.parent(t);
|
651
|
+
i ++;
|
652
|
+
var m = this.check("max_depth",t);
|
653
|
+
if(m >= 0) {
|
654
|
+
mx = (mx === false) ? (m - i) : Math.min(mx, m - i);
|
655
|
+
}
|
656
|
+
if(mx !== false && mx <= 0) return this.error("MOVE: MAX-DEPTH REACHED");
|
657
|
+
}
|
658
|
+
if(mx !== false && mx <= 0) return this.error("MOVE: MAX-DEPTH REACHED");
|
659
|
+
if(mx !== false) {
|
660
|
+
var incr = 1;
|
661
|
+
if(typeof nod != "string") {
|
662
|
+
var t = nod;
|
663
|
+
// possible async problem - when nodes are not all loaded down the chain
|
664
|
+
while(t.size() > 0) {
|
665
|
+
if(mx - incr < 0) return this.error("MOVE: MAX-DEPTH REACHED");
|
666
|
+
t = t.children("ul").children("li");
|
667
|
+
incr ++;
|
668
|
+
}
|
669
|
+
}
|
670
|
+
}
|
671
|
+
}
|
672
|
+
if(this.callback("check_move", [nod, ref_node, how, this]) == false) return false;
|
673
|
+
return true;
|
674
|
+
},
|
675
|
+
|
676
|
+
hover_branch : function (obj) {
|
677
|
+
if(this.locked) return this.error("LOCKED");
|
678
|
+
var _this = this;
|
679
|
+
var obj = _this.get_node(obj);
|
680
|
+
if(!obj.size()) return this.error("HOVER: NOT A VALID NODE");
|
681
|
+
if(!_this.check("clickable", obj)) return this.error("SELECT: NODE NOT SELECTABLE");
|
682
|
+
if(this.hovered) this.hovered.children("A").removeClass("hover");
|
683
|
+
this.hovered = obj;
|
684
|
+
this.hovered.children("a").addClass("hover");
|
685
|
+
this.scroll_into_view(this.hovered);
|
686
|
+
},
|
687
|
+
select_branch : function (obj, multiple) {
|
688
|
+
if(this.locked) return this.error("LOCKED");
|
689
|
+
if(!obj && this.hovered !== false) obj = this.hovered;
|
690
|
+
var _this = this;
|
691
|
+
obj = _this.get_node(obj);
|
692
|
+
if(!obj.size()) return this.error("SELECT: NOT A VALID NODE");
|
693
|
+
obj.children("a").removeClass("hover");
|
694
|
+
// CHECK AGAINST RULES FOR SELECTABLE NODES
|
695
|
+
if(!_this.check("clickable", obj)) return this.error("SELECT: NODE NOT SELECTABLE");
|
696
|
+
if(_this.callback("beforechange",[obj.get(0),_this]) === false) return this.error("SELECT: STOPPED BY USER");
|
697
|
+
// IF multiple AND obj IS ALREADY SELECTED - DESELECT IT
|
698
|
+
if(this.settings.rules.multiple != false && multiple && obj.children("a.clicked").size() > 0) {
|
699
|
+
return this.deselect_branch(obj);
|
700
|
+
}
|
701
|
+
if(this.settings.rules.multiple != false && multiple) {
|
702
|
+
this.selected_arr.push(obj);
|
703
|
+
}
|
704
|
+
if(this.settings.rules.multiple != false && !multiple) {
|
705
|
+
for(var i in this.selected_arr) {
|
706
|
+
if(!this.selected_arr.hasOwnProperty(i)) continue;
|
707
|
+
this.selected_arr[i].children("A").removeClass("clicked");
|
708
|
+
this.callback("ondeselect", [this.selected_arr[i].get(0), _this]);
|
709
|
+
}
|
710
|
+
this.selected_arr = [];
|
711
|
+
this.selected_arr.push(obj);
|
712
|
+
if(this.selected && this.selected.children("A").hasClass("clicked")) {
|
713
|
+
this.selected.children("A").removeClass("clicked");
|
714
|
+
this.callback("ondeselect", [this.selected.get(0), _this]);
|
715
|
+
}
|
716
|
+
}
|
717
|
+
if(!this.settings.rules.multiple) {
|
718
|
+
if(this.selected) {
|
719
|
+
this.selected.children("A").removeClass("clicked");
|
720
|
+
this.callback("ondeselect", [this.selected.get(0), _this]);
|
721
|
+
}
|
722
|
+
}
|
723
|
+
// SAVE NEWLY SELECTED
|
724
|
+
this.selected = obj;
|
725
|
+
if(this.hovered !== false) {
|
726
|
+
this.hovered.children("A").removeClass("hover");
|
727
|
+
this.hovered = obj;
|
728
|
+
}
|
729
|
+
|
730
|
+
// FOCUS NEW NODE AND OPEN ALL PARENT NODES IF CLOSED
|
731
|
+
this.selected.children("a").addClass("clicked").end().parents("li.closed").each( function () { _this.open_branch(this, true); });
|
732
|
+
|
733
|
+
// SCROLL SELECTED NODE INTO VIEW
|
734
|
+
this.scroll_into_view(this.selected);
|
735
|
+
|
736
|
+
this.callback("onselect", [this.selected.get(0), _this]);
|
737
|
+
this.callback("onchange", [this.selected.get(0), _this]);
|
738
|
+
},
|
739
|
+
deselect_branch : function (obj) {
|
740
|
+
if(this.locked) return this.error("LOCKED");
|
741
|
+
var _this = this;
|
742
|
+
var obj = this.get_node(obj);
|
743
|
+
if(obj.children("a.clicked").size() == 0) return this.error("DESELECT: NODE NOT SELECTED");
|
744
|
+
|
745
|
+
obj.children("a").removeClass("clicked");
|
746
|
+
this.callback("ondeselect", [obj.get(0), _this]);
|
747
|
+
if(this.settings.rules.multiple != false && this.selected_arr.length > 1) {
|
748
|
+
this.selected_arr = [];
|
749
|
+
this.container.find("a.clicked").filter(":first-child").parent().each(function () {
|
750
|
+
_this.selected_arr.push($(this));
|
751
|
+
});
|
752
|
+
if(obj.get(0) == this.selected.get(0)) {
|
753
|
+
this.selected = this.selected_arr[0];
|
754
|
+
}
|
755
|
+
}
|
756
|
+
else {
|
757
|
+
if(this.settings.rules.multiple != false) this.selected_arr = [];
|
758
|
+
this.selected = false;
|
759
|
+
}
|
760
|
+
this.callback("onchange", [obj.get(0), _this]);
|
761
|
+
},
|
762
|
+
toggle_branch : function (obj) {
|
763
|
+
if(this.locked) return this.error("LOCKED");
|
764
|
+
var obj = this.get_node(obj);
|
765
|
+
if(obj.hasClass("closed")) return this.open_branch(obj);
|
766
|
+
if(obj.hasClass("open")) return this.close_branch(obj);
|
767
|
+
},
|
768
|
+
open_branch : function (obj, disable_animation, callback) {
|
769
|
+
var _this = this;
|
770
|
+
|
771
|
+
if(this.locked) return this.error("LOCKED");
|
772
|
+
var obj = this.get_node(obj);
|
773
|
+
if(!obj.size()) return this.error("OPEN: NO SUCH NODE");
|
774
|
+
if(obj.hasClass("leaf")) return this.error("OPEN: OPENING LEAF NODE");
|
775
|
+
if(this.settings.data.async && obj.find("li").size() == 0) {
|
776
|
+
|
777
|
+
if(this.callback("beforeopen",[obj.get(0),this]) === false) return this.error("OPEN: STOPPED BY USER");
|
778
|
+
|
779
|
+
obj.children("ul:eq(0)").remove().end().append("<ul><li class='last'><a class='loading' href='#'><ins> </ins>" + (_this.settings.lang.loading || "Loading ...") + "</a></li></ul>");
|
780
|
+
obj.removeClass("closed").addClass("open");
|
781
|
+
|
782
|
+
var _datastore = new $.tree.datastores[this.settings.data.type]();
|
783
|
+
_datastore.load(this.callback("beforedata",[obj,this]),this,this.settings.data.opts,function(data){
|
784
|
+
data = _this.callback("ondata", [data, _this]);
|
785
|
+
if(!data || data.length == 0) {
|
786
|
+
obj.removeClass("closed").removeClass("open").addClass("leaf").children("ul").remove();
|
787
|
+
if(callback) callback.call();
|
788
|
+
return;
|
789
|
+
}
|
790
|
+
_datastore.parse(data,_this,_this.settings.data.opts,function(str){
|
791
|
+
str = _this.callback("onparse", [str, _this]);
|
792
|
+
// if(obj.children('ul:eq(0)').children('li').size() > 1) obj.children("ul").find('.loaading').parent().replaceWith(str); else
|
793
|
+
obj.children("ul:eq(0)").replaceWith($("<ul>").html(str));
|
794
|
+
obj.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");
|
795
|
+
obj.find("li").not(".open").not(".closed").addClass("leaf");
|
796
|
+
_this.open_branch.apply(_this, [obj]);
|
797
|
+
if(callback) callback.call();
|
798
|
+
});
|
799
|
+
});
|
800
|
+
return true;
|
801
|
+
}
|
802
|
+
else {
|
803
|
+
if(!this.settings.data.async) {
|
804
|
+
if(this.callback("beforeopen",[obj.get(0),this]) === false) return this.error("OPEN: STOPPED BY USER");
|
805
|
+
}
|
806
|
+
if(parseInt(this.settings.ui.animation) > 0 && !disable_animation ) {
|
807
|
+
obj.children("ul:eq(0)").css("display","none");
|
808
|
+
obj.removeClass("closed").addClass("open");
|
809
|
+
obj.children("ul:eq(0)").slideDown(parseInt(this.settings.ui.animation), function() {
|
810
|
+
$(this).css("display","");
|
811
|
+
if(callback) callback.call();
|
812
|
+
});
|
813
|
+
} else {
|
814
|
+
obj.removeClass("closed").addClass("open");
|
815
|
+
if(callback) callback.call();
|
816
|
+
}
|
817
|
+
this.callback("onopen", [obj.get(0), this]);
|
818
|
+
return true;
|
819
|
+
}
|
820
|
+
},
|
821
|
+
close_branch : function (obj, disable_animation) {
|
822
|
+
if(this.locked) return this.error("LOCKED");
|
823
|
+
var _this = this;
|
824
|
+
var obj = this.get_node(obj);
|
825
|
+
if(!obj.size()) return this.error("CLOSE: NO SUCH NODE");
|
826
|
+
if(_this.callback("beforeclose",[obj.get(0),_this]) === false) return this.error("CLOSE: STOPPED BY USER");
|
827
|
+
if(parseInt(this.settings.ui.animation) > 0 && !disable_animation && obj.children("ul:eq(0)").size() == 1) {
|
828
|
+
obj.children("ul:eq(0)").slideUp(parseInt(this.settings.ui.animation), function() {
|
829
|
+
if(obj.hasClass("open")) obj.removeClass("open").addClass("closed");
|
830
|
+
$(this).css("display","");
|
831
|
+
});
|
832
|
+
}
|
833
|
+
else {
|
834
|
+
if(obj.hasClass("open")) obj.removeClass("open").addClass("closed");
|
835
|
+
}
|
836
|
+
if(this.selected && this.settings.ui.selected_parent_close !== false && obj.children("ul:eq(0)").find("a.clicked").size() > 0) {
|
837
|
+
obj.find("li:has(a.clicked)").each(function() {
|
838
|
+
_this.deselect_branch(this);
|
839
|
+
});
|
840
|
+
if(this.settings.ui.selected_parent_close == "select_parent" && obj.children("a.clicked").size() == 0) this.select_branch(obj, (this.settings.rules.multiple != false && this.selected_arr.length > 0) );
|
841
|
+
}
|
842
|
+
this.callback("onclose", [obj.get(0), this]);
|
843
|
+
},
|
844
|
+
open_all : function (obj, callback) {
|
845
|
+
if(this.locked) return this.error("LOCKED");
|
846
|
+
var _this = this;
|
847
|
+
obj = obj ? this.get_node(obj) : this.container;
|
848
|
+
|
849
|
+
var s = obj.find("li.closed").size();
|
850
|
+
if(!callback) this.cl_count = 0;
|
851
|
+
else this.cl_count --;
|
852
|
+
if(s > 0) {
|
853
|
+
this.cl_count += s;
|
854
|
+
// maybe add .andSelf()
|
855
|
+
obj.find("li.closed").each( function () { var __this = this; _this.open_branch.apply(_this, [this, true, function() { _this.open_all.apply(_this, [__this, true]); } ]); });
|
856
|
+
}
|
857
|
+
else if(this.cl_count == 0) this.callback("onopen_all",[this]);
|
858
|
+
},
|
859
|
+
close_all : function (obj) {
|
860
|
+
if(this.locked) return this.error("LOCKED");
|
861
|
+
var _this = this;
|
862
|
+
obj = obj ? this.get_node(obj) : this.container;
|
863
|
+
// maybe add .andSelf()
|
864
|
+
obj.find("li.open").each( function () { _this.close_branch(this, true); });
|
865
|
+
this.callback("onclose_all",[this]);
|
866
|
+
},
|
867
|
+
|
868
|
+
set_lang : function (i) {
|
869
|
+
if(!$.isArray(this.settings.languages) || this.settings.languages.length == 0) return false;
|
870
|
+
if(this.locked) return this.error("LOCKED");
|
871
|
+
if(!$.inArray(i,this.settings.languages) && typeof this.settings.languages[i] != "undefined") i = this.settings.languages[i];
|
872
|
+
if(typeof i == "undefined") return false;
|
873
|
+
if(i == this.current_lang) return true;
|
874
|
+
var st = false;
|
875
|
+
var id = "#" + this.container.attr("id");
|
876
|
+
st = tree_component.get_css(id + " ." + this.current_lang);
|
877
|
+
if(st !== false) st.style.display = "none";
|
878
|
+
st = tree_component.get_css(id + " ." + i);
|
879
|
+
if(st !== false) st.style.display = "";
|
880
|
+
this.current_lang = i;
|
881
|
+
return true;
|
882
|
+
},
|
883
|
+
get_lang : function () {
|
884
|
+
if(!$.isArray(this.settings.languages) || this.settings.languages.length == 0) return false;
|
885
|
+
return this.current_lang;
|
886
|
+
},
|
887
|
+
|
888
|
+
create : function (obj, ref_node, position) {
|
889
|
+
if(this.locked) return this.error("LOCKED");
|
890
|
+
|
891
|
+
var root = false;
|
892
|
+
if(ref_node == -1) { root = true; ref_node = this.container; }
|
893
|
+
else ref_node = ref_node ? this.get_node(ref_node) : this.selected;
|
894
|
+
|
895
|
+
if(!root && (!ref_node || !ref_node.size())) return this.error("CREATE: NO NODE SELECTED");
|
896
|
+
|
897
|
+
var pos = position;
|
898
|
+
|
899
|
+
var tmp = ref_node; // for type calculation
|
900
|
+
if(position == "before") {
|
901
|
+
position = ref_node.parent().children().index(ref_node);
|
902
|
+
ref_node = ref_node.parents("li:eq(0)");
|
903
|
+
}
|
904
|
+
if(position == "after") {
|
905
|
+
position = ref_node.parent().children().index(ref_node) + 1;
|
906
|
+
ref_node = ref_node.parents("li:eq(0)");
|
907
|
+
}
|
908
|
+
if(!root && ref_node.size() == 0) { root = true; ref_node = this.container; }
|
909
|
+
|
910
|
+
if(!root) {
|
911
|
+
if(!this.check("creatable", ref_node)) return this.error("CREATE: CANNOT CREATE IN NODE");
|
912
|
+
if(ref_node.hasClass("closed")) {
|
913
|
+
if(this.settings.data.async && ref_node.children("ul").size() == 0) {
|
914
|
+
var _this = this;
|
915
|
+
return this.open_branch(ref_node, true, function () { _this.create.apply(_this, [obj, ref_node, position]); } );
|
916
|
+
}
|
917
|
+
else this.open_branch(ref_node, true);
|
918
|
+
}
|
919
|
+
}
|
920
|
+
|
921
|
+
// creating new object to pass to parseJSON
|
922
|
+
var torename = false;
|
923
|
+
if(!obj) obj = {};
|
924
|
+
else obj = $.extend(true, {}, obj);
|
925
|
+
if(!obj.attributes) obj.attributes = {};
|
926
|
+
if(!obj.attributes[this.settings.rules.type_attr]) obj.attributes[this.settings.rules.type_attr] = this.get_type(tmp) || "default";
|
927
|
+
if(this.settings.languages.length) {
|
928
|
+
if(!obj.data) { obj.data = {}; torename = true; }
|
929
|
+
for(var i = 0; i < this.settings.languages.length; i++) {
|
930
|
+
if(!obj.data[this.settings.languages[i]]) obj.data[this.settings.languages[i]] = ((typeof this.settings.lang.new_node).toLowerCase() != "string" && this.settings.lang.new_node[i]) ? this.settings.lang.new_node[i] : this.settings.lang.new_node;
|
931
|
+
}
|
932
|
+
}
|
933
|
+
else {
|
934
|
+
if(!obj.data) { obj.data = this.settings.lang.new_node; torename = true; }
|
935
|
+
}
|
936
|
+
|
937
|
+
obj = this.callback("ondata",[obj, this]);
|
938
|
+
var obj_s = $.tree.datastores.json().parse(obj,this);
|
939
|
+
obj_s = this.callback("onparse", [obj_s, this]);
|
940
|
+
var $li = $(obj_s);
|
941
|
+
|
942
|
+
if($li.children("ul").size()) {
|
943
|
+
if(!$li.is(".open")) $li.addClass("closed");
|
944
|
+
}
|
945
|
+
else $li.addClass("leaf");
|
946
|
+
$li.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");
|
947
|
+
$li.find("li").not(".open").not(".closed").addClass("leaf");
|
948
|
+
|
949
|
+
var r = {
|
950
|
+
max_depth : this.settings.rules.use_max_depth ? this.check("max_depth", (root ? -1 : ref_node) ) : -1,
|
951
|
+
max_children : this.settings.rules.use_max_children ? this.check("max_children", (root ? -1 : ref_node) ) : -1,
|
952
|
+
valid_children : this.check("valid_children", (root ? -1 : ref_node) )
|
953
|
+
};
|
954
|
+
var nod_type = this.get_type($li);
|
955
|
+
if(typeof r.valid_children != "undefined" && (r.valid_children == "none" || ($.isArray(r.valid_children) && $.inArray(nod_type, r.valid_children) == -1))) return this.error("CREATE: NODE NOT A VALID CHILD");
|
956
|
+
|
957
|
+
if(this.settings.rules.use_max_children) {
|
958
|
+
if(typeof r.max_children != "undefined" && r.max_children != -1 && r.max_children >= this.children(ref_node).size()) return this.error("CREATE: MAX_CHILDREN REACHED");
|
959
|
+
}
|
960
|
+
|
961
|
+
if(this.settings.rules.use_max_depth) {
|
962
|
+
if(typeof r.max_depth != "undefined" && r.max_depth === 0) return this.error("CREATE: MAX-DEPTH REACHED");
|
963
|
+
// check for max_depth up the chain
|
964
|
+
var mx = (r.max_depth > 0) ? r.max_depth : false;
|
965
|
+
var i = 0;
|
966
|
+
var t = ref_node;
|
967
|
+
|
968
|
+
while(t !== -1 && !root) {
|
969
|
+
t = this.parent(t);
|
970
|
+
i ++;
|
971
|
+
var m = this.check("max_depth",t);
|
972
|
+
if(m >= 0) {
|
973
|
+
mx = (mx === false) ? (m - i) : Math.min(mx, m - i);
|
974
|
+
}
|
975
|
+
if(mx !== false && mx <= 0) return this.error("CREATE: MAX-DEPTH REACHED");
|
976
|
+
}
|
977
|
+
if(mx !== false && mx <= 0) return this.error("CREATE: MAX-DEPTH REACHED");
|
978
|
+
if(mx !== false) {
|
979
|
+
var incr = 1;
|
980
|
+
var t = $li;
|
981
|
+
while(t.size() > 0) {
|
982
|
+
if(mx - incr < 0) return this.error("CREATE: MAX-DEPTH REACHED");
|
983
|
+
t = t.children("ul").children("li");
|
984
|
+
incr ++;
|
985
|
+
}
|
986
|
+
}
|
987
|
+
}
|
988
|
+
|
989
|
+
if((typeof position).toLowerCase() == "undefined" || position == "inside")
|
990
|
+
position = (this.settings.rules.createat == "top") ? 0 : ref_node.children("ul:eq(0)").children("li").size();
|
991
|
+
if(ref_node.children("ul").size() == 0 || (root == true && ref_node.children("ul").children("li").size() == 0) ) {
|
992
|
+
if(!root) var a = this.moved($li,ref_node.children("a:eq(0)"),"inside", true);
|
993
|
+
else var a = this.moved($li,this.container.children("ul:eq(0)"),"inside", true);
|
994
|
+
}
|
995
|
+
else if(pos == "before" && ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
996
|
+
var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", true);
|
997
|
+
else if(pos == "after" && ref_node.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").size())
|
998
|
+
var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after", true);
|
999
|
+
else if(ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
1000
|
+
var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", true);
|
1001
|
+
else
|
1002
|
+
var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after",true);
|
1003
|
+
|
1004
|
+
if(a === false) return this.error("CREATE: ABORTED");
|
1005
|
+
|
1006
|
+
if(torename) {
|
1007
|
+
this.select_branch($li.children("a:eq(0)"));
|
1008
|
+
this.rename();
|
1009
|
+
}
|
1010
|
+
return $li;
|
1011
|
+
},
|
1012
|
+
rename : function (obj, new_name) {
|
1013
|
+
if(this.locked) return this.error("LOCKED");
|
1014
|
+
obj = obj ? this.get_node(obj) : this.selected;
|
1015
|
+
var _this = this;
|
1016
|
+
if(!obj || !obj.size()) return this.error("RENAME: NO NODE SELECTED");
|
1017
|
+
if(!this.check("renameable", obj)) return this.error("RENAME: NODE NOT RENAMABLE");
|
1018
|
+
if(!this.callback("beforerename",[obj.get(0), _this.current_lang, _this])) return this.error("RENAME: STOPPED BY USER");
|
1019
|
+
|
1020
|
+
obj.parents("li.closed").each(function () { _this.open_branch(this) });
|
1021
|
+
if(this.current_lang) obj = obj.find("a." + this.current_lang);
|
1022
|
+
else obj = obj.find("a:first");
|
1023
|
+
|
1024
|
+
// Rollback
|
1025
|
+
var rb = {};
|
1026
|
+
rb[this.container.attr("id")] = this.get_rollback();
|
1027
|
+
|
1028
|
+
var icn = obj.children("ins").clone();
|
1029
|
+
if((typeof new_name).toLowerCase() == "string") {
|
1030
|
+
obj.text(new_name).prepend(icn);
|
1031
|
+
_this.callback("onrename", [_this.get_node(obj).get(0), _this, rb]);
|
1032
|
+
}
|
1033
|
+
else {
|
1034
|
+
var last_value = "";
|
1035
|
+
obj.contents().each(function () {
|
1036
|
+
if(this.nodeType == 3) { last_value = this.data; return false; }
|
1037
|
+
});
|
1038
|
+
_this.inp = $("<input type='text' autocomplete='off' />");
|
1039
|
+
_this.inp
|
1040
|
+
.val(last_value.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<"))
|
1041
|
+
.bind("mousedown", function (event) { event.stopPropagation(); })
|
1042
|
+
.bind("mouseup", function (event) { event.stopPropagation(); })
|
1043
|
+
.bind("click", function (event) { event.stopPropagation(); })
|
1044
|
+
.bind("keyup", function (event) {
|
1045
|
+
var key = event.keyCode || event.which;
|
1046
|
+
if(key == 27) { this.value = last_value; this.blur(); return }
|
1047
|
+
if(key == 13) { this.blur(); return; }
|
1048
|
+
});
|
1049
|
+
_this.inp.blur(function(event) {
|
1050
|
+
if(this.value == "") this.value = last_value;
|
1051
|
+
obj.text(this.value).prepend(icn);
|
1052
|
+
obj.get(0).style.display = "";
|
1053
|
+
obj.prevAll("span").remove();
|
1054
|
+
_this.inp = false;
|
1055
|
+
_this.callback("onrename", [_this.get_node(obj).get(0), _this, rb]);
|
1056
|
+
});
|
1057
|
+
|
1058
|
+
var spn = $("<span />").addClass(obj.attr("class")).append(icn).append(_this.inp);
|
1059
|
+
obj.get(0).style.display = "none";
|
1060
|
+
obj.parent().prepend(spn);
|
1061
|
+
_this.inp.get(0).focus();
|
1062
|
+
_this.inp.get(0).select();
|
1063
|
+
}
|
1064
|
+
},
|
1065
|
+
remove : function(obj) {
|
1066
|
+
if(this.locked) return this.error("LOCKED");
|
1067
|
+
var _this = this;
|
1068
|
+
|
1069
|
+
// Rollback
|
1070
|
+
var rb = {};
|
1071
|
+
rb[this.container.attr("id")] = this.get_rollback();
|
1072
|
+
|
1073
|
+
if(obj && (!this.selected || this.get_node(obj).get(0) != this.selected.get(0) )) {
|
1074
|
+
obj = this.get_node(obj);
|
1075
|
+
if(obj.size()) {
|
1076
|
+
if(!this.check("deletable", obj)) return this.error("DELETE: NODE NOT DELETABLE");
|
1077
|
+
if(!this.callback("beforedelete",[obj.get(0), _this])) return this.error("DELETE: STOPPED BY USER");
|
1078
|
+
$parent = obj.parent();
|
1079
|
+
if(obj.find("a.clicked").size()) {
|
1080
|
+
var reset_selected = false;
|
1081
|
+
_this.selected_arr = [];
|
1082
|
+
this.container.find("a.clicked").filter(":first-child").parent().each(function () {
|
1083
|
+
if(!reset_selected && this == _this.selected.get(0)) reset_selected = true;
|
1084
|
+
if($(this).parents().index(obj) != -1) return true;
|
1085
|
+
_this.selected_arr.push($(this));
|
1086
|
+
});
|
1087
|
+
if(reset_selected) this.selected = this.selected_arr[0] || false;
|
1088
|
+
}
|
1089
|
+
obj = obj.remove();
|
1090
|
+
$parent.children("li:last").addClass("last");
|
1091
|
+
if($parent.children("li").size() == 0) {
|
1092
|
+
$li = $parent.parents("li:eq(0)");
|
1093
|
+
$li.removeClass("open").removeClass("closed").addClass("leaf").children("ul").remove();
|
1094
|
+
}
|
1095
|
+
this.callback("ondelete", [obj.get(0), this, rb]);
|
1096
|
+
}
|
1097
|
+
}
|
1098
|
+
else if(this.selected) {
|
1099
|
+
if(!this.check("deletable", this.selected)) return this.error("DELETE: NODE NOT DELETABLE");
|
1100
|
+
if(!this.callback("beforedelete",[this.selected.get(0), _this])) return this.error("DELETE: STOPPED BY USER");
|
1101
|
+
$parent = this.selected.parent();
|
1102
|
+
var obj = this.selected;
|
1103
|
+
if(this.settings.rules.multiple == false || this.selected_arr.length == 1) {
|
1104
|
+
var stop = true;
|
1105
|
+
var tmp = this.settings.ui.selected_delete == "select_previous" ? this.prev(this.selected) : false;
|
1106
|
+
}
|
1107
|
+
obj = obj.remove();
|
1108
|
+
$parent.children("li:last").addClass("last");
|
1109
|
+
if($parent.children("li").size() == 0) {
|
1110
|
+
$li = $parent.parents("li:eq(0)");
|
1111
|
+
$li.removeClass("open").removeClass("closed").addClass("leaf").children("ul").remove();
|
1112
|
+
}
|
1113
|
+
if(!stop && this.settings.rules.multiple != false) {
|
1114
|
+
var _this = this;
|
1115
|
+
this.selected_arr = [];
|
1116
|
+
this.container.find("a.clicked").filter(":first-child").parent().each(function () {
|
1117
|
+
_this.selected_arr.push($(this));
|
1118
|
+
});
|
1119
|
+
if(this.selected_arr.length > 0) {
|
1120
|
+
this.selected = this.selected_arr[0];
|
1121
|
+
this.remove();
|
1122
|
+
}
|
1123
|
+
}
|
1124
|
+
if(stop && tmp) this.select_branch(tmp);
|
1125
|
+
this.callback("ondelete", [obj.get(0), this, rb]);
|
1126
|
+
}
|
1127
|
+
else return this.error("DELETE: NO NODE SELECTED");
|
1128
|
+
},
|
1129
|
+
|
1130
|
+
next : function (obj, strict) {
|
1131
|
+
obj = this.get_node(obj);
|
1132
|
+
if(!obj.size()) return false;
|
1133
|
+
if(strict) return (obj.nextAll("li").size() > 0) ? obj.nextAll("li:eq(0)") : false;
|
1134
|
+
|
1135
|
+
if(obj.hasClass("open")) return obj.find("li:eq(0)");
|
1136
|
+
else if(obj.nextAll("li").size() > 0) return obj.nextAll("li:eq(0)");
|
1137
|
+
else return obj.parents("li").next("li").eq(0);
|
1138
|
+
},
|
1139
|
+
prev : function(obj, strict) {
|
1140
|
+
obj = this.get_node(obj);
|
1141
|
+
if(!obj.size()) return false;
|
1142
|
+
if(strict) return (obj.prevAll("li").size() > 0) ? obj.prevAll("li:eq(0)") : false;
|
1143
|
+
|
1144
|
+
if(obj.prev("li").size()) {
|
1145
|
+
var obj = obj.prev("li").eq(0);
|
1146
|
+
while(obj.hasClass("open")) obj = obj.children("ul:eq(0)").children("li:last");
|
1147
|
+
return obj;
|
1148
|
+
}
|
1149
|
+
else return obj.parents("li:eq(0)").size() ? obj.parents("li:eq(0)") : false;
|
1150
|
+
},
|
1151
|
+
parent : function(obj) {
|
1152
|
+
obj = this.get_node(obj);
|
1153
|
+
if(!obj.size()) return false;
|
1154
|
+
return obj.parents("li:eq(0)").size() ? obj.parents("li:eq(0)") : -1;
|
1155
|
+
},
|
1156
|
+
children : function(obj) {
|
1157
|
+
if(obj === -1) return this.container.children("ul:eq(0)").children("li");
|
1158
|
+
|
1159
|
+
obj = this.get_node(obj);
|
1160
|
+
if(!obj.size()) return false;
|
1161
|
+
return obj.children("ul:eq(0)").children("li");
|
1162
|
+
},
|
1163
|
+
|
1164
|
+
toggle_dots : function () {
|
1165
|
+
if(this.settings.ui.dots) {
|
1166
|
+
this.settings.ui.dots = false;
|
1167
|
+
this.container.children("ul:eq(0)").addClass("no_dots");
|
1168
|
+
}
|
1169
|
+
else {
|
1170
|
+
this.settings.ui.dots = true;
|
1171
|
+
this.container.children("ul:eq(0)").removeClass("no_dots");
|
1172
|
+
}
|
1173
|
+
},
|
1174
|
+
|
1175
|
+
callback : function (cb, args) {
|
1176
|
+
var p = false;
|
1177
|
+
var r = null;
|
1178
|
+
for(var i in this.settings.plugins) {
|
1179
|
+
if(typeof $.tree.plugins[i] != "object") continue;
|
1180
|
+
p = $.tree.plugins[i];
|
1181
|
+
if(p.callbacks && typeof p.callbacks[cb] == "function") r = p.callbacks[cb].apply(this, args);
|
1182
|
+
if(typeof r !== "undefined" && r !== null) {
|
1183
|
+
if(cb == "ondata" || cb == "onparse") args[0] = r; // keep the chain if data or parse
|
1184
|
+
else return r;
|
1185
|
+
}
|
1186
|
+
}
|
1187
|
+
p = this.settings.callback[cb];
|
1188
|
+
if(typeof p == "function") return p.apply(null, args);
|
1189
|
+
},
|
1190
|
+
get_rollback : function () {
|
1191
|
+
var rb = {};
|
1192
|
+
rb.html = this.container.html();
|
1193
|
+
rb.selected = this.selected ? this.selected.attr("id") : false;
|
1194
|
+
return rb;
|
1195
|
+
},
|
1196
|
+
moved : function (what, where, how, is_new, is_copy, rb) {
|
1197
|
+
var what = $(what);
|
1198
|
+
var $parent = $(what).parents("ul:eq(0)");
|
1199
|
+
var $where = $(where);
|
1200
|
+
if($where.is("ins")) $where = $where.parent();
|
1201
|
+
|
1202
|
+
// Rollback
|
1203
|
+
if(!rb) {
|
1204
|
+
var rb = {};
|
1205
|
+
rb[this.container.attr("id")] = this.get_rollback();
|
1206
|
+
if(!is_new) {
|
1207
|
+
var tmp = what.size() > 1 ? what.eq(0).parents(".tree:eq(0)") : what.parents(".tree:eq(0)");
|
1208
|
+
if(tmp.get(0) != this.container.get(0)) {
|
1209
|
+
tmp = tree_component.inst[tmp.attr("id")];
|
1210
|
+
rb[tmp.container.attr("id")] = tmp.get_rollback();
|
1211
|
+
}
|
1212
|
+
delete tmp;
|
1213
|
+
}
|
1214
|
+
}
|
1215
|
+
|
1216
|
+
if(how == "inside" && this.settings.data.async) {
|
1217
|
+
var _this = this;
|
1218
|
+
if(this.get_node($where).hasClass("closed")) {
|
1219
|
+
return this.open_branch(this.get_node($where), true, function () { _this.moved.apply(_this, [what, where, how, is_new, is_copy, rb]); });
|
1220
|
+
}
|
1221
|
+
if(this.get_node($where).find("> ul > li > a.loading").size() == 1) {
|
1222
|
+
setTimeout(function () { _this.moved.apply(_this, [what, where, how, is_new, is_copy]); }, 200);
|
1223
|
+
return;
|
1224
|
+
}
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
|
1228
|
+
// IF MULTIPLE
|
1229
|
+
if(what.size() > 1) {
|
1230
|
+
var _this = this;
|
1231
|
+
var tmp = this.moved(what.eq(0), where, how, false, is_copy, rb);
|
1232
|
+
what.each(function (i) {
|
1233
|
+
if(i == 0) return;
|
1234
|
+
if(tmp) { // if tmp is false - the previous move was a no-go
|
1235
|
+
tmp = _this.moved(this, tmp.children("a:eq(0)"), "after", false, is_copy, rb);
|
1236
|
+
}
|
1237
|
+
});
|
1238
|
+
return what;
|
1239
|
+
}
|
1240
|
+
|
1241
|
+
if(is_copy) {
|
1242
|
+
_what = what.clone();
|
1243
|
+
_what.each(function (i) {
|
1244
|
+
this.id = this.id + "_copy";
|
1245
|
+
$(this).find("li").each(function () {
|
1246
|
+
this.id = this.id + "_copy";
|
1247
|
+
});
|
1248
|
+
$(this).removeClass("dragged").find("a.clicked").removeClass("clicked").end().find("li.dragged").removeClass("dragged");
|
1249
|
+
});
|
1250
|
+
}
|
1251
|
+
else _what = what;
|
1252
|
+
if(is_new) {
|
1253
|
+
if(!this.callback("beforecreate", [this.get_node(what).get(0), this.get_node(where).get(0),how,this])) return false;
|
1254
|
+
}
|
1255
|
+
else {
|
1256
|
+
if(!this.callback("beforemove", [this.get_node(what).get(0), this.get_node(where).get(0),how,this])) return false;
|
1257
|
+
}
|
1258
|
+
|
1259
|
+
if(!is_new) {
|
1260
|
+
var tmp = what.parents(".tree:eq(0)");
|
1261
|
+
// if different trees
|
1262
|
+
if(tmp.get(0) != this.container.get(0)) {
|
1263
|
+
tmp = tree_component.inst[tmp.attr("id")];
|
1264
|
+
|
1265
|
+
// if there are languages - otherwise - no cleanup needed
|
1266
|
+
if(tmp.settings.languages.length) {
|
1267
|
+
var res = [];
|
1268
|
+
// if new tree has no languages - use current visible
|
1269
|
+
if(this.settings.languages.length == 0) res.push("." + tmp.current_lang);
|
1270
|
+
else {
|
1271
|
+
for(var i in this.settings.languages) {
|
1272
|
+
if(!this.settings.languages.hasOwnProperty(i)) continue;
|
1273
|
+
for(var j in tmp.settings.languages) {
|
1274
|
+
if(!tmp.settings.languages.hasOwnProperty(j)) continue;
|
1275
|
+
if(this.settings.languages[i] == tmp.settings.languages[j]) res.push("." + this.settings.languages[i]);
|
1276
|
+
}
|
1277
|
+
}
|
1278
|
+
}
|
1279
|
+
if(res.length == 0) return this.error("MOVE: NO COMMON LANGUAGES");
|
1280
|
+
_what.find("a").not(res.join(",")).remove();
|
1281
|
+
}
|
1282
|
+
_what.find("a.clicked").removeClass("clicked");
|
1283
|
+
}
|
1284
|
+
}
|
1285
|
+
what = _what;
|
1286
|
+
|
1287
|
+
// ADD NODE TO NEW PLACE
|
1288
|
+
switch(how) {
|
1289
|
+
case "before":
|
1290
|
+
$where.parents("ul:eq(0)").children("li.last").removeClass("last");
|
1291
|
+
$where.parent().before(what.removeClass("last"));
|
1292
|
+
$where.parents("ul:eq(0)").children("li:last").addClass("last");
|
1293
|
+
break;
|
1294
|
+
case "after":
|
1295
|
+
$where.parents("ul:eq(0)").children("li.last").removeClass("last");
|
1296
|
+
$where.parent().after(what.removeClass("last"));
|
1297
|
+
$where.parents("ul:eq(0)").children("li:last").addClass("last");
|
1298
|
+
break;
|
1299
|
+
case "inside":
|
1300
|
+
if($where.parent().children("ul:first").size()) {
|
1301
|
+
if(this.settings.rules.createat == "top") {
|
1302
|
+
$where.parent().children("ul:first").prepend(what.removeClass("last")).children("li:last").addClass("last");
|
1303
|
+
|
1304
|
+
// restored this section
|
1305
|
+
var tmp_node = $where.parent().children("ul:first").children("li:first");
|
1306
|
+
if(tmp_node.size()) {
|
1307
|
+
how = "before";
|
1308
|
+
where = tmp_node;
|
1309
|
+
}
|
1310
|
+
}
|
1311
|
+
else {
|
1312
|
+
// restored this section
|
1313
|
+
var tmp_node = $where.parent().children("ul:first").children(".last");
|
1314
|
+
if(tmp_node.size()) {
|
1315
|
+
how = "after";
|
1316
|
+
where = tmp_node;
|
1317
|
+
}
|
1318
|
+
|
1319
|
+
$where.parent().children("ul:first").children(".last").removeClass("last").end().append(what.removeClass("last")).children("li:last").addClass("last");
|
1320
|
+
}
|
1321
|
+
}
|
1322
|
+
else {
|
1323
|
+
what.addClass("last");
|
1324
|
+
$where.parent().removeClass("leaf").append("<ul/>");
|
1325
|
+
if(!$where.parent().hasClass("open")) $where.parent().addClass("closed");
|
1326
|
+
$where.parent().children("ul:first").prepend(what);
|
1327
|
+
}
|
1328
|
+
if($where.parent().hasClass("closed")) { this.open_branch($where); }
|
1329
|
+
break;
|
1330
|
+
default:
|
1331
|
+
break;
|
1332
|
+
}
|
1333
|
+
// CLEANUP OLD PARENT
|
1334
|
+
if($parent.find("li").size() == 0) {
|
1335
|
+
var $li = $parent.parent();
|
1336
|
+
$li.removeClass("open").removeClass("closed").addClass("leaf");
|
1337
|
+
if(!$li.is(".tree")) $li.children("ul").remove();
|
1338
|
+
$li.parents("ul:eq(0)").children("li.last").removeClass("last").end().children("li:last").addClass("last");
|
1339
|
+
}
|
1340
|
+
else {
|
1341
|
+
$parent.children("li.last").removeClass("last");
|
1342
|
+
$parent.children("li:last").addClass("last");
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
// NO LONGER CORRECT WITH position PARAM - if(is_new && how != "inside") where = this.get_node(where).parents("li:eq(0)");
|
1346
|
+
if(is_copy) this.callback("oncopy", [this.get_node(what).get(0), this.get_node(where).get(0), how, this, rb]);
|
1347
|
+
else if(is_new) this.callback("oncreate", [this.get_node(what).get(0), ($where.is("ul") ? -1 : this.get_node(where).get(0) ), how, this, rb]);
|
1348
|
+
else this.callback("onmove", [this.get_node(what).get(0), this.get_node(where).get(0), how, this, rb]);
|
1349
|
+
return what;
|
1350
|
+
},
|
1351
|
+
error : function (code) {
|
1352
|
+
this.callback("error",[code,this]);
|
1353
|
+
return false;
|
1354
|
+
},
|
1355
|
+
lock : function (state) {
|
1356
|
+
this.locked = state;
|
1357
|
+
if(this.locked) this.container.children("ul:eq(0)").addClass("locked");
|
1358
|
+
else this.container.children("ul:eq(0)").removeClass("locked");
|
1359
|
+
},
|
1360
|
+
cut : function (obj) {
|
1361
|
+
if(this.locked) return this.error("LOCKED");
|
1362
|
+
obj = obj ? this.get_node(obj) : this.container.find("a.clicked").filter(":first-child").parent();
|
1363
|
+
if(!obj || !obj.size()) return this.error("CUT: NO NODE SELECTED");
|
1364
|
+
tree_component.cut_copy.copy_nodes = false;
|
1365
|
+
tree_component.cut_copy.cut_nodes = obj;
|
1366
|
+
},
|
1367
|
+
copy : function (obj) {
|
1368
|
+
if(this.locked) return this.error("LOCKED");
|
1369
|
+
obj = obj ? this.get_node(obj) : this.container.find("a.clicked").filter(":first-child").parent();
|
1370
|
+
if(!obj || !obj.size()) return this.error("COPY: NO NODE SELECTED");
|
1371
|
+
tree_component.cut_copy.copy_nodes = obj;
|
1372
|
+
tree_component.cut_copy.cut_nodes = false;
|
1373
|
+
},
|
1374
|
+
paste : function (obj, position) {
|
1375
|
+
if(this.locked) return this.error("LOCKED");
|
1376
|
+
|
1377
|
+
var root = false;
|
1378
|
+
if(obj == -1) { root = true; obj = this.container; }
|
1379
|
+
else obj = obj ? this.get_node(obj) : this.selected;
|
1380
|
+
|
1381
|
+
if(!root && (!obj || !obj.size())) return this.error("PASTE: NO NODE SELECTED");
|
1382
|
+
if(!tree_component.cut_copy.copy_nodes && !tree_component.cut_copy.cut_nodes) return this.error("PASTE: NOTHING TO DO");
|
1383
|
+
|
1384
|
+
var _this = this;
|
1385
|
+
|
1386
|
+
var pos = position;
|
1387
|
+
|
1388
|
+
if(position == "before") {
|
1389
|
+
position = obj.parent().children().index(obj);
|
1390
|
+
obj = obj.parents("li:eq(0)");
|
1391
|
+
}
|
1392
|
+
else if(position == "after") {
|
1393
|
+
position = obj.parent().children().index(obj) + 1;
|
1394
|
+
obj = obj.parents("li:eq(0)");
|
1395
|
+
}
|
1396
|
+
else if((typeof position).toLowerCase() == "undefined" || position == "inside") {
|
1397
|
+
position = (this.settings.rules.createat == "top") ? 0 : obj.children("ul:eq(0)").children("li").size();
|
1398
|
+
}
|
1399
|
+
if(!root && obj.size() == 0) { root = true; obj = this.container; }
|
1400
|
+
|
1401
|
+
if(tree_component.cut_copy.copy_nodes && tree_component.cut_copy.copy_nodes.size()) {
|
1402
|
+
var ok = true;
|
1403
|
+
if(!root && !this.check_move(tree_component.cut_copy.copy_nodes, obj.children("a:eq(0)"), "inside")) return false;
|
1404
|
+
|
1405
|
+
if(obj.children("ul").size() == 0 || (root == true && obj.children("ul").children("li").size() == 0) ) {
|
1406
|
+
if(!root) var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("a:eq(0)"),"inside", false, true);
|
1407
|
+
else var a = this.moved(tree_component.cut_copy.copy_nodes,this.container.children("ul:eq(0)"),"inside", false, true);
|
1408
|
+
}
|
1409
|
+
else if(pos == "before" && obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
1410
|
+
var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", false, true);
|
1411
|
+
else if(pos == "after" && obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").size())
|
1412
|
+
var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after", false, true);
|
1413
|
+
else if(obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
1414
|
+
var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", false, true);
|
1415
|
+
else
|
1416
|
+
var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after", false, true);
|
1417
|
+
tree_component.cut_copy.copy_nodes = false;
|
1418
|
+
}
|
1419
|
+
if(tree_component.cut_copy.cut_nodes && tree_component.cut_copy.cut_nodes.size()) {
|
1420
|
+
var ok = true;
|
1421
|
+
obj.parents().andSelf().each(function () {
|
1422
|
+
if(tree_component.cut_copy.cut_nodes.index(this) != -1) {
|
1423
|
+
ok = false;
|
1424
|
+
return false;
|
1425
|
+
}
|
1426
|
+
});
|
1427
|
+
if(!ok) return this.error("Invalid paste");
|
1428
|
+
if(!root && !this.check_move(tree_component.cut_copy.cut_nodes, obj.children("a:eq(0)"), "inside")) return false;
|
1429
|
+
|
1430
|
+
if(obj.children("ul").size() == 0 || (root == true && obj.children("ul").children("li").size() == 0) ) {
|
1431
|
+
if(!root) var a = this.moved(tree_component.cut_copy.cut_nodes,obj.children("a:eq(0)"),"inside");
|
1432
|
+
else var a = this.moved(tree_component.cut_copy.cut_nodes,this.container.children("ul:eq(0)"),"inside");
|
1433
|
+
}
|
1434
|
+
else if(pos == "before" && obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
1435
|
+
var a = this.moved(tree_component.cut_copy.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before");
|
1436
|
+
else if(pos == "after" && obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").size())
|
1437
|
+
var a = this.moved(tree_component.cut_copy.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after");
|
1438
|
+
else if(obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
1439
|
+
var a = this.moved(tree_component.cut_copy.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before");
|
1440
|
+
else
|
1441
|
+
var a = this.moved(tree_component.cut_copy.cut_nodes,obj.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after");
|
1442
|
+
tree_component.cut_copy.cut_nodes = false;
|
1443
|
+
}
|
1444
|
+
},
|
1445
|
+
search : function(str, func) {
|
1446
|
+
var _this = this;
|
1447
|
+
if(!str || (this.srch && str != this.srch) ) {
|
1448
|
+
this.srch = "";
|
1449
|
+
this.srch_opn = false;
|
1450
|
+
this.container.find("a.search").removeClass("search");
|
1451
|
+
}
|
1452
|
+
this.srch = str;
|
1453
|
+
if(!str) return;
|
1454
|
+
|
1455
|
+
if(!func) func = "contains";
|
1456
|
+
if(this.settings.data.async) {
|
1457
|
+
if(!this.srch_opn) {
|
1458
|
+
var dd = $.extend( { "search" : str } , this.callback("beforedata", [false, this] ) );
|
1459
|
+
$.ajax({
|
1460
|
+
type : this.settings.data.opts.method,
|
1461
|
+
url : this.settings.data.opts.url,
|
1462
|
+
data : dd,
|
1463
|
+
dataType : "text",
|
1464
|
+
success : function (data) {
|
1465
|
+
_this.srch_opn = $.unique(data.split(","));
|
1466
|
+
_this.search.apply(_this,[str, func]);
|
1467
|
+
}
|
1468
|
+
});
|
1469
|
+
}
|
1470
|
+
else if(this.srch_opn.length) {
|
1471
|
+
if(this.srch_opn && this.srch_opn.length) {
|
1472
|
+
var opn = false;
|
1473
|
+
for(var j = 0; j < this.srch_opn.length; j++) {
|
1474
|
+
if(this.get_node("#" + this.srch_opn[j]).size() > 0) {
|
1475
|
+
opn = true;
|
1476
|
+
var tmp = "#" + this.srch_opn[j];
|
1477
|
+
delete this.srch_opn[j];
|
1478
|
+
this.open_branch(tmp, true, function () { _this.search.apply(_this,[str, func]); } );
|
1479
|
+
}
|
1480
|
+
}
|
1481
|
+
if(!opn) {
|
1482
|
+
this.srch_opn = [];
|
1483
|
+
_this.search.apply(_this,[str, func]);
|
1484
|
+
}
|
1485
|
+
}
|
1486
|
+
}
|
1487
|
+
else {
|
1488
|
+
this.srch_opn = false;
|
1489
|
+
var selector = "a";
|
1490
|
+
// IF LANGUAGE VERSIONS
|
1491
|
+
if(this.settings.languages.length) selector += "." + this.current_lang;
|
1492
|
+
this.callback("onsearch", [this.container.find(selector + ":" + func + "('" + str + "')"), this]);
|
1493
|
+
}
|
1494
|
+
}
|
1495
|
+
else {
|
1496
|
+
var selector = "a";
|
1497
|
+
// IF LANGUAGE VERSIONS
|
1498
|
+
if(this.settings.languages.length) selector += "." + this.current_lang;
|
1499
|
+
var nn = this.container.find(selector + ":" + func + "('" + str + "')");
|
1500
|
+
nn.parents("li.closed").each( function () { _this.open_branch(this, true); });
|
1501
|
+
this.callback("onsearch", [nn, this]);
|
1502
|
+
}
|
1503
|
+
},
|
1504
|
+
add_sheet : tree_component.add_sheet,
|
1505
|
+
|
1506
|
+
destroy : function() {
|
1507
|
+
this.callback("ondestroy", [this]);
|
1508
|
+
|
1509
|
+
this.container.unbind(".jstree");
|
1510
|
+
$("#" + this.container.attr("id")).die("click.jstree").die("dblclick.jstree").die("mouseover.jstree").die("mouseout.jstree").die("mousedown.jstree");
|
1511
|
+
this.container.removeClass("tree ui-widget ui-widget-content tree-default tree-" + this.settings.ui.theme_name).children("ul").removeClass("no_dots ltr locked").find("li").removeClass("leaf").removeClass("open").removeClass("closed").removeClass("last").children("a").removeClass("clicked hover search");
|
1512
|
+
|
1513
|
+
if(this.cntr == tree_component.focused) {
|
1514
|
+
for(var i in tree_component.inst) {
|
1515
|
+
if(i != this.cntr && i != this.container.attr("id")) {
|
1516
|
+
tree_component.inst[i].focus();
|
1517
|
+
break;
|
1518
|
+
}
|
1519
|
+
}
|
1520
|
+
}
|
1521
|
+
|
1522
|
+
tree_component.inst[this.cntr] = false;
|
1523
|
+
tree_component.inst[this.container.attr("id")] = false;
|
1524
|
+
delete tree_component.inst[this.cntr];
|
1525
|
+
delete tree_component.inst[this.container.attr("id")];
|
1526
|
+
tree_component.cntr --;
|
1527
|
+
}
|
1528
|
+
}
|
1529
|
+
};
|
1530
|
+
|
1531
|
+
// instance manager
|
1532
|
+
tree_component.cntr = 0;
|
1533
|
+
tree_component.inst = {};
|
1534
|
+
|
1535
|
+
// themes
|
1536
|
+
tree_component.themes = [];
|
1537
|
+
|
1538
|
+
// drag'n'drop stuff
|
1539
|
+
tree_component.drag_drop = {
|
1540
|
+
isdown : false, // Is there a drag
|
1541
|
+
drag_node : false, // The actual node
|
1542
|
+
drag_help : false, // The helper
|
1543
|
+
dragged : false,
|
1544
|
+
|
1545
|
+
init_x : false,
|
1546
|
+
init_y : false,
|
1547
|
+
moving : false,
|
1548
|
+
|
1549
|
+
origin_tree : false,
|
1550
|
+
marker : false,
|
1551
|
+
|
1552
|
+
move_type : false, // before, after or inside
|
1553
|
+
ref_node : false, // reference node
|
1554
|
+
appended : false, // is helper appended
|
1555
|
+
|
1556
|
+
foreign : false, // Is the dragged node a foreign one
|
1557
|
+
droppable : [], // Array of classes that can be dropped onto the tree
|
1558
|
+
|
1559
|
+
open_time : false, // Timeout for opening nodes
|
1560
|
+
scroll_time : false // Timeout for scrolling
|
1561
|
+
};
|
1562
|
+
tree_component.mouseup = function(event) {
|
1563
|
+
var tmp = tree_component.drag_drop;
|
1564
|
+
if(tmp.open_time) clearTimeout(tmp.open_time);
|
1565
|
+
if(tmp.scroll_time) clearTimeout(tmp.scroll_time);
|
1566
|
+
|
1567
|
+
if(tmp.moving && $.tree.drag_end !== false) $.tree.drag_end.call(null, event, tmp);
|
1568
|
+
|
1569
|
+
if(tmp.foreign === false && tmp.drag_node && tmp.drag_node.size()) {
|
1570
|
+
tmp.drag_help.remove();
|
1571
|
+
if(tmp.move_type) {
|
1572
|
+
var tree1 = tree_component.inst[tmp.ref_node.parents(".tree:eq(0)").attr("id")];
|
1573
|
+
if(tree1) tree1.moved(tmp.dragged, tmp.ref_node, tmp.move_type, false, (tmp.origin_tree.settings.rules.drag_copy == "on" || (tmp.origin_tree.settings.rules.drag_copy == "ctrl" && event.ctrlKey) ) );
|
1574
|
+
}
|
1575
|
+
tmp.move_type = false;
|
1576
|
+
tmp.ref_node = false;
|
1577
|
+
}
|
1578
|
+
if(tmp.foreign !== false) {
|
1579
|
+
if(tmp.drag_help) tmp.drag_help.remove();
|
1580
|
+
if(tmp.move_type) {
|
1581
|
+
var tree1 = tree_component.inst[tmp.ref_node.parents(".tree:eq(0)").attr("id")];
|
1582
|
+
if(tree1) tree1.callback("ondrop",[tmp.f_data, tree1.get_node(tmp.ref_node).get(0), tmp.move_type, tree1]);
|
1583
|
+
}
|
1584
|
+
tmp.foreign = false;
|
1585
|
+
tmp.move_type = false;
|
1586
|
+
tmp.ref_node = false;
|
1587
|
+
}
|
1588
|
+
// RESET EVERYTHING
|
1589
|
+
if(tree_component.drag_drop.marker) tree_component.drag_drop.marker.hide();
|
1590
|
+
if(tmp.dragged && tmp.dragged.size()) tmp.dragged.removeClass("dragged");
|
1591
|
+
tmp.dragged = false;
|
1592
|
+
tmp.drag_help = false;
|
1593
|
+
tmp.drag_node = false;
|
1594
|
+
tmp.f_type = false;
|
1595
|
+
tmp.f_data = false;
|
1596
|
+
tmp.init_x = false;
|
1597
|
+
tmp.init_y = false;
|
1598
|
+
tmp.moving = false;
|
1599
|
+
tmp.appended = false;
|
1600
|
+
tmp.origin_tree = false;
|
1601
|
+
if(tmp.isdown) {
|
1602
|
+
tmp.isdown = false;
|
1603
|
+
event.preventDefault();
|
1604
|
+
event.stopPropagation();
|
1605
|
+
return false;
|
1606
|
+
}
|
1607
|
+
};
|
1608
|
+
tree_component.mousemove = function(event) {
|
1609
|
+
var tmp = tree_component.drag_drop;
|
1610
|
+
var is_start = false;
|
1611
|
+
|
1612
|
+
if(tmp.isdown) {
|
1613
|
+
if(!tmp.moving && Math.abs(tmp.init_x - event.pageX) < 5 && Math.abs(tmp.init_y - event.pageY) < 5) {
|
1614
|
+
event.preventDefault();
|
1615
|
+
event.stopPropagation();
|
1616
|
+
return false;
|
1617
|
+
}
|
1618
|
+
else {
|
1619
|
+
if(!tmp.moving) {
|
1620
|
+
tree_component.drag_drop.moving = true;
|
1621
|
+
is_start = true;
|
1622
|
+
}
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
if(tmp.open_time) clearTimeout(tmp.open_time);
|
1626
|
+
|
1627
|
+
if(tmp.drag_help !== false) {
|
1628
|
+
if(!tmp.appended) {
|
1629
|
+
if(tmp.foreign !== false) tmp.origin_tree = $.tree.focused();
|
1630
|
+
$("body").append(tmp.drag_help);
|
1631
|
+
tmp.w = tmp.drag_help.width();
|
1632
|
+
tmp.appended = true;
|
1633
|
+
}
|
1634
|
+
tmp.drag_help.css({ "left" : (event.pageX + 5 ), "top" : (event.pageY + 15) });
|
1635
|
+
}
|
1636
|
+
|
1637
|
+
if(is_start && $.tree.drag_start !== false) $.tree.drag_start.call(null, event, tmp);
|
1638
|
+
if($.tree.drag !== false) $.tree.drag.call(null, event, tmp);
|
1639
|
+
|
1640
|
+
if(event.target.tagName == "DIV" && event.target.id == "jstree-marker") return false;
|
1641
|
+
|
1642
|
+
var et = $(event.target);
|
1643
|
+
if(et.is("ins")) et = et.parent();
|
1644
|
+
var cnt = et.is(".tree") ? et : et.parents(".tree:eq(0)");
|
1645
|
+
|
1646
|
+
// if not moving over a tree
|
1647
|
+
if(cnt.size() == 0 || !tree_component.inst[cnt.attr("id")]) {
|
1648
|
+
if(tmp.scroll_time) clearTimeout(tmp.scroll_time);
|
1649
|
+
if(tmp.drag_help !== false) tmp.drag_help.find("li:eq(0) ins").addClass("forbidden");
|
1650
|
+
tmp.move_type = false;
|
1651
|
+
tmp.ref_node = false;
|
1652
|
+
tree_component.drag_drop.marker.hide();
|
1653
|
+
return false;
|
1654
|
+
}
|
1655
|
+
|
1656
|
+
var tree2 = tree_component.inst[cnt.attr("id")];
|
1657
|
+
tree2.off_height();
|
1658
|
+
|
1659
|
+
if(tmp.scroll_time) clearTimeout(tmp.scroll_time);
|
1660
|
+
tmp.scroll_time = setTimeout( function() { tree2.scroll_check(event.pageX,event.pageY); }, 50);
|
1661
|
+
|
1662
|
+
var mov = false;
|
1663
|
+
var st = cnt.scrollTop();
|
1664
|
+
|
1665
|
+
if(event.target.tagName == "A" || event.target.tagName == "INS") {
|
1666
|
+
// just in case if hover is over the draggable
|
1667
|
+
if(et.is("#jstree-dragged")) return false;
|
1668
|
+
if(tree2.get_node(event.target).hasClass("closed")) {
|
1669
|
+
tmp.open_time = setTimeout( function () { tree2.open_branch(et); }, 500);
|
1670
|
+
}
|
1671
|
+
|
1672
|
+
var et_off = et.offset();
|
1673
|
+
var goTo = {
|
1674
|
+
x : (et_off.left - 1),
|
1675
|
+
y : (event.pageY - et_off.top)
|
1676
|
+
};
|
1677
|
+
|
1678
|
+
var arr = [];
|
1679
|
+
if(goTo.y < tree2.li_height/3 + 1 ) arr = ["before","inside","after"];
|
1680
|
+
else if(goTo.y > tree2.li_height*2/3 - 1 ) arr = ["after","inside","before"];
|
1681
|
+
else {
|
1682
|
+
if(goTo.y < tree2.li_height/2) arr = ["inside","before","after"];
|
1683
|
+
else arr = ["inside","after","before"];
|
1684
|
+
}
|
1685
|
+
var ok = false;
|
1686
|
+
var nn = (tmp.foreign == false) ? tmp.origin_tree.container.find("li.dragged") : tmp.f_type;
|
1687
|
+
$.each(arr, function(i, val) {
|
1688
|
+
if(tree2.check_move(nn, et, val)) {
|
1689
|
+
mov = val;
|
1690
|
+
ok = true;
|
1691
|
+
return false;
|
1692
|
+
}
|
1693
|
+
});
|
1694
|
+
if(ok) {
|
1695
|
+
switch(mov) {
|
1696
|
+
case "before":
|
1697
|
+
goTo.y = et_off.top - 2;
|
1698
|
+
tree_component.drag_drop.marker.attr("class","marker");
|
1699
|
+
break;
|
1700
|
+
case "after":
|
1701
|
+
goTo.y = et_off.top - 2 + tree2.li_height;
|
1702
|
+
tree_component.drag_drop.marker.attr("class","marker");
|
1703
|
+
break;
|
1704
|
+
case "inside":
|
1705
|
+
goTo.x -= 2;
|
1706
|
+
goTo.y = et_off.top - 2 + tree2.li_height/2;
|
1707
|
+
tree_component.drag_drop.marker.attr("class","marker_plus");
|
1708
|
+
break;
|
1709
|
+
}
|
1710
|
+
tmp.move_type = mov;
|
1711
|
+
tmp.ref_node = $(event.target);
|
1712
|
+
if(tmp.drag_help !== false) tmp.drag_help.find(".forbidden").removeClass("forbidden");
|
1713
|
+
tree_component.drag_drop.marker.css({ "left" : goTo.x , "top" : goTo.y }).show();
|
1714
|
+
}
|
1715
|
+
}
|
1716
|
+
|
1717
|
+
if( (et.is(".tree") || et.is("ul") ) && et.find("li:eq(0)").size() == 0) {
|
1718
|
+
var et_off = et.offset();
|
1719
|
+
tmp.move_type = "inside";
|
1720
|
+
tmp.ref_node = cnt.children("ul:eq(0)");
|
1721
|
+
if(tmp.drag_help !== false) tmp.drag_help.find(".forbidden").removeClass("forbidden");
|
1722
|
+
tree_component.drag_drop.marker.attr("class","marker_plus");
|
1723
|
+
tree_component.drag_drop.marker.css({ "left" : (et_off.left + 10) , "top" : et_off.top + 15 }).show();
|
1724
|
+
}
|
1725
|
+
else if( (event.target.tagName != "A" && event.target.tagName != "INS") || !ok) {
|
1726
|
+
if(tmp.drag_help !== false) tmp.drag_help.find("li:eq(0) ins").addClass("forbidden");
|
1727
|
+
tmp.move_type = false;
|
1728
|
+
tmp.ref_node = false;
|
1729
|
+
tree_component.drag_drop.marker.hide();
|
1730
|
+
}
|
1731
|
+
event.preventDefault();
|
1732
|
+
event.stopPropagation();
|
1733
|
+
return false;
|
1734
|
+
}
|
1735
|
+
return true;
|
1736
|
+
};
|
1737
|
+
$(function () {
|
1738
|
+
$(document).bind("mousemove.jstree", tree_component.mousemove);
|
1739
|
+
$(document).bind("mouseup.jstree", tree_component.mouseup);
|
1740
|
+
});
|
1741
|
+
|
1742
|
+
// cut, copy, paste stuff
|
1743
|
+
tree_component.cut_copy = {
|
1744
|
+
copy_nodes : false,
|
1745
|
+
cut_nodes : false
|
1746
|
+
};
|
1747
|
+
|
1748
|
+
// css stuff
|
1749
|
+
tree_component.css = false;
|
1750
|
+
tree_component.get_css = function(rule_name, delete_flag) {
|
1751
|
+
rule_name = rule_name.toLowerCase();
|
1752
|
+
var css_rules = tree_component.css.cssRules || tree_component.css.rules;
|
1753
|
+
var j = 0;
|
1754
|
+
do {
|
1755
|
+
if(css_rules.length && j > css_rules.length + 5) return false;
|
1756
|
+
if(css_rules[j].selectorText && css_rules[j].selectorText.toLowerCase() == rule_name) {
|
1757
|
+
if(delete_flag == true) {
|
1758
|
+
if(tree_component.css.removeRule) document.styleSheets[i].removeRule(j);
|
1759
|
+
if(tree_component.css.deleteRule) document.styleSheets[i].deleteRule(j);
|
1760
|
+
return true;
|
1761
|
+
}
|
1762
|
+
else return css_rules[j];
|
1763
|
+
}
|
1764
|
+
}
|
1765
|
+
while (css_rules[++j]);
|
1766
|
+
return false;
|
1767
|
+
};
|
1768
|
+
tree_component.add_css = function(rule_name) {
|
1769
|
+
if(tree_component.get_css(rule_name)) return false;
|
1770
|
+
(tree_component.css.insertRule) ? tree_component.css.insertRule(rule_name + ' { }', 0) : tree_component.css.addRule(rule_name, null, 0);
|
1771
|
+
return tree_component.get_css(rule_name);
|
1772
|
+
};
|
1773
|
+
tree_component.remove_css = function(rule_name) {
|
1774
|
+
return tree_component.get_css(rule_name, true);
|
1775
|
+
};
|
1776
|
+
tree_component.add_sheet = function(opts) {
|
1777
|
+
if(opts.str) {
|
1778
|
+
var tmp = document.createElement("style");
|
1779
|
+
tmp.type = "text/css";
|
1780
|
+
if(tmp.styleSheet) tmp.styleSheet.cssText = opts.str;
|
1781
|
+
else tmp.appendChild(document.createTextNode(opts.str));
|
1782
|
+
document.getElementsByTagName("head")[0].appendChild(tmp);
|
1783
|
+
return tmp.sheet;
|
1784
|
+
}
|
1785
|
+
if(opts.url) {
|
1786
|
+
if(document.createStyleSheet) {
|
1787
|
+
try { document.createStyleSheet(opts.url); } catch (e) { };
|
1788
|
+
}
|
1789
|
+
else {
|
1790
|
+
var newSS = document.createElement('link');
|
1791
|
+
newSS.rel = 'stylesheet';
|
1792
|
+
newSS.type = 'text/css';
|
1793
|
+
newSS.media = "all";
|
1794
|
+
newSS.href = opts.url;
|
1795
|
+
// var styles = "@import url(' " + url + " ');";
|
1796
|
+
// newSS.href ='data:text/css,'+escape(styles);
|
1797
|
+
document.getElementsByTagName("head")[0].appendChild(newSS);
|
1798
|
+
return newSS.styleSheet;
|
1799
|
+
}
|
1800
|
+
}
|
1801
|
+
};
|
1802
|
+
$(function () {
|
1803
|
+
var u = navigator.userAgent.toLowerCase();
|
1804
|
+
var v = (u.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1];
|
1805
|
+
var css = '/* TREE LAYOUT */ .tree ul { margin:0 0 0 5px; padding:0 0 0 0; list-style-type:none; } .tree li { display:block; min-height:18px; line-height:18px; padding:0 0 0 15px; margin:0 0 0 0; /* Background fix */ clear:both; } .tree li ul { display:none; } .tree li a, .tree li span { display:inline-block;line-height:16px;height:16px;color:black;white-space:nowrap;text-decoration:none;padding:1px 4px 1px 4px;margin:0; } .tree li a:focus { outline: none; } .tree li a input, .tree li span input { margin:0;padding:0 0;display:inline-block;height:12px !important;border:1px solid white;background:white;font-size:10px;font-family:Verdana; } .tree li a input:not([class="xxx"]), .tree li span input:not([class="xxx"]) { padding:1px 0; } /* FOR DOTS */ .tree .ltr li.last { float:left; } .tree > ul li.last { overflow:visible; } /* OPEN OR CLOSE */ .tree li.open ul { display:block; } .tree li.closed ul { display:none !important; } /* FOR DRAGGING */ #jstree-dragged { position:absolute; top:-10px; left:-10px; margin:0; padding:0; } #jstree-dragged ul ul ul { display:none; } #jstree-marker { padding:0; margin:0; line-height:5px; font-size:1px; overflow:hidden; height:5px; position:absolute; left:-45px; top:-30px; z-index:1000; background-color:transparent; background-repeat:no-repeat; display:none; } #jstree-marker.marker { width:45px; background-position:-32px top; } #jstree-marker.marker_plus { width:5px; background-position:right top; } /* BACKGROUND DOTS */ .tree li li { overflow:hidden; } .tree > .ltr > li { display:table; } /* ICONS */ .tree ul ins { display:inline-block; text-decoration:none; width:16px; height:16px; } .tree .ltr ins { margin:0 4px 0 0px; } ';
|
1806
|
+
if(/msie/.test(u) && !/opera/.test(u)) {
|
1807
|
+
if(parseInt(v) == 6) css += '.tree li { height:18px; zoom:1; } .tree li li { overflow:visible; } .tree .ltr li.last { margin-top: expression( (this.previousSibling && /open/.test(this.previousSibling.className) ) ? "-2px" : "0"); } .marker { width:45px; background-position:-32px top; } .marker_plus { width:5px; background-position:right top; }';
|
1808
|
+
if(parseInt(v) == 7) css += '.tree li li { overflow:visible; } .tree .ltr li.last { margin-top: expression( (this.previousSibling && /open/.test(this.previousSibling.className) ) ? "-2px" : "0"); }';
|
1809
|
+
}
|
1810
|
+
if(/opera/.test(u)) css += '.tree > ul > li.last:after { content:"."; display: block; height:1px; clear:both; visibility:hidden; }';
|
1811
|
+
if(/mozilla/.test(u) && !/(compatible|webkit)/.test(u) && v.indexOf("1.8") == 0) css += '.tree .ltr li a { display:inline; float:left; } .tree li ul { clear:both; }';
|
1812
|
+
tree_component.css = tree_component.add_sheet({ str : css });
|
1813
|
+
});
|
1814
|
+
})(jQuery);
|
1815
|
+
|
1816
|
+
// Datastores
|
1817
|
+
// HTML and JSON are included here by default
|
1818
|
+
(function ($) {
|
1819
|
+
$.extend($.tree.datastores, {
|
1820
|
+
"html" : function () {
|
1821
|
+
return {
|
1822
|
+
get : function(obj, tree, opts) {
|
1823
|
+
return obj && $(obj).size() ? $('<div>').append(tree.get_node(obj).clone()).html() : tree.container.children("ul:eq(0)").html();
|
1824
|
+
},
|
1825
|
+
parse : function(data, tree, opts, callback) {
|
1826
|
+
if(callback) callback.call(null, data);
|
1827
|
+
return data;
|
1828
|
+
},
|
1829
|
+
load : function(data, tree, opts, callback) {
|
1830
|
+
if(opts.url) {
|
1831
|
+
$.ajax({
|
1832
|
+
'type' : opts.method,
|
1833
|
+
'url' : opts.url,
|
1834
|
+
'data' : data,
|
1835
|
+
'dataType' : "html",
|
1836
|
+
'success' : function (d, textStatus) {
|
1837
|
+
callback.call(null, d);
|
1838
|
+
},
|
1839
|
+
'error' : function (xhttp, textStatus, errorThrown) {
|
1840
|
+
callback.call(null, false);
|
1841
|
+
tree.error(errorThrown + " " + textStatus);
|
1842
|
+
}
|
1843
|
+
});
|
1844
|
+
}
|
1845
|
+
else {
|
1846
|
+
callback.call(null, opts.static || tree.container.children("ul:eq(0)").html());
|
1847
|
+
}
|
1848
|
+
}
|
1849
|
+
};
|
1850
|
+
},
|
1851
|
+
"json" : function () {
|
1852
|
+
return {
|
1853
|
+
get : function(obj, tree, opts) {
|
1854
|
+
var _this = this;
|
1855
|
+
if(!obj || $(obj).size() == 0) obj = tree.container.children("ul").children("li");
|
1856
|
+
else obj = $(obj);
|
1857
|
+
|
1858
|
+
if(!opts) opts = {};
|
1859
|
+
if(!opts.outer_attrib) opts.outer_attrib = [ "id", "rel", "class" ];
|
1860
|
+
if(!opts.inner_attrib) opts.inner_attrib = [ ];
|
1861
|
+
|
1862
|
+
if(obj.size() > 1) {
|
1863
|
+
var arr = [];
|
1864
|
+
obj.each(function () {
|
1865
|
+
arr.push(_this.get(this, tree, opts));
|
1866
|
+
});
|
1867
|
+
return arr;
|
1868
|
+
}
|
1869
|
+
if(obj.size() == 0) return [];
|
1870
|
+
|
1871
|
+
var json = { attributes : {}, data : {} };
|
1872
|
+
if(obj.hasClass("open")) json.data.state = "open";
|
1873
|
+
if(obj.hasClass("closed")) json.data.state = "closed";
|
1874
|
+
|
1875
|
+
for(var i in opts.outer_attrib) {
|
1876
|
+
if(!opts.outer_attrib.hasOwnProperty(i)) continue;
|
1877
|
+
var val = (opts.outer_attrib[i] == "class") ? obj.attr(opts.outer_attrib[i]).replace(/(^| )last( |$)/ig," ").replace(/(^| )(leaf|closed|open)( |$)/ig," ") : obj.attr(opts.outer_attrib[i]);
|
1878
|
+
if(typeof val != "undefined" && val.toString().replace(" ","").length > 0) json.attributes[opts.outer_attrib[i]] = val;
|
1879
|
+
delete val;
|
1880
|
+
}
|
1881
|
+
|
1882
|
+
if(tree.settings.languages.length) {
|
1883
|
+
for(var i in tree.settings.languages) {
|
1884
|
+
if(!tree.settings.languages.hasOwnProperty(i)) continue;
|
1885
|
+
var a = obj.children("a." + tree.settings.languages[i]);
|
1886
|
+
if(opts.force || opts.inner_attrib.length || a.children("ins").get(0).style.backgroundImage.toString().length || a.children("ins").get(0).className.length) {
|
1887
|
+
json.data[tree.settings.languages[i]] = {};
|
1888
|
+
json.data[tree.settings.languages[i]].title = tree.get_text(obj,tree.settings.languages[i]);
|
1889
|
+
if(a.children("ins").get(0).style.className.length) {
|
1890
|
+
json.data[tree.settings.languages[i]].icon = a.children("ins").get(0).style.className;
|
1891
|
+
}
|
1892
|
+
if(a.children("ins").get(0).style.backgroundImage.length) {
|
1893
|
+
json.data[tree.settings.languages[i]].icon = a.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","");
|
1894
|
+
}
|
1895
|
+
if(opts.inner_attrib.length) {
|
1896
|
+
json.data[tree.settings.languages[i]].attributes = {};
|
1897
|
+
for(var j in opts.inner_attrib) {
|
1898
|
+
if(!opts.inner_attrib.hasOwnProperty(j)) continue;
|
1899
|
+
var val = a.attr(opts.inner_attrib[j]);
|
1900
|
+
if(typeof val != "undefined" && val.toString().replace(" ","").length > 0) json.data[tree.settings.languages[i]].attributes[opts.inner_attrib[j]] = val;
|
1901
|
+
delete val;
|
1902
|
+
}
|
1903
|
+
}
|
1904
|
+
}
|
1905
|
+
else {
|
1906
|
+
json.data[tree.settings.languages[i]] = tree.get_text(obj,tree.settings.languages[i]);
|
1907
|
+
}
|
1908
|
+
}
|
1909
|
+
}
|
1910
|
+
else {
|
1911
|
+
var a = obj.children("a");
|
1912
|
+
json.data.title = tree.get_text(obj);
|
1913
|
+
|
1914
|
+
if(a.children("ins").size() && a.children("ins").get(0).className.length) {
|
1915
|
+
json.data.icon = a.children("ins").get(0).className;
|
1916
|
+
}
|
1917
|
+
if(a.children("ins").size() && a.children("ins").get(0).style.backgroundImage.length) {
|
1918
|
+
json.data.icon = a.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","");
|
1919
|
+
}
|
1920
|
+
|
1921
|
+
if(opts.inner_attrib.length) {
|
1922
|
+
json.data.attributes = {};
|
1923
|
+
for(var j in opts.inner_attrib) {
|
1924
|
+
if(!opts.inner_attrib.hasOwnProperty(j)) continue;
|
1925
|
+
var val = a.attr(opts.inner_attrib[j]);
|
1926
|
+
if(typeof val != "undefined" && val.toString().replace(" ","").length > 0) json.data.attributes[opts.inner_attrib[j]] = val;
|
1927
|
+
delete val;
|
1928
|
+
}
|
1929
|
+
}
|
1930
|
+
}
|
1931
|
+
|
1932
|
+
if(obj.children("ul").size() > 0) {
|
1933
|
+
json.children = [];
|
1934
|
+
obj.children("ul").children("li").each(function () {
|
1935
|
+
json.children.push(_this.get(this, tree, opts));
|
1936
|
+
});
|
1937
|
+
}
|
1938
|
+
return json;
|
1939
|
+
},
|
1940
|
+
parse : function(data, tree, opts, callback) {
|
1941
|
+
if(Object.prototype.toString.apply(data) === "[object Array]") {
|
1942
|
+
var str = '';
|
1943
|
+
for(var i = 0; i < data.length; i ++) {
|
1944
|
+
if(typeof data[i] == "function") continue;
|
1945
|
+
str += this.parse(data[i], tree, opts);
|
1946
|
+
}
|
1947
|
+
if(callback) callback.call(null, str);
|
1948
|
+
return str;
|
1949
|
+
}
|
1950
|
+
|
1951
|
+
if(!data || !data.data) {
|
1952
|
+
if(callback) callback.call(null, false);
|
1953
|
+
return "";
|
1954
|
+
}
|
1955
|
+
|
1956
|
+
var str = '';
|
1957
|
+
str += "<li ";
|
1958
|
+
var cls = false;
|
1959
|
+
if(data.attributes) {
|
1960
|
+
for(var i in data.attributes) {
|
1961
|
+
if(!data.attributes.hasOwnProperty(i)) continue;
|
1962
|
+
if(i == "class") {
|
1963
|
+
str += " class='" + data.attributes[i] + " ";
|
1964
|
+
if(data.state == "closed" || data.state == "open") str += " " + data.state + " ";
|
1965
|
+
str += "' ";
|
1966
|
+
cls = true;
|
1967
|
+
}
|
1968
|
+
else str += " " + i + "='" + data.attributes[i] + "' ";
|
1969
|
+
}
|
1970
|
+
}
|
1971
|
+
if(!cls && (data.state == "closed" || data.state == "open")) str += " class='" + data.state + "' ";
|
1972
|
+
str += ">";
|
1973
|
+
|
1974
|
+
if(tree.settings.languages.length) {
|
1975
|
+
for(var i = 0; i < tree.settings.languages.length; i++) {
|
1976
|
+
var attr = {};
|
1977
|
+
attr["href"] = "";
|
1978
|
+
attr["style"] = "";
|
1979
|
+
attr["class"] = tree.settings.languages[i];
|
1980
|
+
if(data.data[tree.settings.languages[i]] && (typeof data.data[tree.settings.languages[i]].attributes).toLowerCase() != "undefined") {
|
1981
|
+
for(var j in data.data[tree.settings.languages[i]].attributes) {
|
1982
|
+
if(!data.data[tree.settings.languages[i]].attributes.hasOwnProperty(j)) continue;
|
1983
|
+
if(j == "style" || j == "class") attr[j] += " " + data.data[tree.settings.languages[i]].attributes[j];
|
1984
|
+
else attr[j] = data.data[tree.settings.languages[i]].attributes[j];
|
1985
|
+
}
|
1986
|
+
}
|
1987
|
+
str += "<a";
|
1988
|
+
for(var j in attr) {
|
1989
|
+
if(!attr.hasOwnProperty(j)) continue;
|
1990
|
+
str += ' ' + j + '="' + attr[j] + '" ';
|
1991
|
+
}
|
1992
|
+
str += ">";
|
1993
|
+
if(data.data[tree.settings.languages[i]] && data.data[tree.settings.languages[i]].icon) {
|
1994
|
+
str += "<ins " + (data.data[tree.settings.languages[i]].icon.indexOf("/") == -1 ? " class='" + data.data[tree.settings.languages[i]].icon + "' " : " style='background-image:url(\"" + data.data[tree.settings.languages[i]].icon + "\");' " ) + "> </ins>";
|
1995
|
+
}
|
1996
|
+
else str += "<ins> </ins>";
|
1997
|
+
str += ( (typeof data.data[tree.settings.languages[i]].title).toLowerCase() != "undefined" ? data.data[tree.settings.languages[i]].title : data.data[tree.settings.languages[i]] ) + "</a>";
|
1998
|
+
}
|
1999
|
+
}
|
2000
|
+
else {
|
2001
|
+
var attr = {};
|
2002
|
+
attr["href"] = "";
|
2003
|
+
attr["style"] = "";
|
2004
|
+
attr["class"] = "";
|
2005
|
+
if((typeof data.data.attributes).toLowerCase() != "undefined") {
|
2006
|
+
for(var i in data.data.attributes) {
|
2007
|
+
if(!data.data.attributes.hasOwnProperty(i)) continue;
|
2008
|
+
if(i == "style" || i == "class") attr[i] += " " + data.data.attributes[i];
|
2009
|
+
else attr[i] = data.data.attributes[i];
|
2010
|
+
}
|
2011
|
+
}
|
2012
|
+
str += "<a";
|
2013
|
+
for(var i in attr) {
|
2014
|
+
if(!attr.hasOwnProperty(i)) continue;
|
2015
|
+
str += ' ' + i + '="' + attr[i] + '" ';
|
2016
|
+
}
|
2017
|
+
str += ">";
|
2018
|
+
if(data.data.icon) {
|
2019
|
+
str += "<ins " + (data.data.icon.indexOf("/") == -1 ? " class='" + data.data.icon + "' " : " style='background-image:url(\"" + data.data.icon + "\");' " ) + "> </ins>";
|
2020
|
+
}
|
2021
|
+
else str += "<ins> </ins>";
|
2022
|
+
str += ( (typeof data.data.title).toLowerCase() != "undefined" ? data.data.title : data.data ) + "</a>";
|
2023
|
+
}
|
2024
|
+
if(data.children && data.children.length) {
|
2025
|
+
str += '<ul>';
|
2026
|
+
for(var i = 0; i < data.children.length; i++) {
|
2027
|
+
str += this.parse(data.children[i], tree, opts);
|
2028
|
+
}
|
2029
|
+
str += '</ul>';
|
2030
|
+
}
|
2031
|
+
str += "</li>";
|
2032
|
+
if(callback) callback.call(null, str);
|
2033
|
+
return str;
|
2034
|
+
},
|
2035
|
+
load : function(data, tree, opts, callback) {
|
2036
|
+
if(opts.static) {
|
2037
|
+
callback.call(null, opts.static);
|
2038
|
+
}
|
2039
|
+
else {
|
2040
|
+
$.ajax({
|
2041
|
+
'type' : opts.method,
|
2042
|
+
'url' : opts.url,
|
2043
|
+
'data' : data,
|
2044
|
+
'dataType' : "json",
|
2045
|
+
'success' : function (d, textStatus) {
|
2046
|
+
callback.call(null, d);
|
2047
|
+
},
|
2048
|
+
'error' : function (xhttp, textStatus, errorThrown) {
|
2049
|
+
callback.call(null, false);
|
2050
|
+
tree.error(errorThrown + " " + textStatus);
|
2051
|
+
}
|
2052
|
+
});
|
2053
|
+
}
|
2054
|
+
}
|
2055
|
+
}
|
2056
|
+
}
|
2057
|
+
});
|
2058
|
+
})(jQuery);
|