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
@@ -1,126 +0,0 @@
|
|
1
|
-
// css.js
|
2
|
-
|
3
|
-
function get_css(rule_name,stylesheet,delete_flag){if(!document.styleSheets)return false;rule_name=rule_name.toLowerCase();stylesheet=stylesheet||0;for(var i=stylesheet;i<document.styleSheets.length;i++){var styleSheet=document.styleSheets[i];css_rules=document.styleSheets[i].cssRules||document.styleSheets[i].rules;if(!css_rules)continue;var j=0;do{if(css_rules.length&&j>css_rules.length+5)return false;if(css_rules[j].selectorText&&css_rules[j].selectorText.toLowerCase()==rule_name){if(delete_flag==true){if(document.styleSheets[i].removeRule)document.styleSheets[i].removeRule(j);if(document.styleSheets[i].deleteRule)document.styleSheets[i].deleteRule(j);return true}else return css_rules[j]}}while(css_rules[++j])}return false}function add_css(rule_name,stylesheet){rule_name=rule_name.toLowerCase();stylesheet=stylesheet||0;if(!document.styleSheets||get_css(rule_name,stylesheet))return false;(document.styleSheets[stylesheet].insertRule)?document.styleSheets[stylesheet].insertRule(rule_name+' { }',0):document.styleSheets[stylesheet].addRule(rule_name,null,0);return get_css(rule_name,stylesheet)}function get_sheet_num(href_name){if(!document.styleSheets)return false;for(var i=0;i<document.styleSheets.length;i++){if(document.styleSheets[i].href&&document.styleSheets[i].href.toString().match(href_name))return i}return false}function remove_css(rule_name,stylesheet){return get_css(rule_name,stylesheet,true)}function add_sheet(url,media){if(document.createStyleSheet){document.createStyleSheet(url)}else{var newSS=document.createElement('link');newSS.rel='stylesheet';newSS.type='text/css';newSS.media=media||"all";newSS.href=url;document.getElementsByTagName("head")[0].appendChild(newSS)}}
|
4
|
-
|
5
|
-
// jquery.js
|
6
|
-
|
7
|
-
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
|
8
|
-
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
|
9
|
-
|
10
|
-
// sarissa.js
|
11
|
-
|
12
|
-
function Sarissa(){}
|
13
|
-
Sarissa.VERSION="0.9.9.4";Sarissa.PARSED_OK="Document contains no parsing errors";Sarissa.PARSED_EMPTY="Document is empty";Sarissa.PARSED_UNKNOWN_ERROR="Not well-formed or other error";Sarissa.IS_ENABLED_TRANSFORM_NODE=false;Sarissa.REMOTE_CALL_FLAG="gr.abiss.sarissa.REMOTE_CALL_FLAG";Sarissa._lastUniqueSuffix=0;Sarissa._getUniqueSuffix=function(){return Sarissa._lastUniqueSuffix++;};Sarissa._SARISSA_IEPREFIX4XSLPARAM="";Sarissa._SARISSA_HAS_DOM_IMPLEMENTATION=document.implementation&&true;Sarissa._SARISSA_HAS_DOM_CREATE_DOCUMENT=Sarissa._SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.createDocument;Sarissa._SARISSA_HAS_DOM_FEATURE=Sarissa._SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.hasFeature;Sarissa._SARISSA_IS_MOZ=Sarissa._SARISSA_HAS_DOM_CREATE_DOCUMENT&&Sarissa._SARISSA_HAS_DOM_FEATURE;Sarissa._SARISSA_IS_SAFARI=navigator.userAgent.toLowerCase().indexOf("safari")!=-1||navigator.userAgent.toLowerCase().indexOf("konqueror")!=-1;Sarissa._SARISSA_IS_SAFARI_OLD=Sarissa._SARISSA_IS_SAFARI&&(parseInt((navigator.userAgent.match(/AppleWebKit\/(\d+)/)||{})[1],10)<420);Sarissa._SARISSA_IS_IE=document.all&&window.ActiveXObject&&navigator.userAgent.toLowerCase().indexOf("msie")>-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1;Sarissa._SARISSA_IS_OPERA=navigator.userAgent.toLowerCase().indexOf("opera")!=-1;if(!window.Node||!Node.ELEMENT_NODE){Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};}
|
14
|
-
if(Sarissa._SARISSA_IS_SAFARI_OLD){HTMLHtmlElement=document.createElement("html").constructor;Node=HTMLElement={};HTMLElement.prototype=HTMLHtmlElement.__proto__.__proto__;HTMLDocument=Document=document.constructor;var x=new DOMParser();XMLDocument=x.constructor;Element=x.parseFromString("<Single />","text/xml").documentElement.constructor;x=null;}
|
15
|
-
if(typeof XMLDocument=="undefined"&&typeof Document!="undefined"){XMLDocument=Document;}
|
16
|
-
if(Sarissa._SARISSA_IS_IE){Sarissa._SARISSA_IEPREFIX4XSLPARAM="xsl:";var _SARISSA_DOM_PROGID="";var _SARISSA_XMLHTTP_PROGID="";var _SARISSA_DOM_XMLWRITER="";Sarissa.pickRecentProgID=function(idList){var bFound=false,e;var o2Store;for(var i=0;i<idList.length&&!bFound;i++){try{var oDoc=new ActiveXObject(idList[i]);o2Store=idList[i];bFound=true;}catch(objException){e=objException;}}
|
17
|
-
if(!bFound){throw"Could not retrieve a valid progID of Class: "+idList[idList.length-1]+". (original exception: "+e+")";}
|
18
|
-
idList=null;return o2Store;};_SARISSA_DOM_PROGID=null;_SARISSA_THREADEDDOM_PROGID=null;_SARISSA_XSLTEMPLATE_PROGID=null;_SARISSA_XMLHTTP_PROGID=null;XMLHttpRequest=function(){if(!_SARISSA_XMLHTTP_PROGID){_SARISSA_XMLHTTP_PROGID=Sarissa.pickRecentProgID(["Msxml2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"]);}
|
19
|
-
return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);};Sarissa.getDomDocument=function(sUri,sName){if(!_SARISSA_DOM_PROGID){_SARISSA_DOM_PROGID=Sarissa.pickRecentProgID(["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"]);}
|
20
|
-
var oDoc=new ActiveXObject(_SARISSA_DOM_PROGID);if(sName){var prefix="";if(sUri){if(sName.indexOf(":")>1){prefix=sName.substring(0,sName.indexOf(":"));sName=sName.substring(sName.indexOf(":")+1);}else{prefix="a"+Sarissa._getUniqueSuffix();}}
|
21
|
-
if(sUri){oDoc.loadXML('<'+prefix+':'+sName+" xmlns:"+prefix+"=\""+sUri+"\""+" />");}else{oDoc.loadXML('<'+sName+" />");}}
|
22
|
-
return oDoc;};Sarissa.getParseErrorText=function(oDoc){var parseErrorText=Sarissa.PARSED_OK;if(oDoc&&oDoc.parseError&&oDoc.parseError.errorCode&&oDoc.parseError.errorCode!=0){parseErrorText="XML Parsing Error: "+oDoc.parseError.reason+"\nLocation: "+oDoc.parseError.url+"\nLine Number "+oDoc.parseError.line+", Column "+
|
23
|
-
oDoc.parseError.linepos+":\n"+oDoc.parseError.srcText+"\n";for(var i=0;i<oDoc.parseError.linepos;i++){parseErrorText+="-";}
|
24
|
-
parseErrorText+="^\n";}
|
25
|
-
else if(oDoc.documentElement===null){parseErrorText=Sarissa.PARSED_EMPTY;}
|
26
|
-
return parseErrorText;};Sarissa.setXpathNamespaces=function(oDoc,sNsSet){oDoc.setProperty("SelectionLanguage","XPath");oDoc.setProperty("SelectionNamespaces",sNsSet);};XSLTProcessor=function(){if(!_SARISSA_XSLTEMPLATE_PROGID){_SARISSA_XSLTEMPLATE_PROGID=Sarissa.pickRecentProgID(["Msxml2.XSLTemplate.6.0","MSXML2.XSLTemplate.3.0"]);}
|
27
|
-
this.template=new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID);this.processor=null;};XSLTProcessor.prototype.importStylesheet=function(xslDoc){if(!_SARISSA_THREADEDDOM_PROGID){_SARISSA_THREADEDDOM_PROGID=Sarissa.pickRecentProgID(["MSXML2.FreeThreadedDOMDocument.6.0","MSXML2.FreeThreadedDOMDocument.3.0"]);}
|
28
|
-
xslDoc.setProperty("SelectionLanguage","XPath");xslDoc.setProperty("SelectionNamespaces","xmlns:xsl='http://www.w3.org/1999/XSL/Transform'");var converted=new ActiveXObject(_SARISSA_THREADEDDOM_PROGID);try{converted.resolveExternals=true;converted.setProperty("AllowDocumentFunction",true);}
|
29
|
-
catch(e){}
|
30
|
-
if(xslDoc.url&&xslDoc.selectSingleNode("//xsl:*[local-name() = 'import' or local-name() = 'include']")!=null){converted.async=false;converted.load(xslDoc.url);}
|
31
|
-
else{converted.loadXML(xslDoc.xml);}
|
32
|
-
converted.setProperty("SelectionNamespaces","xmlns:xsl='http://www.w3.org/1999/XSL/Transform'");var output=converted.selectSingleNode("//xsl:output");if(output){this.outputMethod=output.getAttribute("method");}
|
33
|
-
else{delete this.outputMethod;}
|
34
|
-
this.template.stylesheet=converted;this.processor=this.template.createProcessor();this.paramsSet=[];};XSLTProcessor.prototype.transformToDocument=function(sourceDoc){var outDoc;if(_SARISSA_THREADEDDOM_PROGID){this.processor.input=sourceDoc;outDoc=new ActiveXObject(_SARISSA_DOM_PROGID);this.processor.output=outDoc;this.processor.transform();return outDoc;}
|
35
|
-
else{if(!_SARISSA_DOM_XMLWRITER){_SARISSA_DOM_XMLWRITER=Sarissa.pickRecentProgID(["Msxml2.MXXMLWriter.6.0","Msxml2.MXXMLWriter.3.0","MSXML2.MXXMLWriter","MSXML.MXXMLWriter","Microsoft.XMLDOM"]);}
|
36
|
-
this.processor.input=sourceDoc;outDoc=new ActiveXObject(_SARISSA_DOM_XMLWRITER);this.processor.output=outDoc;this.processor.transform();var oDoc=new ActiveXObject(_SARISSA_DOM_PROGID);oDoc.loadXML(outDoc.output+"");return oDoc;}};XSLTProcessor.prototype.transformToFragment=function(sourceDoc,ownerDoc){this.processor.input=sourceDoc;this.processor.transform();var s=this.processor.output;var f=ownerDoc.createDocumentFragment();var container;if(this.outputMethod=='text'){f.appendChild(ownerDoc.createTextNode(s));}else if(ownerDoc.body&&ownerDoc.body.innerHTML){container=ownerDoc.createElement('div');container.innerHTML=s;while(container.hasChildNodes()){f.appendChild(container.firstChild);}}
|
37
|
-
else{var oDoc=new ActiveXObject(_SARISSA_DOM_PROGID);if(s.substring(0,5)=='<?xml'){s=s.substring(s.indexOf('?>')+2);}
|
38
|
-
var xml=''.concat('<my>',s,'</my>');oDoc.loadXML(xml);container=oDoc.documentElement;while(container.hasChildNodes()){f.appendChild(container.firstChild);}}
|
39
|
-
return f;};XSLTProcessor.prototype.setParameter=function(nsURI,name,value){value=value?value:"";if(nsURI){this.processor.addParameter(name,value,nsURI);}else{this.processor.addParameter(name,value);}
|
40
|
-
nsURI=""+(nsURI||"");if(!this.paramsSet[nsURI]){this.paramsSet[nsURI]=[];}
|
41
|
-
this.paramsSet[nsURI][name]=value;};XSLTProcessor.prototype.getParameter=function(nsURI,name){nsURI=""+(nsURI||"");if(this.paramsSet[nsURI]&&this.paramsSet[nsURI][name]){return this.paramsSet[nsURI][name];}else{return null;}};XSLTProcessor.prototype.clearParameters=function(){for(var nsURI in this.paramsSet){for(var name in this.paramsSet[nsURI]){if(nsURI!=""){this.processor.addParameter(name,"",nsURI);}else{this.processor.addParameter(name,"");}}}
|
42
|
-
this.paramsSet=[];};}else{if(Sarissa._SARISSA_HAS_DOM_CREATE_DOCUMENT){Sarissa.__handleLoad__=function(oDoc){Sarissa.__setReadyState__(oDoc,4);};_sarissa_XMLDocument_onload=function(){Sarissa.__handleLoad__(this);};Sarissa.__setReadyState__=function(oDoc,iReadyState){oDoc.readyState=iReadyState;oDoc.readystate=iReadyState;if(oDoc.onreadystatechange!=null&&typeof oDoc.onreadystatechange=="function"){oDoc.onreadystatechange();}};Sarissa.getDomDocument=function(sUri,sName){var oDoc=document.implementation.createDocument(sUri?sUri:null,sName?sName:null,null);if(!oDoc.onreadystatechange){oDoc.onreadystatechange=null;}
|
43
|
-
if(!oDoc.readyState){oDoc.readyState=0;}
|
44
|
-
oDoc.addEventListener("load",_sarissa_XMLDocument_onload,false);return oDoc;};if(window.XMLDocument){}
|
45
|
-
else if(Sarissa._SARISSA_HAS_DOM_FEATURE&&window.Document&&!Document.prototype.load&&document.implementation.hasFeature('LS','3.0')){Sarissa.getDomDocument=function(sUri,sName){var oDoc=document.implementation.createDocument(sUri?sUri:null,sName?sName:null,null);return oDoc;};}
|
46
|
-
else{Sarissa.getDomDocument=function(sUri,sName){var oDoc=document.implementation.createDocument(sUri?sUri:null,sName?sName:null,null);if(oDoc&&(sUri||sName)&&!oDoc.documentElement){oDoc.appendChild(oDoc.createElementNS(sUri,sName));}
|
47
|
-
return oDoc;};}}}
|
48
|
-
if(!window.DOMParser){if(Sarissa._SARISSA_IS_SAFARI){DOMParser=function(){};DOMParser.prototype.parseFromString=function(sXml,contentType){var xmlhttp=new XMLHttpRequest();xmlhttp.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(sXml),false);xmlhttp.send(null);return xmlhttp.responseXML;};}else if(Sarissa.getDomDocument&&Sarissa.getDomDocument()&&Sarissa.getDomDocument(null,"bar").xml){DOMParser=function(){};DOMParser.prototype.parseFromString=function(sXml,contentType){var doc=Sarissa.getDomDocument();doc.loadXML(sXml);return doc;};}}
|
49
|
-
if((typeof(document.importNode)=="undefined")&&Sarissa._SARISSA_IS_IE){try{document.importNode=function(oNode,bChildren){var tmp;if(oNode.nodeName=='#text'){return document.createTextNode(oNode.data);}
|
50
|
-
else{if(oNode.nodeName=="tbody"||oNode.nodeName=="tr"){tmp=document.createElement("table");}
|
51
|
-
else if(oNode.nodeName=="td"){tmp=document.createElement("tr");}
|
52
|
-
else if(oNode.nodeName=="option"){tmp=document.createElement("select");}
|
53
|
-
else{tmp=document.createElement("div");}
|
54
|
-
if(bChildren){tmp.innerHTML=oNode.xml?oNode.xml:oNode.outerHTML;}else{tmp.innerHTML=oNode.xml?oNode.cloneNode(false).xml:oNode.cloneNode(false).outerHTML;}
|
55
|
-
return tmp.getElementsByTagName("*")[0];}};}catch(e){}}
|
56
|
-
if(!Sarissa.getParseErrorText){Sarissa.getParseErrorText=function(oDoc){var parseErrorText=Sarissa.PARSED_OK;if((!oDoc)||(!oDoc.documentElement)){parseErrorText=Sarissa.PARSED_EMPTY;}else if(oDoc.documentElement.tagName=="parsererror"){parseErrorText=oDoc.documentElement.firstChild.data;parseErrorText+="\n"+oDoc.documentElement.firstChild.nextSibling.firstChild.data;}else if(oDoc.getElementsByTagName("parsererror").length>0){var parsererror=oDoc.getElementsByTagName("parsererror")[0];parseErrorText=Sarissa.getText(parsererror,true)+"\n";}else if(oDoc.parseError&&oDoc.parseError.errorCode!=0){parseErrorText=Sarissa.PARSED_UNKNOWN_ERROR;}
|
57
|
-
return parseErrorText;};}
|
58
|
-
Sarissa.getText=function(oNode,deep){var s="";var nodes=oNode.childNodes;for(var i=0;i<nodes.length;i++){var node=nodes[i];var nodeType=node.nodeType;if(nodeType==Node.TEXT_NODE||nodeType==Node.CDATA_SECTION_NODE){s+=node.data;}else if(deep===true&&(nodeType==Node.ELEMENT_NODE||nodeType==Node.DOCUMENT_NODE||nodeType==Node.DOCUMENT_FRAGMENT_NODE)){s+=Sarissa.getText(node,true);}}
|
59
|
-
return s;};if(!window.XMLSerializer&&Sarissa.getDomDocument&&Sarissa.getDomDocument("","foo",null).xml){XMLSerializer=function(){};XMLSerializer.prototype.serializeToString=function(oNode){return oNode.xml;};}
|
60
|
-
Sarissa.stripTags=function(s){return s?s.replace(/<[^>]+>/g,""):s;};Sarissa.clearChildNodes=function(oNode){while(oNode.firstChild){oNode.removeChild(oNode.firstChild);}};Sarissa.copyChildNodes=function(nodeFrom,nodeTo,bPreserveExisting){if(Sarissa._SARISSA_IS_SAFARI&&nodeTo.nodeType==Node.DOCUMENT_NODE){nodeTo=nodeTo.documentElement;}
|
61
|
-
if((!nodeFrom)||(!nodeTo)){throw"Both source and destination nodes must be provided";}
|
62
|
-
if(!bPreserveExisting){Sarissa.clearChildNodes(nodeTo);}
|
63
|
-
var ownerDoc=nodeTo.nodeType==Node.DOCUMENT_NODE?nodeTo:nodeTo.ownerDocument;var nodes=nodeFrom.childNodes;var i;if(typeof(ownerDoc.importNode)!="undefined"){for(i=0;i<nodes.length;i++){nodeTo.appendChild(ownerDoc.importNode(nodes[i],true));}}else{for(i=0;i<nodes.length;i++){nodeTo.appendChild(nodes[i].cloneNode(true));}}};Sarissa.moveChildNodes=function(nodeFrom,nodeTo,bPreserveExisting){if((!nodeFrom)||(!nodeTo)){throw"Both source and destination nodes must be provided";}
|
64
|
-
if(!bPreserveExisting){Sarissa.clearChildNodes(nodeTo);}
|
65
|
-
var nodes=nodeFrom.childNodes;if(nodeFrom.ownerDocument==nodeTo.ownerDocument){while(nodeFrom.firstChild){nodeTo.appendChild(nodeFrom.firstChild);}}else{var ownerDoc=nodeTo.nodeType==Node.DOCUMENT_NODE?nodeTo:nodeTo.ownerDocument;var i;if(typeof(ownerDoc.importNode)!="undefined"){for(i=0;i<nodes.length;i++){nodeTo.appendChild(ownerDoc.importNode(nodes[i],true));}}else{for(i=0;i<nodes.length;i++){nodeTo.appendChild(nodes[i].cloneNode(true));}}
|
66
|
-
Sarissa.clearChildNodes(nodeFrom);}};Sarissa.xmlize=function(anyObject,objectName,indentSpace){indentSpace=indentSpace?indentSpace:'';var s=indentSpace+'<'+objectName+'>';var isLeaf=false;if(!(anyObject instanceof Object)||anyObject instanceof Number||anyObject instanceof String||anyObject instanceof Boolean||anyObject instanceof Date){s+=Sarissa.escape(""+anyObject);isLeaf=true;}else{s+="\n";var isArrayItem=anyObject instanceof Array;for(var name in anyObject){s+=Sarissa.xmlize(anyObject[name],(isArrayItem?"array-item key=\""+name+"\"":name),indentSpace+" ");}
|
67
|
-
s+=indentSpace;}
|
68
|
-
return(s+=(objectName.indexOf(' ')!=-1?"</array-item>\n":"</"+objectName+">\n"));};Sarissa.escape=function(sXml){return sXml.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");};Sarissa.unescape=function(sXml){return sXml.replace(/'/g,"'").replace(/"/g,"\"").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&");};Sarissa.updateCursor=function(oTargetElement,sValue){if(oTargetElement&&oTargetElement.style&&oTargetElement.style.cursor!=undefined){oTargetElement.style.cursor=sValue;}};Sarissa.updateContentFromURI=function(sFromUrl,oTargetElement,xsltproc,callback,skipCache){try{Sarissa.updateCursor(oTargetElement,"wait");var xmlhttp=new XMLHttpRequest();xmlhttp.open("GET",sFromUrl,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){try{var oDomDoc=xmlhttp.responseXML;if(oDomDoc&&Sarissa.getParseErrorText(oDomDoc)==Sarissa.PARSED_OK){Sarissa.updateContentFromNode(xmlhttp.responseXML,oTargetElement,xsltproc);if(callback){callback(sFromUrl,oTargetElement);}}
|
69
|
-
else{throw Sarissa.getParseErrorText(oDomDoc);}}
|
70
|
-
catch(e){if(callback){callback(sFromUrl,oTargetElement,e);}
|
71
|
-
else{throw e;}}}};if(skipCache){var oldage="Sat, 1 Jan 2000 00:00:00 GMT";xmlhttp.setRequestHeader("If-Modified-Since",oldage);}
|
72
|
-
xmlhttp.send("");}
|
73
|
-
catch(e){Sarissa.updateCursor(oTargetElement,"auto");if(callback){callback(sFromUrl,oTargetElement,e);}
|
74
|
-
else{throw e;}}};Sarissa.updateContentFromNode=function(oNode,oTargetElement,xsltproc){try{Sarissa.updateCursor(oTargetElement,"wait");Sarissa.clearChildNodes(oTargetElement);var ownerDoc=oNode.nodeType==Node.DOCUMENT_NODE?oNode:oNode.ownerDocument;if(ownerDoc.parseError&&ownerDoc.parseError.errorCode!=0){var pre=document.createElement("pre");pre.appendChild(document.createTextNode(Sarissa.getParseErrorText(ownerDoc)));oTargetElement.appendChild(pre);}
|
75
|
-
else{if(xsltproc){oNode=xsltproc.transformToDocument(oNode);}
|
76
|
-
if(oTargetElement.tagName.toLowerCase()=="textarea"||oTargetElement.tagName.toLowerCase()=="input"){oTargetElement.value=new XMLSerializer().serializeToString(oNode);}
|
77
|
-
else{try{oTargetElement.appendChild(oTargetElement.ownerDocument.importNode(oNode,true));}
|
78
|
-
catch(e){oTargetElement.innerHTML=new XMLSerializer().serializeToString(oNode);}}}}
|
79
|
-
catch(e){throw e;}
|
80
|
-
finally{Sarissa.updateCursor(oTargetElement,"auto");}};Sarissa.formToQueryString=function(oForm){var qs="";for(var i=0;i<oForm.elements.length;i++){var oField=oForm.elements[i];var sFieldName=oField.getAttribute("name")?oField.getAttribute("name"):oField.getAttribute("id");if(sFieldName&&((!oField.disabled)||oField.type=="hidden")){switch(oField.type){case"hidden":case"text":case"textarea":case"password":qs+=sFieldName+"="+encodeURIComponent(oField.value)+"&";break;case"select-one":qs+=sFieldName+"="+encodeURIComponent(oField.options[oField.selectedIndex].value)+"&";break;case"select-multiple":for(var j=0;j<oField.length;j++){var optElem=oField.options[j];if(optElem.selected===true){qs+=sFieldName+"[]"+"="+encodeURIComponent(optElem.value)+"&";}}
|
81
|
-
break;case"checkbox":case"radio":if(oField.checked){qs+=sFieldName+"="+encodeURIComponent(oField.value)+"&";}
|
82
|
-
break;}}}
|
83
|
-
return qs.substr(0,qs.length-1);};Sarissa.updateContentFromForm=function(oForm,oTargetElement,xsltproc,callback){try{Sarissa.updateCursor(oTargetElement,"wait");var params=Sarissa.formToQueryString(oForm)+"&"+Sarissa.REMOTE_CALL_FLAG+"=true";var xmlhttp=new XMLHttpRequest();var bUseGet=oForm.getAttribute("method")&&oForm.getAttribute("method").toLowerCase()=="get";if(bUseGet){xmlhttp.open("GET",oForm.getAttribute("action")+"?"+params,true);}
|
84
|
-
else{xmlhttp.open('POST',oForm.getAttribute("action"),true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlhttp.setRequestHeader("Content-length",params.length);xmlhttp.setRequestHeader("Connection","close");}
|
85
|
-
xmlhttp.onreadystatechange=function(){try{if(xmlhttp.readyState==4){var oDomDoc=xmlhttp.responseXML;if(oDomDoc&&Sarissa.getParseErrorText(oDomDoc)==Sarissa.PARSED_OK){Sarissa.updateContentFromNode(xmlhttp.responseXML,oTargetElement,xsltproc);if(callback){callback(oForm,oTargetElement);}}
|
86
|
-
else{throw Sarissa.getParseErrorText(oDomDoc);}}}
|
87
|
-
catch(e){if(callback){callback(oForm,oTargetElement,e);}
|
88
|
-
else{throw e;}}};xmlhttp.send(bUseGet?"":params);}
|
89
|
-
catch(e){Sarissa.updateCursor(oTargetElement,"auto");if(callback){callback(oForm,oTargetElement,e);}
|
90
|
-
else{throw e;}}
|
91
|
-
return false;};Sarissa.FUNCTION_NAME_REGEXP=new RegExp("");Sarissa.getFunctionName=function(oFunc,bForce){var name;if(!name){if(bForce){name="SarissaAnonymous"+Sarissa._getUniqueSuffix();window[name]=oFunc;}
|
92
|
-
else{name=null;}}
|
93
|
-
if(name){window[name]=oFunc;}
|
94
|
-
return name;};Sarissa.setRemoteJsonCallback=function(url,callback,callbackParam){if(!callbackParam){callbackParam="callback";}
|
95
|
-
var callbackFunctionName=Sarissa.getFunctionName(callback,true);var id="sarissa_json_script_id_"+Sarissa._getUniqueSuffix();var oHead=document.getElementsByTagName("head")[0];var scriptTag=document.createElement('script');scriptTag.type='text/javascript';scriptTag.id=id;scriptTag.onload=function(){};if(url.indexOf("?")!=-1){url+=("&"+callbackParam+"="+callbackFunctionName);}
|
96
|
-
else{url+=("?"+callbackParam+"="+callbackFunctionName);}
|
97
|
-
scriptTag.src=url;oHead.appendChild(scriptTag);return id;};
|
98
|
-
|
99
|
-
// sarissa_ieemu_xpath.js
|
100
|
-
|
101
|
-
if(Sarissa._SARISSA_HAS_DOM_FEATURE&&document.implementation.hasFeature("XPath","3.0")){SarissaNodeList=function(i){this.length=i;};SarissaNodeList.prototype=[];SarissaNodeList.prototype.constructor=Array;SarissaNodeList.prototype.item=function(i){return(i<0||i>=this.length)?null:this[i];};SarissaNodeList.prototype.expr="";if(window.XMLDocument&&(!XMLDocument.prototype.setProperty)){XMLDocument.prototype.setProperty=function(x,y){};}
|
102
|
-
Sarissa.setXpathNamespaces=function(oDoc,sNsSet){oDoc._sarissa_useCustomResolver=true;var namespaces=sNsSet.indexOf(" ")>-1?sNsSet.split(" "):[sNsSet];oDoc._sarissa_xpathNamespaces=[];for(var i=0;i<namespaces.length;i++){var ns=namespaces[i];var colonPos=ns.indexOf(":");var assignPos=ns.indexOf("=");if(colonPos>0&&assignPos>colonPos+1){var prefix=ns.substring(colonPos+1,assignPos);var uri=ns.substring(assignPos+2,ns.length-1);oDoc._sarissa_xpathNamespaces[prefix]=uri;}else{throw"Bad format on namespace declaration(s) given";}}};XMLDocument.prototype._sarissa_useCustomResolver=false;XMLDocument.prototype._sarissa_xpathNamespaces=[];XMLDocument.prototype.selectNodes=function(sExpr,contextNode,returnSingle){var nsDoc=this;var nsresolver;if(this._sarissa_useCustomResolver){nsresolver=function(prefix){var s=nsDoc._sarissa_xpathNamespaces[prefix];if(s){return s;}
|
103
|
-
else{throw"No namespace URI found for prefix: '"+prefix+"'";}};}
|
104
|
-
else{nsresolver=this.createNSResolver(this.documentElement);}
|
105
|
-
var result=null;if(!returnSingle){var oResult=this.evaluate(sExpr,(contextNode?contextNode:this),nsresolver,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var nodeList=new SarissaNodeList(oResult.snapshotLength);nodeList.expr=sExpr;for(var i=0;i<nodeList.length;i++){nodeList[i]=oResult.snapshotItem(i);}
|
106
|
-
result=nodeList;}
|
107
|
-
else{result=this.evaluate(sExpr,(contextNode?contextNode:this),nsresolver,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;}
|
108
|
-
return result;};Element.prototype.selectNodes=function(sExpr){var doc=this.ownerDocument;if(doc.selectNodes){return doc.selectNodes(sExpr,this);}
|
109
|
-
else{throw"Method selectNodes is only supported by XML Elements";}};XMLDocument.prototype.selectSingleNode=function(sExpr,contextNode){var ctx=contextNode?contextNode:null;return this.selectNodes(sExpr,ctx,true);};Element.prototype.selectSingleNode=function(sExpr){var doc=this.ownerDocument;if(doc.selectSingleNode){return doc.selectSingleNode(sExpr,this);}
|
110
|
-
else{throw"Method selectNodes is only supported by XML Elements";}};Sarissa.IS_ENABLED_SELECT_NODES=true;}
|
111
|
-
|
112
|
-
// jquery.xslt.js
|
113
|
-
|
114
|
-
var xslTransform={init:function(){},XMLSerializer:new XMLSerializer(),serialize:function(data){if(typeof(data)=='string')return data;return this.XMLSerializer.serializeToString(data)},load:function(xml,meth,dat){var r;if(typeof(xml)=='object'){return xml}if(xml.substring(0,1)=='<'){r=this.loadString(xml)}else{r=this.loadFile(xml,meth,dat)}if(r){r.setProperty('SelectionNamespaces','xmlns:xsl="http://www.w3.org/1999/XSL/Transform"');r.setProperty('SelectionLanguage','XPath');return r}else return false},loadString:function(str){var p=new DOMParser();var xml=p.parseFromString(str,'text/xml');if(!xml)return false;return xml},loadFile:function(url,meth,dat){if(!url)return false;var doc;this.xhrsuccess=function(data,str){doc=data;return true};this.xhrerror=function(xhr,err){doc=null;return false};if(!meth)meth="GET";if(!dat)dat={};jQuery.ajax({type:meth,url:url,data:dat,async:false,success:this.xhrsuccess,error:this.xhrerror});if(!doc)return false;if(doc.length==0)return false;return doc},transform:function(xsl,xml,options){var log={'xsl':xsl,'xml':xml,'options':options};options=options||{};var xml={'request':xml,'doc':this.load(xml,options.meth,options.dat)};if(xml.doc==false)return false;var result={'xsl':this.load(xsl,options.meth,options.dat)};if(result.xsl==false)return false;result.json=false;if(options.json&&xml.doc){result.json=xml.doc.selectSingleNode(options.json.toString())}var processor=new XSLTProcessor();processor.importStylesheet(result.xsl);if(options.params&&processor){for(key in options.params){processor.setParameter(null,key.toString(),options.params[key].toString())}}result.doc=processor.transformToDocument(xml.doc);var errorTxt=Sarissa.getParseErrorText(result.doc);if(errorTxt!=Sarissa.PARSED_OK)return false;result.string=this.serialize(result.doc);result.scripts=jQuery('script',result.doc).text();return result}};xslTransform.init();jQuery.fn.getTransform=function(xsl,xml,options){var settings={append:false,params:{},xpath:'',eval:true,callback:'',error:'',json:false,meth:"GET",dat:{}};jQuery.extend(settings,options);if(!xsl||!xml){return}var trans=xslTransform.transform(xsl,xml,settings);if(trans==false){if(settings.error&&jQuery.isFunction(settings.error)){settings.error.apply(window,[])}return}return this.each(function(){var re=trans.string.match(/<\?xml.*?\?>/);if(re){trans.string=trans.string.replace(re,'')}try{if(settings.append)jQuery(this).append(trans.string);else if(settings.repl)jQuery(this).replaceWith(trans.string);else jQuery(this).html(trans.string)}catch(e){jQuery(this)[0].innerHTML=trans.string}if(settings.eval&&trans.scripts){if(trans.scripts.length>0){eval.call(window,trans.scripts)}}if(settings.callback&&jQuery.isFunction(settings.callback)){var json=false;if(settings.json&&trans.json)eval("json = "+trans.json.firstChild.data);settings.callback.apply(window,[trans.string,json])}})};
|
115
|
-
|
116
|
-
// jquery.metadata.js
|
117
|
-
|
118
|
-
(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)data=m[1]}else if(settings.type=="elem"){if(!elem.getElementsByTagName)return undefined;var e=elem.getElementsByTagName(settings.name);if(e.length)data=$.trim(e[0].innerHTML)}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)data=attr}if(data.indexOf('{')<0)data="{"+data+"}";data=eval("("+data+")");$.data(elem,settings.single,data);return data}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts)}})(jQuery);
|
119
|
-
|
120
|
-
// jquery.cookie.js
|
121
|
-
|
122
|
-
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
|
123
|
-
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
|
124
|
-
expires='; expires='+date.toUTCString();}
|
125
|
-
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
|
126
|
-
return cookieValue;}};
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,44 +0,0 @@
|
|
1
|
-
/* LOCKED */
|
2
|
-
.tree-default .locked li a { color:gray; }
|
3
|
-
/* DOTS */
|
4
|
-
.tree-default ul { background-position:6px 1px; background-repeat:repeat-y; background-image:url("dot.gif"); }
|
5
|
-
.tree-default li { background-position:7px 8px; background-repeat:no-repeat; background-image:url("li.gif"); }
|
6
|
-
.tree-default li.last { background-position:5px top; background-repeat:no-repeat; background-image:url("lastli.gif"); }
|
7
|
-
|
8
|
-
/* DOTS - RIGHT TO LEFT */
|
9
|
-
.tree-default .rtl, .tree-default .rtl ul { background-position:right 1px; }
|
10
|
-
.tree-default .rtl li { background-position:right 8px; }
|
11
|
-
.tree-default .rtl li.last { background-image:url("lastli_rtl.gif"); background-position:right top; }
|
12
|
-
|
13
|
-
/* NO DOTS */
|
14
|
-
.tree-default .no_dots, .tree-default .no_dots ul { background:transparent; }
|
15
|
-
.tree-default .no_dots li.leaf { background-image:none; background-color:transparent; }
|
16
|
-
/* OPEN or CLOSED */
|
17
|
-
.tree-default li.open { background:url("fminus.gif") 4px 6px no-repeat; }
|
18
|
-
.tree-default li.closed, #jstree-dragged.tree-default li li.open { background:url("fplus.gif") 5px 5px no-repeat; }
|
19
|
-
|
20
|
-
/* RIGHT TO LEFT */
|
21
|
-
.tree-default .rtl li { margin-right:1px; }
|
22
|
-
.tree-default .rtl li.last { margin-right:0; padding-right:16px; }
|
23
|
-
.tree-default .rtl li.open { background:url("fminus_rtl.gif") right 6px no-repeat; margin-right:0; padding-right:16px; }
|
24
|
-
.tree-default .rtl li.closed, #jstree-dragged.tree-default .rtl li li.open { background:url("fplus_rtl.gif") right 4px no-repeat; margin-right:0; padding-right:16px; }
|
25
|
-
|
26
|
-
/* DEFAULT, HOVER, CLICKED, LOADING STATES */
|
27
|
-
.tree-default li a, .tree-default li span { background-color:transparent; background-repeat:no-repeat; background-position:4px 1px; padding:1px 4px 1px 23px; background-image:url("f.png"); border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; }
|
28
|
-
.tree-default li a:hover, .tree-default li a.hover { background-color: #e7f4f9; border:1px solid #d8f0fa; padding:0px 3px 0px 22px; background-position:3px 0px; }
|
29
|
-
.tree-default li a.clicked, .tree-default li a.clicked:hover, .tree-default li span.clicked { background-color: #beebff; border:1px solid #99defd; padding:0px 3px 0px 22px; background-position:3px 0px; }
|
30
|
-
.tree-default li span.clicked { padding:0px 3px 0px 20px; }
|
31
|
-
.tree-default li a.loading { background-image:url("throbber.gif"); }
|
32
|
-
|
33
|
-
/* DEFAULT, HOVER, CLICKED, LOADING STATES - RIGHT TO LEFT */
|
34
|
-
.tree-default .rtl li a, .tree-default .rtl li span { padding:1px 23px 1px 4px; background-position:right 1px; margin-right:1px; }
|
35
|
-
.tree-default .rtl li a:hover, .tree-default .rtl li a.hover { padding:0px 23px 0px 3px; background-position:right 0px; margin-right:0px; }
|
36
|
-
.tree-default .rtl li a.clicked, .tree-default .rtl li a.clicked:hover, .tree-default .rtl li span.clicked { padding:0px 23px 0px 3px; background-position:right 0px; margin-right:0px; }
|
37
|
-
.tree-default .rtl li span.clicked { padding:0px 21px 0px 3px; }
|
38
|
-
|
39
|
-
/* CONTEXT MENU */
|
40
|
-
.tree-default-context { width:160px; background:#F0F0F0 url("context.gif") 22px 0 repeat-y; border:1px solid silver; position:absolute; }
|
41
|
-
.tree-default-context a, .tree-default-context a.disabled:hover { display:block; text-decoration:none; color:black; line-height:20px; background-repeat: no-repeat; background-position:2px center; padding:1px 0 1px 25px; background-color:transparent; border:1px solid #f0f0f0; border-width:0 1px; margin:0; }
|
42
|
-
.tree-default-context a:hover { background-color:#e7f4f9; border:1px solid #d8f0fa; padding:0 0 0 25px; margin:0; }
|
43
|
-
.tree-default-context a.disabled, .tree-default-context a.disabled:hover { color:silver; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); zoom:1; }
|
44
|
-
.tree-default-context .separator { background:#FFFFFF;border-top:1px solid #E0E0E0;font-size:1px;height:1px;line-height:1px;margin:0 2px 0 24px;min-height:1px;display:block; }
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,39 +0,0 @@
|
|
1
|
-
/* LOCKED */
|
2
|
-
.tree-spree .locked li a { color:gray; }
|
3
|
-
/* DOTS */
|
4
|
-
.tree-spree ul { background-position:6px 1px; background-repeat:repeat-y; background-image:url("dot.gif"); }
|
5
|
-
.tree-spree li { background-position:7px 16px; background-repeat:no-repeat; background-image:url("li.gif"); }
|
6
|
-
.tree-spree li.last { background-position:5px top; background-repeat:no-repeat; background-image:url("lastli.gif"); }
|
7
|
-
|
8
|
-
/* DOTS - RIGHT TO LEFT */
|
9
|
-
.tree-spree .rtl, .tree-spree .rtl ul { background-position:right 1px; }
|
10
|
-
.tree-spree .rtl li { background-position:right 8px; }
|
11
|
-
.tree-spree .rtl li.last { background-image:url("lastli_rtl.gif"); background-position:right top; }
|
12
|
-
|
13
|
-
/* NO DOTS */
|
14
|
-
.tree-spree .no_dots, .tree-spree .no_dots ul { background:transparent; }
|
15
|
-
.tree-spree .no_dots li.leaf { background-image:none; background-color:transparent; }
|
16
|
-
/* OPEN or CLOSED */
|
17
|
-
.tree-spree li.open { background:url("fminus.gif") 4px 12px no-repeat; }
|
18
|
-
.tree-spree li.closed, #jstree-dragged.tree-spree li li.open { background:url("fplus.gif") 5px 10px no-repeat; }
|
19
|
-
|
20
|
-
/* RIGHT TO LEFT */
|
21
|
-
.tree-spree .rtl li { margin-right:1px; }
|
22
|
-
.tree-spree .rtl li.last { margin-right:0; padding-right:16px; }
|
23
|
-
.tree-spree .rtl li.open { background:url("fminus_rtl.gif") right 6px no-repeat; margin-right:0; padding-right:16px; }
|
24
|
-
.tree-spree .rtl li.closed, #jstree-dragged.tree-spree .rtl li li.open { background:url("fplus_rtl.gif") right 4px no-repeat; margin-right:0; padding-right:16px; }
|
25
|
-
|
26
|
-
/* DEFAULT, HOVER, CLICKED, LOADING STATES */
|
27
|
-
.tree-spree li a, .tree-spree li span { background-color:transparent; height:30px; line-height:32px; background-repeat:no-repeat; font-size: 120%; background-position:4px 1px; padding:1px 4px 1px 41px; background-image:url("f.png"); border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; }
|
28
|
-
.tree-spree li a:hover, .tree-spree li a.hover { background-color: #e7f4f9; border:1px solid #d8f0fa; padding:0px 3px 0px 40px; background-position:3px 0px; }
|
29
|
-
.tree-spree li a.clicked, .tree-spree li a.clicked:hover, .tree-spree li span.clicked { background-color: #beebff; border:1px solid #99defd; padding:0px 3px 0px 41px; background-position:3px 0px; }
|
30
|
-
.tree-spree li a input, .tree li span input { margin:0;padding:4px 0;height:20px !important;border:1px solid white;background:white;font-size: 100%;font-family:Verdana; }
|
31
|
-
.tree-spree li span.clicked { padding:0px 3px 0px 40px; }
|
32
|
-
.tree-spree li a.loading { background-image:url("throbber.gif"); }
|
33
|
-
|
34
|
-
/* CONTEXT MENU */
|
35
|
-
.tree-spree-context { width:160px; background:#F0F0F0 url("context.gif") 22px 0 repeat-y; border:1px solid silver; position:absolute; }
|
36
|
-
.tree-spree-context a, .tree-spree-context a.disabled:hover { display:block; text-decoration:none; color:black; line-height:20px; background-repeat: no-repeat; background-position:2px center; padding:1px 0 1px 25px; background-color:transparent; border:1px solid #f0f0f0; border-width:0 1px; margin:0; }
|
37
|
-
.tree-spree-context a:hover { background-color:#e7f4f9; border:1px solid #d8f0fa; padding:0 0 0 25px; margin:0; }
|
38
|
-
.tree-spree-context a.disabled, .tree-spree-context a.disabled:hover { color:silver; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); zoom:1; }
|
39
|
-
.tree-spree-context .separator { background:#FFFFFF;border-top:1px solid #E0E0E0;font-size:1px;height:1px;line-height:1px;margin:0 2px 0 24px;min-height:1px;display:block; }
|
@@ -1,62 +0,0 @@
|
|
1
|
-
/* TREE LAYOUT */
|
2
|
-
.tree ul { margin:0 0 0 5px; padding:0 0 0 0; list-style-type:none; }
|
3
|
-
.tree li { display:block; min-height:18px; line-height:18px; padding:0 0 0 15px; margin:0 0 0 0; /* Background fix */ clear:both; _height:18px; #height:auto; }
|
4
|
-
.tree li ul { display:none; }
|
5
|
-
.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 1px;margin:0; }
|
6
|
-
.tree li a:focus { outline: none; }
|
7
|
-
.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; }
|
8
|
-
/*.tree li a input:not([class="xxx"]), .tree li span input:not([class="xxx"]) { padding:1px 0; } */
|
9
|
-
/* FOR DOTS */
|
10
|
-
.tree .ltr li.last { float:left; }
|
11
|
-
.tree .rtl li.last { float:right; #float:none; _float:right; }
|
12
|
-
.tree > ul li.last { overflow:visible; }
|
13
|
-
/* OPEN OR CLOSE */
|
14
|
-
.tree li.open ul { display:block; }
|
15
|
-
.tree li.closed ul { display:none !important; }
|
16
|
-
/* FOR DRAGGING */
|
17
|
-
#jstree-dragged { position:absolute; top:-10px; left:-10px; margin:0; padding:0; }
|
18
|
-
#jstree-dragged .rtl { _width:20px; #width:200px; margin:0; padding:0;}
|
19
|
-
#jstree-dragged ul ul ul { display:none; }
|
20
|
-
|
21
|
-
/* RTL modification */
|
22
|
-
.tree .rtl, .tree .rtl ul { margin:0 5px 0 0; }
|
23
|
-
.tree .rtl li { padding:0 15px 0 0; }
|
24
|
-
.tree .rtl li a, .tree .rtl li span { padding:1px 1px 1px 4px; }
|
25
|
-
|
26
|
-
/* CONTEXT MENU */
|
27
|
-
.tree-context { display:none; position:absolute; list-style-type:none; margin:0; padding:0; left:-2000px; top:-2000px; }
|
28
|
-
.tree-context .separator { display:none; }
|
29
|
-
.tree-context a { display:block; margin:0; padding:0; }
|
30
|
-
|
31
|
-
/** FIREFOX2 fix **/
|
32
|
-
.tree .ltr li a, x:-moz-any-link { display:inline; float:left; }
|
33
|
-
.tree .rtl li a, x:-moz-any-link { display:inline; float:right; }
|
34
|
-
.tree li ul, x:-moz-any-link { clear:both; }
|
35
|
-
/** FIREFOX3 restore **/
|
36
|
-
.tree .ltr li a, .tree .rtl li a, x:-moz-any-link, x:default { display:inline-block; float:none; }
|
37
|
-
.tree li ul, x:-moz-any-link, x:default { clear:none; }
|
38
|
-
/** IE7 Restore **/
|
39
|
-
.tree .ltr li a, .tree .rtl li a { #display:inline-block; #float:none; }
|
40
|
-
.tree li ul { #clear:none; }
|
41
|
-
|
42
|
-
.tree li { _width:1px; }
|
43
|
-
.tree li li { overflow:hidden; #overflow:visible; _overflow:visible; }
|
44
|
-
|
45
|
-
.tree > .ltr > li { display:table; }
|
46
|
-
.tree > .rtl > li { display:table; }
|
47
|
-
|
48
|
-
|
49
|
-
/* EXPLORER 6 and 7 fix for 2px whitespace */
|
50
|
-
.tree .ltr li.last { #margin-top: expression( (this.previousSibling && /open/.test(this.previousSibling.className) ) ? "-2px" : "0"); _margin-top: expression( (this.previousSibling && /open/.test(this.previousSibling.className) ) ? "-2px" : "0"); }
|
51
|
-
.tree .rtl li.last { _margin-top: expression( (this.previousSibling && /open/.test(this.previousSibling.className) ) ? "-2px" : "0"); }
|
52
|
-
|
53
|
-
/* OPERA SCROLLBAR ISSUE */
|
54
|
-
@media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) {
|
55
|
-
head~body .tree > ul > li.last > ul { margin-bottom:36px; }
|
56
|
-
.tree li li { overflow:visible; }
|
57
|
-
}
|
58
|
-
|
59
|
-
/*
|
60
|
-
FIREFOX FIX
|
61
|
-
@-moz-document url-prefix() {}
|
62
|
-
*/
|
@@ -1,2315 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jsTree 0.9.8
|
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-05-15
|
12
|
-
*
|
13
|
-
*/
|
14
|
-
|
15
|
-
(function($) {
|
16
|
-
// jQuery plugin
|
17
|
-
$.fn.tree = function (opts) {
|
18
|
-
return this.each(function() {
|
19
|
-
var conf = $.extend({},opts);
|
20
|
-
if(tree_component.inst && tree_component.inst[$(this).attr('id')]) tree_component.inst[$(this).attr('id')].destroy();
|
21
|
-
if(conf !== false) new tree_component().init(this, conf);
|
22
|
-
});
|
23
|
-
};
|
24
|
-
$.tree_create = function() {
|
25
|
-
return new tree_component();
|
26
|
-
};
|
27
|
-
$.tree_focused = function() {
|
28
|
-
return tree_component.inst[tree_component.focused];
|
29
|
-
};
|
30
|
-
$.tree_reference = function(id) {
|
31
|
-
return tree_component.inst[id] || null;
|
32
|
-
};
|
33
|
-
|
34
|
-
// rollback
|
35
|
-
$.tree_rollback = function(data) {
|
36
|
-
for(var i in data) {
|
37
|
-
if(typeof data[i] == "function") continue;
|
38
|
-
var tmp = tree_component.inst[i];
|
39
|
-
var lock = !tmp.locked;
|
40
|
-
|
41
|
-
// if not locked - lock the tree
|
42
|
-
if(lock) tmp.lock(true);
|
43
|
-
// Cancel ongoing rename
|
44
|
-
if(tmp.inp) tmp.inp.val("").blur();
|
45
|
-
tmp.context.append = false;
|
46
|
-
tmp.container.html(data[i].html).find(".dragged").removeClass("dragged").end().find("div.context").remove();
|
47
|
-
|
48
|
-
if(data[i].selected) {
|
49
|
-
tmp.selected = $("#" + data[i].selected);
|
50
|
-
tmp.selected_arr = [];
|
51
|
-
tmp.container
|
52
|
-
.find("a.clicked").each( function () {
|
53
|
-
tmp.selected_arr.push(tmp.get_node(this));
|
54
|
-
});
|
55
|
-
}
|
56
|
-
// if this function set the lock - unlock
|
57
|
-
if(lock) tmp.lock(false);
|
58
|
-
|
59
|
-
delete lock;
|
60
|
-
delete tmp;
|
61
|
-
}
|
62
|
-
};
|
63
|
-
|
64
|
-
// core
|
65
|
-
function tree_component () {
|
66
|
-
// instance manager
|
67
|
-
if(typeof tree_component.inst == "undefined") {
|
68
|
-
tree_component.cntr = 0;
|
69
|
-
tree_component.inst = {};
|
70
|
-
|
71
|
-
// DRAG'N'DROP STUFF
|
72
|
-
tree_component.drag_drop = {
|
73
|
-
isdown : false, // Is there a drag
|
74
|
-
drag_node : false, // The actual node
|
75
|
-
drag_help : false, // The helper
|
76
|
-
|
77
|
-
init_x : false,
|
78
|
-
init_y : false,
|
79
|
-
moving : false,
|
80
|
-
|
81
|
-
origin_tree : false,
|
82
|
-
marker : false,
|
83
|
-
|
84
|
-
move_type : false, // before, after or inside
|
85
|
-
ref_node : false, // reference node
|
86
|
-
appended : false, // is helper appended
|
87
|
-
|
88
|
-
foreign : false, // Is the dragged node a foreign one
|
89
|
-
droppable : [], // Array of classes that can be dropped onto the tree
|
90
|
-
|
91
|
-
open_time : false, // Timeout for opening nodes
|
92
|
-
scroll_time : false // Timeout for scrolling
|
93
|
-
};
|
94
|
-
// listening for clicks on foreign nodes
|
95
|
-
tree_component.mousedown = function(event) {
|
96
|
-
var tmp = $(event.target);
|
97
|
-
if(tree_component.drag_drop.droppable.length && tmp.is("." + tree_component.drag_drop.droppable.join(", .")) ) {
|
98
|
-
tree_component.drag_drop.drag_help = $("<div id='jstree-dragged' class='tree tree-default'><ul><li class='last dragged foreign " + event.target.className + "'><a href='#'>" + tmp.text() + "</a></li></ul></div>");
|
99
|
-
tree_component.drag_drop.drag_node = tree_component.drag_drop.drag_help.find("li:eq(0)");
|
100
|
-
tree_component.drag_drop.isdown = true;
|
101
|
-
tree_component.drag_drop.foreign = tmp;
|
102
|
-
tmp.blur();
|
103
|
-
event.preventDefault();
|
104
|
-
event.stopPropagation();
|
105
|
-
return false;
|
106
|
-
}
|
107
|
-
event.stopPropagation();
|
108
|
-
return true;
|
109
|
-
};
|
110
|
-
tree_component.mouseup = function(event) {
|
111
|
-
var tmp = tree_component.drag_drop;
|
112
|
-
if(tmp.open_time) clearTimeout(tmp.open_time);
|
113
|
-
if(tmp.scroll_time) clearTimeout(tmp.scroll_time);
|
114
|
-
if(tmp.foreign === false && tmp.drag_node && tmp.drag_node.size()) {
|
115
|
-
tmp.drag_help.remove();
|
116
|
-
if(tmp.move_type) {
|
117
|
-
var tree1 = tree_component.inst[tmp.ref_node.parents(".tree:eq(0)").attr("id")];
|
118
|
-
if(tree1) tree1.moved(tmp.origin_tree.container.find("li.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) ) );
|
119
|
-
}
|
120
|
-
tmp.move_type = false;
|
121
|
-
tmp.ref_node = false;
|
122
|
-
}
|
123
|
-
if(tmp.drag_node && tmp.foreign !== false) {
|
124
|
-
tmp.drag_help.remove();
|
125
|
-
if(tmp.move_type) {
|
126
|
-
var tree1 = tree_component.inst[tmp.ref_node.parents(".tree:eq(0)").attr("id")];
|
127
|
-
if(tree1) tree1.settings.callback.ondrop.call(null, tmp.foreign.get(0), tree1.get_node(tmp.ref_node).get(0), tmp.move_type, tree1);
|
128
|
-
}
|
129
|
-
tmp.foreign = false;
|
130
|
-
tmp.move_type = false;
|
131
|
-
tmp.ref_node = false;
|
132
|
-
}
|
133
|
-
// RESET EVERYTHING
|
134
|
-
tree_component.drag_drop.marker.hide();
|
135
|
-
tmp.drag_help = false;
|
136
|
-
tmp.drag_node = false;
|
137
|
-
tmp.isdown = false;
|
138
|
-
tmp.init_x = false;
|
139
|
-
tmp.init_y = false;
|
140
|
-
tmp.moving = false;
|
141
|
-
tmp.appended = false;
|
142
|
-
$("li.dragged").removeClass("dragged");
|
143
|
-
tmp.origin_tree = false;
|
144
|
-
event.preventDefault();
|
145
|
-
event.stopPropagation();
|
146
|
-
return false;
|
147
|
-
};
|
148
|
-
tree_component.mousemove = function(event) {
|
149
|
-
var tmp = tree_component.drag_drop;
|
150
|
-
|
151
|
-
if(tmp.isdown) {
|
152
|
-
if(!tmp.moving && Math.abs(tmp.init_x - event.pageX) < 5 && Math.abs(tmp.init_y - event.pageY) < 5) {
|
153
|
-
event.preventDefault();
|
154
|
-
event.stopPropagation();
|
155
|
-
return false;
|
156
|
-
}
|
157
|
-
else tree_component.drag_drop.moving = true;
|
158
|
-
|
159
|
-
if(tmp.open_time) clearTimeout(tmp.open_time);
|
160
|
-
if(!tmp.appended) {
|
161
|
-
if(tmp.foreign !== false) tmp.origin_tree = $.tree_focused();
|
162
|
-
$("body").append(tmp.drag_help);
|
163
|
-
tmp.w = tmp.drag_help.width();
|
164
|
-
tmp.appended = true;
|
165
|
-
}
|
166
|
-
tmp.drag_help.css({ "left" : (event.pageX - (tmp.origin_tree.settings.ui.rtl ? tmp.w : -5 ) ), "top" : (event.pageY + 15) });
|
167
|
-
|
168
|
-
if(event.target.tagName == "IMG" && event.target.id == "marker") return false;
|
169
|
-
|
170
|
-
var et = $(event.target);
|
171
|
-
var cnt = et.is(".tree") ? et : et.parents(".tree:eq(0)");
|
172
|
-
|
173
|
-
// if not moving over a tree
|
174
|
-
if(cnt.size() == 0 || !tree_component.inst[cnt.attr("id")]) {
|
175
|
-
if(tmp.scroll_time) clearTimeout(tmp.scroll_time);
|
176
|
-
if(tmp.drag_help.find("IMG").size() == 0) {
|
177
|
-
tmp.drag_help.find("li:eq(0)").append("<img style='position:absolute; " + (tmp.origin_tree.settings.ui.rtl ? "right" : "left" ) + ":4px; top:0px; background:white; padding:2px;' src='" + tmp.origin_tree.settings.ui.theme_path + "remove.png' />");
|
178
|
-
}
|
179
|
-
tmp.move_type = false;
|
180
|
-
tmp.ref_node = false;
|
181
|
-
tree_component.drag_drop.marker.hide();
|
182
|
-
return false;
|
183
|
-
}
|
184
|
-
|
185
|
-
var tree2 = tree_component.inst[cnt.attr("id")];
|
186
|
-
tree2.off_height();
|
187
|
-
|
188
|
-
// if moving over another tree and multitree is false
|
189
|
-
if( tmp.foreign === false && tmp.origin_tree.container.get(0) != tree2.container.get(0) && (!tmp.origin_tree.settings.rules.multitree || !tree2.settings.rules.multitree) ) {
|
190
|
-
if(tmp.drag_help.find("IMG").size() == 0) {
|
191
|
-
tmp.drag_help.find("li:eq(0)").append("<img style='position:absolute; " + (tmp.origin_tree.settings.ui.rtl ? "right" : "left" ) + ":4px; top:0px; background:white; padding:2px;' src='" + tmp.origin_tree.settings.ui.theme_path + "remove.png' />");
|
192
|
-
}
|
193
|
-
tmp.move_type = false;
|
194
|
-
tmp.ref_node = false;
|
195
|
-
tree_component.drag_drop.marker.hide();
|
196
|
-
return false;
|
197
|
-
}
|
198
|
-
|
199
|
-
if(tmp.scroll_time) clearTimeout(tmp.scroll_time);
|
200
|
-
tmp.scroll_time = setTimeout( function() { tree2.scrollCheck(event.pageX,event.pageY); }, 50);
|
201
|
-
|
202
|
-
var mov = false;
|
203
|
-
var st = cnt.scrollTop();
|
204
|
-
|
205
|
-
if(event.target.tagName == "A" ) {
|
206
|
-
// just in case if hover is over the draggable
|
207
|
-
if(et.is("#jstree-dragged")) return false;
|
208
|
-
if(tree2.get_node(event.target).hasClass("closed")) {
|
209
|
-
tmp.open_time = setTimeout( function () { tree2.open_branch(et); }, 500);
|
210
|
-
}
|
211
|
-
|
212
|
-
var et_off = et.offset();
|
213
|
-
var goTo = {
|
214
|
-
x : (et_off.left - 1),
|
215
|
-
y : (event.pageY - et_off.top)
|
216
|
-
};
|
217
|
-
|
218
|
-
if(cnt.children("ul:eq(0)").hasClass("rtl")) goTo.x += et.width() - 8;
|
219
|
-
var arr = [];
|
220
|
-
|
221
|
-
if(goTo.y < tree2.li_height/3 + 1 ) arr = ["before","inside","after"];
|
222
|
-
else if(goTo.y > tree2.li_height*2/3 - 1 ) arr = ["after","inside","before"];
|
223
|
-
else {
|
224
|
-
if(goTo.y < tree2.li_height/2) arr = ["inside","before","after"];
|
225
|
-
else arr = ["inside","after","before"];
|
226
|
-
}
|
227
|
-
var ok = false;
|
228
|
-
$.each(arr, function(i, val) {
|
229
|
-
if(tree2.checkMove(tmp.origin_tree.container.find("li.dragged"), et, val)) {
|
230
|
-
mov = val;
|
231
|
-
ok = true;
|
232
|
-
return false;
|
233
|
-
}
|
234
|
-
});
|
235
|
-
if(ok) {
|
236
|
-
switch(mov) {
|
237
|
-
case "before":
|
238
|
-
goTo.y = et_off.top - 2;
|
239
|
-
if(cnt.children("ul:eq(0)").hasClass("rtl")) { tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "marker_rtl.gif").width(40); }
|
240
|
-
else { tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "marker.gif").width(40); }
|
241
|
-
break;
|
242
|
-
case "after":
|
243
|
-
goTo.y = et_off.top - 2 + tree2.li_height;
|
244
|
-
if(cnt.children("ul:eq(0)").hasClass("rtl")) { tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "marker_rtl.gif").width(40); }
|
245
|
-
else { tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "marker.gif").width(40); }
|
246
|
-
break;
|
247
|
-
case "inside":
|
248
|
-
goTo.x -= 2;
|
249
|
-
if(cnt.children("ul:eq(0)").hasClass("rtl")) {
|
250
|
-
goTo.x += 36;
|
251
|
-
}
|
252
|
-
goTo.y = et_off.top - 2 + tree2.li_height/2;
|
253
|
-
tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "plus.gif").width(11);
|
254
|
-
break;
|
255
|
-
}
|
256
|
-
tmp.move_type = mov;
|
257
|
-
tmp.ref_node = $(event.target);
|
258
|
-
tmp.drag_help.find("IMG").remove();
|
259
|
-
tree_component.drag_drop.marker.css({ "left" : goTo.x , "top" : goTo.y }).show();
|
260
|
-
}
|
261
|
-
}
|
262
|
-
|
263
|
-
if( (et.is(".tree") || et.is("ul") ) && et.find("li:eq(0)").size() == 0) {
|
264
|
-
var et_off = et.offset();
|
265
|
-
tmp.move_type = "inside";
|
266
|
-
tmp.ref_node = cnt.children("ul:eq(0)");
|
267
|
-
tmp.drag_help.find("IMG").remove();
|
268
|
-
tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "plus.gif").width(11);
|
269
|
-
tree_component.drag_drop.marker.css({ "left" : et_off.left + ( cnt.children("ul:eq(0)").hasClass("rtl") ? (cnt.width() - 10) : 10 ) , "top" : et_off.top + 15 }).show();
|
270
|
-
}
|
271
|
-
else if(event.target.tagName != "A" || !ok) {
|
272
|
-
if(tmp.drag_help.find("IMG").size() == 0) {
|
273
|
-
tmp.drag_help.find("li:eq(0)").append("<img style='position:absolute; " + (tmp.origin_tree.settings.ui.rtl ? "right" : "left" ) + ":4px; top:0px; background:white; padding:2px;' src='" + tmp.origin_tree.settings.ui.theme_path + "remove.png' />");
|
274
|
-
}
|
275
|
-
tmp.move_type = false;
|
276
|
-
tmp.ref_node = false;
|
277
|
-
tree_component.drag_drop.marker.hide();
|
278
|
-
}
|
279
|
-
event.preventDefault();
|
280
|
-
event.stopPropagation();
|
281
|
-
return false;
|
282
|
-
}
|
283
|
-
return true;
|
284
|
-
};
|
285
|
-
};
|
286
|
-
return {
|
287
|
-
cntr : ++tree_component.cntr,
|
288
|
-
settings : {
|
289
|
-
data : {
|
290
|
-
type : "predefined", // ENUM [json, xml_flat, xml_nested, predefined]
|
291
|
-
method : "GET", // HOW TO REQUEST FILES
|
292
|
-
async : false, // BOOL - async loading onopen
|
293
|
-
async_data : function (NODE, TREE_OBJ) { return { id : $(NODE).attr("id") || 0 } }, // PARAMETERS PASSED TO SERVER
|
294
|
-
url : false, // FALSE or STRING - url to document to be used (async or not)
|
295
|
-
json : false, // FALSE or OBJECT if type is JSON and async is false - the tree dump as json
|
296
|
-
xml : false // FALSE or STRING if type is XML_FLAT or XML_NESTED and async is false - a string to generate the tree from
|
297
|
-
},
|
298
|
-
selected : false, // FALSE or STRING or ARRAY
|
299
|
-
opened : [], // ARRAY OF INITIALLY OPENED NODES
|
300
|
-
languages : [], // ARRAY of string values (which will be used as CSS classes - so they must be valid)
|
301
|
-
path : false, // FALSE or STRING (if false - will be autodetected)
|
302
|
-
cookies : false, // FALSE or OBJECT (prefix, open, selected, opts - from jqCookie - expires, path, domain, secure)
|
303
|
-
ui : {
|
304
|
-
dots : true, // BOOL - dots or no dots
|
305
|
-
rtl : false, // BOOL - is the tree right-to-left
|
306
|
-
animation : 0, // INT - duration of open/close animations in miliseconds
|
307
|
-
hover_mode : true, // SHOULD get_* functions chage focus or change hovered item
|
308
|
-
scroll_spd : 4,
|
309
|
-
theme_path : false, // Path to themes
|
310
|
-
theme_name : "default",// Name of theme
|
311
|
-
context : [
|
312
|
-
{
|
313
|
-
id : "create",
|
314
|
-
label : "Create",
|
315
|
-
icon : "create.png",
|
316
|
-
visible : function (NODE, TREE_OBJ) { if(NODE.length != 1) return false; return TREE_OBJ.check("creatable", NODE); },
|
317
|
-
action : function (NODE, TREE_OBJ) { TREE_OBJ.create(false, TREE_OBJ.get_node(NODE[0])); }
|
318
|
-
},
|
319
|
-
"separator",
|
320
|
-
{
|
321
|
-
id : "rename",
|
322
|
-
label : "Rename",
|
323
|
-
icon : "rename.png",
|
324
|
-
visible : function (NODE, TREE_OBJ) { if(NODE.length != 1) return false; return TREE_OBJ.check("renameable", NODE); },
|
325
|
-
action : function (NODE, TREE_OBJ) { TREE_OBJ.rename(NODE); }
|
326
|
-
},
|
327
|
-
{
|
328
|
-
id : "delete",
|
329
|
-
label : "Delete",
|
330
|
-
icon : "remove.png",
|
331
|
-
visible : function (NODE, TREE_OBJ) { var ok = true; $.each(NODE, function () { if(TREE_OBJ.check("deletable", this) == false) ok = false; return false; }); return ok; },
|
332
|
-
action : function (NODE, TREE_OBJ) { $.each(NODE, function () { TREE_OBJ.remove(this); }); }
|
333
|
-
}
|
334
|
-
]
|
335
|
-
},
|
336
|
-
rules : {
|
337
|
-
multiple : false, // FALSE | CTRL | ON - multiple selection off/ with or without holding Ctrl
|
338
|
-
metadata : false, // FALSE or STRING - attribute name (use metadata plugin)
|
339
|
-
type_attr : "rel", // STRING attribute name (where is the type stored if no metadata)
|
340
|
-
multitree : false, // BOOL - is drag n drop between trees allowed
|
341
|
-
createat : "bottom", // STRING (top or bottom) new nodes get inserted at top or bottom
|
342
|
-
use_inline : false, // CHECK FOR INLINE RULES - REQUIRES METADATA
|
343
|
-
clickable : "all", // which node types can the user select | default - all
|
344
|
-
renameable : "all", // which node types can the user select | default - all
|
345
|
-
deletable : "all", // which node types can the user delete | default - all
|
346
|
-
creatable : "all", // which node types can the user create in | default - all
|
347
|
-
draggable : "none", // which node types can the user move | default - none | "all"
|
348
|
-
dragrules : "all", // what move operations between nodes are allowed | default - none | "all"
|
349
|
-
drag_copy : false, // FALSE | CTRL | ON - drag to copy off/ with or without holding Ctrl
|
350
|
-
droppable : [],
|
351
|
-
drag_button : "left" // left, right or both
|
352
|
-
},
|
353
|
-
lang : {
|
354
|
-
new_node : "New folder",
|
355
|
-
loading : "Loading ..."
|
356
|
-
},
|
357
|
-
callback : { // various callbacks to attach custom logic to
|
358
|
-
// before focus - should return true | false
|
359
|
-
beforechange: function(NODE,TREE_OBJ) { return true },
|
360
|
-
beforeopen : function(NODE,TREE_OBJ) { return true },
|
361
|
-
beforeclose : function(NODE,TREE_OBJ) { return true },
|
362
|
-
// before move - should return true | false
|
363
|
-
beforemove : function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true },
|
364
|
-
// before create - should return true | false
|
365
|
-
beforecreate: function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true },
|
366
|
-
// before rename - should return true | false
|
367
|
-
beforerename: function(NODE,LANG,TREE_OBJ) { return true },
|
368
|
-
// before delete - should return true | false
|
369
|
-
beforedelete: function(NODE,TREE_OBJ) { return true },
|
370
|
-
|
371
|
-
onJSONdata : function(DATA,TREE_OBJ) { return DATA; },
|
372
|
-
onselect : function(NODE,TREE_OBJ) { }, // node selected
|
373
|
-
ondeselect : function(NODE,TREE_OBJ) { }, // node deselected
|
374
|
-
onchange : function(NODE,TREE_OBJ) { }, // focus changed
|
375
|
-
onrename : function(NODE,LANG,TREE_OBJ,RB) { }, // node renamed ISNEW - TRUE|FALSE, current language
|
376
|
-
onmove : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // move completed (TYPE is BELOW|ABOVE|INSIDE)
|
377
|
-
oncopy : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // copy completed (TYPE is BELOW|ABOVE|INSIDE)
|
378
|
-
oncreate : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // node created, parent node (TYPE is createat)
|
379
|
-
ondelete : function(NODE,TREE_OBJ,RB) { }, // node deleted
|
380
|
-
onopen : function(NODE,TREE_OBJ) { }, // node opened
|
381
|
-
onopen_all : function(TREE_OBJ) { }, // all nodes opened
|
382
|
-
onclose : function(NODE,TREE_OBJ) { }, // node closed
|
383
|
-
error : function(TEXT,TREE_OBJ) { }, // error occured
|
384
|
-
// double click on node - defaults to open/close & select
|
385
|
-
ondblclk : function(NODE,TREE_OBJ) { TREE_OBJ.toggle_branch.call(TREE_OBJ, NODE); TREE_OBJ.select_branch.call(TREE_OBJ, NODE); },
|
386
|
-
// right click - to prevent use: EV.preventDefault(); EV.stopPropagation(); return false
|
387
|
-
onrgtclk : function(NODE,TREE_OBJ,EV) { },
|
388
|
-
onload : function(TREE_OBJ) { },
|
389
|
-
onfocus : function(TREE_OBJ) { },
|
390
|
-
ondrop : function(NODE,REF_NODE,TYPE,TREE_OBJ) {}
|
391
|
-
}
|
392
|
-
},
|
393
|
-
// INITIALIZATION
|
394
|
-
init : function(elem, conf) {
|
395
|
-
var _this = this;
|
396
|
-
this.container = $(elem);
|
397
|
-
if(this.container.size == 0) { alert("Invalid container node!"); return }
|
398
|
-
|
399
|
-
tree_component.inst[this.cntr] = this;
|
400
|
-
if(!this.container.attr("id")) this.container.attr("id","jstree_" + this.cntr);
|
401
|
-
tree_component.inst[this.container.attr("id")] = tree_component.inst[this.cntr];
|
402
|
-
tree_component.focused = this.cntr;
|
403
|
-
|
404
|
-
var opts = $.extend({},conf);
|
405
|
-
|
406
|
-
// MERGE OPTIONS WITH DEFAULTS
|
407
|
-
if(opts && opts.cookies) {
|
408
|
-
this.settings.cookies = $.extend({},this.settings.cookies,opts.cookies);
|
409
|
-
delete opts.cookies;
|
410
|
-
if(!this.settings.cookies.opts) this.settings.cookies.opts = {};
|
411
|
-
}
|
412
|
-
if(opts && opts.callback) {
|
413
|
-
this.settings.callback = $.extend({},this.settings.callback,opts.callback);
|
414
|
-
delete opts.callback;
|
415
|
-
}
|
416
|
-
if(opts && opts.data) {
|
417
|
-
this.settings.data = $.extend({},this.settings.data,opts.data);
|
418
|
-
delete opts.data;
|
419
|
-
}
|
420
|
-
if(opts && opts.ui) {
|
421
|
-
this.settings.ui = $.extend({},this.settings.ui,opts.ui);
|
422
|
-
delete opts.ui;
|
423
|
-
}
|
424
|
-
if(opts && opts.rules) {
|
425
|
-
this.settings.rules = $.extend({},this.settings.rules,opts.rules);
|
426
|
-
delete opts.rules;
|
427
|
-
}
|
428
|
-
if(opts && opts.lang) {
|
429
|
-
this.settings.lang = $.extend({},this.settings.lang,opts.lang);
|
430
|
-
delete opts.lang;
|
431
|
-
}
|
432
|
-
this.settings = $.extend({},this.settings,opts);
|
433
|
-
|
434
|
-
// PATH TO IMAGES AND XSL
|
435
|
-
if(this.settings.path == false) {
|
436
|
-
this.path = "";
|
437
|
-
$("script").each( function () {
|
438
|
-
if(this.src.toString().match(/tree_component.*?js$/)) {
|
439
|
-
_this.path = this.src.toString().replace(/tree_component.*?js$/, "");
|
440
|
-
}
|
441
|
-
});
|
442
|
-
}
|
443
|
-
else this.path = this.settings.path;
|
444
|
-
|
445
|
-
// DEAL WITH LANGUAGE VERSIONS
|
446
|
-
this.current_lang = this.settings.languages && this.settings.languages.length ? this.settings.languages[0] : false;
|
447
|
-
if(this.settings.languages && this.settings.languages.length) {
|
448
|
-
this.sn = get_sheet_num("tree_component.css");
|
449
|
-
if(this.sn === false && document.styleSheets.length) this.sn = document.styleSheets.length;
|
450
|
-
var st = false;
|
451
|
-
var id = this.container.attr("id") ? "#" + this.container.attr("id") : ".tree";
|
452
|
-
for(var ln = 0; ln < this.settings.languages.length; ln++) {
|
453
|
-
st = add_css(id + " ." + this.settings.languages[ln], this.sn);
|
454
|
-
if(st !== false) {
|
455
|
-
if(this.settings.languages[ln] == this.current_lang) st.style.display = "";
|
456
|
-
else st.style.display = "none";
|
457
|
-
}
|
458
|
-
}
|
459
|
-
}
|
460
|
-
|
461
|
-
// DROPPABLES
|
462
|
-
if(this.settings.rules.droppable.length) {
|
463
|
-
for(var i in this.settings.rules.droppable) {
|
464
|
-
if(typeof this.settings.rules.droppable[i] == "function") continue;
|
465
|
-
tree_component.drag_drop.droppable.push(this.settings.rules.droppable[i]);
|
466
|
-
}
|
467
|
-
tree_component.drag_drop.droppable = $.unique(tree_component.drag_drop.droppable);
|
468
|
-
}
|
469
|
-
|
470
|
-
// THEMES
|
471
|
-
if(this.settings.ui.theme_path === false) this.settings.ui.theme_path = this.path + "themes/";
|
472
|
-
this.theme = this.settings.ui.theme_path;
|
473
|
-
if(_this.settings.ui.theme_name) {
|
474
|
-
this.theme += _this.settings.ui.theme_name + "/";
|
475
|
-
if(_this.settings.ui.theme_name != "themeroller" && !tree_component.def_style) { add_sheet(_this.settings.ui.theme_path + "default/style.css"); tree_component.def_style = true; }
|
476
|
-
add_sheet(_this.theme + "style.css");
|
477
|
-
}
|
478
|
-
|
479
|
-
this.container.addClass("tree");
|
480
|
-
if(_this.settings.ui.theme_name != "themeroller") this.container.addClass("tree-default");
|
481
|
-
if(this.settings.ui.theme_name && this.settings.ui.theme_name != "default") this.container.addClass("tree-" + _this.settings.ui.theme_name);
|
482
|
-
if(this.settings.ui.theme_name == "themeroller") this.container.addClass("ui-widget ui-widget-content");
|
483
|
-
if(this.settings.rules.multiple) this.selected_arr = [];
|
484
|
-
this.offset = false;
|
485
|
-
|
486
|
-
// CONTEXT MENU
|
487
|
-
this.context_menu();
|
488
|
-
|
489
|
-
this.hovered = false;
|
490
|
-
this.locked = false;
|
491
|
-
|
492
|
-
// CREATE DUMMY FOR MOVING
|
493
|
-
if(this.settings.rules.draggable != "none" && tree_component.drag_drop.marker === false) {
|
494
|
-
var _this = this;
|
495
|
-
tree_component.drag_drop.marker = $("<img>")
|
496
|
-
.attr({
|
497
|
-
id : "marker",
|
498
|
-
src : _this.settings.ui.theme_path + "marker.gif"
|
499
|
-
})
|
500
|
-
.css({
|
501
|
-
height : "5px",
|
502
|
-
width : "40px",
|
503
|
-
display : "block",
|
504
|
-
position : "absolute",
|
505
|
-
left : "30px",
|
506
|
-
top : "30px",
|
507
|
-
zIndex : "1000"
|
508
|
-
}).hide().appendTo("body");
|
509
|
-
}
|
510
|
-
this.refresh();
|
511
|
-
this.attachEvents();
|
512
|
-
this.focus();
|
513
|
-
},
|
514
|
-
off_height : function () {
|
515
|
-
if(this.offset === false) {
|
516
|
-
this.container.css({ position : "relative" });
|
517
|
-
this.offset = this.container.offset();
|
518
|
-
var tmp = 0;
|
519
|
-
tmp = parseInt($.curCSS(this.container.get(0), "paddingTop", true),10);
|
520
|
-
if(tmp) this.offset.top += tmp;
|
521
|
-
tmp = parseInt($.curCSS(this.container.get(0), "borderTopWidth", true),10);
|
522
|
-
if(tmp) this.offset.top += tmp;
|
523
|
-
this.container.css({ position : "" });
|
524
|
-
}
|
525
|
-
if(!this.li_height) {
|
526
|
-
var tmp = this.container.find("ul li.closed, ul li.leaf").eq(0);
|
527
|
-
this.li_height = tmp.height();
|
528
|
-
if(tmp.children("ul:eq(0)").size()) this.li_height -= tmp.children("ul:eq(0)").height();
|
529
|
-
if(!this.li_height) this.li_height = 18;
|
530
|
-
}
|
531
|
-
},
|
532
|
-
context_menu : function () {
|
533
|
-
this.context = false;
|
534
|
-
if(this.settings.ui.context != false) {
|
535
|
-
var str = '<div class="tree-context tree-default-context tree-' + this.settings.ui.theme_name + '-context">';
|
536
|
-
for(var i in this.settings.ui.context) {
|
537
|
-
if(typeof this.settings.ui.context[i] == "function") continue;
|
538
|
-
if(this.settings.ui.context[i] == "separator") {
|
539
|
-
str += "<span class='separator'> </span>";
|
540
|
-
continue;
|
541
|
-
}
|
542
|
-
var icn = "";
|
543
|
-
if(this.settings.ui.context[i].icon) icn = 'background-image:url(\'' + ( this.settings.ui.context[i].icon.indexOf("/") == -1 ? this.theme + this.settings.ui.context[i].icon : this.settings.ui.context[i].icon ) + '\');';
|
544
|
-
str += '<a rel="' + this.settings.ui.context[i].id + '" href="#" style="' + icn + '">' + this.settings.ui.context[i].label + '</a>';
|
545
|
-
}
|
546
|
-
str += '</div>';
|
547
|
-
this.context = $(str);
|
548
|
-
this.context.hide();
|
549
|
-
this.context.append = false;
|
550
|
-
}
|
551
|
-
},
|
552
|
-
// REPAINT TREE
|
553
|
-
refresh : function (obj) {
|
554
|
-
if(this.locked) return this.error("LOCKED");
|
555
|
-
var _this = this;
|
556
|
-
|
557
|
-
this.is_partial_refresh = obj ? true : false;
|
558
|
-
|
559
|
-
// SAVE OPENED
|
560
|
-
this.opened = Array();
|
561
|
-
if(this.settings.cookies && $.cookie(this.settings.cookies.prefix + '_open')) {
|
562
|
-
var str = $.cookie(this.settings.cookies.prefix + '_open');
|
563
|
-
var tmp = str.split(",");
|
564
|
-
$.each(tmp, function () {
|
565
|
-
if(this.replace(/^#/,"").length > 0) { _this.opened.push("#" + this.replace(/^#/,"")); }
|
566
|
-
});
|
567
|
-
this.settings.opened = false;
|
568
|
-
}
|
569
|
-
else if(this.settings.opened != false) {
|
570
|
-
$.each(this.settings.opened, function (i, item) {
|
571
|
-
if(this.replace(/^#/,"").length > 0) { _this.opened.push("#" + this.replace(/^#/,"")); }
|
572
|
-
});
|
573
|
-
this.settings.opened = false;
|
574
|
-
}
|
575
|
-
else {
|
576
|
-
this.container.find("li.open").each(function (i) { if(this.id) { _this.opened.push("#" + this.id); } });
|
577
|
-
}
|
578
|
-
|
579
|
-
// SAVE SELECTED
|
580
|
-
if(this.selected) {
|
581
|
-
this.settings.selected = Array();
|
582
|
-
if(obj) {
|
583
|
-
$(obj).find("li:has(a.clicked)").each(function () {
|
584
|
-
$this = $(this);
|
585
|
-
if($this.attr("id")) _this.settings.selected.push("#" + $this.attr("id"));
|
586
|
-
});
|
587
|
-
}
|
588
|
-
else {
|
589
|
-
if(this.selected_arr) {
|
590
|
-
$.each(this.selected_arr, function () {
|
591
|
-
if(this.attr("id")) _this.settings.selected.push("#" + this.attr("id"));
|
592
|
-
});
|
593
|
-
}
|
594
|
-
else {
|
595
|
-
if(this.selected.attr("id")) this.settings.selected.push("#" + this.selected.attr("id"));
|
596
|
-
}
|
597
|
-
}
|
598
|
-
}
|
599
|
-
else if(this.settings.cookies && $.cookie(this.settings.cookies.prefix + '_selected')) {
|
600
|
-
this.settings.selected = Array();
|
601
|
-
var str = $.cookie(this.settings.cookies.prefix + '_selected');
|
602
|
-
var tmp = str.split(",");
|
603
|
-
$.each(tmp, function () {
|
604
|
-
if(this.replace(/^#/,"").length > 0) { _this.settings.selected.push("#" + this.replace(/^#/,"")); }
|
605
|
-
});
|
606
|
-
}
|
607
|
-
else if(this.settings.selected !== false) {
|
608
|
-
var tmp = Array();
|
609
|
-
if((typeof this.settings.selected).toLowerCase() == "object") {
|
610
|
-
$.each(this.settings.selected, function () {
|
611
|
-
if(this.replace(/^#/,"").length > 0) tmp.push("#" + this.replace(/^#/,""));
|
612
|
-
});
|
613
|
-
}
|
614
|
-
else {
|
615
|
-
if(this.settings.selected.replace(/^#/,"").length > 0) tmp.push("#" + this.settings.selected.replace(/^#/,""));
|
616
|
-
}
|
617
|
-
this.settings.selected = tmp;
|
618
|
-
}
|
619
|
-
|
620
|
-
if(obj && this.settings.data.async) {
|
621
|
-
this.opened = Array();
|
622
|
-
obj = this.get_node(obj);
|
623
|
-
obj.find("li.open").each(function (i) { _this.opened.push("#" + this.id); });
|
624
|
-
if(obj.hasClass("open")) obj.removeClass("open").addClass("closed");
|
625
|
-
if(obj.hasClass("leaf")) obj.removeClass("leaf");
|
626
|
-
obj.children("ul:eq(0)").html("");
|
627
|
-
return this.open_branch(obj, true, function () { _this.reselect.apply(_this); });
|
628
|
-
}
|
629
|
-
|
630
|
-
if(this.settings.data.type == "xml_flat" || this.settings.data.type == "xml_nested") {
|
631
|
-
this.scrtop = this.container.get(0).scrollTop;
|
632
|
-
var xsl = (this.settings.data.type == "xml_flat") ? "flat.xsl" : "nested.xsl";
|
633
|
-
if(this.settings.data.xml) this.container.getTransform(this.path + xsl, this.settings.data.xml, { params : { theme_name : _this.settings.ui.theme_name, theme_path : _this.theme }, meth : _this.settings.data.method, dat : _this.settings.data.async_data.apply(_this,[obj, _this]), callback: function () { _this.context_menu.apply(_this); _this.reselect.apply(_this); } });
|
634
|
-
else this.container.getTransform(this.path + xsl, this.settings.data.url, { params : { theme_name : _this.settings.ui.theme_name, theme_path : _this.theme }, meth : _this.settings.data.method, dat : _this.settings.data.async_data.apply(_this,[obj, _this]), callback: function () { _this.context_menu.apply(_this); _this.reselect.apply(_this); } });
|
635
|
-
return;
|
636
|
-
}
|
637
|
-
else if(this.settings.data.type == "json") {
|
638
|
-
if(this.settings.data.json) {
|
639
|
-
var str = "";
|
640
|
-
if(this.settings.data.json.length) {
|
641
|
-
for(var i = 0; i < this.settings.data.json.length; i++) {
|
642
|
-
str += this.parseJSON(this.settings.data.json[i]);
|
643
|
-
}
|
644
|
-
} else str = this.parseJSON(this.settings.data.json);
|
645
|
-
this.container.html("<ul>" + str + "</ul>");
|
646
|
-
this.container.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");
|
647
|
-
this.container.find("li").not(".open").not(".closed").addClass("leaf");
|
648
|
-
this.context_menu();
|
649
|
-
this.reselect();
|
650
|
-
}
|
651
|
-
else {
|
652
|
-
var _this = this;
|
653
|
-
$.ajax({
|
654
|
-
type : this.settings.data.method,
|
655
|
-
url : this.settings.data.url,
|
656
|
-
data : this.settings.data.async_data(false, this),
|
657
|
-
dataType : "json",
|
658
|
-
success : function (data) {
|
659
|
-
data = _this.settings.callback.onJSONdata.call(null, data, _this);
|
660
|
-
var str = "";
|
661
|
-
if(data.length) {
|
662
|
-
for(var i = 0; i < data.length; i++) {
|
663
|
-
str += _this.parseJSON(data[i]);
|
664
|
-
}
|
665
|
-
} else str = _this.parseJSON(data);
|
666
|
-
_this.container.html("<ul>" + str + "</ul>");
|
667
|
-
_this.container.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");
|
668
|
-
_this.container.find("li").not(".open").not(".closed").addClass("leaf");
|
669
|
-
_this.context_menu.apply(_this);
|
670
|
-
_this.reselect.apply(_this);
|
671
|
-
},
|
672
|
-
error : function (xhttp, textStatus, errorThrown) { _this.error(errorThrown + " " + textStatus); }
|
673
|
-
});
|
674
|
-
}
|
675
|
-
}
|
676
|
-
else {
|
677
|
-
this.container.children("ul:eq(0)");
|
678
|
-
this.container.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");
|
679
|
-
this.container.find("li").not(".open").not(".closed").addClass("leaf");
|
680
|
-
this.reselect();
|
681
|
-
}
|
682
|
-
},
|
683
|
-
// CONVERT JSON TO HTML
|
684
|
-
parseJSON : function (data) {
|
685
|
-
if(!data || !data.data) return "";
|
686
|
-
var str = "";
|
687
|
-
str += "<li ";
|
688
|
-
var cls = false;
|
689
|
-
if(data.attributes) {
|
690
|
-
for(var i in data.attributes) {
|
691
|
-
if(typeof data.attributes[i] == "function") continue;
|
692
|
-
if(i == "class") {
|
693
|
-
str += " class='" + data.attributes[i] + " ";
|
694
|
-
if(data.state == "closed" || data.state == "open") str += " " + data.state + " ";
|
695
|
-
str += "' ";
|
696
|
-
cls = true;
|
697
|
-
}
|
698
|
-
else str += " " + i + "='" + data.attributes[i] + "' ";
|
699
|
-
}
|
700
|
-
}
|
701
|
-
if(!cls && (data.state == "closed" || data.state == "open")) str += " class='" + data.state + "' ";
|
702
|
-
str += ">";
|
703
|
-
if(this.settings.languages.length) {
|
704
|
-
for(var i = 0; i < this.settings.languages.length; i++) {
|
705
|
-
var attr = {};
|
706
|
-
attr["href"] = "#";
|
707
|
-
attr["style"] = "";
|
708
|
-
attr["class"] = this.settings.languages[i];
|
709
|
-
if(data.data[this.settings.languages[i]] && (typeof data.data[this.settings.languages[i]].attributes).toLowerCase() != "undefined") {
|
710
|
-
for(var j in data.data[this.settings.languages[i]].attributes) {
|
711
|
-
if(typeof data.data[this.settings.languages[i]].attributes[j] == "function") continue;
|
712
|
-
if(j == "style" || j == "class") attr[j] += " " + data.data[this.settings.languages[i]].attributes[j];
|
713
|
-
else attr[j] = data.data[this.settings.languages[i]].attributes[j];
|
714
|
-
}
|
715
|
-
}
|
716
|
-
if(data.data[this.settings.languages[i]] && data.data[this.settings.languages[i]].icon && this.settings.theme_name != "themeroller") {
|
717
|
-
var icn = data.data[this.settings.languages[i]].icon.indexOf("/") == -1 ? this.theme + data.data[this.settings.languages[i]].icon : data.data[this.settings.languages[i]].icon;
|
718
|
-
attr["style"] += " ; background-image:url('" + icn + "'); ";
|
719
|
-
}
|
720
|
-
str += "<a";
|
721
|
-
for(var j in attr) {
|
722
|
-
if(typeof attr[j] == "function") continue;
|
723
|
-
str += ' ' + j + '="' + attr[j] + '" ';
|
724
|
-
}
|
725
|
-
str += ">";
|
726
|
-
if(data.data[this.settings.languages[i]] && data.data[this.settings.languages[i]].icon && this.settings.theme_name == "themeroller") {
|
727
|
-
str += "<ins class='ui-icon " + data.data[this.settings.languages[i]].icon + "'> </ins>";
|
728
|
-
}
|
729
|
-
str += ( (typeof data.data[this.settings.languages[i]].title).toLowerCase() != "undefined" ? data.data[this.settings.languages[i]].title : data.data[this.settings.languages[i]] ) + "</a>";
|
730
|
-
}
|
731
|
-
}
|
732
|
-
else {
|
733
|
-
var attr = {};
|
734
|
-
attr["href"] = "#";
|
735
|
-
attr["style"] = "";
|
736
|
-
attr["class"] = "";
|
737
|
-
if((typeof data.data.attributes).toLowerCase() != "undefined") {
|
738
|
-
for(var i in data.data.attributes) {
|
739
|
-
if(typeof data.data.attributes[i] == "function") continue;
|
740
|
-
if(i == "style" || i == "class") attr[i] += " " + data.data.attributes[i];
|
741
|
-
else attr[i] = data.data.attributes[i];
|
742
|
-
}
|
743
|
-
}
|
744
|
-
if(data.data.icon && this.settings.ui.theme_name != "themeroller") {
|
745
|
-
var icn = data.data.icon.indexOf("/") == -1 ? this.theme + data.data.icon : data.data.icon;
|
746
|
-
attr["style"] += " ; background-image:url('" + icn + "');";
|
747
|
-
}
|
748
|
-
str += "<a";
|
749
|
-
for(var i in attr) {
|
750
|
-
if(typeof attr[j] == "function") continue;
|
751
|
-
str += ' ' + i + '="' + attr[i] + '" ';
|
752
|
-
}
|
753
|
-
str += ">";
|
754
|
-
if(data.data.icon && this.settings.ui.theme_name == "themeroller") {
|
755
|
-
str += "<ins class='ui-icon " + data.data.icon + "'> </ins>";
|
756
|
-
}
|
757
|
-
str += ( (typeof data.data.title).toLowerCase() != "undefined" ? data.data.title : data.data ) + "</a>";
|
758
|
-
}
|
759
|
-
if(data.children && data.children.length) {
|
760
|
-
str += '<ul>';
|
761
|
-
for(var i = 0; i < data.children.length; i++) {
|
762
|
-
str += this.parseJSON(data.children[i]);
|
763
|
-
}
|
764
|
-
str += '</ul>';
|
765
|
-
}
|
766
|
-
str += "</li>";
|
767
|
-
return str;
|
768
|
-
},
|
769
|
-
// getJSON from HTML
|
770
|
-
getJSON : function (nod, outer_attrib, inner_attrib, force) {
|
771
|
-
var _this = this;
|
772
|
-
if(!nod || $(nod).size() == 0) {
|
773
|
-
nod = this.container.children("ul").children("li");
|
774
|
-
}
|
775
|
-
else nod = $(nod);
|
776
|
-
|
777
|
-
if(nod.size() > 1) {
|
778
|
-
var arr = [];
|
779
|
-
nod.each(function () {
|
780
|
-
arr.push(_this.getJSON(this, outer_attrib, inner_attrib, force));
|
781
|
-
});
|
782
|
-
return arr;
|
783
|
-
}
|
784
|
-
|
785
|
-
if(!outer_attrib) outer_attrib = [ "id", "rel", "class" ];
|
786
|
-
if(!inner_attrib) inner_attrib = [ ];
|
787
|
-
var obj = { attributes : {}, data : false };
|
788
|
-
for(var i in outer_attrib) {
|
789
|
-
if(typeof outer_attrib[i] == "function") continue;
|
790
|
-
var val = (outer_attrib[i] == "class") ? nod.attr(outer_attrib[i]).replace("last","").replace("leaf","").replace("closed","").replace("open","") : nod.attr(outer_attrib[i]);
|
791
|
-
if(typeof val != "undefined" && val.replace(" ","").length > 0) obj.attributes[outer_attrib[i]] = val;
|
792
|
-
delete val;
|
793
|
-
}
|
794
|
-
if(this.settings.languages.length) {
|
795
|
-
obj.data = {};
|
796
|
-
for(var i in this.settings.languages) {
|
797
|
-
if(typeof this.settings.languages[i] == "function") continue;
|
798
|
-
var a = nod.children("a." + this.settings.languages[i]);
|
799
|
-
if(force || inner_attrib.length || a.get(0).style.backgroundImage.toString().length) {
|
800
|
-
obj.data[this.settings.languages[i]] = {};
|
801
|
-
obj.data[this.settings.languages[i]].title = a.text();
|
802
|
-
if(a.get(0).style.backgroundImage.length) {
|
803
|
-
obj.data[this.settings.languages[i]].icon = a.get(0).style.backgroundImage.replace("url(","").replace(")","");
|
804
|
-
}
|
805
|
-
if(this.settings.ui.theme_name == "themeroller" && a.children("ins").size()) {
|
806
|
-
var tmp = a.children("ins").attr("class");
|
807
|
-
var cls = false;
|
808
|
-
$.each(tmp.split(" "), function (i, val) {
|
809
|
-
if(val.indexOf("ui-icon-") == 0) {
|
810
|
-
cls = val;
|
811
|
-
return false;
|
812
|
-
}
|
813
|
-
});
|
814
|
-
if(cls) obj.data[this.settings.languages[i]].icon = cls;
|
815
|
-
}
|
816
|
-
if(inner_attrib.length) {
|
817
|
-
obj.data[this.settings.languages[i]].attributes = {};
|
818
|
-
for(var j in inner_attrib) {
|
819
|
-
if(typeof inner_attrib[j] == "function") continue;
|
820
|
-
var val = a.attr(inner_attrib[j]);
|
821
|
-
if(typeof val != "undefined" && val.replace(" ","").length > 0) obj.data[this.settings.languages[i]].attributes[inner_attrib[j]] = val;
|
822
|
-
delete val;
|
823
|
-
}
|
824
|
-
}
|
825
|
-
}
|
826
|
-
else {
|
827
|
-
obj.data[this.settings.languages[i]] = a.text();
|
828
|
-
}
|
829
|
-
}
|
830
|
-
}
|
831
|
-
else {
|
832
|
-
var a = nod.children("a");
|
833
|
-
if(force || inner_attrib.length || a.get(0).style.backgroundImage.toString().length) {
|
834
|
-
obj.data = {};
|
835
|
-
obj.data.title = a.text();
|
836
|
-
if(a.get(0).style.backgroundImage.length) {
|
837
|
-
obj.data.icon = a.get(0).style.backgroundImage.replace("url(","").replace(")","");
|
838
|
-
}
|
839
|
-
if(this.settings.ui.theme_name == "themeroller" && a.children("ins").size()) {
|
840
|
-
var tmp = a.children("ins").attr("class");
|
841
|
-
var cls = false;
|
842
|
-
$.each(tmp.split(" "), function (i, val) {
|
843
|
-
if(val.indexOf("ui-icon-") == 0) {
|
844
|
-
cls = val;
|
845
|
-
return false;
|
846
|
-
}
|
847
|
-
});
|
848
|
-
if(cls) obj.data[this.settings.languages[i]].icon = cls;
|
849
|
-
}
|
850
|
-
if(inner_attrib.length) {
|
851
|
-
obj.data.attributes = {};
|
852
|
-
for(var j in inner_attrib) {
|
853
|
-
if(typeof inner_attrib[j] == "function") continue;
|
854
|
-
var val = a.attr(inner_attrib[j]);
|
855
|
-
if(typeof val != "undefined" && val.replace(" ","").length > 0) obj.data.attributes[inner_attrib[j]] = val;
|
856
|
-
delete val;
|
857
|
-
}
|
858
|
-
}
|
859
|
-
}
|
860
|
-
else {
|
861
|
-
obj.data = a.text();
|
862
|
-
}
|
863
|
-
}
|
864
|
-
|
865
|
-
if(nod.children("ul").size() > 0) {
|
866
|
-
obj.children = [];
|
867
|
-
nod.children("ul").children("li").each(function () {
|
868
|
-
obj.children.push(_this.getJSON(this, outer_attrib, inner_attrib, force));
|
869
|
-
});
|
870
|
-
}
|
871
|
-
return obj;
|
872
|
-
},
|
873
|
-
// getXML from HTML
|
874
|
-
getXML : function (tp, nod, outer_attrib, inner_attrib, cb) {
|
875
|
-
var _this = this;
|
876
|
-
if(tp != "flat") tp = "nested";
|
877
|
-
if(!nod || $(nod).size() == 0) {
|
878
|
-
nod = this.container.children("ul").children("li");
|
879
|
-
}
|
880
|
-
else nod = $(nod);
|
881
|
-
|
882
|
-
if(nod.size() > 1) {
|
883
|
-
var obj = '<root>';
|
884
|
-
nod.each(function () {
|
885
|
-
obj += _this.getXML(tp, this, outer_attrib, inner_attrib, true);
|
886
|
-
});
|
887
|
-
obj += '</root>';
|
888
|
-
return obj;
|
889
|
-
}
|
890
|
-
|
891
|
-
if(!outer_attrib) outer_attrib = [ "id", "rel", "class" ];
|
892
|
-
if(!inner_attrib) inner_attrib = [ ];
|
893
|
-
var obj = '';
|
894
|
-
|
895
|
-
if(!cb) obj = '<root>';
|
896
|
-
|
897
|
-
obj += '<item ';
|
898
|
-
|
899
|
-
if(tp == "flat") {
|
900
|
-
var tmp_id = nod.parents("li:eq(0)").size() ? nod.parents("li:eq(0)").attr("id") : 0;
|
901
|
-
obj += ' parent_id="' + tmp_id + '" ';
|
902
|
-
delete tmp_id;
|
903
|
-
}
|
904
|
-
for(var i in outer_attrib) {
|
905
|
-
if(typeof outer_attrib[i] == "function") continue;
|
906
|
-
var val = (outer_attrib[i] == "class") ? nod.attr(outer_attrib[i]).replace("last","").replace("leaf","").replace("closed","").replace("open","") : nod.attr(outer_attrib[i]);
|
907
|
-
if(typeof val != "undefined" && val.replace(" ","").length > 0) obj += ' ' + outer_attrib[i] + '="' + val + '" ';
|
908
|
-
delete val;
|
909
|
-
}
|
910
|
-
obj += '>';
|
911
|
-
|
912
|
-
obj += '<content>';
|
913
|
-
if(this.settings.languages.length) {
|
914
|
-
for(var i in this.settings.languages) {
|
915
|
-
if(typeof this.settings.languages[i] == "function") continue;
|
916
|
-
var a = nod.children("a." + this.settings.languages[i]);
|
917
|
-
obj += '<name ';
|
918
|
-
if(inner_attrib.length || a.get(0).style.backgroundImage.toString().length || this.settings.ui.theme_name == "themeroller") {
|
919
|
-
if(a.get(0).style.backgroundImage.length) {
|
920
|
-
obj += ' icon="' + a.get(0).style.backgroundImage.replace("url(","").replace(")","") + '" ';
|
921
|
-
}
|
922
|
-
if(this.settings.ui.theme_name == "themeroller" && a.children("ins").size()) {
|
923
|
-
var tmp = a.children("ins").attr("class");
|
924
|
-
var cls = false;
|
925
|
-
$.each(tmp.split(" "), function (i, val) {
|
926
|
-
if(val.indexOf("ui-icon-") == 0) {
|
927
|
-
cls = val;
|
928
|
-
return false;
|
929
|
-
}
|
930
|
-
});
|
931
|
-
if(cls) obj += ' icon="' + cls + '" ';
|
932
|
-
}
|
933
|
-
if(inner_attrib.length) {
|
934
|
-
for(var j in inner_attrib) {
|
935
|
-
if(typeof inner_attrib[j] == "function") continue;
|
936
|
-
var val = a.attr(inner_attrib[j]);
|
937
|
-
if(typeof val != "undefined" && val.replace(" ","").length > 0) obj += ' ' + inner_attrib[j] + '="' + val + '" ';
|
938
|
-
delete val;
|
939
|
-
}
|
940
|
-
}
|
941
|
-
}
|
942
|
-
obj += '><![CDATA[' + a.text() + ']]></name>';
|
943
|
-
}
|
944
|
-
}
|
945
|
-
else {
|
946
|
-
var a = nod.children("a");
|
947
|
-
obj += '<name ';
|
948
|
-
if(inner_attrib.length || a.get(0).style.backgroundImage.toString().length || this.settings.ui.theme_name == "themeroller") {
|
949
|
-
if(a.get(0).style.backgroundImage.length) {
|
950
|
-
obj += ' icon="' + a.get(0).style.backgroundImage.replace("url(","").replace(")","") + '" ';
|
951
|
-
}
|
952
|
-
if(this.settings.ui.theme_name == "themeroller" && a.children("ins").size()) {
|
953
|
-
var tmp = a.children("ins").attr("class");
|
954
|
-
var cls = false;
|
955
|
-
$.each(tmp.split(" "), function (i, val) {
|
956
|
-
if(val.indexOf("ui-icon-") == 0) {
|
957
|
-
cls = val;
|
958
|
-
return false;
|
959
|
-
}
|
960
|
-
});
|
961
|
-
if(cls) obj += ' icon="' + cls + '" ';
|
962
|
-
}
|
963
|
-
if(inner_attrib.length) {
|
964
|
-
for(var j in inner_attrib) {
|
965
|
-
if(typeof inner_attrib[j] == "function") continue;
|
966
|
-
var val = a.attr(inner_attrib[j]);
|
967
|
-
if(typeof val != "undefined" && val.replace(" ","").length > 0) obj += ' ' + inner_attrib[j] + '="' + val + '" ';
|
968
|
-
delete val;
|
969
|
-
}
|
970
|
-
}
|
971
|
-
}
|
972
|
-
obj += '><![CDATA[' + a.text() + ']]></name>';
|
973
|
-
}
|
974
|
-
obj += '</content>';
|
975
|
-
|
976
|
-
if(tp == "flat") obj += '</item>';
|
977
|
-
|
978
|
-
if(nod.children("ul").size() > 0) {
|
979
|
-
nod.children("ul").children("li").each(function () {
|
980
|
-
obj += _this.getXML(tp, this, outer_attrib, inner_attrib, true);
|
981
|
-
});
|
982
|
-
}
|
983
|
-
|
984
|
-
if(tp == "nested") obj += '</item>';
|
985
|
-
|
986
|
-
if(!cb) obj += '</root>';
|
987
|
-
return obj;
|
988
|
-
},
|
989
|
-
focus : function () {
|
990
|
-
if(this.locked) return false;
|
991
|
-
if(tree_component.focused != this.cntr) {
|
992
|
-
tree_component.focused = this.cntr;
|
993
|
-
this.settings.callback.onfocus.call(null, this);
|
994
|
-
}
|
995
|
-
},
|
996
|
-
show_context : function (obj) {
|
997
|
-
this.context.show();
|
998
|
-
var tmp = $(obj).children("a:visible").offset();
|
999
|
-
this.context.css({ "left" : (tmp.left), "top" : (tmp.top + parseInt(obj.children("a:visible").height()) + 2) });
|
1000
|
-
},
|
1001
|
-
hide_context : function () {
|
1002
|
-
if(this.context.to_remove && this.context.apply_to) this.context.apply_to.children("a").removeClass("clicked");
|
1003
|
-
this.context.apply_to = false;
|
1004
|
-
this.context.hide();
|
1005
|
-
},
|
1006
|
-
// ALL EVENTS
|
1007
|
-
attachEvents : function () {
|
1008
|
-
var _this = this;
|
1009
|
-
|
1010
|
-
this.container
|
1011
|
-
.bind("mousedown.jstree", function (event) {
|
1012
|
-
if(tree_component.drag_drop.isdown) {
|
1013
|
-
tree_component.drag_drop.move_type = false;
|
1014
|
-
event.preventDefault();
|
1015
|
-
event.stopPropagation();
|
1016
|
-
event.stopImmediatePropagation();
|
1017
|
-
return false;
|
1018
|
-
}
|
1019
|
-
})
|
1020
|
-
.bind("mouseup.jstree", function (event) {
|
1021
|
-
setTimeout( function() { _this.focus.apply(_this); }, 5);
|
1022
|
-
})
|
1023
|
-
.bind("click.jstree", function (event) {
|
1024
|
-
//event.stopPropagation();
|
1025
|
-
return true;
|
1026
|
-
});
|
1027
|
-
$("#" + this.container.attr("id") + " li")
|
1028
|
-
.live("click", function(event) { // WHEN CLICK IS ON THE ARROW
|
1029
|
-
if(event.target.tagName != "LI") return true;
|
1030
|
-
_this.off_height();
|
1031
|
-
if(event.pageY - $(event.target).offset().top > _this.li_height) return true;
|
1032
|
-
_this.toggle_branch.apply(_this, [event.target]);
|
1033
|
-
event.stopPropagation();
|
1034
|
-
return false;
|
1035
|
-
});
|
1036
|
-
$("#" + this.container.attr("id") + " li a")
|
1037
|
-
.live("click.jstree", function (event) { // WHEN CLICK IS ON THE TEXT OR ICON
|
1038
|
-
if(event.which && event.which == 3) return true;
|
1039
|
-
if(_this.locked) {
|
1040
|
-
event.preventDefault();
|
1041
|
-
event.target.blur();
|
1042
|
-
return _this.error("LOCKED");
|
1043
|
-
}
|
1044
|
-
_this.select_branch.apply(_this, [event.target, event.ctrlKey || _this.settings.rules.multiple == "on"]);
|
1045
|
-
if(_this.inp) { _this.inp.blur(); }
|
1046
|
-
event.preventDefault();
|
1047
|
-
event.target.blur();
|
1048
|
-
return false;
|
1049
|
-
})
|
1050
|
-
.live("dblclick.jstree", function (event) { // WHEN DOUBLECLICK ON TEXT OR ICON
|
1051
|
-
if(_this.locked) {
|
1052
|
-
event.preventDefault();
|
1053
|
-
event.stopPropagation();
|
1054
|
-
event.target.blur();
|
1055
|
-
return _this.error("LOCKED");
|
1056
|
-
}
|
1057
|
-
_this.settings.callback.ondblclk.call(null, _this.get_node(event.target).get(0), _this);
|
1058
|
-
event.preventDefault();
|
1059
|
-
event.stopPropagation();
|
1060
|
-
event.target.blur();
|
1061
|
-
})
|
1062
|
-
.live("contextmenu.jstree", function (event) {
|
1063
|
-
if(_this.locked) {
|
1064
|
-
event.target.blur();
|
1065
|
-
return _this.error("LOCKED");
|
1066
|
-
}
|
1067
|
-
var val = _this.settings.callback.onrgtclk.call(null, _this.get_node(event.target).get(0), _this, event);
|
1068
|
-
if(_this.context) {
|
1069
|
-
if(_this.context.append == false) {
|
1070
|
-
$("body").append(_this.context);
|
1071
|
-
_this.context.append = true;
|
1072
|
-
for(var i in _this.settings.ui.context) {
|
1073
|
-
if(typeof _this.settings.ui.context[i] == "function") continue;
|
1074
|
-
if(_this.settings.ui.context[i] == "separator") continue;
|
1075
|
-
(function () {
|
1076
|
-
var func = _this.settings.ui.context[i].action;
|
1077
|
-
_this.context.children("[rel=" + _this.settings.ui.context[i].id +"]")
|
1078
|
-
.bind("click", function (event) {
|
1079
|
-
if(!$(this).hasClass("disabled")) {
|
1080
|
-
func.call(null, _this.context.apply_to || null, _this);
|
1081
|
-
_this.hide_context();
|
1082
|
-
}
|
1083
|
-
event.stopPropagation();
|
1084
|
-
event.preventDefault();
|
1085
|
-
return false;
|
1086
|
-
})
|
1087
|
-
.bind("mouseup", function (event) {
|
1088
|
-
this.blur();
|
1089
|
-
if($(this).hasClass("disabled")) {
|
1090
|
-
event.stopPropagation();
|
1091
|
-
event.preventDefault();
|
1092
|
-
return false;
|
1093
|
-
}
|
1094
|
-
})
|
1095
|
-
.bind("mousedown", function (event) {
|
1096
|
-
event.stopPropagation();
|
1097
|
-
event.preventDefault();
|
1098
|
-
});
|
1099
|
-
})();
|
1100
|
-
}
|
1101
|
-
}
|
1102
|
-
var obj = _this.get_node(event.target);
|
1103
|
-
if(_this.inp) { _this.inp.blur(); }
|
1104
|
-
if(obj) {
|
1105
|
-
if(!obj.children("a:eq(0)").hasClass("clicked")) {
|
1106
|
-
// _this.select_branch.apply(_this, [event.target, event.ctrlKey || _this.settings.rules.multiple == "on"]);
|
1107
|
-
_this.context.apply_to = obj;
|
1108
|
-
_this.context.to_remove = true;
|
1109
|
-
_this.context.apply_to.children("a").addClass("clicked");
|
1110
|
-
event.target.blur();
|
1111
|
-
}
|
1112
|
-
else {
|
1113
|
-
_this.context.to_remove = false;
|
1114
|
-
_this.context.apply_to = (_this.selected_arr && _this.selected_arr.length > 1) ? _this.selected_arr : _this.selected;
|
1115
|
-
}
|
1116
|
-
|
1117
|
-
_this.context.children("a").removeClass("disabled").show();
|
1118
|
-
var go = false;
|
1119
|
-
for(var i in _this.settings.ui.context) {
|
1120
|
-
if(typeof _this.settings.ui.context[i] == "function") continue;
|
1121
|
-
if(_this.settings.ui.context[i] == "separator") continue;
|
1122
|
-
var state = _this.settings.ui.context[i].visible.call(null, _this.context.apply_to, _this);
|
1123
|
-
if(state === false) _this.context.children("[rel=" + _this.settings.ui.context[i].id +"]").addClass("disabled");
|
1124
|
-
if(state === -1) _this.context.children("[rel=" + _this.settings.ui.context[i].id +"]").hide();
|
1125
|
-
else go = true;
|
1126
|
-
}
|
1127
|
-
if(go == true) _this.show_context(obj);
|
1128
|
-
event.preventDefault();
|
1129
|
-
event.stopPropagation();
|
1130
|
-
return false;
|
1131
|
-
}
|
1132
|
-
}
|
1133
|
-
return val;
|
1134
|
-
})
|
1135
|
-
.live("mouseover.jstree", function (event) {
|
1136
|
-
if(_this.locked) {
|
1137
|
-
event.preventDefault();
|
1138
|
-
event.stopPropagation();
|
1139
|
-
return _this.error("LOCKED");
|
1140
|
-
}
|
1141
|
-
if( (_this.settings.ui.hover_mode || _this.settings.ui.theme_name == "themeroller" ) && _this.hovered !== false && event.target.tagName == "A") {
|
1142
|
-
_this.hovered.children("a").removeClass("hover ui-state-hover");
|
1143
|
-
_this.hovered = false;
|
1144
|
-
}
|
1145
|
-
if(_this.settings.ui.theme_name == "themeroller") {
|
1146
|
-
_this.hover_branch.apply(_this, [event.target]);
|
1147
|
-
}
|
1148
|
-
});
|
1149
|
-
if(_this.settings.ui.theme_name == "themeroller") {
|
1150
|
-
$("#" + this.container.attr("id") + " li a").live("mouseout", function (event) {
|
1151
|
-
if(_this.hovered) _this.hovered.children("a").removeClass("hover ui-state-hover");
|
1152
|
-
});
|
1153
|
-
}
|
1154
|
-
|
1155
|
-
// ATTACH DRAG & DROP ONLY IF NEEDED
|
1156
|
-
if(this.settings.rules.draggable != "none") {
|
1157
|
-
$("#" + this.container.attr("id") + " li a")
|
1158
|
-
.live("mousedown.jstree", function (event) {
|
1159
|
-
if(_this.settings.rules.drag_button == "left" && event.which && event.which != 1) return true;
|
1160
|
-
if(_this.settings.rules.drag_button == "right" && event.which && event.which != 3) return true;
|
1161
|
-
_this.focus.apply(_this);
|
1162
|
-
if(_this.locked) return _this.error("LOCKED");
|
1163
|
-
// SELECT LIST ITEM NODE
|
1164
|
-
var obj = _this.get_node(event.target);
|
1165
|
-
// IF ITEM IS DRAGGABLE
|
1166
|
-
if(_this.settings.rules.multiple != false && _this.selected_arr.length > 1 && obj.children("a:eq(0)").hasClass("clicked")) {
|
1167
|
-
var counter = 0;
|
1168
|
-
for(var i in _this.selected_arr) {
|
1169
|
-
if(typeof _this.selected_arr[i] == "function") continue;
|
1170
|
-
if(_this.check("draggable", _this.selected_arr[i])) {
|
1171
|
-
_this.selected_arr[i].addClass("dragged");
|
1172
|
-
tree_component.drag_drop.origin_tree = _this;
|
1173
|
-
counter ++;
|
1174
|
-
}
|
1175
|
-
}
|
1176
|
-
if(counter > 0) {
|
1177
|
-
if(_this.check("draggable", obj)) tree_component.drag_drop.drag_node = obj;
|
1178
|
-
else tree_component.drag_drop.drag_node = _this.container.find("li.dragged:eq(0)");
|
1179
|
-
tree_component.drag_drop.isdown = true;
|
1180
|
-
tree_component.drag_drop.drag_help = $("<div id='jstree-dragged' class='tree " + (_this.container.hasClass("tree-default") ? " tree-default" : "" ) + (_this.settings.ui.theme_name && _this.settings.ui.theme_name != "default" ? " tree-" + _this.settings.ui.theme_name : "" ) + "' />").append("<ul class='" + _this.container.children("ul:eq(0)").get(0).className + "' />");
|
1181
|
-
var tmp = $(tree_component.drag_drop.drag_node.get(0).cloneNode(true));
|
1182
|
-
if(_this.settings.languages.length > 0) tmp.find("a").not("." + _this.current_lang).hide();
|
1183
|
-
tree_component.drag_drop.drag_help.children("ul:eq(0)").append(tmp);
|
1184
|
-
tree_component.drag_drop.drag_help.find("li:eq(0)").removeClass("last").addClass("last").children("a").html("Multiple selection").end().children("ul").remove();
|
1185
|
-
}
|
1186
|
-
}
|
1187
|
-
else {
|
1188
|
-
if(_this.check("draggable", obj)) {
|
1189
|
-
tree_component.drag_drop.drag_node = obj;
|
1190
|
-
tree_component.drag_drop.drag_help = $("<div id='jstree-dragged' class='tree " + (_this.container.hasClass("tree-default") ? " tree-default" : "" ) + (_this.settings.ui.theme_name && _this.settings.ui.theme_name != "default" ? " tree-" + _this.settings.ui.theme_name : "" ) + "' />").append("<ul class='" + _this.container.children("ul:eq(0)").get(0).className + "' />");
|
1191
|
-
var tmp = $(obj.get(0).cloneNode(true));
|
1192
|
-
if(_this.settings.languages.length > 0) tmp.find("a").not("." + _this.current_lang).hide();
|
1193
|
-
tree_component.drag_drop.drag_help.children("ul:eq(0)").append(tmp);
|
1194
|
-
tree_component.drag_drop.drag_help.find("li:eq(0)").removeClass("last").addClass("last");
|
1195
|
-
tree_component.drag_drop.isdown = true;
|
1196
|
-
tree_component.drag_drop.foreign = false;
|
1197
|
-
tree_component.drag_drop.origin_tree = _this;
|
1198
|
-
obj.addClass("dragged");
|
1199
|
-
}
|
1200
|
-
}
|
1201
|
-
tree_component.drag_drop.init_x = event.pageX;
|
1202
|
-
tree_component.drag_drop.init_y = event.pageY;
|
1203
|
-
obj.blur();
|
1204
|
-
event.preventDefault();
|
1205
|
-
event.stopPropagation();
|
1206
|
-
return false;
|
1207
|
-
});
|
1208
|
-
$(document)
|
1209
|
-
.bind("mousedown.jstree", tree_component.mousedown)
|
1210
|
-
.bind("mouseup.jstree", tree_component.mouseup)
|
1211
|
-
.bind("mousemove.jstree", tree_component.mousemove);
|
1212
|
-
}
|
1213
|
-
// ENDIF OF DRAG & DROP FUNCTIONS
|
1214
|
-
if(_this.context) $(document).bind("mousedown", function() { _this.hide_context(); });
|
1215
|
-
},
|
1216
|
-
checkMove : function (NODES, REF_NODE, TYPE) {
|
1217
|
-
if(this.locked) return this.error("LOCKED");
|
1218
|
-
var _this = this;
|
1219
|
-
|
1220
|
-
// OVER SELF OR CHILDREN
|
1221
|
-
if(REF_NODE.parents("li.dragged").size() > 0 || REF_NODE.is(".dragged")) return this.error("MOVE: NODE OVER SELF");
|
1222
|
-
// CHECK AGAINST DRAG_RULES
|
1223
|
-
if(NODES.size() == 1) {
|
1224
|
-
var NODE = NODES.eq(0);
|
1225
|
-
if(tree_component.drag_drop.foreign) {
|
1226
|
-
if(this.settings.rules.droppable.length == 0) return false;
|
1227
|
-
if(!NODE.is("." + this.settings.rules.droppable.join(", ."))) return false;
|
1228
|
-
var ok = false;
|
1229
|
-
for(var i in this.settings.rules.droppable) {
|
1230
|
-
if(typeof this.settings.rules.droppable[i] == "function") continue;
|
1231
|
-
if(NODE.is("." + this.settings.rules.droppable[i])) {
|
1232
|
-
if(this.settings.rules.metadata) {
|
1233
|
-
$.metadata.setType("attr", this.settings.rules.metadata);
|
1234
|
-
NODE.attr(this.settings.rules.metadata, "type: '" + this.settings.rules.droppable[i] + "'");
|
1235
|
-
}
|
1236
|
-
else {
|
1237
|
-
NODE.attr(this.settings.rules.type_attr, this.settings.rules.droppable[i]);
|
1238
|
-
}
|
1239
|
-
ok = true;
|
1240
|
-
break;
|
1241
|
-
}
|
1242
|
-
}
|
1243
|
-
if(!ok) return false;
|
1244
|
-
}
|
1245
|
-
if(!this.check("dragrules", [NODE, TYPE, REF_NODE.parents("li:eq(0)")])) return this.error("MOVE: AGAINST DRAG RULES");
|
1246
|
-
}
|
1247
|
-
else {
|
1248
|
-
var ok = true;
|
1249
|
-
NODES.each(function (i) {
|
1250
|
-
if(ok == false) return false;
|
1251
|
-
//if(i > 0) {
|
1252
|
-
// var ref = NODES.eq( (i - 1) );
|
1253
|
-
// var mv = "after";
|
1254
|
-
//}
|
1255
|
-
//else {
|
1256
|
-
var ref = REF_NODE;
|
1257
|
-
var mv = TYPE;
|
1258
|
-
//}
|
1259
|
-
if(!_this.check.apply(_this,["dragrules", [$(this), mv, ref]])) ok = false;
|
1260
|
-
});
|
1261
|
-
if(ok == false) return this.error("MOVE: AGAINST DRAG RULES");
|
1262
|
-
}
|
1263
|
-
// CHECK AGAINST METADATA
|
1264
|
-
if(this.settings.rules.use_inline && this.settings.rules.metadata) {
|
1265
|
-
var nd = false;
|
1266
|
-
if(TYPE == "inside") nd = REF_NODE.parents("li:eq(0)");
|
1267
|
-
else nd = REF_NODE.parents("li:eq(1)");
|
1268
|
-
if(nd.size()) {
|
1269
|
-
// VALID CHILDREN CHECK
|
1270
|
-
if(typeof nd.metadata()["valid_children"] != "undefined") {
|
1271
|
-
var tmp = nd.metadata()["valid_children"];
|
1272
|
-
var ok = true;
|
1273
|
-
NODES.each(function (i) {
|
1274
|
-
if(ok == false) return false;
|
1275
|
-
if($.inArray(_this.get_type(this), tmp) == -1) ok = false;
|
1276
|
-
});
|
1277
|
-
if(ok == false) return this.error("MOVE: NOT A VALID CHILD");
|
1278
|
-
}
|
1279
|
-
// CHECK IF PARENT HAS FREE SLOTS FOR CHILDREN
|
1280
|
-
if(typeof nd.metadata()["max_children"] != "undefined") {
|
1281
|
-
if((nd.children("ul:eq(0)").children("li").not(".dragged").size() + NODES.size()) > nd.metadata().max_children) return this.error("MOVE: MAX CHILDREN REACHED");
|
1282
|
-
}
|
1283
|
-
// CHECK FOR MAXDEPTH UP THE CHAIN
|
1284
|
-
var incr = 0;
|
1285
|
-
NODES.each(function (j) {
|
1286
|
-
var i = 1;
|
1287
|
-
var t = $(this);
|
1288
|
-
while(i < 100) {
|
1289
|
-
t = t.children("ul").children("li");
|
1290
|
-
if(t.size() == 0) break;
|
1291
|
-
i ++
|
1292
|
-
}
|
1293
|
-
incr = Math.max(i,incr);
|
1294
|
-
});
|
1295
|
-
var ok = true;
|
1296
|
-
|
1297
|
-
if((typeof $(nd).metadata().max_depth).toLowerCase() != "undefined" && $(nd).metadata().max_depth < incr) ok = false;
|
1298
|
-
else {
|
1299
|
-
nd.parents("li").each(function(i) {
|
1300
|
-
if(ok == false) return false;
|
1301
|
-
if((typeof $(this).metadata().max_depth).toLowerCase() != "undefined") {
|
1302
|
-
if( (i + incr) >= $(this).metadata().max_depth) ok = false;
|
1303
|
-
}
|
1304
|
-
});
|
1305
|
-
}
|
1306
|
-
if(ok == false) return this.error("MOVE: MAX_DEPTH REACHED");
|
1307
|
-
}
|
1308
|
-
}
|
1309
|
-
return true;
|
1310
|
-
},
|
1311
|
-
// USED AFTER REFRESH
|
1312
|
-
reselect : function (is_callback) {
|
1313
|
-
var _this = this;
|
1314
|
-
|
1315
|
-
if(!is_callback) this.cl_count = 0;
|
1316
|
-
else this.cl_count --;
|
1317
|
-
// REOPEN BRANCHES
|
1318
|
-
if(this.opened && this.opened.length) {
|
1319
|
-
var opn = false;
|
1320
|
-
for(var j = 0; this.opened && j < this.opened.length; j++) {
|
1321
|
-
if(this.settings.data.async) {
|
1322
|
-
if(this.get_node(this.opened[j]).size() > 0) {
|
1323
|
-
opn = true;
|
1324
|
-
var tmp = this.opened[j];
|
1325
|
-
delete this.opened[j];
|
1326
|
-
this.open_branch(tmp, true, function () { _this.reselect.apply(_this, [true]); } );
|
1327
|
-
this.cl_count ++;
|
1328
|
-
}
|
1329
|
-
}
|
1330
|
-
else this.open_branch(this.opened[j], true);
|
1331
|
-
}
|
1332
|
-
if(this.settings.data.async && opn) return;
|
1333
|
-
delete this.opened;
|
1334
|
-
}
|
1335
|
-
if(this.cl_count > 0) return;
|
1336
|
-
|
1337
|
-
// DOTS and RIGHT TO LEFT
|
1338
|
-
if(this.settings.ui.rtl) this.container.css("direction","rtl").children("ul:eq(0)").addClass("rtl");
|
1339
|
-
else this.container.css("direction","ltr").children("ul:eq(0)").addClass("ltr");
|
1340
|
-
if(this.settings.ui.dots == false) this.container.children("ul:eq(0)").addClass("no_dots");
|
1341
|
-
|
1342
|
-
// REPOSITION SCROLL
|
1343
|
-
if(this.scrtop) {
|
1344
|
-
this.container.scrollTop(_this.scrtop);
|
1345
|
-
delete this.scrtop;
|
1346
|
-
}
|
1347
|
-
// RESELECT PREVIOUSLY SELECTED
|
1348
|
-
if(this.settings.selected !== false) {
|
1349
|
-
$.each(this.settings.selected, function (i) {
|
1350
|
-
if(_this.is_partial_refresh) _this.select_branch($(_this.settings.selected[i], _this.container), (_this.settings.rules.multiple !== false) );
|
1351
|
-
else _this.select_branch($(_this.settings.selected[i], _this.container), (_this.settings.rules.multiple !== false && i > 0) );
|
1352
|
-
});
|
1353
|
-
this.settings.selected = false;
|
1354
|
-
}
|
1355
|
-
if(this.settings.ui.theme_name == "themeroller") this.container.find("a").addClass("ui-state-default");
|
1356
|
-
this.settings.callback.onload.call(null, _this);
|
1357
|
-
},
|
1358
|
-
// GET THE EXTENDED LI ELEMENT
|
1359
|
-
get_node : function (obj) {
|
1360
|
-
var obj = $(obj);
|
1361
|
-
return obj.is("li") ? obj : obj.parents("li:eq(0)");
|
1362
|
-
},
|
1363
|
-
// GET THE TYPE OF THE NODE
|
1364
|
-
get_type : function (obj) {
|
1365
|
-
obj = !obj ? this.selected : this.get_node(obj);
|
1366
|
-
if(!obj) return;
|
1367
|
-
if(this.settings.rules.metadata) {
|
1368
|
-
$.metadata.setType("attr", this.settings.rules.metadata);
|
1369
|
-
var tmp = obj.metadata().type;
|
1370
|
-
if(tmp) return tmp;
|
1371
|
-
}
|
1372
|
-
return obj.attr(this.settings.rules.type_attr);
|
1373
|
-
},
|
1374
|
-
// SCROLL CONTAINER WHILE DRAGGING
|
1375
|
-
scrollCheck : function (x,y) {
|
1376
|
-
var _this = this;
|
1377
|
-
var cnt = _this.container;
|
1378
|
-
var off = _this.container.offset();
|
1379
|
-
|
1380
|
-
var st = cnt.scrollTop();
|
1381
|
-
var sl = cnt.scrollLeft();
|
1382
|
-
// DETECT HORIZONTAL SCROLL
|
1383
|
-
var h_cor = (cnt.get(0).scrollWidth > cnt.width()) ? 40 : 20;
|
1384
|
-
|
1385
|
-
if(y - off.top < 20) cnt.scrollTop(Math.max( (st - _this.settings.ui.scroll_spd) ,0)); // NEAR TOP
|
1386
|
-
if(cnt.height() - (y - off.top) < h_cor) cnt.scrollTop(st + _this.settings.ui.scroll_spd); // NEAR BOTTOM
|
1387
|
-
if(x - off.left < 20) cnt.scrollLeft(Math.max( (sl - _this.settings.ui.scroll_spd),0)); // NEAR LEFT
|
1388
|
-
if(cnt.width() - (x - off.left) < 40) cnt.scrollLeft(sl + _this.settings.ui.scroll_spd); // NEAR RIGHT
|
1389
|
-
|
1390
|
-
if(cnt.scrollLeft() != sl || cnt.scrollTop() != st) {
|
1391
|
-
_this.moveType = false;
|
1392
|
-
_this.moveRef = false;
|
1393
|
-
tree_component.drag_drop.marker.hide();
|
1394
|
-
}
|
1395
|
-
tree_component.drag_drop.scroll_time = setTimeout( function() { _this.scrollCheck(x,y); }, 50);
|
1396
|
-
},
|
1397
|
-
check : function (rule, nodes) {
|
1398
|
-
if(this.locked) return this.error("LOCKED");
|
1399
|
-
// CHECK LOCAL RULES IF METADATA
|
1400
|
-
if(rule != "dragrules" && this.settings.rules.use_inline && this.settings.rules.metadata) {
|
1401
|
-
$.metadata.setType("attr", this.settings.rules.metadata);
|
1402
|
-
if(typeof this.get_node(nodes).metadata()[rule] != "undefined") return this.get_node(nodes).metadata()[rule];
|
1403
|
-
}
|
1404
|
-
if(!this.settings.rules[rule]) return false;
|
1405
|
-
if(this.settings.rules[rule] == "none") return false;
|
1406
|
-
if(this.settings.rules[rule] == "all") return true;
|
1407
|
-
|
1408
|
-
if(rule == "dragrules") {
|
1409
|
-
var nds = new Array();
|
1410
|
-
nds[0] = this.get_type(nodes[0]);
|
1411
|
-
nds[1] = nodes[1];
|
1412
|
-
nds[2] = this.get_type(nodes[2]);
|
1413
|
-
for(var i = 0; i < this.settings.rules.dragrules.length; i++) {
|
1414
|
-
var r = this.settings.rules.dragrules[i];
|
1415
|
-
var n = (r.indexOf("!") === 0) ? false : true;
|
1416
|
-
if(!n) r = r.replace("!","");
|
1417
|
-
var tmp = r.split(" ");
|
1418
|
-
for(var j = 0; j < 3; j++) {
|
1419
|
-
if(tmp[j] == nds[j] || tmp[j] == "*") tmp[j] = true;
|
1420
|
-
}
|
1421
|
-
if(tmp[0] === true && tmp[1] === true && tmp[2] === true) return n;
|
1422
|
-
}
|
1423
|
-
return false;
|
1424
|
-
}
|
1425
|
-
else
|
1426
|
-
return ($.inArray(this.get_type(nodes),this.settings.rules[rule]) != -1) ? true : false;
|
1427
|
-
},
|
1428
|
-
hover_branch : function (obj) {
|
1429
|
-
if(this.locked) return this.error("LOCKED");
|
1430
|
-
if(this.settings.ui.hover_mode == false && this.settings.ui.theme_name != "themeroller") return this.select_branch(obj);
|
1431
|
-
var _this = this;
|
1432
|
-
var obj = _this.get_node(obj);
|
1433
|
-
if(!obj.size()) return this.error("HOVER: NOT A VALID NODE");
|
1434
|
-
// CHECK AGAINST RULES FOR SELECTABLE NODES
|
1435
|
-
if(!_this.check("clickable", obj)) return this.error("SELECT: NODE NOT SELECTABLE");
|
1436
|
-
if(this.hovered) this.hovered.children("A").removeClass("hover ui-state-hover");
|
1437
|
-
|
1438
|
-
// SAVE NEWLY SELECTED
|
1439
|
-
this.hovered = obj;
|
1440
|
-
|
1441
|
-
// FOCUS NEW NODE AND OPEN ALL PARENT NODES IF CLOSED
|
1442
|
-
this.hovered.children("a").removeClass("hover ui-state-hover").addClass( this.settings.ui.theme_name == "themeroller" ? "hover ui-state-hover" : "hover");
|
1443
|
-
|
1444
|
-
// SCROLL SELECTED NODE INTO VIEW
|
1445
|
-
var off_t = this.hovered.offset().top;
|
1446
|
-
var beg_t = this.container.offset().top;
|
1447
|
-
var end_t = beg_t + this.container.height();
|
1448
|
-
var h_cor = (this.container.get(0).scrollWidth > this.container.width()) ? 40 : 20;
|
1449
|
-
if(off_t + 5 < beg_t) this.container.scrollTop(this.container.scrollTop() - (beg_t - off_t + 5) );
|
1450
|
-
if(off_t + h_cor > end_t) this.container.scrollTop(this.container.scrollTop() + (off_t + h_cor - end_t) );
|
1451
|
-
},
|
1452
|
-
select_branch : function (obj, multiple) {
|
1453
|
-
if(this.locked) return this.error("LOCKED");
|
1454
|
-
if(!obj && this.hovered !== false) obj = this.hovered;
|
1455
|
-
var _this = this;
|
1456
|
-
obj = _this.get_node(obj);
|
1457
|
-
if(!obj.size()) return this.error("SELECT: NOT A VALID NODE");
|
1458
|
-
obj.children("a").removeClass("hover ui-state-hover");
|
1459
|
-
// CHECK AGAINST RULES FOR SELECTABLE NODES
|
1460
|
-
if(!_this.check("clickable", obj)) return this.error("SELECT: NODE NOT SELECTABLE");
|
1461
|
-
if(_this.settings.callback.beforechange.call(null,obj.get(0),_this) === false) return this.error("SELECT: STOPPED BY USER");
|
1462
|
-
// IF multiple AND obj IS ALREADY SELECTED - DESELECT IT
|
1463
|
-
if(this.settings.rules.multiple != false && multiple && obj.children("a.clicked").size() > 0) {
|
1464
|
-
return this.deselect_branch(obj);
|
1465
|
-
}
|
1466
|
-
if(this.settings.rules.multiple != false && multiple) {
|
1467
|
-
this.selected_arr.push(obj);
|
1468
|
-
}
|
1469
|
-
if(this.settings.rules.multiple != false && !multiple) {
|
1470
|
-
for(var i in this.selected_arr) {
|
1471
|
-
if(typeof this.selected_arr[i] == "function") continue;
|
1472
|
-
this.selected_arr[i].children("A").removeClass("clicked ui-state-active");
|
1473
|
-
this.settings.callback.ondeselect.call(null, this.selected_arr[i].get(0), _this);
|
1474
|
-
}
|
1475
|
-
this.selected_arr = [];
|
1476
|
-
this.selected_arr.push(obj);
|
1477
|
-
if(this.selected && this.selected.children("A").hasClass("clicked")) {
|
1478
|
-
this.selected.children("A").removeClass("clicked ui-state-active");
|
1479
|
-
this.settings.callback.ondeselect.call(null, this.selected.get(0), _this);
|
1480
|
-
}
|
1481
|
-
}
|
1482
|
-
if(!this.settings.rules.multiple) {
|
1483
|
-
if(this.selected) {
|
1484
|
-
this.selected.children("A").removeClass("clicked ui-state-active");
|
1485
|
-
this.settings.callback.ondeselect.call(null, this.selected.get(0), _this);
|
1486
|
-
}
|
1487
|
-
}
|
1488
|
-
// SAVE NEWLY SELECTED
|
1489
|
-
this.selected = obj;
|
1490
|
-
if( (this.settings.ui.hover_mode || this.settings.ui.theme_name == "themeroller") && this.hovered !== false) {
|
1491
|
-
this.hovered.children("A").removeClass("hover ui-state-hover");
|
1492
|
-
this.hovered = obj;
|
1493
|
-
}
|
1494
|
-
|
1495
|
-
// FOCUS NEW NODE AND OPEN ALL PARENT NODES IF CLOSED
|
1496
|
-
this.selected.children("a").removeClass("clicked ui-state-active").addClass( this.settings.ui.theme_name == "themeroller" ? "clicked ui-state-active" : "clicked").end().parents("li.closed").each( function () { _this.open_branch(this, true); });
|
1497
|
-
|
1498
|
-
// SCROLL SELECTED NODE INTO VIEW
|
1499
|
-
var off_t = this.selected.offset().top;
|
1500
|
-
var beg_t = this.container.offset().top;
|
1501
|
-
var end_t = beg_t + this.container.height();
|
1502
|
-
var h_cor = (this.container.get(0).scrollWidth > this.container.width()) ? 40 : 20;
|
1503
|
-
if(off_t + 5 < beg_t) this.container.scrollTop(this.container.scrollTop() - (beg_t - off_t + 5) );
|
1504
|
-
if(off_t + h_cor > end_t) this.container.scrollTop(this.container.scrollTop() + (off_t + h_cor - end_t) );
|
1505
|
-
|
1506
|
-
this.set_cookie("selected");
|
1507
|
-
this.settings.callback.onselect.call(null, this.selected.get(0), _this);
|
1508
|
-
this.settings.callback.onchange.call(null, this.selected.get(0), _this);
|
1509
|
-
},
|
1510
|
-
deselect_branch : function (obj) {
|
1511
|
-
if(this.locked) return this.error("LOCKED");
|
1512
|
-
var _this = this;
|
1513
|
-
var obj = this.get_node(obj);
|
1514
|
-
obj.children("a").removeClass("clicked ui-state-active");
|
1515
|
-
this.settings.callback.ondeselect.call(null, obj.get(0), _this);
|
1516
|
-
if(this.settings.rules.multiple != false && this.selected_arr.length > 1) {
|
1517
|
-
this.selected_arr = [];
|
1518
|
-
this.container.find("a.clicked").filter(":first-child").parent().each(function () {
|
1519
|
-
_this.selected_arr.push($(this));
|
1520
|
-
});
|
1521
|
-
if(obj.get(0) == this.selected.get(0)) {
|
1522
|
-
this.selected = this.selected_arr[0];
|
1523
|
-
this.set_cookie("selected");
|
1524
|
-
}
|
1525
|
-
}
|
1526
|
-
else {
|
1527
|
-
if(this.settings.rules.multiple != false) this.selected_arr = [];
|
1528
|
-
this.selected = false;
|
1529
|
-
this.set_cookie("selected");
|
1530
|
-
}
|
1531
|
-
if(this.selected) this.settings.callback.onchange.call(null, this.selected.get(0), _this);
|
1532
|
-
else this.settings.callback.onchange.call(null, false, _this);
|
1533
|
-
},
|
1534
|
-
toggle_branch : function (obj) {
|
1535
|
-
if(this.locked) return this.error("LOCKED");
|
1536
|
-
var obj = this.get_node(obj);
|
1537
|
-
if(obj.hasClass("closed")) return this.open_branch(obj);
|
1538
|
-
if(obj.hasClass("open")) return this.close_branch(obj);
|
1539
|
-
},
|
1540
|
-
open_branch : function (obj, disable_animation, callback) {
|
1541
|
-
if(this.locked) return this.error("LOCKED");
|
1542
|
-
var obj = this.get_node(obj);
|
1543
|
-
if(!obj.size()) return this.error("OPEN: NO SUCH NODE");
|
1544
|
-
if(obj.hasClass("leaf")) return this.error("OPEN: OPENING LEAF NODE");
|
1545
|
-
|
1546
|
-
if(this.settings.data.async && obj.find("li").size() == 0) {
|
1547
|
-
if(this.settings.callback.beforeopen.call(null,obj.get(0),this) === false) return this.error("OPEN: STOPPED BY USER");
|
1548
|
-
var _this = this;
|
1549
|
-
obj.children("ul:eq(0)").remove().end().append("<ul><li class='last'><a class='loading' href='#'>" + (_this.settings.lang.loading || "Loading ...") + "</a></li></ul>");
|
1550
|
-
obj.removeClass("closed").addClass("open");
|
1551
|
-
if(this.settings.data.type == "xml_flat" || this.settings.data.type == "xml_nested") {
|
1552
|
-
var xsl = (this.settings.data.type == "xml_flat") ? "flat.xsl" : "nested.xsl";
|
1553
|
-
obj.children("ul:eq(0)").getTransform(this.path + xsl, this.settings.data.url, { params : { theme_path : _this.theme }, meth : this.settings.data.method, dat : this.settings.data.async_data(obj, this), repl : true,
|
1554
|
-
callback: function (str, json) {
|
1555
|
-
if(str.length < 15) {
|
1556
|
-
obj.removeClass("closed").removeClass("open").addClass("leaf").children("ul").remove();
|
1557
|
-
if(callback) callback.call();
|
1558
|
-
return;
|
1559
|
-
}
|
1560
|
-
_this.open_branch.apply(_this, [obj]);
|
1561
|
-
if(callback) callback.call();
|
1562
|
-
},
|
1563
|
-
error : function () { obj.removeClass("open").addClass("closed").children("ul:eq(0)").remove(); }
|
1564
|
-
});
|
1565
|
-
}
|
1566
|
-
else {
|
1567
|
-
$.ajax({
|
1568
|
-
type : this.settings.data.method,
|
1569
|
-
url : this.settings.data.url,
|
1570
|
-
data : this.settings.data.async_data(obj, this),
|
1571
|
-
dataType : "json",
|
1572
|
-
success : function (data, textStatus) {
|
1573
|
-
data = _this.settings.callback.onJSONdata.call(null, data, _this);
|
1574
|
-
if(!data || data.length == 0) {
|
1575
|
-
obj.removeClass("closed").removeClass("open").addClass("leaf").children("ul").remove();
|
1576
|
-
if(callback) callback.call();
|
1577
|
-
return;
|
1578
|
-
}
|
1579
|
-
var str = "";
|
1580
|
-
if(data.length) {
|
1581
|
-
for(var i = 0; i < data.length; i++) {
|
1582
|
-
str += _this.parseJSON(data[i]);
|
1583
|
-
}
|
1584
|
-
}
|
1585
|
-
else str = _this.parseJSON(data);
|
1586
|
-
if(str.length > 0) {
|
1587
|
-
obj.children("ul:eq(0)").replaceWith("<ul>" + str + "</ul>");
|
1588
|
-
obj.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");
|
1589
|
-
obj.find("li").not(".open").not(".closed").addClass("leaf");
|
1590
|
-
_this.open_branch.apply(_this, [obj]);
|
1591
|
-
}
|
1592
|
-
else obj.removeClass("closed").removeClass("open").addClass("leaf").children("ul").remove();
|
1593
|
-
if(callback) callback.call();
|
1594
|
-
},
|
1595
|
-
error : function (xhttp, textStatus, errorThrown) { obj.removeClass("open").addClass("closed").children("ul:eq(0)").remove(); _this.error(errorThrown + " " + textStatus); }
|
1596
|
-
});
|
1597
|
-
}
|
1598
|
-
return true;
|
1599
|
-
}
|
1600
|
-
else {
|
1601
|
-
if(!this.settings.data.async) {
|
1602
|
-
if(this.settings.callback.beforeopen.call(null,obj.get(0),this) === false) return this.error("OPEN: STOPPED BY USER");
|
1603
|
-
}
|
1604
|
-
if(this.settings.ui.theme_name == "themeroller") obj.find("a").not(".ui-state-default").addClass("ui-state-default");
|
1605
|
-
if(parseInt(this.settings.ui.animation) > 0 && !disable_animation ) {
|
1606
|
-
obj.children("ul:eq(0)").css("display","none");
|
1607
|
-
obj.removeClass("closed").addClass("open");
|
1608
|
-
obj.children("ul:eq(0)").slideDown(parseInt(this.settings.ui.animation), function() {
|
1609
|
-
$(this).css("display","");
|
1610
|
-
if(callback) callback.call();
|
1611
|
-
});
|
1612
|
-
} else {
|
1613
|
-
obj.removeClass("closed").addClass("open");
|
1614
|
-
if(callback) callback.call();
|
1615
|
-
}
|
1616
|
-
this.set_cookie("open");
|
1617
|
-
this.settings.callback.onopen.call(null, obj.get(0), this);
|
1618
|
-
return true;
|
1619
|
-
}
|
1620
|
-
},
|
1621
|
-
close_branch : function (obj, disable_animation) {
|
1622
|
-
if(this.locked) return this.error("LOCKED");
|
1623
|
-
var _this = this;
|
1624
|
-
var obj = this.get_node(obj);
|
1625
|
-
if(!obj.size()) return this.error("CLOSE: NO SUCH NODE");
|
1626
|
-
if(_this.settings.callback.beforeclose.call(null,obj.get(0),_this) === false) return this.error("CLOSE: STOPPED BY USER");
|
1627
|
-
if(parseInt(this.settings.ui.animation) > 0 && !disable_animation && obj.children("ul:eq(0)").size() == 1) {
|
1628
|
-
obj.children("ul:eq(0)").slideUp(parseInt(this.settings.ui.animation), function() {
|
1629
|
-
if(obj.hasClass("open")) obj.removeClass("open").addClass("closed");
|
1630
|
-
_this.set_cookie("open");
|
1631
|
-
$(this).css("display","");
|
1632
|
-
});
|
1633
|
-
}
|
1634
|
-
else {
|
1635
|
-
if(obj.hasClass("open")) obj.removeClass("open").addClass("closed");
|
1636
|
-
this.set_cookie("open");
|
1637
|
-
}
|
1638
|
-
if(this.selected && obj.children("ul:eq(0)").find("a.clicked").size() > 0) {
|
1639
|
-
obj.find("li:has(a.clicked)").each(function() {
|
1640
|
-
_this.deselect_branch(this);
|
1641
|
-
});
|
1642
|
-
if(obj.children("a.clicked").size() == 0) this.select_branch(obj, (this.settings.rules.multiple != false && this.selected_arr.length > 0) );
|
1643
|
-
}
|
1644
|
-
this.settings.callback.onclose.call(null, obj.get(0), this);
|
1645
|
-
},
|
1646
|
-
open_all : function (obj, callback) {
|
1647
|
-
if(this.locked) return this.error("LOCKED");
|
1648
|
-
var _this = this;
|
1649
|
-
obj = obj ? this.get_node(obj).parent() : this.container;
|
1650
|
-
|
1651
|
-
var s = obj.find("li.closed").size();
|
1652
|
-
if(!callback) this.cl_count = 0;
|
1653
|
-
else this.cl_count --;
|
1654
|
-
if(s > 0) {
|
1655
|
-
this.cl_count += s;
|
1656
|
-
obj.find("li.closed").each( function () { var __this = this; _this.open_branch.apply(_this, [this, true, function() { _this.open_all.apply(_this, [__this, true]); } ]); });
|
1657
|
-
}
|
1658
|
-
else if(this.cl_count == 0) this.settings.callback.onopen_all.call(null,this);
|
1659
|
-
},
|
1660
|
-
close_all : function () {
|
1661
|
-
if(this.locked) return this.error("LOCKED");
|
1662
|
-
var _this = this;
|
1663
|
-
this.container.find("li.open").each( function () { _this.close_branch(this, true); });
|
1664
|
-
},
|
1665
|
-
show_lang : function (i) {
|
1666
|
-
if(this.locked) return this.error("LOCKED");
|
1667
|
-
if(this.settings.languages[i] == this.current_lang) return true;
|
1668
|
-
var st = false;
|
1669
|
-
var id = this.container.attr("id") ? "#" + this.container.attr("id") : ".tree";
|
1670
|
-
st = get_css(id + " ." + this.current_lang, this.sn);
|
1671
|
-
if(st !== false) st.style.display = "none";
|
1672
|
-
st = get_css(id + " ." + this.settings.languages[i], this.sn);
|
1673
|
-
if(st !== false) st.style.display = "";
|
1674
|
-
this.current_lang = this.settings.languages[i];
|
1675
|
-
return true;
|
1676
|
-
},
|
1677
|
-
cycle_lang : function() {
|
1678
|
-
if(this.locked) return this.error("LOCKED");
|
1679
|
-
var i = $.inArray(this.current_lang, this.settings.languages);
|
1680
|
-
i ++;
|
1681
|
-
if(i > this.settings.languages.length - 1) i = 0;
|
1682
|
-
this.show_lang(i);
|
1683
|
-
},
|
1684
|
-
create : function (obj, ref_node, position) {
|
1685
|
-
if(this.locked) return this.error("LOCKED");
|
1686
|
-
|
1687
|
-
var root = false;
|
1688
|
-
if(ref_node == -1) { root = true; ref_node = this.container; }
|
1689
|
-
else ref_node = ref_node ? this.get_node(ref_node) : this.selected;
|
1690
|
-
|
1691
|
-
if(!root && (!ref_node || !ref_node.size())) return this.error("CREATE: NO NODE SELECTED");
|
1692
|
-
|
1693
|
-
var pos = position;
|
1694
|
-
|
1695
|
-
var tmp = ref_node; // for type calculation
|
1696
|
-
if(position == "before") {
|
1697
|
-
position = ref_node.parent().children().index(ref_node);
|
1698
|
-
ref_node = ref_node.parents("li:eq(0)");
|
1699
|
-
}
|
1700
|
-
if(position == "after") {
|
1701
|
-
position = ref_node.parent().children().index(ref_node) + 1;
|
1702
|
-
ref_node = ref_node.parents("li:eq(0)");
|
1703
|
-
}
|
1704
|
-
if(!root && ref_node.size() == 0) { root = true; ref_node = this.container; }
|
1705
|
-
|
1706
|
-
if(!root) {
|
1707
|
-
if(!this.check("creatable", ref_node)) return this.error("CREATE: CANNOT CREATE IN NODE");
|
1708
|
-
if(ref_node.hasClass("closed")) {
|
1709
|
-
if(this.settings.data.async && ref_node.children("ul").size() == 0) {
|
1710
|
-
var _this = this;
|
1711
|
-
return this.open_branch(ref_node, true, function () { _this.create.apply(_this, [obj, ref_node, position]); } );
|
1712
|
-
}
|
1713
|
-
else this.open_branch(ref_node, true);
|
1714
|
-
}
|
1715
|
-
}
|
1716
|
-
|
1717
|
-
// creating new object to pass to parseJSON
|
1718
|
-
var torename = false;
|
1719
|
-
if(!obj) obj = {};
|
1720
|
-
else obj = $.extend(true, {}, obj);
|
1721
|
-
if(!obj.attributes) obj.attributes = {};
|
1722
|
-
if(this.settings.rules.metadata) {
|
1723
|
-
if(!obj.attributes[this.settings.rules.metadata]) obj.attributes[this.settings.rules.metadata] = '{ "type" : "' + (this.get_type(tmp) || "") + '" }';
|
1724
|
-
}
|
1725
|
-
else {
|
1726
|
-
if(!obj.attributes[this.settings.rules.type_attr]) obj.attributes[this.settings.rules.type_attr] = this.get_type(tmp) || "";
|
1727
|
-
}
|
1728
|
-
if(this.settings.languages.length) {
|
1729
|
-
if(!obj.data) { obj.data = {}; torename = true; }
|
1730
|
-
for(var i = 0; i < this.settings.languages.length; i++) {
|
1731
|
-
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;
|
1732
|
-
}
|
1733
|
-
}
|
1734
|
-
else {
|
1735
|
-
if(!obj.data) { obj.data = this.settings.lang.new_node; torename = true; }
|
1736
|
-
}
|
1737
|
-
|
1738
|
-
var $li = $(this.parseJSON(obj));
|
1739
|
-
if($li.children("ul").size()) {
|
1740
|
-
if(!$li.is(".open")) $li.addClass("closed");
|
1741
|
-
}
|
1742
|
-
else $li.addClass("leaf");
|
1743
|
-
$li.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");
|
1744
|
-
$li.find("li").not(".open").not(".closed").addClass("leaf");
|
1745
|
-
|
1746
|
-
if(!root && this.settings.rules.use_inline && this.settings.rules.metadata) {
|
1747
|
-
var t = this.get_type($li) || "";
|
1748
|
-
$.metadata.setType("attr", this.settings.rules.metadata);
|
1749
|
-
if(typeof ref_node.metadata()["valid_children"] != "undefined") {
|
1750
|
-
if($.inArray(t, ref_node.metadata()["valid_children"]) == -1) return this.error("CREATE: NODE NOT A VALID CHILD");
|
1751
|
-
}
|
1752
|
-
if(typeof ref_node.metadata()["max_children"] != "undefined") {
|
1753
|
-
if( (ref_node.children("ul:eq(0)").children("li").size() + 1) > ref_node.metadata().max_children) return this.error("CREATE: MAX_CHILDREN REACHED");
|
1754
|
-
}
|
1755
|
-
var ok = true;
|
1756
|
-
if((typeof $(ref_node).metadata().max_depth).toLowerCase() != "undefined" && $(ref_node).metadata().max_depth === 0) ok = false;
|
1757
|
-
else {
|
1758
|
-
ref_node.parents("li").each(function(i) {
|
1759
|
-
if($(this).metadata().max_depth) {
|
1760
|
-
if( (i + 1) >= $(this).metadata().max_depth) {
|
1761
|
-
ok = false;
|
1762
|
-
return false;
|
1763
|
-
}
|
1764
|
-
}
|
1765
|
-
});
|
1766
|
-
}
|
1767
|
-
if(!ok) return this.error("CREATE: MAX_DEPTH REACHED");
|
1768
|
-
}
|
1769
|
-
|
1770
|
-
if((typeof position).toLowerCase() == "undefined" || position == "inside")
|
1771
|
-
position = (this.settings.rules.createat == "top") ? 0 : ref_node.children("ul:eq(0)").children("li").size();
|
1772
|
-
if(ref_node.children("ul").size() == 0 || (root == true && ref_node.children("ul").children("li").size() == 0) ) {
|
1773
|
-
if(!root) var a = this.moved($li,ref_node.children("a:eq(0)"),"inside", true);
|
1774
|
-
else var a = this.moved($li,this.container.children("ul:eq(0)"),"inside", true);
|
1775
|
-
}
|
1776
|
-
else if(pos == "before" && ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
1777
|
-
var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", true);
|
1778
|
-
else if(pos == "after" && ref_node.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").size())
|
1779
|
-
var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after", true);
|
1780
|
-
else if(ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
1781
|
-
var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", true);
|
1782
|
-
else
|
1783
|
-
var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after",true);
|
1784
|
-
|
1785
|
-
if(a === false) return this.error("CREATE: ABORTED");
|
1786
|
-
|
1787
|
-
if(torename) {
|
1788
|
-
this.select_branch($li.children("a:eq(0)"));
|
1789
|
-
this.rename();
|
1790
|
-
}
|
1791
|
-
return $li;
|
1792
|
-
},
|
1793
|
-
rename : function (obj) {
|
1794
|
-
if(this.locked) return this.error("LOCKED");
|
1795
|
-
obj = obj ? this.get_node(obj) : this.selected;
|
1796
|
-
var _this = this;
|
1797
|
-
if(!obj || !obj.size()) return this.error("RENAME: NO NODE SELECTED");
|
1798
|
-
if(!this.check("renameable", obj)) return this.error("RENAME: NODE NOT RENAMABLE");
|
1799
|
-
if(!this.settings.callback.beforerename.call(null,obj.get(0), _this.current_lang, _this)) return this.error("RENAME: STOPPED BY USER");
|
1800
|
-
|
1801
|
-
obj.parents("li.closed").each(function () { _this.open_branch(this) });
|
1802
|
-
if(this.current_lang) obj = obj.find("a." + this.current_lang).get(0);
|
1803
|
-
else obj = obj.find("a:first").get(0);
|
1804
|
-
last_value = obj.innerHTML;
|
1805
|
-
_this.inp = $("<input type='text' autocomplete='off' />");
|
1806
|
-
_this.inp
|
1807
|
-
.val(last_value.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<"))
|
1808
|
-
.bind("mousedown", function (event) { event.stopPropagation(); })
|
1809
|
-
.bind("mouseup", function (event) { event.stopPropagation(); })
|
1810
|
-
.bind("click", function (event) { event.stopPropagation(); })
|
1811
|
-
.bind("keyup", function (event) {
|
1812
|
-
var key = event.keyCode || event.which;
|
1813
|
-
if(key == 27) { this.value = last_value; this.blur(); return }
|
1814
|
-
if(key == 13) { this.blur(); return }
|
1815
|
-
});
|
1816
|
-
|
1817
|
-
// Rollback
|
1818
|
-
var rb = {};
|
1819
|
-
rb[this.container.attr("id")] = this.get_rollback();
|
1820
|
-
|
1821
|
-
_this.inp.blur(function(event) {
|
1822
|
-
if(this.value == "") this.value = last_value;
|
1823
|
-
$(obj).text( $(obj).parent().find("input").eq(0).attr("value") ).get(0).style.display = "";
|
1824
|
-
$(obj).prevAll("span").remove();
|
1825
|
-
_this.settings.callback.onrename.call(null, _this.get_node(obj).get(0), _this.current_lang, _this, rb);
|
1826
|
-
_this.inp = false;
|
1827
|
-
});
|
1828
|
-
var spn = $("<span />").addClass(obj.className).append(_this.inp);
|
1829
|
-
spn.attr("style", $(obj).attr("style"));
|
1830
|
-
obj.style.display = "none";
|
1831
|
-
$(obj).parent().prepend(spn);
|
1832
|
-
_this.inp.get(0).focus();
|
1833
|
-
_this.inp.get(0).select();
|
1834
|
-
},
|
1835
|
-
// REMOVE NODES
|
1836
|
-
remove : function(obj) {
|
1837
|
-
if(this.locked) return this.error("LOCKED");
|
1838
|
-
|
1839
|
-
// Rollback
|
1840
|
-
var rb = {};
|
1841
|
-
rb[this.container.attr("id")] = this.get_rollback();
|
1842
|
-
|
1843
|
-
if(obj && (!this.selected || this.get_node(obj).get(0) != this.selected.get(0) )) {
|
1844
|
-
obj = this.get_node(obj);
|
1845
|
-
if(obj.size()) {
|
1846
|
-
if(!this.check("deletable", obj)) return this.error("DELETE: NODE NOT DELETABLE");
|
1847
|
-
if(!this.settings.callback.beforedelete.call(null,obj.get(0), _this)) return this.error("DELETE: STOPPED BY USER");
|
1848
|
-
$parent = obj.parent();
|
1849
|
-
obj = obj.remove();
|
1850
|
-
$parent.children("li:last").addClass("last");
|
1851
|
-
if($parent.children("li").size() == 0) {
|
1852
|
-
$li = $parent.parents("li:eq(0)");
|
1853
|
-
$li.removeClass("open").removeClass("closed").addClass("leaf").children("ul").remove();
|
1854
|
-
this.set_cookie("open");
|
1855
|
-
}
|
1856
|
-
this.settings.callback.ondelete.call(null, obj.get(0), this, rb);
|
1857
|
-
}
|
1858
|
-
}
|
1859
|
-
else if(this.selected) {
|
1860
|
-
if(!this.check("deletable", this.selected)) return this.error("DELETE: NODE NOT DELETABLE");
|
1861
|
-
if(!this.settings.callback.beforedelete.call(null,this.selected.get(0), _this)) return this.error("DELETE: STOPPED BY USER");
|
1862
|
-
$parent = this.selected.parent();
|
1863
|
-
var obj = this.selected;
|
1864
|
-
if(this.settings.rules.multiple == false || this.selected_arr.length == 1) {
|
1865
|
-
var stop = true;
|
1866
|
-
var tmp = (this.selected.prev("li:eq(0)").size()) ? this.selected.prev("li:eq(0)") : this.selected.parents("li:eq(0)");
|
1867
|
-
// this.get_prev(true);
|
1868
|
-
}
|
1869
|
-
obj = obj.remove();
|
1870
|
-
$parent.children("li:last").addClass("last");
|
1871
|
-
if($parent.children("li").size() == 0) {
|
1872
|
-
$li = $parent.parents("li:eq(0)");
|
1873
|
-
$li.removeClass("open").removeClass("closed").addClass("leaf").children("ul").remove();
|
1874
|
-
this.set_cookie("open");
|
1875
|
-
}
|
1876
|
-
//this.selected = false;
|
1877
|
-
this.settings.callback.ondelete.call(null, obj.get(0), this, rb);
|
1878
|
-
if(stop && tmp) this.select_branch(tmp);
|
1879
|
-
if(this.settings.rules.multiple != false && !stop) {
|
1880
|
-
var _this = this;
|
1881
|
-
this.selected_arr = [];
|
1882
|
-
this.container.find("a.clicked").filter(":first-child").parent().each(function () {
|
1883
|
-
_this.selected_arr.push($(this));
|
1884
|
-
});
|
1885
|
-
if(this.selected_arr.length > 0) {
|
1886
|
-
this.selected = this.selected_arr[0];
|
1887
|
-
this.remove();
|
1888
|
-
}
|
1889
|
-
}
|
1890
|
-
}
|
1891
|
-
else return this.error("DELETE: NO NODE SELECTED");
|
1892
|
-
},
|
1893
|
-
|
1894
|
-
next : function (obj, strict) {
|
1895
|
-
obj = this.get_node(obj);
|
1896
|
-
if(!obj.size()) return false;
|
1897
|
-
if(strict) return (obj.nextAll("li").size() > 0) ? obj.nextAll("li:eq(0)") : false;
|
1898
|
-
|
1899
|
-
if(obj.hasClass("open")) return obj.find("li:eq(0)");
|
1900
|
-
else if(obj.nextAll("li").size() > 0) return obj.nextAll("li:eq(0)");
|
1901
|
-
else return obj.parents("li").next("li").eq(0);
|
1902
|
-
},
|
1903
|
-
prev : function(obj, strict) {
|
1904
|
-
obj = this.get_node(obj);
|
1905
|
-
if(!obj.size()) return false;
|
1906
|
-
if(strict) return (obj.prevAll("li").size() > 0) ? obj.prevAll("li:eq(0)") : false;
|
1907
|
-
|
1908
|
-
if(obj.prev("li").size()) {
|
1909
|
-
var obj = obj.prev("li").eq(0);
|
1910
|
-
while(obj.hasClass("open")) obj = obj.children("ul:eq(0)").children("li:last");
|
1911
|
-
return obj;
|
1912
|
-
}
|
1913
|
-
else return obj.parents("li:eq(0)").size() ? obj.parents("li:eq(0)") : false;
|
1914
|
-
},
|
1915
|
-
parent : function(obj) {
|
1916
|
-
obj = this.get_node(obj);
|
1917
|
-
if(!obj.size()) return false;
|
1918
|
-
return obj.parents("li:eq(0)").size() ? obj.parents("li:eq(0)") : false;
|
1919
|
-
},
|
1920
|
-
children : function(obj) {
|
1921
|
-
obj = this.get_node(obj);
|
1922
|
-
if(!obj.size()) return false;
|
1923
|
-
return obj.children("ul:eq(0)").children("li");
|
1924
|
-
},
|
1925
|
-
|
1926
|
-
// FOR EXPLORER-LIKE KEYBOARD SHORTCUTS
|
1927
|
-
get_next : function(force) {
|
1928
|
-
var obj = this.hovered || this.selected;
|
1929
|
-
return force ? this.select_branch(this.next(obj)) : this.hover_branch(this.next(obj));
|
1930
|
-
},
|
1931
|
-
get_prev : function(force) {
|
1932
|
-
var obj = this.hovered || this.selected;
|
1933
|
-
return force ? this.select_branch(this.prev(obj)) : this.hover_branch(this.prev(obj));
|
1934
|
-
},
|
1935
|
-
get_left : function(force, rtl) {
|
1936
|
-
if(this.settings.ui.rtl && !rtl) return this.get_right(force, true);
|
1937
|
-
var obj = this.hovered || this.selected;
|
1938
|
-
if(obj) {
|
1939
|
-
if(obj.hasClass("open")) this.close_branch(obj);
|
1940
|
-
else {
|
1941
|
-
return force ? this.select_branch(this.parent(obj)) : this.hover_branch(this.parent(obj));
|
1942
|
-
}
|
1943
|
-
}
|
1944
|
-
},
|
1945
|
-
get_right : function(force, rtl) {
|
1946
|
-
if(this.settings.ui.rtl && !rtl) return this.get_left(force, true);
|
1947
|
-
var obj = this.hovered || this.selected;
|
1948
|
-
if(obj) {
|
1949
|
-
if(obj.hasClass("closed")) this.open_branch(obj);
|
1950
|
-
else {
|
1951
|
-
return force ? this.select_branch(obj.find("li:eq(0)")) : this.hover_branch(obj.find("li:eq(0)"));
|
1952
|
-
}
|
1953
|
-
}
|
1954
|
-
},
|
1955
|
-
toggleDots : function () {
|
1956
|
-
if(this.settings.ui.dots) {
|
1957
|
-
this.settings.ui.dots = false;
|
1958
|
-
this.container.children("ul:eq(0)").addClass("no_dots");
|
1959
|
-
}
|
1960
|
-
else {
|
1961
|
-
this.settings.ui.dots = true;
|
1962
|
-
this.container.children("ul:eq(0)").removeClass("no_dots");
|
1963
|
-
}
|
1964
|
-
},
|
1965
|
-
toggleRTL : function () {
|
1966
|
-
if(this.settings.ui.rtl) {
|
1967
|
-
this.settings.ui.rtl = false;
|
1968
|
-
this.container.css("direction","ltr").children("ul:eq(0)").removeClass("rtl").addClass("ltr");
|
1969
|
-
}
|
1970
|
-
else {
|
1971
|
-
this.settings.ui.rtl = true;
|
1972
|
-
this.container.css("direction","rtl").children("ul:eq(0)").removeClass("ltr").addClass("rtl");
|
1973
|
-
}
|
1974
|
-
},
|
1975
|
-
set_cookie : function (type) {
|
1976
|
-
if(this.settings.cookies === false) return false;
|
1977
|
-
if(this.settings.cookies[type] === false) return false;
|
1978
|
-
switch(type) {
|
1979
|
-
case "selected":
|
1980
|
-
if(this.settings.rules.multiple != false && this.selected_arr.length > 1) {
|
1981
|
-
var val = Array();
|
1982
|
-
$.each(this.selected_arr, function () {
|
1983
|
-
if(this.attr("id")) { val.push(this.attr("id")); }
|
1984
|
-
});
|
1985
|
-
val = val.join(",");
|
1986
|
-
}
|
1987
|
-
else var val = this.selected ? this.selected.attr("id") : false;
|
1988
|
-
$.cookie(this.settings.cookies.prefix + '_selected',val,this.settings.cookies.opts);
|
1989
|
-
break;
|
1990
|
-
case "open":
|
1991
|
-
var str = "";
|
1992
|
-
this.container.find("li.open").each(function (i) { if(this.id) { str += this.id + ","; } });
|
1993
|
-
$.cookie(this.settings.cookies.prefix + '_open',str.replace(/,$/ig,""),this.settings.cookies.opts);
|
1994
|
-
break;
|
1995
|
-
}
|
1996
|
-
},
|
1997
|
-
get_rollback : function () {
|
1998
|
-
var rb = {};
|
1999
|
-
if(this.context.to_remove && this.context.apply_to) this.context.apply_to.children("a").removeClass("clicked");
|
2000
|
-
rb.html = this.container.html();
|
2001
|
-
if(this.context.to_remove && this.context.apply_to) this.context.apply_to.children("a").addClass("clicked");
|
2002
|
-
rb.selected = this.selected ? this.selected.attr("id") : false;
|
2003
|
-
return rb;
|
2004
|
-
},
|
2005
|
-
moved : function (what, where, how, is_new, is_copy, rb) {
|
2006
|
-
var what = $(what);
|
2007
|
-
var $parent = $(what).parents("ul:eq(0)");
|
2008
|
-
var $where = $(where);
|
2009
|
-
|
2010
|
-
// Rollback
|
2011
|
-
if(!rb) {
|
2012
|
-
var rb = {};
|
2013
|
-
rb[this.container.attr("id")] = this.get_rollback();
|
2014
|
-
if(!is_new) {
|
2015
|
-
var tmp = what.size() > 1 ? what.eq(0).parents(".tree:eq(0)") : what.parents(".tree:eq(0)");
|
2016
|
-
if(tmp.get(0) != this.container.get(0)) {
|
2017
|
-
tmp = tree_component.inst[tmp.attr("id")];
|
2018
|
-
rb[tmp.container.attr("id")] = tmp.get_rollback();
|
2019
|
-
}
|
2020
|
-
delete tmp;
|
2021
|
-
}
|
2022
|
-
}
|
2023
|
-
|
2024
|
-
if(how == "inside" && this.settings.data.async && this.get_node($where).hasClass("closed")) {
|
2025
|
-
var _this = this;
|
2026
|
-
return this.open_branch(this.get_node($where), true, function () { _this.moved.apply(_this, [what, where, how, is_new, is_copy, rb]); });
|
2027
|
-
}
|
2028
|
-
|
2029
|
-
// IF MULTIPLE
|
2030
|
-
if(what.size() > 1) {
|
2031
|
-
var _this = this;
|
2032
|
-
var tmp = this.moved(what.eq(0), where, how, false, is_copy, rb);
|
2033
|
-
what.each(function (i) {
|
2034
|
-
if(i == 0) return;
|
2035
|
-
if(tmp) { // if tmp is false - the previous move was a no-go
|
2036
|
-
tmp = _this.moved(this, tmp.children("a:eq(0)"), "after", false, is_copy, rb);
|
2037
|
-
}
|
2038
|
-
});
|
2039
|
-
return;
|
2040
|
-
}
|
2041
|
-
|
2042
|
-
if(is_copy) {
|
2043
|
-
_what = what.clone();
|
2044
|
-
_what.each(function (i) {
|
2045
|
-
this.id = this.id + "_copy";
|
2046
|
-
$(this).find("li").each(function () {
|
2047
|
-
this.id = this.id + "_copy";
|
2048
|
-
});
|
2049
|
-
$(this).removeClass("dragged").find("a.clicked").removeClass("clicked ui-state-active").end().find("li.dragged").removeClass("dragged");
|
2050
|
-
});
|
2051
|
-
}
|
2052
|
-
else _what = what;
|
2053
|
-
if(is_new) {
|
2054
|
-
if(!this.settings.callback.beforecreate.call(null,this.get_node(what).get(0), this.get_node(where).get(0),how,this)) return false;
|
2055
|
-
}
|
2056
|
-
else {
|
2057
|
-
if(!this.settings.callback.beforemove.call(null,this.get_node(what).get(0), this.get_node(where).get(0),how,this)) return false;
|
2058
|
-
}
|
2059
|
-
|
2060
|
-
if(!is_new) {
|
2061
|
-
var tmp = what.parents(".tree:eq(0)");
|
2062
|
-
// if different trees
|
2063
|
-
if(tmp.get(0) != this.container.get(0)) {
|
2064
|
-
tmp = tree_component.inst[tmp.attr("id")];
|
2065
|
-
|
2066
|
-
// if there are languages - otherwise - no cleanup needed
|
2067
|
-
if(tmp.settings.languages.length) {
|
2068
|
-
var res = [];
|
2069
|
-
// if new tree has no languages - use current visible
|
2070
|
-
if(this.settings.languages.length == 0) res.push("." + tmp.current_lang);
|
2071
|
-
else {
|
2072
|
-
for(var i in this.settings.languages) {
|
2073
|
-
if(typeof this.settings.languages[i] == "function") continue;
|
2074
|
-
for(var j in tmp.settings.languages) {
|
2075
|
-
if(typeof tmp.settings.languages[j] == "function") continue;
|
2076
|
-
if(this.settings.languages[i] == tmp.settings.languages[j]) res.push("." + this.settings.languages[i]);
|
2077
|
-
}
|
2078
|
-
}
|
2079
|
-
}
|
2080
|
-
if(res.length == 0) return this.error("MOVE: NO COMMON LANGUAGES");
|
2081
|
-
what.find("a").not(res.join(",")).remove();
|
2082
|
-
}
|
2083
|
-
what.find("a.clicked").removeClass("clicked ui-state-active");
|
2084
|
-
}
|
2085
|
-
}
|
2086
|
-
what = _what;
|
2087
|
-
|
2088
|
-
// ADD NODE TO NEW PLACE
|
2089
|
-
switch(how) {
|
2090
|
-
case "before":
|
2091
|
-
$where.parents("ul:eq(0)").children("li.last").removeClass("last");
|
2092
|
-
$where.parent().before(what.removeClass("last"));
|
2093
|
-
$where.parents("ul:eq(0)").children("li:last").addClass("last");
|
2094
|
-
break;
|
2095
|
-
case "after":
|
2096
|
-
$where.parents("ul:eq(0)").children("li.last").removeClass("last");
|
2097
|
-
$where.parent().after(what.removeClass("last"));
|
2098
|
-
$where.parents("ul:eq(0)").children("li:last").addClass("last");
|
2099
|
-
break;
|
2100
|
-
case "inside":
|
2101
|
-
if($where.parent().children("ul:first").size()) {
|
2102
|
-
if(this.settings.rules.createat == "top") $where.parent().children("ul:first").prepend(what.removeClass("last")).children("li:last").addClass("last");
|
2103
|
-
else $where.parent().children("ul:first").children(".last").removeClass("last").end().append(what.removeClass("last")).children("li:last").addClass("last");
|
2104
|
-
}
|
2105
|
-
else {
|
2106
|
-
what.addClass("last");
|
2107
|
-
$where.parent().append("<ul/>").removeClass("leaf").addClass("closed");
|
2108
|
-
$where.parent().children("ul:first").prepend(what);
|
2109
|
-
}
|
2110
|
-
if($where.parent().hasClass("closed")) { this.open_branch($where); }
|
2111
|
-
break;
|
2112
|
-
default:
|
2113
|
-
break;
|
2114
|
-
}
|
2115
|
-
// CLEANUP OLD PARENT
|
2116
|
-
if($parent.find("li").size() == 0) {
|
2117
|
-
var $li = $parent.parent();
|
2118
|
-
$li.removeClass("open").removeClass("closed").addClass("leaf");
|
2119
|
-
if(!$li.is(".tree")) $li.children("ul").remove();
|
2120
|
-
$li.parents("ul:eq(0)").children("li.last").removeClass("last").end().children("li:last").addClass("last");
|
2121
|
-
this.set_cookie("open");
|
2122
|
-
}
|
2123
|
-
else {
|
2124
|
-
$parent.children("li.last").removeClass("last");
|
2125
|
-
$parent.children("li:last").addClass("last");
|
2126
|
-
}
|
2127
|
-
|
2128
|
-
// NO LONGER CORRECT WITH position PARAM - if(is_new && how != "inside") where = this.get_node(where).parents("li:eq(0)");
|
2129
|
-
if(is_copy) this.settings.callback.oncopy.call(null, this.get_node(what).get(0), this.get_node(where).get(0), how, this, rb);
|
2130
|
-
else if(is_new) this.settings.callback.oncreate.call(null, this.get_node(what).get(0), ($where.is("ul") ? -1 : this.get_node(where).get(0) ), how, this, rb);
|
2131
|
-
else this.settings.callback.onmove.call(null, this.get_node(what).get(0), this.get_node(where).get(0), how, this, rb);
|
2132
|
-
return what;
|
2133
|
-
},
|
2134
|
-
error : function (code) {
|
2135
|
-
this.settings.callback.error.call(null,code,this);
|
2136
|
-
return false;
|
2137
|
-
},
|
2138
|
-
lock : function (state) {
|
2139
|
-
this.locked = state;
|
2140
|
-
if(this.locked) this.container.children("ul:eq(0)").addClass("locked");
|
2141
|
-
else this.container.children("ul:eq(0)").removeClass("locked");
|
2142
|
-
},
|
2143
|
-
cut : function (obj) {
|
2144
|
-
if(this.locked) return this.error("LOCKED");
|
2145
|
-
obj = obj ? this.get_node(obj) : this.container.find("a.clicked").filter(":first-child").parent();
|
2146
|
-
if(!obj || !obj.size()) return this.error("CUT: NO NODE SELECTED");
|
2147
|
-
this.copy_nodes = false;
|
2148
|
-
this.cut_nodes = obj;
|
2149
|
-
},
|
2150
|
-
copy : function (obj) {
|
2151
|
-
if(this.locked) return this.error("LOCKED");
|
2152
|
-
obj = obj ? this.get_node(obj) : this.container.find("a.clicked").filter(":first-child").parent();
|
2153
|
-
if(!obj || !obj.size()) return this.error("COPY: NO NODE SELECTED");
|
2154
|
-
this.copy_nodes = obj;
|
2155
|
-
this.cut_nodes = false;
|
2156
|
-
},
|
2157
|
-
paste : function (obj, position) {
|
2158
|
-
if(this.locked) return this.error("LOCKED");
|
2159
|
-
|
2160
|
-
var root = false;
|
2161
|
-
if(obj == -1) { root = true; obj = this.container; }
|
2162
|
-
else obj = obj ? this.get_node(obj) : this.selected;
|
2163
|
-
|
2164
|
-
if(!root && (!obj || !obj.size())) return this.error("PASTE: NO NODE SELECTED");
|
2165
|
-
if(!this.copy_nodes && !this.cut_nodes) return this.error("PASTE: NOTHING TO DO");
|
2166
|
-
|
2167
|
-
var _this = this;
|
2168
|
-
|
2169
|
-
var pos = position;
|
2170
|
-
|
2171
|
-
if(position == "before") {
|
2172
|
-
position = obj.parent().children().index(obj);
|
2173
|
-
obj = obj.parents("li:eq(0)");
|
2174
|
-
}
|
2175
|
-
else if(position == "after") {
|
2176
|
-
position = obj.parent().children().index(obj) + 1;
|
2177
|
-
obj = obj.parents("li:eq(0)");
|
2178
|
-
}
|
2179
|
-
else if((typeof position).toLowerCase() == "undefined" || position == "inside") {
|
2180
|
-
position = (this.settings.rules.createat == "top") ? 0 : obj.children("ul:eq(0)").children("li").size();
|
2181
|
-
}
|
2182
|
-
if(!root && obj.size() == 0) { root = true; obj = this.container; }
|
2183
|
-
|
2184
|
-
if(this.copy_nodes && this.copy_nodes.size()) {
|
2185
|
-
var ok = true;
|
2186
|
-
// This is copy - why forbid this?
|
2187
|
-
//obj.parents().andSelf().each(function () {
|
2188
|
-
// if(_this.copy_nodes.index(this) != -1) {
|
2189
|
-
// ok = false;
|
2190
|
-
// return false;
|
2191
|
-
// }
|
2192
|
-
//});
|
2193
|
-
if(!ok) return this.error("Invalid paste");
|
2194
|
-
if(!root && !this.checkMove(this.copy_nodes, obj.children("a:eq(0)"), "inside")) return false;
|
2195
|
-
|
2196
|
-
if(obj.children("ul").size() == 0 || (root == true && obj.children("ul").children("li").size() == 0) ) {
|
2197
|
-
if(!root) var a = this.moved(this.copy_nodes,obj.children("a:eq(0)"),"inside", false, true);
|
2198
|
-
else var a = this.moved(this.copy_nodes,this.container.children("ul:eq(0)"),"inside", false, true);
|
2199
|
-
}
|
2200
|
-
else if(pos == "before" && obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
2201
|
-
var a = this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", false, true);
|
2202
|
-
else if(pos == "after" && obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").size())
|
2203
|
-
var a = this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after", false, true);
|
2204
|
-
else if(obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
2205
|
-
var a = this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", false, true);
|
2206
|
-
else
|
2207
|
-
var a = this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after", false, true);
|
2208
|
-
this.copy_nodes = false;
|
2209
|
-
}
|
2210
|
-
if(this.cut_nodes && this.cut_nodes.size()) {
|
2211
|
-
var ok = true;
|
2212
|
-
obj.parents().andSelf().each(function () {
|
2213
|
-
if(_this.cut_nodes.index(this) != -1) {
|
2214
|
-
ok = false;
|
2215
|
-
return false;
|
2216
|
-
}
|
2217
|
-
});
|
2218
|
-
if(!ok) return this.error("Invalid paste");
|
2219
|
-
if(!root && !this.checkMove(this.cut_nodes, obj.children("a:eq(0)"), "inside")) return false;
|
2220
|
-
|
2221
|
-
if(obj.children("ul").size() == 0 || (root == true && obj.children("ul").children("li").size() == 0) ) {
|
2222
|
-
if(!root) var a = this.moved(this.cut_nodes,obj.children("a:eq(0)"),"inside");
|
2223
|
-
else var a = this.moved(this.cut_nodes,this.container.children("ul:eq(0)"),"inside");
|
2224
|
-
}
|
2225
|
-
else if(pos == "before" && obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
2226
|
-
var a = this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before");
|
2227
|
-
else if(pos == "after" && obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").size())
|
2228
|
-
var a = this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after");
|
2229
|
-
else if(obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size())
|
2230
|
-
var a = this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before");
|
2231
|
-
else
|
2232
|
-
var a = this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after");
|
2233
|
-
this.cut_nodes = false;
|
2234
|
-
}
|
2235
|
-
},
|
2236
|
-
search : function(str) {
|
2237
|
-
var _this = this;
|
2238
|
-
if(!str || (this.srch && str != this.srch) ) {
|
2239
|
-
this.srch = "";
|
2240
|
-
this.srch_opn = false;
|
2241
|
-
this.container.find("a.search").removeClass("search ui-state-highlight");
|
2242
|
-
}
|
2243
|
-
this.srch = str;
|
2244
|
-
if(!str) return;
|
2245
|
-
if(this.settings.data.async) {
|
2246
|
-
if(!this.srch_opn) {
|
2247
|
-
var dd = $.extend( { "search" : str } , this.settings.data.async_data(false, this) );
|
2248
|
-
$.ajax({
|
2249
|
-
type : this.settings.data.method,
|
2250
|
-
url : this.settings.data.url,
|
2251
|
-
data : dd,
|
2252
|
-
dataType : "text",
|
2253
|
-
success : function (data) {
|
2254
|
-
_this.srch_opn = $.unique(data.split(","));
|
2255
|
-
_this.search.apply(_this,[str]);
|
2256
|
-
}
|
2257
|
-
});
|
2258
|
-
}
|
2259
|
-
else if(this.srch_opn.length) {
|
2260
|
-
if(this.srch_opn && this.srch_opn.length) {
|
2261
|
-
var opn = false;
|
2262
|
-
for(var j = 0; j < this.srch_opn.length; j++) {
|
2263
|
-
if(this.get_node("#" + this.srch_opn[j]).size() > 0) {
|
2264
|
-
opn = true;
|
2265
|
-
var tmp = "#" + this.srch_opn[j];
|
2266
|
-
delete this.srch_opn[j];
|
2267
|
-
this.open_branch(tmp, true, function () { _this.search.apply(_this,[str]); } );
|
2268
|
-
}
|
2269
|
-
}
|
2270
|
-
if(!opn) {
|
2271
|
-
this.srch_opn = [];
|
2272
|
-
_this.search.apply(_this,[str]);
|
2273
|
-
}
|
2274
|
-
}
|
2275
|
-
}
|
2276
|
-
else {
|
2277
|
-
var selector = "a";
|
2278
|
-
// IF LANGUAGE VERSIONS
|
2279
|
-
if(this.settings.languages.length) selector += "." + this.current_lang;
|
2280
|
-
this.container.find(selector + ":contains('" + str + "')").addClass( this.settings.ui.theme_name == "themeroller" ? "search ui-state-highlight" : "search");
|
2281
|
-
this.srch_opn = false;
|
2282
|
-
}
|
2283
|
-
}
|
2284
|
-
else {
|
2285
|
-
var selector = "a";
|
2286
|
-
// IF LANGUAGE VERSIONS
|
2287
|
-
if(this.settings.languages.length) selector += "." + this.current_lang;
|
2288
|
-
this.container.find(selector + ":contains('" + str + "')").addClass( this.settings.ui.theme_name == "themeroller" ? "search ui-state-highlight" : "search").parents("li.closed").each( function () { _this.open_branch(this, true); });
|
2289
|
-
}
|
2290
|
-
},
|
2291
|
-
|
2292
|
-
destroy : function() {
|
2293
|
-
this.hide_context();
|
2294
|
-
this.container.unbind(".jstree");
|
2295
|
-
$("#" + this.container.attr("id")).die("click.jstree").die("dblclick.jstree").die("contextmenu.jstree").die("mouseover.jstree").die("mouseout.jstree").die("mousedown.jstree");
|
2296
|
-
this.container.removeClass("tree ui-widget ui-widget-content tree-default tree-" + this.settings.ui.theme_name).children("ul").removeClass("no_dots rtl ltr locked").find("li").removeClass("leaf").removeClass("open").removeClass("closed").removeClass("last").children("a").removeClass("clicked hover search ui-state-active ui-state-hover ui-state-highlight ui-state-default");
|
2297
|
-
|
2298
|
-
if(this.cntr == tree_component.focused) {
|
2299
|
-
for(var i in tree_component.inst) {
|
2300
|
-
if(i != this.cntr && i != this.container.attr("id")) {
|
2301
|
-
tree_component.inst[i].focus();
|
2302
|
-
break;
|
2303
|
-
}
|
2304
|
-
}
|
2305
|
-
}
|
2306
|
-
|
2307
|
-
tree_component.inst[this.cntr] = false;
|
2308
|
-
tree_component.inst[this.container.attr("id")] = false;
|
2309
|
-
delete tree_component.inst[this.cntr];
|
2310
|
-
delete tree_component.inst[this.container.attr("id")];
|
2311
|
-
tree_component.cntr --;
|
2312
|
-
}
|
2313
|
-
}
|
2314
|
-
};
|
2315
|
-
})(jQuery);
|