MyCommerceapi 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4055) hide show
  1. data/Gemfile +37 -0
  2. data/INSTALL +23 -0
  3. data/README.md +130 -0
  4. data/Rakefile +154 -0
  5. data/api/Gemfile +36 -0
  6. data/api/Gemfile.lock +252 -0
  7. data/api/LICENSE +26 -0
  8. data/api/README.md +16 -0
  9. data/api/Rakefile +53 -0
  10. data/api/app/controllers/admin/users_controller_decorator.rb +19 -0
  11. data/api/app/controllers/api/adjustments_controller.rb +13 -0
  12. data/api/app/controllers/api/base_controller.rb +183 -0
  13. data/api/app/controllers/api/checkout1_controller.rb +89 -0
  14. data/api/app/controllers/api/countries_controller.rb +3 -0
  15. data/api/app/controllers/api/images_controller.rb +15 -0
  16. data/api/app/controllers/api/inventory_units_controller.rb +19 -0
  17. data/api/app/controllers/api/line_items_controller.rb +37 -0
  18. data/api/app/controllers/api/mail_methods_controller.rb +10 -0
  19. data/api/app/controllers/api/option_types_controller.rb +24 -0
  20. data/api/app/controllers/api/orders_controller.rb +51 -0
  21. data/api/app/controllers/api/overview_controller.rb +132 -0
  22. data/api/app/controllers/api/payment_methods_controller.rb +24 -0
  23. data/api/app/controllers/api/payments_controller.rb +3 -0
  24. data/api/app/controllers/api/product_groups_controller.rb +14 -0
  25. data/api/app/controllers/api/products_controller.rb +14 -0
  26. data/api/app/controllers/api/promotions_controller.rb +14 -0
  27. data/api/app/controllers/api/properties_controller.rb +26 -0
  28. data/api/app/controllers/api/prototypes_controller.rb +24 -0
  29. data/api/app/controllers/api/reports_controller.rb +8 -0
  30. data/api/app/controllers/api/shipments_controller.rb +37 -0
  31. data/api/app/controllers/api/shipping_categories_controller.rb +13 -0
  32. data/api/app/controllers/api/shipping_methods_controller.rb +24 -0
  33. data/api/app/controllers/api/states_controller.rb +8 -0
  34. data/api/app/controllers/api/tax_categories_controller.rb +24 -0
  35. data/api/app/controllers/api/tax_rates_controller.rb +24 -0
  36. data/api/app/controllers/api/taxonomies_controller.rb +12 -0
  37. data/api/app/controllers/api/taxons_controller.rb +17 -0
  38. data/api/app/controllers/api/users_controller.rb +3 -0
  39. data/api/app/controllers/api/variants_controller.rb +24 -0
  40. data/api/app/controllers/api/zones_controller.rb +24 -0
  41. data/api/app/models/line_item_decorator.rb +7 -0
  42. data/api/app/models/order_decorator.rb +5 -0
  43. data/api/app/models/shipment_decorator.rb +5 -0
  44. data/api/app/models/user_decorator.rb +22 -0
  45. data/api/app/views/admin/users/_api_fields.html.erb +16 -0
  46. data/api/config/cucumber.yml +10 -0
  47. data/api/config/locales/en.yml +16 -0
  48. data/api/config/routes.rb +143 -0
  49. data/api/db/migrate/20100107141738_add_api_key_to_users.rb +9 -0
  50. data/api/features/countries.feature +16 -0
  51. data/api/features/inventory_units.feature +19 -0
  52. data/api/features/line_items.feature +19 -0
  53. data/api/features/orders.feature +18 -0
  54. data/api/features/orders_description.feature +15 -0
  55. data/api/features/products.feature +29 -0
  56. data/api/features/shipment.feature +18 -0
  57. data/api/features/states.feature +16 -0
  58. data/api/features/step_definitions/api_steps.rb +31 -0
  59. data/api/features/step_definitions/orders_steps.rb +176 -0
  60. data/api/features/support/env.rb +23 -0
  61. data/api/features/support/factories.rb +0 -0
  62. data/api/features/support/hooks.rb +0 -0
  63. data/api/features/support/paths.rb +35 -0
  64. data/api/features/users.feature +19 -0
  65. data/api/lib/spree_api.rb +16 -0
  66. data/api/lib/spree_api_hooks.rb +3 -0
  67. data/api/lib/tasks/install.rake +23 -0
  68. data/api/rfcommerce_api.gemspec +26 -0
  69. data/api/spec/controllers/api/spree_base_controller_spec.rb +53 -0
  70. data/api/spec/models/user_spec.rb +27 -0
  71. data/api/spec/spec_helper.rb +29 -0
  72. data/api/spec/test_app/Gemfile +36 -0
  73. data/api/spec/test_app/Rakefile +7 -0
  74. data/api/spec/test_app/app/controllers/application_controller.rb +3 -0
  75. data/api/spec/test_app/app/helpers/application_helper.rb +2 -0
  76. data/api/spec/test_app/app/views/layouts/application.html.erb +14 -0
  77. data/api/spec/test_app/config.ru +4 -0
  78. data/api/spec/test_app/config/application.rb +42 -0
  79. data/api/spec/test_app/config/boot.rb +6 -0
  80. data/api/spec/test_app/config/database.yml +17 -0
  81. data/api/spec/test_app/config/environment.rb +5 -0
  82. data/api/spec/test_app/config/environments/cucumber.rb +38 -0
  83. data/api/spec/test_app/config/environments/development.rb +26 -0
  84. data/api/spec/test_app/config/environments/production.rb +49 -0
  85. data/api/spec/test_app/config/environments/test.rb +35 -0
  86. data/api/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  87. data/api/spec/test_app/config/initializers/inflections.rb +10 -0
  88. data/api/spec/test_app/config/initializers/mime_types.rb +5 -0
  89. data/api/spec/test_app/config/initializers/secret_token.rb +7 -0
  90. data/api/spec/test_app/config/initializers/session_store.rb +8 -0
  91. data/api/spec/test_app/config/locales/en.yml +5 -0
  92. data/api/spec/test_app/config/routes.rb +58 -0
  93. data/api/spec/test_app/db/cucumber.sqlite3 +0 -0
  94. data/api/spec/test_app/db/default/countries.yml +1583 -0
  95. data/api/spec/test_app/db/default/roles.yml +7 -0
  96. data/api/spec/test_app/db/default/states.yml +256 -0
  97. data/api/spec/test_app/db/default/zone_members.yml +169 -0
  98. data/api/spec/test_app/db/default/zones.yml +13 -0
  99. data/api/spec/test_app/db/migrate/20090823005402_spree_zero_nine_zero.rb +442 -0
  100. data/api/spec/test_app/db/migrate/20090904192342_create_indexes_for_inventory_units.rb +12 -0
  101. data/api/spec/test_app/db/migrate/20090923100315_add_count_on_hand_to_variants_and_products.rb +36 -0
  102. data/api/spec/test_app/db/migrate/20091007134354_change_taxons_to_nested_set.rb +40 -0
  103. data/api/spec/test_app/db/migrate/20091008091614_move_to_configurable_gateways.rb +55 -0
  104. data/api/spec/test_app/db/migrate/20091012120519_product_groups_and_scopes.rb +25 -0
  105. data/api/spec/test_app/db/migrate/20091015110842_add_open_id_authentication_tables.rb +20 -0
  106. data/api/spec/test_app/db/migrate/20091015153048_add_openid_field_to_users.rb +19 -0
  107. data/api/spec/test_app/db/migrate/20091016174634_change_preference_value_type.rb +10 -0
  108. data/api/spec/test_app/db/migrate/20091017175558_create_billing_integrations.rb +16 -0
  109. data/api/spec/test_app/db/migrate/20091021133257_charge_refactoring.rb +35 -0
  110. data/api/spec/test_app/db/migrate/20091104151730_add_some_indexes.rb +21 -0
  111. data/api/spec/test_app/db/migrate/20091126190904_checkout_state_machine.rb +13 -0
  112. data/api/spec/test_app/db/migrate/20091209153045_state_for_shipments.rb +9 -0
  113. data/api/spec/test_app/db/migrate/20091209202200_make_state_events_polymorphic.rb +12 -0
  114. data/api/spec/test_app/db/migrate/20091211203813_ship_address_id_for_checkouts.rb +9 -0
  115. data/api/spec/test_app/db/migrate/20091212161118_shipping_method_id_for_checkouts.rb +9 -0
  116. data/api/spec/test_app/db/migrate/20091213222815_creditcard_last_four_digits.rb +19 -0
  117. data/api/spec/test_app/db/migrate/20091214183826_populate_legacy_shipment_state.rb +19 -0
  118. data/api/spec/test_app/db/migrate/20100105090147_add_cost_price.rb +9 -0
  119. data/api/spec/test_app/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +21 -0
  120. data/api/spec/test_app/db/migrate/20100107141738_add_api_key_to_users.rb +9 -0
  121. data/api/spec/test_app/db/migrate/20100111205525_cim_fields_for_creditcards.rb +11 -0
  122. data/api/spec/test_app/db/migrate/20100112151511_create_return_authorizations.rb +16 -0
  123. data/api/spec/test_app/db/migrate/20100113090919_add_return_authorization_to_inventory_units.rb +9 -0
  124. data/api/spec/test_app/db/migrate/20100113203104_create_trackers.rb +14 -0
  125. data/api/spec/test_app/db/migrate/20100121160010_creditcard_id_for_creditcard_txns.rb +9 -0
  126. data/api/spec/test_app/db/migrate/20100121183934_original_creditcard_txn_id_for_creditcard_txns.rb +9 -0
  127. data/api/spec/test_app/db/migrate/20100125145351_add_test_mode_to_billing_integration.rb +11 -0
  128. data/api/spec/test_app/db/migrate/20100126103714_create_products_product_groups.rb +12 -0
  129. data/api/spec/test_app/db/migrate/20100209025806_create_payment_methods.rb +20 -0
  130. data/api/spec/test_app/db/migrate/20100209144531_polymorphic_payments.rb +29 -0
  131. data/api/spec/test_app/db/migrate/20100213103131_change_payments_payment_method_to_belongs_to.rb +11 -0
  132. data/api/spec/test_app/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +16 -0
  133. data/api/spec/test_app/db/migrate/20100223170312_sti_for_transactions.rb +14 -0
  134. data/api/spec/test_app/db/migrate/20100223183812_drop_billing_integrations.rb +16 -0
  135. data/api/spec/test_app/db/migrate/20100224153127_deleted_at_for_payment_methods.rb +13 -0
  136. data/api/spec/test_app/db/migrate/20100301163454_add_adjustments_index.rb +10 -0
  137. data/api/spec/test_app/db/migrate/20100306153445_fix_by_popularity.rb +8 -0
  138. data/api/spec/test_app/db/migrate/20100317120946_add_alt_text_to_images.rb +9 -0
  139. data/api/spec/test_app/db/migrate/20100427121301_add_display_to_payment_methods.rb +9 -0
  140. data/api/spec/test_app/db/migrate/20100504142133_add_addresses_checkouts_indexes.rb +16 -0
  141. data/api/spec/test_app/db/migrate/20100506180619_add_icon_to_taxons.rb +18 -0
  142. data/api/spec/test_app/db/migrate/20100506185838_add_description_to_taxons.rb +11 -0
  143. data/api/spec/test_app/db/migrate/20100528155333_index_for_shipments_number.rb +9 -0
  144. data/api/spec/test_app/db/migrate/20100528185820_add_index_on_users_persistence_token.rb +9 -0
  145. data/api/spec/test_app/db/migrate/20100605152042_add_default_to_tax_categories.rb +9 -0
  146. data/api/spec/test_app/db/migrate/20100624110730_add_display_to_shipping_methods.rb +9 -0
  147. data/api/spec/test_app/db/migrate/20100624123336_rename_payment_method_display.rb +9 -0
  148. data/api/spec/test_app/db/migrate/20100624175547_rename_preferences_field.rb +8 -0
  149. data/api/spec/test_app/db/migrate/20100811163637_add_guest_flag.rb +13 -0
  150. data/api/spec/test_app/db/migrate/20100811205836_drop_order_token.rb +11 -0
  151. data/api/spec/test_app/db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb +11 -0
  152. data/api/spec/test_app/db/migrate/20100813023502_create_address_keys_for_order.rb +15 -0
  153. data/api/spec/test_app/db/migrate/20100813185745_payment_total_for_orders.rb +9 -0
  154. data/api/spec/test_app/db/migrate/20100816212146_shipping_method_id_for_orders.rb +9 -0
  155. data/api/spec/test_app/db/migrate/20100817152723_add_shipment_and_payment_state.rb +15 -0
  156. data/api/spec/test_app/db/migrate/20100819170125_refactor_adjustments.rb +19 -0
  157. data/api/spec/test_app/db/migrate/20100820135707_response_code_and_avs_response_for_payments.rb +11 -0
  158. data/api/spec/test_app/db/migrate/20100901171814_change_guest_flag_to_anonymous.rb +13 -0
  159. data/api/spec/test_app/db/migrate/20100903203949_email_for_orders.rb +9 -0
  160. data/api/spec/test_app/db/migrate/20100923162011_create_mail_methods.rb +12 -0
  161. data/api/spec/test_app/db/migrate/20100929151905_rename_frozen_to_locked.rb +8 -0
  162. data/api/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb +11 -0
  163. data/api/spec/test_app/db/migrate/20101026184700_create_log_entries.rb +15 -0
  164. data/api/spec/test_app/db/migrate/20101026184714_migrate_transactions_to_payment_state.rb +94 -0
  165. data/api/spec/test_app/db/migrate/20101026184746_delete_in_progress_orders.rb +18 -0
  166. data/api/spec/test_app/db/migrate/20101026184808_migrate_checkout_to_orders.rb +27 -0
  167. data/api/spec/test_app/db/migrate/20101026184833_migrate_adjustments.rb +9 -0
  168. data/api/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb +14 -0
  169. data/api/spec/test_app/db/migrate/20101026184916_prevent_nil_payment_total.rb +8 -0
  170. data/api/spec/test_app/db/migrate/20101026184932_prevent_nil_email.rb +9 -0
  171. data/api/spec/test_app/db/migrate/20101026184950_rename_columns_for_devise.rb +39 -0
  172. data/api/spec/test_app/db/migrate/20101026184959_generate_anonymous_users.rb +14 -0
  173. data/api/spec/test_app/db/migrate/20101026185022_update_order_state.rb +8 -0
  174. data/api/spec/test_app/db/migrate/20101026192225_cleanup_legacy_tables.rb +11 -0
  175. data/api/spec/test_app/db/migrate/20101028151745_remove_number_and_cvv_from_credicard.rb +9 -0
  176. data/api/spec/test_app/db/migrate/20101103212716_drop_anonymous_field_for_user.rb +8 -0
  177. data/api/spec/test_app/db/migrate/20101111133551_renamed_rma_cancelled_state.rb +10 -0
  178. data/api/spec/test_app/db/migrate/20101117031806_fix_problematic_index_names.rb +13 -0
  179. data/api/spec/test_app/db/migrate/20101214150824_convert_user_remember_field.rb +11 -0
  180. data/api/spec/test_app/db/migrate/20101217012656_create_tokenized_permissions.rb +18 -0
  181. data/api/spec/test_app/db/migrate/20101219201531_tokens_for_legacy_orders.rb +12 -0
  182. data/api/spec/test_app/db/migrate/20101223215658_add_position_to_variants.rb +9 -0
  183. data/api/spec/test_app/db/migrate/20110110130847_add_next_state_to_state_events.rb +9 -0
  184. data/api/spec/test_app/db/migrate/20110111122537_add_position_to_option_types.rb +9 -0
  185. data/api/spec/test_app/db/migrate/20110314192118_remove_trailing_slashes_in_taxon_permalinks.rb +17 -0
  186. data/api/spec/test_app/db/sample/users.rb +53 -0
  187. data/api/spec/test_app/db/schema.rb +542 -0
  188. data/api/spec/test_app/db/seeds.rb +3 -0
  189. data/api/spec/test_app/db/test.sqlite3 +0 -0
  190. data/api/spec/test_app/log/cucumber.log +1601 -0
  191. data/api/spec/test_app/log/development.log +0 -0
  192. data/api/spec/test_app/log/production.log +0 -0
  193. data/api/spec/test_app/log/server.log +0 -0
  194. data/api/spec/test_app/log/test.log +1601 -0
  195. data/api/spec/test_app/public/404.html +26 -0
  196. data/api/spec/test_app/public/422.html +26 -0
  197. data/api/spec/test_app/public/500.html +26 -0
  198. data/api/spec/test_app/public/favicon.ico +0 -0
  199. data/api/spec/test_app/public/images/add-to-cart.png +0 -0
  200. data/api/spec/test_app/public/images/admin/bg/active-tab.png +0 -0
  201. data/api/spec/test_app/public/images/admin/bg/admin_tab_back.png +0 -0
  202. data/api/spec/test_app/public/images/admin/bg/admin_tab_selected_back.png +0 -0
  203. data/api/spec/test_app/public/images/admin/bg/content-back-blue.png +0 -0
  204. data/api/spec/test_app/public/images/admin/bg/content-back-green.png +0 -0
  205. data/api/spec/test_app/public/images/admin/bg/content-back.png +0 -0
  206. data/api/spec/test_app/public/images/admin/bg/flash-error.png +0 -0
  207. data/api/spec/test_app/public/images/admin/bg/flash-notice.png +0 -0
  208. data/api/spec/test_app/public/images/admin/bg/green-stripes.gif +0 -0
  209. data/api/spec/test_app/public/images/admin/bg/green-stripes.png +0 -0
  210. data/api/spec/test_app/public/images/admin/bg/grid_header_back.png +0 -0
  211. data/api/spec/test_app/public/images/admin/bg/grid_header_back_green.png +0 -0
  212. data/api/spec/test_app/public/images/admin/bg/header-bg.png +0 -0
  213. data/api/spec/test_app/public/images/admin/bg/header.png +0 -0
  214. data/api/spec/test_app/public/images/admin/bg/header_bg.jpg +0 -0
  215. data/api/spec/test_app/public/images/admin/bg/menu-current.png +0 -0
  216. data/api/spec/test_app/public/images/admin/bg/red-stripes.gif +0 -0
  217. data/api/spec/test_app/public/images/admin/bg/red-stripes.png +0 -0
  218. data/api/spec/test_app/public/images/admin/bg/spree_50.png +0 -0
  219. data/api/spec/test_app/public/images/admin/bg/subnav-divider.png +0 -0
  220. data/api/spec/test_app/public/images/admin/bg/subnav.png +0 -0
  221. data/api/spec/test_app/public/images/admin/bg/tab-back.png +0 -0
  222. data/api/spec/test_app/public/images/admin/buttons/blue/left_01.png +0 -0
  223. data/api/spec/test_app/public/images/admin/buttons/blue/right_01.png +0 -0
  224. data/api/spec/test_app/public/images/admin/buttons/drag-handle-green.png +0 -0
  225. data/api/spec/test_app/public/images/admin/buttons/green/left_01.png +0 -0
  226. data/api/spec/test_app/public/images/admin/buttons/green/right_01.png +0 -0
  227. data/api/spec/test_app/public/images/admin/buttons/left_01.png +0 -0
  228. data/api/spec/test_app/public/images/admin/buttons/left_01_small.png +0 -0
  229. data/api/spec/test_app/public/images/admin/buttons/orange/left_03.png +0 -0
  230. data/api/spec/test_app/public/images/admin/buttons/orange/right_03.png +0 -0
  231. data/api/spec/test_app/public/images/admin/buttons/right_01.png +0 -0
  232. data/api/spec/test_app/public/images/admin/buttons/right_01_small.png +0 -0
  233. data/api/spec/test_app/public/images/admin/icons/16x16/1.png +0 -0
  234. data/api/spec/test_app/public/images/admin/icons/16x16/10.png +0 -0
  235. data/api/spec/test_app/public/images/admin/icons/16x16/2.png +0 -0
  236. data/api/spec/test_app/public/images/admin/icons/16x16/3.png +0 -0
  237. data/api/spec/test_app/public/images/admin/icons/16x16/4.png +0 -0
  238. data/api/spec/test_app/public/images/admin/icons/16x16/5.png +0 -0
  239. data/api/spec/test_app/public/images/admin/icons/16x16/6.png +0 -0
  240. data/api/spec/test_app/public/images/admin/icons/16x16/7.png +0 -0
  241. data/api/spec/test_app/public/images/admin/icons/16x16/8.png +0 -0
  242. data/api/spec/test_app/public/images/admin/icons/16x16/9.png +0 -0
  243. data/api/spec/test_app/public/images/admin/icons/32x32/1.png +0 -0
  244. data/api/spec/test_app/public/images/admin/icons/32x32/10.png +0 -0
  245. data/api/spec/test_app/public/images/admin/icons/32x32/11.png +0 -0
  246. data/api/spec/test_app/public/images/admin/icons/32x32/2.png +0 -0
  247. data/api/spec/test_app/public/images/admin/icons/32x32/3.png +0 -0
  248. data/api/spec/test_app/public/images/admin/icons/32x32/4.png +0 -0
  249. data/api/spec/test_app/public/images/admin/icons/32x32/5.png +0 -0
  250. data/api/spec/test_app/public/images/admin/icons/32x32/6.png +0 -0
  251. data/api/spec/test_app/public/images/admin/icons/32x32/7.png +0 -0
  252. data/api/spec/test_app/public/images/admin/icons/32x32/8.png +0 -0
  253. data/api/spec/test_app/public/images/admin/icons/32x32/9.png +0 -0
  254. data/api/spec/test_app/public/images/admin/icons/accept.png +0 -0
  255. data/api/spec/test_app/public/images/admin/icons/add.gif +0 -0
  256. data/api/spec/test_app/public/images/admin/icons/add.png +0 -0
  257. data/api/spec/test_app/public/images/admin/icons/arrow-down.gif +0 -0
  258. data/api/spec/test_app/public/images/admin/icons/cross.png +0 -0
  259. data/api/spec/test_app/public/images/admin/icons/delete.gif +0 -0
  260. data/api/spec/test_app/public/images/admin/icons/delete.png +0 -0
  261. data/api/spec/test_app/public/images/admin/icons/drag.gif +0 -0
  262. data/api/spec/test_app/public/images/admin/icons/edit.gif +0 -0
  263. data/api/spec/test_app/public/images/admin/icons/edit.png +0 -0
  264. data/api/spec/test_app/public/images/admin/icons/email.png +0 -0
  265. data/api/spec/test_app/public/images/admin/icons/error.png +0 -0
  266. data/api/spec/test_app/public/images/admin/icons/exclamation.png +0 -0
  267. data/api/spec/test_app/public/images/admin/icons/feed.png +0 -0
  268. data/api/spec/test_app/public/images/admin/icons/pdf.png +0 -0
  269. data/api/spec/test_app/public/images/admin/icons/reorder.gif +0 -0
  270. data/api/spec/test_app/public/images/admin/icons/search.gif +0 -0
  271. data/api/spec/test_app/public/images/admin/icons/send-email.png +0 -0
  272. data/api/spec/test_app/public/images/admin/icons/stop.png +0 -0
  273. data/api/spec/test_app/public/images/admin/icons/tick.png +0 -0
  274. data/api/spec/test_app/public/images/admin/icons/up.gif +0 -0
  275. data/api/spec/test_app/public/images/admin/icons/xls.png +0 -0
  276. data/api/spec/test_app/public/images/admin/tabs/off-left.png +0 -0
  277. data/api/spec/test_app/public/images/admin/tabs/off-right.png +0 -0
  278. data/api/spec/test_app/public/images/admin/tabs/on-left.png +0 -0
  279. data/api/spec/test_app/public/images/admin/tabs/on-right.png +0 -0
  280. data/api/spec/test_app/public/images/ajax_loader.gif +0 -0
  281. data/api/spec/test_app/public/images/amex_cid.gif +0 -0
  282. data/api/spec/test_app/public/images/bg-button-hover.png +0 -0
  283. data/api/spec/test_app/public/images/bg-button-pressed.png +0 -0
  284. data/api/spec/test_app/public/images/bg-button.gif +0 -0
  285. data/api/spec/test_app/public/images/bg-button.png +0 -0
  286. data/api/spec/test_app/public/images/blue/left_01.png +0 -0
  287. data/api/spec/test_app/public/images/blue/right_01.png +0 -0
  288. data/api/spec/test_app/public/images/body-back.png +0 -0
  289. data/api/spec/test_app/public/images/bottom_shine.png +0 -0
  290. data/api/spec/test_app/public/images/breadcrumb.gif +0 -0
  291. data/api/spec/test_app/public/images/button-dark-hover.png +0 -0
  292. data/api/spec/test_app/public/images/button-dark.png +0 -0
  293. data/api/spec/test_app/public/images/buttons/bg-button-hover.png +0 -0
  294. data/api/spec/test_app/public/images/buttons/bg-button-pressed.png +0 -0
  295. data/api/spec/test_app/public/images/buttons/bg-button.gif +0 -0
  296. data/api/spec/test_app/public/images/buttons/bg-button.png +0 -0
  297. data/api/spec/test_app/public/images/buttons/blue/left_01.png +0 -0
  298. data/api/spec/test_app/public/images/buttons/blue/right_01.png +0 -0
  299. data/api/spec/test_app/public/images/buttons/button-dark-hover.png +0 -0
  300. data/api/spec/test_app/public/images/buttons/button-dark.png +0 -0
  301. data/api/spec/test_app/public/images/buttons/drag-handle-green.png +0 -0
  302. data/api/spec/test_app/public/images/buttons/green/left_01.png +0 -0
  303. data/api/spec/test_app/public/images/buttons/green/right_01.png +0 -0
  304. data/api/spec/test_app/public/images/buttons/left_01.png +0 -0
  305. data/api/spec/test_app/public/images/buttons/left_01_small.png +0 -0
  306. data/api/spec/test_app/public/images/buttons/orange/left_03.png +0 -0
  307. data/api/spec/test_app/public/images/buttons/orange/right_03.png +0 -0
  308. data/api/spec/test_app/public/images/buttons/right_01.png +0 -0
  309. data/api/spec/test_app/public/images/buttons/right_01_small.png +0 -0
  310. data/api/spec/test_app/public/images/buttons/sxsw-ribbon-v1.png +0 -0
  311. data/api/spec/test_app/public/images/buttons/top-shine.png +0 -0
  312. data/api/spec/test_app/public/images/calendar_date_select/calendar.gif +0 -0
  313. data/api/spec/test_app/public/images/cart-empty.png +0 -0
  314. data/api/spec/test_app/public/images/cart-empty_x32.png +0 -0
  315. data/api/spec/test_app/public/images/cart-full.png +0 -0
  316. data/api/spec/test_app/public/images/cart-full_x32.png +0 -0
  317. data/api/spec/test_app/public/images/checkout.png +0 -0
  318. data/api/spec/test_app/public/images/creditcard.gif +0 -0
  319. data/api/spec/test_app/public/images/datepicker/backstripes.gif +0 -0
  320. data/api/spec/test_app/public/images/datepicker/bg_header.jpg +0 -0
  321. data/api/spec/test_app/public/images/datepicker/bullet1.gif +0 -0
  322. data/api/spec/test_app/public/images/datepicker/bullet2.gif +0 -0
  323. data/api/spec/test_app/public/images/datepicker/cal.gif +0 -0
  324. data/api/spec/test_app/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
  325. data/api/spec/test_app/public/images/discover_cid.gif +0 -0
  326. data/api/spec/test_app/public/images/drag-handle-green.png +0 -0
  327. data/api/spec/test_app/public/images/favicon.ico +0 -0
  328. data/api/spec/test_app/public/images/green/left_01.png +0 -0
  329. data/api/spec/test_app/public/images/green/right_01.png +0 -0
  330. data/api/spec/test_app/public/images/grid.png +0 -0
  331. data/api/spec/test_app/public/images/left_01.png +0 -0
  332. data/api/spec/test_app/public/images/left_01_small.png +0 -0
  333. data/api/spec/test_app/public/images/master_cid.jpg +0 -0
  334. data/api/spec/test_app/public/images/menu-current.png +0 -0
  335. data/api/spec/test_app/public/images/menu-hover.png +0 -0
  336. data/api/spec/test_app/public/images/noimage/mini.jpg +0 -0
  337. data/api/spec/test_app/public/images/noimage/product.jpg +0 -0
  338. data/api/spec/test_app/public/images/noimage/small.jpg +0 -0
  339. data/api/spec/test_app/public/images/openid-inputicon.gif +0 -0
  340. data/api/spec/test_app/public/images/orange/left_03.png +0 -0
  341. data/api/spec/test_app/public/images/orange/right_03.png +0 -0
  342. data/api/spec/test_app/public/images/progress.gif +0 -0
  343. data/api/spec/test_app/public/images/reorder.jpg +0 -0
  344. data/api/spec/test_app/public/images/right_01.png +0 -0
  345. data/api/spec/test_app/public/images/right_01_small.png +0 -0
  346. data/api/spec/test_app/public/images/separator.png +0 -0
  347. data/api/spec/test_app/public/images/shadow-top.png +0 -0
  348. data/api/spec/test_app/public/images/shadow_top.png +0 -0
  349. data/api/spec/test_app/public/images/spinner.gif +0 -0
  350. data/api/spec/test_app/public/images/spree.jpg +0 -0
  351. data/api/spec/test_app/public/images/spree/progress.gif +0 -0
  352. data/api/spec/test_app/public/images/spree/spinner.gif +0 -0
  353. data/api/spec/test_app/public/images/spree/spree.jpg +0 -0
  354. data/api/spec/test_app/public/images/step-progress/completed-completed.gif +0 -0
  355. data/api/spec/test_app/public/images/step-progress/completed-current.gif +0 -0
  356. data/api/spec/test_app/public/images/step-progress/completed-first.gif +0 -0
  357. data/api/spec/test_app/public/images/step-progress/current-first.gif +0 -0
  358. data/api/spec/test_app/public/images/step-progress/current-incomplete.gif +0 -0
  359. data/api/spec/test_app/public/images/step-progress/current-right.gif +0 -0
  360. data/api/spec/test_app/public/images/step-progress/incomplete-incomplete.gif +0 -0
  361. data/api/spec/test_app/public/images/step-progress/incomplete-right.gif +0 -0
  362. data/api/spec/test_app/public/images/steps/1.png +0 -0
  363. data/api/spec/test_app/public/images/steps/1_small.png +0 -0
  364. data/api/spec/test_app/public/images/steps/2.png +0 -0
  365. data/api/spec/test_app/public/images/steps/2_small.png +0 -0
  366. data/api/spec/test_app/public/images/steps/3.png +0 -0
  367. data/api/spec/test_app/public/images/steps/3_small.png +0 -0
  368. data/api/spec/test_app/public/images/steps/4.png +0 -0
  369. data/api/spec/test_app/public/images/steps/4_small.png +0 -0
  370. data/api/spec/test_app/public/images/steps/5.png +0 -0
  371. data/api/spec/test_app/public/images/steps/5_small.png +0 -0
  372. data/api/spec/test_app/public/images/steps/6.png +0 -0
  373. data/api/spec/test_app/public/images/steps/6_small.png +0 -0
  374. data/api/spec/test_app/public/images/sxsw-ribbon-v1.png +0 -0
  375. data/api/spec/test_app/public/images/tab_bottom.gif +0 -0
  376. data/api/spec/test_app/public/images/tile-header.png +0 -0
  377. data/api/spec/test_app/public/images/tile-slider.png +0 -0
  378. data/api/spec/test_app/public/images/top-shine.png +0 -0
  379. data/api/spec/test_app/public/images/tree-nav-icons/bullet.gif +0 -0
  380. data/api/spec/test_app/public/images/tree-nav-icons/minus.gif +0 -0
  381. data/api/spec/test_app/public/images/tree-nav-icons/plus.gif +0 -0
  382. data/api/spec/test_app/public/images/tree-nav-icons/treeview-loading.gif +0 -0
  383. data/api/spec/test_app/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
  384. data/api/spec/test_app/public/images/update.png +0 -0
  385. data/api/spec/test_app/public/images/visa_cid.gif +0 -0
  386. data/api/spec/test_app/public/images/wrapper-back-2.png +0 -0
  387. data/api/spec/test_app/public/images/wrapper-back.png +0 -0
  388. data/api/spec/test_app/public/images/yui-menubaritem_submenuindicator.png +0 -0
  389. data/api/spec/test_app/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
  390. data/api/spec/test_app/public/images/yui-menuitem_checkbox.png +0 -0
  391. data/api/spec/test_app/public/images/yui-menuitem_checkbox_disabled.png +0 -0
  392. data/api/spec/test_app/public/images/yui-menuitem_submenuindicator.png +0 -0
  393. data/api/spec/test_app/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
  394. data/api/spec/test_app/public/images/yui-sprite.png +0 -0
  395. data/api/spec/test_app/public/javascripts/additional-methods.js +236 -0
  396. data/api/spec/test_app/public/javascripts/admin.js +232 -0
  397. data/api/spec/test_app/public/javascripts/admin/address_states.js +25 -0
  398. data/api/spec/test_app/public/javascripts/admin/checkouts/edit.js +130 -0
  399. data/api/spec/test_app/public/javascripts/admin/orders/edit.js +23 -0
  400. data/api/spec/test_app/public/javascripts/admin/orders/edit_form.js +16 -0
  401. data/api/spec/test_app/public/javascripts/admin/payments/new.js +9 -0
  402. data/api/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js +43 -0
  403. data/api/spec/test_app/public/javascripts/application.js +12 -0
  404. data/api/spec/test_app/public/javascripts/calculator.js +15 -0
  405. data/api/spec/test_app/public/javascripts/checkout.js +75 -0
  406. data/api/spec/test_app/public/javascripts/datepicker.js +1445 -0
  407. data/api/spec/test_app/public/javascripts/gateway.js +13 -0
  408. data/api/spec/test_app/public/javascripts/jquery-1.4.2.min.js +154 -0
  409. data/api/spec/test_app/public/javascripts/jquery-ui.js +188 -0
  410. data/api/spec/test_app/public/javascripts/jquery.alerts/images/help.gif +0 -0
  411. data/api/spec/test_app/public/javascripts/jquery.alerts/images/important.gif +0 -0
  412. data/api/spec/test_app/public/javascripts/jquery.alerts/images/info.gif +0 -0
  413. data/api/spec/test_app/public/javascripts/jquery.alerts/images/title.gif +0 -0
  414. data/api/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.css +57 -0
  415. data/api/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.js +235 -0
  416. data/api/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.spree.css +30 -0
  417. data/api/spec/test_app/public/javascripts/jquery.autocomplete.min.js +13 -0
  418. data/api/spec/test_app/public/javascripts/jquery.cookie.js +96 -0
  419. data/api/spec/test_app/public/javascripts/jquery.delayedobserver.js +35 -0
  420. data/api/spec/test_app/public/javascripts/jquery.suggest.js +276 -0
  421. data/api/spec/test_app/public/javascripts/jquery.template.js +255 -0
  422. data/api/spec/test_app/public/javascripts/jquery.tokeninput.js +618 -0
  423. data/api/spec/test_app/public/javascripts/jquery.validate.min.js +16 -0
  424. data/api/spec/test_app/public/javascripts/jsTree/jquery.jstree.js +3510 -0
  425. data/api/spec/test_app/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
  426. data/api/spec/test_app/public/javascripts/jsTree/themes/apple/d.png +0 -0
  427. data/api/spec/test_app/public/javascripts/jsTree/themes/apple/dot_for_ie.gif +0 -0
  428. data/api/spec/test_app/public/javascripts/jsTree/themes/apple/style.css +60 -0
  429. data/api/spec/test_app/public/javascripts/jsTree/themes/apple/throbber.gif +0 -0
  430. data/api/spec/test_app/public/javascripts/lang/af.js +40 -0
  431. data/api/spec/test_app/public/javascripts/lang/ar.js +50 -0
  432. data/api/spec/test_app/public/javascripts/lang/de.js +40 -0
  433. data/api/spec/test_app/public/javascripts/lang/du.js +40 -0
  434. data/api/spec/test_app/public/javascripts/lang/en.js +42 -0
  435. data/api/spec/test_app/public/javascripts/lang/es.js +41 -0
  436. data/api/spec/test_app/public/javascripts/lang/fi.js +40 -0
  437. data/api/spec/test_app/public/javascripts/lang/fr.js +44 -0
  438. data/api/spec/test_app/public/javascripts/lang/gr.js +40 -0
  439. data/api/spec/test_app/public/javascripts/lang/he.js +49 -0
  440. data/api/spec/test_app/public/javascripts/lang/it.js +13 -0
  441. data/api/spec/test_app/public/javascripts/lang/nl.js +40 -0
  442. data/api/spec/test_app/public/javascripts/lang/no.js +40 -0
  443. data/api/spec/test_app/public/javascripts/lang/pt.js +50 -0
  444. data/api/spec/test_app/public/javascripts/lang/ro.js +40 -0
  445. data/api/spec/test_app/public/javascripts/lang/ru.js +40 -0
  446. data/api/spec/test_app/public/javascripts/lang/sp.js +40 -0
  447. data/api/spec/test_app/public/javascripts/lang/sv.js +41 -0
  448. data/api/spec/test_app/public/javascripts/lang/ua.js +40 -0
  449. data/api/spec/test_app/public/javascripts/localization/messages_cn.js +24 -0
  450. data/api/spec/test_app/public/javascripts/localization/messages_cs.js +23 -0
  451. data/api/spec/test_app/public/javascripts/localization/messages_da.js +21 -0
  452. data/api/spec/test_app/public/javascripts/localization/messages_de.js +21 -0
  453. data/api/spec/test_app/public/javascripts/localization/messages_es.js +24 -0
  454. data/api/spec/test_app/public/javascripts/localization/messages_fr.js +23 -0
  455. data/api/spec/test_app/public/javascripts/localization/messages_hu.js +21 -0
  456. data/api/spec/test_app/public/javascripts/localization/messages_it.js +26 -0
  457. data/api/spec/test_app/public/javascripts/localization/messages_kk.js +23 -0
  458. data/api/spec/test_app/public/javascripts/localization/messages_nl.js +23 -0
  459. data/api/spec/test_app/public/javascripts/localization/messages_no.js +23 -0
  460. data/api/spec/test_app/public/javascripts/localization/messages_pl.js +23 -0
  461. data/api/spec/test_app/public/javascripts/localization/messages_ptbr.js +30 -0
  462. data/api/spec/test_app/public/javascripts/localization/messages_ro.js +24 -0
  463. data/api/spec/test_app/public/javascripts/localization/messages_ru.js +23 -0
  464. data/api/spec/test_app/public/javascripts/localization/messages_se.js +23 -0
  465. data/api/spec/test_app/public/javascripts/localization/messages_sk.js +21 -0
  466. data/api/spec/test_app/public/javascripts/localization/messages_tr.js +24 -0
  467. data/api/spec/test_app/public/javascripts/localization/messages_tw.js +24 -0
  468. data/api/spec/test_app/public/javascripts/localization/messages_ua.js +24 -0
  469. data/api/spec/test_app/public/javascripts/nested-attribute.js +26 -0
  470. data/api/spec/test_app/public/javascripts/open_id.js +15 -0
  471. data/api/spec/test_app/public/javascripts/product.js +49 -0
  472. data/api/spec/test_app/public/javascripts/rails.js +127 -0
  473. data/api/spec/test_app/public/javascripts/taxonomy.js +201 -0
  474. data/api/spec/test_app/public/javascripts/zone.js +39 -0
  475. data/api/spec/test_app/public/robots.txt +5 -0
  476. data/api/spec/test_app/public/stylesheets/admin/admin-forms.css +154 -0
  477. data/api/spec/test_app/public/stylesheets/admin/admin-reset.css +69 -0
  478. data/api/spec/test_app/public/stylesheets/admin/admin-tables.css +39 -0
  479. data/api/spec/test_app/public/stylesheets/admin/admin-typography.css +117 -0
  480. data/api/spec/test_app/public/stylesheets/admin/admin.css +614 -0
  481. data/api/spec/test_app/public/stylesheets/admin/autocomplete.css +73 -0
  482. data/api/spec/test_app/public/stylesheets/admin/dashboard.css +143 -0
  483. data/api/spec/test_app/public/stylesheets/admin/edit_checkouts.css +57 -0
  484. data/api/spec/test_app/public/stylesheets/admin/grids.css +314 -0
  485. data/api/spec/test_app/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +7 -0
  486. data/api/spec/test_app/public/stylesheets/admin/token-input.css +109 -0
  487. data/api/spec/test_app/public/stylesheets/admin/yui-includes.css +14 -0
  488. data/api/spec/test_app/public/stylesheets/datepicker.css +263 -0
  489. data/api/spec/test_app/public/stylesheets/jquery.autocomplete.css +48 -0
  490. data/api/spec/test_app/public/stylesheets/screen.css +916 -0
  491. data/api/spec/test_app/script/rails +6 -0
  492. data/auth/Gemfile +35 -0
  493. data/auth/Gemfile.lock +244 -0
  494. data/auth/LICENSE +26 -0
  495. data/auth/README.md +36 -0
  496. data/auth/Rakefile +54 -0
  497. data/auth/app/controllers/admin_controller_decorator.rb +7 -0
  498. data/auth/app/controllers/admin_orders_controller_decorator.rb +15 -0
  499. data/auth/app/controllers/admin_resource_controller_decorator.rb +3 -0
  500. data/auth/app/controllers/checkout_controller_decorator.rb +42 -0
  501. data/auth/app/controllers/orders_controller_decorator.rb +17 -0
  502. data/auth/app/controllers/resource_controller_decorator.rb +25 -0
  503. data/auth/app/controllers/spree/base_controller_decorator.rb +49 -0
  504. data/auth/app/controllers/user_passwords_controller.rb +20 -0
  505. data/auth/app/controllers/user_registrations_controller.rb +64 -0
  506. data/auth/app/controllers/user_sessions_controller.rb +81 -0
  507. data/auth/app/controllers/users_controller.rb +54 -0
  508. data/auth/app/helpers/users_helper.rb +13 -0
  509. data/auth/app/models/ability.rb +64 -0
  510. data/auth/app/models/order_decorator.rb +12 -0
  511. data/auth/app/models/spree_auth_configuration.rb +4 -0
  512. data/auth/app/models/spree_current_order_decorator.rb +14 -0
  513. data/auth/app/models/tokenized_permission.rb +3 -0
  514. data/auth/app/models/user.rb +85 -0
  515. data/auth/app/models/user_mailer.rb +13 -0
  516. data/auth/app/views/checkout/registration.html.erb +20 -0
  517. data/auth/app/views/layouts/admin/_login_nav.html.erb +8 -0
  518. data/auth/app/views/shared/_flashes.html.erb +9 -0
  519. data/auth/app/views/shared/_login.html.erb +20 -0
  520. data/auth/app/views/shared/_login_bar.html.erb +6 -0
  521. data/auth/app/views/shared/_user_form.html.erb +17 -0
  522. data/auth/app/views/shared/unauthorized.html.erb +0 -0
  523. data/auth/app/views/user_mailer/reset_password_instructions.text.erb +10 -0
  524. data/auth/app/views/user_passwords/edit.html.erb +15 -0
  525. data/auth/app/views/user_passwords/new.html.erb +13 -0
  526. data/auth/app/views/user_registrations/new.html.erb +23 -0
  527. data/auth/app/views/user_sessions/authorization_failure.html.erb +4 -0
  528. data/auth/app/views/user_sessions/new.html.erb +13 -0
  529. data/auth/app/views/users/edit.html.erb +11 -0
  530. data/auth/app/views/users/show.html.erb +50 -0
  531. data/auth/config.ru +4 -0
  532. data/auth/config/cucumber.yml +10 -0
  533. data/auth/config/initializers/devise.rb +136 -0
  534. data/auth/config/locales/en.yml +46 -0
  535. data/auth/config/routes.rb +28 -0
  536. data/auth/db/migrate/20101026184950_rename_columns_for_devise.rb +39 -0
  537. data/auth/db/migrate/20101214150824_convert_user_remember_field.rb +11 -0
  538. data/auth/db/migrate/20101217012656_create_tokenized_permissions.rb +18 -0
  539. data/auth/db/migrate/20101219201531_tokens_for_legacy_orders.rb +12 -0
  540. data/auth/db/sample/users.rb +53 -0
  541. data/auth/features/account.feature +37 -0
  542. data/auth/features/admin_permissions.feature +22 -0
  543. data/auth/features/checkout.feature +171 -0
  544. data/auth/features/order.feature +14 -0
  545. data/auth/features/password_reset.feature +19 -0
  546. data/auth/features/sign_in.feature +34 -0
  547. data/auth/features/sign_out.feature +11 -0
  548. data/auth/features/sign_up.feature +20 -0
  549. data/auth/features/support/env.rb +4 -0
  550. data/auth/features/support/paths.rb +49 -0
  551. data/auth/features/user.feature +33 -0
  552. data/auth/lib/spree/auth/config.rb +22 -0
  553. data/auth/lib/spree/token_resource.rb +23 -0
  554. data/auth/lib/spree_auth.rb +29 -0
  555. data/auth/lib/spree_auth_hooks.rb +6 -0
  556. data/auth/lib/tasks/auth.rake +8 -0
  557. data/auth/lib/tasks/install.rake +23 -0
  558. data/auth/rfcommerce_auth.gemspec +28 -0
  559. data/auth/spec/controllers/admin_base_controller_spec.rb +19 -0
  560. data/auth/spec/controllers/checkout_controller_spec.rb +180 -0
  561. data/auth/spec/controllers/orders_controller_spec.rb +145 -0
  562. data/auth/spec/controllers/user_sessions_controller_spec.rb +32 -0
  563. data/auth/spec/controllers/users_controller_spec.rb +55 -0
  564. data/auth/spec/lib/token_resource_spec.rb +34 -0
  565. data/auth/spec/models/ability_spec.rb +186 -0
  566. data/auth/spec/models/order_spec.rb +45 -0
  567. data/auth/spec/models/user_spec.rb +47 -0
  568. data/auth/spec/spec_helper.rb +29 -0
  569. data/auth/spec/test_app/Gemfile +35 -0
  570. data/auth/spec/test_app/Rakefile +7 -0
  571. data/auth/spec/test_app/app/controllers/application_controller.rb +3 -0
  572. data/auth/spec/test_app/app/helpers/application_helper.rb +2 -0
  573. data/auth/spec/test_app/app/views/layouts/application.html.erb +14 -0
  574. data/auth/spec/test_app/config.ru +4 -0
  575. data/auth/spec/test_app/config/application.rb +42 -0
  576. data/auth/spec/test_app/config/boot.rb +6 -0
  577. data/auth/spec/test_app/config/database.yml +17 -0
  578. data/auth/spec/test_app/config/environment.rb +5 -0
  579. data/auth/spec/test_app/config/environments/cucumber.rb +38 -0
  580. data/auth/spec/test_app/config/environments/development.rb +26 -0
  581. data/auth/spec/test_app/config/environments/production.rb +49 -0
  582. data/auth/spec/test_app/config/environments/test.rb +35 -0
  583. data/auth/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  584. data/auth/spec/test_app/config/initializers/inflections.rb +10 -0
  585. data/auth/spec/test_app/config/initializers/mime_types.rb +5 -0
  586. data/auth/spec/test_app/config/initializers/secret_token.rb +7 -0
  587. data/auth/spec/test_app/config/initializers/session_store.rb +8 -0
  588. data/auth/spec/test_app/config/locales/en.yml +5 -0
  589. data/auth/spec/test_app/config/routes.rb +58 -0
  590. data/auth/spec/test_app/db/cucumber.sqlite3 +0 -0
  591. data/auth/spec/test_app/db/default/countries.yml +1583 -0
  592. data/auth/spec/test_app/db/default/roles.yml +7 -0
  593. data/auth/spec/test_app/db/default/states.yml +256 -0
  594. data/auth/spec/test_app/db/default/zone_members.yml +169 -0
  595. data/auth/spec/test_app/db/default/zones.yml +13 -0
  596. data/auth/spec/test_app/db/migrate/20090823005402_spree_zero_nine_zero.rb +442 -0
  597. data/auth/spec/test_app/db/migrate/20090904192342_create_indexes_for_inventory_units.rb +12 -0
  598. data/auth/spec/test_app/db/migrate/20090923100315_add_count_on_hand_to_variants_and_products.rb +36 -0
  599. data/auth/spec/test_app/db/migrate/20091007134354_change_taxons_to_nested_set.rb +40 -0
  600. data/auth/spec/test_app/db/migrate/20091008091614_move_to_configurable_gateways.rb +55 -0
  601. data/auth/spec/test_app/db/migrate/20091012120519_product_groups_and_scopes.rb +25 -0
  602. data/auth/spec/test_app/db/migrate/20091015110842_add_open_id_authentication_tables.rb +20 -0
  603. data/auth/spec/test_app/db/migrate/20091015153048_add_openid_field_to_users.rb +19 -0
  604. data/auth/spec/test_app/db/migrate/20091016174634_change_preference_value_type.rb +10 -0
  605. data/auth/spec/test_app/db/migrate/20091017175558_create_billing_integrations.rb +16 -0
  606. data/auth/spec/test_app/db/migrate/20091021133257_charge_refactoring.rb +35 -0
  607. data/auth/spec/test_app/db/migrate/20091104151730_add_some_indexes.rb +21 -0
  608. data/auth/spec/test_app/db/migrate/20091126190904_checkout_state_machine.rb +13 -0
  609. data/auth/spec/test_app/db/migrate/20091209153045_state_for_shipments.rb +9 -0
  610. data/auth/spec/test_app/db/migrate/20091209202200_make_state_events_polymorphic.rb +12 -0
  611. data/auth/spec/test_app/db/migrate/20091211203813_ship_address_id_for_checkouts.rb +9 -0
  612. data/auth/spec/test_app/db/migrate/20091212161118_shipping_method_id_for_checkouts.rb +9 -0
  613. data/auth/spec/test_app/db/migrate/20091213222815_creditcard_last_four_digits.rb +19 -0
  614. data/auth/spec/test_app/db/migrate/20091214183826_populate_legacy_shipment_state.rb +19 -0
  615. data/auth/spec/test_app/db/migrate/20100105090147_add_cost_price.rb +9 -0
  616. data/auth/spec/test_app/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +21 -0
  617. data/auth/spec/test_app/db/migrate/20100111205525_cim_fields_for_creditcards.rb +11 -0
  618. data/auth/spec/test_app/db/migrate/20100112151511_create_return_authorizations.rb +16 -0
  619. data/auth/spec/test_app/db/migrate/20100113090919_add_return_authorization_to_inventory_units.rb +9 -0
  620. data/auth/spec/test_app/db/migrate/20100113203104_create_trackers.rb +14 -0
  621. data/auth/spec/test_app/db/migrate/20100121160010_creditcard_id_for_creditcard_txns.rb +9 -0
  622. data/auth/spec/test_app/db/migrate/20100121183934_original_creditcard_txn_id_for_creditcard_txns.rb +9 -0
  623. data/auth/spec/test_app/db/migrate/20100125145351_add_test_mode_to_billing_integration.rb +11 -0
  624. data/auth/spec/test_app/db/migrate/20100126103714_create_products_product_groups.rb +12 -0
  625. data/auth/spec/test_app/db/migrate/20100209025806_create_payment_methods.rb +20 -0
  626. data/auth/spec/test_app/db/migrate/20100209144531_polymorphic_payments.rb +29 -0
  627. data/auth/spec/test_app/db/migrate/20100213103131_change_payments_payment_method_to_belongs_to.rb +11 -0
  628. data/auth/spec/test_app/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +16 -0
  629. data/auth/spec/test_app/db/migrate/20100223170312_sti_for_transactions.rb +14 -0
  630. data/auth/spec/test_app/db/migrate/20100223183812_drop_billing_integrations.rb +16 -0
  631. data/auth/spec/test_app/db/migrate/20100224153127_deleted_at_for_payment_methods.rb +13 -0
  632. data/auth/spec/test_app/db/migrate/20100301163454_add_adjustments_index.rb +10 -0
  633. data/auth/spec/test_app/db/migrate/20100306153445_fix_by_popularity.rb +8 -0
  634. data/auth/spec/test_app/db/migrate/20100317120946_add_alt_text_to_images.rb +9 -0
  635. data/auth/spec/test_app/db/migrate/20100427121301_add_display_to_payment_methods.rb +9 -0
  636. data/auth/spec/test_app/db/migrate/20100504142133_add_addresses_checkouts_indexes.rb +16 -0
  637. data/auth/spec/test_app/db/migrate/20100506180619_add_icon_to_taxons.rb +18 -0
  638. data/auth/spec/test_app/db/migrate/20100506185838_add_description_to_taxons.rb +11 -0
  639. data/auth/spec/test_app/db/migrate/20100528155333_index_for_shipments_number.rb +9 -0
  640. data/auth/spec/test_app/db/migrate/20100528185820_add_index_on_users_persistence_token.rb +9 -0
  641. data/auth/spec/test_app/db/migrate/20100605152042_add_default_to_tax_categories.rb +9 -0
  642. data/auth/spec/test_app/db/migrate/20100624110730_add_display_to_shipping_methods.rb +9 -0
  643. data/auth/spec/test_app/db/migrate/20100624123336_rename_payment_method_display.rb +9 -0
  644. data/auth/spec/test_app/db/migrate/20100624175547_rename_preferences_field.rb +8 -0
  645. data/auth/spec/test_app/db/migrate/20100811163637_add_guest_flag.rb +13 -0
  646. data/auth/spec/test_app/db/migrate/20100811205836_drop_order_token.rb +11 -0
  647. data/auth/spec/test_app/db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb +11 -0
  648. data/auth/spec/test_app/db/migrate/20100813023502_create_address_keys_for_order.rb +15 -0
  649. data/auth/spec/test_app/db/migrate/20100813185745_payment_total_for_orders.rb +9 -0
  650. data/auth/spec/test_app/db/migrate/20100816212146_shipping_method_id_for_orders.rb +9 -0
  651. data/auth/spec/test_app/db/migrate/20100817152723_add_shipment_and_payment_state.rb +15 -0
  652. data/auth/spec/test_app/db/migrate/20100819170125_refactor_adjustments.rb +19 -0
  653. data/auth/spec/test_app/db/migrate/20100820135707_response_code_and_avs_response_for_payments.rb +11 -0
  654. data/auth/spec/test_app/db/migrate/20100901171814_change_guest_flag_to_anonymous.rb +13 -0
  655. data/auth/spec/test_app/db/migrate/20100903203949_email_for_orders.rb +9 -0
  656. data/auth/spec/test_app/db/migrate/20100923162011_create_mail_methods.rb +12 -0
  657. data/auth/spec/test_app/db/migrate/20100929151905_rename_frozen_to_locked.rb +8 -0
  658. data/auth/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb +11 -0
  659. data/auth/spec/test_app/db/migrate/20101026184700_create_log_entries.rb +15 -0
  660. data/auth/spec/test_app/db/migrate/20101026184714_migrate_transactions_to_payment_state.rb +94 -0
  661. data/auth/spec/test_app/db/migrate/20101026184746_delete_in_progress_orders.rb +18 -0
  662. data/auth/spec/test_app/db/migrate/20101026184808_migrate_checkout_to_orders.rb +27 -0
  663. data/auth/spec/test_app/db/migrate/20101026184833_migrate_adjustments.rb +9 -0
  664. data/auth/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb +14 -0
  665. data/auth/spec/test_app/db/migrate/20101026184916_prevent_nil_payment_total.rb +8 -0
  666. data/auth/spec/test_app/db/migrate/20101026184932_prevent_nil_email.rb +9 -0
  667. data/auth/spec/test_app/db/migrate/20101026184950_rename_columns_for_devise.rb +39 -0
  668. data/auth/spec/test_app/db/migrate/20101026184959_generate_anonymous_users.rb +14 -0
  669. data/auth/spec/test_app/db/migrate/20101026185022_update_order_state.rb +8 -0
  670. data/auth/spec/test_app/db/migrate/20101026192225_cleanup_legacy_tables.rb +11 -0
  671. data/auth/spec/test_app/db/migrate/20101028151745_remove_number_and_cvv_from_credicard.rb +9 -0
  672. data/auth/spec/test_app/db/migrate/20101103212716_drop_anonymous_field_for_user.rb +8 -0
  673. data/auth/spec/test_app/db/migrate/20101111133551_renamed_rma_cancelled_state.rb +10 -0
  674. data/auth/spec/test_app/db/migrate/20101117031806_fix_problematic_index_names.rb +13 -0
  675. data/auth/spec/test_app/db/migrate/20101214150824_convert_user_remember_field.rb +11 -0
  676. data/auth/spec/test_app/db/migrate/20101217012656_create_tokenized_permissions.rb +18 -0
  677. data/auth/spec/test_app/db/migrate/20101219201531_tokens_for_legacy_orders.rb +12 -0
  678. data/auth/spec/test_app/db/migrate/20101223215658_add_position_to_variants.rb +9 -0
  679. data/auth/spec/test_app/db/migrate/20110110130847_add_next_state_to_state_events.rb +9 -0
  680. data/auth/spec/test_app/db/migrate/20110111122537_add_position_to_option_types.rb +9 -0
  681. data/auth/spec/test_app/db/migrate/20110314192118_remove_trailing_slashes_in_taxon_permalinks.rb +17 -0
  682. data/auth/spec/test_app/db/sample/users.rb +61 -0
  683. data/auth/spec/test_app/db/schema.rb +542 -0
  684. data/auth/spec/test_app/db/seeds.rb +3 -0
  685. data/auth/spec/test_app/db/test.sqlite3 +0 -0
  686. data/auth/spec/test_app/log/cucumber.log +1599 -0
  687. data/auth/spec/test_app/log/development.log +0 -0
  688. data/auth/spec/test_app/log/production.log +0 -0
  689. data/auth/spec/test_app/log/server.log +0 -0
  690. data/auth/spec/test_app/log/test.log +1599 -0
  691. data/auth/spec/test_app/public/404.html +26 -0
  692. data/auth/spec/test_app/public/422.html +26 -0
  693. data/auth/spec/test_app/public/500.html +26 -0
  694. data/auth/spec/test_app/public/favicon.ico +0 -0
  695. data/auth/spec/test_app/public/images/add-to-cart.png +0 -0
  696. data/auth/spec/test_app/public/images/admin/bg/active-tab.png +0 -0
  697. data/auth/spec/test_app/public/images/admin/bg/admin_tab_back.png +0 -0
  698. data/auth/spec/test_app/public/images/admin/bg/admin_tab_selected_back.png +0 -0
  699. data/auth/spec/test_app/public/images/admin/bg/content-back-blue.png +0 -0
  700. data/auth/spec/test_app/public/images/admin/bg/content-back-green.png +0 -0
  701. data/auth/spec/test_app/public/images/admin/bg/content-back.png +0 -0
  702. data/auth/spec/test_app/public/images/admin/bg/flash-error.png +0 -0
  703. data/auth/spec/test_app/public/images/admin/bg/flash-notice.png +0 -0
  704. data/auth/spec/test_app/public/images/admin/bg/green-stripes.gif +0 -0
  705. data/auth/spec/test_app/public/images/admin/bg/green-stripes.png +0 -0
  706. data/auth/spec/test_app/public/images/admin/bg/grid_header_back.png +0 -0
  707. data/auth/spec/test_app/public/images/admin/bg/grid_header_back_green.png +0 -0
  708. data/auth/spec/test_app/public/images/admin/bg/header-bg.png +0 -0
  709. data/auth/spec/test_app/public/images/admin/bg/header.png +0 -0
  710. data/auth/spec/test_app/public/images/admin/bg/header_bg.jpg +0 -0
  711. data/auth/spec/test_app/public/images/admin/bg/menu-current.png +0 -0
  712. data/auth/spec/test_app/public/images/admin/bg/red-stripes.gif +0 -0
  713. data/auth/spec/test_app/public/images/admin/bg/red-stripes.png +0 -0
  714. data/auth/spec/test_app/public/images/admin/bg/spree_50.png +0 -0
  715. data/auth/spec/test_app/public/images/admin/bg/subnav-divider.png +0 -0
  716. data/auth/spec/test_app/public/images/admin/bg/subnav.png +0 -0
  717. data/auth/spec/test_app/public/images/admin/bg/tab-back.png +0 -0
  718. data/auth/spec/test_app/public/images/admin/buttons/blue/left_01.png +0 -0
  719. data/auth/spec/test_app/public/images/admin/buttons/blue/right_01.png +0 -0
  720. data/auth/spec/test_app/public/images/admin/buttons/drag-handle-green.png +0 -0
  721. data/auth/spec/test_app/public/images/admin/buttons/green/left_01.png +0 -0
  722. data/auth/spec/test_app/public/images/admin/buttons/green/right_01.png +0 -0
  723. data/auth/spec/test_app/public/images/admin/buttons/left_01.png +0 -0
  724. data/auth/spec/test_app/public/images/admin/buttons/left_01_small.png +0 -0
  725. data/auth/spec/test_app/public/images/admin/buttons/orange/left_03.png +0 -0
  726. data/auth/spec/test_app/public/images/admin/buttons/orange/right_03.png +0 -0
  727. data/auth/spec/test_app/public/images/admin/buttons/right_01.png +0 -0
  728. data/auth/spec/test_app/public/images/admin/buttons/right_01_small.png +0 -0
  729. data/auth/spec/test_app/public/images/admin/icons/16x16/1.png +0 -0
  730. data/auth/spec/test_app/public/images/admin/icons/16x16/10.png +0 -0
  731. data/auth/spec/test_app/public/images/admin/icons/16x16/2.png +0 -0
  732. data/auth/spec/test_app/public/images/admin/icons/16x16/3.png +0 -0
  733. data/auth/spec/test_app/public/images/admin/icons/16x16/4.png +0 -0
  734. data/auth/spec/test_app/public/images/admin/icons/16x16/5.png +0 -0
  735. data/auth/spec/test_app/public/images/admin/icons/16x16/6.png +0 -0
  736. data/auth/spec/test_app/public/images/admin/icons/16x16/7.png +0 -0
  737. data/auth/spec/test_app/public/images/admin/icons/16x16/8.png +0 -0
  738. data/auth/spec/test_app/public/images/admin/icons/16x16/9.png +0 -0
  739. data/auth/spec/test_app/public/images/admin/icons/32x32/1.png +0 -0
  740. data/auth/spec/test_app/public/images/admin/icons/32x32/10.png +0 -0
  741. data/auth/spec/test_app/public/images/admin/icons/32x32/11.png +0 -0
  742. data/auth/spec/test_app/public/images/admin/icons/32x32/2.png +0 -0
  743. data/auth/spec/test_app/public/images/admin/icons/32x32/3.png +0 -0
  744. data/auth/spec/test_app/public/images/admin/icons/32x32/4.png +0 -0
  745. data/auth/spec/test_app/public/images/admin/icons/32x32/5.png +0 -0
  746. data/auth/spec/test_app/public/images/admin/icons/32x32/6.png +0 -0
  747. data/auth/spec/test_app/public/images/admin/icons/32x32/7.png +0 -0
  748. data/auth/spec/test_app/public/images/admin/icons/32x32/8.png +0 -0
  749. data/auth/spec/test_app/public/images/admin/icons/32x32/9.png +0 -0
  750. data/auth/spec/test_app/public/images/admin/icons/accept.png +0 -0
  751. data/auth/spec/test_app/public/images/admin/icons/add.gif +0 -0
  752. data/auth/spec/test_app/public/images/admin/icons/add.png +0 -0
  753. data/auth/spec/test_app/public/images/admin/icons/arrow-down.gif +0 -0
  754. data/auth/spec/test_app/public/images/admin/icons/cross.png +0 -0
  755. data/auth/spec/test_app/public/images/admin/icons/delete.gif +0 -0
  756. data/auth/spec/test_app/public/images/admin/icons/delete.png +0 -0
  757. data/auth/spec/test_app/public/images/admin/icons/drag.gif +0 -0
  758. data/auth/spec/test_app/public/images/admin/icons/edit.gif +0 -0
  759. data/auth/spec/test_app/public/images/admin/icons/edit.png +0 -0
  760. data/auth/spec/test_app/public/images/admin/icons/email.png +0 -0
  761. data/auth/spec/test_app/public/images/admin/icons/error.png +0 -0
  762. data/auth/spec/test_app/public/images/admin/icons/exclamation.png +0 -0
  763. data/auth/spec/test_app/public/images/admin/icons/feed.png +0 -0
  764. data/auth/spec/test_app/public/images/admin/icons/pdf.png +0 -0
  765. data/auth/spec/test_app/public/images/admin/icons/reorder.gif +0 -0
  766. data/auth/spec/test_app/public/images/admin/icons/search.gif +0 -0
  767. data/auth/spec/test_app/public/images/admin/icons/send-email.png +0 -0
  768. data/auth/spec/test_app/public/images/admin/icons/stop.png +0 -0
  769. data/auth/spec/test_app/public/images/admin/icons/tick.png +0 -0
  770. data/auth/spec/test_app/public/images/admin/icons/up.gif +0 -0
  771. data/auth/spec/test_app/public/images/admin/icons/xls.png +0 -0
  772. data/auth/spec/test_app/public/images/admin/tabs/off-left.png +0 -0
  773. data/auth/spec/test_app/public/images/admin/tabs/off-right.png +0 -0
  774. data/auth/spec/test_app/public/images/admin/tabs/on-left.png +0 -0
  775. data/auth/spec/test_app/public/images/admin/tabs/on-right.png +0 -0
  776. data/auth/spec/test_app/public/images/ajax_loader.gif +0 -0
  777. data/auth/spec/test_app/public/images/amex_cid.gif +0 -0
  778. data/auth/spec/test_app/public/images/bg-button-hover.png +0 -0
  779. data/auth/spec/test_app/public/images/bg-button-pressed.png +0 -0
  780. data/auth/spec/test_app/public/images/bg-button.gif +0 -0
  781. data/auth/spec/test_app/public/images/bg-button.png +0 -0
  782. data/auth/spec/test_app/public/images/blue/left_01.png +0 -0
  783. data/auth/spec/test_app/public/images/blue/right_01.png +0 -0
  784. data/auth/spec/test_app/public/images/body-back.png +0 -0
  785. data/auth/spec/test_app/public/images/bottom_shine.png +0 -0
  786. data/auth/spec/test_app/public/images/breadcrumb.gif +0 -0
  787. data/auth/spec/test_app/public/images/button-dark-hover.png +0 -0
  788. data/auth/spec/test_app/public/images/button-dark.png +0 -0
  789. data/auth/spec/test_app/public/images/buttons/bg-button-hover.png +0 -0
  790. data/auth/spec/test_app/public/images/buttons/bg-button-pressed.png +0 -0
  791. data/auth/spec/test_app/public/images/buttons/bg-button.gif +0 -0
  792. data/auth/spec/test_app/public/images/buttons/bg-button.png +0 -0
  793. data/auth/spec/test_app/public/images/buttons/blue/left_01.png +0 -0
  794. data/auth/spec/test_app/public/images/buttons/blue/right_01.png +0 -0
  795. data/auth/spec/test_app/public/images/buttons/button-dark-hover.png +0 -0
  796. data/auth/spec/test_app/public/images/buttons/button-dark.png +0 -0
  797. data/auth/spec/test_app/public/images/buttons/drag-handle-green.png +0 -0
  798. data/auth/spec/test_app/public/images/buttons/green/left_01.png +0 -0
  799. data/auth/spec/test_app/public/images/buttons/green/right_01.png +0 -0
  800. data/auth/spec/test_app/public/images/buttons/left_01.png +0 -0
  801. data/auth/spec/test_app/public/images/buttons/left_01_small.png +0 -0
  802. data/auth/spec/test_app/public/images/buttons/orange/left_03.png +0 -0
  803. data/auth/spec/test_app/public/images/buttons/orange/right_03.png +0 -0
  804. data/auth/spec/test_app/public/images/buttons/right_01.png +0 -0
  805. data/auth/spec/test_app/public/images/buttons/right_01_small.png +0 -0
  806. data/auth/spec/test_app/public/images/buttons/sxsw-ribbon-v1.png +0 -0
  807. data/auth/spec/test_app/public/images/buttons/top-shine.png +0 -0
  808. data/auth/spec/test_app/public/images/calendar_date_select/calendar.gif +0 -0
  809. data/auth/spec/test_app/public/images/cart-empty.png +0 -0
  810. data/auth/spec/test_app/public/images/cart-empty_x32.png +0 -0
  811. data/auth/spec/test_app/public/images/cart-full.png +0 -0
  812. data/auth/spec/test_app/public/images/cart-full_x32.png +0 -0
  813. data/auth/spec/test_app/public/images/checkout.png +0 -0
  814. data/auth/spec/test_app/public/images/creditcard.gif +0 -0
  815. data/auth/spec/test_app/public/images/datepicker/backstripes.gif +0 -0
  816. data/auth/spec/test_app/public/images/datepicker/bg_header.jpg +0 -0
  817. data/auth/spec/test_app/public/images/datepicker/bullet1.gif +0 -0
  818. data/auth/spec/test_app/public/images/datepicker/bullet2.gif +0 -0
  819. data/auth/spec/test_app/public/images/datepicker/cal.gif +0 -0
  820. data/auth/spec/test_app/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
  821. data/auth/spec/test_app/public/images/discover_cid.gif +0 -0
  822. data/auth/spec/test_app/public/images/drag-handle-green.png +0 -0
  823. data/auth/spec/test_app/public/images/favicon.ico +0 -0
  824. data/auth/spec/test_app/public/images/green/left_01.png +0 -0
  825. data/auth/spec/test_app/public/images/green/right_01.png +0 -0
  826. data/auth/spec/test_app/public/images/grid.png +0 -0
  827. data/auth/spec/test_app/public/images/left_01.png +0 -0
  828. data/auth/spec/test_app/public/images/left_01_small.png +0 -0
  829. data/auth/spec/test_app/public/images/master_cid.jpg +0 -0
  830. data/auth/spec/test_app/public/images/menu-current.png +0 -0
  831. data/auth/spec/test_app/public/images/menu-hover.png +0 -0
  832. data/auth/spec/test_app/public/images/noimage/mini.jpg +0 -0
  833. data/auth/spec/test_app/public/images/noimage/product.jpg +0 -0
  834. data/auth/spec/test_app/public/images/noimage/small.jpg +0 -0
  835. data/auth/spec/test_app/public/images/openid-inputicon.gif +0 -0
  836. data/auth/spec/test_app/public/images/orange/left_03.png +0 -0
  837. data/auth/spec/test_app/public/images/orange/right_03.png +0 -0
  838. data/auth/spec/test_app/public/images/progress.gif +0 -0
  839. data/auth/spec/test_app/public/images/reorder.jpg +0 -0
  840. data/auth/spec/test_app/public/images/right_01.png +0 -0
  841. data/auth/spec/test_app/public/images/right_01_small.png +0 -0
  842. data/auth/spec/test_app/public/images/separator.png +0 -0
  843. data/auth/spec/test_app/public/images/shadow-top.png +0 -0
  844. data/auth/spec/test_app/public/images/shadow_top.png +0 -0
  845. data/auth/spec/test_app/public/images/spinner.gif +0 -0
  846. data/auth/spec/test_app/public/images/spree.jpg +0 -0
  847. data/auth/spec/test_app/public/images/spree/progress.gif +0 -0
  848. data/auth/spec/test_app/public/images/spree/spinner.gif +0 -0
  849. data/auth/spec/test_app/public/images/spree/spree.jpg +0 -0
  850. data/auth/spec/test_app/public/images/step-progress/completed-completed.gif +0 -0
  851. data/auth/spec/test_app/public/images/step-progress/completed-current.gif +0 -0
  852. data/auth/spec/test_app/public/images/step-progress/completed-first.gif +0 -0
  853. data/auth/spec/test_app/public/images/step-progress/current-first.gif +0 -0
  854. data/auth/spec/test_app/public/images/step-progress/current-incomplete.gif +0 -0
  855. data/auth/spec/test_app/public/images/step-progress/current-right.gif +0 -0
  856. data/auth/spec/test_app/public/images/step-progress/incomplete-incomplete.gif +0 -0
  857. data/auth/spec/test_app/public/images/step-progress/incomplete-right.gif +0 -0
  858. data/auth/spec/test_app/public/images/steps/1.png +0 -0
  859. data/auth/spec/test_app/public/images/steps/1_small.png +0 -0
  860. data/auth/spec/test_app/public/images/steps/2.png +0 -0
  861. data/auth/spec/test_app/public/images/steps/2_small.png +0 -0
  862. data/auth/spec/test_app/public/images/steps/3.png +0 -0
  863. data/auth/spec/test_app/public/images/steps/3_small.png +0 -0
  864. data/auth/spec/test_app/public/images/steps/4.png +0 -0
  865. data/auth/spec/test_app/public/images/steps/4_small.png +0 -0
  866. data/auth/spec/test_app/public/images/steps/5.png +0 -0
  867. data/auth/spec/test_app/public/images/steps/5_small.png +0 -0
  868. data/auth/spec/test_app/public/images/steps/6.png +0 -0
  869. data/auth/spec/test_app/public/images/steps/6_small.png +0 -0
  870. data/auth/spec/test_app/public/images/sxsw-ribbon-v1.png +0 -0
  871. data/auth/spec/test_app/public/images/tab_bottom.gif +0 -0
  872. data/auth/spec/test_app/public/images/tile-header.png +0 -0
  873. data/auth/spec/test_app/public/images/tile-slider.png +0 -0
  874. data/auth/spec/test_app/public/images/top-shine.png +0 -0
  875. data/auth/spec/test_app/public/images/tree-nav-icons/bullet.gif +0 -0
  876. data/auth/spec/test_app/public/images/tree-nav-icons/minus.gif +0 -0
  877. data/auth/spec/test_app/public/images/tree-nav-icons/plus.gif +0 -0
  878. data/auth/spec/test_app/public/images/tree-nav-icons/treeview-loading.gif +0 -0
  879. data/auth/spec/test_app/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
  880. data/auth/spec/test_app/public/images/update.png +0 -0
  881. data/auth/spec/test_app/public/images/visa_cid.gif +0 -0
  882. data/auth/spec/test_app/public/images/wrapper-back-2.png +0 -0
  883. data/auth/spec/test_app/public/images/wrapper-back.png +0 -0
  884. data/auth/spec/test_app/public/images/yui-menubaritem_submenuindicator.png +0 -0
  885. data/auth/spec/test_app/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
  886. data/auth/spec/test_app/public/images/yui-menuitem_checkbox.png +0 -0
  887. data/auth/spec/test_app/public/images/yui-menuitem_checkbox_disabled.png +0 -0
  888. data/auth/spec/test_app/public/images/yui-menuitem_submenuindicator.png +0 -0
  889. data/auth/spec/test_app/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
  890. data/auth/spec/test_app/public/images/yui-sprite.png +0 -0
  891. data/auth/spec/test_app/public/javascripts/additional-methods.js +236 -0
  892. data/auth/spec/test_app/public/javascripts/admin.js +232 -0
  893. data/auth/spec/test_app/public/javascripts/admin/address_states.js +25 -0
  894. data/auth/spec/test_app/public/javascripts/admin/checkouts/edit.js +130 -0
  895. data/auth/spec/test_app/public/javascripts/admin/orders/edit.js +23 -0
  896. data/auth/spec/test_app/public/javascripts/admin/orders/edit_form.js +16 -0
  897. data/auth/spec/test_app/public/javascripts/admin/payments/new.js +9 -0
  898. data/auth/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js +43 -0
  899. data/auth/spec/test_app/public/javascripts/application.js +12 -0
  900. data/auth/spec/test_app/public/javascripts/calculator.js +15 -0
  901. data/auth/spec/test_app/public/javascripts/checkout.js +75 -0
  902. data/auth/spec/test_app/public/javascripts/datepicker.js +1445 -0
  903. data/auth/spec/test_app/public/javascripts/gateway.js +13 -0
  904. data/auth/spec/test_app/public/javascripts/jquery-1.4.2.min.js +154 -0
  905. data/auth/spec/test_app/public/javascripts/jquery-ui.js +188 -0
  906. data/auth/spec/test_app/public/javascripts/jquery.alerts/images/help.gif +0 -0
  907. data/auth/spec/test_app/public/javascripts/jquery.alerts/images/important.gif +0 -0
  908. data/auth/spec/test_app/public/javascripts/jquery.alerts/images/info.gif +0 -0
  909. data/auth/spec/test_app/public/javascripts/jquery.alerts/images/title.gif +0 -0
  910. data/auth/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.css +57 -0
  911. data/auth/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.js +235 -0
  912. data/auth/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.spree.css +30 -0
  913. data/auth/spec/test_app/public/javascripts/jquery.autocomplete.min.js +13 -0
  914. data/auth/spec/test_app/public/javascripts/jquery.cookie.js +96 -0
  915. data/auth/spec/test_app/public/javascripts/jquery.delayedobserver.js +35 -0
  916. data/auth/spec/test_app/public/javascripts/jquery.suggest.js +276 -0
  917. data/auth/spec/test_app/public/javascripts/jquery.template.js +255 -0
  918. data/auth/spec/test_app/public/javascripts/jquery.tokeninput.js +618 -0
  919. data/auth/spec/test_app/public/javascripts/jquery.validate.min.js +16 -0
  920. data/auth/spec/test_app/public/javascripts/jsTree/jquery.jstree.js +3510 -0
  921. data/auth/spec/test_app/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
  922. data/auth/spec/test_app/public/javascripts/jsTree/themes/apple/d.png +0 -0
  923. data/auth/spec/test_app/public/javascripts/jsTree/themes/apple/dot_for_ie.gif +0 -0
  924. data/auth/spec/test_app/public/javascripts/jsTree/themes/apple/style.css +60 -0
  925. data/auth/spec/test_app/public/javascripts/jsTree/themes/apple/throbber.gif +0 -0
  926. data/auth/spec/test_app/public/javascripts/lang/af.js +40 -0
  927. data/auth/spec/test_app/public/javascripts/lang/ar.js +50 -0
  928. data/auth/spec/test_app/public/javascripts/lang/de.js +40 -0
  929. data/auth/spec/test_app/public/javascripts/lang/du.js +40 -0
  930. data/auth/spec/test_app/public/javascripts/lang/en.js +42 -0
  931. data/auth/spec/test_app/public/javascripts/lang/es.js +41 -0
  932. data/auth/spec/test_app/public/javascripts/lang/fi.js +40 -0
  933. data/auth/spec/test_app/public/javascripts/lang/fr.js +44 -0
  934. data/auth/spec/test_app/public/javascripts/lang/gr.js +40 -0
  935. data/auth/spec/test_app/public/javascripts/lang/he.js +49 -0
  936. data/auth/spec/test_app/public/javascripts/lang/it.js +13 -0
  937. data/auth/spec/test_app/public/javascripts/lang/nl.js +40 -0
  938. data/auth/spec/test_app/public/javascripts/lang/no.js +40 -0
  939. data/auth/spec/test_app/public/javascripts/lang/pt.js +50 -0
  940. data/auth/spec/test_app/public/javascripts/lang/ro.js +40 -0
  941. data/auth/spec/test_app/public/javascripts/lang/ru.js +40 -0
  942. data/auth/spec/test_app/public/javascripts/lang/sp.js +40 -0
  943. data/auth/spec/test_app/public/javascripts/lang/sv.js +41 -0
  944. data/auth/spec/test_app/public/javascripts/lang/ua.js +40 -0
  945. data/auth/spec/test_app/public/javascripts/localization/messages_cn.js +24 -0
  946. data/auth/spec/test_app/public/javascripts/localization/messages_cs.js +23 -0
  947. data/auth/spec/test_app/public/javascripts/localization/messages_da.js +21 -0
  948. data/auth/spec/test_app/public/javascripts/localization/messages_de.js +21 -0
  949. data/auth/spec/test_app/public/javascripts/localization/messages_es.js +24 -0
  950. data/auth/spec/test_app/public/javascripts/localization/messages_fr.js +23 -0
  951. data/auth/spec/test_app/public/javascripts/localization/messages_hu.js +21 -0
  952. data/auth/spec/test_app/public/javascripts/localization/messages_it.js +26 -0
  953. data/auth/spec/test_app/public/javascripts/localization/messages_kk.js +23 -0
  954. data/auth/spec/test_app/public/javascripts/localization/messages_nl.js +23 -0
  955. data/auth/spec/test_app/public/javascripts/localization/messages_no.js +23 -0
  956. data/auth/spec/test_app/public/javascripts/localization/messages_pl.js +23 -0
  957. data/auth/spec/test_app/public/javascripts/localization/messages_ptbr.js +30 -0
  958. data/auth/spec/test_app/public/javascripts/localization/messages_ro.js +24 -0
  959. data/auth/spec/test_app/public/javascripts/localization/messages_ru.js +23 -0
  960. data/auth/spec/test_app/public/javascripts/localization/messages_se.js +23 -0
  961. data/auth/spec/test_app/public/javascripts/localization/messages_sk.js +21 -0
  962. data/auth/spec/test_app/public/javascripts/localization/messages_tr.js +24 -0
  963. data/auth/spec/test_app/public/javascripts/localization/messages_tw.js +24 -0
  964. data/auth/spec/test_app/public/javascripts/localization/messages_ua.js +24 -0
  965. data/auth/spec/test_app/public/javascripts/nested-attribute.js +26 -0
  966. data/auth/spec/test_app/public/javascripts/open_id.js +15 -0
  967. data/auth/spec/test_app/public/javascripts/product.js +49 -0
  968. data/auth/spec/test_app/public/javascripts/rails.js +127 -0
  969. data/auth/spec/test_app/public/javascripts/taxonomy.js +201 -0
  970. data/auth/spec/test_app/public/javascripts/zone.js +39 -0
  971. data/auth/spec/test_app/public/robots.txt +5 -0
  972. data/auth/spec/test_app/public/stylesheets/admin/admin-forms.css +154 -0
  973. data/auth/spec/test_app/public/stylesheets/admin/admin-reset.css +69 -0
  974. data/auth/spec/test_app/public/stylesheets/admin/admin-tables.css +39 -0
  975. data/auth/spec/test_app/public/stylesheets/admin/admin-typography.css +117 -0
  976. data/auth/spec/test_app/public/stylesheets/admin/admin.css +614 -0
  977. data/auth/spec/test_app/public/stylesheets/admin/autocomplete.css +73 -0
  978. data/auth/spec/test_app/public/stylesheets/admin/dashboard.css +143 -0
  979. data/auth/spec/test_app/public/stylesheets/admin/edit_checkouts.css +57 -0
  980. data/auth/spec/test_app/public/stylesheets/admin/grids.css +314 -0
  981. data/auth/spec/test_app/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +7 -0
  982. data/auth/spec/test_app/public/stylesheets/admin/token-input.css +109 -0
  983. data/auth/spec/test_app/public/stylesheets/admin/yui-includes.css +14 -0
  984. data/auth/spec/test_app/public/stylesheets/datepicker.css +263 -0
  985. data/auth/spec/test_app/public/stylesheets/jquery.autocomplete.css +48 -0
  986. data/auth/spec/test_app/public/stylesheets/screen.css +916 -0
  987. data/auth/spec/test_app/script/rails +6 -0
  988. data/core/Gemfile +34 -0
  989. data/core/Gemfile.lock +226 -0
  990. data/core/LICENSE +26 -0
  991. data/core/README.md +15 -0
  992. data/core/Rakefile +48 -0
  993. data/core/app/controllers/admin/adjustments_controller.rb +10 -0
  994. data/core/app/controllers/admin/base_controller.rb +63 -0
  995. data/core/app/controllers/admin/configurations_controller.rb +2 -0
  996. data/core/app/controllers/admin/general_settings_controller.rb +22 -0
  997. data/core/app/controllers/admin/images_controller.rb +49 -0
  998. data/core/app/controllers/admin/inventory_settings_controller.rb +13 -0
  999. data/core/app/controllers/admin/inventory_units_controller.rb +2 -0
  1000. data/core/app/controllers/admin/line_items_controller.rb +60 -0
  1001. data/core/app/controllers/admin/mail_methods_controller.rb +8 -0
  1002. data/core/app/controllers/admin/mail_settings_controller.rb +14 -0
  1003. data/core/app/controllers/admin/option_types_controller.rb +65 -0
  1004. data/core/app/controllers/admin/orders_controller.rb +136 -0
  1005. data/core/app/controllers/admin/overview_controller.rb +14 -0
  1006. data/core/app/controllers/admin/payment_methods_controller.rb +43 -0
  1007. data/core/app/controllers/admin/payments_controller.rb +107 -0
  1008. data/core/app/controllers/admin/product_groups_controller.rb +46 -0
  1009. data/core/app/controllers/admin/product_properties_controller.rb +10 -0
  1010. data/core/app/controllers/admin/product_scopes_controller.rb +35 -0
  1011. data/core/app/controllers/admin/products_controller.rb +113 -0
  1012. data/core/app/controllers/admin/products_controller.rb~ +114 -0
  1013. data/core/app/controllers/admin/properties_controller.rb +11 -0
  1014. data/core/app/controllers/admin/prototypes_controller.rb +26 -0
  1015. data/core/app/controllers/admin/reports_controller.rb +50 -0
  1016. data/core/app/controllers/admin/resource_controller.rb +232 -0
  1017. data/core/app/controllers/admin/return_authorizations_controller.rb +17 -0
  1018. data/core/app/controllers/admin/shipments_controller.rb +117 -0
  1019. data/core/app/controllers/admin/shipping_categories_controller.rb +2 -0
  1020. data/core/app/controllers/admin/shipping_methods_controller.rb +14 -0
  1021. data/core/app/controllers/admin/states_controller.rb +25 -0
  1022. data/core/app/controllers/admin/tax_categories_controller.rb +2 -0
  1023. data/core/app/controllers/admin/tax_rates_controller.rb +22 -0
  1024. data/core/app/controllers/admin/tax_settings_controller.rb +13 -0
  1025. data/core/app/controllers/admin/taxonomies_controller.rb +20 -0
  1026. data/core/app/controllers/admin/taxons_controller.rb +161 -0
  1027. data/core/app/controllers/admin/trackers_controller.rb +2 -0
  1028. data/core/app/controllers/admin/users_controller.rb +65 -0
  1029. data/core/app/controllers/admin/variants_controller.rb +51 -0
  1030. data/core/app/controllers/admin/zones_controller.rb +23 -0
  1031. data/core/app/controllers/checkout_controller.rb +97 -0
  1032. data/core/app/controllers/content_controller.rb +21 -0
  1033. data/core/app/controllers/locale_controller.rb +14 -0
  1034. data/core/app/controllers/orders_controller.rb +64 -0
  1035. data/core/app/controllers/products_controller.rb +39 -0
  1036. data/core/app/controllers/spree/base_controller.rb +4 -0
  1037. data/core/app/controllers/states_controller.rb +16 -0
  1038. data/core/app/controllers/taxons_controller.rb +22 -0
  1039. data/core/app/helpers/account_helper.rb +2 -0
  1040. data/core/app/helpers/admin/base_helper.rb +194 -0
  1041. data/core/app/helpers/admin/inventory_settings_helper.rb +5 -0
  1042. data/core/app/helpers/admin/navigation_helper.rb +162 -0
  1043. data/core/app/helpers/admin/orders_helper.rb +22 -0
  1044. data/core/app/helpers/admin/overview_helper.rb +12 -0
  1045. data/core/app/helpers/admin/payments_helper.rb +7 -0
  1046. data/core/app/helpers/admin/product_groups_helper.rb +11 -0
  1047. data/core/app/helpers/admin/product_properties_helper.rb +21 -0
  1048. data/core/app/helpers/admin/products_helper.rb +11 -0
  1049. data/core/app/helpers/admin/taxons_helper.rb +18 -0
  1050. data/core/app/helpers/admin/users_helper.rb +8 -0
  1051. data/core/app/helpers/admin/zones_helper.rb +11 -0
  1052. data/core/app/helpers/checkout_helper.rb +31 -0
  1053. data/core/app/helpers/hook_helper.rb +20 -0
  1054. data/core/app/helpers/orders_helper.rb +3 -0
  1055. data/core/app/helpers/products_helper.rb +30 -0
  1056. data/core/app/helpers/search_helper.rb +10 -0
  1057. data/core/app/helpers/spree/base_helper.rb +119 -0
  1058. data/core/app/helpers/taxons_helper.rb +32 -0
  1059. data/core/app/helpers/trackers_helper.rb +2 -0
  1060. data/core/app/mailers/order_mailer.rb +19 -0
  1061. data/core/app/mailers/shipment_mailer.rb +11 -0
  1062. data/core/app/models/address.rb +115 -0
  1063. data/core/app/models/adjustment.rb +47 -0
  1064. data/core/app/models/app_configuration.rb +44 -0
  1065. data/core/app/models/asset.rb +4 -0
  1066. data/core/app/models/billing_integration.rb +23 -0
  1067. data/core/app/models/calculator.rb +46 -0
  1068. data/core/app/models/calculator/flat_percent_item_total.rb +19 -0
  1069. data/core/app/models/calculator/flat_rate.rb +16 -0
  1070. data/core/app/models/calculator/flexi_rate.rb +32 -0
  1071. data/core/app/models/calculator/per_item.rb +16 -0
  1072. data/core/app/models/calculator/price_bucket.rb +30 -0
  1073. data/core/app/models/calculator/sales_tax.rb +48 -0
  1074. data/core/app/models/calculator/vat.rb +63 -0
  1075. data/core/app/models/configuration.rb +3 -0
  1076. data/core/app/models/country.rb +16 -0
  1077. data/core/app/models/creditcard.rb +267 -0
  1078. data/core/app/models/gateway.rb +48 -0
  1079. data/core/app/models/gateway/authorize_net.rb +19 -0
  1080. data/core/app/models/gateway/authorize_net_cim.rb +132 -0
  1081. data/core/app/models/gateway/beanstream.rb +187 -0
  1082. data/core/app/models/gateway/bogus.rb +80 -0
  1083. data/core/app/models/gateway/braintree.rb +88 -0
  1084. data/core/app/models/gateway/eway.rb +11 -0
  1085. data/core/app/models/gateway/linkpoint.rb +8 -0
  1086. data/core/app/models/gateway/pay_pal.rb +11 -0
  1087. data/core/app/models/gateway/sage_pay.rb +9 -0
  1088. data/core/app/models/image.rb +31 -0
  1089. data/core/app/models/inventory_unit.rb +119 -0
  1090. data/core/app/models/line_item.rb +95 -0
  1091. data/core/app/models/log_entry.rb +3 -0
  1092. data/core/app/models/mail_method.rb +23 -0
  1093. data/core/app/models/option_type.rb +9 -0
  1094. data/core/app/models/option_value.rb +5 -0
  1095. data/core/app/models/order.rb +484 -0
  1096. data/core/app/models/payment.rb +119 -0
  1097. data/core/app/models/payment_method.rb +56 -0
  1098. data/core/app/models/payment_method/check.rb +27 -0
  1099. data/core/app/models/preference.rb +51 -0
  1100. data/core/app/models/product.rb +258 -0
  1101. data/core/app/models/product_group.rb +216 -0
  1102. data/core/app/models/product_option_type.rb +5 -0
  1103. data/core/app/models/product_property.rb +15 -0
  1104. data/core/app/models/product_scope.rb +78 -0
  1105. data/core/app/models/property.rb +18 -0
  1106. data/core/app/models/prototype.rb +5 -0
  1107. data/core/app/models/return_authorization.rb +79 -0
  1108. data/core/app/models/role.rb +3 -0
  1109. data/core/app/models/shipment.rb +157 -0
  1110. data/core/app/models/shipping_category.rb +3 -0
  1111. data/core/app/models/shipping_method.rb +25 -0
  1112. data/core/app/models/spree/alert.rb +13 -0
  1113. data/core/app/models/state.rb +16 -0
  1114. data/core/app/models/state_event.rb +16 -0
  1115. data/core/app/models/tax_category.rb +15 -0
  1116. data/core/app/models/tax_rate.rb +16 -0
  1117. data/core/app/models/taxon.rb +52 -0
  1118. data/core/app/models/taxonomy.rb +20 -0
  1119. data/core/app/models/taxonomy.rb~ +22 -0
  1120. data/core/app/models/tracker.rb +5 -0
  1121. data/core/app/models/user.rb +21 -0
  1122. data/core/app/models/variant.rb +104 -0
  1123. data/core/app/models/zone.rb +84 -0
  1124. data/core/app/models/zone_member.rb +10 -0
  1125. data/core/app/stylesheets/_buttons.less +80 -0
  1126. data/core/app/stylesheets/_cart.less +24 -0
  1127. data/core/app/stylesheets/_checkout.less +76 -0
  1128. data/core/app/stylesheets/_checkout_progress.less +62 -0
  1129. data/core/app/stylesheets/_colors.less +16 -0
  1130. data/core/app/stylesheets/_forms.less +50 -0
  1131. data/core/app/stylesheets/_layout.less +77 -0
  1132. data/core/app/stylesheets/_messages.less +32 -0
  1133. data/core/app/stylesheets/_mixins.less +71 -0
  1134. data/core/app/stylesheets/_navigation.less +130 -0
  1135. data/core/app/stylesheets/_prices.less +18 -0
  1136. data/core/app/stylesheets/_product_details.less +56 -0
  1137. data/core/app/stylesheets/_product_lists.less +66 -0
  1138. data/core/app/stylesheets/_registration.less +24 -0
  1139. data/core/app/stylesheets/_reset.less +69 -0
  1140. data/core/app/stylesheets/_typography.less +158 -0
  1141. data/core/app/stylesheets/screen.less +13 -0
  1142. data/core/app/views/admin/adjustments/_adjustments_table.html.erb +24 -0
  1143. data/core/app/views/admin/adjustments/_form.html.erb +12 -0
  1144. data/core/app/views/admin/adjustments/edit.html.erb +13 -0
  1145. data/core/app/views/admin/adjustments/index.html.erb +4 -0
  1146. data/core/app/views/admin/adjustments/new.html.erb +14 -0
  1147. data/core/app/views/admin/configurations/index.html.erb +66 -0
  1148. data/core/app/views/admin/extensions/index.html.erb +23 -0
  1149. data/core/app/views/admin/general_settings/edit.html.erb +46 -0
  1150. data/core/app/views/admin/general_settings/show.html.erb +36 -0
  1151. data/core/app/views/admin/images/_form.html.erb +16 -0
  1152. data/core/app/views/admin/images/edit.html.erb +19 -0
  1153. data/core/app/views/admin/images/index.html.erb +69 -0
  1154. data/core/app/views/admin/images/new.html.erb +22 -0
  1155. data/core/app/views/admin/images/new.html.erb~ +22 -0
  1156. data/core/app/views/admin/inventory_settings/edit.html.erb +27 -0
  1157. data/core/app/views/admin/inventory_settings/show.html.erb +9 -0
  1158. data/core/app/views/admin/inventory_units/adjust.html.erb +33 -0
  1159. data/core/app/views/admin/mail_methods/_form.html.erb +96 -0
  1160. data/core/app/views/admin/mail_methods/edit.html.erb +9 -0
  1161. data/core/app/views/admin/mail_methods/index.html.erb +41 -0
  1162. data/core/app/views/admin/mail_methods/new.html.erb +9 -0
  1163. data/core/app/views/admin/option_types/_available.html.erb +27 -0
  1164. data/core/app/views/admin/option_types/_form.html.erb +11 -0
  1165. data/core/app/views/admin/option_types/_option_value_fields.html.erb +5 -0
  1166. data/core/app/views/admin/option_types/_selected.html.erb +26 -0
  1167. data/core/app/views/admin/option_types/available.js.erb +2 -0
  1168. data/core/app/views/admin/option_types/edit.html.erb +32 -0
  1169. data/core/app/views/admin/option_types/index.html.erb +33 -0
  1170. data/core/app/views/admin/option_types/new.erb +11 -0
  1171. data/core/app/views/admin/option_types/select.js.erb +3 -0
  1172. data/core/app/views/admin/option_types/selected.html.erb +6 -0
  1173. data/core/app/views/admin/orders/_add_product.html.erb +20 -0
  1174. data/core/app/views/admin/orders/_form.html.erb +67 -0
  1175. data/core/app/views/admin/orders/_line_item.html.erb +17 -0
  1176. data/core/app/views/admin/orders/_user_form.html.erb +42 -0
  1177. data/core/app/views/admin/orders/edit.html.erb +31 -0
  1178. data/core/app/views/admin/orders/history.html.erb +29 -0
  1179. data/core/app/views/admin/orders/index.html.erb +103 -0
  1180. data/core/app/views/admin/orders/new.html.erb +20 -0
  1181. data/core/app/views/admin/orders/show.html.erb +28 -0
  1182. data/core/app/views/admin/orders/user.html.erb +24 -0
  1183. data/core/app/views/admin/payment_methods/_form.html.erb +50 -0
  1184. data/core/app/views/admin/payment_methods/edit.html.erb +10 -0
  1185. data/core/app/views/admin/payment_methods/index.html.erb +49 -0
  1186. data/core/app/views/admin/payment_methods/new.html.erb +11 -0
  1187. data/core/app/views/admin/payments/_bill_address_form.html.erb +9 -0
  1188. data/core/app/views/admin/payments/_form.html.erb +15 -0
  1189. data/core/app/views/admin/payments/_list.html.erb +22 -0
  1190. data/core/app/views/admin/payments/_transaction_list.html.erb +24 -0
  1191. data/core/app/views/admin/payments/credit.html.erb +14 -0
  1192. data/core/app/views/admin/payments/index.html.erb +22 -0
  1193. data/core/app/views/admin/payments/new.html.erb +19 -0
  1194. data/core/app/views/admin/payments/show.html.erb +10 -0
  1195. data/core/app/views/admin/payments/source_forms/_check.html.erb +0 -0
  1196. data/core/app/views/admin/payments/source_forms/_gateway.html.erb +43 -0
  1197. data/core/app/views/admin/payments/source_views/_check.html.erb +0 -0
  1198. data/core/app/views/admin/payments/source_views/_gateway.html.erb +34 -0
  1199. data/core/app/views/admin/product_groups/_preview.html.erb +34 -0
  1200. data/core/app/views/admin/product_groups/_product_scope.html.erb +24 -0
  1201. data/core/app/views/admin/product_groups/edit.html.erb +56 -0
  1202. data/core/app/views/admin/product_groups/index.html.erb +37 -0
  1203. data/core/app/views/admin/product_groups/new.html.erb +12 -0
  1204. data/core/app/views/admin/product_groups/show.html.erb +32 -0
  1205. data/core/app/views/admin/product_groups/update.js.erb +8 -0
  1206. data/core/app/views/admin/product_properties/_product_property_fields.html.erb +11 -0
  1207. data/core/app/views/admin/product_properties/index.html.erb +55 -0
  1208. data/core/app/views/admin/product_scopes/_form.html.erb +106 -0
  1209. data/core/app/views/admin/product_scopes/create.js.erb +3 -0
  1210. data/core/app/views/admin/product_scopes/destroy.js.erb +3 -0
  1211. data/core/app/views/admin/product_scopes/new.html.erb +1 -0
  1212. data/core/app/views/admin/products/_form.html.erb +112 -0
  1213. data/core/app/views/admin/products/_option_types.html.erb +40 -0
  1214. data/core/app/views/admin/products/_properties_form.erb +7 -0
  1215. data/core/app/views/admin/products/edit.html.erb +10 -0
  1216. data/core/app/views/admin/products/edit.html.erb~ +10 -0
  1217. data/core/app/views/admin/products/index.html.erb +81 -0
  1218. data/core/app/views/admin/products/index.html.erb~ +81 -0
  1219. data/core/app/views/admin/products/new.erb +58 -0
  1220. data/core/app/views/admin/products/new.erb~ +53 -0
  1221. data/core/app/views/admin/products/show.html.erb +4 -0
  1222. data/core/app/views/admin/products/show.html.erb~ +4 -0
  1223. data/core/app/views/admin/properties/_form.html.erb +12 -0
  1224. data/core/app/views/admin/properties/edit.html.erb +10 -0
  1225. data/core/app/views/admin/properties/filtered.html.erb +1 -0
  1226. data/core/app/views/admin/properties/index.html.erb +40 -0
  1227. data/core/app/views/admin/properties/new.erb +11 -0
  1228. data/core/app/views/admin/prototypes/_form.html.erb +44 -0
  1229. data/core/app/views/admin/prototypes/available.html.erb +22 -0
  1230. data/core/app/views/admin/prototypes/edit.html.erb +9 -0
  1231. data/core/app/views/admin/prototypes/index.html.erb +37 -0
  1232. data/core/app/views/admin/prototypes/new.erb +11 -0
  1233. data/core/app/views/admin/prototypes/select.js.erb +4 -0
  1234. data/core/app/views/admin/reports/index.html.erb +19 -0
  1235. data/core/app/views/admin/reports/sales_total.html.erb +23 -0
  1236. data/core/app/views/admin/return_authorizations/_form.html.erb +78 -0
  1237. data/core/app/views/admin/return_authorizations/edit.html.erb +27 -0
  1238. data/core/app/views/admin/return_authorizations/index.html.erb +45 -0
  1239. data/core/app/views/admin/return_authorizations/new.html.erb +13 -0
  1240. data/core/app/views/admin/shared/_additional_field.html.erb +5 -0
  1241. data/core/app/views/admin/shared/_address.html.erb +5 -0
  1242. data/core/app/views/admin/shared/_address_form.html.erb +79 -0
  1243. data/core/app/views/admin/shared/_alert.html.erb +6 -0
  1244. data/core/app/views/admin/shared/_calculator_fields.html.erb +19 -0
  1245. data/core/app/views/admin/shared/_configuration_menu.html.erb +22 -0
  1246. data/core/app/views/admin/shared/_destroy.js.erb +16 -0
  1247. data/core/app/views/admin/shared/_edit_resource_links.html.erb +4 -0
  1248. data/core/app/views/admin/shared/_group_from_products_form.html.erb +12 -0
  1249. data/core/app/views/admin/shared/_new_adjustment_button.html.erb +8 -0
  1250. data/core/app/views/admin/shared/_new_resource_links.html.erb +4 -0
  1251. data/core/app/views/admin/shared/_order_details.html.erb +3 -0
  1252. data/core/app/views/admin/shared/_order_sub_menu.html.erb +0 -0
  1253. data/core/app/views/admin/shared/_order_tabs.html.erb +64 -0
  1254. data/core/app/views/admin/shared/_product_sub_menu.html.erb +11 -0
  1255. data/core/app/views/admin/shared/_product_tabs.html.erb +34 -0
  1256. data/core/app/views/admin/shared/_report_criteria.html.erb +15 -0
  1257. data/core/app/views/admin/shared/_show_resource_links.html.erb +5 -0
  1258. data/core/app/views/admin/shared/_tabs.html.erb +6 -0
  1259. data/core/app/views/admin/shared/_update_order_state.js +6 -0
  1260. data/core/app/views/admin/shipments/_form.html.erb +77 -0
  1261. data/core/app/views/admin/shipments/edit.html.erb +40 -0
  1262. data/core/app/views/admin/shipments/index.html.erb +47 -0
  1263. data/core/app/views/admin/shipments/new.html.erb +18 -0
  1264. data/core/app/views/admin/shipping_categories/_form.html.erb +6 -0
  1265. data/core/app/views/admin/shipping_categories/edit.html.erb +6 -0
  1266. data/core/app/views/admin/shipping_categories/index.html.erb +29 -0
  1267. data/core/app/views/admin/shipping_categories/new.html.erb +8 -0
  1268. data/core/app/views/admin/shipping_methods/_form.html.erb +26 -0
  1269. data/core/app/views/admin/shipping_methods/edit.html.erb +16 -0
  1270. data/core/app/views/admin/shipping_methods/index.html.erb +49 -0
  1271. data/core/app/views/admin/shipping_methods/new.html.erb +17 -0
  1272. data/core/app/views/admin/states/_form.html.erb +9 -0
  1273. data/core/app/views/admin/states/_state_list.html.erb +34 -0
  1274. data/core/app/views/admin/states/edit.html.erb +10 -0
  1275. data/core/app/views/admin/states/index.html.erb +16 -0
  1276. data/core/app/views/admin/states/new.erb +8 -0
  1277. data/core/app/views/admin/tax_categories/_form.html.erb +12 -0
  1278. data/core/app/views/admin/tax_categories/edit.html.erb +10 -0
  1279. data/core/app/views/admin/tax_categories/index.html.erb +44 -0
  1280. data/core/app/views/admin/tax_categories/new.html.erb +10 -0
  1281. data/core/app/views/admin/tax_categories/show.html.erb +1 -0
  1282. data/core/app/views/admin/tax_rates/_form.html.erb +16 -0
  1283. data/core/app/views/admin/tax_rates/edit.html.erb +6 -0
  1284. data/core/app/views/admin/tax_rates/index.html.erb +34 -0
  1285. data/core/app/views/admin/tax_rates/new.html.erb +8 -0
  1286. data/core/app/views/admin/tax_settings/edit.html.erb +17 -0
  1287. data/core/app/views/admin/tax_settings/show.html.erb +14 -0
  1288. data/core/app/views/admin/taxonomies/_form.html.erb +10 -0
  1289. data/core/app/views/admin/taxonomies/_form.html.erb~ +11 -0
  1290. data/core/app/views/admin/taxonomies/_js_head.html.erb +9 -0
  1291. data/core/app/views/admin/taxonomies/_list.html.erb +19 -0
  1292. data/core/app/views/admin/taxonomies/_list.html.erb~ +20 -0
  1293. data/core/app/views/admin/taxonomies/_taxon.html.erb +12 -0
  1294. data/core/app/views/admin/taxonomies/edit.erb +49 -0
  1295. data/core/app/views/admin/taxonomies/get_children.json.erb +9 -0
  1296. data/core/app/views/admin/taxonomies/index.html.erb +16 -0
  1297. data/core/app/views/admin/taxonomies/new.html.erb +12 -0
  1298. data/core/app/views/admin/taxons/_form.html.erb +23 -0
  1299. data/core/app/views/admin/taxons/_taxon_table.html.erb +23 -0
  1300. data/core/app/views/admin/taxons/available.js.erb +33 -0
  1301. data/core/app/views/admin/taxons/edit.html.erb +11 -0
  1302. data/core/app/views/admin/taxons/remove.html.erb +1 -0
  1303. data/core/app/views/admin/taxons/select.js.erb +2 -0
  1304. data/core/app/views/admin/taxons/selected.html.erb +43 -0
  1305. data/core/app/views/admin/trackers/_form.html.erb +26 -0
  1306. data/core/app/views/admin/trackers/edit.html.erb +8 -0
  1307. data/core/app/views/admin/trackers/index.html.erb +41 -0
  1308. data/core/app/views/admin/trackers/new.html.erb +9 -0
  1309. data/core/app/views/admin/users/_form.html.erb +35 -0
  1310. data/core/app/views/admin/users/edit.html.erb +14 -0
  1311. data/core/app/views/admin/users/index.html.erb +63 -0
  1312. data/core/app/views/admin/users/new.html.erb +14 -0
  1313. data/core/app/views/admin/users/show.html.erb +21 -0
  1314. data/core/app/views/admin/variants/_form.html.erb +40 -0
  1315. data/core/app/views/admin/variants/edit.html.erb +13 -0
  1316. data/core/app/views/admin/variants/index.html.erb +66 -0
  1317. data/core/app/views/admin/variants/new.erb +11 -0
  1318. data/core/app/views/admin/zones/_country_member.html.erb +5 -0
  1319. data/core/app/views/admin/zones/_form.html.erb +29 -0
  1320. data/core/app/views/admin/zones/_member_type.html.erb +15 -0
  1321. data/core/app/views/admin/zones/_state_member.html.erb +5 -0
  1322. data/core/app/views/admin/zones/_zone_member.html.erb +5 -0
  1323. data/core/app/views/admin/zones/edit.html.erb +10 -0
  1324. data/core/app/views/admin/zones/index.html.erb +41 -0
  1325. data/core/app/views/admin/zones/new.html.erb +10 -0
  1326. data/core/app/views/checkout/_address.html.erb +163 -0
  1327. data/core/app/views/checkout/_confirm.html.erb +11 -0
  1328. data/core/app/views/checkout/_delivery.html.erb +25 -0
  1329. data/core/app/views/checkout/_payment.html.erb +30 -0
  1330. data/core/app/views/checkout/_summary.html.erb +21 -0
  1331. data/core/app/views/checkout/edit.html.erb +20 -0
  1332. data/core/app/views/checkout/payment/_check.html.erb +0 -0
  1333. data/core/app/views/checkout/payment/_gateway.html.erb +31 -0
  1334. data/core/app/views/checkout/registration.html.erb +20 -0
  1335. data/core/app/views/content/cvv.html.erb +13 -0
  1336. data/core/app/views/layouts/admin.html.erb +75 -0
  1337. data/core/app/views/layouts/spree_application.html.erb +52 -0
  1338. data/core/app/views/order_mailer/cancel_email.text.erb +16 -0
  1339. data/core/app/views/order_mailer/confirm_email.text.erb +19 -0
  1340. data/core/app/views/orders/_form.html.erb +19 -0
  1341. data/core/app/views/orders/_line_item.html.erb +41 -0
  1342. data/core/app/views/orders/edit.html.erb +41 -0
  1343. data/core/app/views/orders/new.html.erb +9 -0
  1344. data/core/app/views/orders/show.html.erb +14 -0
  1345. data/core/app/views/products/_cart_form.html.erb +54 -0
  1346. data/core/app/views/products/_cart_form.html.erb~ +54 -0
  1347. data/core/app/views/products/_image.html.erb +5 -0
  1348. data/core/app/views/products/_image.html.erb~ +5 -0
  1349. data/core/app/views/products/_properties.html.erb +8 -0
  1350. data/core/app/views/products/_taxons.html.erb +16 -0
  1351. data/core/app/views/products/_thumbnails.html.erb +40 -0
  1352. data/core/app/views/products/index.html.erb +37 -0
  1353. data/core/app/views/products/show.html.erb +31 -0
  1354. data/core/app/views/shared/_additional_field.html.erb +7 -0
  1355. data/core/app/views/shared/_admin_head.html.erb +34 -0
  1356. data/core/app/views/shared/_basic_layout.html.erb +44 -0
  1357. data/core/app/views/shared/_edit_resource_links.html.erb +1 -0
  1358. data/core/app/views/shared/_end_soon.html.erb +43 -0
  1359. data/core/app/views/shared/_error_messages.html.erb +11 -0
  1360. data/core/app/views/shared/_filters.html.erb +27 -0
  1361. data/core/app/views/shared/_footer.html.erb +13 -0
  1362. data/core/app/views/shared/_google_analytics.html.erb +40 -0
  1363. data/core/app/views/shared/_head.html.erb +10 -0
  1364. data/core/app/views/shared/_method_error_message.html.erb +4 -0
  1365. data/core/app/views/shared/_nav_bar.html.erb +5 -0
  1366. data/core/app/views/shared/_new_release.html.erb +42 -0
  1367. data/core/app/views/shared/_new_resource_links.html.erb +1 -0
  1368. data/core/app/views/shared/_order_details.html.erb +50 -0
  1369. data/core/app/views/shared/_products.html.erb +42 -0
  1370. data/core/app/views/shared/_search.html.erb +9 -0
  1371. data/core/app/views/shared/_show_resource_links.html.erb +3 -0
  1372. data/core/app/views/shared/_store_menu.html.erb +3 -0
  1373. data/core/app/views/shared/_taxonomies.html.erb +19 -0
  1374. data/core/app/views/shared/_test_hook.html.erb +1 -0
  1375. data/core/app/views/shared/_upcoming_products.html.erb +42 -0
  1376. data/core/app/views/shipment_mailer/shipped_email.text.erb +15 -0
  1377. data/core/app/views/states/index.js.erb +1 -0
  1378. data/core/app/views/taxons/_taxon.html.erb +4 -0
  1379. data/core/app/views/taxons/show.html.erb +19 -0
  1380. data/core/config/cucumber.yml +10 -0
  1381. data/core/config/initializers/form_builder.rb +19 -0
  1382. data/core/config/initializers/load_unobtrusive_date_picker.rb +8 -0
  1383. data/core/config/initializers/spree.rb +29 -0
  1384. data/core/config/initializers/workarounds_for_ruby19.rb +72 -0
  1385. data/core/config/locales/en.yml +1015 -0
  1386. data/core/config/routes.rb +207 -0
  1387. data/core/db/default/countries.yml +1583 -0
  1388. data/core/db/default/roles.yml +7 -0
  1389. data/core/db/default/states.yml +256 -0
  1390. data/core/db/default/zone_members.yml +169 -0
  1391. data/core/db/default/zones.yml +13 -0
  1392. data/core/db/migrate/20090823005402_spree_zero_nine_zero.rb +442 -0
  1393. data/core/db/migrate/20090904192342_create_indexes_for_inventory_units.rb +12 -0
  1394. data/core/db/migrate/20090923100315_add_count_on_hand_to_variants_and_products.rb +36 -0
  1395. data/core/db/migrate/20091007134354_change_taxons_to_nested_set.rb +40 -0
  1396. data/core/db/migrate/20091008091614_move_to_configurable_gateways.rb +55 -0
  1397. data/core/db/migrate/20091012120519_product_groups_and_scopes.rb +25 -0
  1398. data/core/db/migrate/20091015110842_add_open_id_authentication_tables.rb +20 -0
  1399. data/core/db/migrate/20091015153048_add_openid_field_to_users.rb +19 -0
  1400. data/core/db/migrate/20091016174634_change_preference_value_type.rb +10 -0
  1401. data/core/db/migrate/20091017175558_create_billing_integrations.rb +16 -0
  1402. data/core/db/migrate/20091021133257_charge_refactoring.rb +35 -0
  1403. data/core/db/migrate/20091104151730_add_some_indexes.rb +21 -0
  1404. data/core/db/migrate/20091126190904_checkout_state_machine.rb +13 -0
  1405. data/core/db/migrate/20091209153045_state_for_shipments.rb +9 -0
  1406. data/core/db/migrate/20091209202200_make_state_events_polymorphic.rb +12 -0
  1407. data/core/db/migrate/20091211203813_ship_address_id_for_checkouts.rb +9 -0
  1408. data/core/db/migrate/20091212161118_shipping_method_id_for_checkouts.rb +9 -0
  1409. data/core/db/migrate/20091213222815_creditcard_last_four_digits.rb +19 -0
  1410. data/core/db/migrate/20091214183826_populate_legacy_shipment_state.rb +19 -0
  1411. data/core/db/migrate/20100105090147_add_cost_price.rb +9 -0
  1412. data/core/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +21 -0
  1413. data/core/db/migrate/20100111205525_cim_fields_for_creditcards.rb +11 -0
  1414. data/core/db/migrate/20100112151511_create_return_authorizations.rb +16 -0
  1415. data/core/db/migrate/20100113090919_add_return_authorization_to_inventory_units.rb +9 -0
  1416. data/core/db/migrate/20100113203104_create_trackers.rb +14 -0
  1417. data/core/db/migrate/20100121160010_creditcard_id_for_creditcard_txns.rb +9 -0
  1418. data/core/db/migrate/20100121183934_original_creditcard_txn_id_for_creditcard_txns.rb +9 -0
  1419. data/core/db/migrate/20100125145351_add_test_mode_to_billing_integration.rb +11 -0
  1420. data/core/db/migrate/20100126103714_create_products_product_groups.rb +12 -0
  1421. data/core/db/migrate/20100209025806_create_payment_methods.rb +20 -0
  1422. data/core/db/migrate/20100209144531_polymorphic_payments.rb +29 -0
  1423. data/core/db/migrate/20100213103131_change_payments_payment_method_to_belongs_to.rb +11 -0
  1424. data/core/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +16 -0
  1425. data/core/db/migrate/20100223170312_sti_for_transactions.rb +14 -0
  1426. data/core/db/migrate/20100223183812_drop_billing_integrations.rb +16 -0
  1427. data/core/db/migrate/20100224153127_deleted_at_for_payment_methods.rb +13 -0
  1428. data/core/db/migrate/20100301163454_add_adjustments_index.rb +10 -0
  1429. data/core/db/migrate/20100306153445_fix_by_popularity.rb +8 -0
  1430. data/core/db/migrate/20100317120946_add_alt_text_to_images.rb +9 -0
  1431. data/core/db/migrate/20100427121301_add_display_to_payment_methods.rb +9 -0
  1432. data/core/db/migrate/20100504142133_add_addresses_checkouts_indexes.rb +16 -0
  1433. data/core/db/migrate/20100506180619_add_icon_to_taxons.rb +18 -0
  1434. data/core/db/migrate/20100506185838_add_description_to_taxons.rb +11 -0
  1435. data/core/db/migrate/20100528155333_index_for_shipments_number.rb +9 -0
  1436. data/core/db/migrate/20100528185820_add_index_on_users_persistence_token.rb +9 -0
  1437. data/core/db/migrate/20100605152042_add_default_to_tax_categories.rb +9 -0
  1438. data/core/db/migrate/20100624110730_add_display_to_shipping_methods.rb +9 -0
  1439. data/core/db/migrate/20100624123336_rename_payment_method_display.rb +9 -0
  1440. data/core/db/migrate/20100624175547_rename_preferences_field.rb +8 -0
  1441. data/core/db/migrate/20100811163637_add_guest_flag.rb +13 -0
  1442. data/core/db/migrate/20100811205836_drop_order_token.rb +11 -0
  1443. data/core/db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb +11 -0
  1444. data/core/db/migrate/20100813023502_create_address_keys_for_order.rb +15 -0
  1445. data/core/db/migrate/20100813185745_payment_total_for_orders.rb +9 -0
  1446. data/core/db/migrate/20100816212146_shipping_method_id_for_orders.rb +9 -0
  1447. data/core/db/migrate/20100817152723_add_shipment_and_payment_state.rb +15 -0
  1448. data/core/db/migrate/20100819170125_refactor_adjustments.rb +19 -0
  1449. data/core/db/migrate/20100820135707_response_code_and_avs_response_for_payments.rb +11 -0
  1450. data/core/db/migrate/20100901171814_change_guest_flag_to_anonymous.rb +13 -0
  1451. data/core/db/migrate/20100903203949_email_for_orders.rb +9 -0
  1452. data/core/db/migrate/20100923162011_create_mail_methods.rb +12 -0
  1453. data/core/db/migrate/20100929151905_rename_frozen_to_locked.rb +8 -0
  1454. data/core/db/migrate/20101008190536_move_special_instructions_to_orders.rb +11 -0
  1455. data/core/db/migrate/20101026184700_create_log_entries.rb +15 -0
  1456. data/core/db/migrate/20101026184714_migrate_transactions_to_payment_state.rb +94 -0
  1457. data/core/db/migrate/20101026184746_delete_in_progress_orders.rb +18 -0
  1458. data/core/db/migrate/20101026184808_migrate_checkout_to_orders.rb +27 -0
  1459. data/core/db/migrate/20101026184833_migrate_adjustments.rb +9 -0
  1460. data/core/db/migrate/20101026184855_remove_shipped_state.rb +14 -0
  1461. data/core/db/migrate/20101026184916_prevent_nil_payment_total.rb +8 -0
  1462. data/core/db/migrate/20101026184932_prevent_nil_email.rb +9 -0
  1463. data/core/db/migrate/20101026184959_generate_anonymous_users.rb +14 -0
  1464. data/core/db/migrate/20101026185022_update_order_state.rb +8 -0
  1465. data/core/db/migrate/20101026192225_cleanup_legacy_tables.rb +11 -0
  1466. data/core/db/migrate/20101028151745_remove_number_and_cvv_from_credicard.rb +9 -0
  1467. data/core/db/migrate/20101103212716_drop_anonymous_field_for_user.rb +8 -0
  1468. data/core/db/migrate/20101111133551_renamed_rma_cancelled_state.rb +10 -0
  1469. data/core/db/migrate/20101117031806_fix_problematic_index_names.rb +13 -0
  1470. data/core/db/migrate/20101223215658_add_position_to_variants.rb +9 -0
  1471. data/core/db/migrate/20110110130847_add_next_state_to_state_events.rb +9 -0
  1472. data/core/db/migrate/20110111122537_add_position_to_option_types.rb +9 -0
  1473. data/core/db/migrate/20110314192118_remove_trailing_slashes_in_taxon_permalinks.rb +17 -0
  1474. data/core/db/sample/users.rb +61 -0
  1475. data/core/db/seeds.rb +3 -0
  1476. data/core/features/admin/configuration/analytics_tracker.feature +27 -0
  1477. data/core/features/admin/configuration/general_settings.feature +22 -0
  1478. data/core/features/admin/configuration/inventory_settings.feature +15 -0
  1479. data/core/features/admin/configuration/mail_methods.feature +32 -0
  1480. data/core/features/admin/configuration/payment_methods.feature +41 -0
  1481. data/core/features/admin/configuration/shipping_methods.feature +21 -0
  1482. data/core/features/admin/configuration/states.feature +42 -0
  1483. data/core/features/admin/configuration/tax_categories.feature +40 -0
  1484. data/core/features/admin/configuration/taxonomies.feature +42 -0
  1485. data/core/features/admin/configuration/zones.feature +25 -0
  1486. data/core/features/admin/homepage.feature +45 -0
  1487. data/core/features/admin/orders/adjustments.feature +76 -0
  1488. data/core/features/admin/orders/customer_details.feature +45 -0
  1489. data/core/features/admin/orders/history.feature +10 -0
  1490. data/core/features/admin/orders/listing.feature +55 -0
  1491. data/core/features/admin/orders/order_details.feature +74 -0
  1492. data/core/features/admin/orders/payments.feature +84 -0
  1493. data/core/features/admin/orders/return_authorizations.feature +0 -0
  1494. data/core/features/admin/orders/shipments.feature +38 -0
  1495. data/core/features/admin/products/edit/images.feature +22 -0
  1496. data/core/features/admin/products/edit/option_types.feature +34 -0
  1497. data/core/features/admin/products/edit/product_details.feature +16 -0
  1498. data/core/features/admin/products/edit/product_properties.feature +57 -0
  1499. data/core/features/admin/products/edit/taxons.feature +26 -0
  1500. data/core/features/admin/products/edit/variants.feature +67 -0
  1501. data/core/features/admin/products/option_types.feature +37 -0
  1502. data/core/features/admin/products/product_groups.feature +244 -0
  1503. data/core/features/admin/products/products.feature +127 -0
  1504. data/core/features/admin/products/properties.feature +41 -0
  1505. data/core/features/admin/products/prototypes.feature +47 -0
  1506. data/core/features/admin/reports.feature +17 -0
  1507. data/core/features/admin/users.feature +77 -0
  1508. data/core/features/products.feature +73 -0
  1509. data/core/features/step_definitions/admin/configurations.rb +59 -0
  1510. data/core/features/step_definitions/admin/configurations/mail_methods.rb +11 -0
  1511. data/core/features/step_definitions/admin/configurations/payment_method.rb +13 -0
  1512. data/core/features/step_definitions/admin/configurations/tax_categories.rb +10 -0
  1513. data/core/features/step_definitions/admin/configurations/taxonomies.rb +8 -0
  1514. data/core/features/step_definitions/admin/option_types.rb +9 -0
  1515. data/core/features/step_definitions/admin/orders.rb +68 -0
  1516. data/core/features/step_definitions/admin/product_groups.rb +62 -0
  1517. data/core/features/step_definitions/admin/products.rb +39 -0
  1518. data/core/features/step_definitions/admin/products/images.rb +4 -0
  1519. data/core/features/step_definitions/admin/products/product_properties.rb +9 -0
  1520. data/core/features/step_definitions/admin/products/taxons.rb +19 -0
  1521. data/core/features/step_definitions/admin/properties.rb +16 -0
  1522. data/core/features/step_definitions/admin/prototypes.rb +9 -0
  1523. data/core/features/step_definitions/admin/reports.rb +23 -0
  1524. data/core/features/step_definitions/admin/users.rb +15 -0
  1525. data/core/features/step_definitions/orders/adjustments.rb +8 -0
  1526. data/core/features/step_definitions/orders/history.rb +19 -0
  1527. data/core/features/step_definitions/orders/order_details.rb +46 -0
  1528. data/core/features/step_definitions/orders/payments.rb +31 -0
  1529. data/core/features/step_definitions/orders/shipments.rb +9 -0
  1530. data/core/features/step_definitions/product.rb +134 -0
  1531. data/core/features/step_definitions/ror_ringer.jpeg +0 -0
  1532. data/core/features/support/env.rb +5 -0
  1533. data/core/features/support/paths.rb +42 -0
  1534. data/core/lib/custom_fixtures.rb +7 -0
  1535. data/core/lib/generators/spree_core/upgrade_generator.rb +23 -0
  1536. data/core/lib/generators/templates/config/initializers/%file_name%.rb.tt +1 -0
  1537. data/core/lib/generators/templates/config/locales/%current_locale%.yml.tt +2 -0
  1538. data/core/lib/generators/templates/config/routes.rb +3 -0
  1539. data/core/lib/middleware/seo_assist.rb +44 -0
  1540. data/core/lib/product_filters.rb +179 -0
  1541. data/core/lib/redirect_legacy_product_url.rb +13 -0
  1542. data/core/lib/scopes.rb +69 -0
  1543. data/core/lib/scopes/dynamic.rb +31 -0
  1544. data/core/lib/scopes/product.rb +266 -0
  1545. data/core/lib/scopes/variant.rb +18 -0
  1546. data/core/lib/spree/calculated_adjustments.rb +69 -0
  1547. data/core/lib/spree/config.rb +33 -0
  1548. data/core/lib/spree/current_order.rb +30 -0
  1549. data/core/lib/spree/file_utilz.rb +73 -0
  1550. data/core/lib/spree/gateway_error.rb +3 -0
  1551. data/core/lib/spree/mail_interceptor.rb +23 -0
  1552. data/core/lib/spree/mail_settings.rb +33 -0
  1553. data/core/lib/spree/preference_access.rb +27 -0
  1554. data/core/lib/spree/search/base.rb +64 -0
  1555. data/core/lib/spree_base.rb +116 -0
  1556. data/core/lib/spree_core.rb +94 -0
  1557. data/core/lib/spree_core/action_callbacks.rb +26 -0
  1558. data/core/lib/spree_core/authorize_net_cim_hack.rb +871 -0
  1559. data/core/lib/spree_core/delegate_belongs_to.rb +89 -0
  1560. data/core/lib/spree_core/enumerable_constants.rb +209 -0
  1561. data/core/lib/spree_core/ext/active_record.rb +15 -0
  1562. data/core/lib/spree_core/ext/array.rb +14 -0
  1563. data/core/lib/spree_core/ext/hash.rb +75 -0
  1564. data/core/lib/spree_core/ext/string.rb +10 -0
  1565. data/core/lib/spree_core/preferences/model_hooks.rb +293 -0
  1566. data/core/lib/spree_core/preferences/preference_definition.rb +53 -0
  1567. data/core/lib/spree_core/railtie.rb +63 -0
  1568. data/core/lib/spree_core/spree_custom_responder.rb +29 -0
  1569. data/core/lib/spree_core/spree_respond_with.rb +57 -0
  1570. data/core/lib/spree_core/ssl_requirement.rb +104 -0
  1571. data/core/lib/spree_core/testing_support/factories.rb +13 -0
  1572. data/core/lib/spree_core/testing_support/factories/address_factory.rb +20 -0
  1573. data/core/lib/spree_core/testing_support/factories/adjustment_factory.rb +6 -0
  1574. data/core/lib/spree_core/testing_support/factories/calculator_factory.rb +5 -0
  1575. data/core/lib/spree_core/testing_support/factories/configuraion_factory.rb +4 -0
  1576. data/core/lib/spree_core/testing_support/factories/country_factory.rb +7 -0
  1577. data/core/lib/spree_core/testing_support/factories/creditcard_factory.rb +11 -0
  1578. data/core/lib/spree_core/testing_support/factories/inventory_unit_factory.rb +7 -0
  1579. data/core/lib/spree_core/testing_support/factories/line_item_factory.rb +8 -0
  1580. data/core/lib/spree_core/testing_support/factories/mail_method_factory.rb +4 -0
  1581. data/core/lib/spree_core/testing_support/factories/options_factory.rb +10 -0
  1582. data/core/lib/spree_core/testing_support/factories/order_factory.rb +18 -0
  1583. data/core/lib/spree_core/testing_support/factories/payment_factory.rb +26 -0
  1584. data/core/lib/spree_core/testing_support/factories/payment_method_factory.rb +17 -0
  1585. data/core/lib/spree_core/testing_support/factories/product_factory.rb +16 -0
  1586. data/core/lib/spree_core/testing_support/factories/product_group_factory.rb +3 -0
  1587. data/core/lib/spree_core/testing_support/factories/product_option_type_factory.rb +4 -0
  1588. data/core/lib/spree_core/testing_support/factories/product_property_factory.rb +4 -0
  1589. data/core/lib/spree_core/testing_support/factories/product_scope_factory.rb +6 -0
  1590. data/core/lib/spree_core/testing_support/factories/property_factory.rb +4 -0
  1591. data/core/lib/spree_core/testing_support/factories/prototype_factory.rb +4 -0
  1592. data/core/lib/spree_core/testing_support/factories/return_authorization_factory.rb +8 -0
  1593. data/core/lib/spree_core/testing_support/factories/role_factory.rb +9 -0
  1594. data/core/lib/spree_core/testing_support/factories/shipment_factory.rb +9 -0
  1595. data/core/lib/spree_core/testing_support/factories/shipping_category_factory.rb +5 -0
  1596. data/core/lib/spree_core/testing_support/factories/shipping_method_factory.rb +11 -0
  1597. data/core/lib/spree_core/testing_support/factories/state_factory.rb +11 -0
  1598. data/core/lib/spree_core/testing_support/factories/tax_category_factory.rb +8 -0
  1599. data/core/lib/spree_core/testing_support/factories/tax_rate_factory.rb +5 -0
  1600. data/core/lib/spree_core/testing_support/factories/taxon_factory.rb +5 -0
  1601. data/core/lib/spree_core/testing_support/factories/taxonomy_factory.rb +3 -0
  1602. data/core/lib/spree_core/testing_support/factories/tracker_factory.rb +5 -0
  1603. data/core/lib/spree_core/testing_support/factories/user_factory.rb +15 -0
  1604. data/core/lib/spree_core/testing_support/factories/variant_factory.rb +14 -0
  1605. data/core/lib/spree_core/testing_support/factories/zone_factory.rb +18 -0
  1606. data/core/lib/spree_core/theme_support.rb +4 -0
  1607. data/core/lib/spree_core/theme_support/hook.rb +51 -0
  1608. data/core/lib/spree_core/theme_support/hook_listener.rb +68 -0
  1609. data/core/lib/spree_core/theme_support/hook_modifier.rb +35 -0
  1610. data/core/lib/spree_core/theme_support/more_patches.rb +118 -0
  1611. data/core/lib/spree_core/version.rb +5 -0
  1612. data/core/lib/store_helpers.rb +10 -0
  1613. data/core/lib/tasks/common.rb +30 -0
  1614. data/core/lib/tasks/core.rake +105 -0
  1615. data/core/lib/tasks/install.rake +26 -0
  1616. data/core/lib/tasks/rake_util.rb +19 -0
  1617. data/core/lib/tasks/taxon.rake +14 -0
  1618. data/core/lib/tasks/themes.rake +34 -0
  1619. data/core/public/images/add-to-cart.png +0 -0
  1620. data/core/public/images/admin/bg/active-tab.png +0 -0
  1621. data/core/public/images/admin/bg/admin_tab_back.png +0 -0
  1622. data/core/public/images/admin/bg/admin_tab_selected_back.png +0 -0
  1623. data/core/public/images/admin/bg/content-back-blue.png +0 -0
  1624. data/core/public/images/admin/bg/content-back-green.png +0 -0
  1625. data/core/public/images/admin/bg/content-back.png +0 -0
  1626. data/core/public/images/admin/bg/flash-error.png +0 -0
  1627. data/core/public/images/admin/bg/flash-notice.png +0 -0
  1628. data/core/public/images/admin/bg/green-stripes.gif +0 -0
  1629. data/core/public/images/admin/bg/green-stripes.png +0 -0
  1630. data/core/public/images/admin/bg/grid_header_back.png +0 -0
  1631. data/core/public/images/admin/bg/grid_header_back_green.png +0 -0
  1632. data/core/public/images/admin/bg/header-bg.png +0 -0
  1633. data/core/public/images/admin/bg/header.png +0 -0
  1634. data/core/public/images/admin/bg/header_bg.jpg +0 -0
  1635. data/core/public/images/admin/bg/menu-current.png +0 -0
  1636. data/core/public/images/admin/bg/red-stripes.gif +0 -0
  1637. data/core/public/images/admin/bg/red-stripes.png +0 -0
  1638. data/core/public/images/admin/bg/spree_50.png +0 -0
  1639. data/core/public/images/admin/bg/subnav-divider.png +0 -0
  1640. data/core/public/images/admin/bg/subnav.png +0 -0
  1641. data/core/public/images/admin/bg/tab-back.png +0 -0
  1642. data/core/public/images/admin/buttons/blue/left_01.png +0 -0
  1643. data/core/public/images/admin/buttons/blue/right_01.png +0 -0
  1644. data/core/public/images/admin/buttons/drag-handle-green.png +0 -0
  1645. data/core/public/images/admin/buttons/green/left_01.png +0 -0
  1646. data/core/public/images/admin/buttons/green/right_01.png +0 -0
  1647. data/core/public/images/admin/buttons/left_01.png +0 -0
  1648. data/core/public/images/admin/buttons/left_01_small.png +0 -0
  1649. data/core/public/images/admin/buttons/orange/left_03.png +0 -0
  1650. data/core/public/images/admin/buttons/orange/right_03.png +0 -0
  1651. data/core/public/images/admin/buttons/right_01.png +0 -0
  1652. data/core/public/images/admin/buttons/right_01_small.png +0 -0
  1653. data/core/public/images/admin/icons/16x16/1.png +0 -0
  1654. data/core/public/images/admin/icons/16x16/10.png +0 -0
  1655. data/core/public/images/admin/icons/16x16/2.png +0 -0
  1656. data/core/public/images/admin/icons/16x16/3.png +0 -0
  1657. data/core/public/images/admin/icons/16x16/4.png +0 -0
  1658. data/core/public/images/admin/icons/16x16/5.png +0 -0
  1659. data/core/public/images/admin/icons/16x16/6.png +0 -0
  1660. data/core/public/images/admin/icons/16x16/7.png +0 -0
  1661. data/core/public/images/admin/icons/16x16/8.png +0 -0
  1662. data/core/public/images/admin/icons/16x16/9.png +0 -0
  1663. data/core/public/images/admin/icons/32x32/1.png +0 -0
  1664. data/core/public/images/admin/icons/32x32/10.png +0 -0
  1665. data/core/public/images/admin/icons/32x32/11.png +0 -0
  1666. data/core/public/images/admin/icons/32x32/2.png +0 -0
  1667. data/core/public/images/admin/icons/32x32/3.png +0 -0
  1668. data/core/public/images/admin/icons/32x32/4.png +0 -0
  1669. data/core/public/images/admin/icons/32x32/5.png +0 -0
  1670. data/core/public/images/admin/icons/32x32/6.png +0 -0
  1671. data/core/public/images/admin/icons/32x32/7.png +0 -0
  1672. data/core/public/images/admin/icons/32x32/8.png +0 -0
  1673. data/core/public/images/admin/icons/32x32/9.png +0 -0
  1674. data/core/public/images/admin/icons/accept.png +0 -0
  1675. data/core/public/images/admin/icons/add.gif +0 -0
  1676. data/core/public/images/admin/icons/add.png +0 -0
  1677. data/core/public/images/admin/icons/arrow-down.gif +0 -0
  1678. data/core/public/images/admin/icons/cross.png +0 -0
  1679. data/core/public/images/admin/icons/delete.gif +0 -0
  1680. data/core/public/images/admin/icons/delete.png +0 -0
  1681. data/core/public/images/admin/icons/drag.gif +0 -0
  1682. data/core/public/images/admin/icons/edit.gif +0 -0
  1683. data/core/public/images/admin/icons/edit.png +0 -0
  1684. data/core/public/images/admin/icons/email.png +0 -0
  1685. data/core/public/images/admin/icons/error.png +0 -0
  1686. data/core/public/images/admin/icons/exclamation.png +0 -0
  1687. data/core/public/images/admin/icons/feed.png +0 -0
  1688. data/core/public/images/admin/icons/pdf.png +0 -0
  1689. data/core/public/images/admin/icons/reorder.gif +0 -0
  1690. data/core/public/images/admin/icons/search.gif +0 -0
  1691. data/core/public/images/admin/icons/send-email.png +0 -0
  1692. data/core/public/images/admin/icons/stop.png +0 -0
  1693. data/core/public/images/admin/icons/tick.png +0 -0
  1694. data/core/public/images/admin/icons/up.gif +0 -0
  1695. data/core/public/images/admin/icons/xls.png +0 -0
  1696. data/core/public/images/admin/tabs/off-left.png +0 -0
  1697. data/core/public/images/admin/tabs/off-right.png +0 -0
  1698. data/core/public/images/admin/tabs/on-left.png +0 -0
  1699. data/core/public/images/admin/tabs/on-right.png +0 -0
  1700. data/core/public/images/ajax_loader.gif +0 -0
  1701. data/core/public/images/amex_cid.gif +0 -0
  1702. data/core/public/images/bg-button-hover.png +0 -0
  1703. data/core/public/images/bg-button-pressed.png +0 -0
  1704. data/core/public/images/bg-button.gif +0 -0
  1705. data/core/public/images/bg-button.png +0 -0
  1706. data/core/public/images/blue/left_01.png +0 -0
  1707. data/core/public/images/blue/right_01.png +0 -0
  1708. data/core/public/images/body-back.png +0 -0
  1709. data/core/public/images/bottom_shine.png +0 -0
  1710. data/core/public/images/breadcrumb.gif +0 -0
  1711. data/core/public/images/button-dark-hover.png +0 -0
  1712. data/core/public/images/button-dark.png +0 -0
  1713. data/core/public/images/buttons/bg-button-hover.png +0 -0
  1714. data/core/public/images/buttons/bg-button-pressed.png +0 -0
  1715. data/core/public/images/buttons/bg-button.gif +0 -0
  1716. data/core/public/images/buttons/bg-button.png +0 -0
  1717. data/core/public/images/buttons/blue/left_01.png +0 -0
  1718. data/core/public/images/buttons/blue/right_01.png +0 -0
  1719. data/core/public/images/buttons/button-dark-hover.png +0 -0
  1720. data/core/public/images/buttons/button-dark.png +0 -0
  1721. data/core/public/images/buttons/drag-handle-green.png +0 -0
  1722. data/core/public/images/buttons/green/left_01.png +0 -0
  1723. data/core/public/images/buttons/green/right_01.png +0 -0
  1724. data/core/public/images/buttons/left_01.png +0 -0
  1725. data/core/public/images/buttons/left_01_small.png +0 -0
  1726. data/core/public/images/buttons/orange/left_03.png +0 -0
  1727. data/core/public/images/buttons/orange/right_03.png +0 -0
  1728. data/core/public/images/buttons/right_01.png +0 -0
  1729. data/core/public/images/buttons/right_01_small.png +0 -0
  1730. data/core/public/images/buttons/sxsw-ribbon-v1.png +0 -0
  1731. data/core/public/images/buttons/top-shine.png +0 -0
  1732. data/core/public/images/calendar_date_select/calendar.gif +0 -0
  1733. data/core/public/images/cart-empty.png +0 -0
  1734. data/core/public/images/cart-empty_x32.png +0 -0
  1735. data/core/public/images/cart-full.png +0 -0
  1736. data/core/public/images/cart-full_x32.png +0 -0
  1737. data/core/public/images/checkout.png +0 -0
  1738. data/core/public/images/creditcard.gif +0 -0
  1739. data/core/public/images/datepicker/backstripes.gif +0 -0
  1740. data/core/public/images/datepicker/bg_header.jpg +0 -0
  1741. data/core/public/images/datepicker/bullet1.gif +0 -0
  1742. data/core/public/images/datepicker/bullet2.gif +0 -0
  1743. data/core/public/images/datepicker/cal.gif +0 -0
  1744. data/core/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
  1745. data/core/public/images/discover_cid.gif +0 -0
  1746. data/core/public/images/drag-handle-green.png +0 -0
  1747. data/core/public/images/favicon.ico +0 -0
  1748. data/core/public/images/green/left_01.png +0 -0
  1749. data/core/public/images/green/right_01.png +0 -0
  1750. data/core/public/images/grid.png +0 -0
  1751. data/core/public/images/left_01.png +0 -0
  1752. data/core/public/images/left_01_small.png +0 -0
  1753. data/core/public/images/master_cid.jpg +0 -0
  1754. data/core/public/images/menu-current.png +0 -0
  1755. data/core/public/images/menu-hover.png +0 -0
  1756. data/core/public/images/noimage/mini.jpg +0 -0
  1757. data/core/public/images/noimage/product.jpg +0 -0
  1758. data/core/public/images/noimage/small.jpg +0 -0
  1759. data/core/public/images/openid-inputicon.gif +0 -0
  1760. data/core/public/images/orange/left_03.png +0 -0
  1761. data/core/public/images/orange/right_03.png +0 -0
  1762. data/core/public/images/progress.gif +0 -0
  1763. data/core/public/images/reorder.jpg +0 -0
  1764. data/core/public/images/right_01.png +0 -0
  1765. data/core/public/images/right_01_small.png +0 -0
  1766. data/core/public/images/separator.png +0 -0
  1767. data/core/public/images/shadow-top.png +0 -0
  1768. data/core/public/images/shadow_top.png +0 -0
  1769. data/core/public/images/spinner.gif +0 -0
  1770. data/core/public/images/spree.jpg +0 -0
  1771. data/core/public/images/spree/progress.gif +0 -0
  1772. data/core/public/images/spree/spinner.gif +0 -0
  1773. data/core/public/images/spree/spree.jpg +0 -0
  1774. data/core/public/images/step-progress/completed-completed.gif +0 -0
  1775. data/core/public/images/step-progress/completed-current.gif +0 -0
  1776. data/core/public/images/step-progress/completed-first.gif +0 -0
  1777. data/core/public/images/step-progress/current-first.gif +0 -0
  1778. data/core/public/images/step-progress/current-incomplete.gif +0 -0
  1779. data/core/public/images/step-progress/current-right.gif +0 -0
  1780. data/core/public/images/step-progress/incomplete-incomplete.gif +0 -0
  1781. data/core/public/images/step-progress/incomplete-right.gif +0 -0
  1782. data/core/public/images/steps/1.png +0 -0
  1783. data/core/public/images/steps/1_small.png +0 -0
  1784. data/core/public/images/steps/2.png +0 -0
  1785. data/core/public/images/steps/2_small.png +0 -0
  1786. data/core/public/images/steps/3.png +0 -0
  1787. data/core/public/images/steps/3_small.png +0 -0
  1788. data/core/public/images/steps/4.png +0 -0
  1789. data/core/public/images/steps/4_small.png +0 -0
  1790. data/core/public/images/steps/5.png +0 -0
  1791. data/core/public/images/steps/5_small.png +0 -0
  1792. data/core/public/images/steps/6.png +0 -0
  1793. data/core/public/images/steps/6_small.png +0 -0
  1794. data/core/public/images/sxsw-ribbon-v1.png +0 -0
  1795. data/core/public/images/tab_bottom.gif +0 -0
  1796. data/core/public/images/tile-header.png +0 -0
  1797. data/core/public/images/tile-slider.png +0 -0
  1798. data/core/public/images/top-shine.png +0 -0
  1799. data/core/public/images/tree-nav-icons/bullet.gif +0 -0
  1800. data/core/public/images/tree-nav-icons/minus.gif +0 -0
  1801. data/core/public/images/tree-nav-icons/plus.gif +0 -0
  1802. data/core/public/images/tree-nav-icons/treeview-loading.gif +0 -0
  1803. data/core/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
  1804. data/core/public/images/update.png +0 -0
  1805. data/core/public/images/visa_cid.gif +0 -0
  1806. data/core/public/images/wrapper-back-2.png +0 -0
  1807. data/core/public/images/wrapper-back.png +0 -0
  1808. data/core/public/images/yui-menubaritem_submenuindicator.png +0 -0
  1809. data/core/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
  1810. data/core/public/images/yui-menuitem_checkbox.png +0 -0
  1811. data/core/public/images/yui-menuitem_checkbox_disabled.png +0 -0
  1812. data/core/public/images/yui-menuitem_submenuindicator.png +0 -0
  1813. data/core/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
  1814. data/core/public/images/yui-sprite.png +0 -0
  1815. data/core/public/javascripts/additional-methods.js +236 -0
  1816. data/core/public/javascripts/admin.js +232 -0
  1817. data/core/public/javascripts/admin/address_states.js +25 -0
  1818. data/core/public/javascripts/admin/checkouts/edit.js +130 -0
  1819. data/core/public/javascripts/admin/orders/edit.js +23 -0
  1820. data/core/public/javascripts/admin/orders/edit_form.js +16 -0
  1821. data/core/public/javascripts/admin/payments/new.js +9 -0
  1822. data/core/public/javascripts/admin/unobtrusive_handlers.js +43 -0
  1823. data/core/public/javascripts/application.js +12 -0
  1824. data/core/public/javascripts/calculator.js +15 -0
  1825. data/core/public/javascripts/checkout.js +75 -0
  1826. data/core/public/javascripts/datepicker.js +1445 -0
  1827. data/core/public/javascripts/gateway.js +13 -0
  1828. data/core/public/javascripts/jquery-1.4.2.min.js +154 -0
  1829. data/core/public/javascripts/jquery-ui.js +188 -0
  1830. data/core/public/javascripts/jquery.alerts/images/help.gif +0 -0
  1831. data/core/public/javascripts/jquery.alerts/images/important.gif +0 -0
  1832. data/core/public/javascripts/jquery.alerts/images/info.gif +0 -0
  1833. data/core/public/javascripts/jquery.alerts/images/title.gif +0 -0
  1834. data/core/public/javascripts/jquery.alerts/jquery.alerts.css +57 -0
  1835. data/core/public/javascripts/jquery.alerts/jquery.alerts.js +235 -0
  1836. data/core/public/javascripts/jquery.alerts/jquery.alerts.spree.css +30 -0
  1837. data/core/public/javascripts/jquery.autocomplete.min.js +13 -0
  1838. data/core/public/javascripts/jquery.cookie.js +96 -0
  1839. data/core/public/javascripts/jquery.delayedobserver.js +35 -0
  1840. data/core/public/javascripts/jquery.suggest.js +276 -0
  1841. data/core/public/javascripts/jquery.template.js +255 -0
  1842. data/core/public/javascripts/jquery.tokeninput.js +618 -0
  1843. data/core/public/javascripts/jquery.validate.min.js +16 -0
  1844. data/core/public/javascripts/jsTree/jquery.jstree.js +3510 -0
  1845. data/core/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
  1846. data/core/public/javascripts/jsTree/themes/apple/d.png +0 -0
  1847. data/core/public/javascripts/jsTree/themes/apple/dot_for_ie.gif +0 -0
  1848. data/core/public/javascripts/jsTree/themes/apple/style.css +60 -0
  1849. data/core/public/javascripts/jsTree/themes/apple/throbber.gif +0 -0
  1850. data/core/public/javascripts/lang/af.js +40 -0
  1851. data/core/public/javascripts/lang/ar.js +50 -0
  1852. data/core/public/javascripts/lang/de.js +40 -0
  1853. data/core/public/javascripts/lang/du.js +40 -0
  1854. data/core/public/javascripts/lang/en.js +42 -0
  1855. data/core/public/javascripts/lang/es.js +41 -0
  1856. data/core/public/javascripts/lang/fi.js +40 -0
  1857. data/core/public/javascripts/lang/fr.js +44 -0
  1858. data/core/public/javascripts/lang/gr.js +40 -0
  1859. data/core/public/javascripts/lang/he.js +49 -0
  1860. data/core/public/javascripts/lang/it.js +13 -0
  1861. data/core/public/javascripts/lang/nl.js +40 -0
  1862. data/core/public/javascripts/lang/no.js +40 -0
  1863. data/core/public/javascripts/lang/pt.js +50 -0
  1864. data/core/public/javascripts/lang/ro.js +40 -0
  1865. data/core/public/javascripts/lang/ru.js +40 -0
  1866. data/core/public/javascripts/lang/sp.js +40 -0
  1867. data/core/public/javascripts/lang/sv.js +41 -0
  1868. data/core/public/javascripts/lang/ua.js +40 -0
  1869. data/core/public/javascripts/localization/messages_cn.js +24 -0
  1870. data/core/public/javascripts/localization/messages_cs.js +23 -0
  1871. data/core/public/javascripts/localization/messages_da.js +21 -0
  1872. data/core/public/javascripts/localization/messages_de.js +21 -0
  1873. data/core/public/javascripts/localization/messages_es.js +24 -0
  1874. data/core/public/javascripts/localization/messages_fr.js +23 -0
  1875. data/core/public/javascripts/localization/messages_hu.js +21 -0
  1876. data/core/public/javascripts/localization/messages_it.js +26 -0
  1877. data/core/public/javascripts/localization/messages_kk.js +23 -0
  1878. data/core/public/javascripts/localization/messages_nl.js +23 -0
  1879. data/core/public/javascripts/localization/messages_no.js +23 -0
  1880. data/core/public/javascripts/localization/messages_pl.js +23 -0
  1881. data/core/public/javascripts/localization/messages_ptbr.js +30 -0
  1882. data/core/public/javascripts/localization/messages_ro.js +24 -0
  1883. data/core/public/javascripts/localization/messages_ru.js +23 -0
  1884. data/core/public/javascripts/localization/messages_se.js +23 -0
  1885. data/core/public/javascripts/localization/messages_sk.js +21 -0
  1886. data/core/public/javascripts/localization/messages_tr.js +24 -0
  1887. data/core/public/javascripts/localization/messages_tw.js +24 -0
  1888. data/core/public/javascripts/localization/messages_ua.js +24 -0
  1889. data/core/public/javascripts/nested-attribute.js +26 -0
  1890. data/core/public/javascripts/open_id.js +15 -0
  1891. data/core/public/javascripts/product.js +49 -0
  1892. data/core/public/javascripts/rails.js +127 -0
  1893. data/core/public/javascripts/taxonomy.js +201 -0
  1894. data/core/public/javascripts/zone.js +39 -0
  1895. data/core/public/stylesheets/admin/admin-forms.css +154 -0
  1896. data/core/public/stylesheets/admin/admin-reset.css +69 -0
  1897. data/core/public/stylesheets/admin/admin-tables.css +39 -0
  1898. data/core/public/stylesheets/admin/admin-typography.css +117 -0
  1899. data/core/public/stylesheets/admin/admin.css +614 -0
  1900. data/core/public/stylesheets/admin/autocomplete.css +73 -0
  1901. data/core/public/stylesheets/admin/dashboard.css +143 -0
  1902. data/core/public/stylesheets/admin/edit_checkouts.css +57 -0
  1903. data/core/public/stylesheets/admin/grids.css +314 -0
  1904. data/core/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +7 -0
  1905. data/core/public/stylesheets/admin/token-input.css +109 -0
  1906. data/core/public/stylesheets/admin/yui-includes.css +14 -0
  1907. data/core/public/stylesheets/datepicker.css +263 -0
  1908. data/core/public/stylesheets/jquery.autocomplete.css +48 -0
  1909. data/core/public/stylesheets/screen.css +916 -0
  1910. data/core/rfcommerce_core.gemspec +37 -0
  1911. data/core/spec/controllers/admin/base_controller_spec.rb +61 -0
  1912. data/core/spec/controllers/admin/general_settings_controller_spec.rb +17 -0
  1913. data/core/spec/controllers/admin/mail_methods_controller_spec.rb +26 -0
  1914. data/core/spec/controllers/admin/orders_controller_spec.rb +26 -0
  1915. data/core/spec/controllers/admin/products_controller_spec.rb +16 -0
  1916. data/core/spec/controllers/admin/users_controller_spec.rb +16 -0
  1917. data/core/spec/controllers/checkout_controller_spec.rb +144 -0
  1918. data/core/spec/controllers/content_controller_spec.rb +14 -0
  1919. data/core/spec/controllers/orders_controller_extension_spec.rb +62 -0
  1920. data/core/spec/controllers/orders_controller_spec.rb +82 -0
  1921. data/core/spec/lib/calculated_adjustments_spec.rb +54 -0
  1922. data/core/spec/lib/ext_spec.rb +53 -0
  1923. data/core/spec/lib/mail_interceptor_spec.rb +69 -0
  1924. data/core/spec/lib/mail_settings_spec.rb +82 -0
  1925. data/core/spec/models/address_spec.rb +135 -0
  1926. data/core/spec/models/adjustment_spec.rb +67 -0
  1927. data/core/spec/models/calculator/flat_percent_item_total_spec.rb +22 -0
  1928. data/core/spec/models/configuration_spec.rb +9 -0
  1929. data/core/spec/models/country_spec.rb +13 -0
  1930. data/core/spec/models/creditcard_spec.rb +487 -0
  1931. data/core/spec/models/gateway/authorize_net.rb +17 -0
  1932. data/core/spec/models/gateway/authorize_net_cim_spec.rb +18 -0
  1933. data/core/spec/models/gateway/authorize_net_spec.rb +17 -0
  1934. data/core/spec/models/gateway/braintree_spec.rb +192 -0
  1935. data/core/spec/models/inventory_unit_spec.rb +254 -0
  1936. data/core/spec/models/line_item_spec.rb +119 -0
  1937. data/core/spec/models/mail_method_spec.rb +26 -0
  1938. data/core/spec/models/order_spec.rb +579 -0
  1939. data/core/spec/models/payment_method_spec.rb +50 -0
  1940. data/core/spec/models/payment_spec.rb +147 -0
  1941. data/core/spec/models/product_group_spec.rb +36 -0
  1942. data/core/spec/models/product_option_type_spec.rb +9 -0
  1943. data/core/spec/models/product_property_spec.rb +9 -0
  1944. data/core/spec/models/product_scope_spec.rb +39 -0
  1945. data/core/spec/models/product_spec.rb +125 -0
  1946. data/core/spec/models/return_authorization_spec.rb +113 -0
  1947. data/core/spec/models/shipment_spec.rb +179 -0
  1948. data/core/spec/models/shipping_category_spec.rb +10 -0
  1949. data/core/spec/models/shipping_method_spec.rb +16 -0
  1950. data/core/spec/models/state_spec.rb +13 -0
  1951. data/core/spec/models/tax_category_spec.rb +28 -0
  1952. data/core/spec/models/tax_rate_spec.rb +34 -0
  1953. data/core/spec/models/taxon_spec.rb +38 -0
  1954. data/core/spec/models/taxonomy_spec.rb +14 -0
  1955. data/core/spec/models/tracer_spec.rb +9 -0
  1956. data/core/spec/models/user_spec.rb +9 -0
  1957. data/core/spec/models/variant_spec.rb +125 -0
  1958. data/core/spec/spec_helper.rb +47 -0
  1959. data/core/spec/test_app/Gemfile +34 -0
  1960. data/core/spec/test_app/Rakefile +7 -0
  1961. data/core/spec/test_app/app/controllers/application_controller.rb +3 -0
  1962. data/core/spec/test_app/app/helpers/application_helper.rb +2 -0
  1963. data/core/spec/test_app/app/views/layouts/application.html.erb +14 -0
  1964. data/core/spec/test_app/config.ru +4 -0
  1965. data/core/spec/test_app/config/application.rb +42 -0
  1966. data/core/spec/test_app/config/boot.rb +6 -0
  1967. data/core/spec/test_app/config/database.yml +17 -0
  1968. data/core/spec/test_app/config/environment.rb +5 -0
  1969. data/core/spec/test_app/config/environments/cucumber.rb +38 -0
  1970. data/core/spec/test_app/config/environments/development.rb +26 -0
  1971. data/core/spec/test_app/config/environments/production.rb +49 -0
  1972. data/core/spec/test_app/config/environments/test.rb +35 -0
  1973. data/core/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  1974. data/core/spec/test_app/config/initializers/inflections.rb +10 -0
  1975. data/core/spec/test_app/config/initializers/mime_types.rb +5 -0
  1976. data/core/spec/test_app/config/initializers/secret_token.rb +7 -0
  1977. data/core/spec/test_app/config/initializers/session_store.rb +8 -0
  1978. data/core/spec/test_app/config/locales/en.yml +5 -0
  1979. data/core/spec/test_app/config/routes.rb +58 -0
  1980. data/core/spec/test_app/db/cucumber.sqlite3 +0 -0
  1981. data/core/spec/test_app/db/default/countries.yml +1583 -0
  1982. data/core/spec/test_app/db/default/roles.yml +7 -0
  1983. data/core/spec/test_app/db/default/states.yml +256 -0
  1984. data/core/spec/test_app/db/default/zone_members.yml +169 -0
  1985. data/core/spec/test_app/db/default/zones.yml +13 -0
  1986. data/core/spec/test_app/db/migrate/20090823005402_spree_zero_nine_zero.rb +442 -0
  1987. data/core/spec/test_app/db/migrate/20090904192342_create_indexes_for_inventory_units.rb +12 -0
  1988. data/core/spec/test_app/db/migrate/20090923100315_add_count_on_hand_to_variants_and_products.rb +36 -0
  1989. data/core/spec/test_app/db/migrate/20091007134354_change_taxons_to_nested_set.rb +40 -0
  1990. data/core/spec/test_app/db/migrate/20091008091614_move_to_configurable_gateways.rb +55 -0
  1991. data/core/spec/test_app/db/migrate/20091012120519_product_groups_and_scopes.rb +25 -0
  1992. data/core/spec/test_app/db/migrate/20091015110842_add_open_id_authentication_tables.rb +20 -0
  1993. data/core/spec/test_app/db/migrate/20091015153048_add_openid_field_to_users.rb +19 -0
  1994. data/core/spec/test_app/db/migrate/20091016174634_change_preference_value_type.rb +10 -0
  1995. data/core/spec/test_app/db/migrate/20091017175558_create_billing_integrations.rb +16 -0
  1996. data/core/spec/test_app/db/migrate/20091021133257_charge_refactoring.rb +35 -0
  1997. data/core/spec/test_app/db/migrate/20091104151730_add_some_indexes.rb +21 -0
  1998. data/core/spec/test_app/db/migrate/20091126190904_checkout_state_machine.rb +13 -0
  1999. data/core/spec/test_app/db/migrate/20091209153045_state_for_shipments.rb +9 -0
  2000. data/core/spec/test_app/db/migrate/20091209202200_make_state_events_polymorphic.rb +12 -0
  2001. data/core/spec/test_app/db/migrate/20091211203813_ship_address_id_for_checkouts.rb +9 -0
  2002. data/core/spec/test_app/db/migrate/20091212161118_shipping_method_id_for_checkouts.rb +9 -0
  2003. data/core/spec/test_app/db/migrate/20091213222815_creditcard_last_four_digits.rb +19 -0
  2004. data/core/spec/test_app/db/migrate/20091214183826_populate_legacy_shipment_state.rb +19 -0
  2005. data/core/spec/test_app/db/migrate/20100105090147_add_cost_price.rb +9 -0
  2006. data/core/spec/test_app/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +21 -0
  2007. data/core/spec/test_app/db/migrate/20100111205525_cim_fields_for_creditcards.rb +11 -0
  2008. data/core/spec/test_app/db/migrate/20100112151511_create_return_authorizations.rb +16 -0
  2009. data/core/spec/test_app/db/migrate/20100113090919_add_return_authorization_to_inventory_units.rb +9 -0
  2010. data/core/spec/test_app/db/migrate/20100113203104_create_trackers.rb +14 -0
  2011. data/core/spec/test_app/db/migrate/20100121160010_creditcard_id_for_creditcard_txns.rb +9 -0
  2012. data/core/spec/test_app/db/migrate/20100121183934_original_creditcard_txn_id_for_creditcard_txns.rb +9 -0
  2013. data/core/spec/test_app/db/migrate/20100125145351_add_test_mode_to_billing_integration.rb +11 -0
  2014. data/core/spec/test_app/db/migrate/20100126103714_create_products_product_groups.rb +12 -0
  2015. data/core/spec/test_app/db/migrate/20100209025806_create_payment_methods.rb +20 -0
  2016. data/core/spec/test_app/db/migrate/20100209144531_polymorphic_payments.rb +29 -0
  2017. data/core/spec/test_app/db/migrate/20100213103131_change_payments_payment_method_to_belongs_to.rb +11 -0
  2018. data/core/spec/test_app/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +16 -0
  2019. data/core/spec/test_app/db/migrate/20100223170312_sti_for_transactions.rb +14 -0
  2020. data/core/spec/test_app/db/migrate/20100223183812_drop_billing_integrations.rb +16 -0
  2021. data/core/spec/test_app/db/migrate/20100224153127_deleted_at_for_payment_methods.rb +13 -0
  2022. data/core/spec/test_app/db/migrate/20100301163454_add_adjustments_index.rb +10 -0
  2023. data/core/spec/test_app/db/migrate/20100306153445_fix_by_popularity.rb +8 -0
  2024. data/core/spec/test_app/db/migrate/20100317120946_add_alt_text_to_images.rb +9 -0
  2025. data/core/spec/test_app/db/migrate/20100427121301_add_display_to_payment_methods.rb +9 -0
  2026. data/core/spec/test_app/db/migrate/20100504142133_add_addresses_checkouts_indexes.rb +16 -0
  2027. data/core/spec/test_app/db/migrate/20100506180619_add_icon_to_taxons.rb +18 -0
  2028. data/core/spec/test_app/db/migrate/20100506185838_add_description_to_taxons.rb +11 -0
  2029. data/core/spec/test_app/db/migrate/20100528155333_index_for_shipments_number.rb +9 -0
  2030. data/core/spec/test_app/db/migrate/20100528185820_add_index_on_users_persistence_token.rb +9 -0
  2031. data/core/spec/test_app/db/migrate/20100605152042_add_default_to_tax_categories.rb +9 -0
  2032. data/core/spec/test_app/db/migrate/20100624110730_add_display_to_shipping_methods.rb +9 -0
  2033. data/core/spec/test_app/db/migrate/20100624123336_rename_payment_method_display.rb +9 -0
  2034. data/core/spec/test_app/db/migrate/20100624175547_rename_preferences_field.rb +8 -0
  2035. data/core/spec/test_app/db/migrate/20100811163637_add_guest_flag.rb +13 -0
  2036. data/core/spec/test_app/db/migrate/20100811205836_drop_order_token.rb +11 -0
  2037. data/core/spec/test_app/db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb +11 -0
  2038. data/core/spec/test_app/db/migrate/20100813023502_create_address_keys_for_order.rb +15 -0
  2039. data/core/spec/test_app/db/migrate/20100813185745_payment_total_for_orders.rb +9 -0
  2040. data/core/spec/test_app/db/migrate/20100816212146_shipping_method_id_for_orders.rb +9 -0
  2041. data/core/spec/test_app/db/migrate/20100817152723_add_shipment_and_payment_state.rb +15 -0
  2042. data/core/spec/test_app/db/migrate/20100819170125_refactor_adjustments.rb +19 -0
  2043. data/core/spec/test_app/db/migrate/20100820135707_response_code_and_avs_response_for_payments.rb +11 -0
  2044. data/core/spec/test_app/db/migrate/20100901171814_change_guest_flag_to_anonymous.rb +13 -0
  2045. data/core/spec/test_app/db/migrate/20100903203949_email_for_orders.rb +9 -0
  2046. data/core/spec/test_app/db/migrate/20100923162011_create_mail_methods.rb +12 -0
  2047. data/core/spec/test_app/db/migrate/20100929151905_rename_frozen_to_locked.rb +8 -0
  2048. data/core/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb +11 -0
  2049. data/core/spec/test_app/db/migrate/20101026184700_create_log_entries.rb +15 -0
  2050. data/core/spec/test_app/db/migrate/20101026184714_migrate_transactions_to_payment_state.rb +94 -0
  2051. data/core/spec/test_app/db/migrate/20101026184746_delete_in_progress_orders.rb +18 -0
  2052. data/core/spec/test_app/db/migrate/20101026184808_migrate_checkout_to_orders.rb +27 -0
  2053. data/core/spec/test_app/db/migrate/20101026184833_migrate_adjustments.rb +9 -0
  2054. data/core/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb +14 -0
  2055. data/core/spec/test_app/db/migrate/20101026184916_prevent_nil_payment_total.rb +8 -0
  2056. data/core/spec/test_app/db/migrate/20101026184932_prevent_nil_email.rb +9 -0
  2057. data/core/spec/test_app/db/migrate/20101026184959_generate_anonymous_users.rb +14 -0
  2058. data/core/spec/test_app/db/migrate/20101026185022_update_order_state.rb +8 -0
  2059. data/core/spec/test_app/db/migrate/20101026192225_cleanup_legacy_tables.rb +11 -0
  2060. data/core/spec/test_app/db/migrate/20101028151745_remove_number_and_cvv_from_credicard.rb +9 -0
  2061. data/core/spec/test_app/db/migrate/20101103212716_drop_anonymous_field_for_user.rb +8 -0
  2062. data/core/spec/test_app/db/migrate/20101111133551_renamed_rma_cancelled_state.rb +10 -0
  2063. data/core/spec/test_app/db/migrate/20101117031806_fix_problematic_index_names.rb +13 -0
  2064. data/core/spec/test_app/db/migrate/20101223215658_add_position_to_variants.rb +9 -0
  2065. data/core/spec/test_app/db/migrate/20110110130847_add_next_state_to_state_events.rb +9 -0
  2066. data/core/spec/test_app/db/migrate/20110111122537_add_position_to_option_types.rb +9 -0
  2067. data/core/spec/test_app/db/migrate/20110314192118_remove_trailing_slashes_in_taxon_permalinks.rb +17 -0
  2068. data/core/spec/test_app/db/sample/users.rb +61 -0
  2069. data/core/spec/test_app/db/schema.rb +531 -0
  2070. data/core/spec/test_app/db/seeds.rb +3 -0
  2071. data/core/spec/test_app/db/test.sqlite3 +0 -0
  2072. data/core/spec/test_app/log/cucumber.log +1324 -0
  2073. data/core/spec/test_app/log/development.log +0 -0
  2074. data/core/spec/test_app/log/production.log +0 -0
  2075. data/core/spec/test_app/log/server.log +0 -0
  2076. data/core/spec/test_app/log/test.log +1324 -0
  2077. data/core/spec/test_app/public/404.html +26 -0
  2078. data/core/spec/test_app/public/422.html +26 -0
  2079. data/core/spec/test_app/public/500.html +26 -0
  2080. data/core/spec/test_app/public/favicon.ico +0 -0
  2081. data/core/spec/test_app/public/images/add-to-cart.png +0 -0
  2082. data/core/spec/test_app/public/images/admin/bg/active-tab.png +0 -0
  2083. data/core/spec/test_app/public/images/admin/bg/admin_tab_back.png +0 -0
  2084. data/core/spec/test_app/public/images/admin/bg/admin_tab_selected_back.png +0 -0
  2085. data/core/spec/test_app/public/images/admin/bg/content-back-blue.png +0 -0
  2086. data/core/spec/test_app/public/images/admin/bg/content-back-green.png +0 -0
  2087. data/core/spec/test_app/public/images/admin/bg/content-back.png +0 -0
  2088. data/core/spec/test_app/public/images/admin/bg/flash-error.png +0 -0
  2089. data/core/spec/test_app/public/images/admin/bg/flash-notice.png +0 -0
  2090. data/core/spec/test_app/public/images/admin/bg/green-stripes.gif +0 -0
  2091. data/core/spec/test_app/public/images/admin/bg/green-stripes.png +0 -0
  2092. data/core/spec/test_app/public/images/admin/bg/grid_header_back.png +0 -0
  2093. data/core/spec/test_app/public/images/admin/bg/grid_header_back_green.png +0 -0
  2094. data/core/spec/test_app/public/images/admin/bg/header-bg.png +0 -0
  2095. data/core/spec/test_app/public/images/admin/bg/header.png +0 -0
  2096. data/core/spec/test_app/public/images/admin/bg/header_bg.jpg +0 -0
  2097. data/core/spec/test_app/public/images/admin/bg/menu-current.png +0 -0
  2098. data/core/spec/test_app/public/images/admin/bg/red-stripes.gif +0 -0
  2099. data/core/spec/test_app/public/images/admin/bg/red-stripes.png +0 -0
  2100. data/core/spec/test_app/public/images/admin/bg/spree_50.png +0 -0
  2101. data/core/spec/test_app/public/images/admin/bg/subnav-divider.png +0 -0
  2102. data/core/spec/test_app/public/images/admin/bg/subnav.png +0 -0
  2103. data/core/spec/test_app/public/images/admin/bg/tab-back.png +0 -0
  2104. data/core/spec/test_app/public/images/admin/buttons/blue/left_01.png +0 -0
  2105. data/core/spec/test_app/public/images/admin/buttons/blue/right_01.png +0 -0
  2106. data/core/spec/test_app/public/images/admin/buttons/drag-handle-green.png +0 -0
  2107. data/core/spec/test_app/public/images/admin/buttons/green/left_01.png +0 -0
  2108. data/core/spec/test_app/public/images/admin/buttons/green/right_01.png +0 -0
  2109. data/core/spec/test_app/public/images/admin/buttons/left_01.png +0 -0
  2110. data/core/spec/test_app/public/images/admin/buttons/left_01_small.png +0 -0
  2111. data/core/spec/test_app/public/images/admin/buttons/orange/left_03.png +0 -0
  2112. data/core/spec/test_app/public/images/admin/buttons/orange/right_03.png +0 -0
  2113. data/core/spec/test_app/public/images/admin/buttons/right_01.png +0 -0
  2114. data/core/spec/test_app/public/images/admin/buttons/right_01_small.png +0 -0
  2115. data/core/spec/test_app/public/images/admin/icons/16x16/1.png +0 -0
  2116. data/core/spec/test_app/public/images/admin/icons/16x16/10.png +0 -0
  2117. data/core/spec/test_app/public/images/admin/icons/16x16/2.png +0 -0
  2118. data/core/spec/test_app/public/images/admin/icons/16x16/3.png +0 -0
  2119. data/core/spec/test_app/public/images/admin/icons/16x16/4.png +0 -0
  2120. data/core/spec/test_app/public/images/admin/icons/16x16/5.png +0 -0
  2121. data/core/spec/test_app/public/images/admin/icons/16x16/6.png +0 -0
  2122. data/core/spec/test_app/public/images/admin/icons/16x16/7.png +0 -0
  2123. data/core/spec/test_app/public/images/admin/icons/16x16/8.png +0 -0
  2124. data/core/spec/test_app/public/images/admin/icons/16x16/9.png +0 -0
  2125. data/core/spec/test_app/public/images/admin/icons/32x32/1.png +0 -0
  2126. data/core/spec/test_app/public/images/admin/icons/32x32/10.png +0 -0
  2127. data/core/spec/test_app/public/images/admin/icons/32x32/11.png +0 -0
  2128. data/core/spec/test_app/public/images/admin/icons/32x32/2.png +0 -0
  2129. data/core/spec/test_app/public/images/admin/icons/32x32/3.png +0 -0
  2130. data/core/spec/test_app/public/images/admin/icons/32x32/4.png +0 -0
  2131. data/core/spec/test_app/public/images/admin/icons/32x32/5.png +0 -0
  2132. data/core/spec/test_app/public/images/admin/icons/32x32/6.png +0 -0
  2133. data/core/spec/test_app/public/images/admin/icons/32x32/7.png +0 -0
  2134. data/core/spec/test_app/public/images/admin/icons/32x32/8.png +0 -0
  2135. data/core/spec/test_app/public/images/admin/icons/32x32/9.png +0 -0
  2136. data/core/spec/test_app/public/images/admin/icons/accept.png +0 -0
  2137. data/core/spec/test_app/public/images/admin/icons/add.gif +0 -0
  2138. data/core/spec/test_app/public/images/admin/icons/add.png +0 -0
  2139. data/core/spec/test_app/public/images/admin/icons/arrow-down.gif +0 -0
  2140. data/core/spec/test_app/public/images/admin/icons/cross.png +0 -0
  2141. data/core/spec/test_app/public/images/admin/icons/delete.gif +0 -0
  2142. data/core/spec/test_app/public/images/admin/icons/delete.png +0 -0
  2143. data/core/spec/test_app/public/images/admin/icons/drag.gif +0 -0
  2144. data/core/spec/test_app/public/images/admin/icons/edit.gif +0 -0
  2145. data/core/spec/test_app/public/images/admin/icons/edit.png +0 -0
  2146. data/core/spec/test_app/public/images/admin/icons/email.png +0 -0
  2147. data/core/spec/test_app/public/images/admin/icons/error.png +0 -0
  2148. data/core/spec/test_app/public/images/admin/icons/exclamation.png +0 -0
  2149. data/core/spec/test_app/public/images/admin/icons/feed.png +0 -0
  2150. data/core/spec/test_app/public/images/admin/icons/pdf.png +0 -0
  2151. data/core/spec/test_app/public/images/admin/icons/reorder.gif +0 -0
  2152. data/core/spec/test_app/public/images/admin/icons/search.gif +0 -0
  2153. data/core/spec/test_app/public/images/admin/icons/send-email.png +0 -0
  2154. data/core/spec/test_app/public/images/admin/icons/stop.png +0 -0
  2155. data/core/spec/test_app/public/images/admin/icons/tick.png +0 -0
  2156. data/core/spec/test_app/public/images/admin/icons/up.gif +0 -0
  2157. data/core/spec/test_app/public/images/admin/icons/xls.png +0 -0
  2158. data/core/spec/test_app/public/images/admin/tabs/off-left.png +0 -0
  2159. data/core/spec/test_app/public/images/admin/tabs/off-right.png +0 -0
  2160. data/core/spec/test_app/public/images/admin/tabs/on-left.png +0 -0
  2161. data/core/spec/test_app/public/images/admin/tabs/on-right.png +0 -0
  2162. data/core/spec/test_app/public/images/ajax_loader.gif +0 -0
  2163. data/core/spec/test_app/public/images/amex_cid.gif +0 -0
  2164. data/core/spec/test_app/public/images/bg-button-hover.png +0 -0
  2165. data/core/spec/test_app/public/images/bg-button-pressed.png +0 -0
  2166. data/core/spec/test_app/public/images/bg-button.gif +0 -0
  2167. data/core/spec/test_app/public/images/bg-button.png +0 -0
  2168. data/core/spec/test_app/public/images/blue/left_01.png +0 -0
  2169. data/core/spec/test_app/public/images/blue/right_01.png +0 -0
  2170. data/core/spec/test_app/public/images/body-back.png +0 -0
  2171. data/core/spec/test_app/public/images/bottom_shine.png +0 -0
  2172. data/core/spec/test_app/public/images/breadcrumb.gif +0 -0
  2173. data/core/spec/test_app/public/images/button-dark-hover.png +0 -0
  2174. data/core/spec/test_app/public/images/button-dark.png +0 -0
  2175. data/core/spec/test_app/public/images/buttons/bg-button-hover.png +0 -0
  2176. data/core/spec/test_app/public/images/buttons/bg-button-pressed.png +0 -0
  2177. data/core/spec/test_app/public/images/buttons/bg-button.gif +0 -0
  2178. data/core/spec/test_app/public/images/buttons/bg-button.png +0 -0
  2179. data/core/spec/test_app/public/images/buttons/blue/left_01.png +0 -0
  2180. data/core/spec/test_app/public/images/buttons/blue/right_01.png +0 -0
  2181. data/core/spec/test_app/public/images/buttons/button-dark-hover.png +0 -0
  2182. data/core/spec/test_app/public/images/buttons/button-dark.png +0 -0
  2183. data/core/spec/test_app/public/images/buttons/drag-handle-green.png +0 -0
  2184. data/core/spec/test_app/public/images/buttons/green/left_01.png +0 -0
  2185. data/core/spec/test_app/public/images/buttons/green/right_01.png +0 -0
  2186. data/core/spec/test_app/public/images/buttons/left_01.png +0 -0
  2187. data/core/spec/test_app/public/images/buttons/left_01_small.png +0 -0
  2188. data/core/spec/test_app/public/images/buttons/orange/left_03.png +0 -0
  2189. data/core/spec/test_app/public/images/buttons/orange/right_03.png +0 -0
  2190. data/core/spec/test_app/public/images/buttons/right_01.png +0 -0
  2191. data/core/spec/test_app/public/images/buttons/right_01_small.png +0 -0
  2192. data/core/spec/test_app/public/images/buttons/sxsw-ribbon-v1.png +0 -0
  2193. data/core/spec/test_app/public/images/buttons/top-shine.png +0 -0
  2194. data/core/spec/test_app/public/images/calendar_date_select/calendar.gif +0 -0
  2195. data/core/spec/test_app/public/images/cart-empty.png +0 -0
  2196. data/core/spec/test_app/public/images/cart-empty_x32.png +0 -0
  2197. data/core/spec/test_app/public/images/cart-full.png +0 -0
  2198. data/core/spec/test_app/public/images/cart-full_x32.png +0 -0
  2199. data/core/spec/test_app/public/images/checkout.png +0 -0
  2200. data/core/spec/test_app/public/images/creditcard.gif +0 -0
  2201. data/core/spec/test_app/public/images/datepicker/backstripes.gif +0 -0
  2202. data/core/spec/test_app/public/images/datepicker/bg_header.jpg +0 -0
  2203. data/core/spec/test_app/public/images/datepicker/bullet1.gif +0 -0
  2204. data/core/spec/test_app/public/images/datepicker/bullet2.gif +0 -0
  2205. data/core/spec/test_app/public/images/datepicker/cal.gif +0 -0
  2206. data/core/spec/test_app/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
  2207. data/core/spec/test_app/public/images/discover_cid.gif +0 -0
  2208. data/core/spec/test_app/public/images/drag-handle-green.png +0 -0
  2209. data/core/spec/test_app/public/images/favicon.ico +0 -0
  2210. data/core/spec/test_app/public/images/green/left_01.png +0 -0
  2211. data/core/spec/test_app/public/images/green/right_01.png +0 -0
  2212. data/core/spec/test_app/public/images/grid.png +0 -0
  2213. data/core/spec/test_app/public/images/left_01.png +0 -0
  2214. data/core/spec/test_app/public/images/left_01_small.png +0 -0
  2215. data/core/spec/test_app/public/images/master_cid.jpg +0 -0
  2216. data/core/spec/test_app/public/images/menu-current.png +0 -0
  2217. data/core/spec/test_app/public/images/menu-hover.png +0 -0
  2218. data/core/spec/test_app/public/images/noimage/mini.jpg +0 -0
  2219. data/core/spec/test_app/public/images/noimage/product.jpg +0 -0
  2220. data/core/spec/test_app/public/images/noimage/small.jpg +0 -0
  2221. data/core/spec/test_app/public/images/openid-inputicon.gif +0 -0
  2222. data/core/spec/test_app/public/images/orange/left_03.png +0 -0
  2223. data/core/spec/test_app/public/images/orange/right_03.png +0 -0
  2224. data/core/spec/test_app/public/images/progress.gif +0 -0
  2225. data/core/spec/test_app/public/images/reorder.jpg +0 -0
  2226. data/core/spec/test_app/public/images/right_01.png +0 -0
  2227. data/core/spec/test_app/public/images/right_01_small.png +0 -0
  2228. data/core/spec/test_app/public/images/separator.png +0 -0
  2229. data/core/spec/test_app/public/images/shadow-top.png +0 -0
  2230. data/core/spec/test_app/public/images/shadow_top.png +0 -0
  2231. data/core/spec/test_app/public/images/spinner.gif +0 -0
  2232. data/core/spec/test_app/public/images/spree.jpg +0 -0
  2233. data/core/spec/test_app/public/images/spree/progress.gif +0 -0
  2234. data/core/spec/test_app/public/images/spree/spinner.gif +0 -0
  2235. data/core/spec/test_app/public/images/spree/spree.jpg +0 -0
  2236. data/core/spec/test_app/public/images/step-progress/completed-completed.gif +0 -0
  2237. data/core/spec/test_app/public/images/step-progress/completed-current.gif +0 -0
  2238. data/core/spec/test_app/public/images/step-progress/completed-first.gif +0 -0
  2239. data/core/spec/test_app/public/images/step-progress/current-first.gif +0 -0
  2240. data/core/spec/test_app/public/images/step-progress/current-incomplete.gif +0 -0
  2241. data/core/spec/test_app/public/images/step-progress/current-right.gif +0 -0
  2242. data/core/spec/test_app/public/images/step-progress/incomplete-incomplete.gif +0 -0
  2243. data/core/spec/test_app/public/images/step-progress/incomplete-right.gif +0 -0
  2244. data/core/spec/test_app/public/images/steps/1.png +0 -0
  2245. data/core/spec/test_app/public/images/steps/1_small.png +0 -0
  2246. data/core/spec/test_app/public/images/steps/2.png +0 -0
  2247. data/core/spec/test_app/public/images/steps/2_small.png +0 -0
  2248. data/core/spec/test_app/public/images/steps/3.png +0 -0
  2249. data/core/spec/test_app/public/images/steps/3_small.png +0 -0
  2250. data/core/spec/test_app/public/images/steps/4.png +0 -0
  2251. data/core/spec/test_app/public/images/steps/4_small.png +0 -0
  2252. data/core/spec/test_app/public/images/steps/5.png +0 -0
  2253. data/core/spec/test_app/public/images/steps/5_small.png +0 -0
  2254. data/core/spec/test_app/public/images/steps/6.png +0 -0
  2255. data/core/spec/test_app/public/images/steps/6_small.png +0 -0
  2256. data/core/spec/test_app/public/images/sxsw-ribbon-v1.png +0 -0
  2257. data/core/spec/test_app/public/images/tab_bottom.gif +0 -0
  2258. data/core/spec/test_app/public/images/tile-header.png +0 -0
  2259. data/core/spec/test_app/public/images/tile-slider.png +0 -0
  2260. data/core/spec/test_app/public/images/top-shine.png +0 -0
  2261. data/core/spec/test_app/public/images/tree-nav-icons/bullet.gif +0 -0
  2262. data/core/spec/test_app/public/images/tree-nav-icons/minus.gif +0 -0
  2263. data/core/spec/test_app/public/images/tree-nav-icons/plus.gif +0 -0
  2264. data/core/spec/test_app/public/images/tree-nav-icons/treeview-loading.gif +0 -0
  2265. data/core/spec/test_app/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
  2266. data/core/spec/test_app/public/images/update.png +0 -0
  2267. data/core/spec/test_app/public/images/visa_cid.gif +0 -0
  2268. data/core/spec/test_app/public/images/wrapper-back-2.png +0 -0
  2269. data/core/spec/test_app/public/images/wrapper-back.png +0 -0
  2270. data/core/spec/test_app/public/images/yui-menubaritem_submenuindicator.png +0 -0
  2271. data/core/spec/test_app/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
  2272. data/core/spec/test_app/public/images/yui-menuitem_checkbox.png +0 -0
  2273. data/core/spec/test_app/public/images/yui-menuitem_checkbox_disabled.png +0 -0
  2274. data/core/spec/test_app/public/images/yui-menuitem_submenuindicator.png +0 -0
  2275. data/core/spec/test_app/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
  2276. data/core/spec/test_app/public/images/yui-sprite.png +0 -0
  2277. data/core/spec/test_app/public/javascripts/additional-methods.js +236 -0
  2278. data/core/spec/test_app/public/javascripts/admin.js +232 -0
  2279. data/core/spec/test_app/public/javascripts/admin/address_states.js +25 -0
  2280. data/core/spec/test_app/public/javascripts/admin/checkouts/edit.js +130 -0
  2281. data/core/spec/test_app/public/javascripts/admin/orders/edit.js +23 -0
  2282. data/core/spec/test_app/public/javascripts/admin/orders/edit_form.js +16 -0
  2283. data/core/spec/test_app/public/javascripts/admin/payments/new.js +9 -0
  2284. data/core/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js +43 -0
  2285. data/core/spec/test_app/public/javascripts/application.js +12 -0
  2286. data/core/spec/test_app/public/javascripts/calculator.js +15 -0
  2287. data/core/spec/test_app/public/javascripts/checkout.js +75 -0
  2288. data/core/spec/test_app/public/javascripts/datepicker.js +1445 -0
  2289. data/core/spec/test_app/public/javascripts/gateway.js +13 -0
  2290. data/core/spec/test_app/public/javascripts/jquery-1.4.2.min.js +154 -0
  2291. data/core/spec/test_app/public/javascripts/jquery-ui.js +188 -0
  2292. data/core/spec/test_app/public/javascripts/jquery.alerts/images/help.gif +0 -0
  2293. data/core/spec/test_app/public/javascripts/jquery.alerts/images/important.gif +0 -0
  2294. data/core/spec/test_app/public/javascripts/jquery.alerts/images/info.gif +0 -0
  2295. data/core/spec/test_app/public/javascripts/jquery.alerts/images/title.gif +0 -0
  2296. data/core/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.css +57 -0
  2297. data/core/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.js +235 -0
  2298. data/core/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.spree.css +30 -0
  2299. data/core/spec/test_app/public/javascripts/jquery.autocomplete.min.js +13 -0
  2300. data/core/spec/test_app/public/javascripts/jquery.cookie.js +96 -0
  2301. data/core/spec/test_app/public/javascripts/jquery.delayedobserver.js +35 -0
  2302. data/core/spec/test_app/public/javascripts/jquery.suggest.js +276 -0
  2303. data/core/spec/test_app/public/javascripts/jquery.template.js +255 -0
  2304. data/core/spec/test_app/public/javascripts/jquery.tokeninput.js +618 -0
  2305. data/core/spec/test_app/public/javascripts/jquery.validate.min.js +16 -0
  2306. data/core/spec/test_app/public/javascripts/jsTree/jquery.jstree.js +3510 -0
  2307. data/core/spec/test_app/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
  2308. data/core/spec/test_app/public/javascripts/jsTree/themes/apple/d.png +0 -0
  2309. data/core/spec/test_app/public/javascripts/jsTree/themes/apple/dot_for_ie.gif +0 -0
  2310. data/core/spec/test_app/public/javascripts/jsTree/themes/apple/style.css +60 -0
  2311. data/core/spec/test_app/public/javascripts/jsTree/themes/apple/throbber.gif +0 -0
  2312. data/core/spec/test_app/public/javascripts/lang/af.js +40 -0
  2313. data/core/spec/test_app/public/javascripts/lang/ar.js +50 -0
  2314. data/core/spec/test_app/public/javascripts/lang/de.js +40 -0
  2315. data/core/spec/test_app/public/javascripts/lang/du.js +40 -0
  2316. data/core/spec/test_app/public/javascripts/lang/en.js +42 -0
  2317. data/core/spec/test_app/public/javascripts/lang/es.js +41 -0
  2318. data/core/spec/test_app/public/javascripts/lang/fi.js +40 -0
  2319. data/core/spec/test_app/public/javascripts/lang/fr.js +44 -0
  2320. data/core/spec/test_app/public/javascripts/lang/gr.js +40 -0
  2321. data/core/spec/test_app/public/javascripts/lang/he.js +49 -0
  2322. data/core/spec/test_app/public/javascripts/lang/it.js +13 -0
  2323. data/core/spec/test_app/public/javascripts/lang/nl.js +40 -0
  2324. data/core/spec/test_app/public/javascripts/lang/no.js +40 -0
  2325. data/core/spec/test_app/public/javascripts/lang/pt.js +50 -0
  2326. data/core/spec/test_app/public/javascripts/lang/ro.js +40 -0
  2327. data/core/spec/test_app/public/javascripts/lang/ru.js +40 -0
  2328. data/core/spec/test_app/public/javascripts/lang/sp.js +40 -0
  2329. data/core/spec/test_app/public/javascripts/lang/sv.js +41 -0
  2330. data/core/spec/test_app/public/javascripts/lang/ua.js +40 -0
  2331. data/core/spec/test_app/public/javascripts/localization/messages_cn.js +24 -0
  2332. data/core/spec/test_app/public/javascripts/localization/messages_cs.js +23 -0
  2333. data/core/spec/test_app/public/javascripts/localization/messages_da.js +21 -0
  2334. data/core/spec/test_app/public/javascripts/localization/messages_de.js +21 -0
  2335. data/core/spec/test_app/public/javascripts/localization/messages_es.js +24 -0
  2336. data/core/spec/test_app/public/javascripts/localization/messages_fr.js +23 -0
  2337. data/core/spec/test_app/public/javascripts/localization/messages_hu.js +21 -0
  2338. data/core/spec/test_app/public/javascripts/localization/messages_it.js +26 -0
  2339. data/core/spec/test_app/public/javascripts/localization/messages_kk.js +23 -0
  2340. data/core/spec/test_app/public/javascripts/localization/messages_nl.js +23 -0
  2341. data/core/spec/test_app/public/javascripts/localization/messages_no.js +23 -0
  2342. data/core/spec/test_app/public/javascripts/localization/messages_pl.js +23 -0
  2343. data/core/spec/test_app/public/javascripts/localization/messages_ptbr.js +30 -0
  2344. data/core/spec/test_app/public/javascripts/localization/messages_ro.js +24 -0
  2345. data/core/spec/test_app/public/javascripts/localization/messages_ru.js +23 -0
  2346. data/core/spec/test_app/public/javascripts/localization/messages_se.js +23 -0
  2347. data/core/spec/test_app/public/javascripts/localization/messages_sk.js +21 -0
  2348. data/core/spec/test_app/public/javascripts/localization/messages_tr.js +24 -0
  2349. data/core/spec/test_app/public/javascripts/localization/messages_tw.js +24 -0
  2350. data/core/spec/test_app/public/javascripts/localization/messages_ua.js +24 -0
  2351. data/core/spec/test_app/public/javascripts/nested-attribute.js +26 -0
  2352. data/core/spec/test_app/public/javascripts/open_id.js +15 -0
  2353. data/core/spec/test_app/public/javascripts/product.js +49 -0
  2354. data/core/spec/test_app/public/javascripts/rails.js +127 -0
  2355. data/core/spec/test_app/public/javascripts/taxonomy.js +201 -0
  2356. data/core/spec/test_app/public/javascripts/zone.js +39 -0
  2357. data/core/spec/test_app/public/robots.txt +5 -0
  2358. data/core/spec/test_app/public/stylesheets/admin/admin-forms.css +154 -0
  2359. data/core/spec/test_app/public/stylesheets/admin/admin-reset.css +69 -0
  2360. data/core/spec/test_app/public/stylesheets/admin/admin-tables.css +39 -0
  2361. data/core/spec/test_app/public/stylesheets/admin/admin-typography.css +117 -0
  2362. data/core/spec/test_app/public/stylesheets/admin/admin.css +614 -0
  2363. data/core/spec/test_app/public/stylesheets/admin/autocomplete.css +73 -0
  2364. data/core/spec/test_app/public/stylesheets/admin/dashboard.css +143 -0
  2365. data/core/spec/test_app/public/stylesheets/admin/edit_checkouts.css +57 -0
  2366. data/core/spec/test_app/public/stylesheets/admin/grids.css +314 -0
  2367. data/core/spec/test_app/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +7 -0
  2368. data/core/spec/test_app/public/stylesheets/admin/token-input.css +109 -0
  2369. data/core/spec/test_app/public/stylesheets/admin/yui-includes.css +14 -0
  2370. data/core/spec/test_app/public/stylesheets/datepicker.css +263 -0
  2371. data/core/spec/test_app/public/stylesheets/jquery.autocomplete.css +48 -0
  2372. data/core/spec/test_app/public/stylesheets/screen.css +916 -0
  2373. data/core/spec/test_app/script/rails +6 -0
  2374. data/dash/Gemfile +35 -0
  2375. data/dash/Gemfile.lock +233 -0
  2376. data/dash/LICENSE +26 -0
  2377. data/dash/README.md +14 -0
  2378. data/dash/Rakefile +50 -0
  2379. data/dash/app/controllers/admin/overview_controller.rb +152 -0
  2380. data/dash/app/views/admin/overview/index.html.erb +174 -0
  2381. data/dash/config/routes.rb +4 -0
  2382. data/dash/lib/spree_dash.rb +6 -0
  2383. data/dash/lib/tasks/install.rake +24 -0
  2384. data/dash/public/javascripts/dashboard.js +143 -0
  2385. data/dash/public/javascripts/jqPlot/excanvas.min.js +1 -0
  2386. data/dash/public/javascripts/jqPlot/jquery.jqplot.min.js +14 -0
  2387. data/dash/public/javascripts/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js +14 -0
  2388. data/dash/public/javascripts/jqPlot/plugins/jqplot.canvasAxisTickRenderer.min.js +14 -0
  2389. data/dash/public/javascripts/jqPlot/plugins/jqplot.canvasTextRenderer.min.js +14 -0
  2390. data/dash/public/javascripts/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js +14 -0
  2391. data/dash/public/javascripts/jqPlot/plugins/jqplot.dateAxisRenderer.min.js +14 -0
  2392. data/dash/public/javascripts/jqPlot/plugins/jqplot.highlighter.min.js +14 -0
  2393. data/dash/public/javascripts/jqPlot/plugins/jqplot.pieRenderer.min.js +14 -0
  2394. data/dash/public/stylesheets/admin/dashboard.css +143 -0
  2395. data/dash/rfcommerce_dash.gemspec +27 -0
  2396. data/dash/spec/controllers/admin/overview_controller_spec.rb +16 -0
  2397. data/dash/spec/spec_helper.rb +30 -0
  2398. data/dash/spec/test_app/Gemfile +35 -0
  2399. data/dash/spec/test_app/Rakefile +7 -0
  2400. data/dash/spec/test_app/app/controllers/application_controller.rb +3 -0
  2401. data/dash/spec/test_app/app/helpers/application_helper.rb +2 -0
  2402. data/dash/spec/test_app/app/views/layouts/application.html.erb +14 -0
  2403. data/dash/spec/test_app/config.ru +4 -0
  2404. data/dash/spec/test_app/config/application.rb +42 -0
  2405. data/dash/spec/test_app/config/boot.rb +6 -0
  2406. data/dash/spec/test_app/config/database.yml +17 -0
  2407. data/dash/spec/test_app/config/environment.rb +5 -0
  2408. data/dash/spec/test_app/config/environments/cucumber.rb +38 -0
  2409. data/dash/spec/test_app/config/environments/development.rb +26 -0
  2410. data/dash/spec/test_app/config/environments/production.rb +49 -0
  2411. data/dash/spec/test_app/config/environments/test.rb +35 -0
  2412. data/dash/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  2413. data/dash/spec/test_app/config/initializers/inflections.rb +10 -0
  2414. data/dash/spec/test_app/config/initializers/mime_types.rb +5 -0
  2415. data/dash/spec/test_app/config/initializers/secret_token.rb +7 -0
  2416. data/dash/spec/test_app/config/initializers/session_store.rb +8 -0
  2417. data/dash/spec/test_app/config/locales/en.yml +5 -0
  2418. data/dash/spec/test_app/config/routes.rb +58 -0
  2419. data/dash/spec/test_app/db/cucumber.sqlite3 +0 -0
  2420. data/dash/spec/test_app/db/default/countries.yml +1583 -0
  2421. data/dash/spec/test_app/db/default/roles.yml +7 -0
  2422. data/dash/spec/test_app/db/default/states.yml +256 -0
  2423. data/dash/spec/test_app/db/default/zone_members.yml +169 -0
  2424. data/dash/spec/test_app/db/default/zones.yml +13 -0
  2425. data/dash/spec/test_app/db/migrate/20090823005402_spree_zero_nine_zero.rb +442 -0
  2426. data/dash/spec/test_app/db/migrate/20090904192342_create_indexes_for_inventory_units.rb +12 -0
  2427. data/dash/spec/test_app/db/migrate/20090923100315_add_count_on_hand_to_variants_and_products.rb +36 -0
  2428. data/dash/spec/test_app/db/migrate/20091007134354_change_taxons_to_nested_set.rb +40 -0
  2429. data/dash/spec/test_app/db/migrate/20091008091614_move_to_configurable_gateways.rb +55 -0
  2430. data/dash/spec/test_app/db/migrate/20091012120519_product_groups_and_scopes.rb +25 -0
  2431. data/dash/spec/test_app/db/migrate/20091015110842_add_open_id_authentication_tables.rb +20 -0
  2432. data/dash/spec/test_app/db/migrate/20091015153048_add_openid_field_to_users.rb +19 -0
  2433. data/dash/spec/test_app/db/migrate/20091016174634_change_preference_value_type.rb +10 -0
  2434. data/dash/spec/test_app/db/migrate/20091017175558_create_billing_integrations.rb +16 -0
  2435. data/dash/spec/test_app/db/migrate/20091021133257_charge_refactoring.rb +35 -0
  2436. data/dash/spec/test_app/db/migrate/20091104151730_add_some_indexes.rb +21 -0
  2437. data/dash/spec/test_app/db/migrate/20091126190904_checkout_state_machine.rb +13 -0
  2438. data/dash/spec/test_app/db/migrate/20091209153045_state_for_shipments.rb +9 -0
  2439. data/dash/spec/test_app/db/migrate/20091209202200_make_state_events_polymorphic.rb +12 -0
  2440. data/dash/spec/test_app/db/migrate/20091211203813_ship_address_id_for_checkouts.rb +9 -0
  2441. data/dash/spec/test_app/db/migrate/20091212161118_shipping_method_id_for_checkouts.rb +9 -0
  2442. data/dash/spec/test_app/db/migrate/20091213222815_creditcard_last_four_digits.rb +19 -0
  2443. data/dash/spec/test_app/db/migrate/20091214183826_populate_legacy_shipment_state.rb +19 -0
  2444. data/dash/spec/test_app/db/migrate/20100105090147_add_cost_price.rb +9 -0
  2445. data/dash/spec/test_app/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +21 -0
  2446. data/dash/spec/test_app/db/migrate/20100111205525_cim_fields_for_creditcards.rb +11 -0
  2447. data/dash/spec/test_app/db/migrate/20100112151511_create_return_authorizations.rb +16 -0
  2448. data/dash/spec/test_app/db/migrate/20100113090919_add_return_authorization_to_inventory_units.rb +9 -0
  2449. data/dash/spec/test_app/db/migrate/20100113203104_create_trackers.rb +14 -0
  2450. data/dash/spec/test_app/db/migrate/20100121160010_creditcard_id_for_creditcard_txns.rb +9 -0
  2451. data/dash/spec/test_app/db/migrate/20100121183934_original_creditcard_txn_id_for_creditcard_txns.rb +9 -0
  2452. data/dash/spec/test_app/db/migrate/20100125145351_add_test_mode_to_billing_integration.rb +11 -0
  2453. data/dash/spec/test_app/db/migrate/20100126103714_create_products_product_groups.rb +12 -0
  2454. data/dash/spec/test_app/db/migrate/20100209025806_create_payment_methods.rb +20 -0
  2455. data/dash/spec/test_app/db/migrate/20100209144531_polymorphic_payments.rb +29 -0
  2456. data/dash/spec/test_app/db/migrate/20100213103131_change_payments_payment_method_to_belongs_to.rb +11 -0
  2457. data/dash/spec/test_app/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +16 -0
  2458. data/dash/spec/test_app/db/migrate/20100223170312_sti_for_transactions.rb +14 -0
  2459. data/dash/spec/test_app/db/migrate/20100223183812_drop_billing_integrations.rb +16 -0
  2460. data/dash/spec/test_app/db/migrate/20100224153127_deleted_at_for_payment_methods.rb +13 -0
  2461. data/dash/spec/test_app/db/migrate/20100301163454_add_adjustments_index.rb +10 -0
  2462. data/dash/spec/test_app/db/migrate/20100306153445_fix_by_popularity.rb +8 -0
  2463. data/dash/spec/test_app/db/migrate/20100317120946_add_alt_text_to_images.rb +9 -0
  2464. data/dash/spec/test_app/db/migrate/20100427121301_add_display_to_payment_methods.rb +9 -0
  2465. data/dash/spec/test_app/db/migrate/20100504142133_add_addresses_checkouts_indexes.rb +16 -0
  2466. data/dash/spec/test_app/db/migrate/20100506180619_add_icon_to_taxons.rb +18 -0
  2467. data/dash/spec/test_app/db/migrate/20100506185838_add_description_to_taxons.rb +11 -0
  2468. data/dash/spec/test_app/db/migrate/20100528155333_index_for_shipments_number.rb +9 -0
  2469. data/dash/spec/test_app/db/migrate/20100528185820_add_index_on_users_persistence_token.rb +9 -0
  2470. data/dash/spec/test_app/db/migrate/20100605152042_add_default_to_tax_categories.rb +9 -0
  2471. data/dash/spec/test_app/db/migrate/20100624110730_add_display_to_shipping_methods.rb +9 -0
  2472. data/dash/spec/test_app/db/migrate/20100624123336_rename_payment_method_display.rb +9 -0
  2473. data/dash/spec/test_app/db/migrate/20100624175547_rename_preferences_field.rb +8 -0
  2474. data/dash/spec/test_app/db/migrate/20100811163637_add_guest_flag.rb +13 -0
  2475. data/dash/spec/test_app/db/migrate/20100811205836_drop_order_token.rb +11 -0
  2476. data/dash/spec/test_app/db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb +11 -0
  2477. data/dash/spec/test_app/db/migrate/20100813023502_create_address_keys_for_order.rb +15 -0
  2478. data/dash/spec/test_app/db/migrate/20100813185745_payment_total_for_orders.rb +9 -0
  2479. data/dash/spec/test_app/db/migrate/20100816212146_shipping_method_id_for_orders.rb +9 -0
  2480. data/dash/spec/test_app/db/migrate/20100817152723_add_shipment_and_payment_state.rb +15 -0
  2481. data/dash/spec/test_app/db/migrate/20100819170125_refactor_adjustments.rb +19 -0
  2482. data/dash/spec/test_app/db/migrate/20100820135707_response_code_and_avs_response_for_payments.rb +11 -0
  2483. data/dash/spec/test_app/db/migrate/20100901171814_change_guest_flag_to_anonymous.rb +13 -0
  2484. data/dash/spec/test_app/db/migrate/20100903203949_email_for_orders.rb +9 -0
  2485. data/dash/spec/test_app/db/migrate/20100923162011_create_mail_methods.rb +12 -0
  2486. data/dash/spec/test_app/db/migrate/20100929151905_rename_frozen_to_locked.rb +8 -0
  2487. data/dash/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb +11 -0
  2488. data/dash/spec/test_app/db/migrate/20101026184700_create_log_entries.rb +15 -0
  2489. data/dash/spec/test_app/db/migrate/20101026184714_migrate_transactions_to_payment_state.rb +94 -0
  2490. data/dash/spec/test_app/db/migrate/20101026184746_delete_in_progress_orders.rb +18 -0
  2491. data/dash/spec/test_app/db/migrate/20101026184808_migrate_checkout_to_orders.rb +27 -0
  2492. data/dash/spec/test_app/db/migrate/20101026184833_migrate_adjustments.rb +9 -0
  2493. data/dash/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb +14 -0
  2494. data/dash/spec/test_app/db/migrate/20101026184916_prevent_nil_payment_total.rb +8 -0
  2495. data/dash/spec/test_app/db/migrate/20101026184932_prevent_nil_email.rb +9 -0
  2496. data/dash/spec/test_app/db/migrate/20101026184959_generate_anonymous_users.rb +14 -0
  2497. data/dash/spec/test_app/db/migrate/20101026185022_update_order_state.rb +8 -0
  2498. data/dash/spec/test_app/db/migrate/20101026192225_cleanup_legacy_tables.rb +11 -0
  2499. data/dash/spec/test_app/db/migrate/20101028151745_remove_number_and_cvv_from_credicard.rb +9 -0
  2500. data/dash/spec/test_app/db/migrate/20101103212716_drop_anonymous_field_for_user.rb +8 -0
  2501. data/dash/spec/test_app/db/migrate/20101111133551_renamed_rma_cancelled_state.rb +10 -0
  2502. data/dash/spec/test_app/db/migrate/20101117031806_fix_problematic_index_names.rb +13 -0
  2503. data/dash/spec/test_app/db/migrate/20101223215658_add_position_to_variants.rb +9 -0
  2504. data/dash/spec/test_app/db/migrate/20110110130847_add_next_state_to_state_events.rb +9 -0
  2505. data/dash/spec/test_app/db/migrate/20110111122537_add_position_to_option_types.rb +9 -0
  2506. data/dash/spec/test_app/db/migrate/20110314192118_remove_trailing_slashes_in_taxon_permalinks.rb +17 -0
  2507. data/dash/spec/test_app/db/sample/users.rb +61 -0
  2508. data/dash/spec/test_app/db/schema.rb +531 -0
  2509. data/dash/spec/test_app/db/seeds.rb +3 -0
  2510. data/dash/spec/test_app/db/test.sqlite3 +0 -0
  2511. data/dash/spec/test_app/log/cucumber.log +1324 -0
  2512. data/dash/spec/test_app/log/development.log +0 -0
  2513. data/dash/spec/test_app/log/production.log +0 -0
  2514. data/dash/spec/test_app/log/server.log +0 -0
  2515. data/dash/spec/test_app/log/test.log +1324 -0
  2516. data/dash/spec/test_app/public/404.html +26 -0
  2517. data/dash/spec/test_app/public/422.html +26 -0
  2518. data/dash/spec/test_app/public/500.html +26 -0
  2519. data/dash/spec/test_app/public/favicon.ico +0 -0
  2520. data/dash/spec/test_app/public/images/add-to-cart.png +0 -0
  2521. data/dash/spec/test_app/public/images/admin/bg/active-tab.png +0 -0
  2522. data/dash/spec/test_app/public/images/admin/bg/admin_tab_back.png +0 -0
  2523. data/dash/spec/test_app/public/images/admin/bg/admin_tab_selected_back.png +0 -0
  2524. data/dash/spec/test_app/public/images/admin/bg/content-back-blue.png +0 -0
  2525. data/dash/spec/test_app/public/images/admin/bg/content-back-green.png +0 -0
  2526. data/dash/spec/test_app/public/images/admin/bg/content-back.png +0 -0
  2527. data/dash/spec/test_app/public/images/admin/bg/flash-error.png +0 -0
  2528. data/dash/spec/test_app/public/images/admin/bg/flash-notice.png +0 -0
  2529. data/dash/spec/test_app/public/images/admin/bg/green-stripes.gif +0 -0
  2530. data/dash/spec/test_app/public/images/admin/bg/green-stripes.png +0 -0
  2531. data/dash/spec/test_app/public/images/admin/bg/grid_header_back.png +0 -0
  2532. data/dash/spec/test_app/public/images/admin/bg/grid_header_back_green.png +0 -0
  2533. data/dash/spec/test_app/public/images/admin/bg/header-bg.png +0 -0
  2534. data/dash/spec/test_app/public/images/admin/bg/header.png +0 -0
  2535. data/dash/spec/test_app/public/images/admin/bg/header_bg.jpg +0 -0
  2536. data/dash/spec/test_app/public/images/admin/bg/menu-current.png +0 -0
  2537. data/dash/spec/test_app/public/images/admin/bg/red-stripes.gif +0 -0
  2538. data/dash/spec/test_app/public/images/admin/bg/red-stripes.png +0 -0
  2539. data/dash/spec/test_app/public/images/admin/bg/spree_50.png +0 -0
  2540. data/dash/spec/test_app/public/images/admin/bg/subnav-divider.png +0 -0
  2541. data/dash/spec/test_app/public/images/admin/bg/subnav.png +0 -0
  2542. data/dash/spec/test_app/public/images/admin/bg/tab-back.png +0 -0
  2543. data/dash/spec/test_app/public/images/admin/buttons/blue/left_01.png +0 -0
  2544. data/dash/spec/test_app/public/images/admin/buttons/blue/right_01.png +0 -0
  2545. data/dash/spec/test_app/public/images/admin/buttons/drag-handle-green.png +0 -0
  2546. data/dash/spec/test_app/public/images/admin/buttons/green/left_01.png +0 -0
  2547. data/dash/spec/test_app/public/images/admin/buttons/green/right_01.png +0 -0
  2548. data/dash/spec/test_app/public/images/admin/buttons/left_01.png +0 -0
  2549. data/dash/spec/test_app/public/images/admin/buttons/left_01_small.png +0 -0
  2550. data/dash/spec/test_app/public/images/admin/buttons/orange/left_03.png +0 -0
  2551. data/dash/spec/test_app/public/images/admin/buttons/orange/right_03.png +0 -0
  2552. data/dash/spec/test_app/public/images/admin/buttons/right_01.png +0 -0
  2553. data/dash/spec/test_app/public/images/admin/buttons/right_01_small.png +0 -0
  2554. data/dash/spec/test_app/public/images/admin/icons/16x16/1.png +0 -0
  2555. data/dash/spec/test_app/public/images/admin/icons/16x16/10.png +0 -0
  2556. data/dash/spec/test_app/public/images/admin/icons/16x16/2.png +0 -0
  2557. data/dash/spec/test_app/public/images/admin/icons/16x16/3.png +0 -0
  2558. data/dash/spec/test_app/public/images/admin/icons/16x16/4.png +0 -0
  2559. data/dash/spec/test_app/public/images/admin/icons/16x16/5.png +0 -0
  2560. data/dash/spec/test_app/public/images/admin/icons/16x16/6.png +0 -0
  2561. data/dash/spec/test_app/public/images/admin/icons/16x16/7.png +0 -0
  2562. data/dash/spec/test_app/public/images/admin/icons/16x16/8.png +0 -0
  2563. data/dash/spec/test_app/public/images/admin/icons/16x16/9.png +0 -0
  2564. data/dash/spec/test_app/public/images/admin/icons/32x32/1.png +0 -0
  2565. data/dash/spec/test_app/public/images/admin/icons/32x32/10.png +0 -0
  2566. data/dash/spec/test_app/public/images/admin/icons/32x32/11.png +0 -0
  2567. data/dash/spec/test_app/public/images/admin/icons/32x32/2.png +0 -0
  2568. data/dash/spec/test_app/public/images/admin/icons/32x32/3.png +0 -0
  2569. data/dash/spec/test_app/public/images/admin/icons/32x32/4.png +0 -0
  2570. data/dash/spec/test_app/public/images/admin/icons/32x32/5.png +0 -0
  2571. data/dash/spec/test_app/public/images/admin/icons/32x32/6.png +0 -0
  2572. data/dash/spec/test_app/public/images/admin/icons/32x32/7.png +0 -0
  2573. data/dash/spec/test_app/public/images/admin/icons/32x32/8.png +0 -0
  2574. data/dash/spec/test_app/public/images/admin/icons/32x32/9.png +0 -0
  2575. data/dash/spec/test_app/public/images/admin/icons/accept.png +0 -0
  2576. data/dash/spec/test_app/public/images/admin/icons/add.gif +0 -0
  2577. data/dash/spec/test_app/public/images/admin/icons/add.png +0 -0
  2578. data/dash/spec/test_app/public/images/admin/icons/arrow-down.gif +0 -0
  2579. data/dash/spec/test_app/public/images/admin/icons/cross.png +0 -0
  2580. data/dash/spec/test_app/public/images/admin/icons/delete.gif +0 -0
  2581. data/dash/spec/test_app/public/images/admin/icons/delete.png +0 -0
  2582. data/dash/spec/test_app/public/images/admin/icons/drag.gif +0 -0
  2583. data/dash/spec/test_app/public/images/admin/icons/edit.gif +0 -0
  2584. data/dash/spec/test_app/public/images/admin/icons/edit.png +0 -0
  2585. data/dash/spec/test_app/public/images/admin/icons/email.png +0 -0
  2586. data/dash/spec/test_app/public/images/admin/icons/error.png +0 -0
  2587. data/dash/spec/test_app/public/images/admin/icons/exclamation.png +0 -0
  2588. data/dash/spec/test_app/public/images/admin/icons/feed.png +0 -0
  2589. data/dash/spec/test_app/public/images/admin/icons/pdf.png +0 -0
  2590. data/dash/spec/test_app/public/images/admin/icons/reorder.gif +0 -0
  2591. data/dash/spec/test_app/public/images/admin/icons/search.gif +0 -0
  2592. data/dash/spec/test_app/public/images/admin/icons/send-email.png +0 -0
  2593. data/dash/spec/test_app/public/images/admin/icons/stop.png +0 -0
  2594. data/dash/spec/test_app/public/images/admin/icons/tick.png +0 -0
  2595. data/dash/spec/test_app/public/images/admin/icons/up.gif +0 -0
  2596. data/dash/spec/test_app/public/images/admin/icons/xls.png +0 -0
  2597. data/dash/spec/test_app/public/images/admin/tabs/off-left.png +0 -0
  2598. data/dash/spec/test_app/public/images/admin/tabs/off-right.png +0 -0
  2599. data/dash/spec/test_app/public/images/admin/tabs/on-left.png +0 -0
  2600. data/dash/spec/test_app/public/images/admin/tabs/on-right.png +0 -0
  2601. data/dash/spec/test_app/public/images/ajax_loader.gif +0 -0
  2602. data/dash/spec/test_app/public/images/amex_cid.gif +0 -0
  2603. data/dash/spec/test_app/public/images/bg-button-hover.png +0 -0
  2604. data/dash/spec/test_app/public/images/bg-button-pressed.png +0 -0
  2605. data/dash/spec/test_app/public/images/bg-button.gif +0 -0
  2606. data/dash/spec/test_app/public/images/bg-button.png +0 -0
  2607. data/dash/spec/test_app/public/images/blue/left_01.png +0 -0
  2608. data/dash/spec/test_app/public/images/blue/right_01.png +0 -0
  2609. data/dash/spec/test_app/public/images/body-back.png +0 -0
  2610. data/dash/spec/test_app/public/images/bottom_shine.png +0 -0
  2611. data/dash/spec/test_app/public/images/breadcrumb.gif +0 -0
  2612. data/dash/spec/test_app/public/images/button-dark-hover.png +0 -0
  2613. data/dash/spec/test_app/public/images/button-dark.png +0 -0
  2614. data/dash/spec/test_app/public/images/buttons/bg-button-hover.png +0 -0
  2615. data/dash/spec/test_app/public/images/buttons/bg-button-pressed.png +0 -0
  2616. data/dash/spec/test_app/public/images/buttons/bg-button.gif +0 -0
  2617. data/dash/spec/test_app/public/images/buttons/bg-button.png +0 -0
  2618. data/dash/spec/test_app/public/images/buttons/blue/left_01.png +0 -0
  2619. data/dash/spec/test_app/public/images/buttons/blue/right_01.png +0 -0
  2620. data/dash/spec/test_app/public/images/buttons/button-dark-hover.png +0 -0
  2621. data/dash/spec/test_app/public/images/buttons/button-dark.png +0 -0
  2622. data/dash/spec/test_app/public/images/buttons/drag-handle-green.png +0 -0
  2623. data/dash/spec/test_app/public/images/buttons/green/left_01.png +0 -0
  2624. data/dash/spec/test_app/public/images/buttons/green/right_01.png +0 -0
  2625. data/dash/spec/test_app/public/images/buttons/left_01.png +0 -0
  2626. data/dash/spec/test_app/public/images/buttons/left_01_small.png +0 -0
  2627. data/dash/spec/test_app/public/images/buttons/orange/left_03.png +0 -0
  2628. data/dash/spec/test_app/public/images/buttons/orange/right_03.png +0 -0
  2629. data/dash/spec/test_app/public/images/buttons/right_01.png +0 -0
  2630. data/dash/spec/test_app/public/images/buttons/right_01_small.png +0 -0
  2631. data/dash/spec/test_app/public/images/buttons/sxsw-ribbon-v1.png +0 -0
  2632. data/dash/spec/test_app/public/images/buttons/top-shine.png +0 -0
  2633. data/dash/spec/test_app/public/images/calendar_date_select/calendar.gif +0 -0
  2634. data/dash/spec/test_app/public/images/cart-empty.png +0 -0
  2635. data/dash/spec/test_app/public/images/cart-empty_x32.png +0 -0
  2636. data/dash/spec/test_app/public/images/cart-full.png +0 -0
  2637. data/dash/spec/test_app/public/images/cart-full_x32.png +0 -0
  2638. data/dash/spec/test_app/public/images/checkout.png +0 -0
  2639. data/dash/spec/test_app/public/images/creditcard.gif +0 -0
  2640. data/dash/spec/test_app/public/images/datepicker/backstripes.gif +0 -0
  2641. data/dash/spec/test_app/public/images/datepicker/bg_header.jpg +0 -0
  2642. data/dash/spec/test_app/public/images/datepicker/bullet1.gif +0 -0
  2643. data/dash/spec/test_app/public/images/datepicker/bullet2.gif +0 -0
  2644. data/dash/spec/test_app/public/images/datepicker/cal.gif +0 -0
  2645. data/dash/spec/test_app/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
  2646. data/dash/spec/test_app/public/images/discover_cid.gif +0 -0
  2647. data/dash/spec/test_app/public/images/drag-handle-green.png +0 -0
  2648. data/dash/spec/test_app/public/images/favicon.ico +0 -0
  2649. data/dash/spec/test_app/public/images/green/left_01.png +0 -0
  2650. data/dash/spec/test_app/public/images/green/right_01.png +0 -0
  2651. data/dash/spec/test_app/public/images/grid.png +0 -0
  2652. data/dash/spec/test_app/public/images/left_01.png +0 -0
  2653. data/dash/spec/test_app/public/images/left_01_small.png +0 -0
  2654. data/dash/spec/test_app/public/images/master_cid.jpg +0 -0
  2655. data/dash/spec/test_app/public/images/menu-current.png +0 -0
  2656. data/dash/spec/test_app/public/images/menu-hover.png +0 -0
  2657. data/dash/spec/test_app/public/images/noimage/mini.jpg +0 -0
  2658. data/dash/spec/test_app/public/images/noimage/product.jpg +0 -0
  2659. data/dash/spec/test_app/public/images/noimage/small.jpg +0 -0
  2660. data/dash/spec/test_app/public/images/openid-inputicon.gif +0 -0
  2661. data/dash/spec/test_app/public/images/orange/left_03.png +0 -0
  2662. data/dash/spec/test_app/public/images/orange/right_03.png +0 -0
  2663. data/dash/spec/test_app/public/images/progress.gif +0 -0
  2664. data/dash/spec/test_app/public/images/reorder.jpg +0 -0
  2665. data/dash/spec/test_app/public/images/right_01.png +0 -0
  2666. data/dash/spec/test_app/public/images/right_01_small.png +0 -0
  2667. data/dash/spec/test_app/public/images/separator.png +0 -0
  2668. data/dash/spec/test_app/public/images/shadow-top.png +0 -0
  2669. data/dash/spec/test_app/public/images/shadow_top.png +0 -0
  2670. data/dash/spec/test_app/public/images/spinner.gif +0 -0
  2671. data/dash/spec/test_app/public/images/spree.jpg +0 -0
  2672. data/dash/spec/test_app/public/images/spree/progress.gif +0 -0
  2673. data/dash/spec/test_app/public/images/spree/spinner.gif +0 -0
  2674. data/dash/spec/test_app/public/images/spree/spree.jpg +0 -0
  2675. data/dash/spec/test_app/public/images/step-progress/completed-completed.gif +0 -0
  2676. data/dash/spec/test_app/public/images/step-progress/completed-current.gif +0 -0
  2677. data/dash/spec/test_app/public/images/step-progress/completed-first.gif +0 -0
  2678. data/dash/spec/test_app/public/images/step-progress/current-first.gif +0 -0
  2679. data/dash/spec/test_app/public/images/step-progress/current-incomplete.gif +0 -0
  2680. data/dash/spec/test_app/public/images/step-progress/current-right.gif +0 -0
  2681. data/dash/spec/test_app/public/images/step-progress/incomplete-incomplete.gif +0 -0
  2682. data/dash/spec/test_app/public/images/step-progress/incomplete-right.gif +0 -0
  2683. data/dash/spec/test_app/public/images/steps/1.png +0 -0
  2684. data/dash/spec/test_app/public/images/steps/1_small.png +0 -0
  2685. data/dash/spec/test_app/public/images/steps/2.png +0 -0
  2686. data/dash/spec/test_app/public/images/steps/2_small.png +0 -0
  2687. data/dash/spec/test_app/public/images/steps/3.png +0 -0
  2688. data/dash/spec/test_app/public/images/steps/3_small.png +0 -0
  2689. data/dash/spec/test_app/public/images/steps/4.png +0 -0
  2690. data/dash/spec/test_app/public/images/steps/4_small.png +0 -0
  2691. data/dash/spec/test_app/public/images/steps/5.png +0 -0
  2692. data/dash/spec/test_app/public/images/steps/5_small.png +0 -0
  2693. data/dash/spec/test_app/public/images/steps/6.png +0 -0
  2694. data/dash/spec/test_app/public/images/steps/6_small.png +0 -0
  2695. data/dash/spec/test_app/public/images/sxsw-ribbon-v1.png +0 -0
  2696. data/dash/spec/test_app/public/images/tab_bottom.gif +0 -0
  2697. data/dash/spec/test_app/public/images/tile-header.png +0 -0
  2698. data/dash/spec/test_app/public/images/tile-slider.png +0 -0
  2699. data/dash/spec/test_app/public/images/top-shine.png +0 -0
  2700. data/dash/spec/test_app/public/images/tree-nav-icons/bullet.gif +0 -0
  2701. data/dash/spec/test_app/public/images/tree-nav-icons/minus.gif +0 -0
  2702. data/dash/spec/test_app/public/images/tree-nav-icons/plus.gif +0 -0
  2703. data/dash/spec/test_app/public/images/tree-nav-icons/treeview-loading.gif +0 -0
  2704. data/dash/spec/test_app/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
  2705. data/dash/spec/test_app/public/images/update.png +0 -0
  2706. data/dash/spec/test_app/public/images/visa_cid.gif +0 -0
  2707. data/dash/spec/test_app/public/images/wrapper-back-2.png +0 -0
  2708. data/dash/spec/test_app/public/images/wrapper-back.png +0 -0
  2709. data/dash/spec/test_app/public/images/yui-menubaritem_submenuindicator.png +0 -0
  2710. data/dash/spec/test_app/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
  2711. data/dash/spec/test_app/public/images/yui-menuitem_checkbox.png +0 -0
  2712. data/dash/spec/test_app/public/images/yui-menuitem_checkbox_disabled.png +0 -0
  2713. data/dash/spec/test_app/public/images/yui-menuitem_submenuindicator.png +0 -0
  2714. data/dash/spec/test_app/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
  2715. data/dash/spec/test_app/public/images/yui-sprite.png +0 -0
  2716. data/dash/spec/test_app/public/javascripts/additional-methods.js +236 -0
  2717. data/dash/spec/test_app/public/javascripts/admin.js +232 -0
  2718. data/dash/spec/test_app/public/javascripts/admin/address_states.js +25 -0
  2719. data/dash/spec/test_app/public/javascripts/admin/checkouts/edit.js +130 -0
  2720. data/dash/spec/test_app/public/javascripts/admin/orders/edit.js +23 -0
  2721. data/dash/spec/test_app/public/javascripts/admin/orders/edit_form.js +16 -0
  2722. data/dash/spec/test_app/public/javascripts/admin/payments/new.js +9 -0
  2723. data/dash/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js +43 -0
  2724. data/dash/spec/test_app/public/javascripts/application.js +12 -0
  2725. data/dash/spec/test_app/public/javascripts/calculator.js +15 -0
  2726. data/dash/spec/test_app/public/javascripts/checkout.js +75 -0
  2727. data/dash/spec/test_app/public/javascripts/dashboard.js +143 -0
  2728. data/dash/spec/test_app/public/javascripts/datepicker.js +1445 -0
  2729. data/dash/spec/test_app/public/javascripts/gateway.js +13 -0
  2730. data/dash/spec/test_app/public/javascripts/jqPlot/excanvas.min.js +1 -0
  2731. data/dash/spec/test_app/public/javascripts/jqPlot/jquery.jqplot.min.js +14 -0
  2732. data/dash/spec/test_app/public/javascripts/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js +14 -0
  2733. data/dash/spec/test_app/public/javascripts/jqPlot/plugins/jqplot.canvasAxisTickRenderer.min.js +14 -0
  2734. data/dash/spec/test_app/public/javascripts/jqPlot/plugins/jqplot.canvasTextRenderer.min.js +14 -0
  2735. data/dash/spec/test_app/public/javascripts/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js +14 -0
  2736. data/dash/spec/test_app/public/javascripts/jqPlot/plugins/jqplot.dateAxisRenderer.min.js +14 -0
  2737. data/dash/spec/test_app/public/javascripts/jqPlot/plugins/jqplot.highlighter.min.js +14 -0
  2738. data/dash/spec/test_app/public/javascripts/jqPlot/plugins/jqplot.pieRenderer.min.js +14 -0
  2739. data/dash/spec/test_app/public/javascripts/jquery-1.4.2.min.js +154 -0
  2740. data/dash/spec/test_app/public/javascripts/jquery-ui.js +188 -0
  2741. data/dash/spec/test_app/public/javascripts/jquery.alerts/images/help.gif +0 -0
  2742. data/dash/spec/test_app/public/javascripts/jquery.alerts/images/important.gif +0 -0
  2743. data/dash/spec/test_app/public/javascripts/jquery.alerts/images/info.gif +0 -0
  2744. data/dash/spec/test_app/public/javascripts/jquery.alerts/images/title.gif +0 -0
  2745. data/dash/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.css +57 -0
  2746. data/dash/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.js +235 -0
  2747. data/dash/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.spree.css +30 -0
  2748. data/dash/spec/test_app/public/javascripts/jquery.autocomplete.min.js +13 -0
  2749. data/dash/spec/test_app/public/javascripts/jquery.cookie.js +96 -0
  2750. data/dash/spec/test_app/public/javascripts/jquery.delayedobserver.js +35 -0
  2751. data/dash/spec/test_app/public/javascripts/jquery.suggest.js +276 -0
  2752. data/dash/spec/test_app/public/javascripts/jquery.template.js +255 -0
  2753. data/dash/spec/test_app/public/javascripts/jquery.tokeninput.js +618 -0
  2754. data/dash/spec/test_app/public/javascripts/jquery.validate.min.js +16 -0
  2755. data/dash/spec/test_app/public/javascripts/jsTree/jquery.jstree.js +3510 -0
  2756. data/dash/spec/test_app/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
  2757. data/dash/spec/test_app/public/javascripts/jsTree/themes/apple/d.png +0 -0
  2758. data/dash/spec/test_app/public/javascripts/jsTree/themes/apple/dot_for_ie.gif +0 -0
  2759. data/dash/spec/test_app/public/javascripts/jsTree/themes/apple/style.css +60 -0
  2760. data/dash/spec/test_app/public/javascripts/jsTree/themes/apple/throbber.gif +0 -0
  2761. data/dash/spec/test_app/public/javascripts/lang/af.js +40 -0
  2762. data/dash/spec/test_app/public/javascripts/lang/ar.js +50 -0
  2763. data/dash/spec/test_app/public/javascripts/lang/de.js +40 -0
  2764. data/dash/spec/test_app/public/javascripts/lang/du.js +40 -0
  2765. data/dash/spec/test_app/public/javascripts/lang/en.js +42 -0
  2766. data/dash/spec/test_app/public/javascripts/lang/es.js +41 -0
  2767. data/dash/spec/test_app/public/javascripts/lang/fi.js +40 -0
  2768. data/dash/spec/test_app/public/javascripts/lang/fr.js +44 -0
  2769. data/dash/spec/test_app/public/javascripts/lang/gr.js +40 -0
  2770. data/dash/spec/test_app/public/javascripts/lang/he.js +49 -0
  2771. data/dash/spec/test_app/public/javascripts/lang/it.js +13 -0
  2772. data/dash/spec/test_app/public/javascripts/lang/nl.js +40 -0
  2773. data/dash/spec/test_app/public/javascripts/lang/no.js +40 -0
  2774. data/dash/spec/test_app/public/javascripts/lang/pt.js +50 -0
  2775. data/dash/spec/test_app/public/javascripts/lang/ro.js +40 -0
  2776. data/dash/spec/test_app/public/javascripts/lang/ru.js +40 -0
  2777. data/dash/spec/test_app/public/javascripts/lang/sp.js +40 -0
  2778. data/dash/spec/test_app/public/javascripts/lang/sv.js +41 -0
  2779. data/dash/spec/test_app/public/javascripts/lang/ua.js +40 -0
  2780. data/dash/spec/test_app/public/javascripts/localization/messages_cn.js +24 -0
  2781. data/dash/spec/test_app/public/javascripts/localization/messages_cs.js +23 -0
  2782. data/dash/spec/test_app/public/javascripts/localization/messages_da.js +21 -0
  2783. data/dash/spec/test_app/public/javascripts/localization/messages_de.js +21 -0
  2784. data/dash/spec/test_app/public/javascripts/localization/messages_es.js +24 -0
  2785. data/dash/spec/test_app/public/javascripts/localization/messages_fr.js +23 -0
  2786. data/dash/spec/test_app/public/javascripts/localization/messages_hu.js +21 -0
  2787. data/dash/spec/test_app/public/javascripts/localization/messages_it.js +26 -0
  2788. data/dash/spec/test_app/public/javascripts/localization/messages_kk.js +23 -0
  2789. data/dash/spec/test_app/public/javascripts/localization/messages_nl.js +23 -0
  2790. data/dash/spec/test_app/public/javascripts/localization/messages_no.js +23 -0
  2791. data/dash/spec/test_app/public/javascripts/localization/messages_pl.js +23 -0
  2792. data/dash/spec/test_app/public/javascripts/localization/messages_ptbr.js +30 -0
  2793. data/dash/spec/test_app/public/javascripts/localization/messages_ro.js +24 -0
  2794. data/dash/spec/test_app/public/javascripts/localization/messages_ru.js +23 -0
  2795. data/dash/spec/test_app/public/javascripts/localization/messages_se.js +23 -0
  2796. data/dash/spec/test_app/public/javascripts/localization/messages_sk.js +21 -0
  2797. data/dash/spec/test_app/public/javascripts/localization/messages_tr.js +24 -0
  2798. data/dash/spec/test_app/public/javascripts/localization/messages_tw.js +24 -0
  2799. data/dash/spec/test_app/public/javascripts/localization/messages_ua.js +24 -0
  2800. data/dash/spec/test_app/public/javascripts/nested-attribute.js +26 -0
  2801. data/dash/spec/test_app/public/javascripts/open_id.js +15 -0
  2802. data/dash/spec/test_app/public/javascripts/product.js +49 -0
  2803. data/dash/spec/test_app/public/javascripts/rails.js +127 -0
  2804. data/dash/spec/test_app/public/javascripts/taxonomy.js +201 -0
  2805. data/dash/spec/test_app/public/javascripts/zone.js +39 -0
  2806. data/dash/spec/test_app/public/robots.txt +5 -0
  2807. data/dash/spec/test_app/public/stylesheets/admin/admin-forms.css +154 -0
  2808. data/dash/spec/test_app/public/stylesheets/admin/admin-reset.css +69 -0
  2809. data/dash/spec/test_app/public/stylesheets/admin/admin-tables.css +39 -0
  2810. data/dash/spec/test_app/public/stylesheets/admin/admin-typography.css +117 -0
  2811. data/dash/spec/test_app/public/stylesheets/admin/admin.css +614 -0
  2812. data/dash/spec/test_app/public/stylesheets/admin/autocomplete.css +73 -0
  2813. data/dash/spec/test_app/public/stylesheets/admin/dashboard.css +143 -0
  2814. data/dash/spec/test_app/public/stylesheets/admin/edit_checkouts.css +57 -0
  2815. data/dash/spec/test_app/public/stylesheets/admin/grids.css +314 -0
  2816. data/dash/spec/test_app/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +7 -0
  2817. data/dash/spec/test_app/public/stylesheets/admin/token-input.css +109 -0
  2818. data/dash/spec/test_app/public/stylesheets/admin/yui-includes.css +14 -0
  2819. data/dash/spec/test_app/public/stylesheets/datepicker.css +263 -0
  2820. data/dash/spec/test_app/public/stylesheets/jquery.autocomplete.css +48 -0
  2821. data/dash/spec/test_app/public/stylesheets/screen.css +916 -0
  2822. data/dash/spec/test_app/script/rails +6 -0
  2823. data/features/step_definitions/async_steps.rb +19 -0
  2824. data/features/step_definitions/authentication_steps.rb +46 -0
  2825. data/features/step_definitions/checkout_steps.rb +76 -0
  2826. data/features/step_definitions/cukes_util.rb +123 -0
  2827. data/features/step_definitions/spree_steps.rb +15 -0
  2828. data/features/step_definitions/user_steps.rb +12 -0
  2829. data/features/step_definitions/web_steps.rb +218 -0
  2830. data/features/support/env.rb +74 -0
  2831. data/features/support/hooks.rb +6 -0
  2832. data/features/support/load_default_data.rb +10 -0
  2833. data/features/support/share_connections.rb +13 -0
  2834. data/features/support/stop.rb +12 -0
  2835. data/lib/generators/spree/extension_generator.rb +71 -0
  2836. data/lib/generators/spree/site_generator.rb +45 -0
  2837. data/lib/generators/spree/test_app_generator.rb +145 -0
  2838. data/lib/generators/templates/Gemfile +32 -0
  2839. data/lib/generators/templates/LICENSE +23 -0
  2840. data/lib/generators/templates/README.md +13 -0
  2841. data/lib/generators/templates/Rakefile.tt +75 -0
  2842. data/lib/generators/templates/Versionfile.tt +9 -0
  2843. data/lib/generators/templates/config/database.yml +17 -0
  2844. data/lib/generators/templates/config/database.yml.mysql +29 -0
  2845. data/lib/generators/templates/config/database.yml.sqlite3 +17 -0
  2846. data/lib/generators/templates/config/environments/cucumber.rb +38 -0
  2847. data/lib/generators/templates/extension.gemspec.tt +20 -0
  2848. data/lib/generators/templates/extension/extension.rb.tt +17 -0
  2849. data/lib/generators/templates/gitignore.tt +9 -0
  2850. data/lib/generators/templates/hooks.rb.tt +3 -0
  2851. data/lib/generators/templates/install.rake.tt +25 -0
  2852. data/lib/generators/templates/lib/tasks/%file_name%.rake.tt +1 -0
  2853. data/lib/generators/templates/routes.rb +3 -0
  2854. data/lib/generators/templates/spec_helper.rb +30 -0
  2855. data/lib/generators/templates/spree_site.rb +12 -0
  2856. data/lib/spree.rb +11 -0
  2857. data/lib/tasks/install.rake +29 -0
  2858. data/promo/Gemfile +36 -0
  2859. data/promo/Gemfile.lock +251 -0
  2860. data/promo/LICENSE +26 -0
  2861. data/promo/README.markdown +14 -0
  2862. data/promo/Rakefile +55 -0
  2863. data/promo/app/controllers/admin/promotion_rules_controller.rb +26 -0
  2864. data/promo/app/controllers/admin/promotions_controller.rb +21 -0
  2865. data/promo/app/controllers/orders_controller_decorator.rb +10 -0
  2866. data/promo/app/models/calculator/free_shipping.rb +24 -0
  2867. data/promo/app/models/promotion.rb +73 -0
  2868. data/promo/app/models/promotion/rules/first_order.rb +7 -0
  2869. data/promo/app/models/promotion/rules/item_total.rb +12 -0
  2870. data/promo/app/models/promotion/rules/product.rb +40 -0
  2871. data/promo/app/models/promotion/rules/user.rb +17 -0
  2872. data/promo/app/models/promotion_credit.rb +9 -0
  2873. data/promo/app/models/promotion_rule.rb +26 -0
  2874. data/promo/app/views/admin/promotion_rules/create.js.erb +6 -0
  2875. data/promo/app/views/admin/promotion_rules/destroy.js.erb +1 -0
  2876. data/promo/app/views/admin/promotions/_form.html.erb +46 -0
  2877. data/promo/app/views/admin/promotions/_promotion_rule.html.erb +8 -0
  2878. data/promo/app/views/admin/promotions/_tab.html.erb +1 -0
  2879. data/promo/app/views/admin/promotions/edit.html.erb +46 -0
  2880. data/promo/app/views/admin/promotions/index.html.erb +40 -0
  2881. data/promo/app/views/admin/promotions/new.html.erb +6 -0
  2882. data/promo/app/views/admin/promotions/rules/_first_order.html.erb +0 -0
  2883. data/promo/app/views/admin/promotions/rules/_item_total.html.erb +7 -0
  2884. data/promo/app/views/admin/promotions/rules/_product.html.erb +18 -0
  2885. data/promo/app/views/admin/promotions/rules/_user.html.erb +7 -0
  2886. data/promo/app/views/checkout/_coupon_code_field.html.erb +6 -0
  2887. data/promo/app/views/products/_promotions.html.erb +23 -0
  2888. data/promo/config/cucumber.yml +10 -0
  2889. data/promo/config/locales/en.yml +55 -0
  2890. data/promo/config/routes.rb +7 -0
  2891. data/promo/db/migrate/20100419190933_rename_coupons_to_promotions.rb +10 -0
  2892. data/promo/db/migrate/20100419194457_fix_existing_coupon_credits.rb +9 -0
  2893. data/promo/db/migrate/20100426100726_create_promotion_rules.rb +24 -0
  2894. data/promo/db/migrate/20100501084722_match_policy_for_promotions.rb +9 -0
  2895. data/promo/db/migrate/20100501095202_create_promotion_rules_users.rb +14 -0
  2896. data/promo/db/migrate/20100502163939_name_for_promotions.rb +9 -0
  2897. data/promo/db/migrate/20100923095305_update_calculable_type_for_promotions.rb +9 -0
  2898. data/promo/features/orders_total_promo.feature +89 -0
  2899. data/promo/features/step_definitions/promotions_steps.rb +4 -0
  2900. data/promo/features/support/env.rb +4 -0
  2901. data/promo/features/support/paths.rb +39 -0
  2902. data/promo/lib/spree_promo.rb +132 -0
  2903. data/promo/lib/spree_promo_hooks.rb +11 -0
  2904. data/promo/lib/tasks/install.rake +26 -0
  2905. data/promo/lib/tasks/promotions.rake +11 -0
  2906. data/promo/lib/tasks/promotions_extension_tasks.rake +17 -0
  2907. data/promo/public/javascripts/admin/promotions.js +26 -0
  2908. data/promo/public/stylesheets/admin/promotions.css +54 -0
  2909. data/promo/rfcommerce_promo.gemspec +26 -0
  2910. data/promo/spec/models/order_spec.rb +72 -0
  2911. data/promo/spec/models/promotion/rules/first_order_spec.rb +27 -0
  2912. data/promo/spec/models/promotion/rules/item_total_spec.rb +46 -0
  2913. data/promo/spec/models/promotion/rules/product_spec.rb +68 -0
  2914. data/promo/spec/models/promotion/rules/user_spec.rb +35 -0
  2915. data/promo/spec/models/promotion_rule_spec.rb +36 -0
  2916. data/promo/spec/models/promotion_spec.rb +146 -0
  2917. data/promo/spec/spec_helper.rb +17 -0
  2918. data/promo/spec/test_app/Gemfile +36 -0
  2919. data/promo/spec/test_app/Rakefile +7 -0
  2920. data/promo/spec/test_app/app/controllers/application_controller.rb +3 -0
  2921. data/promo/spec/test_app/app/helpers/application_helper.rb +2 -0
  2922. data/promo/spec/test_app/app/views/layouts/application.html.erb +14 -0
  2923. data/promo/spec/test_app/config.ru +4 -0
  2924. data/promo/spec/test_app/config/application.rb +42 -0
  2925. data/promo/spec/test_app/config/boot.rb +6 -0
  2926. data/promo/spec/test_app/config/database.yml +17 -0
  2927. data/promo/spec/test_app/config/environment.rb +5 -0
  2928. data/promo/spec/test_app/config/environments/cucumber.rb +38 -0
  2929. data/promo/spec/test_app/config/environments/development.rb +26 -0
  2930. data/promo/spec/test_app/config/environments/production.rb +49 -0
  2931. data/promo/spec/test_app/config/environments/test.rb +35 -0
  2932. data/promo/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  2933. data/promo/spec/test_app/config/initializers/inflections.rb +10 -0
  2934. data/promo/spec/test_app/config/initializers/mime_types.rb +5 -0
  2935. data/promo/spec/test_app/config/initializers/secret_token.rb +7 -0
  2936. data/promo/spec/test_app/config/initializers/session_store.rb +8 -0
  2937. data/promo/spec/test_app/config/locales/en.yml +5 -0
  2938. data/promo/spec/test_app/config/routes.rb +58 -0
  2939. data/promo/spec/test_app/db/cucumber.sqlite3 +0 -0
  2940. data/promo/spec/test_app/db/default/countries.yml +1583 -0
  2941. data/promo/spec/test_app/db/default/roles.yml +7 -0
  2942. data/promo/spec/test_app/db/default/states.yml +256 -0
  2943. data/promo/spec/test_app/db/default/zone_members.yml +169 -0
  2944. data/promo/spec/test_app/db/default/zones.yml +13 -0
  2945. data/promo/spec/test_app/db/migrate/20090823005402_spree_zero_nine_zero.rb +442 -0
  2946. data/promo/spec/test_app/db/migrate/20090904192342_create_indexes_for_inventory_units.rb +12 -0
  2947. data/promo/spec/test_app/db/migrate/20090923100315_add_count_on_hand_to_variants_and_products.rb +36 -0
  2948. data/promo/spec/test_app/db/migrate/20091007134354_change_taxons_to_nested_set.rb +40 -0
  2949. data/promo/spec/test_app/db/migrate/20091008091614_move_to_configurable_gateways.rb +55 -0
  2950. data/promo/spec/test_app/db/migrate/20091012120519_product_groups_and_scopes.rb +25 -0
  2951. data/promo/spec/test_app/db/migrate/20091015110842_add_open_id_authentication_tables.rb +20 -0
  2952. data/promo/spec/test_app/db/migrate/20091015153048_add_openid_field_to_users.rb +19 -0
  2953. data/promo/spec/test_app/db/migrate/20091016174634_change_preference_value_type.rb +10 -0
  2954. data/promo/spec/test_app/db/migrate/20091017175558_create_billing_integrations.rb +16 -0
  2955. data/promo/spec/test_app/db/migrate/20091021133257_charge_refactoring.rb +35 -0
  2956. data/promo/spec/test_app/db/migrate/20091104151730_add_some_indexes.rb +21 -0
  2957. data/promo/spec/test_app/db/migrate/20091126190904_checkout_state_machine.rb +13 -0
  2958. data/promo/spec/test_app/db/migrate/20091209153045_state_for_shipments.rb +9 -0
  2959. data/promo/spec/test_app/db/migrate/20091209202200_make_state_events_polymorphic.rb +12 -0
  2960. data/promo/spec/test_app/db/migrate/20091211203813_ship_address_id_for_checkouts.rb +9 -0
  2961. data/promo/spec/test_app/db/migrate/20091212161118_shipping_method_id_for_checkouts.rb +9 -0
  2962. data/promo/spec/test_app/db/migrate/20091213222815_creditcard_last_four_digits.rb +19 -0
  2963. data/promo/spec/test_app/db/migrate/20091214183826_populate_legacy_shipment_state.rb +19 -0
  2964. data/promo/spec/test_app/db/migrate/20100105090147_add_cost_price.rb +9 -0
  2965. data/promo/spec/test_app/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +21 -0
  2966. data/promo/spec/test_app/db/migrate/20100111205525_cim_fields_for_creditcards.rb +11 -0
  2967. data/promo/spec/test_app/db/migrate/20100112151511_create_return_authorizations.rb +16 -0
  2968. data/promo/spec/test_app/db/migrate/20100113090919_add_return_authorization_to_inventory_units.rb +9 -0
  2969. data/promo/spec/test_app/db/migrate/20100113203104_create_trackers.rb +14 -0
  2970. data/promo/spec/test_app/db/migrate/20100121160010_creditcard_id_for_creditcard_txns.rb +9 -0
  2971. data/promo/spec/test_app/db/migrate/20100121183934_original_creditcard_txn_id_for_creditcard_txns.rb +9 -0
  2972. data/promo/spec/test_app/db/migrate/20100125145351_add_test_mode_to_billing_integration.rb +11 -0
  2973. data/promo/spec/test_app/db/migrate/20100126103714_create_products_product_groups.rb +12 -0
  2974. data/promo/spec/test_app/db/migrate/20100209025806_create_payment_methods.rb +20 -0
  2975. data/promo/spec/test_app/db/migrate/20100209144531_polymorphic_payments.rb +29 -0
  2976. data/promo/spec/test_app/db/migrate/20100213103131_change_payments_payment_method_to_belongs_to.rb +11 -0
  2977. data/promo/spec/test_app/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +16 -0
  2978. data/promo/spec/test_app/db/migrate/20100223170312_sti_for_transactions.rb +14 -0
  2979. data/promo/spec/test_app/db/migrate/20100223183812_drop_billing_integrations.rb +16 -0
  2980. data/promo/spec/test_app/db/migrate/20100224153127_deleted_at_for_payment_methods.rb +13 -0
  2981. data/promo/spec/test_app/db/migrate/20100301163454_add_adjustments_index.rb +10 -0
  2982. data/promo/spec/test_app/db/migrate/20100306153445_fix_by_popularity.rb +8 -0
  2983. data/promo/spec/test_app/db/migrate/20100317120946_add_alt_text_to_images.rb +9 -0
  2984. data/promo/spec/test_app/db/migrate/20100419190933_rename_coupons_to_promotions.rb +10 -0
  2985. data/promo/spec/test_app/db/migrate/20100419194457_fix_existing_coupon_credits.rb +9 -0
  2986. data/promo/spec/test_app/db/migrate/20100426100726_create_promotion_rules.rb +24 -0
  2987. data/promo/spec/test_app/db/migrate/20100427121301_add_display_to_payment_methods.rb +9 -0
  2988. data/promo/spec/test_app/db/migrate/20100501084722_match_policy_for_promotions.rb +9 -0
  2989. data/promo/spec/test_app/db/migrate/20100501095202_create_promotion_rules_users.rb +14 -0
  2990. data/promo/spec/test_app/db/migrate/20100502163939_name_for_promotions.rb +9 -0
  2991. data/promo/spec/test_app/db/migrate/20100504142133_add_addresses_checkouts_indexes.rb +16 -0
  2992. data/promo/spec/test_app/db/migrate/20100506180619_add_icon_to_taxons.rb +18 -0
  2993. data/promo/spec/test_app/db/migrate/20100506185838_add_description_to_taxons.rb +11 -0
  2994. data/promo/spec/test_app/db/migrate/20100528155333_index_for_shipments_number.rb +9 -0
  2995. data/promo/spec/test_app/db/migrate/20100528185820_add_index_on_users_persistence_token.rb +9 -0
  2996. data/promo/spec/test_app/db/migrate/20100605152042_add_default_to_tax_categories.rb +9 -0
  2997. data/promo/spec/test_app/db/migrate/20100624110730_add_display_to_shipping_methods.rb +9 -0
  2998. data/promo/spec/test_app/db/migrate/20100624123336_rename_payment_method_display.rb +9 -0
  2999. data/promo/spec/test_app/db/migrate/20100624175547_rename_preferences_field.rb +8 -0
  3000. data/promo/spec/test_app/db/migrate/20100811163637_add_guest_flag.rb +13 -0
  3001. data/promo/spec/test_app/db/migrate/20100811205836_drop_order_token.rb +11 -0
  3002. data/promo/spec/test_app/db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb +11 -0
  3003. data/promo/spec/test_app/db/migrate/20100813023502_create_address_keys_for_order.rb +15 -0
  3004. data/promo/spec/test_app/db/migrate/20100813185745_payment_total_for_orders.rb +9 -0
  3005. data/promo/spec/test_app/db/migrate/20100816212146_shipping_method_id_for_orders.rb +9 -0
  3006. data/promo/spec/test_app/db/migrate/20100817152723_add_shipment_and_payment_state.rb +15 -0
  3007. data/promo/spec/test_app/db/migrate/20100819170125_refactor_adjustments.rb +19 -0
  3008. data/promo/spec/test_app/db/migrate/20100820135707_response_code_and_avs_response_for_payments.rb +11 -0
  3009. data/promo/spec/test_app/db/migrate/20100901171814_change_guest_flag_to_anonymous.rb +13 -0
  3010. data/promo/spec/test_app/db/migrate/20100903203949_email_for_orders.rb +9 -0
  3011. data/promo/spec/test_app/db/migrate/20100923095305_update_calculable_type_for_promotions.rb +9 -0
  3012. data/promo/spec/test_app/db/migrate/20100923162011_create_mail_methods.rb +12 -0
  3013. data/promo/spec/test_app/db/migrate/20100929151905_rename_frozen_to_locked.rb +8 -0
  3014. data/promo/spec/test_app/db/migrate/20101008190536_move_special_instructions_to_orders.rb +11 -0
  3015. data/promo/spec/test_app/db/migrate/20101026184700_create_log_entries.rb +15 -0
  3016. data/promo/spec/test_app/db/migrate/20101026184714_migrate_transactions_to_payment_state.rb +94 -0
  3017. data/promo/spec/test_app/db/migrate/20101026184746_delete_in_progress_orders.rb +18 -0
  3018. data/promo/spec/test_app/db/migrate/20101026184808_migrate_checkout_to_orders.rb +27 -0
  3019. data/promo/spec/test_app/db/migrate/20101026184833_migrate_adjustments.rb +9 -0
  3020. data/promo/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb +14 -0
  3021. data/promo/spec/test_app/db/migrate/20101026184916_prevent_nil_payment_total.rb +8 -0
  3022. data/promo/spec/test_app/db/migrate/20101026184932_prevent_nil_email.rb +9 -0
  3023. data/promo/spec/test_app/db/migrate/20101026184950_rename_columns_for_devise.rb +39 -0
  3024. data/promo/spec/test_app/db/migrate/20101026184959_generate_anonymous_users.rb +14 -0
  3025. data/promo/spec/test_app/db/migrate/20101026185022_update_order_state.rb +8 -0
  3026. data/promo/spec/test_app/db/migrate/20101026192225_cleanup_legacy_tables.rb +11 -0
  3027. data/promo/spec/test_app/db/migrate/20101028151745_remove_number_and_cvv_from_credicard.rb +9 -0
  3028. data/promo/spec/test_app/db/migrate/20101103212716_drop_anonymous_field_for_user.rb +8 -0
  3029. data/promo/spec/test_app/db/migrate/20101111133551_renamed_rma_cancelled_state.rb +10 -0
  3030. data/promo/spec/test_app/db/migrate/20101117031806_fix_problematic_index_names.rb +13 -0
  3031. data/promo/spec/test_app/db/migrate/20101214150824_convert_user_remember_field.rb +11 -0
  3032. data/promo/spec/test_app/db/migrate/20101217012656_create_tokenized_permissions.rb +18 -0
  3033. data/promo/spec/test_app/db/migrate/20101219201531_tokens_for_legacy_orders.rb +12 -0
  3034. data/promo/spec/test_app/db/migrate/20101223215658_add_position_to_variants.rb +9 -0
  3035. data/promo/spec/test_app/db/migrate/20110110130847_add_next_state_to_state_events.rb +9 -0
  3036. data/promo/spec/test_app/db/migrate/20110111122537_add_position_to_option_types.rb +9 -0
  3037. data/promo/spec/test_app/db/migrate/20110314192118_remove_trailing_slashes_in_taxon_permalinks.rb +17 -0
  3038. data/promo/spec/test_app/db/sample/users.rb +53 -0
  3039. data/promo/spec/test_app/db/schema.rb +572 -0
  3040. data/promo/spec/test_app/db/seeds.rb +3 -0
  3041. data/promo/spec/test_app/db/test.sqlite3 +0 -0
  3042. data/promo/spec/test_app/log/cucumber.log +1682 -0
  3043. data/promo/spec/test_app/log/development.log +0 -0
  3044. data/promo/spec/test_app/log/production.log +0 -0
  3045. data/promo/spec/test_app/log/server.log +0 -0
  3046. data/promo/spec/test_app/log/test.log +1682 -0
  3047. data/promo/spec/test_app/public/404.html +26 -0
  3048. data/promo/spec/test_app/public/422.html +26 -0
  3049. data/promo/spec/test_app/public/500.html +26 -0
  3050. data/promo/spec/test_app/public/favicon.ico +0 -0
  3051. data/promo/spec/test_app/public/images/add-to-cart.png +0 -0
  3052. data/promo/spec/test_app/public/images/admin/bg/active-tab.png +0 -0
  3053. data/promo/spec/test_app/public/images/admin/bg/admin_tab_back.png +0 -0
  3054. data/promo/spec/test_app/public/images/admin/bg/admin_tab_selected_back.png +0 -0
  3055. data/promo/spec/test_app/public/images/admin/bg/content-back-blue.png +0 -0
  3056. data/promo/spec/test_app/public/images/admin/bg/content-back-green.png +0 -0
  3057. data/promo/spec/test_app/public/images/admin/bg/content-back.png +0 -0
  3058. data/promo/spec/test_app/public/images/admin/bg/flash-error.png +0 -0
  3059. data/promo/spec/test_app/public/images/admin/bg/flash-notice.png +0 -0
  3060. data/promo/spec/test_app/public/images/admin/bg/green-stripes.gif +0 -0
  3061. data/promo/spec/test_app/public/images/admin/bg/green-stripes.png +0 -0
  3062. data/promo/spec/test_app/public/images/admin/bg/grid_header_back.png +0 -0
  3063. data/promo/spec/test_app/public/images/admin/bg/grid_header_back_green.png +0 -0
  3064. data/promo/spec/test_app/public/images/admin/bg/header-bg.png +0 -0
  3065. data/promo/spec/test_app/public/images/admin/bg/header.png +0 -0
  3066. data/promo/spec/test_app/public/images/admin/bg/header_bg.jpg +0 -0
  3067. data/promo/spec/test_app/public/images/admin/bg/menu-current.png +0 -0
  3068. data/promo/spec/test_app/public/images/admin/bg/red-stripes.gif +0 -0
  3069. data/promo/spec/test_app/public/images/admin/bg/red-stripes.png +0 -0
  3070. data/promo/spec/test_app/public/images/admin/bg/spree_50.png +0 -0
  3071. data/promo/spec/test_app/public/images/admin/bg/subnav-divider.png +0 -0
  3072. data/promo/spec/test_app/public/images/admin/bg/subnav.png +0 -0
  3073. data/promo/spec/test_app/public/images/admin/bg/tab-back.png +0 -0
  3074. data/promo/spec/test_app/public/images/admin/buttons/blue/left_01.png +0 -0
  3075. data/promo/spec/test_app/public/images/admin/buttons/blue/right_01.png +0 -0
  3076. data/promo/spec/test_app/public/images/admin/buttons/drag-handle-green.png +0 -0
  3077. data/promo/spec/test_app/public/images/admin/buttons/green/left_01.png +0 -0
  3078. data/promo/spec/test_app/public/images/admin/buttons/green/right_01.png +0 -0
  3079. data/promo/spec/test_app/public/images/admin/buttons/left_01.png +0 -0
  3080. data/promo/spec/test_app/public/images/admin/buttons/left_01_small.png +0 -0
  3081. data/promo/spec/test_app/public/images/admin/buttons/orange/left_03.png +0 -0
  3082. data/promo/spec/test_app/public/images/admin/buttons/orange/right_03.png +0 -0
  3083. data/promo/spec/test_app/public/images/admin/buttons/right_01.png +0 -0
  3084. data/promo/spec/test_app/public/images/admin/buttons/right_01_small.png +0 -0
  3085. data/promo/spec/test_app/public/images/admin/icons/16x16/1.png +0 -0
  3086. data/promo/spec/test_app/public/images/admin/icons/16x16/10.png +0 -0
  3087. data/promo/spec/test_app/public/images/admin/icons/16x16/2.png +0 -0
  3088. data/promo/spec/test_app/public/images/admin/icons/16x16/3.png +0 -0
  3089. data/promo/spec/test_app/public/images/admin/icons/16x16/4.png +0 -0
  3090. data/promo/spec/test_app/public/images/admin/icons/16x16/5.png +0 -0
  3091. data/promo/spec/test_app/public/images/admin/icons/16x16/6.png +0 -0
  3092. data/promo/spec/test_app/public/images/admin/icons/16x16/7.png +0 -0
  3093. data/promo/spec/test_app/public/images/admin/icons/16x16/8.png +0 -0
  3094. data/promo/spec/test_app/public/images/admin/icons/16x16/9.png +0 -0
  3095. data/promo/spec/test_app/public/images/admin/icons/32x32/1.png +0 -0
  3096. data/promo/spec/test_app/public/images/admin/icons/32x32/10.png +0 -0
  3097. data/promo/spec/test_app/public/images/admin/icons/32x32/11.png +0 -0
  3098. data/promo/spec/test_app/public/images/admin/icons/32x32/2.png +0 -0
  3099. data/promo/spec/test_app/public/images/admin/icons/32x32/3.png +0 -0
  3100. data/promo/spec/test_app/public/images/admin/icons/32x32/4.png +0 -0
  3101. data/promo/spec/test_app/public/images/admin/icons/32x32/5.png +0 -0
  3102. data/promo/spec/test_app/public/images/admin/icons/32x32/6.png +0 -0
  3103. data/promo/spec/test_app/public/images/admin/icons/32x32/7.png +0 -0
  3104. data/promo/spec/test_app/public/images/admin/icons/32x32/8.png +0 -0
  3105. data/promo/spec/test_app/public/images/admin/icons/32x32/9.png +0 -0
  3106. data/promo/spec/test_app/public/images/admin/icons/accept.png +0 -0
  3107. data/promo/spec/test_app/public/images/admin/icons/add.gif +0 -0
  3108. data/promo/spec/test_app/public/images/admin/icons/add.png +0 -0
  3109. data/promo/spec/test_app/public/images/admin/icons/arrow-down.gif +0 -0
  3110. data/promo/spec/test_app/public/images/admin/icons/cross.png +0 -0
  3111. data/promo/spec/test_app/public/images/admin/icons/delete.gif +0 -0
  3112. data/promo/spec/test_app/public/images/admin/icons/delete.png +0 -0
  3113. data/promo/spec/test_app/public/images/admin/icons/drag.gif +0 -0
  3114. data/promo/spec/test_app/public/images/admin/icons/edit.gif +0 -0
  3115. data/promo/spec/test_app/public/images/admin/icons/edit.png +0 -0
  3116. data/promo/spec/test_app/public/images/admin/icons/email.png +0 -0
  3117. data/promo/spec/test_app/public/images/admin/icons/error.png +0 -0
  3118. data/promo/spec/test_app/public/images/admin/icons/exclamation.png +0 -0
  3119. data/promo/spec/test_app/public/images/admin/icons/feed.png +0 -0
  3120. data/promo/spec/test_app/public/images/admin/icons/pdf.png +0 -0
  3121. data/promo/spec/test_app/public/images/admin/icons/reorder.gif +0 -0
  3122. data/promo/spec/test_app/public/images/admin/icons/search.gif +0 -0
  3123. data/promo/spec/test_app/public/images/admin/icons/send-email.png +0 -0
  3124. data/promo/spec/test_app/public/images/admin/icons/stop.png +0 -0
  3125. data/promo/spec/test_app/public/images/admin/icons/tick.png +0 -0
  3126. data/promo/spec/test_app/public/images/admin/icons/up.gif +0 -0
  3127. data/promo/spec/test_app/public/images/admin/icons/xls.png +0 -0
  3128. data/promo/spec/test_app/public/images/admin/tabs/off-left.png +0 -0
  3129. data/promo/spec/test_app/public/images/admin/tabs/off-right.png +0 -0
  3130. data/promo/spec/test_app/public/images/admin/tabs/on-left.png +0 -0
  3131. data/promo/spec/test_app/public/images/admin/tabs/on-right.png +0 -0
  3132. data/promo/spec/test_app/public/images/ajax_loader.gif +0 -0
  3133. data/promo/spec/test_app/public/images/amex_cid.gif +0 -0
  3134. data/promo/spec/test_app/public/images/bg-button-hover.png +0 -0
  3135. data/promo/spec/test_app/public/images/bg-button-pressed.png +0 -0
  3136. data/promo/spec/test_app/public/images/bg-button.gif +0 -0
  3137. data/promo/spec/test_app/public/images/bg-button.png +0 -0
  3138. data/promo/spec/test_app/public/images/blue/left_01.png +0 -0
  3139. data/promo/spec/test_app/public/images/blue/right_01.png +0 -0
  3140. data/promo/spec/test_app/public/images/body-back.png +0 -0
  3141. data/promo/spec/test_app/public/images/bottom_shine.png +0 -0
  3142. data/promo/spec/test_app/public/images/breadcrumb.gif +0 -0
  3143. data/promo/spec/test_app/public/images/button-dark-hover.png +0 -0
  3144. data/promo/spec/test_app/public/images/button-dark.png +0 -0
  3145. data/promo/spec/test_app/public/images/buttons/bg-button-hover.png +0 -0
  3146. data/promo/spec/test_app/public/images/buttons/bg-button-pressed.png +0 -0
  3147. data/promo/spec/test_app/public/images/buttons/bg-button.gif +0 -0
  3148. data/promo/spec/test_app/public/images/buttons/bg-button.png +0 -0
  3149. data/promo/spec/test_app/public/images/buttons/blue/left_01.png +0 -0
  3150. data/promo/spec/test_app/public/images/buttons/blue/right_01.png +0 -0
  3151. data/promo/spec/test_app/public/images/buttons/button-dark-hover.png +0 -0
  3152. data/promo/spec/test_app/public/images/buttons/button-dark.png +0 -0
  3153. data/promo/spec/test_app/public/images/buttons/drag-handle-green.png +0 -0
  3154. data/promo/spec/test_app/public/images/buttons/green/left_01.png +0 -0
  3155. data/promo/spec/test_app/public/images/buttons/green/right_01.png +0 -0
  3156. data/promo/spec/test_app/public/images/buttons/left_01.png +0 -0
  3157. data/promo/spec/test_app/public/images/buttons/left_01_small.png +0 -0
  3158. data/promo/spec/test_app/public/images/buttons/orange/left_03.png +0 -0
  3159. data/promo/spec/test_app/public/images/buttons/orange/right_03.png +0 -0
  3160. data/promo/spec/test_app/public/images/buttons/right_01.png +0 -0
  3161. data/promo/spec/test_app/public/images/buttons/right_01_small.png +0 -0
  3162. data/promo/spec/test_app/public/images/buttons/sxsw-ribbon-v1.png +0 -0
  3163. data/promo/spec/test_app/public/images/buttons/top-shine.png +0 -0
  3164. data/promo/spec/test_app/public/images/calendar_date_select/calendar.gif +0 -0
  3165. data/promo/spec/test_app/public/images/cart-empty.png +0 -0
  3166. data/promo/spec/test_app/public/images/cart-empty_x32.png +0 -0
  3167. data/promo/spec/test_app/public/images/cart-full.png +0 -0
  3168. data/promo/spec/test_app/public/images/cart-full_x32.png +0 -0
  3169. data/promo/spec/test_app/public/images/checkout.png +0 -0
  3170. data/promo/spec/test_app/public/images/creditcard.gif +0 -0
  3171. data/promo/spec/test_app/public/images/datepicker/backstripes.gif +0 -0
  3172. data/promo/spec/test_app/public/images/datepicker/bg_header.jpg +0 -0
  3173. data/promo/spec/test_app/public/images/datepicker/bullet1.gif +0 -0
  3174. data/promo/spec/test_app/public/images/datepicker/bullet2.gif +0 -0
  3175. data/promo/spec/test_app/public/images/datepicker/cal.gif +0 -0
  3176. data/promo/spec/test_app/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
  3177. data/promo/spec/test_app/public/images/discover_cid.gif +0 -0
  3178. data/promo/spec/test_app/public/images/drag-handle-green.png +0 -0
  3179. data/promo/spec/test_app/public/images/favicon.ico +0 -0
  3180. data/promo/spec/test_app/public/images/green/left_01.png +0 -0
  3181. data/promo/spec/test_app/public/images/green/right_01.png +0 -0
  3182. data/promo/spec/test_app/public/images/grid.png +0 -0
  3183. data/promo/spec/test_app/public/images/left_01.png +0 -0
  3184. data/promo/spec/test_app/public/images/left_01_small.png +0 -0
  3185. data/promo/spec/test_app/public/images/master_cid.jpg +0 -0
  3186. data/promo/spec/test_app/public/images/menu-current.png +0 -0
  3187. data/promo/spec/test_app/public/images/menu-hover.png +0 -0
  3188. data/promo/spec/test_app/public/images/noimage/mini.jpg +0 -0
  3189. data/promo/spec/test_app/public/images/noimage/product.jpg +0 -0
  3190. data/promo/spec/test_app/public/images/noimage/small.jpg +0 -0
  3191. data/promo/spec/test_app/public/images/openid-inputicon.gif +0 -0
  3192. data/promo/spec/test_app/public/images/orange/left_03.png +0 -0
  3193. data/promo/spec/test_app/public/images/orange/right_03.png +0 -0
  3194. data/promo/spec/test_app/public/images/progress.gif +0 -0
  3195. data/promo/spec/test_app/public/images/reorder.jpg +0 -0
  3196. data/promo/spec/test_app/public/images/right_01.png +0 -0
  3197. data/promo/spec/test_app/public/images/right_01_small.png +0 -0
  3198. data/promo/spec/test_app/public/images/separator.png +0 -0
  3199. data/promo/spec/test_app/public/images/shadow-top.png +0 -0
  3200. data/promo/spec/test_app/public/images/shadow_top.png +0 -0
  3201. data/promo/spec/test_app/public/images/spinner.gif +0 -0
  3202. data/promo/spec/test_app/public/images/spree.jpg +0 -0
  3203. data/promo/spec/test_app/public/images/spree/progress.gif +0 -0
  3204. data/promo/spec/test_app/public/images/spree/spinner.gif +0 -0
  3205. data/promo/spec/test_app/public/images/spree/spree.jpg +0 -0
  3206. data/promo/spec/test_app/public/images/step-progress/completed-completed.gif +0 -0
  3207. data/promo/spec/test_app/public/images/step-progress/completed-current.gif +0 -0
  3208. data/promo/spec/test_app/public/images/step-progress/completed-first.gif +0 -0
  3209. data/promo/spec/test_app/public/images/step-progress/current-first.gif +0 -0
  3210. data/promo/spec/test_app/public/images/step-progress/current-incomplete.gif +0 -0
  3211. data/promo/spec/test_app/public/images/step-progress/current-right.gif +0 -0
  3212. data/promo/spec/test_app/public/images/step-progress/incomplete-incomplete.gif +0 -0
  3213. data/promo/spec/test_app/public/images/step-progress/incomplete-right.gif +0 -0
  3214. data/promo/spec/test_app/public/images/steps/1.png +0 -0
  3215. data/promo/spec/test_app/public/images/steps/1_small.png +0 -0
  3216. data/promo/spec/test_app/public/images/steps/2.png +0 -0
  3217. data/promo/spec/test_app/public/images/steps/2_small.png +0 -0
  3218. data/promo/spec/test_app/public/images/steps/3.png +0 -0
  3219. data/promo/spec/test_app/public/images/steps/3_small.png +0 -0
  3220. data/promo/spec/test_app/public/images/steps/4.png +0 -0
  3221. data/promo/spec/test_app/public/images/steps/4_small.png +0 -0
  3222. data/promo/spec/test_app/public/images/steps/5.png +0 -0
  3223. data/promo/spec/test_app/public/images/steps/5_small.png +0 -0
  3224. data/promo/spec/test_app/public/images/steps/6.png +0 -0
  3225. data/promo/spec/test_app/public/images/steps/6_small.png +0 -0
  3226. data/promo/spec/test_app/public/images/sxsw-ribbon-v1.png +0 -0
  3227. data/promo/spec/test_app/public/images/tab_bottom.gif +0 -0
  3228. data/promo/spec/test_app/public/images/tile-header.png +0 -0
  3229. data/promo/spec/test_app/public/images/tile-slider.png +0 -0
  3230. data/promo/spec/test_app/public/images/top-shine.png +0 -0
  3231. data/promo/spec/test_app/public/images/tree-nav-icons/bullet.gif +0 -0
  3232. data/promo/spec/test_app/public/images/tree-nav-icons/minus.gif +0 -0
  3233. data/promo/spec/test_app/public/images/tree-nav-icons/plus.gif +0 -0
  3234. data/promo/spec/test_app/public/images/tree-nav-icons/treeview-loading.gif +0 -0
  3235. data/promo/spec/test_app/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
  3236. data/promo/spec/test_app/public/images/update.png +0 -0
  3237. data/promo/spec/test_app/public/images/visa_cid.gif +0 -0
  3238. data/promo/spec/test_app/public/images/wrapper-back-2.png +0 -0
  3239. data/promo/spec/test_app/public/images/wrapper-back.png +0 -0
  3240. data/promo/spec/test_app/public/images/yui-menubaritem_submenuindicator.png +0 -0
  3241. data/promo/spec/test_app/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
  3242. data/promo/spec/test_app/public/images/yui-menuitem_checkbox.png +0 -0
  3243. data/promo/spec/test_app/public/images/yui-menuitem_checkbox_disabled.png +0 -0
  3244. data/promo/spec/test_app/public/images/yui-menuitem_submenuindicator.png +0 -0
  3245. data/promo/spec/test_app/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
  3246. data/promo/spec/test_app/public/images/yui-sprite.png +0 -0
  3247. data/promo/spec/test_app/public/javascripts/additional-methods.js +236 -0
  3248. data/promo/spec/test_app/public/javascripts/admin.js +232 -0
  3249. data/promo/spec/test_app/public/javascripts/admin/address_states.js +25 -0
  3250. data/promo/spec/test_app/public/javascripts/admin/checkouts/edit.js +130 -0
  3251. data/promo/spec/test_app/public/javascripts/admin/orders/edit.js +23 -0
  3252. data/promo/spec/test_app/public/javascripts/admin/orders/edit_form.js +16 -0
  3253. data/promo/spec/test_app/public/javascripts/admin/payments/new.js +9 -0
  3254. data/promo/spec/test_app/public/javascripts/admin/promotions.js +26 -0
  3255. data/promo/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js +43 -0
  3256. data/promo/spec/test_app/public/javascripts/application.js +12 -0
  3257. data/promo/spec/test_app/public/javascripts/calculator.js +15 -0
  3258. data/promo/spec/test_app/public/javascripts/checkout.js +75 -0
  3259. data/promo/spec/test_app/public/javascripts/datepicker.js +1445 -0
  3260. data/promo/spec/test_app/public/javascripts/gateway.js +13 -0
  3261. data/promo/spec/test_app/public/javascripts/jquery-1.4.2.min.js +154 -0
  3262. data/promo/spec/test_app/public/javascripts/jquery-ui.js +188 -0
  3263. data/promo/spec/test_app/public/javascripts/jquery.alerts/images/help.gif +0 -0
  3264. data/promo/spec/test_app/public/javascripts/jquery.alerts/images/important.gif +0 -0
  3265. data/promo/spec/test_app/public/javascripts/jquery.alerts/images/info.gif +0 -0
  3266. data/promo/spec/test_app/public/javascripts/jquery.alerts/images/title.gif +0 -0
  3267. data/promo/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.css +57 -0
  3268. data/promo/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.js +235 -0
  3269. data/promo/spec/test_app/public/javascripts/jquery.alerts/jquery.alerts.spree.css +30 -0
  3270. data/promo/spec/test_app/public/javascripts/jquery.autocomplete.min.js +13 -0
  3271. data/promo/spec/test_app/public/javascripts/jquery.cookie.js +96 -0
  3272. data/promo/spec/test_app/public/javascripts/jquery.delayedobserver.js +35 -0
  3273. data/promo/spec/test_app/public/javascripts/jquery.suggest.js +276 -0
  3274. data/promo/spec/test_app/public/javascripts/jquery.template.js +255 -0
  3275. data/promo/spec/test_app/public/javascripts/jquery.tokeninput.js +618 -0
  3276. data/promo/spec/test_app/public/javascripts/jquery.validate.min.js +16 -0
  3277. data/promo/spec/test_app/public/javascripts/jsTree/jquery.jstree.js +3510 -0
  3278. data/promo/spec/test_app/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
  3279. data/promo/spec/test_app/public/javascripts/jsTree/themes/apple/d.png +0 -0
  3280. data/promo/spec/test_app/public/javascripts/jsTree/themes/apple/dot_for_ie.gif +0 -0
  3281. data/promo/spec/test_app/public/javascripts/jsTree/themes/apple/style.css +60 -0
  3282. data/promo/spec/test_app/public/javascripts/jsTree/themes/apple/throbber.gif +0 -0
  3283. data/promo/spec/test_app/public/javascripts/lang/af.js +40 -0
  3284. data/promo/spec/test_app/public/javascripts/lang/ar.js +50 -0
  3285. data/promo/spec/test_app/public/javascripts/lang/de.js +40 -0
  3286. data/promo/spec/test_app/public/javascripts/lang/du.js +40 -0
  3287. data/promo/spec/test_app/public/javascripts/lang/en.js +42 -0
  3288. data/promo/spec/test_app/public/javascripts/lang/es.js +41 -0
  3289. data/promo/spec/test_app/public/javascripts/lang/fi.js +40 -0
  3290. data/promo/spec/test_app/public/javascripts/lang/fr.js +44 -0
  3291. data/promo/spec/test_app/public/javascripts/lang/gr.js +40 -0
  3292. data/promo/spec/test_app/public/javascripts/lang/he.js +49 -0
  3293. data/promo/spec/test_app/public/javascripts/lang/it.js +13 -0
  3294. data/promo/spec/test_app/public/javascripts/lang/nl.js +40 -0
  3295. data/promo/spec/test_app/public/javascripts/lang/no.js +40 -0
  3296. data/promo/spec/test_app/public/javascripts/lang/pt.js +50 -0
  3297. data/promo/spec/test_app/public/javascripts/lang/ro.js +40 -0
  3298. data/promo/spec/test_app/public/javascripts/lang/ru.js +40 -0
  3299. data/promo/spec/test_app/public/javascripts/lang/sp.js +40 -0
  3300. data/promo/spec/test_app/public/javascripts/lang/sv.js +41 -0
  3301. data/promo/spec/test_app/public/javascripts/lang/ua.js +40 -0
  3302. data/promo/spec/test_app/public/javascripts/localization/messages_cn.js +24 -0
  3303. data/promo/spec/test_app/public/javascripts/localization/messages_cs.js +23 -0
  3304. data/promo/spec/test_app/public/javascripts/localization/messages_da.js +21 -0
  3305. data/promo/spec/test_app/public/javascripts/localization/messages_de.js +21 -0
  3306. data/promo/spec/test_app/public/javascripts/localization/messages_es.js +24 -0
  3307. data/promo/spec/test_app/public/javascripts/localization/messages_fr.js +23 -0
  3308. data/promo/spec/test_app/public/javascripts/localization/messages_hu.js +21 -0
  3309. data/promo/spec/test_app/public/javascripts/localization/messages_it.js +26 -0
  3310. data/promo/spec/test_app/public/javascripts/localization/messages_kk.js +23 -0
  3311. data/promo/spec/test_app/public/javascripts/localization/messages_nl.js +23 -0
  3312. data/promo/spec/test_app/public/javascripts/localization/messages_no.js +23 -0
  3313. data/promo/spec/test_app/public/javascripts/localization/messages_pl.js +23 -0
  3314. data/promo/spec/test_app/public/javascripts/localization/messages_ptbr.js +30 -0
  3315. data/promo/spec/test_app/public/javascripts/localization/messages_ro.js +24 -0
  3316. data/promo/spec/test_app/public/javascripts/localization/messages_ru.js +23 -0
  3317. data/promo/spec/test_app/public/javascripts/localization/messages_se.js +23 -0
  3318. data/promo/spec/test_app/public/javascripts/localization/messages_sk.js +21 -0
  3319. data/promo/spec/test_app/public/javascripts/localization/messages_tr.js +24 -0
  3320. data/promo/spec/test_app/public/javascripts/localization/messages_tw.js +24 -0
  3321. data/promo/spec/test_app/public/javascripts/localization/messages_ua.js +24 -0
  3322. data/promo/spec/test_app/public/javascripts/nested-attribute.js +26 -0
  3323. data/promo/spec/test_app/public/javascripts/open_id.js +15 -0
  3324. data/promo/spec/test_app/public/javascripts/product.js +49 -0
  3325. data/promo/spec/test_app/public/javascripts/rails.js +127 -0
  3326. data/promo/spec/test_app/public/javascripts/taxonomy.js +201 -0
  3327. data/promo/spec/test_app/public/javascripts/zone.js +39 -0
  3328. data/promo/spec/test_app/public/robots.txt +5 -0
  3329. data/promo/spec/test_app/public/stylesheets/admin/admin-forms.css +154 -0
  3330. data/promo/spec/test_app/public/stylesheets/admin/admin-reset.css +69 -0
  3331. data/promo/spec/test_app/public/stylesheets/admin/admin-tables.css +39 -0
  3332. data/promo/spec/test_app/public/stylesheets/admin/admin-typography.css +117 -0
  3333. data/promo/spec/test_app/public/stylesheets/admin/admin.css +614 -0
  3334. data/promo/spec/test_app/public/stylesheets/admin/autocomplete.css +73 -0
  3335. data/promo/spec/test_app/public/stylesheets/admin/dashboard.css +143 -0
  3336. data/promo/spec/test_app/public/stylesheets/admin/edit_checkouts.css +57 -0
  3337. data/promo/spec/test_app/public/stylesheets/admin/grids.css +314 -0
  3338. data/promo/spec/test_app/public/stylesheets/admin/promotions.css +54 -0
  3339. data/promo/spec/test_app/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +7 -0
  3340. data/promo/spec/test_app/public/stylesheets/admin/token-input.css +109 -0
  3341. data/promo/spec/test_app/public/stylesheets/admin/yui-includes.css +14 -0
  3342. data/promo/spec/test_app/public/stylesheets/datepicker.css +263 -0
  3343. data/promo/spec/test_app/public/stylesheets/jquery.autocomplete.css +48 -0
  3344. data/promo/spec/test_app/public/stylesheets/screen.css +916 -0
  3345. data/promo/spec/test_app/script/rails +6 -0
  3346. data/sample/LICENSE +26 -0
  3347. data/sample/Rakefile +17 -0
  3348. data/sample/db/sample/addresses.yml +27 -0
  3349. data/sample/db/sample/adjustments.yml +24 -0
  3350. data/sample/db/sample/assets.yml +320 -0
  3351. data/sample/db/sample/assets/apache_baseball.png +0 -0
  3352. data/sample/db/sample/assets/ror_bag.jpeg +0 -0
  3353. data/sample/db/sample/assets/ror_baseball.jpeg +0 -0
  3354. data/sample/db/sample/assets/ror_baseball_back.jpeg +0 -0
  3355. data/sample/db/sample/assets/ror_baseball_jersey_back_blue.png +0 -0
  3356. data/sample/db/sample/assets/ror_baseball_jersey_back_green.png +0 -0
  3357. data/sample/db/sample/assets/ror_baseball_jersey_back_red.png +0 -0
  3358. data/sample/db/sample/assets/ror_baseball_jersey_blue.png +0 -0
  3359. data/sample/db/sample/assets/ror_baseball_jersey_green.png +0 -0
  3360. data/sample/db/sample/assets/ror_baseball_jersey_red.png +0 -0
  3361. data/sample/db/sample/assets/ror_jr_spaghetti.jpeg +0 -0
  3362. data/sample/db/sample/assets/ror_mug.jpeg +0 -0
  3363. data/sample/db/sample/assets/ror_mug_back.jpeg +0 -0
  3364. data/sample/db/sample/assets/ror_ringer.jpeg +0 -0
  3365. data/sample/db/sample/assets/ror_ringer_back.jpeg +0 -0
  3366. data/sample/db/sample/assets/ror_stein.jpeg +0 -0
  3367. data/sample/db/sample/assets/ror_stein_back.jpeg +0 -0
  3368. data/sample/db/sample/assets/ror_tote.jpeg +0 -0
  3369. data/sample/db/sample/assets/ror_tote_back.jpeg +0 -0
  3370. data/sample/db/sample/assets/ruby_baseball.png +0 -0
  3371. data/sample/db/sample/calculators.yml +16 -0
  3372. data/sample/db/sample/inventory_units.rb +4 -0
  3373. data/sample/db/sample/line_items.yml +40 -0
  3374. data/sample/db/sample/option_types.yml +8 -0
  3375. data/sample/db/sample/option_values.yml +35 -0
  3376. data/sample/db/sample/orders.yml +20 -0
  3377. data/sample/db/sample/payment_methods.yml +30 -0
  3378. data/sample/db/sample/payments.rb +25 -0
  3379. data/sample/db/sample/preferences.yml +20 -0
  3380. data/sample/db/sample/product_groups.yml +9 -0
  3381. data/sample/db/sample/product_option_types.yml +8 -0
  3382. data/sample/db/sample/product_properties.yml +136 -0
  3383. data/sample/db/sample/product_scopes.yml +35 -0
  3384. data/sample/db/sample/products.rb +15 -0
  3385. data/sample/db/sample/products.yml +53 -0
  3386. data/sample/db/sample/properties.yml +39 -0
  3387. data/sample/db/sample/prototypes.yml +9 -0
  3388. data/sample/db/sample/shipments.yml +8 -0
  3389. data/sample/db/sample/shipping_categories.yml +2 -0
  3390. data/sample/db/sample/shipping_methods.yml +9 -0
  3391. data/sample/db/sample/tax_categories.yml +6 -0
  3392. data/sample/db/sample/taxonomies.yml +4 -0
  3393. data/sample/db/sample/taxons.rb +3 -0
  3394. data/sample/db/sample/taxons.yml +91 -0
  3395. data/sample/db/sample/update_memberships.rb +1 -0
  3396. data/sample/db/sample/users.yml +8 -0
  3397. data/sample/db/sample/variants.yml +133 -0
  3398. data/sample/lib/spree_sample.rb +6 -0
  3399. data/sample/lib/tasks/install.rake +24 -0
  3400. data/sample/rfcommerce_sample.gemspec +26 -0
  3401. data/sample/sandbox_template.rb +4 -0
  3402. data/sandbox/Gemfile +39 -0
  3403. data/sandbox/Gemfile.lock +99 -0
  3404. data/sandbox/README +256 -0
  3405. data/sandbox/Rakefile +22 -0
  3406. data/sandbox/app/controllers/application_controller.rb +3 -0
  3407. data/sandbox/app/helpers/application_helper.rb +2 -0
  3408. data/sandbox/app/views/layouts/application.html.erb +14 -0
  3409. data/sandbox/config.ru +4 -0
  3410. data/sandbox/config/application.rb +45 -0
  3411. data/sandbox/config/boot.rb +6 -0
  3412. data/sandbox/config/database.yml +22 -0
  3413. data/sandbox/config/environment.rb +5 -0
  3414. data/sandbox/config/environments/development.rb +26 -0
  3415. data/sandbox/config/environments/production.rb +49 -0
  3416. data/sandbox/config/environments/test.rb +35 -0
  3417. data/sandbox/config/initializers/backtrace_silencers.rb +7 -0
  3418. data/sandbox/config/initializers/inflections.rb +10 -0
  3419. data/sandbox/config/initializers/mime_types.rb +5 -0
  3420. data/sandbox/config/initializers/secret_token.rb +7 -0
  3421. data/sandbox/config/initializers/session_store.rb +8 -0
  3422. data/sandbox/config/locales/en.yml +5 -0
  3423. data/sandbox/config/routes.rb +58 -0
  3424. data/sandbox/db/default/countries.yml +1583 -0
  3425. data/sandbox/db/default/roles.yml +7 -0
  3426. data/sandbox/db/default/states.yml +256 -0
  3427. data/sandbox/db/default/zone_members.yml +169 -0
  3428. data/sandbox/db/default/zones.yml +13 -0
  3429. data/sandbox/db/development.sqlite3 +0 -0
  3430. data/sandbox/db/migrate/20090823005402_spree_zero_nine_zero.rb +442 -0
  3431. data/sandbox/db/migrate/20090904192342_create_indexes_for_inventory_units.rb +12 -0
  3432. data/sandbox/db/migrate/20090923100315_add_count_on_hand_to_variants_and_products.rb +36 -0
  3433. data/sandbox/db/migrate/20091007134354_change_taxons_to_nested_set.rb +40 -0
  3434. data/sandbox/db/migrate/20091008091614_move_to_configurable_gateways.rb +55 -0
  3435. data/sandbox/db/migrate/20091012120519_product_groups_and_scopes.rb +25 -0
  3436. data/sandbox/db/migrate/20091015110842_add_open_id_authentication_tables.rb +20 -0
  3437. data/sandbox/db/migrate/20091015153048_add_openid_field_to_users.rb +19 -0
  3438. data/sandbox/db/migrate/20091016174634_change_preference_value_type.rb +10 -0
  3439. data/sandbox/db/migrate/20091017175558_create_billing_integrations.rb +16 -0
  3440. data/sandbox/db/migrate/20091021133257_charge_refactoring.rb +35 -0
  3441. data/sandbox/db/migrate/20091104151730_add_some_indexes.rb +21 -0
  3442. data/sandbox/db/migrate/20091126190904_checkout_state_machine.rb +13 -0
  3443. data/sandbox/db/migrate/20091209153045_state_for_shipments.rb +9 -0
  3444. data/sandbox/db/migrate/20091209202200_make_state_events_polymorphic.rb +12 -0
  3445. data/sandbox/db/migrate/20091211203813_ship_address_id_for_checkouts.rb +9 -0
  3446. data/sandbox/db/migrate/20091212161118_shipping_method_id_for_checkouts.rb +9 -0
  3447. data/sandbox/db/migrate/20091213222815_creditcard_last_four_digits.rb +19 -0
  3448. data/sandbox/db/migrate/20091214183826_populate_legacy_shipment_state.rb +19 -0
  3449. data/sandbox/db/migrate/20100105090147_add_cost_price.rb +9 -0
  3450. data/sandbox/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +21 -0
  3451. data/sandbox/db/migrate/20100107141738_add_api_key_to_users.rb +9 -0
  3452. data/sandbox/db/migrate/20100111205525_cim_fields_for_creditcards.rb +11 -0
  3453. data/sandbox/db/migrate/20100112151511_create_return_authorizations.rb +16 -0
  3454. data/sandbox/db/migrate/20100113090919_add_return_authorization_to_inventory_units.rb +9 -0
  3455. data/sandbox/db/migrate/20100113203104_create_trackers.rb +14 -0
  3456. data/sandbox/db/migrate/20100121160010_creditcard_id_for_creditcard_txns.rb +9 -0
  3457. data/sandbox/db/migrate/20100121183934_original_creditcard_txn_id_for_creditcard_txns.rb +9 -0
  3458. data/sandbox/db/migrate/20100125145351_add_test_mode_to_billing_integration.rb +11 -0
  3459. data/sandbox/db/migrate/20100126103714_create_products_product_groups.rb +12 -0
  3460. data/sandbox/db/migrate/20100209025806_create_payment_methods.rb +20 -0
  3461. data/sandbox/db/migrate/20100209144531_polymorphic_payments.rb +29 -0
  3462. data/sandbox/db/migrate/20100213103131_change_payments_payment_method_to_belongs_to.rb +11 -0
  3463. data/sandbox/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +16 -0
  3464. data/sandbox/db/migrate/20100223170312_sti_for_transactions.rb +14 -0
  3465. data/sandbox/db/migrate/20100223183812_drop_billing_integrations.rb +16 -0
  3466. data/sandbox/db/migrate/20100224153127_deleted_at_for_payment_methods.rb +13 -0
  3467. data/sandbox/db/migrate/20100301163454_add_adjustments_index.rb +10 -0
  3468. data/sandbox/db/migrate/20100306153445_fix_by_popularity.rb +8 -0
  3469. data/sandbox/db/migrate/20100317120946_add_alt_text_to_images.rb +9 -0
  3470. data/sandbox/db/migrate/20100419190933_rename_coupons_to_promotions.rb +10 -0
  3471. data/sandbox/db/migrate/20100419194457_fix_existing_coupon_credits.rb +9 -0
  3472. data/sandbox/db/migrate/20100426100726_create_promotion_rules.rb +24 -0
  3473. data/sandbox/db/migrate/20100427121301_add_display_to_payment_methods.rb +9 -0
  3474. data/sandbox/db/migrate/20100501084722_match_policy_for_promotions.rb +9 -0
  3475. data/sandbox/db/migrate/20100501095202_create_promotion_rules_users.rb +14 -0
  3476. data/sandbox/db/migrate/20100502163939_name_for_promotions.rb +9 -0
  3477. data/sandbox/db/migrate/20100504142133_add_addresses_checkouts_indexes.rb +16 -0
  3478. data/sandbox/db/migrate/20100506180619_add_icon_to_taxons.rb +18 -0
  3479. data/sandbox/db/migrate/20100506185838_add_description_to_taxons.rb +11 -0
  3480. data/sandbox/db/migrate/20100528155333_index_for_shipments_number.rb +9 -0
  3481. data/sandbox/db/migrate/20100528185820_add_index_on_users_persistence_token.rb +9 -0
  3482. data/sandbox/db/migrate/20100605152042_add_default_to_tax_categories.rb +9 -0
  3483. data/sandbox/db/migrate/20100624110730_add_display_to_shipping_methods.rb +9 -0
  3484. data/sandbox/db/migrate/20100624123336_rename_payment_method_display.rb +9 -0
  3485. data/sandbox/db/migrate/20100624175547_rename_preferences_field.rb +8 -0
  3486. data/sandbox/db/migrate/20100811163637_add_guest_flag.rb +13 -0
  3487. data/sandbox/db/migrate/20100811205836_drop_order_token.rb +11 -0
  3488. data/sandbox/db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb +11 -0
  3489. data/sandbox/db/migrate/20100813023502_create_address_keys_for_order.rb +15 -0
  3490. data/sandbox/db/migrate/20100813185745_payment_total_for_orders.rb +9 -0
  3491. data/sandbox/db/migrate/20100816212146_shipping_method_id_for_orders.rb +9 -0
  3492. data/sandbox/db/migrate/20100817152723_add_shipment_and_payment_state.rb +15 -0
  3493. data/sandbox/db/migrate/20100819170125_refactor_adjustments.rb +19 -0
  3494. data/sandbox/db/migrate/20100820135707_response_code_and_avs_response_for_payments.rb +11 -0
  3495. data/sandbox/db/migrate/20100901171814_change_guest_flag_to_anonymous.rb +13 -0
  3496. data/sandbox/db/migrate/20100903203949_email_for_orders.rb +9 -0
  3497. data/sandbox/db/migrate/20100923095305_update_calculable_type_for_promotions.rb +9 -0
  3498. data/sandbox/db/migrate/20100923162011_create_mail_methods.rb +12 -0
  3499. data/sandbox/db/migrate/20100929151905_rename_frozen_to_locked.rb +8 -0
  3500. data/sandbox/db/migrate/20101008190536_move_special_instructions_to_orders.rb +11 -0
  3501. data/sandbox/db/migrate/20101026184700_create_log_entries.rb +15 -0
  3502. data/sandbox/db/migrate/20101026184714_migrate_transactions_to_payment_state.rb +94 -0
  3503. data/sandbox/db/migrate/20101026184746_delete_in_progress_orders.rb +18 -0
  3504. data/sandbox/db/migrate/20101026184808_migrate_checkout_to_orders.rb +27 -0
  3505. data/sandbox/db/migrate/20101026184833_migrate_adjustments.rb +9 -0
  3506. data/sandbox/db/migrate/20101026184855_remove_shipped_state.rb +14 -0
  3507. data/sandbox/db/migrate/20101026184916_prevent_nil_payment_total.rb +8 -0
  3508. data/sandbox/db/migrate/20101026184932_prevent_nil_email.rb +9 -0
  3509. data/sandbox/db/migrate/20101026184950_rename_columns_for_devise.rb +39 -0
  3510. data/sandbox/db/migrate/20101026184959_generate_anonymous_users.rb +14 -0
  3511. data/sandbox/db/migrate/20101026185022_update_order_state.rb +8 -0
  3512. data/sandbox/db/migrate/20101026192225_cleanup_legacy_tables.rb +11 -0
  3513. data/sandbox/db/migrate/20101028151745_remove_number_and_cvv_from_credicard.rb +9 -0
  3514. data/sandbox/db/migrate/20101103212716_drop_anonymous_field_for_user.rb +8 -0
  3515. data/sandbox/db/migrate/20101111133551_renamed_rma_cancelled_state.rb +10 -0
  3516. data/sandbox/db/migrate/20101117031806_fix_problematic_index_names.rb +13 -0
  3517. data/sandbox/db/migrate/20101214150824_convert_user_remember_field.rb +11 -0
  3518. data/sandbox/db/migrate/20101217012656_create_tokenized_permissions.rb +18 -0
  3519. data/sandbox/db/migrate/20101219201531_tokens_for_legacy_orders.rb +12 -0
  3520. data/sandbox/db/migrate/20101223215658_add_position_to_variants.rb +9 -0
  3521. data/sandbox/db/migrate/20110110130847_add_next_state_to_state_events.rb +9 -0
  3522. data/sandbox/db/migrate/20110111122537_add_position_to_option_types.rb +9 -0
  3523. data/sandbox/db/migrate/20110314192118_remove_trailing_slashes_in_taxon_permalinks.rb +17 -0
  3524. data/sandbox/db/sample/addresses.yml +27 -0
  3525. data/sandbox/db/sample/adjustments.yml +24 -0
  3526. data/sandbox/db/sample/assets.yml +320 -0
  3527. data/sandbox/db/sample/assets/apache_baseball.png +0 -0
  3528. data/sandbox/db/sample/assets/ror_bag.jpeg +0 -0
  3529. data/sandbox/db/sample/assets/ror_baseball.jpeg +0 -0
  3530. data/sandbox/db/sample/assets/ror_baseball_back.jpeg +0 -0
  3531. data/sandbox/db/sample/assets/ror_baseball_jersey_back_blue.png +0 -0
  3532. data/sandbox/db/sample/assets/ror_baseball_jersey_back_green.png +0 -0
  3533. data/sandbox/db/sample/assets/ror_baseball_jersey_back_red.png +0 -0
  3534. data/sandbox/db/sample/assets/ror_baseball_jersey_blue.png +0 -0
  3535. data/sandbox/db/sample/assets/ror_baseball_jersey_green.png +0 -0
  3536. data/sandbox/db/sample/assets/ror_baseball_jersey_red.png +0 -0
  3537. data/sandbox/db/sample/assets/ror_jr_spaghetti.jpeg +0 -0
  3538. data/sandbox/db/sample/assets/ror_mug.jpeg +0 -0
  3539. data/sandbox/db/sample/assets/ror_mug_back.jpeg +0 -0
  3540. data/sandbox/db/sample/assets/ror_ringer.jpeg +0 -0
  3541. data/sandbox/db/sample/assets/ror_ringer_back.jpeg +0 -0
  3542. data/sandbox/db/sample/assets/ror_stein.jpeg +0 -0
  3543. data/sandbox/db/sample/assets/ror_stein_back.jpeg +0 -0
  3544. data/sandbox/db/sample/assets/ror_tote.jpeg +0 -0
  3545. data/sandbox/db/sample/assets/ror_tote_back.jpeg +0 -0
  3546. data/sandbox/db/sample/assets/ruby_baseball.png +0 -0
  3547. data/sandbox/db/sample/calculators.yml +16 -0
  3548. data/sandbox/db/sample/inventory_units.rb +4 -0
  3549. data/sandbox/db/sample/line_items.yml +40 -0
  3550. data/sandbox/db/sample/option_types.yml +8 -0
  3551. data/sandbox/db/sample/option_values.yml +35 -0
  3552. data/sandbox/db/sample/orders.yml +20 -0
  3553. data/sandbox/db/sample/payment_methods.yml +30 -0
  3554. data/sandbox/db/sample/payments.rb +25 -0
  3555. data/sandbox/db/sample/preferences.yml +20 -0
  3556. data/sandbox/db/sample/product_groups.yml +9 -0
  3557. data/sandbox/db/sample/product_option_types.yml +8 -0
  3558. data/sandbox/db/sample/product_properties.yml +136 -0
  3559. data/sandbox/db/sample/product_scopes.yml +35 -0
  3560. data/sandbox/db/sample/products.rb +15 -0
  3561. data/sandbox/db/sample/products.yml +53 -0
  3562. data/sandbox/db/sample/properties.yml +39 -0
  3563. data/sandbox/db/sample/prototypes.yml +9 -0
  3564. data/sandbox/db/sample/shipments.yml +8 -0
  3565. data/sandbox/db/sample/shipping_categories.yml +2 -0
  3566. data/sandbox/db/sample/shipping_methods.yml +9 -0
  3567. data/sandbox/db/sample/tax_categories.yml +6 -0
  3568. data/sandbox/db/sample/taxonomies.yml +4 -0
  3569. data/sandbox/db/sample/taxons.rb +3 -0
  3570. data/sandbox/db/sample/taxons.yml +91 -0
  3571. data/sandbox/db/sample/update_memberships.rb +1 -0
  3572. data/sandbox/db/sample/users.rb +53 -0
  3573. data/sandbox/db/sample/users.yml +8 -0
  3574. data/sandbox/db/sample/variants.yml +133 -0
  3575. data/sandbox/db/schema.rb +572 -0
  3576. data/sandbox/db/seeds.rb +3 -0
  3577. data/sandbox/doc/README_FOR_APP +2 -0
  3578. data/sandbox/lib/spree_site.rb +12 -0
  3579. data/sandbox/log/development.log +8406 -0
  3580. data/sandbox/log/production.log +0 -0
  3581. data/sandbox/log/server.log +0 -0
  3582. data/sandbox/log/test.log +0 -0
  3583. data/sandbox/public/404.html +26 -0
  3584. data/sandbox/public/422.html +26 -0
  3585. data/sandbox/public/500.html +26 -0
  3586. data/sandbox/public/assets/products/1/large/ror_tote.jpeg +0 -0
  3587. data/sandbox/public/assets/products/1/mini/ror_tote.jpeg +0 -0
  3588. data/sandbox/public/assets/products/1/original/ror_tote.jpeg +0 -0
  3589. data/sandbox/public/assets/products/1/product/ror_tote.jpeg +0 -0
  3590. data/sandbox/public/assets/products/1/small/ror_tote.jpeg +0 -0
  3591. data/sandbox/public/assets/products/10/large/ror_ringer_back.jpeg +0 -0
  3592. data/sandbox/public/assets/products/10/mini/ror_ringer_back.jpeg +0 -0
  3593. data/sandbox/public/assets/products/10/original/ror_ringer_back.jpeg +0 -0
  3594. data/sandbox/public/assets/products/10/product/ror_ringer_back.jpeg +0 -0
  3595. data/sandbox/public/assets/products/10/small/ror_ringer_back.jpeg +0 -0
  3596. data/sandbox/public/assets/products/1004/large/apache_baseball.png +0 -0
  3597. data/sandbox/public/assets/products/1004/mini/apache_baseball.png +0 -0
  3598. data/sandbox/public/assets/products/1004/original/apache_baseball.png +0 -0
  3599. data/sandbox/public/assets/products/1004/product/apache_baseball.png +0 -0
  3600. data/sandbox/public/assets/products/1004/small/apache_baseball.png +0 -0
  3601. data/sandbox/public/assets/products/1008/large/ruby_baseball.png +0 -0
  3602. data/sandbox/public/assets/products/1008/mini/ruby_baseball.png +0 -0
  3603. data/sandbox/public/assets/products/1008/original/ruby_baseball.png +0 -0
  3604. data/sandbox/public/assets/products/1008/product/ruby_baseball.png +0 -0
  3605. data/sandbox/public/assets/products/1008/small/ruby_baseball.png +0 -0
  3606. data/sandbox/public/assets/products/1009/large/ror_baseball_jersey_green.png +0 -0
  3607. data/sandbox/public/assets/products/1009/mini/ror_baseball_jersey_green.png +0 -0
  3608. data/sandbox/public/assets/products/1009/original/ror_baseball_jersey_green.png +0 -0
  3609. data/sandbox/public/assets/products/1009/product/ror_baseball_jersey_green.png +0 -0
  3610. data/sandbox/public/assets/products/1009/small/ror_baseball_jersey_green.png +0 -0
  3611. data/sandbox/public/assets/products/1010/large/ror_baseball_jersey_back_green.png +0 -0
  3612. data/sandbox/public/assets/products/1010/mini/ror_baseball_jersey_back_green.png +0 -0
  3613. data/sandbox/public/assets/products/1010/original/ror_baseball_jersey_back_green.png +0 -0
  3614. data/sandbox/public/assets/products/1010/product/ror_baseball_jersey_back_green.png +0 -0
  3615. data/sandbox/public/assets/products/1010/small/ror_baseball_jersey_back_green.png +0 -0
  3616. data/sandbox/public/assets/products/1011/large/ror_baseball_jersey_green.png +0 -0
  3617. data/sandbox/public/assets/products/1011/mini/ror_baseball_jersey_green.png +0 -0
  3618. data/sandbox/public/assets/products/1011/original/ror_baseball_jersey_green.png +0 -0
  3619. data/sandbox/public/assets/products/1011/product/ror_baseball_jersey_green.png +0 -0
  3620. data/sandbox/public/assets/products/1011/small/ror_baseball_jersey_green.png +0 -0
  3621. data/sandbox/public/assets/products/1012/large/ror_baseball_jersey_back_green.png +0 -0
  3622. data/sandbox/public/assets/products/1012/mini/ror_baseball_jersey_back_green.png +0 -0
  3623. data/sandbox/public/assets/products/1012/original/ror_baseball_jersey_back_green.png +0 -0
  3624. data/sandbox/public/assets/products/1012/product/ror_baseball_jersey_back_green.png +0 -0
  3625. data/sandbox/public/assets/products/1012/small/ror_baseball_jersey_back_green.png +0 -0
  3626. data/sandbox/public/assets/products/1013/large/ror_baseball_jersey_green.png +0 -0
  3627. data/sandbox/public/assets/products/1013/mini/ror_baseball_jersey_green.png +0 -0
  3628. data/sandbox/public/assets/products/1013/original/ror_baseball_jersey_green.png +0 -0
  3629. data/sandbox/public/assets/products/1013/product/ror_baseball_jersey_green.png +0 -0
  3630. data/sandbox/public/assets/products/1013/small/ror_baseball_jersey_green.png +0 -0
  3631. data/sandbox/public/assets/products/1014/large/ror_baseball_jersey_back_green.png +0 -0
  3632. data/sandbox/public/assets/products/1014/mini/ror_baseball_jersey_back_green.png +0 -0
  3633. data/sandbox/public/assets/products/1014/original/ror_baseball_jersey_back_green.png +0 -0
  3634. data/sandbox/public/assets/products/1014/product/ror_baseball_jersey_back_green.png +0 -0
  3635. data/sandbox/public/assets/products/1014/small/ror_baseball_jersey_back_green.png +0 -0
  3636. data/sandbox/public/assets/products/1015/large/ror_baseball_jersey_blue.png +0 -0
  3637. data/sandbox/public/assets/products/1015/mini/ror_baseball_jersey_blue.png +0 -0
  3638. data/sandbox/public/assets/products/1015/original/ror_baseball_jersey_blue.png +0 -0
  3639. data/sandbox/public/assets/products/1015/product/ror_baseball_jersey_blue.png +0 -0
  3640. data/sandbox/public/assets/products/1015/small/ror_baseball_jersey_blue.png +0 -0
  3641. data/sandbox/public/assets/products/1016/large/ror_baseball_jersey_back_blue.png +0 -0
  3642. data/sandbox/public/assets/products/1016/mini/ror_baseball_jersey_back_blue.png +0 -0
  3643. data/sandbox/public/assets/products/1016/original/ror_baseball_jersey_back_blue.png +0 -0
  3644. data/sandbox/public/assets/products/1016/product/ror_baseball_jersey_back_blue.png +0 -0
  3645. data/sandbox/public/assets/products/1016/small/ror_baseball_jersey_back_blue.png +0 -0
  3646. data/sandbox/public/assets/products/1017/large/ror_baseball_jersey_blue.png +0 -0
  3647. data/sandbox/public/assets/products/1017/mini/ror_baseball_jersey_blue.png +0 -0
  3648. data/sandbox/public/assets/products/1017/original/ror_baseball_jersey_blue.png +0 -0
  3649. data/sandbox/public/assets/products/1017/product/ror_baseball_jersey_blue.png +0 -0
  3650. data/sandbox/public/assets/products/1017/small/ror_baseball_jersey_blue.png +0 -0
  3651. data/sandbox/public/assets/products/1018/large/ror_baseball_jersey_back_blue.png +0 -0
  3652. data/sandbox/public/assets/products/1018/mini/ror_baseball_jersey_back_blue.png +0 -0
  3653. data/sandbox/public/assets/products/1018/original/ror_baseball_jersey_back_blue.png +0 -0
  3654. data/sandbox/public/assets/products/1018/product/ror_baseball_jersey_back_blue.png +0 -0
  3655. data/sandbox/public/assets/products/1018/small/ror_baseball_jersey_back_blue.png +0 -0
  3656. data/sandbox/public/assets/products/1019/large/ror_baseball_jersey_blue.png +0 -0
  3657. data/sandbox/public/assets/products/1019/mini/ror_baseball_jersey_blue.png +0 -0
  3658. data/sandbox/public/assets/products/1019/original/ror_baseball_jersey_blue.png +0 -0
  3659. data/sandbox/public/assets/products/1019/product/ror_baseball_jersey_blue.png +0 -0
  3660. data/sandbox/public/assets/products/1019/small/ror_baseball_jersey_blue.png +0 -0
  3661. data/sandbox/public/assets/products/1020/large/ror_baseball_jersey_back_blue.png +0 -0
  3662. data/sandbox/public/assets/products/1020/mini/ror_baseball_jersey_back_blue.png +0 -0
  3663. data/sandbox/public/assets/products/1020/original/ror_baseball_jersey_back_blue.png +0 -0
  3664. data/sandbox/public/assets/products/1020/product/ror_baseball_jersey_back_blue.png +0 -0
  3665. data/sandbox/public/assets/products/1020/small/ror_baseball_jersey_back_blue.png +0 -0
  3666. data/sandbox/public/assets/products/1021/large/ror_baseball_jersey_red.png +0 -0
  3667. data/sandbox/public/assets/products/1021/mini/ror_baseball_jersey_red.png +0 -0
  3668. data/sandbox/public/assets/products/1021/original/ror_baseball_jersey_red.png +0 -0
  3669. data/sandbox/public/assets/products/1021/product/ror_baseball_jersey_red.png +0 -0
  3670. data/sandbox/public/assets/products/1021/small/ror_baseball_jersey_red.png +0 -0
  3671. data/sandbox/public/assets/products/1022/large/ror_baseball_jersey_back_red.png +0 -0
  3672. data/sandbox/public/assets/products/1022/mini/ror_baseball_jersey_back_red.png +0 -0
  3673. data/sandbox/public/assets/products/1022/original/ror_baseball_jersey_back_red.png +0 -0
  3674. data/sandbox/public/assets/products/1022/product/ror_baseball_jersey_back_red.png +0 -0
  3675. data/sandbox/public/assets/products/1022/small/ror_baseball_jersey_back_red.png +0 -0
  3676. data/sandbox/public/assets/products/1023/large/ror_baseball_jersey_red.png +0 -0
  3677. data/sandbox/public/assets/products/1023/mini/ror_baseball_jersey_red.png +0 -0
  3678. data/sandbox/public/assets/products/1023/original/ror_baseball_jersey_red.png +0 -0
  3679. data/sandbox/public/assets/products/1023/product/ror_baseball_jersey_red.png +0 -0
  3680. data/sandbox/public/assets/products/1023/small/ror_baseball_jersey_red.png +0 -0
  3681. data/sandbox/public/assets/products/1024/large/ror_baseball_jersey_back_red.png +0 -0
  3682. data/sandbox/public/assets/products/1024/mini/ror_baseball_jersey_back_red.png +0 -0
  3683. data/sandbox/public/assets/products/1024/original/ror_baseball_jersey_back_red.png +0 -0
  3684. data/sandbox/public/assets/products/1024/product/ror_baseball_jersey_back_red.png +0 -0
  3685. data/sandbox/public/assets/products/1024/small/ror_baseball_jersey_back_red.png +0 -0
  3686. data/sandbox/public/assets/products/1025/large/ror_baseball_jersey_red.png +0 -0
  3687. data/sandbox/public/assets/products/1025/mini/ror_baseball_jersey_red.png +0 -0
  3688. data/sandbox/public/assets/products/1025/original/ror_baseball_jersey_red.png +0 -0
  3689. data/sandbox/public/assets/products/1025/product/ror_baseball_jersey_red.png +0 -0
  3690. data/sandbox/public/assets/products/1025/small/ror_baseball_jersey_red.png +0 -0
  3691. data/sandbox/public/assets/products/1026/large/ror_baseball_jersey_back_red.png +0 -0
  3692. data/sandbox/public/assets/products/1026/mini/ror_baseball_jersey_back_red.png +0 -0
  3693. data/sandbox/public/assets/products/1026/original/ror_baseball_jersey_back_red.png +0 -0
  3694. data/sandbox/public/assets/products/1026/product/ror_baseball_jersey_back_red.png +0 -0
  3695. data/sandbox/public/assets/products/1026/small/ror_baseball_jersey_back_red.png +0 -0
  3696. data/sandbox/public/assets/products/11/large/ror_stein.jpeg +0 -0
  3697. data/sandbox/public/assets/products/11/mini/ror_stein.jpeg +0 -0
  3698. data/sandbox/public/assets/products/11/original/ror_stein.jpeg +0 -0
  3699. data/sandbox/public/assets/products/11/product/ror_stein.jpeg +0 -0
  3700. data/sandbox/public/assets/products/11/small/ror_stein.jpeg +0 -0
  3701. data/sandbox/public/assets/products/12/large/ror_stein_back.jpeg +0 -0
  3702. data/sandbox/public/assets/products/12/mini/ror_stein_back.jpeg +0 -0
  3703. data/sandbox/public/assets/products/12/original/ror_stein_back.jpeg +0 -0
  3704. data/sandbox/public/assets/products/12/product/ror_stein_back.jpeg +0 -0
  3705. data/sandbox/public/assets/products/12/small/ror_stein_back.jpeg +0 -0
  3706. data/sandbox/public/assets/products/2/large/ror_tote_back.jpeg +0 -0
  3707. data/sandbox/public/assets/products/2/mini/ror_tote_back.jpeg +0 -0
  3708. data/sandbox/public/assets/products/2/original/ror_tote_back.jpeg +0 -0
  3709. data/sandbox/public/assets/products/2/product/ror_tote_back.jpeg +0 -0
  3710. data/sandbox/public/assets/products/2/small/ror_tote_back.jpeg +0 -0
  3711. data/sandbox/public/assets/products/3/large/ror_bag.jpeg +0 -0
  3712. data/sandbox/public/assets/products/3/mini/ror_bag.jpeg +0 -0
  3713. data/sandbox/public/assets/products/3/original/ror_bag.jpeg +0 -0
  3714. data/sandbox/public/assets/products/3/product/ror_bag.jpeg +0 -0
  3715. data/sandbox/public/assets/products/3/small/ror_bag.jpeg +0 -0
  3716. data/sandbox/public/assets/products/4/large/ror_baseball.jpeg +0 -0
  3717. data/sandbox/public/assets/products/4/mini/ror_baseball.jpeg +0 -0
  3718. data/sandbox/public/assets/products/4/original/ror_baseball.jpeg +0 -0
  3719. data/sandbox/public/assets/products/4/product/ror_baseball.jpeg +0 -0
  3720. data/sandbox/public/assets/products/4/small/ror_baseball.jpeg +0 -0
  3721. data/sandbox/public/assets/products/5/large/ror_baseball_back.jpeg +0 -0
  3722. data/sandbox/public/assets/products/5/mini/ror_baseball_back.jpeg +0 -0
  3723. data/sandbox/public/assets/products/5/original/ror_baseball_back.jpeg +0 -0
  3724. data/sandbox/public/assets/products/5/product/ror_baseball_back.jpeg +0 -0
  3725. data/sandbox/public/assets/products/5/small/ror_baseball_back.jpeg +0 -0
  3726. data/sandbox/public/assets/products/6/large/ror_jr_spaghetti.jpeg +0 -0
  3727. data/sandbox/public/assets/products/6/mini/ror_jr_spaghetti.jpeg +0 -0
  3728. data/sandbox/public/assets/products/6/original/ror_jr_spaghetti.jpeg +0 -0
  3729. data/sandbox/public/assets/products/6/product/ror_jr_spaghetti.jpeg +0 -0
  3730. data/sandbox/public/assets/products/6/small/ror_jr_spaghetti.jpeg +0 -0
  3731. data/sandbox/public/assets/products/7/large/ror_mug.jpeg +0 -0
  3732. data/sandbox/public/assets/products/7/mini/ror_mug.jpeg +0 -0
  3733. data/sandbox/public/assets/products/7/original/ror_mug.jpeg +0 -0
  3734. data/sandbox/public/assets/products/7/product/ror_mug.jpeg +0 -0
  3735. data/sandbox/public/assets/products/7/small/ror_mug.jpeg +0 -0
  3736. data/sandbox/public/assets/products/8/large/ror_mug_back.jpeg +0 -0
  3737. data/sandbox/public/assets/products/8/mini/ror_mug_back.jpeg +0 -0
  3738. data/sandbox/public/assets/products/8/original/ror_mug_back.jpeg +0 -0
  3739. data/sandbox/public/assets/products/8/product/ror_mug_back.jpeg +0 -0
  3740. data/sandbox/public/assets/products/8/small/ror_mug_back.jpeg +0 -0
  3741. data/sandbox/public/assets/products/9/large/ror_ringer.jpeg +0 -0
  3742. data/sandbox/public/assets/products/9/mini/ror_ringer.jpeg +0 -0
  3743. data/sandbox/public/assets/products/9/original/ror_ringer.jpeg +0 -0
  3744. data/sandbox/public/assets/products/9/product/ror_ringer.jpeg +0 -0
  3745. data/sandbox/public/assets/products/9/small/ror_ringer.jpeg +0 -0
  3746. data/sandbox/public/favicon.ico +0 -0
  3747. data/sandbox/public/images/add-to-cart.png +0 -0
  3748. data/sandbox/public/images/admin/bg/active-tab.png +0 -0
  3749. data/sandbox/public/images/admin/bg/admin_tab_back.png +0 -0
  3750. data/sandbox/public/images/admin/bg/admin_tab_selected_back.png +0 -0
  3751. data/sandbox/public/images/admin/bg/content-back-blue.png +0 -0
  3752. data/sandbox/public/images/admin/bg/content-back-green.png +0 -0
  3753. data/sandbox/public/images/admin/bg/content-back.png +0 -0
  3754. data/sandbox/public/images/admin/bg/flash-error.png +0 -0
  3755. data/sandbox/public/images/admin/bg/flash-notice.png +0 -0
  3756. data/sandbox/public/images/admin/bg/green-stripes.gif +0 -0
  3757. data/sandbox/public/images/admin/bg/green-stripes.png +0 -0
  3758. data/sandbox/public/images/admin/bg/grid_header_back.png +0 -0
  3759. data/sandbox/public/images/admin/bg/grid_header_back_green.png +0 -0
  3760. data/sandbox/public/images/admin/bg/header-bg.png +0 -0
  3761. data/sandbox/public/images/admin/bg/header.png +0 -0
  3762. data/sandbox/public/images/admin/bg/header_bg.jpg +0 -0
  3763. data/sandbox/public/images/admin/bg/menu-current.png +0 -0
  3764. data/sandbox/public/images/admin/bg/red-stripes.gif +0 -0
  3765. data/sandbox/public/images/admin/bg/red-stripes.png +0 -0
  3766. data/sandbox/public/images/admin/bg/spree_50.png +0 -0
  3767. data/sandbox/public/images/admin/bg/subnav-divider.png +0 -0
  3768. data/sandbox/public/images/admin/bg/subnav.png +0 -0
  3769. data/sandbox/public/images/admin/bg/tab-back.png +0 -0
  3770. data/sandbox/public/images/admin/buttons/blue/left_01.png +0 -0
  3771. data/sandbox/public/images/admin/buttons/blue/right_01.png +0 -0
  3772. data/sandbox/public/images/admin/buttons/drag-handle-green.png +0 -0
  3773. data/sandbox/public/images/admin/buttons/green/left_01.png +0 -0
  3774. data/sandbox/public/images/admin/buttons/green/right_01.png +0 -0
  3775. data/sandbox/public/images/admin/buttons/left_01.png +0 -0
  3776. data/sandbox/public/images/admin/buttons/left_01_small.png +0 -0
  3777. data/sandbox/public/images/admin/buttons/orange/left_03.png +0 -0
  3778. data/sandbox/public/images/admin/buttons/orange/right_03.png +0 -0
  3779. data/sandbox/public/images/admin/buttons/right_01.png +0 -0
  3780. data/sandbox/public/images/admin/buttons/right_01_small.png +0 -0
  3781. data/sandbox/public/images/admin/icons/16x16/1.png +0 -0
  3782. data/sandbox/public/images/admin/icons/16x16/10.png +0 -0
  3783. data/sandbox/public/images/admin/icons/16x16/2.png +0 -0
  3784. data/sandbox/public/images/admin/icons/16x16/3.png +0 -0
  3785. data/sandbox/public/images/admin/icons/16x16/4.png +0 -0
  3786. data/sandbox/public/images/admin/icons/16x16/5.png +0 -0
  3787. data/sandbox/public/images/admin/icons/16x16/6.png +0 -0
  3788. data/sandbox/public/images/admin/icons/16x16/7.png +0 -0
  3789. data/sandbox/public/images/admin/icons/16x16/8.png +0 -0
  3790. data/sandbox/public/images/admin/icons/16x16/9.png +0 -0
  3791. data/sandbox/public/images/admin/icons/32x32/1.png +0 -0
  3792. data/sandbox/public/images/admin/icons/32x32/10.png +0 -0
  3793. data/sandbox/public/images/admin/icons/32x32/11.png +0 -0
  3794. data/sandbox/public/images/admin/icons/32x32/2.png +0 -0
  3795. data/sandbox/public/images/admin/icons/32x32/3.png +0 -0
  3796. data/sandbox/public/images/admin/icons/32x32/4.png +0 -0
  3797. data/sandbox/public/images/admin/icons/32x32/5.png +0 -0
  3798. data/sandbox/public/images/admin/icons/32x32/6.png +0 -0
  3799. data/sandbox/public/images/admin/icons/32x32/7.png +0 -0
  3800. data/sandbox/public/images/admin/icons/32x32/8.png +0 -0
  3801. data/sandbox/public/images/admin/icons/32x32/9.png +0 -0
  3802. data/sandbox/public/images/admin/icons/accept.png +0 -0
  3803. data/sandbox/public/images/admin/icons/add.gif +0 -0
  3804. data/sandbox/public/images/admin/icons/add.png +0 -0
  3805. data/sandbox/public/images/admin/icons/arrow-down.gif +0 -0
  3806. data/sandbox/public/images/admin/icons/cross.png +0 -0
  3807. data/sandbox/public/images/admin/icons/delete.gif +0 -0
  3808. data/sandbox/public/images/admin/icons/delete.png +0 -0
  3809. data/sandbox/public/images/admin/icons/drag.gif +0 -0
  3810. data/sandbox/public/images/admin/icons/edit.gif +0 -0
  3811. data/sandbox/public/images/admin/icons/edit.png +0 -0
  3812. data/sandbox/public/images/admin/icons/email.png +0 -0
  3813. data/sandbox/public/images/admin/icons/error.png +0 -0
  3814. data/sandbox/public/images/admin/icons/exclamation.png +0 -0
  3815. data/sandbox/public/images/admin/icons/feed.png +0 -0
  3816. data/sandbox/public/images/admin/icons/pdf.png +0 -0
  3817. data/sandbox/public/images/admin/icons/reorder.gif +0 -0
  3818. data/sandbox/public/images/admin/icons/search.gif +0 -0
  3819. data/sandbox/public/images/admin/icons/send-email.png +0 -0
  3820. data/sandbox/public/images/admin/icons/stop.png +0 -0
  3821. data/sandbox/public/images/admin/icons/tick.png +0 -0
  3822. data/sandbox/public/images/admin/icons/up.gif +0 -0
  3823. data/sandbox/public/images/admin/icons/xls.png +0 -0
  3824. data/sandbox/public/images/admin/tabs/off-left.png +0 -0
  3825. data/sandbox/public/images/admin/tabs/off-right.png +0 -0
  3826. data/sandbox/public/images/admin/tabs/on-left.png +0 -0
  3827. data/sandbox/public/images/admin/tabs/on-right.png +0 -0
  3828. data/sandbox/public/images/ajax_loader.gif +0 -0
  3829. data/sandbox/public/images/amex_cid.gif +0 -0
  3830. data/sandbox/public/images/bg-button-hover.png +0 -0
  3831. data/sandbox/public/images/bg-button-pressed.png +0 -0
  3832. data/sandbox/public/images/bg-button.gif +0 -0
  3833. data/sandbox/public/images/bg-button.png +0 -0
  3834. data/sandbox/public/images/blue/left_01.png +0 -0
  3835. data/sandbox/public/images/blue/right_01.png +0 -0
  3836. data/sandbox/public/images/body-back.png +0 -0
  3837. data/sandbox/public/images/bottom_shine.png +0 -0
  3838. data/sandbox/public/images/breadcrumb.gif +0 -0
  3839. data/sandbox/public/images/button-dark-hover.png +0 -0
  3840. data/sandbox/public/images/button-dark.png +0 -0
  3841. data/sandbox/public/images/buttons/bg-button-hover.png +0 -0
  3842. data/sandbox/public/images/buttons/bg-button-pressed.png +0 -0
  3843. data/sandbox/public/images/buttons/bg-button.gif +0 -0
  3844. data/sandbox/public/images/buttons/bg-button.png +0 -0
  3845. data/sandbox/public/images/buttons/blue/left_01.png +0 -0
  3846. data/sandbox/public/images/buttons/blue/right_01.png +0 -0
  3847. data/sandbox/public/images/buttons/button-dark-hover.png +0 -0
  3848. data/sandbox/public/images/buttons/button-dark.png +0 -0
  3849. data/sandbox/public/images/buttons/drag-handle-green.png +0 -0
  3850. data/sandbox/public/images/buttons/green/left_01.png +0 -0
  3851. data/sandbox/public/images/buttons/green/right_01.png +0 -0
  3852. data/sandbox/public/images/buttons/left_01.png +0 -0
  3853. data/sandbox/public/images/buttons/left_01_small.png +0 -0
  3854. data/sandbox/public/images/buttons/orange/left_03.png +0 -0
  3855. data/sandbox/public/images/buttons/orange/right_03.png +0 -0
  3856. data/sandbox/public/images/buttons/right_01.png +0 -0
  3857. data/sandbox/public/images/buttons/right_01_small.png +0 -0
  3858. data/sandbox/public/images/buttons/sxsw-ribbon-v1.png +0 -0
  3859. data/sandbox/public/images/buttons/top-shine.png +0 -0
  3860. data/sandbox/public/images/calendar_date_select/calendar.gif +0 -0
  3861. data/sandbox/public/images/cart-empty.png +0 -0
  3862. data/sandbox/public/images/cart-empty_x32.png +0 -0
  3863. data/sandbox/public/images/cart-full.png +0 -0
  3864. data/sandbox/public/images/cart-full_x32.png +0 -0
  3865. data/sandbox/public/images/checkout.png +0 -0
  3866. data/sandbox/public/images/creditcard.gif +0 -0
  3867. data/sandbox/public/images/datepicker/backstripes.gif +0 -0
  3868. data/sandbox/public/images/datepicker/bg_header.jpg +0 -0
  3869. data/sandbox/public/images/datepicker/bullet1.gif +0 -0
  3870. data/sandbox/public/images/datepicker/bullet2.gif +0 -0
  3871. data/sandbox/public/images/datepicker/cal.gif +0 -0
  3872. data/sandbox/public/images/datepicker/gradient-e5e5e5-ffffff.gif +0 -0
  3873. data/sandbox/public/images/discover_cid.gif +0 -0
  3874. data/sandbox/public/images/drag-handle-green.png +0 -0
  3875. data/sandbox/public/images/favicon.ico +0 -0
  3876. data/sandbox/public/images/green/left_01.png +0 -0
  3877. data/sandbox/public/images/green/right_01.png +0 -0
  3878. data/sandbox/public/images/grid.png +0 -0
  3879. data/sandbox/public/images/left_01.png +0 -0
  3880. data/sandbox/public/images/left_01_small.png +0 -0
  3881. data/sandbox/public/images/master_cid.jpg +0 -0
  3882. data/sandbox/public/images/menu-current.png +0 -0
  3883. data/sandbox/public/images/menu-hover.png +0 -0
  3884. data/sandbox/public/images/noimage/mini.jpg +0 -0
  3885. data/sandbox/public/images/noimage/product.jpg +0 -0
  3886. data/sandbox/public/images/noimage/small.jpg +0 -0
  3887. data/sandbox/public/images/openid-inputicon.gif +0 -0
  3888. data/sandbox/public/images/orange/left_03.png +0 -0
  3889. data/sandbox/public/images/orange/right_03.png +0 -0
  3890. data/sandbox/public/images/progress.gif +0 -0
  3891. data/sandbox/public/images/rails.png +0 -0
  3892. data/sandbox/public/images/reorder.jpg +0 -0
  3893. data/sandbox/public/images/right_01.png +0 -0
  3894. data/sandbox/public/images/right_01_small.png +0 -0
  3895. data/sandbox/public/images/separator.png +0 -0
  3896. data/sandbox/public/images/shadow-top.png +0 -0
  3897. data/sandbox/public/images/shadow_top.png +0 -0
  3898. data/sandbox/public/images/spinner.gif +0 -0
  3899. data/sandbox/public/images/spree.jpg +0 -0
  3900. data/sandbox/public/images/spree/progress.gif +0 -0
  3901. data/sandbox/public/images/spree/spinner.gif +0 -0
  3902. data/sandbox/public/images/spree/spree.jpg +0 -0
  3903. data/sandbox/public/images/step-progress/completed-completed.gif +0 -0
  3904. data/sandbox/public/images/step-progress/completed-current.gif +0 -0
  3905. data/sandbox/public/images/step-progress/completed-first.gif +0 -0
  3906. data/sandbox/public/images/step-progress/current-first.gif +0 -0
  3907. data/sandbox/public/images/step-progress/current-incomplete.gif +0 -0
  3908. data/sandbox/public/images/step-progress/current-right.gif +0 -0
  3909. data/sandbox/public/images/step-progress/incomplete-incomplete.gif +0 -0
  3910. data/sandbox/public/images/step-progress/incomplete-right.gif +0 -0
  3911. data/sandbox/public/images/steps/1.png +0 -0
  3912. data/sandbox/public/images/steps/1_small.png +0 -0
  3913. data/sandbox/public/images/steps/2.png +0 -0
  3914. data/sandbox/public/images/steps/2_small.png +0 -0
  3915. data/sandbox/public/images/steps/3.png +0 -0
  3916. data/sandbox/public/images/steps/3_small.png +0 -0
  3917. data/sandbox/public/images/steps/4.png +0 -0
  3918. data/sandbox/public/images/steps/4_small.png +0 -0
  3919. data/sandbox/public/images/steps/5.png +0 -0
  3920. data/sandbox/public/images/steps/5_small.png +0 -0
  3921. data/sandbox/public/images/steps/6.png +0 -0
  3922. data/sandbox/public/images/steps/6_small.png +0 -0
  3923. data/sandbox/public/images/sxsw-ribbon-v1.png +0 -0
  3924. data/sandbox/public/images/tab_bottom.gif +0 -0
  3925. data/sandbox/public/images/tile-header.png +0 -0
  3926. data/sandbox/public/images/tile-slider.png +0 -0
  3927. data/sandbox/public/images/top-shine.png +0 -0
  3928. data/sandbox/public/images/tree-nav-icons/bullet.gif +0 -0
  3929. data/sandbox/public/images/tree-nav-icons/minus.gif +0 -0
  3930. data/sandbox/public/images/tree-nav-icons/plus.gif +0 -0
  3931. data/sandbox/public/images/tree-nav-icons/treeview-loading.gif +0 -0
  3932. data/sandbox/public/images/tree-nav-icons/treeview-sprite.gif +0 -0
  3933. data/sandbox/public/images/update.png +0 -0
  3934. data/sandbox/public/images/visa_cid.gif +0 -0
  3935. data/sandbox/public/images/wrapper-back-2.png +0 -0
  3936. data/sandbox/public/images/wrapper-back.png +0 -0
  3937. data/sandbox/public/images/yui-menubaritem_submenuindicator.png +0 -0
  3938. data/sandbox/public/images/yui-menubaritem_submenuindicator_disabled.png +0 -0
  3939. data/sandbox/public/images/yui-menuitem_checkbox.png +0 -0
  3940. data/sandbox/public/images/yui-menuitem_checkbox_disabled.png +0 -0
  3941. data/sandbox/public/images/yui-menuitem_submenuindicator.png +0 -0
  3942. data/sandbox/public/images/yui-menuitem_submenuindicator_disabled.png +0 -0
  3943. data/sandbox/public/images/yui-sprite.png +0 -0
  3944. data/sandbox/public/javascripts/additional-methods.js +236 -0
  3945. data/sandbox/public/javascripts/admin.js +232 -0
  3946. data/sandbox/public/javascripts/admin/address_states.js +25 -0
  3947. data/sandbox/public/javascripts/admin/checkouts/edit.js +130 -0
  3948. data/sandbox/public/javascripts/admin/orders/edit.js +23 -0
  3949. data/sandbox/public/javascripts/admin/orders/edit_form.js +16 -0
  3950. data/sandbox/public/javascripts/admin/payments/new.js +9 -0
  3951. data/sandbox/public/javascripts/admin/promotions.js +26 -0
  3952. data/sandbox/public/javascripts/admin/unobtrusive_handlers.js +43 -0
  3953. data/sandbox/public/javascripts/application.js +12 -0
  3954. data/sandbox/public/javascripts/calculator.js +15 -0
  3955. data/sandbox/public/javascripts/checkout.js +75 -0
  3956. data/sandbox/public/javascripts/dashboard.js +143 -0
  3957. data/sandbox/public/javascripts/datepicker.js +1445 -0
  3958. data/sandbox/public/javascripts/gateway.js +13 -0
  3959. data/sandbox/public/javascripts/jqPlot/excanvas.min.js +1 -0
  3960. data/sandbox/public/javascripts/jqPlot/jquery.jqplot.min.js +14 -0
  3961. data/sandbox/public/javascripts/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js +14 -0
  3962. data/sandbox/public/javascripts/jqPlot/plugins/jqplot.canvasAxisTickRenderer.min.js +14 -0
  3963. data/sandbox/public/javascripts/jqPlot/plugins/jqplot.canvasTextRenderer.min.js +14 -0
  3964. data/sandbox/public/javascripts/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js +14 -0
  3965. data/sandbox/public/javascripts/jqPlot/plugins/jqplot.dateAxisRenderer.min.js +14 -0
  3966. data/sandbox/public/javascripts/jqPlot/plugins/jqplot.highlighter.min.js +14 -0
  3967. data/sandbox/public/javascripts/jqPlot/plugins/jqplot.pieRenderer.min.js +14 -0
  3968. data/sandbox/public/javascripts/jquery-1.4.2.min.js +154 -0
  3969. data/sandbox/public/javascripts/jquery-ui.js +188 -0
  3970. data/sandbox/public/javascripts/jquery.alerts/images/help.gif +0 -0
  3971. data/sandbox/public/javascripts/jquery.alerts/images/important.gif +0 -0
  3972. data/sandbox/public/javascripts/jquery.alerts/images/info.gif +0 -0
  3973. data/sandbox/public/javascripts/jquery.alerts/images/title.gif +0 -0
  3974. data/sandbox/public/javascripts/jquery.alerts/jquery.alerts.css +57 -0
  3975. data/sandbox/public/javascripts/jquery.alerts/jquery.alerts.js +235 -0
  3976. data/sandbox/public/javascripts/jquery.alerts/jquery.alerts.spree.css +30 -0
  3977. data/sandbox/public/javascripts/jquery.autocomplete.min.js +13 -0
  3978. data/sandbox/public/javascripts/jquery.cookie.js +96 -0
  3979. data/sandbox/public/javascripts/jquery.delayedobserver.js +35 -0
  3980. data/sandbox/public/javascripts/jquery.suggest.js +276 -0
  3981. data/sandbox/public/javascripts/jquery.template.js +255 -0
  3982. data/sandbox/public/javascripts/jquery.tokeninput.js +618 -0
  3983. data/sandbox/public/javascripts/jquery.validate.min.js +16 -0
  3984. data/sandbox/public/javascripts/jsTree/jquery.jstree.js +3510 -0
  3985. data/sandbox/public/javascripts/jsTree/themes/apple/bg.jpg +0 -0
  3986. data/sandbox/public/javascripts/jsTree/themes/apple/d.png +0 -0
  3987. data/sandbox/public/javascripts/jsTree/themes/apple/dot_for_ie.gif +0 -0
  3988. data/sandbox/public/javascripts/jsTree/themes/apple/style.css +60 -0
  3989. data/sandbox/public/javascripts/jsTree/themes/apple/throbber.gif +0 -0
  3990. data/sandbox/public/javascripts/lang/af.js +40 -0
  3991. data/sandbox/public/javascripts/lang/ar.js +50 -0
  3992. data/sandbox/public/javascripts/lang/de.js +40 -0
  3993. data/sandbox/public/javascripts/lang/du.js +40 -0
  3994. data/sandbox/public/javascripts/lang/en.js +42 -0
  3995. data/sandbox/public/javascripts/lang/es.js +41 -0
  3996. data/sandbox/public/javascripts/lang/fi.js +40 -0
  3997. data/sandbox/public/javascripts/lang/fr.js +44 -0
  3998. data/sandbox/public/javascripts/lang/gr.js +40 -0
  3999. data/sandbox/public/javascripts/lang/he.js +49 -0
  4000. data/sandbox/public/javascripts/lang/it.js +13 -0
  4001. data/sandbox/public/javascripts/lang/nl.js +40 -0
  4002. data/sandbox/public/javascripts/lang/no.js +40 -0
  4003. data/sandbox/public/javascripts/lang/pt.js +50 -0
  4004. data/sandbox/public/javascripts/lang/ro.js +40 -0
  4005. data/sandbox/public/javascripts/lang/ru.js +40 -0
  4006. data/sandbox/public/javascripts/lang/sp.js +40 -0
  4007. data/sandbox/public/javascripts/lang/sv.js +41 -0
  4008. data/sandbox/public/javascripts/lang/ua.js +40 -0
  4009. data/sandbox/public/javascripts/localization/messages_cn.js +24 -0
  4010. data/sandbox/public/javascripts/localization/messages_cs.js +23 -0
  4011. data/sandbox/public/javascripts/localization/messages_da.js +21 -0
  4012. data/sandbox/public/javascripts/localization/messages_de.js +21 -0
  4013. data/sandbox/public/javascripts/localization/messages_es.js +24 -0
  4014. data/sandbox/public/javascripts/localization/messages_fr.js +23 -0
  4015. data/sandbox/public/javascripts/localization/messages_hu.js +21 -0
  4016. data/sandbox/public/javascripts/localization/messages_it.js +26 -0
  4017. data/sandbox/public/javascripts/localization/messages_kk.js +23 -0
  4018. data/sandbox/public/javascripts/localization/messages_nl.js +23 -0
  4019. data/sandbox/public/javascripts/localization/messages_no.js +23 -0
  4020. data/sandbox/public/javascripts/localization/messages_pl.js +23 -0
  4021. data/sandbox/public/javascripts/localization/messages_ptbr.js +30 -0
  4022. data/sandbox/public/javascripts/localization/messages_ro.js +24 -0
  4023. data/sandbox/public/javascripts/localization/messages_ru.js +23 -0
  4024. data/sandbox/public/javascripts/localization/messages_se.js +23 -0
  4025. data/sandbox/public/javascripts/localization/messages_sk.js +21 -0
  4026. data/sandbox/public/javascripts/localization/messages_tr.js +24 -0
  4027. data/sandbox/public/javascripts/localization/messages_tw.js +24 -0
  4028. data/sandbox/public/javascripts/localization/messages_ua.js +24 -0
  4029. data/sandbox/public/javascripts/nested-attribute.js +26 -0
  4030. data/sandbox/public/javascripts/open_id.js +15 -0
  4031. data/sandbox/public/javascripts/product.js +49 -0
  4032. data/sandbox/public/javascripts/rails.js +127 -0
  4033. data/sandbox/public/javascripts/taxonomy.js +201 -0
  4034. data/sandbox/public/javascripts/zone.js +39 -0
  4035. data/sandbox/public/robots.txt +14 -0
  4036. data/sandbox/public/stylesheets/admin/admin-forms.css +154 -0
  4037. data/sandbox/public/stylesheets/admin/admin-reset.css +69 -0
  4038. data/sandbox/public/stylesheets/admin/admin-tables.css +39 -0
  4039. data/sandbox/public/stylesheets/admin/admin-typography.css +117 -0
  4040. data/sandbox/public/stylesheets/admin/admin.css +614 -0
  4041. data/sandbox/public/stylesheets/admin/autocomplete.css +73 -0
  4042. data/sandbox/public/stylesheets/admin/dashboard.css +143 -0
  4043. data/sandbox/public/stylesheets/admin/edit_checkouts.css +57 -0
  4044. data/sandbox/public/stylesheets/admin/grids.css +314 -0
  4045. data/sandbox/public/stylesheets/admin/promotions.css +54 -0
  4046. data/sandbox/public/stylesheets/admin/reset-fonts-grids-2-6-0.css +7 -0
  4047. data/sandbox/public/stylesheets/admin/token-input.css +109 -0
  4048. data/sandbox/public/stylesheets/admin/yui-includes.css +14 -0
  4049. data/sandbox/public/stylesheets/datepicker.css +263 -0
  4050. data/sandbox/public/stylesheets/jquery.autocomplete.css +48 -0
  4051. data/sandbox/public/stylesheets/screen.css +916 -0
  4052. data/sandbox/rfcommerce_sandbox.gemspec +26 -0
  4053. data/sandbox/script/rails +6 -0
  4054. data/sandbox/tmp/cache/C51/6F0/configuration_AppConfiguration +0 -0
  4055. metadata +4101 -0
@@ -0,0 +1,16 @@
1
+ /*
2
+ * jQuery validation plug-in 1.5.5
3
+ *
4
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
5
+ * http://docs.jquery.com/Plugins/Validation
6
+ *
7
+ * Copyright (c) 2006 - 2008 Jörn Zaefferer
8
+ *
9
+ * $Id: jquery.validate.js 6403 2009-06-17 14:27:16Z joern.zaefferer $
10
+ *
11
+ * Dual licensed under the MIT and GPL licenses:
12
+ * http://www.opensource.org/licenses/mit-license.php
13
+ * http://www.gnu.org/licenses/gpl.html
14
+ */
15
+ (function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}var validator=$.data(this[0],'validator');if(validator){return validator;}validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true;});if(validator.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){validator.submitButton=this;});}this.submit(function(event){if(validator.settings.debug)event.preventDefault();function handle(){if(validator.settings.submitHandler){if(validator.submitButton){var hidden=$("<input type='hidden'/>").attr("name",validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);}validator.settings.submitHandler.call(validator,validator.currentForm);if(validator.submitButton){hidden.remove();}return false;}return true;}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}return handle();}else{validator.focusInvalid();return false;}});}return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid&=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages)settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(a.value);},filled:function(a){return!!$.trim(a.value);},unchecked:function(a){return!a.checked;}});$.validator=function(options,form){this.settings=$.extend({},$.validator.defaults,options);this.currentForm=form;this.init();};$.validator.format=function(source,params){if(arguments.length==1)return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};if(arguments.length>2&&params.constructor!=Array){params=$.makeArray(arguments).slice(1);}if(params.constructor!=Array){params=[params];}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)this.element(element);},highlight:function(element,errorClass,validClass){$(element).addClass(errorClass).removeClass(validClass);},unhighlight:function(element,errorClass,validClass){$(element).removeClass(errorClass).addClass(validClass);}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator");validator.settings["on"+event.type]&&validator.settings["on"+event.type].call(validator,this[0]);}$(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",delegate).delegate("click",":radio, :checkbox",delegate);if(this.settings.invalidHandler)$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid())$(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if($.fn.resetForm)$(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass);},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj)count++;return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus();}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.formSubmitted=false;this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0];}var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue;}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id
16
+ +", check the '"+rule.method+"' method");throw e;}}if(dependencyMismatch)return;if(this.objectLength(rules))this.successList.push(element);return true;},customMetaMessage:function(element,method){if(!$.metadata)return;var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined)return arguments[i];}return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method);if(typeof message=="function")message=message.call(this,rule.parameters,element);this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);this.showLabel(error.element,error.message);}if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass);}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}if(!this.labelContainer.append(label).length)this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element);}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}this.toShow=this.toShow.add(label);},errorsFor:function(element){return this.errors().filter("[for='"+this.idOrName(element)+"']");},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return/radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element))return this.findByName(element.name).filter(':checked').length;}return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();}else if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=$(element).attr('class');classes&&$.each(classes.split(' '),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}return rules;},metadataRules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}if(rules.messages){delete rules.messages}return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message||$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))return"dependency-mismatch";switch(element.nodeName.toLowerCase()){case'select':var options=$("option:selected",element);return options.length>0&&(element.type=="select-multiple"||($.browser.msie&&!(options[0].attributes['value'].specified)?options[0].text:options[0].value).length>0);case'input':if(this.checkable(element))return this.getLength(value,element)>0;default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element))return"dependency-mismatch";var previous=this.previousValue(element);if(!this.settings.messages[element.name])this.settings.messages[element.name]={};this.settings.messages[element.name].remote=typeof previous.message=="function"?previous.message(value):previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){var valid=response===true;if(valid){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}else{var errors={};errors[element.name]=previous.message=response||validator.defaultMessage(element,"remote");validator.showErrors(errors);}previous.valid=valid;validator.stopRequest(element,valid);}},param));return"pending";}else if(this.pending[element.name]){return"pending";}return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param;},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},dateDE:function(value,element){return this.optional(element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},numberDE:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))return"dependency-mismatch";if(/[^0-9-]+/.test(value))return false;var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)nDigit-=9;}nCheck+=nDigit;bEven=!bEven;}return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param.replace(/,/g,'|'):"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){return value==$(param).val();}}});$.format=$.validator.format;})(jQuery);;(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}return(pendingRequests[port]=ajax.apply(this,arguments));}return ajax.apply(this,arguments);};})(jQuery);;(function($){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie)return false;this.addEventListener(original,$.event.special[fix].handler,true);},teardown:function(){if($.browser.msie)return false;this.removeEventListener(original,$.event.special[fix].handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});},triggerEvent:function(type,target){return this.triggerHandler(type,[$.event.fix({type:type,target:target})]);}})})(jQuery);
@@ -0,0 +1,3510 @@
1
+ /*
2
+ * jsTree 1.0-rc1
3
+ * http://jstree.com/
4
+ *
5
+ * Copyright (c) 2010 Ivan Bozhanov (vakata.com)
6
+ *
7
+ * Dual licensed under the MIT and GPL licenses (same as jQuery):
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ * http://www.gnu.org/licenses/gpl.html
10
+ *
11
+ * $Date: 2010-07-01 10:51:11 +0300 (четв, 01 юли 2010) $
12
+ * $Revision: 191 $
13
+ */
14
+
15
+ /*jslint browser: true, onevar: true, undef: true, bitwise: true, strict: true */
16
+ /*global window : false, clearInterval: false, clearTimeout: false, document: false, setInterval: false, setTimeout: false, jQuery: false, navigator: false, XSLTProcessor: false, DOMParser: false, XMLSerializer: false*/
17
+
18
+ "use strict";
19
+ // Common functions not related to jsTree
20
+ // decided to move them to a `vakata` "namespace"
21
+ (function ($) {
22
+ $.vakata = {};
23
+ // CSS related functions
24
+ $.vakata.css = {
25
+ get_css : function(rule_name, delete_flag, sheet) {
26
+ rule_name = rule_name.toLowerCase();
27
+ var css_rules = sheet.cssRules || sheet.rules,
28
+ j = 0;
29
+ do {
30
+ if(css_rules.length && j > css_rules.length + 5) { return false; }
31
+ if(css_rules[j].selectorText && css_rules[j].selectorText.toLowerCase() == rule_name) {
32
+ if(delete_flag === true) {
33
+ if(sheet.removeRule) { sheet.removeRule(j); }
34
+ if(sheet.deleteRule) { sheet.deleteRule(j); }
35
+ return true;
36
+ }
37
+ else { return css_rules[j]; }
38
+ }
39
+ }
40
+ while (css_rules[++j]);
41
+ return false;
42
+ },
43
+ add_css : function(rule_name, sheet) {
44
+ if($.jstree.css.get_css(rule_name, false, sheet)) { return false; }
45
+ if(sheet.insertRule) { sheet.insertRule(rule_name + ' { }', 0); } else { sheet.addRule(rule_name, null, 0); }
46
+ return $.vakata.css.get_css(rule_name);
47
+ },
48
+ remove_css : function(rule_name, sheet) {
49
+ return $.vakata.css.get_css(rule_name, true, sheet);
50
+ },
51
+ add_sheet : function(opts) {
52
+ var tmp;
53
+ if(opts.str) {
54
+ tmp = document.createElement("style");
55
+ tmp.setAttribute('type',"text/css");
56
+ if(tmp.styleSheet) {
57
+ document.getElementsByTagName("head")[0].appendChild(tmp);
58
+ tmp.styleSheet.cssText = opts.str;
59
+ }
60
+ else {
61
+ tmp.appendChild(document.createTextNode(opts.str));
62
+ document.getElementsByTagName("head")[0].appendChild(tmp);
63
+ }
64
+ return tmp.sheet || tmp.styleSheet;
65
+ }
66
+ if(opts.url) {
67
+ if(document.createStyleSheet) {
68
+ try { tmp = document.createStyleSheet(opts.url); } catch (e) { }
69
+ }
70
+ else {
71
+ tmp = document.createElement('link');
72
+ tmp.rel = 'stylesheet';
73
+ tmp.type = 'text/css';
74
+ tmp.media = "all";
75
+ tmp.href = opts.url;
76
+ document.getElementsByTagName("head")[0].appendChild(tmp);
77
+ return tmp.styleSheet;
78
+ }
79
+ }
80
+ }
81
+ };
82
+ })(jQuery);
83
+
84
+ /*
85
+ * jsTree core 1.0
86
+ */
87
+ (function ($) {
88
+ // private variables
89
+ var instances = [], // instance array (used by $.jstree.reference/create/focused)
90
+ focused_instance = -1, // the index in the instance array of the currently focused instance
91
+ plugins = {}, // list of included plugins
92
+ prepared_move = {}, // for the move plugin
93
+ is_ie6 = false;
94
+
95
+ // jQuery plugin wrapper (thanks to jquery UI widget function)
96
+ $.fn.jstree = function (settings) {
97
+ var isMethodCall = (typeof settings == 'string'), // is this a method call like $().jstree("open_node")
98
+ args = Array.prototype.slice.call(arguments, 1),
99
+ returnValue = this;
100
+
101
+ // extend settings and allow for multiple hashes and metadata
102
+ if(!isMethodCall && $.meta) { args.push($.metadata.get(this).jstree); }
103
+ settings = !isMethodCall && args.length ? $.extend.apply(null, [true, settings].concat(args)) : settings;
104
+ // block calls to "private" methods
105
+ if(isMethodCall && settings.substring(0, 1) == '_') { return returnValue; }
106
+
107
+ // if a method call execute the method on all selected instances
108
+ if(isMethodCall) {
109
+ this.each(function() {
110
+ var instance = instances[$.data(this, "jstree-instance-id")],
111
+ methodValue = (instance && $.isFunction(instance[settings])) ? instance[settings].apply(instance, args) : instance;
112
+ if(typeof methodValue !== "undefined" && (settings.indexOf("is_" === 0) || (methodValue !== true && methodValue !== false))) { returnValue = methodValue; return false; }
113
+ });
114
+ }
115
+ else {
116
+ this.each(function() {
117
+ var instance_id = $.data(this, "jstree-instance-id"),
118
+ s = false;
119
+ // if an instance already exists, destroy it first
120
+ if(typeof instance_id !== "undefined" && instances[instance_id]) { instances[instance_id].destroy(); }
121
+ // push a new empty object to the instances array
122
+ instance_id = parseInt(instances.push({}),10) - 1;
123
+ // store the jstree instance id to the container element
124
+ $.data(this, "jstree-instance-id", instance_id);
125
+ // clean up all plugins
126
+ if(!settings) { settings = {}; }
127
+ settings.plugins = $.isArray(settings.plugins) ? settings.plugins : $.jstree.defaults.plugins;
128
+ if($.inArray("core", settings.plugins) === -1) { settings.plugins.unshift("core"); }
129
+
130
+ // only unique plugins (NOT WORKING)
131
+ // settings.plugins = settings.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");
132
+
133
+ // extend defaults with passed data
134
+ s = $.extend(true, {}, $.jstree.defaults, settings);
135
+ s.plugins = settings.plugins;
136
+ $.each(plugins, function (i, val) { if($.inArray(i, s.plugins) === -1) { s[i] = null; delete s[i]; } });
137
+ // push the new object to the instances array (at the same time set the default classes to the container) and init
138
+ instances[instance_id] = new $.jstree._instance(instance_id, $(this).addClass("jstree jstree-" + instance_id), s);
139
+ // init all activated plugins for this instance
140
+ $.each(instances[instance_id]._get_settings().plugins, function (i, val) { instances[instance_id].data[val] = {}; });
141
+ $.each(instances[instance_id]._get_settings().plugins, function (i, val) { if(plugins[val]) { plugins[val].__init.apply(instances[instance_id]); } });
142
+ // initialize the instance
143
+ instances[instance_id].init();
144
+ });
145
+ }
146
+ // return the jquery selection (or if it was a method call that returned a value - the returned value)
147
+ return returnValue;
148
+ };
149
+ // object to store exposed functions and objects
150
+ $.jstree = {
151
+ defaults : {
152
+ plugins : []
153
+ },
154
+ _focused : function () { return instances[focused_instance] || null; },
155
+ _reference : function (needle) {
156
+ // get by instance id
157
+ if(instances[needle]) { return instances[needle]; }
158
+ // get by DOM (if still no luck - return null
159
+ var o = $(needle);
160
+ if(!o.length && typeof needle === "string") { o = $("#" + needle); }
161
+ if(!o.length) { return null; }
162
+ return instances[o.closest(".jstree").data("jstree-instance-id")] || null;
163
+ },
164
+ _instance : function (index, container, settings) {
165
+ // for plugins to store data in
166
+ this.data = { core : {} };
167
+ this.get_settings = function () { return $.extend(true, {}, settings); };
168
+ this._get_settings = function () { return settings; };
169
+ this.get_index = function () { return index; };
170
+ this.get_container = function () { return container; };
171
+ this._set_settings = function (s) {
172
+ settings = $.extend(true, {}, settings, s);
173
+ };
174
+ },
175
+ _fn : { },
176
+ plugin : function (pname, pdata) {
177
+ pdata = $.extend({}, {
178
+ __init : $.noop,
179
+ __destroy : $.noop,
180
+ _fn : {},
181
+ defaults : false
182
+ }, pdata);
183
+ plugins[pname] = pdata;
184
+
185
+ $.jstree.defaults[pname] = pdata.defaults;
186
+ $.each(pdata._fn, function (i, val) {
187
+ val.plugin = pname;
188
+ val.old = $.jstree._fn[i];
189
+ $.jstree._fn[i] = function () {
190
+ var rslt,
191
+ func = val,
192
+ args = Array.prototype.slice.call(arguments),
193
+ evnt = new $.Event("before.jstree"),
194
+ rlbk = false;
195
+
196
+ // Check if function belongs to the included plugins of this instance
197
+ do {
198
+ if(func && func.plugin && $.inArray(func.plugin, this._get_settings().plugins) !== -1) { break; }
199
+ func = func.old;
200
+ } while(func);
201
+ if(!func) { return; }
202
+
203
+ // a chance to stop execution (or change arguments):
204
+ // * just bind to jstree.before
205
+ // * check the additional data object (func property)
206
+ // * call event.stopImmediatePropagation()
207
+ // * return false (or an array of arguments)
208
+ rslt = this.get_container().triggerHandler(evnt, { "func" : i, "inst" : this, "args" : args });
209
+ if(rslt === false) { return; }
210
+ if(typeof rslt !== "undefined") { args = rslt; }
211
+
212
+ // context and function to trigger events, then finally call the function
213
+ if(i.indexOf("_") === 0) {
214
+ rslt = func.apply(this, args);
215
+ }
216
+ else {
217
+ rslt = func.apply(
218
+ $.extend({}, this, {
219
+ __callback : function (data) {
220
+ this.get_container().triggerHandler( i + '.jstree', { "inst" : this, "args" : args, "rslt" : data, "rlbk" : rlbk });
221
+ },
222
+ __rollback : function () {
223
+ rlbk = this.get_rollback();
224
+ return rlbk;
225
+ },
226
+ __call_old : function (replace_arguments) {
227
+ return func.old.apply(this, (replace_arguments ? Array.prototype.slice.call(arguments, 1) : args ) );
228
+ }
229
+ }), args);
230
+ }
231
+
232
+ // return the result
233
+ return rslt;
234
+ };
235
+ $.jstree._fn[i].old = val.old;
236
+ $.jstree._fn[i].plugin = pname;
237
+ });
238
+ },
239
+ rollback : function (rb) {
240
+ if(rb) {
241
+ if(!$.isArray(rb)) { rb = [ rb ]; }
242
+ $.each(rb, function (i, val) {
243
+ instances[val.i].set_rollback(val.h, val.d);
244
+ });
245
+ }
246
+ }
247
+ };
248
+ // set the prototype for all instances
249
+ $.jstree._fn = $.jstree._instance.prototype = {};
250
+
251
+ // css functions - used internally
252
+
253
+ // load the css when DOM is ready
254
+ $(function() {
255
+ // code is copied form jQuery ($.browser is deprecated + there is a bug in IE)
256
+ var u = navigator.userAgent.toLowerCase(),
257
+ v = (u.match( /.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
258
+ css_string = '' +
259
+ '.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } ' +
260
+ '.jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; } ' +
261
+ '.jstree-rtl li { margin-left:0; margin-right:18px; } ' +
262
+ '.jstree > ul > li { margin-left:0px; } ' +
263
+ '.jstree-rtl > ul > li { margin-right:0px; } ' +
264
+ '.jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } ' +
265
+ '.jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } ' +
266
+ '.jstree a:focus { outline: none; } ' +
267
+ '.jstree a > ins { height:16px; width:16px; } ' +
268
+ '.jstree a > .jstree-icon { margin-right:3px; } ' +
269
+ '.jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } ' +
270
+ 'li.jstree-open > ul { display:block; } ' +
271
+ 'li.jstree-closed > ul { display:none; } ';
272
+ // Correct IE 6 (does not support the > CSS selector)
273
+ if(/msie/.test(u) && parseInt(v, 10) == 6) {
274
+ is_ie6 = true;
275
+ css_string += '' +
276
+ '.jstree li { height:18px; margin-left:0; margin-right:0; } ' +
277
+ '.jstree li li { margin-left:18px; } ' +
278
+ '.jstree-rtl li li { margin-left:0px; margin-right:18px; } ' +
279
+ 'li.jstree-open ul { display:block; } ' +
280
+ 'li.jstree-closed ul { display:none !important; } ' +
281
+ '.jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } ' +
282
+ '.jstree li a ins { height:16px; width:16px; margin-right:3px; } ' +
283
+ '.jstree-rtl li a ins { margin-right:0px; margin-left:3px; } ';
284
+ }
285
+ // Correct IE 7 (shifts anchor nodes onhover)
286
+ if(/msie/.test(u) && parseInt(v, 10) == 7) {
287
+ css_string += '.jstree li a { border-width:0 !important; padding:0px 2px !important; } ';
288
+ }
289
+ $.vakata.css.add_sheet({ str : css_string });
290
+ });
291
+
292
+ // core functions (open, close, create, update, delete)
293
+ $.jstree.plugin("core", {
294
+ __init : function () {
295
+ this.data.core.to_open = $.map($.makeArray(this.get_settings().core.initially_open), function (n) { return "#" + n.toString().replace(/^#/,"").replace('\\/','/').replace('/','\\/'); });
296
+ },
297
+ defaults : {
298
+ html_titles : false,
299
+ animation : 500,
300
+ initially_open : [],
301
+ rtl : false,
302
+ strings : {
303
+ loading : "Loading ...",
304
+ new_node : "New node"
305
+ }
306
+ },
307
+ _fn : {
308
+ init : function () {
309
+ this.set_focus();
310
+ if(this._get_settings().core.rtl) {
311
+ this.get_container().addClass("jstree-rtl").css("direction", "rtl");
312
+ }
313
+ this.get_container().html("<ul><li class='jstree-last jstree-leaf'><ins>&#160;</ins><a class='jstree-loading' href='#'><ins class='jstree-icon'>&#160;</ins>" + this._get_settings().core.strings.loading + "</a></li></ul>");
314
+ this.data.core.li_height = this.get_container().find("ul li.jstree-closed, ul li.jstree-leaf").eq(0).height() || 18;
315
+
316
+ this.get_container()
317
+ .delegate("li > ins", "click.jstree", $.proxy(function (event) {
318
+ var trgt = $(event.target);
319
+ if(trgt.is("ins") && event.pageY - trgt.offset().top < this.data.core.li_height) { this.toggle_node(trgt); }
320
+ }, this))
321
+ .bind("mousedown.jstree", $.proxy(function () {
322
+ this.set_focus(); // This used to be setTimeout(set_focus,0) - why?
323
+ }, this))
324
+ .bind("dblclick.jstree", function (event) {
325
+ var sel;
326
+ if(document.selection && document.selection.empty) { document.selection.empty(); }
327
+ else {
328
+ if(window.getSelection) {
329
+ sel = window.getSelection();
330
+ try {
331
+ sel.removeAllRanges();
332
+ sel.collapse();
333
+ } catch (err) { }
334
+ }
335
+ }
336
+ });
337
+ this.__callback();
338
+ this.load_node(-1, function () { this.loaded(); this.reopen(); });
339
+ },
340
+ destroy : function () {
341
+ var i,
342
+ n = this.get_index(),
343
+ s = this._get_settings(),
344
+ _this = this;
345
+
346
+ $.each(s.plugins, function (i, val) {
347
+ try { plugins[val].__destroy.apply(_this); } catch(err) { }
348
+ });
349
+ this.__callback();
350
+ // set focus to another instance if this one is focused
351
+ if(this.is_focused()) {
352
+ for(i in instances) {
353
+ if(instances.hasOwnProperty(i) && i != n) {
354
+ instances[i].set_focus();
355
+ break;
356
+ }
357
+ }
358
+ }
359
+ // if no other instance found
360
+ if(n === focused_instance) { focused_instance = -1; }
361
+ // remove all traces of jstree in the DOM (only the ones set using jstree*) and cleans all events
362
+ this.get_container()
363
+ .unbind(".jstree")
364
+ .undelegate(".jstree")
365
+ .removeData("jstree-instance-id")
366
+ .find("[class^='jstree']")
367
+ .andSelf()
368
+ .attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); });
369
+ // remove the actual data
370
+ instances[n] = null;
371
+ delete instances[n];
372
+ },
373
+ save_opened : function () {
374
+ var _this = this;
375
+ this.data.core.to_open = [];
376
+ this.get_container().find(".jstree-open").each(function () {
377
+ _this.data.core.to_open.push("#" + this.id.toString().replace(/^#/,"").replace('\\/','/').replace('/','\\/'));
378
+ });
379
+ this.__callback(_this.data.core.to_open);
380
+ },
381
+ reopen : function (is_callback) {
382
+ var _this = this,
383
+ done = true,
384
+ current = [],
385
+ remaining = [];
386
+ if(!is_callback) { this.data.core.reopen = false; this.data.core.refreshing = true; }
387
+ if(this.data.core.to_open.length) {
388
+ $.each(this.data.core.to_open, function (i, val) {
389
+ if(val == "#") { return true; }
390
+ if($(val).length && $(val).is(".jstree-closed")) { current.push(val); }
391
+ else { remaining.push(val); }
392
+ });
393
+ if(current.length) {
394
+ this.data.core.to_open = remaining;
395
+ $.each(current, function (i, val) {
396
+ _this.open_node(val, function () { _this.reopen(true); }, true);
397
+ });
398
+ done = false;
399
+ }
400
+ }
401
+ if(done) {
402
+ // TODO: find a more elegant approach to syncronizing returning requests
403
+ if(this.data.core.reopen) { clearTimeout(this.data.core.reopen); }
404
+ this.data.core.reopen = setTimeout(function () { _this.__callback({}, _this); }, 50);
405
+ this.data.core.refreshing = false;
406
+ }
407
+ },
408
+ refresh : function (obj) {
409
+ var _this = this;
410
+ this.save_opened();
411
+ if(!obj) { obj = -1; }
412
+ obj = this._get_node(obj);
413
+ if(!obj) { obj = -1; }
414
+ if(obj !== -1) { obj.children("UL").remove(); }
415
+ this.load_node(obj, function () { _this.__callback({ "obj" : obj}); _this.reopen(); });
416
+ },
417
+ // Dummy function to fire after the first load (so that there is a jstree.loaded event)
418
+ loaded : function () {
419
+ this.__callback();
420
+ },
421
+ // deal with focus
422
+ set_focus : function () {
423
+ var f = $.jstree._focused();
424
+ if(f && f !== this) {
425
+ f.get_container().removeClass("jstree-focused");
426
+ }
427
+ if(f !== this) {
428
+ this.get_container().addClass("jstree-focused");
429
+ focused_instance = this.get_index();
430
+ }
431
+ this.__callback();
432
+ },
433
+ is_focused : function () {
434
+ return focused_instance == this.get_index();
435
+ },
436
+
437
+ // traverse
438
+ _get_node : function (obj) {
439
+ var $obj = $(obj, this.get_container());
440
+ if($obj.is(".jstree") || obj == -1) { return -1; }
441
+ $obj = $obj.closest("li", this.get_container());
442
+ return $obj.length ? $obj : false;
443
+ },
444
+ _get_next : function (obj, strict) {
445
+ obj = this._get_node(obj);
446
+ if(obj === -1) { return this.get_container().find("> ul > li:first-child"); }
447
+ if(!obj.length) { return false; }
448
+ if(strict) { return (obj.nextAll("li").size() > 0) ? obj.nextAll("li:eq(0)") : false; }
449
+
450
+ if(obj.hasClass("jstree-open")) { return obj.find("li:eq(0)"); }
451
+ else if(obj.nextAll("li").size() > 0) { return obj.nextAll("li:eq(0)"); }
452
+ else { return obj.parentsUntil(".jstree","li").next("li").eq(0); }
453
+ },
454
+ _get_prev : function (obj, strict) {
455
+ obj = this._get_node(obj);
456
+ if(obj === -1) { return this.get_container().find("> ul > li:last-child"); }
457
+ if(!obj.length) { return false; }
458
+ if(strict) { return (obj.prevAll("li").length > 0) ? obj.prevAll("li:eq(0)") : false; }
459
+
460
+ if(obj.prev("li").length) {
461
+ obj = obj.prev("li").eq(0);
462
+ while(obj.hasClass("jstree-open")) { obj = obj.children("ul:eq(0)").children("li:last"); }
463
+ return obj;
464
+ }
465
+ else { var o = obj.parentsUntil(".jstree","li:eq(0)"); return o.length ? o : false; }
466
+ },
467
+ _get_parent : function (obj) {
468
+ obj = this._get_node(obj);
469
+ if(obj == -1 || !obj.length) { return false; }
470
+ var o = obj.parentsUntil(".jstree", "li:eq(0)");
471
+ return o.length ? o : -1;
472
+ },
473
+ _get_children : function (obj) {
474
+ obj = this._get_node(obj);
475
+ if(obj === -1) { return this.get_container().children("ul:eq(0)").children("li"); }
476
+ if(!obj.length) { return false; }
477
+ return obj.children("ul:eq(0)").children("li");
478
+ },
479
+ get_path : function (obj, id_mode) {
480
+ var p = [],
481
+ _this = this;
482
+ obj = this._get_node(obj);
483
+ if(obj === -1 || !obj || !obj.length) { return false; }
484
+ obj.parentsUntil(".jstree", "li").each(function () {
485
+ p.push( id_mode ? this.id : _this.get_text(this) );
486
+ });
487
+ p.reverse();
488
+ p.push( id_mode ? obj.attr("id") : this.get_text(obj) );
489
+ return p;
490
+ },
491
+
492
+ is_open : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-open"); },
493
+ is_closed : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-closed"); },
494
+ is_leaf : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-leaf"); },
495
+ // open/close
496
+ open_node : function (obj, callback, skip_animation) {
497
+ obj = this._get_node(obj);
498
+ if(!obj.length) { return false; }
499
+ if(!obj.hasClass("jstree-closed")) { if(callback) { callback.call(); } return false; }
500
+ var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation,
501
+ t = this;
502
+ if(!this._is_loaded(obj)) {
503
+ obj.children("a").addClass("jstree-loading");
504
+ this.load_node(obj, function () { t.open_node(obj, callback, skip_animation); }, callback);
505
+ }
506
+ else {
507
+ if(s) { obj.children("ul").css("display","none"); }
508
+ obj.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading");
509
+ if(s) { obj.children("ul").stop(true).slideDown(s, function () { this.style.display = ""; }); }
510
+ this.__callback({ "obj" : obj });
511
+ if(callback) { callback.call(); }
512
+ }
513
+ },
514
+ close_node : function (obj, skip_animation) {
515
+ obj = this._get_node(obj);
516
+ var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation;
517
+ if(!obj.length || !obj.hasClass("jstree-open")) { return false; }
518
+ if(s) { obj.children("ul").attr("style","display:block !important"); }
519
+ obj.removeClass("jstree-open").addClass("jstree-closed");
520
+ if(s) { obj.children("ul").stop(true).slideUp(s, function () { this.style.display = ""; }); }
521
+ this.__callback({ "obj" : obj });
522
+ },
523
+ toggle_node : function (obj) {
524
+ obj = this._get_node(obj);
525
+ if(obj.hasClass("jstree-closed")) { return this.open_node(obj); }
526
+ if(obj.hasClass("jstree-open")) { return this.close_node(obj); }
527
+ },
528
+ open_all : function (obj, original_obj) {
529
+ obj = obj ? this._get_node(obj) : this.get_container();
530
+ if(!obj || obj === -1) { obj = this.get_container(); }
531
+ if(original_obj) {
532
+ obj = obj.find("li.jstree-closed");
533
+ }
534
+ else {
535
+ original_obj = obj;
536
+ if(obj.is(".jstree-closed")) { obj = obj.find("li.jstree-closed").andSelf(); }
537
+ else { obj = obj.find("li.jstree-closed"); }
538
+ }
539
+ var _this = this;
540
+ obj.each(function () {
541
+ var __this = this;
542
+ if(!_this._is_loaded(this)) { _this.open_node(this, function() { _this.open_all(__this, original_obj); }, true); }
543
+ else { _this.open_node(this, false, true); }
544
+ });
545
+ // so that callback is fired AFTER all nodes are open
546
+ if(original_obj.find('li.jstree-closed').length === 0) { this.__callback({ "obj" : original_obj }); }
547
+ },
548
+ close_all : function (obj) {
549
+ var _this = this;
550
+ obj = obj ? this._get_node(obj) : this.get_container();
551
+ if(!obj || obj === -1) { obj = this.get_container(); }
552
+ obj.find("li.jstree-open").andSelf().each(function () { _this.close_node(this); });
553
+ this.__callback({ "obj" : obj });
554
+ },
555
+ clean_node : function (obj) {
556
+ obj = obj && obj != -1 ? $(obj) : this.get_container();
557
+ obj = obj.is("li") ? obj.find("li").andSelf() : obj.find("li");
558
+ obj.removeClass("jstree-last")
559
+ .filter("li:last-child").addClass("jstree-last").end()
560
+ .filter(":has(li)")
561
+ .not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed");
562
+ obj.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove();
563
+ this.__callback({ "obj" : obj });
564
+ },
565
+ // rollback
566
+ get_rollback : function () {
567
+ this.__callback();
568
+ return { i : this.get_index(), h : this.get_container().children("ul").clone(true), d : this.data };
569
+ },
570
+ set_rollback : function (html, data) {
571
+ this.get_container().empty().append(html);
572
+ this.data = data;
573
+ this.__callback();
574
+ },
575
+ // Dummy functions to be overwritten by any datastore plugin included
576
+ load_node : function (obj, s_call, e_call) { this.__callback({ "obj" : obj }); },
577
+ _is_loaded : function (obj) { return true; },
578
+
579
+ // Basic operations: create
580
+ create_node : function (obj, position, js, callback, is_loaded) {
581
+ obj = this._get_node(obj);
582
+ position = typeof position === "undefined" ? "last" : position;
583
+ var d = $("<li>"),
584
+ s = this._get_settings().core,
585
+ tmp;
586
+
587
+ if(obj !== -1 && !obj.length) { return false; }
588
+ if(!is_loaded && !this._is_loaded(obj)) { this.load_node(obj, function () { this.create_node(obj, position, js, callback, true); }); return false; }
589
+
590
+ this.__rollback();
591
+
592
+ if(typeof js === "string") { js = { "data" : js }; }
593
+ if(!js) { js = {}; }
594
+ if(js.attr) { d.attr(js.attr); }
595
+ if(js.state) { d.addClass("jstree-" + js.state); }
596
+ if(!js.data) { js.data = s.strings.new_node; }
597
+ if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); }
598
+ $.each(js.data, function (i, m) {
599
+ tmp = $("<a>");
600
+ if($.isFunction(m)) { m = m.call(this, js); }
601
+ if(typeof m == "string") { tmp.attr('href','#')[ s.html_titles ? "html" : "text" ](m); }
602
+ else {
603
+ if(!m.attr) { m.attr = {}; }
604
+ if(!m.attr.href) { m.attr.href = '#'; }
605
+ tmp.attr(m.attr)[ s.html_titles ? "html" : "text" ](m.title);
606
+ if(m.language) { tmp.addClass(m.language); }
607
+ }
608
+ tmp.prepend("<ins class='jstree-icon'>&#160;</ins>");
609
+ if(m.icon) {
610
+ if(m.icon.indexOf("/") === -1) { tmp.children("ins").addClass(m.icon); }
611
+ else { tmp.children("ins").css("background","url('" + m.icon + "') center center no-repeat"); }
612
+ }
613
+ d.append(tmp);
614
+ });
615
+ d.prepend("<ins class='jstree-icon'>&#160;</ins>");
616
+ if(obj === -1) {
617
+ obj = this.get_container();
618
+ if(position === "before") { position = "first"; }
619
+ if(position === "after") { position = "last"; }
620
+ }
621
+ switch(position) {
622
+ case "before": obj.before(d); tmp = this._get_parent(obj); break;
623
+ case "after" : obj.after(d); tmp = this._get_parent(obj); break;
624
+ case "inside":
625
+ case "first" :
626
+ if(!obj.children("ul").length) { obj.append("<ul>"); }
627
+ obj.children("ul").prepend(d);
628
+ tmp = obj;
629
+ break;
630
+ case "last":
631
+ if(!obj.children("ul").length) { obj.append("<ul>"); }
632
+ obj.children("ul").append(d);
633
+ tmp = obj;
634
+ break;
635
+ default:
636
+ if(!obj.children("ul").length) { obj.append("<ul>"); }
637
+ if(!position) { position = 0; }
638
+ tmp = obj.children("ul").children("li").eq(position);
639
+ if(tmp.length) { tmp.before(d); }
640
+ else { obj.children("ul").append(d); }
641
+ tmp = obj;
642
+ break;
643
+ }
644
+ if(tmp === -1 || tmp.get(0) === this.get_container().get(0)) { tmp = -1; }
645
+ this.clean_node(tmp);
646
+ this.__callback({ "obj" : d, "parent" : tmp });
647
+ if(callback) { callback.call(this, d); }
648
+ return d;
649
+ },
650
+ // Basic operations: rename (deal with text)
651
+ get_text : function (obj) {
652
+ obj = this._get_node(obj);
653
+ if(!obj.length) { return false; }
654
+ var s = this._get_settings().core.html_titles;
655
+ obj = obj.children("a:eq(0)");
656
+ if(s) {
657
+ obj = obj.clone();
658
+ obj.children("INS").remove();
659
+ return obj.html();
660
+ }
661
+ else {
662
+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
663
+ return obj.nodeValue;
664
+ }
665
+ },
666
+ set_text : function (obj, val) {
667
+ obj = this._get_node(obj);
668
+ if(!obj.length) { return false; }
669
+ obj = obj.children("a:eq(0)");
670
+ if(this._get_settings().core.html_titles) {
671
+ var tmp = obj.children("INS").clone();
672
+ obj.html(val).prepend(tmp);
673
+ this.__callback({ "obj" : obj, "name" : val });
674
+ return true;
675
+ }
676
+ else {
677
+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
678
+ this.__callback({ "obj" : obj, "name" : val });
679
+ return (obj.nodeValue = val);
680
+ }
681
+ },
682
+ rename_node : function (obj, val) {
683
+ obj = this._get_node(obj);
684
+ this.__rollback();
685
+ if(obj && obj.length && this.set_text.apply(this, Array.prototype.slice.call(arguments))) { this.__callback({ "obj" : obj, "name" : val }); }
686
+ },
687
+ // Basic operations: deleting nodes
688
+ delete_node : function (obj) {
689
+ obj = this._get_node(obj);
690
+ if(!obj.length) { return false; }
691
+ this.__rollback();
692
+ var p = this._get_parent(obj), prev = this._get_prev(obj);
693
+ obj = obj.remove();
694
+ if(p !== -1 && p.find("> ul > li").length === 0) {
695
+ p.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");
696
+ }
697
+ this.clean_node(p);
698
+ this.__callback({ "obj" : obj, "prev" : prev });
699
+ return obj;
700
+ },
701
+ prepare_move : function (o, r, pos, cb, is_cb) {
702
+ var p = {};
703
+
704
+ p.ot = $.jstree._reference(p.o) || this;
705
+ p.o = p.ot._get_node(o);
706
+ p.r = r === - 1 ? -1 : this._get_node(r);
707
+ p.p = (typeof p === "undefined") ? "last" : pos; // TODO: move to a setting
708
+ if(!is_cb && prepared_move.o && prepared_move.o[0] === p.o[0] && prepared_move.r[0] === p.r[0] && prepared_move.p === p.p) {
709
+ this.__callback(prepared_move);
710
+ if(cb) { cb.call(this, prepared_move); }
711
+ return;
712
+ }
713
+ p.ot = $.jstree._reference(p.o) || this;
714
+ p.rt = r === -1 ? p.ot : $.jstree._reference(p.r) || this;
715
+ if(p.r === -1) {
716
+ p.cr = -1;
717
+ switch(p.p) {
718
+ case "first":
719
+ case "before":
720
+ case "inside":
721
+ p.cp = 0;
722
+ break;
723
+ case "after":
724
+ case "last":
725
+ p.cp = p.rt.get_container().find(" > ul > li").length;
726
+ break;
727
+ default:
728
+ p.cp = p.p;
729
+ break;
730
+ }
731
+ }
732
+ else {
733
+ if(!/^(before|after)$/.test(p.p) && !this._is_loaded(p.r)) {
734
+ return this.load_node(p.r, function () { this.prepare_move(o, r, pos, cb, true); });
735
+ }
736
+ switch(p.p) {
737
+ case "before":
738
+ p.cp = p.r.index();
739
+ p.cr = p.rt._get_parent(p.r);
740
+ break;
741
+ case "after":
742
+ p.cp = p.r.index() + 1;
743
+ p.cr = p.rt._get_parent(p.r);
744
+ break;
745
+ case "inside":
746
+ case "first":
747
+ p.cp = 0;
748
+ p.cr = p.r;
749
+ break;
750
+ case "last":
751
+ p.cp = p.r.find(" > ul > li").length;
752
+ p.cr = p.r;
753
+ break;
754
+ default:
755
+ p.cp = p.p;
756
+ p.cr = p.r;
757
+ break;
758
+ }
759
+ }
760
+ p.np = p.cr == -1 ? p.rt.get_container() : p.cr;
761
+ p.op = p.ot._get_parent(p.o);
762
+ p.or = p.np.find(" > ul > li:nth-child(" + (p.cp + 1) + ")");
763
+
764
+ prepared_move = p;
765
+ this.__callback(prepared_move);
766
+ if(cb) { cb.call(this, prepared_move); }
767
+ },
768
+ check_move : function () {
769
+ var obj = prepared_move, ret = true;
770
+ if(obj.or[0] === obj.o[0]) { return false; }
771
+ obj.o.each(function () {
772
+ if(obj.r.parentsUntil(".jstree").andSelf().filter("li").index(this) !== -1) { ret = false; return false; }
773
+ });
774
+ return ret;
775
+ },
776
+ move_node : function (obj, ref, position, is_copy, is_prepared, skip_check) {
777
+ if(!is_prepared) {
778
+ return this.prepare_move(obj, ref, position, function (p) {
779
+ this.move_node(p, false, false, is_copy, true, skip_check);
780
+ });
781
+ }
782
+ if(!skip_check && !this.check_move()) { return false; }
783
+
784
+ this.__rollback();
785
+ var o = false;
786
+ if(is_copy) {
787
+ o = obj.o.clone();
788
+ o.find("*[id]").andSelf().each(function () {
789
+ if(this.id) { this.id = "copy_" + this.id; }
790
+ });
791
+ }
792
+ else { o = obj.o; }
793
+
794
+ if(obj.or.length) { obj.or.before(o); }
795
+ else {
796
+ if(!obj.np.children("ul").length) { $("<ul>").appendTo(obj.np); }
797
+ obj.np.children("ul:eq(0)").append(o);
798
+ }
799
+
800
+ try {
801
+ obj.ot.clean_node(obj.op);
802
+ obj.rt.clean_node(obj.np);
803
+ if(!obj.op.find("> ul > li").length) {
804
+ obj.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove();
805
+ }
806
+ } catch (e) { }
807
+
808
+ if(is_copy) {
809
+ prepared_move.cy = true;
810
+ prepared_move.oc = o;
811
+ }
812
+ this.__callback(prepared_move);
813
+ return prepared_move;
814
+ },
815
+ _get_move : function () { return prepared_move; }
816
+ }
817
+ });
818
+ })(jQuery);
819
+ //*/
820
+
821
+ /*
822
+ * jsTree ui plugin 1.0
823
+ * This plugins handles selecting/deselecting/hovering/dehovering nodes
824
+ */
825
+ (function ($) {
826
+ $.jstree.plugin("ui", {
827
+ __init : function () {
828
+ this.data.ui.selected = $();
829
+ this.data.ui.last_selected = false;
830
+ this.data.ui.hovered = null;
831
+ this.data.ui.to_select = this.get_settings().ui.initially_select;
832
+
833
+ this.get_container()
834
+ .delegate("a", "click.jstree", $.proxy(function (event) {
835
+ event.preventDefault();
836
+ this.select_node(event.currentTarget, true, event);
837
+ }, this))
838
+ .delegate("a", "mouseenter.jstree", $.proxy(function (event) {
839
+ this.hover_node(event.target);
840
+ }, this))
841
+ .delegate("a", "mouseleave.jstree", $.proxy(function (event) {
842
+ this.dehover_node(event.target);
843
+ }, this))
844
+ .bind("reopen.jstree", $.proxy(function () {
845
+ this.reselect();
846
+ }, this))
847
+ .bind("get_rollback.jstree", $.proxy(function () {
848
+ this.dehover_node();
849
+ this.save_selected();
850
+ }, this))
851
+ .bind("set_rollback.jstree", $.proxy(function () {
852
+ this.reselect();
853
+ }, this))
854
+ .bind("close_node.jstree", $.proxy(function (event, data) {
855
+ var s = this._get_settings().ui,
856
+ obj = this._get_node(data.rslt.obj),
857
+ clk = (obj && obj.length) ? obj.children("ul").find(".jstree-clicked") : $(),
858
+ _this = this;
859
+ if(s.selected_parent_close === false || !clk.length) { return; }
860
+ clk.each(function () {
861
+ _this.deselect_node(this);
862
+ if(s.selected_parent_close === "select_parent") { _this.select_node(obj); }
863
+ });
864
+ }, this))
865
+ .bind("delete_node.jstree", $.proxy(function (event, data) {
866
+ var s = this._get_settings().ui.select_prev_on_delete,
867
+ obj = this._get_node(data.rslt.obj),
868
+ clk = (obj && obj.length) ? obj.find(".jstree-clicked") : [],
869
+ _this = this;
870
+ clk.each(function () { _this.deselect_node(this); });
871
+ if(s && clk.length) { this.select_node(data.rslt.prev); }
872
+ }, this))
873
+ .bind("move_node.jstree", $.proxy(function (event, data) {
874
+ if(data.rslt.cy) {
875
+ data.rslt.oc.find(".jstree-clicked").removeClass("jstree-clicked");
876
+ }
877
+ }, this));
878
+ },
879
+ defaults : {
880
+ select_limit : -1, // 0, 1, 2 ... or -1 for unlimited
881
+ select_multiple_modifier : "ctrl", // on, or ctrl, shift, alt
882
+ selected_parent_close : "select_parent", // false, "deselect", "select_parent"
883
+ select_prev_on_delete : true,
884
+ disable_selecting_children : false,
885
+ initially_select : []
886
+ },
887
+ _fn : {
888
+ _get_node : function (obj, allow_multiple) {
889
+ if(typeof obj === "undefined" || obj === null) { return allow_multiple ? this.data.ui.selected : this.data.ui.last_selected; }
890
+ var $obj = $(obj, this.get_container());
891
+ if($obj.is(".jstree") || obj == -1) { return -1; }
892
+ $obj = $obj.closest("li", this.get_container());
893
+ return $obj.length ? $obj : false;
894
+ },
895
+ save_selected : function () {
896
+ var _this = this;
897
+ this.data.ui.to_select = [];
898
+ this.data.ui.selected.each(function () { _this.data.ui.to_select.push("#" + this.id.toString().replace(/^#/,"").replace('\\/','/').replace('/','\\/')); });
899
+ this.__callback(this.data.ui.to_select);
900
+ },
901
+ reselect : function () {
902
+ var _this = this,
903
+ s = this.data.ui.to_select;
904
+ s = $.map($.makeArray(s), function (n) { return "#" + n.toString().replace(/^#/,"").replace('\\/','/').replace('/','\\/'); });
905
+ this.deselect_all();
906
+ $.each(s, function (i, val) { if(val && val !== "#") { _this.select_node(val); } });
907
+ this.__callback();
908
+ },
909
+ refresh : function (obj) {
910
+ this.save_selected();
911
+ return this.__call_old();
912
+ },
913
+ hover_node : function (obj) {
914
+ obj = this._get_node(obj);
915
+ if(!obj.length) { return false; }
916
+ //if(this.data.ui.hovered && obj.get(0) === this.data.ui.hovered.get(0)) { return; }
917
+ if(!obj.hasClass("jstree-hovered")) { this.dehover_node(); }
918
+ this.data.ui.hovered = obj.children("a").addClass("jstree-hovered").parent();
919
+ this.__callback({ "obj" : obj });
920
+ },
921
+ dehover_node : function () {
922
+ var obj = this.data.ui.hovered, p;
923
+ if(!obj || !obj.length) { return false; }
924
+ p = obj.children("a").removeClass("jstree-hovered").parent();
925
+ if(this.data.ui.hovered[0] === p[0]) { this.data.ui.hovered = null; }
926
+ this.__callback({ "obj" : obj });
927
+ },
928
+ select_node : function (obj, check, e) {
929
+ obj = this._get_node(obj);
930
+ if(obj == -1 || !obj || !obj.length) { return false; }
931
+ var s = this._get_settings().ui,
932
+ is_multiple = (s.select_multiple_modifier == "on" || (s.select_multiple_modifier !== false && e && e[s.select_multiple_modifier + "Key"])),
933
+ is_selected = this.is_selected(obj),
934
+ proceed = true;
935
+ if(check) {
936
+ if(s.disable_selecting_children && is_multiple && obj.parents("li", this.get_container()).children(".jstree-clicked").length) {
937
+ return false;
938
+ }
939
+ proceed = false;
940
+ switch(!0) {
941
+ case (is_selected && !is_multiple):
942
+ this.deselect_all();
943
+ is_selected = false;
944
+ proceed = true;
945
+ break;
946
+ case (!is_selected && !is_multiple):
947
+ if(s.select_limit == -1 || s.select_limit > 0) {
948
+ this.deselect_all();
949
+ proceed = true;
950
+ }
951
+ break;
952
+ case (is_selected && is_multiple):
953
+ this.deselect_node(obj);
954
+ break;
955
+ case (!is_selected && is_multiple):
956
+ if(s.select_limit == -1 || this.data.ui.selected.length + 1 <= s.select_limit) {
957
+ proceed = true;
958
+ }
959
+ break;
960
+ }
961
+ }
962
+ if(proceed && !is_selected) {
963
+ obj.children("a").addClass("jstree-clicked");
964
+ this.data.ui.selected = this.data.ui.selected.add(obj);
965
+ this.data.ui.last_selected = obj;
966
+ this.__callback({ "obj" : obj });
967
+ }
968
+ },
969
+ deselect_node : function (obj) {
970
+ obj = this._get_node(obj);
971
+ if(!obj.length) { return false; }
972
+ if(this.is_selected(obj)) {
973
+ obj.children("a").removeClass("jstree-clicked");
974
+ this.data.ui.selected = this.data.ui.selected.not(obj);
975
+ if(this.data.ui.last_selected.get(0) === obj.get(0)) { this.data.ui.last_selected = this.data.ui.selected.eq(0); }
976
+ this.__callback({ "obj" : obj });
977
+ }
978
+ },
979
+ toggle_select : function (obj) {
980
+ obj = this._get_node(obj);
981
+ if(!obj.length) { return false; }
982
+ if(this.is_selected(obj)) { this.deselect_node(obj); }
983
+ else { this.select_node(obj); }
984
+ },
985
+ is_selected : function (obj) { return this.data.ui.selected.index(this._get_node(obj)) >= 0; },
986
+ get_selected : function (context) {
987
+ return context ? $(context).find(".jstree-clicked").parent() : this.data.ui.selected;
988
+ },
989
+ deselect_all : function (context) {
990
+ if(context) { $(context).find(".jstree-clicked").removeClass("jstree-clicked"); }
991
+ else { this.get_container().find(".jstree-clicked").removeClass("jstree-clicked"); }
992
+ this.data.ui.selected = $([]);
993
+ this.data.ui.last_selected = false;
994
+ this.__callback();
995
+ }
996
+ }
997
+ });
998
+ // include the selection plugin by default
999
+ $.jstree.defaults.plugins.push("ui");
1000
+ })(jQuery);
1001
+ //*/
1002
+
1003
+ /*
1004
+ * jsTree CRRM plugin 1.0
1005
+ * Handles creating/renaming/removing/moving nodes by user interaction.
1006
+ */
1007
+ (function ($) {
1008
+ $.jstree.plugin("crrm", {
1009
+ __init : function () {
1010
+ this.get_container()
1011
+ .bind("move_node.jstree", $.proxy(function (e, data) {
1012
+ if(this._get_settings().crrm.move.open_onmove) {
1013
+ var t = this;
1014
+ data.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function () {
1015
+ t.open_node(this, false, true);
1016
+ });
1017
+ }
1018
+ }, this));
1019
+ },
1020
+ defaults : {
1021
+ input_width_limit : 200,
1022
+ move : {
1023
+ always_copy : false, // false, true or "multitree"
1024
+ open_onmove : true,
1025
+ default_position : "last",
1026
+ check_move : function (m) { return true; }
1027
+ }
1028
+ },
1029
+ _fn : {
1030
+ _show_input : function (obj, callback) {
1031
+ obj = this._get_node(obj);
1032
+ var rtl = this._get_settings().core.rtl,
1033
+ w = this._get_settings().crrm.input_width_limit,
1034
+ w1 = obj.children("ins").width(),
1035
+ w2 = obj.find("> a:visible > ins").width() * obj.find("> a:visible > ins").length,
1036
+ t = this.get_text(obj),
1037
+ h1 = $("<div>", { css : { "position" : "absolute", "top" : "-200px", "left" : (rtl ? "0px" : "-1000px"), "visibility" : "hidden" } }).appendTo("body"),
1038
+ h2 = obj.css("position","relative").append(
1039
+ $("<input>", {
1040
+ "value" : t,
1041
+ // "size" : t.length,
1042
+ "css" : {
1043
+ "padding" : "0",
1044
+ "border" : "1px solid silver",
1045
+ "position" : "absolute",
1046
+ "left" : (rtl ? "auto" : (w1 + w2 + 4) + "px"),
1047
+ "right" : (rtl ? (w1 + w2 + 4) + "px" : "auto"),
1048
+ "top" : "0px",
1049
+ "height" : (this.data.core.li_height - 2) + "px",
1050
+ "lineHeight" : (this.data.core.li_height - 2) + "px",
1051
+ "width" : "150px" // will be set a bit further down
1052
+ },
1053
+ "blur" : $.proxy(function () {
1054
+ var i = obj.children("input"),
1055
+ v = i.val();
1056
+ if(v === "") { v = t; }
1057
+ i.remove(); // rollback purposes
1058
+ this.set_text(obj,t); // rollback purposes
1059
+ this.rename_node(obj, v);
1060
+ callback.call(this, obj, v, t);
1061
+ obj.css("position","");
1062
+ }, this),
1063
+ "keyup" : function (event) {
1064
+ var key = event.keyCode || event.which;
1065
+ if(key == 27) { this.value = t; this.blur(); return; }
1066
+ else if(key == 13) { this.blur(); return; }
1067
+ else {
1068
+ h2.width(Math.min(h1.text("pW" + this.value).width(),w));
1069
+ }
1070
+ }
1071
+ })
1072
+ ).children("input");
1073
+ this.set_text(obj, "");
1074
+ h1.css({
1075
+ fontFamily : h2.css('fontFamily') || '',
1076
+ fontSize : h2.css('fontSize') || '',
1077
+ fontWeight : h2.css('fontWeight') || '',
1078
+ fontStyle : h2.css('fontStyle') || '',
1079
+ fontStretch : h2.css('fontStretch') || '',
1080
+ fontVariant : h2.css('fontVariant') || '',
1081
+ letterSpacing : h2.css('letterSpacing') || '',
1082
+ wordSpacing : h2.css('wordSpacing') || ''
1083
+ });
1084
+ h2.width(Math.min(h1.text("pW" + h2[0].value).width(),w))[0].select();
1085
+ },
1086
+ rename : function (obj) {
1087
+ obj = this._get_node(obj);
1088
+ this.__rollback();
1089
+ var f = this.__callback;
1090
+ this._show_input(obj, function (obj, new_name, old_name) {
1091
+ f.call(this, { "obj" : obj, "new_name" : new_name, "old_name" : old_name });
1092
+ });
1093
+ },
1094
+ create : function (obj, position, js, callback, skip_rename) {
1095
+ var t, _this = this;
1096
+ obj = this._get_node(obj);
1097
+ if(!obj) { obj = -1; }
1098
+ this.__rollback();
1099
+ t = this.create_node(obj, position, js, function (t) {
1100
+ var p = this._get_parent(t),
1101
+ pos = $(t).index();
1102
+ if(callback) { callback.call(this, t); }
1103
+ if(p.length && p.hasClass("jstree-closed")) { this.open_node(p, false, true); }
1104
+ if(!skip_rename) {
1105
+ this._show_input(t, function (obj, new_name, old_name) {
1106
+ _this.__callback({ "obj" : obj, "name" : new_name, "parent" : p, "position" : pos });
1107
+ });
1108
+ }
1109
+ else { _this.__callback({ "obj" : t, "name" : this.get_text(t), "parent" : p, "position" : pos }); }
1110
+ });
1111
+ return t;
1112
+ },
1113
+ remove : function (obj) {
1114
+ obj = this._get_node(obj, true);
1115
+ this.__rollback();
1116
+ this.delete_node(obj);
1117
+ this.__callback({ "obj" : obj });
1118
+ },
1119
+ check_move : function () {
1120
+ if(!this.__call_old()) { return false; }
1121
+ var s = this._get_settings().crrm.move;
1122
+ if(!s.check_move.call(this, this._get_move())) { return false; }
1123
+ return true;
1124
+ },
1125
+ move_node : function (obj, ref, position, is_copy, is_prepared, skip_check) {
1126
+ var s = this._get_settings().crrm.move;
1127
+ if(!is_prepared) {
1128
+ if(!position) { position = s.default_position; }
1129
+ if(position === "inside" && !s.default_position.match(/^(before|after)$/)) { position = s.default_position; }
1130
+ return this.__call_old(true, obj, ref, position, is_copy, false, skip_check);
1131
+ }
1132
+ // if the move is already prepared
1133
+ if(s.always_copy === true || (s.always_copy === "multitree" && obj.rt.get_index() !== obj.ot.get_index() )) {
1134
+ is_copy = true;
1135
+ }
1136
+ this.__call_old(true, obj, ref, position, is_copy, true, skip_check);
1137
+ },
1138
+
1139
+ cut : function (obj) {
1140
+ obj = this._get_node(obj);
1141
+ this.data.crrm.cp_nodes = false;
1142
+ this.data.crrm.ct_nodes = false;
1143
+ if(!obj || !obj.length) { return false; }
1144
+ this.data.crrm.ct_nodes = obj;
1145
+ },
1146
+ copy : function (obj) {
1147
+ obj = this._get_node(obj);
1148
+ this.data.crrm.cp_nodes = false;
1149
+ this.data.crrm.ct_nodes = false;
1150
+ if(!obj || !obj.length) { return false; }
1151
+ this.data.crrm.cp_nodes = obj;
1152
+ },
1153
+ paste : function (obj) {
1154
+ obj = this._get_node(obj);
1155
+ if(!obj || !obj.length) { return false; }
1156
+ if(!this.data.crrm.ct_nodes && !this.data.crrm.cp_nodes) { return false; }
1157
+ if(this.data.crrm.ct_nodes) { this.move_node(this.data.crrm.ct_nodes, obj); }
1158
+ if(this.data.crrm.cp_nodes) { this.move_node(this.data.crrm.cp_nodes, obj, false, true); }
1159
+ this.data.crrm.cp_nodes = false;
1160
+ this.data.crrm.ct_nodes = false;
1161
+ }
1162
+ }
1163
+ });
1164
+ // include the crr plugin by default
1165
+ $.jstree.defaults.plugins.push("crrm");
1166
+ })(jQuery);
1167
+
1168
+ /*
1169
+ * jsTree themes plugin 1.0
1170
+ * Handles loading and setting themes, as well as detecting path to themes, etc.
1171
+ */
1172
+ (function ($) {
1173
+ var themes_loaded = [];
1174
+ // this variable stores the path to the themes folder - if left as false - it will be autodetected
1175
+ $.jstree._themes = false;
1176
+ $.jstree.plugin("themes", {
1177
+ __init : function () {
1178
+ this.get_container()
1179
+ .bind("init.jstree", $.proxy(function () {
1180
+ var s = this._get_settings().themes;
1181
+ this.data.themes.dots = s.dots;
1182
+ this.data.themes.icons = s.icons;
1183
+ //alert(s.dots);
1184
+ this.set_theme(s.theme, s.url);
1185
+ }, this))
1186
+ .bind("loaded.jstree", $.proxy(function () {
1187
+ // bound here too, as simple HTML tree's won't honor dots & icons otherwise
1188
+ if(!this.data.themes.dots) { this.hide_dots(); }
1189
+ else { this.show_dots(); }
1190
+ if(!this.data.themes.icons) { this.hide_icons(); }
1191
+ else { this.show_icons(); }
1192
+ }, this));
1193
+ },
1194
+ defaults : {
1195
+ theme : "default",
1196
+ url : false,
1197
+ dots : true,
1198
+ icons : true
1199
+ },
1200
+ _fn : {
1201
+ set_theme : function (theme_name, theme_url) {
1202
+ if(!theme_name) { return false; }
1203
+ if(!theme_url) { theme_url = $.jstree._themes + theme_name + '/style.css'; }
1204
+ if($.inArray(theme_url, themes_loaded) == -1) {
1205
+ $.vakata.css.add_sheet({ "url" : theme_url, "rel" : "jstree" });
1206
+ themes_loaded.push(theme_url);
1207
+ }
1208
+ if(this.data.themes.theme != theme_name) {
1209
+ this.get_container().removeClass('jstree-' + this.data.themes.theme);
1210
+ this.data.themes.theme = theme_name;
1211
+ }
1212
+ this.get_container().addClass('jstree-' + theme_name);
1213
+ if(!this.data.themes.dots) { this.hide_dots(); }
1214
+ else { this.show_dots(); }
1215
+ if(!this.data.themes.icons) { this.hide_icons(); }
1216
+ else { this.show_icons(); }
1217
+ this.__callback();
1218
+ },
1219
+ get_theme : function () { return this.data.themes.theme; },
1220
+
1221
+ show_dots : function () { this.data.themes.dots = true; this.get_container().children("ul").removeClass("jstree-no-dots"); },
1222
+ hide_dots : function () { this.data.themes.dots = false; this.get_container().children("ul").addClass("jstree-no-dots"); },
1223
+ toggle_dots : function () { if(this.data.themes.dots) { this.hide_dots(); } else { this.show_dots(); } },
1224
+
1225
+ show_icons : function () { this.data.themes.icons = true; this.get_container().children("ul").removeClass("jstree-no-icons"); },
1226
+ hide_icons : function () { this.data.themes.icons = false; this.get_container().children("ul").addClass("jstree-no-icons"); },
1227
+ toggle_icons: function () { if(this.data.themes.icons) { this.hide_icons(); } else { this.show_icons(); } }
1228
+ }
1229
+ });
1230
+ // autodetect themes path
1231
+ $(function () {
1232
+ if($.jstree._themes === false) {
1233
+ $("script").each(function () {
1234
+ if(this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)) {
1235
+ $.jstree._themes = this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/, "") + 'themes/';
1236
+ return false;
1237
+ }
1238
+ });
1239
+ }
1240
+ if($.jstree._themes === false) { $.jstree._themes = "themes/"; }
1241
+ });
1242
+ // include the themes plugin by default
1243
+ $.jstree.defaults.plugins.push("themes");
1244
+ })(jQuery);
1245
+ //*/
1246
+
1247
+ /*
1248
+ * jsTree hotkeys plugin 1.0
1249
+ * Enables keyboard navigation for all tree instances
1250
+ * Depends on the jstree ui & jquery hotkeys plugins
1251
+ */
1252
+ (function ($) {
1253
+ var bound = [];
1254
+ function exec(i, event) {
1255
+ var f = $.jstree._focused(), tmp;
1256
+ if(f && f.data && f.data.hotkeys && f.data.hotkeys.enabled) {
1257
+ tmp = f._get_settings().hotkeys[i];
1258
+ if(tmp) { return tmp.call(f, event); }
1259
+ }
1260
+ }
1261
+ $.jstree.plugin("hotkeys", {
1262
+ __init : function () {
1263
+ if(typeof $.hotkeys === "undefined") { throw "jsTree hotkeys: jQuery hotkeys plugin not included."; }
1264
+ if(!this.data.ui) { throw "jsTree hotkeys: jsTree UI plugin not included."; }
1265
+ $.each(this._get_settings().hotkeys, function (i, val) {
1266
+ if($.inArray(i, bound) == -1) {
1267
+ $(document).bind("keydown", i, function (event) { return exec(i, event); });
1268
+ bound.push(i);
1269
+ }
1270
+ });
1271
+ this.enable_hotkeys();
1272
+ },
1273
+ defaults : {
1274
+ "up" : function () {
1275
+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
1276
+ this.hover_node(this._get_prev(o));
1277
+ return false;
1278
+ },
1279
+ "down" : function () {
1280
+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
1281
+ this.hover_node(this._get_next(o));
1282
+ return false;
1283
+ },
1284
+ "left" : function () {
1285
+ var o = this.data.ui.hovered || this.data.ui.last_selected;
1286
+ if(o) {
1287
+ if(o.hasClass("jstree-open")) { this.close_node(o); }
1288
+ else { this.hover_node(this._get_prev(o)); }
1289
+ }
1290
+ return false;
1291
+ },
1292
+ "right" : function () {
1293
+ var o = this.data.ui.hovered || this.data.ui.last_selected;
1294
+ if(o && o.length) {
1295
+ if(o.hasClass("jstree-closed")) { this.open_node(o); }
1296
+ else { this.hover_node(this._get_next(o)); }
1297
+ }
1298
+ return false;
1299
+ },
1300
+ "space" : function () {
1301
+ if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").click(); }
1302
+ return false;
1303
+ },
1304
+ "ctrl+space" : function (event) {
1305
+ event.type = "click";
1306
+ if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").trigger(event); }
1307
+ return false;
1308
+ },
1309
+ "f2" : function () { this.rename(this.data.ui.hovered || this.data.ui.last_selected); },
1310
+ "del" : function () { this.remove(this.data.ui.hovered || this._get_node(null)); }
1311
+ },
1312
+ _fn : {
1313
+ enable_hotkeys : function () {
1314
+ this.data.hotkeys.enabled = true;
1315
+ },
1316
+ disable_hotkeys : function () {
1317
+ this.data.hotkeys.enabled = false;
1318
+ }
1319
+ }
1320
+ });
1321
+ })(jQuery);
1322
+ //*/
1323
+
1324
+ /*
1325
+ * jsTree JSON 1.0
1326
+ * The JSON data store. Datastores are build by overriding the `load_node` and `_is_loaded` functions.
1327
+ */
1328
+ (function ($) {
1329
+ $.jstree.plugin("json_data", {
1330
+ defaults : {
1331
+ data : false,
1332
+ ajax : false,
1333
+ correct_state : true,
1334
+ progressive_render : false
1335
+ },
1336
+ _fn : {
1337
+ load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_json(obj, function () { _this.__callback({ "obj" : obj }); s_call.call(this); }, e_call); },
1338
+ _is_loaded : function (obj) {
1339
+ var s = this._get_settings().json_data, d;
1340
+ obj = this._get_node(obj);
1341
+ if(obj && obj !== -1 && s.progressive_render && !obj.is(".jstree-open, .jstree-leaf") && obj.children("ul").children("li").length === 0 && obj.data("jstree-children")) {
1342
+ d = this._parse_json(obj.data("jstree-children"));
1343
+ if(d) {
1344
+ obj.append(d);
1345
+ $.removeData(obj, "jstree-children");
1346
+ }
1347
+ this.clean_node(obj);
1348
+ return true;
1349
+ }
1350
+ return obj == -1 || !obj || !s.ajax || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0;
1351
+ },
1352
+ load_node_json : function (obj, s_call, e_call) {
1353
+ var s = this.get_settings().json_data, d,
1354
+ error_func = function () {},
1355
+ success_func = function () {};
1356
+ obj = this._get_node(obj);
1357
+ if(obj && obj !== -1) {
1358
+ if(obj.data("jstree-is-loading")) { return; }
1359
+ else { obj.data("jstree-is-loading",true); }
1360
+ }
1361
+ switch(!0) {
1362
+ case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied.";
1363
+ case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
1364
+ if(!obj || obj == -1) {
1365
+ d = this._parse_json(s.data);
1366
+ if(d) {
1367
+ this.get_container().children("ul").empty().append(d.children());
1368
+ this.clean_node();
1369
+ }
1370
+ else {
1371
+ if(s.correct_state) { this.get_container().children("ul").empty(); }
1372
+ }
1373
+ }
1374
+ if(s_call) { s_call.call(this); }
1375
+ break;
1376
+ case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
1377
+ error_func = function (x, t, e) {
1378
+ var ef = this.get_settings().json_data.ajax.error;
1379
+ if(ef) { ef.call(this, x, t, e); }
1380
+ if(obj != -1 && obj.length) {
1381
+ obj.children(".jstree-loading").removeClass("jstree-loading");
1382
+ obj.data("jstree-is-loading",false);
1383
+ if(t === "success" && s.correct_state) { obj.removeClass("jstree-open jstree-closed").addClass("jstree-leaf"); }
1384
+ }
1385
+ else {
1386
+ if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); }
1387
+ }
1388
+ if(e_call) { e_call.call(this); }
1389
+ };
1390
+ success_func = function (d, t, x) {
1391
+ var sf = this.get_settings().json_data.ajax.success;
1392
+ if(sf) { d = sf.call(this,d,t,x) || d; }
1393
+ if(d === "" || (!$.isArray(d) && !$.isPlainObject(d))) {
1394
+ return error_func.call(this, x, t, "");
1395
+ }
1396
+ d = this._parse_json(d);
1397
+ if(d) {
1398
+ if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); }
1399
+ else { obj.append(d).children(".jstree-loading").removeClass("jstree-loading"); obj.data("jstree-is-loading",false); }
1400
+ this.clean_node(obj);
1401
+ if(s_call) { s_call.call(this); }
1402
+ }
1403
+ else {
1404
+ if(obj === -1 || !obj) {
1405
+ if(s.correct_state) {
1406
+ this.get_container().children("ul").empty();
1407
+ if(s_call) { s_call.call(this); }
1408
+ }
1409
+ }
1410
+ else {
1411
+ obj.children(".jstree-loading").removeClass("jstree-loading");
1412
+ obj.data("jstree-is-loading",false);
1413
+ if(s.correct_state) {
1414
+ obj.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");
1415
+ if(s_call) { s_call.call(this); }
1416
+ }
1417
+ }
1418
+ }
1419
+ };
1420
+ s.ajax.context = this;
1421
+ s.ajax.error = error_func;
1422
+ s.ajax.success = success_func;
1423
+ if(!s.ajax.dataType) { s.ajax.dataType = "json"; }
1424
+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); }
1425
+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); }
1426
+ $.ajax(s.ajax);
1427
+ break;
1428
+ }
1429
+ },
1430
+ _parse_json : function (js, is_callback) {
1431
+ var d = false,
1432
+ p = this._get_settings(),
1433
+ s = p.json_data,
1434
+ t = p.core.html_titles,
1435
+ tmp, i, j, ul1, ul2;
1436
+
1437
+ if(!js) { return d; }
1438
+ if($.isFunction(js)) {
1439
+ js = js.call(this);
1440
+ }
1441
+ if($.isArray(js)) {
1442
+ d = $();
1443
+ if(!js.length) { return false; }
1444
+ for(i = 0, j = js.length; i < j; i++) {
1445
+ tmp = this._parse_json(js[i], true);
1446
+ if(tmp.length) { d = d.add(tmp); }
1447
+ }
1448
+ }
1449
+ else {
1450
+ if(typeof js == "string") { js = { data : js }; }
1451
+ if(!js.data && js.data !== "") { return d; }
1452
+ d = $("<li>");
1453
+ if(js.attr) { d.attr(js.attr); }
1454
+ if(js.metadata) { d.data("jstree", js.metadata); }
1455
+ if(js.state) { d.addClass("jstree-" + js.state); }
1456
+ if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); }
1457
+ $.each(js.data, function (i, m) {
1458
+ tmp = $("<a>");
1459
+ if($.isFunction(m)) { m = m.call(this, js); }
1460
+ if(typeof m == "string") { tmp.attr('href','#')[ t ? "html" : "text" ](m); }
1461
+ else {
1462
+ if(!m.attr) { m.attr = {}; }
1463
+ if(!m.attr.href) { m.attr.href = '#'; }
1464
+ tmp.attr(m.attr)[ t ? "html" : "text" ](m.title);
1465
+ if(m.language) { tmp.addClass(m.language); }
1466
+ }
1467
+ tmp.prepend("<ins class='jstree-icon'>&#160;</ins>");
1468
+ if(!m.icon && js.icon) { m.icon = js.icon; }
1469
+ if(m.icon) {
1470
+ if(m.icon.indexOf("/") === -1) { tmp.children("ins").addClass(m.icon); }
1471
+ else { tmp.children("ins").css("background","url('" + m.icon + "') center center no-repeat"); }
1472
+ }
1473
+ d.append(tmp);
1474
+ });
1475
+ d.prepend("<ins class='jstree-icon'>&#160;</ins>");
1476
+ if(js.children) {
1477
+ if(s.progressive_render && js.state !== "open") {
1478
+ d.addClass("jstree-closed").data("jstree-children", js.children);
1479
+ }
1480
+ else {
1481
+ if($.isFunction(js.children)) {
1482
+ js.children = js.children.call(this, js);
1483
+ }
1484
+ if($.isArray(js.children) && js.children.length) {
1485
+ tmp = this._parse_json(js.children, true);
1486
+ if(tmp.length) {
1487
+ ul2 = $("<ul>");
1488
+ ul2.append(tmp);
1489
+ d.append(ul2);
1490
+ }
1491
+ }
1492
+ }
1493
+ }
1494
+ }
1495
+ if(!is_callback) {
1496
+ ul1 = $("<ul>");
1497
+ ul1.append(d);
1498
+ d = ul1;
1499
+ }
1500
+ return d;
1501
+ },
1502
+ get_json : function (obj, li_attr, a_attr, is_callback) {
1503
+ var result = [],
1504
+ s = this._get_settings(),
1505
+ _this = this,
1506
+ tmp1, tmp2, li, a, t, lang;
1507
+ obj = this._get_node(obj);
1508
+ if(!obj || obj === -1) { obj = this.get_container().find("> ul > li"); }
1509
+ li_attr = $.isArray(li_attr) ? li_attr : [ "id", "class" ];
1510
+ if(!is_callback && this.data.types) { li_attr.push(s.types.type_attr); }
1511
+ a_attr = $.isArray(a_attr) ? a_attr : [ ];
1512
+
1513
+ obj.each(function () {
1514
+ li = $(this);
1515
+ tmp1 = { data : [] };
1516
+ if(li_attr.length) { tmp1.attr = { }; }
1517
+ $.each(li_attr, function (i, v) {
1518
+ tmp2 = li.attr(v);
1519
+ if(tmp2 && tmp2.length && tmp2.replace(/jstree[^ ]*|$/ig,'').length) {
1520
+ tmp1.attr[v] = tmp2.replace(/jstree[^ ]*|$/ig,'');
1521
+ }
1522
+ });
1523
+ if(li.hasClass("jstree-open")) { tmp1.state = "open"; }
1524
+ if(li.hasClass("jstree-closed")) { tmp1.state = "closed"; }
1525
+ a = li.children("a");
1526
+ a.each(function () {
1527
+ t = $(this);
1528
+ if(
1529
+ a_attr.length ||
1530
+ $.inArray("languages", s.plugins) !== -1 ||
1531
+ t.children("ins").get(0).style.backgroundImage.length ||
1532
+ (t.children("ins").get(0).className && t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').length)
1533
+ ) {
1534
+ lang = false;
1535
+ if($.inArray("languages", s.plugins) !== -1 && $.isArray(s.languages) && s.languages.length) {
1536
+ $.each(s.languages, function (l, lv) {
1537
+ if(t.hasClass(lv)) {
1538
+ lang = lv;
1539
+ return false;
1540
+ }
1541
+ });
1542
+ }
1543
+ tmp2 = { attr : { }, title : _this.get_text(t, lang) };
1544
+ $.each(a_attr, function (k, z) {
1545
+ tmp1.attr[z] = (t.attr(z) || "").replace(/jstree[^ ]*|$/ig,'');
1546
+ });
1547
+ $.each(s.languages, function (k, z) {
1548
+ if(t.hasClass(z)) { tmp2.language = z; return true; }
1549
+ });
1550
+ if(t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length) {
1551
+ tmp2.icon = t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"");
1552
+ }
1553
+ if(t.children("ins").get(0).style.backgroundImage.length) {
1554
+ tmp2.icon = t.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","");
1555
+ }
1556
+ }
1557
+ else {
1558
+ tmp2 = _this.get_text(t);
1559
+ }
1560
+ if(a.length > 1) { tmp1.data.push(tmp2); }
1561
+ else { tmp1.data = tmp2; }
1562
+ });
1563
+ li = li.find("> ul > li");
1564
+ if(li.length) { tmp1.children = _this.get_json(li, li_attr, a_attr, true); }
1565
+ result.push(tmp1);
1566
+ });
1567
+ return result;
1568
+ }
1569
+ }
1570
+ });
1571
+ })(jQuery);
1572
+ //*/
1573
+
1574
+ /*
1575
+ * jsTree languages plugin 1.0
1576
+ * Adds support for multiple language versions in one tree
1577
+ * This basically allows for many titles coexisting in one node, but only one of them being visible at any given time
1578
+ * This is useful for maintaining the same structure in many languages (hence the name of the plugin)
1579
+ */
1580
+ (function ($) {
1581
+ $.jstree.plugin("languages", {
1582
+ __init : function () { this._load_css(); },
1583
+ defaults : [],
1584
+ _fn : {
1585
+ set_lang : function (i) {
1586
+ var langs = this._get_settings().languages,
1587
+ st = false,
1588
+ selector = ".jstree-" + this.get_index() + ' a';
1589
+ if(!$.isArray(langs) || langs.length === 0) { return false; }
1590
+ if($.inArray(i,langs) == -1) {
1591
+ if(!!langs[i]) { i = langs[i]; }
1592
+ else { return false; }
1593
+ }
1594
+ if(i == this.data.languages.current_language) { return true; }
1595
+ st = $.vakata.css.get_css(selector + "." + this.data.languages.current_language, false, this.data.languages.language_css);
1596
+ if(st !== false) { st.style.display = "none"; }
1597
+ st = $.vakata.css.get_css(selector + "." + i, false, this.data.languages.language_css);
1598
+ if(st !== false) { st.style.display = ""; }
1599
+ this.data.languages.current_language = i;
1600
+ this.__callback(i);
1601
+ return true;
1602
+ },
1603
+ get_lang : function () {
1604
+ return this.data.languages.current_language;
1605
+ },
1606
+ get_text : function (obj, lang) {
1607
+ obj = this._get_node(obj) || this.data.ui.last_selected;
1608
+ if(!obj.size()) { return false; }
1609
+ var langs = this._get_settings().languages,
1610
+ s = this._get_settings().core.html_titles;
1611
+ if($.isArray(langs) && langs.length) {
1612
+ lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
1613
+ obj = obj.children("a." + lang);
1614
+ }
1615
+ else { obj = obj.children("a:eq(0)"); }
1616
+ if(s) {
1617
+ obj = obj.clone();
1618
+ obj.children("INS").remove();
1619
+ return obj.html();
1620
+ }
1621
+ else {
1622
+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
1623
+ return obj.nodeValue;
1624
+ }
1625
+ },
1626
+ set_text : function (obj, val, lang) {
1627
+ obj = this._get_node(obj) || this.data.ui.last_selected;
1628
+ if(!obj.size()) { return false; }
1629
+ var langs = this._get_settings().languages,
1630
+ s = this._get_settings().core.html_titles,
1631
+ tmp;
1632
+ if($.isArray(langs) && langs.length) {
1633
+ lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
1634
+ obj = obj.children("a." + lang);
1635
+ }
1636
+ else { obj = obj.children("a:eq(0)"); }
1637
+ if(s) {
1638
+ tmp = obj.children("INS").clone();
1639
+ obj.html(val).prepend(tmp);
1640
+ this.__callback({ "obj" : obj, "name" : val, "lang" : lang });
1641
+ return true;
1642
+ }
1643
+ else {
1644
+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
1645
+ this.__callback({ "obj" : obj, "name" : val, "lang" : lang });
1646
+ return (obj.nodeValue = val);
1647
+ }
1648
+ },
1649
+ _load_css : function () {
1650
+ var langs = this._get_settings().languages,
1651
+ str = "/* languages css */",
1652
+ selector = ".jstree-" + this.get_index() + ' a',
1653
+ ln;
1654
+ if($.isArray(langs) && langs.length) {
1655
+ this.data.languages.current_language = langs[0];
1656
+ for(ln = 0; ln < langs.length; ln++) {
1657
+ str += selector + "." + langs[ln] + " {";
1658
+ if(langs[ln] != this.data.languages.current_language) { str += " display:none; "; }
1659
+ str += " } ";
1660
+ }
1661
+ this.data.languages.language_css = $.vakata.css.add_sheet({ 'str' : str });
1662
+ }
1663
+ },
1664
+ create_node : function (obj, position, js, callback) {
1665
+ var t = this.__call_old(true, obj, position, js, function (t) {
1666
+ var langs = this._get_settings().languages,
1667
+ a = t.children("a"),
1668
+ ln;
1669
+ if($.isArray(langs) && langs.length) {
1670
+ for(ln = 0; ln < langs.length; ln++) {
1671
+ if(!a.is("." + langs[ln])) {
1672
+ t.append(a.eq(0).clone().removeClass(langs.join(" ")).addClass(langs[ln]));
1673
+ }
1674
+ }
1675
+ a.not("." + langs.join(", .")).remove();
1676
+ }
1677
+ if(callback) { callback.call(this, t); }
1678
+ });
1679
+ return t;
1680
+ }
1681
+ }
1682
+ });
1683
+ })(jQuery);
1684
+ //*/
1685
+
1686
+ /*
1687
+ * jsTree cookies plugin 1.0
1688
+ * Stores the currently opened/selected nodes in a cookie and then restores them
1689
+ * Depends on the jquery.cookie plugin
1690
+ */
1691
+ (function ($) {
1692
+ $.jstree.plugin("cookies", {
1693
+ __init : function () {
1694
+ if(typeof $.cookie === "undefined") { throw "jsTree cookie: jQuery cookie plugin not included."; }
1695
+
1696
+ var s = this._get_settings().cookies,
1697
+ tmp;
1698
+ if(!!s.save_opened) {
1699
+ tmp = $.cookie(s.save_opened);
1700
+ if(tmp && tmp.length) { this.data.core.to_open = tmp.split(","); }
1701
+ }
1702
+ if(!!s.save_selected) {
1703
+ tmp = $.cookie(s.save_selected);
1704
+ if(tmp && tmp.length && this.data.ui) { this.data.ui.to_select = tmp.split(","); }
1705
+ }
1706
+ this.get_container()
1707
+ .one( ( this.data.ui ? "reselect" : "reopen" ) + ".jstree", $.proxy(function () {
1708
+ this.get_container()
1709
+ .bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree", $.proxy(function (e) {
1710
+ if(this._get_settings().cookies.auto_save) { this.save_cookie((e.handleObj.namespace + e.handleObj.type).replace("jstree","")); }
1711
+ }, this));
1712
+ }, this));
1713
+ },
1714
+ defaults : {
1715
+ save_opened : "jstree_open",
1716
+ save_selected : "jstree_select",
1717
+ auto_save : true,
1718
+ cookie_options : {}
1719
+ },
1720
+ _fn : {
1721
+ save_cookie : function (c) {
1722
+ if(this.data.core.refreshing) { return; }
1723
+ var s = this._get_settings().cookies;
1724
+ if(!c) { // if called manually and not by event
1725
+ if(s.save_opened) {
1726
+ this.save_opened();
1727
+ $.cookie(s.save_opened, this.data.core.to_open.join(","), s.cookie_options);
1728
+ }
1729
+ if(s.save_selected && this.data.ui) {
1730
+ this.save_selected();
1731
+ $.cookie(s.save_selected, this.data.ui.to_select.join(","), s.cookie_options);
1732
+ }
1733
+ return;
1734
+ }
1735
+ switch(c) {
1736
+ case "open_node":
1737
+ case "close_node":
1738
+ if(!!s.save_opened) {
1739
+ this.save_opened();
1740
+ $.cookie(s.save_opened, this.data.core.to_open.join(","), s.cookie_options);
1741
+ }
1742
+ break;
1743
+ case "select_node":
1744
+ case "deselect_node":
1745
+ if(!!s.save_selected && this.data.ui) {
1746
+ this.save_selected();
1747
+ $.cookie(s.save_selected, this.data.ui.to_select.join(","), s.cookie_options);
1748
+ }
1749
+ break;
1750
+ }
1751
+ }
1752
+ }
1753
+ });
1754
+ // include cookies by default
1755
+ $.jstree.defaults.plugins.push("cookies");
1756
+ })(jQuery);
1757
+ //*/
1758
+
1759
+ /*
1760
+ * jsTree sort plugin 1.0
1761
+ * Sorts items alphabetically (or using any other function)
1762
+ */
1763
+ (function ($) {
1764
+ $.jstree.plugin("sort", {
1765
+ __init : function () {
1766
+ this.get_container()
1767
+ .bind("load_node.jstree", $.proxy(function (e, data) {
1768
+ var obj = this._get_node(data.rslt.obj);
1769
+ obj = obj === -1 ? this.get_container().children("ul") : obj.children("ul");
1770
+ this.sort(obj);
1771
+ }, this))
1772
+ .bind("rename_node.jstree", $.proxy(function (e, data) {
1773
+ this.sort(data.rslt.obj.parent());
1774
+ }, this))
1775
+ .bind("move_node.jstree", $.proxy(function (e, data) {
1776
+ var m = data.rslt.np == -1 ? this.get_container() : data.rslt.np;
1777
+ this.sort(m.children("ul"));
1778
+ }, this));
1779
+ },
1780
+ defaults : function (a, b) { return this.get_text(a) > this.get_text(b) ? 1 : -1; },
1781
+ _fn : {
1782
+ sort : function (obj) {
1783
+ var s = this._get_settings().sort,
1784
+ t = this;
1785
+ obj.append($.makeArray(obj.children("li")).sort($.proxy(s, t)));
1786
+ obj.find("> li > ul").each(function() { t.sort($(this)); });
1787
+ this.clean_node(obj);
1788
+ }
1789
+ }
1790
+ });
1791
+ })(jQuery);
1792
+ //*/
1793
+
1794
+ /*
1795
+ * jsTree DND plugin 1.0
1796
+ * Drag and drop plugin for moving/copying nodes
1797
+ */
1798
+ (function ($) {
1799
+ var o = false,
1800
+ r = false,
1801
+ m = false,
1802
+ sli = false,
1803
+ sti = false,
1804
+ dir1 = false,
1805
+ dir2 = false;
1806
+ $.vakata.dnd = {
1807
+ is_down : false,
1808
+ is_drag : false,
1809
+ helper : false,
1810
+ scroll_spd : 10,
1811
+ init_x : 0,
1812
+ init_y : 0,
1813
+ threshold : 5,
1814
+ user_data : {},
1815
+
1816
+ drag_start : function (e, data, html) {
1817
+ if($.vakata.dnd.is_drag) { $.vakata.drag_stop({}); }
1818
+ try {
1819
+ e.currentTarget.unselectable = "on";
1820
+ e.currentTarget.onselectstart = function() { return false; };
1821
+ if(e.currentTarget.style) { e.currentTarget.style.MozUserSelect = "none"; }
1822
+ } catch(err) { }
1823
+ $.vakata.dnd.init_x = e.pageX;
1824
+ $.vakata.dnd.init_y = e.pageY;
1825
+ $.vakata.dnd.user_data = data;
1826
+ $.vakata.dnd.is_down = true;
1827
+ $.vakata.dnd.helper = $("<div id='vakata-dragged'>").html(html).css("opacity", "0.75");
1828
+ $(document).bind("mousemove", $.vakata.dnd.drag);
1829
+ $(document).bind("mouseup", $.vakata.dnd.drag_stop);
1830
+ return false;
1831
+ },
1832
+ drag : function (e) {
1833
+ if(!$.vakata.dnd.is_down) { return; }
1834
+ if(!$.vakata.dnd.is_drag) {
1835
+ if(Math.abs(e.pageX - $.vakata.dnd.init_x) > 5 || Math.abs(e.pageY - $.vakata.dnd.init_y) > 5) {
1836
+ $.vakata.dnd.helper.appendTo("body");
1837
+ $.vakata.dnd.is_drag = true;
1838
+ $(document).triggerHandler("drag_start.vakata", { "event" : e, "data" : $.vakata.dnd.user_data });
1839
+ }
1840
+ else { return; }
1841
+ }
1842
+
1843
+ // maybe use a scrolling parent element instead of document?
1844
+ if(e.type === "mousemove") { // thought of adding scroll in order to move the helper, but mouse poisition is n/a
1845
+ var d = $(document), t = d.scrollTop(), l = d.scrollLeft();
1846
+ if(e.pageY - t < 20) {
1847
+ if(sti && dir1 === "down") { clearInterval(sti); sti = false; }
1848
+ if(!sti) { dir1 = "up"; sti = setInterval(function () { $(document).scrollTop($(document).scrollTop() - $.vakata.dnd.scroll_spd); }, 150); }
1849
+ }
1850
+ else {
1851
+ if(sti && dir1 === "up") { clearInterval(sti); sti = false; }
1852
+ }
1853
+ if($(window).height() - (e.pageY - t) < 20) {
1854
+ if(sti && dir1 === "up") { clearInterval(sti); sti = false; }
1855
+ if(!sti) { dir1 = "down"; sti = setInterval(function () { $(document).scrollTop($(document).scrollTop() + $.vakata.dnd.scroll_spd); }, 150); }
1856
+ }
1857
+ else {
1858
+ if(sti && dir1 === "down") { clearInterval(sti); sti = false; }
1859
+ }
1860
+
1861
+ if(e.pageX - l < 20) {
1862
+ if(sli && dir2 === "right") { clearInterval(sli); sli = false; }
1863
+ if(!sli) { dir2 = "left"; sli = setInterval(function () { $(document).scrollLeft($(document).scrollLeft() - $.vakata.dnd.scroll_spd); }, 150); }
1864
+ }
1865
+ else {
1866
+ if(sli && dir2 === "left") { clearInterval(sli); sli = false; }
1867
+ }
1868
+ if($(window).width() - (e.pageX - l) < 20) {
1869
+ if(sli && dir2 === "left") { clearInterval(sli); sli = false; }
1870
+ if(!sli) { dir2 = "right"; sli = setInterval(function () { $(document).scrollLeft($(document).scrollLeft() + $.vakata.dnd.scroll_spd); }, 150); }
1871
+ }
1872
+ else {
1873
+ if(sli && dir2 === "right") { clearInterval(sli); sli = false; }
1874
+ }
1875
+ }
1876
+
1877
+ $.vakata.dnd.helper.css({ left : (e.pageX + 5) + "px", top : (e.pageY + 10) + "px" });
1878
+ $(document).triggerHandler("drag.vakata", { "event" : e, "data" : $.vakata.dnd.user_data });
1879
+ },
1880
+ drag_stop : function (e) {
1881
+ $(document).unbind("mousemove", $.vakata.dnd.drag);
1882
+ $(document).unbind("mouseup", $.vakata.dnd.drag_stop);
1883
+ $(document).triggerHandler("drag_stop.vakata", { "event" : e, "data" : $.vakata.dnd.user_data });
1884
+ $.vakata.dnd.helper.remove();
1885
+ $.vakata.dnd.init_x = 0;
1886
+ $.vakata.dnd.init_y = 0;
1887
+ $.vakata.dnd.user_data = {};
1888
+ $.vakata.dnd.is_down = false;
1889
+ $.vakata.dnd.is_drag = false;
1890
+ }
1891
+ };
1892
+ $(function() {
1893
+ var css_string = '#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ';
1894
+ $.vakata.css.add_sheet({ str : css_string });
1895
+ });
1896
+
1897
+ $.jstree.plugin("dnd", {
1898
+ __init : function () {
1899
+ this.data.dnd = {
1900
+ active : false,
1901
+ after : false,
1902
+ inside : false,
1903
+ before : false,
1904
+ off : false,
1905
+ prepared : false,
1906
+ w : 0,
1907
+ to1 : false,
1908
+ to2 : false,
1909
+ cof : false,
1910
+ cw : false,
1911
+ ch : false,
1912
+ i1 : false,
1913
+ i2 : false
1914
+ };
1915
+ this.get_container()
1916
+ .bind("mouseenter.jstree", $.proxy(function () {
1917
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && this.data.themes) {
1918
+ m.attr("class", "jstree-" + this.data.themes.theme);
1919
+ $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme);
1920
+ }
1921
+ }, this))
1922
+ .bind("mouseleave.jstree", $.proxy(function () {
1923
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
1924
+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
1925
+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
1926
+ }
1927
+ }, this))
1928
+ .bind("mousemove.jstree", $.proxy(function (e) {
1929
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
1930
+ var cnt = this.get_container()[0];
1931
+
1932
+ // Horizontal scroll
1933
+ if(e.pageX + 24 > this.data.dnd.cof.left + this.data.dnd.cw) {
1934
+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
1935
+ this.data.dnd.i1 = setInterval($.proxy(function () { this.scrollLeft += $.vakata.dnd.scroll_spd; }, cnt), 100);
1936
+ }
1937
+ else if(e.pageX - 24 < this.data.dnd.cof.left) {
1938
+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
1939
+ this.data.dnd.i1 = setInterval($.proxy(function () { this.scrollLeft -= $.vakata.dnd.scroll_spd; }, cnt), 100);
1940
+ }
1941
+ else {
1942
+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
1943
+ }
1944
+
1945
+ // Vertical scroll
1946
+ if(e.pageY + 24 > this.data.dnd.cof.top + this.data.dnd.ch) {
1947
+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
1948
+ this.data.dnd.i2 = setInterval($.proxy(function () { this.scrollTop += $.vakata.dnd.scroll_spd; }, cnt), 100);
1949
+ }
1950
+ else if(e.pageY - 24 < this.data.dnd.cof.top) {
1951
+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
1952
+ this.data.dnd.i2 = setInterval($.proxy(function () { this.scrollTop -= $.vakata.dnd.scroll_spd; }, cnt), 100);
1953
+ }
1954
+ else {
1955
+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
1956
+ }
1957
+
1958
+ }
1959
+ }, this))
1960
+ .delegate("a", "mousedown.jstree", $.proxy(function (e) {
1961
+ if(e.which === 1) {
1962
+ this.start_drag(e.currentTarget, e);
1963
+ return false;
1964
+ }
1965
+ }, this))
1966
+ .delegate("a", "mouseenter.jstree", $.proxy(function (e) {
1967
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
1968
+ this.dnd_enter(e.currentTarget);
1969
+ }
1970
+ }, this))
1971
+ .delegate("a", "mousemove.jstree", $.proxy(function (e) {
1972
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
1973
+ if(typeof this.data.dnd.off.top === "undefined") { this.data.dnd.off = $(e.target).offset(); }
1974
+ this.data.dnd.w = (e.pageY - (this.data.dnd.off.top || 0)) % this.data.core.li_height;
1975
+ if(this.data.dnd.w < 0) { this.data.dnd.w += this.data.core.li_height; }
1976
+ this.dnd_show();
1977
+ }
1978
+ }, this))
1979
+ .delegate("a", "mouseleave.jstree", $.proxy(function (e) {
1980
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
1981
+ this.data.dnd.after = false;
1982
+ this.data.dnd.before = false;
1983
+ this.data.dnd.inside = false;
1984
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
1985
+ m.hide();
1986
+ if(r && r[0] === e.target.parentNode) {
1987
+ if(this.data.dnd.to1) {
1988
+ clearTimeout(this.data.dnd.to1);
1989
+ this.data.dnd.to1 = false;
1990
+ }
1991
+ if(this.data.dnd.to2) {
1992
+ clearTimeout(this.data.dnd.to2);
1993
+ this.data.dnd.to2 = false;
1994
+ }
1995
+ }
1996
+ }
1997
+ }, this))
1998
+ .delegate("a", "mouseup.jstree", $.proxy(function (e) {
1999
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
2000
+ this.dnd_finish(e);
2001
+ }
2002
+ }, this));
2003
+
2004
+ $(document)
2005
+ .bind("drag_stop.vakata", $.proxy(function () {
2006
+ this.data.dnd.after = false;
2007
+ this.data.dnd.before = false;
2008
+ this.data.dnd.inside = false;
2009
+ this.data.dnd.off = false;
2010
+ this.data.dnd.prepared = false;
2011
+ this.data.dnd.w = false;
2012
+ this.data.dnd.to1 = false;
2013
+ this.data.dnd.to2 = false;
2014
+ this.data.dnd.active = false;
2015
+ this.data.dnd.foreign = false;
2016
+ if(m) { m.css({ "top" : "-2000px" }); }
2017
+ }, this))
2018
+ .bind("drag_start.vakata", $.proxy(function (e, data) {
2019
+ if(data.data.jstree) {
2020
+ var et = $(data.event.target);
2021
+ if(et.closest(".jstree").hasClass("jstree-" + this.get_index())) {
2022
+ this.dnd_enter(et);
2023
+ }
2024
+ }
2025
+ }, this));
2026
+
2027
+ var s = this._get_settings().dnd;
2028
+ if(s.drag_target) {
2029
+ $(document)
2030
+ .delegate(s.drag_target, "mousedown.jstree", $.proxy(function (e) {
2031
+ o = e.target;
2032
+ $.vakata.dnd.drag_start(e, { jstree : true, obj : e.target }, "<ins class='jstree-icon'></ins>" + $(e.target).text() );
2033
+ if(this.data.themes) {
2034
+ m.attr("class", "jstree-" + this.data.themes.theme);
2035
+ $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme);
2036
+ }
2037
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
2038
+ var cnt = this.get_container();
2039
+ this.data.dnd.cof = cnt.offset();
2040
+ this.data.dnd.cw = parseInt(cnt.width(),10);
2041
+ this.data.dnd.ch = parseInt(cnt.height(),10);
2042
+ this.data.dnd.foreign = true;
2043
+ return false;
2044
+ }, this));
2045
+ }
2046
+ if(s.drop_target) {
2047
+ $(document)
2048
+ .delegate(s.drop_target, "mouseenter.jstree", $.proxy(function (e) {
2049
+ if(this.data.dnd.active && this._get_settings().dnd.drop_check.call(this, { "o" : o, "r" : $(e.target) })) {
2050
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-ok");
2051
+ }
2052
+ }, this))
2053
+ .delegate(s.drop_target, "mouseleave.jstree", $.proxy(function (e) {
2054
+ if(this.data.dnd.active) {
2055
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
2056
+ }
2057
+ }, this))
2058
+ .delegate(s.drop_target, "mouseup.jstree", $.proxy(function (e) {
2059
+ if(this.data.dnd.active && $.vakata.dnd.helper.children("ins").hasClass("jstree-ok")) {
2060
+ this._get_settings().dnd.drop_finish.call(this, { "o" : o, "r" : $(e.target) });
2061
+ }
2062
+ }, this));
2063
+ }
2064
+ },
2065
+ defaults : {
2066
+ copy_modifier : "ctrl",
2067
+ check_timeout : 200,
2068
+ open_timeout : 500,
2069
+ drop_target : ".jstree-drop",
2070
+ drop_check : function (data) { return true; },
2071
+ drop_finish : $.noop,
2072
+ drag_target : ".jstree-draggable",
2073
+ drag_finish : $.noop,
2074
+ drag_check : function (data) { return { after : false, before : false, inside : true }; }
2075
+ },
2076
+ _fn : {
2077
+ dnd_prepare : function () {
2078
+ if(!r || !r.length) { return; }
2079
+ this.data.dnd.off = r.offset();
2080
+ if(this._get_settings().core.rtl) {
2081
+ this.data.dnd.off.right = this.data.dnd.off.left + r.width();
2082
+ }
2083
+ if(this.data.dnd.foreign) {
2084
+ var a = this._get_settings().dnd.drag_check.call(this, { "o" : o, "r" : r });
2085
+ this.data.dnd.after = a.after;
2086
+ this.data.dnd.before = a.before;
2087
+ this.data.dnd.inside = a.inside;
2088
+ this.data.dnd.prepared = true;
2089
+ return this.dnd_show();
2090
+ }
2091
+ this.prepare_move(o, r, "before");
2092
+ this.data.dnd.before = this.check_move();
2093
+ this.prepare_move(o, r, "after");
2094
+ this.data.dnd.after = this.check_move();
2095
+ if(this._is_loaded(r)) {
2096
+ this.prepare_move(o, r, "inside");
2097
+ this.data.dnd.inside = this.check_move();
2098
+ }
2099
+ else {
2100
+ this.data.dnd.inside = false;
2101
+ }
2102
+ this.data.dnd.prepared = true;
2103
+ return this.dnd_show();
2104
+ },
2105
+ dnd_show : function () {
2106
+ if(!this.data.dnd.prepared) { return; }
2107
+ var o = ["before","inside","after"],
2108
+ r = false,
2109
+ rtl = this._get_settings().core.rtl,
2110
+ pos;
2111
+ if(this.data.dnd.w < this.data.core.li_height/3) { o = ["before","inside","after"]; }
2112
+ else if(this.data.dnd.w <= this.data.core.li_height*2/3) {
2113
+ o = this.data.dnd.w < this.data.core.li_height/2 ? ["inside","before","after"] : ["inside","after","before"];
2114
+ }
2115
+ else { o = ["after","inside","before"]; }
2116
+ $.each(o, $.proxy(function (i, val) {
2117
+ if(this.data.dnd[val]) {
2118
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-ok");
2119
+ r = val;
2120
+ return false;
2121
+ }
2122
+ }, this));
2123
+ if(r === false) { $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"); }
2124
+
2125
+ pos = rtl ? (this.data.dnd.off.right - 18) : (this.data.dnd.off.left + 10);
2126
+ switch(r) {
2127
+ case "before":
2128
+ m.css({ "left" : pos + "px", "top" : (this.data.dnd.off.top - 6) + "px" }).show();
2129
+ break;
2130
+ case "after":
2131
+ m.css({ "left" : pos + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height - 7) + "px" }).show();
2132
+ break;
2133
+ case "inside":
2134
+ m.css({ "left" : pos + ( rtl ? -4 : 4) + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height/2 - 5) + "px" }).show();
2135
+ break;
2136
+ default:
2137
+ m.hide();
2138
+ break;
2139
+ }
2140
+ return r;
2141
+ },
2142
+ dnd_open : function () {
2143
+ this.data.dnd.to2 = false;
2144
+ this.open_node(r, $.proxy(this.dnd_prepare,this), true);
2145
+ },
2146
+ dnd_finish : function (e) {
2147
+ if(this.data.dnd.foreign) {
2148
+ if(this.data.dnd.after || this.data.dnd.before || this.data.dnd.inside) {
2149
+ this._get_settings().dnd.drag_finish.call(this, { "o" : o, "r" : r });
2150
+ }
2151
+ }
2152
+ else {
2153
+ this.dnd_prepare();
2154
+ this.move_node(o, r, this.dnd_show(), e[this._get_settings().dnd.copy_modifier + "Key"]);
2155
+ }
2156
+ o = false;
2157
+ r = false;
2158
+ m.hide();
2159
+ },
2160
+ dnd_enter : function (obj) {
2161
+ var s = this._get_settings().dnd;
2162
+ this.data.dnd.prepared = false;
2163
+ r = this._get_node(obj);
2164
+ if(s.check_timeout) {
2165
+ // do the calculations after a minimal timeout (users tend to drag quickly to the desired location)
2166
+ if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); }
2167
+ this.data.dnd.to1 = setTimeout($.proxy(this.dnd_prepare, this), s.check_timeout);
2168
+ }
2169
+ else {
2170
+ this.dnd_prepare();
2171
+ }
2172
+ if(s.open_timeout) {
2173
+ if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); }
2174
+ if(r && r.length && r.hasClass("jstree-closed")) {
2175
+ // if the node is closed - open it, then recalculate
2176
+ this.data.dnd.to2 = setTimeout($.proxy(this.dnd_open, this), s.open_timeout);
2177
+ }
2178
+ }
2179
+ else {
2180
+ if(r && r.length && r.hasClass("jstree-closed")) {
2181
+ this.dnd_open();
2182
+ }
2183
+ }
2184
+ },
2185
+ start_drag : function (obj, e) {
2186
+ o = this._get_node(obj);
2187
+ if(this.data.ui && this.is_selected(o)) { o = this._get_node(null, true); }
2188
+ $.vakata.dnd.drag_start(e, { jstree : true, obj : o }, "<ins class='jstree-icon'></ins>" + (o.length > 1 ? "Multiple selection" : this.get_text(o)) );
2189
+ if(this.data.themes) {
2190
+ m.attr("class", "jstree-" + this.data.themes.theme);
2191
+ $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme);
2192
+ }
2193
+ var cnt = this.get_container();
2194
+ this.data.dnd.cof = cnt.children("ul").offset();
2195
+ this.data.dnd.cw = parseInt(cnt.width(),10);
2196
+ this.data.dnd.ch = parseInt(cnt.height(),10);
2197
+ this.data.dnd.active = true;
2198
+ }
2199
+ }
2200
+ });
2201
+ $(function() {
2202
+ var css_string = '' +
2203
+ '#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; } ' +
2204
+ '#vakata-dragged .jstree-ok { background:green; } ' +
2205
+ '#vakata-dragged .jstree-invalid { background:red; } ' +
2206
+ '#jstree-marker { padding:0; margin:0; line-height:12px; font-size:1px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:silver; } ';
2207
+ $.vakata.css.add_sheet({ str : css_string });
2208
+ m = $("<div>").attr({ id : "jstree-marker" }).hide().appendTo("body");
2209
+ $(document).bind("drag_start.vakata", function (e, data) {
2210
+ if(data.data.jstree) {
2211
+ m.show();
2212
+ }
2213
+ });
2214
+ $(document).bind("drag_stop.vakata", function (e, data) {
2215
+ if(data.data.jstree) { m.hide(); }
2216
+ });
2217
+ });
2218
+ })(jQuery);
2219
+ //*/
2220
+
2221
+ /*
2222
+ * jsTree checkbox plugin 1.0
2223
+ * Inserts checkboxes in front of every node
2224
+ * Depends on the ui plugin
2225
+ * DOES NOT WORK NICELY WITH MULTITREE DRAG'N'DROP
2226
+ */
2227
+ (function ($) {
2228
+ $.jstree.plugin("checkbox", {
2229
+ __init : function () {
2230
+ this.select_node = this.deselect_node = this.deselect_all = $.noop;
2231
+ this.get_selected = this.get_checked;
2232
+
2233
+ this.get_container()
2234
+ .bind("open_node.jstree create_node.jstree clean_node.jstree", $.proxy(function (e, data) {
2235
+ this._prepare_checkboxes(data.rslt.obj);
2236
+ }, this))
2237
+ .bind("loaded.jstree", $.proxy(function (e) {
2238
+ this._prepare_checkboxes();
2239
+ }, this))
2240
+ .delegate("a", "click.jstree", $.proxy(function (e) {
2241
+ if(this._get_node(e.target).hasClass("jstree-checked")) { this.uncheck_node(e.target); }
2242
+ else { this.check_node(e.target); }
2243
+ if(this.data.ui) { this.save_selected(); }
2244
+ if(this.data.cookies) { this.save_cookie("select_node"); }
2245
+ e.preventDefault();
2246
+ }, this));
2247
+ },
2248
+ __destroy : function () {
2249
+ this.get_container().find(".jstree-checkbox").remove();
2250
+ },
2251
+ _fn : {
2252
+ _prepare_checkboxes : function (obj) {
2253
+ obj = !obj || obj == -1 ? this.get_container() : this._get_node(obj);
2254
+ var c, _this = this, t;
2255
+ obj.each(function () {
2256
+ t = $(this);
2257
+ c = t.is("li") && t.hasClass("jstree-checked") ? "jstree-checked" : "jstree-unchecked";
2258
+ t.find("a").not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(c);
2259
+ });
2260
+ if(obj.is("li")) { this._repair_state(obj); }
2261
+ else { obj.find("> ul > li").each(function () { _this._repair_state(this); }); }
2262
+ },
2263
+ change_state : function (obj, state) {
2264
+ obj = this._get_node(obj);
2265
+ state = (state === false || state === true) ? state : obj.hasClass("jstree-checked");
2266
+ if(state) { obj.find("li").andSelf().removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"); }
2267
+ else {
2268
+ obj.find("li").andSelf().removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
2269
+ if(this.data.ui) { this.data.ui.last_selected = obj; }
2270
+ this.data.checkbox.last_selected = obj;
2271
+ }
2272
+ obj.parentsUntil(".jstree", "li").each(function () {
2273
+ var $this = $(this);
2274
+ if(state) {
2275
+ if($this.children("ul").children(".jstree-checked, .jstree-undetermined").length) {
2276
+ $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
2277
+ return false;
2278
+ }
2279
+ else {
2280
+ $this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
2281
+ }
2282
+ }
2283
+ else {
2284
+ if($this.children("ul").children(".jstree-unchecked, .jstree-undetermined").length) {
2285
+ $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
2286
+ return false;
2287
+ }
2288
+ else {
2289
+ $this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
2290
+ }
2291
+ }
2292
+ });
2293
+ if(this.data.ui) { this.data.ui.selected = this.get_checked(); }
2294
+ this.__callback(obj);
2295
+ },
2296
+ check_node : function (obj) {
2297
+ this.change_state(obj, false);
2298
+ },
2299
+ uncheck_node : function (obj) {
2300
+ this.change_state(obj, true);
2301
+ },
2302
+ check_all : function () {
2303
+ var _this = this;
2304
+ this.get_container().children("ul").children("li").each(function () {
2305
+ _this.check_node(this, false);
2306
+ });
2307
+ },
2308
+ uncheck_all : function () {
2309
+ var _this = this;
2310
+ this.get_container().children("ul").children("li").each(function () {
2311
+ _this.change_state(this, true);
2312
+ });
2313
+ },
2314
+
2315
+ is_checked : function(obj) {
2316
+ obj = this._get_node(obj);
2317
+ return obj.length ? obj.is(".jstree-checked") : false;
2318
+ },
2319
+ get_checked : function (obj) {
2320
+ obj = !obj || obj === -1 ? this.get_container() : this._get_node(obj);
2321
+ return obj.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked");
2322
+ },
2323
+ get_unchecked : function (obj) {
2324
+ obj = !obj || obj === -1 ? this.get_container() : this._get_node(obj);
2325
+ return obj.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked");
2326
+ },
2327
+
2328
+ show_checkboxes : function () { this.get_container().children("ul").removeClass("jstree-no-checkboxes"); },
2329
+ hide_checkboxes : function () { this.get_container().children("ul").addClass("jstree-no-checkboxes"); },
2330
+
2331
+ _repair_state : function (obj) {
2332
+ obj = this._get_node(obj);
2333
+ if(!obj.length) { return; }
2334
+ var a = obj.find("> ul > .jstree-checked").length,
2335
+ b = obj.find("> ul > .jstree-undetermined").length,
2336
+ c = obj.find("> ul > li").length;
2337
+
2338
+ if(c === 0) { if(obj.hasClass("jstree-undetermined")) { this.check_node(obj); } }
2339
+ else if(a === 0 && b === 0) { this.uncheck_node(obj); }
2340
+ else if(a === c) { this.check_node(obj); }
2341
+ else {
2342
+ obj.parentsUntil(".jstree","li").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
2343
+ }
2344
+ },
2345
+ reselect : function () {
2346
+ if(this.data.ui) {
2347
+ var _this = this,
2348
+ s = this.data.ui.to_select;
2349
+ s = $.map($.makeArray(s), function (n) { return "#" + n.toString().replace(/^#/,"").replace('\\/','/').replace('/','\\/'); });
2350
+ this.deselect_all();
2351
+ $.each(s, function (i, val) { _this.check_node(val); });
2352
+ this.__callback();
2353
+ }
2354
+ }
2355
+ }
2356
+ });
2357
+ })(jQuery);
2358
+ //*/
2359
+
2360
+ /*
2361
+ * jsTree XML 1.0
2362
+ * The XML data store. Datastores are build by overriding the `load_node` and `_is_loaded` functions.
2363
+ */
2364
+ (function ($) {
2365
+ $.vakata.xslt = function (xml, xsl, callback) {
2366
+ var rs = "", xm, xs, processor, support;
2367
+ if(document.recalc) {
2368
+ xm = document.createElement('xml');
2369
+ xs = document.createElement('xml');
2370
+ xm.innerHTML = xml;
2371
+ xs.innerHTML = xsl;
2372
+ $("body").append(xm).append(xs);
2373
+ setTimeout( (function (xm, xs, callback) {
2374
+ return function () {
2375
+ callback.call(null, xm.transformNode(xs.XMLDocument));
2376
+ setTimeout( (function (xm, xs) { return function () { jQuery("body").remove(xm).remove(xs); }; })(xm, xs), 200);
2377
+ };
2378
+ }) (xm, xs, callback), 100);
2379
+ return true;
2380
+ }
2381
+ if(typeof window.DOMParser !== "undefined" && typeof window.XMLHttpRequest !== "undefined" && typeof window.XSLTProcessor !== "undefined") {
2382
+ processor = new XSLTProcessor();
2383
+ support = $.isFunction(processor.transformDocument) ? (typeof window.XMLSerializer !== "undefined") : true;
2384
+ if(!support) { return false; }
2385
+ xml = new DOMParser().parseFromString(xml, "text/xml");
2386
+ xsl = new DOMParser().parseFromString(xsl, "text/xml");
2387
+ if($.isFunction(processor.transformDocument)) {
2388
+ rs = document.implementation.createDocument("", "", null);
2389
+ processor.transformDocument(xml, xsl, rs, null);
2390
+ callback.call(null, XMLSerializer().serializeToString(rs));
2391
+ return true;
2392
+ }
2393
+ else {
2394
+ processor.importStylesheet(xsl);
2395
+ rs = processor.transformToFragment(xml, document);
2396
+ callback.call(null, $("<div>").append(rs).html());
2397
+ return true;
2398
+ }
2399
+ }
2400
+ return false;
2401
+ };
2402
+ var xsl = {
2403
+ 'nest' : '<?xml version="1.0" encoding="utf-8" ?>' +
2404
+ '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >' +
2405
+ '<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" />' +
2406
+ '<xsl:template match="/">' +
2407
+ ' <xsl:call-template name="nodes">' +
2408
+ ' <xsl:with-param name="node" select="/root" />' +
2409
+ ' </xsl:call-template>' +
2410
+ '</xsl:template>' +
2411
+ '<xsl:template name="nodes">' +
2412
+ ' <xsl:param name="node" />' +
2413
+ ' <ul>' +
2414
+ ' <xsl:for-each select="$node/item">' +
2415
+ ' <xsl:variable name="children" select="count(./item) &gt; 0" />' +
2416
+ ' <li>' +
2417
+ ' <xsl:attribute name="class">' +
2418
+ ' <xsl:if test="position() = last()">jstree-last </xsl:if>' +
2419
+ ' <xsl:choose>' +
2420
+ ' <xsl:when test="@state = \'open\'">jstree-open </xsl:when>' +
2421
+ ' <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>' +
2422
+ ' <xsl:otherwise>jstree-leaf </xsl:otherwise>' +
2423
+ ' </xsl:choose>' +
2424
+ ' <xsl:value-of select="@class" />' +
2425
+ ' </xsl:attribute>' +
2426
+ ' <xsl:for-each select="@*">' +
2427
+ ' <xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'">' +
2428
+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
2429
+ ' </xsl:if>' +
2430
+ ' </xsl:for-each>' +
2431
+ ' <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins>' +
2432
+ ' <xsl:for-each select="content/name">' +
2433
+ ' <a>' +
2434
+ ' <xsl:attribute name="href">' +
2435
+ ' <xsl:choose>' +
2436
+ ' <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>' +
2437
+ ' <xsl:otherwise>#</xsl:otherwise>' +
2438
+ ' </xsl:choose>' +
2439
+ ' </xsl:attribute>' +
2440
+ ' <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>' +
2441
+ ' <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>' +
2442
+ ' <xsl:for-each select="@*">' +
2443
+ ' <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">' +
2444
+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
2445
+ ' </xsl:if>' +
2446
+ ' </xsl:for-each>' +
2447
+ ' <ins>' +
2448
+ ' <xsl:attribute name="class">jstree-icon ' +
2449
+ ' <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>' +
2450
+ ' </xsl:attribute>' +
2451
+ ' <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>' +
2452
+ ' <xsl:text>&#xa0;</xsl:text>' +
2453
+ ' </ins>' +
2454
+ ' <xsl:value-of select="current()" />' +
2455
+ ' </a>' +
2456
+ ' </xsl:for-each>' +
2457
+ ' <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if>' +
2458
+ ' </li>' +
2459
+ ' </xsl:for-each>' +
2460
+ ' </ul>' +
2461
+ '</xsl:template>' +
2462
+ '</xsl:stylesheet>',
2463
+
2464
+ 'flat' : '<?xml version="1.0" encoding="utf-8" ?>' +
2465
+ '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >' +
2466
+ '<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" />' +
2467
+ '<xsl:template match="/">' +
2468
+ ' <ul>' +
2469
+ ' <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]">' + /* the last `or` may be removed */
2470
+ ' <xsl:call-template name="nodes">' +
2471
+ ' <xsl:with-param name="node" select="." />' +
2472
+ ' <xsl:with-param name="is_last" select="number(position() = last())" />' +
2473
+ ' </xsl:call-template>' +
2474
+ ' </xsl:for-each>' +
2475
+ ' </ul>' +
2476
+ '</xsl:template>' +
2477
+ '<xsl:template name="nodes">' +
2478
+ ' <xsl:param name="node" />' +
2479
+ ' <xsl:param name="is_last" />' +
2480
+ ' <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) &gt; 0" />' +
2481
+ ' <li>' +
2482
+ ' <xsl:attribute name="class">' +
2483
+ ' <xsl:if test="$is_last = true()">jstree-last </xsl:if>' +
2484
+ ' <xsl:choose>' +
2485
+ ' <xsl:when test="@state = \'open\'">jstree-open </xsl:when>' +
2486
+ ' <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>' +
2487
+ ' <xsl:otherwise>jstree-leaf </xsl:otherwise>' +
2488
+ ' </xsl:choose>' +
2489
+ ' <xsl:value-of select="@class" />' +
2490
+ ' </xsl:attribute>' +
2491
+ ' <xsl:for-each select="@*">' +
2492
+ ' <xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'">' +
2493
+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
2494
+ ' </xsl:if>' +
2495
+ ' </xsl:for-each>' +
2496
+ ' <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins>' +
2497
+ ' <xsl:for-each select="content/name">' +
2498
+ ' <a>' +
2499
+ ' <xsl:attribute name="href">' +
2500
+ ' <xsl:choose>' +
2501
+ ' <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>' +
2502
+ ' <xsl:otherwise>#</xsl:otherwise>' +
2503
+ ' </xsl:choose>' +
2504
+ ' </xsl:attribute>' +
2505
+ ' <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>' +
2506
+ ' <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>' +
2507
+ ' <xsl:for-each select="@*">' +
2508
+ ' <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">' +
2509
+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
2510
+ ' </xsl:if>' +
2511
+ ' </xsl:for-each>' +
2512
+ ' <ins>' +
2513
+ ' <xsl:attribute name="class">jstree-icon ' +
2514
+ ' <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>' +
2515
+ ' </xsl:attribute>' +
2516
+ ' <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>' +
2517
+ ' <xsl:text>&#xa0;</xsl:text>' +
2518
+ ' </ins>' +
2519
+ ' <xsl:value-of select="current()" />' +
2520
+ ' </a>' +
2521
+ ' </xsl:for-each>' +
2522
+ ' <xsl:if test="$children">' +
2523
+ ' <ul>' +
2524
+ ' <xsl:for-each select="//item[@parent_id=$node/attribute::id]">' +
2525
+ ' <xsl:call-template name="nodes">' +
2526
+ ' <xsl:with-param name="node" select="." />' +
2527
+ ' <xsl:with-param name="is_last" select="number(position() = last())" />' +
2528
+ ' </xsl:call-template>' +
2529
+ ' </xsl:for-each>' +
2530
+ ' </ul>' +
2531
+ ' </xsl:if>' +
2532
+ ' </li>' +
2533
+ '</xsl:template>' +
2534
+ '</xsl:stylesheet>'
2535
+ };
2536
+ $.jstree.plugin("xml_data", {
2537
+ defaults : {
2538
+ data : false,
2539
+ ajax : false,
2540
+ xsl : "flat",
2541
+ clean_node : false,
2542
+ correct_state : true
2543
+ },
2544
+ _fn : {
2545
+ load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_xml(obj, function () { _this.__callback({ "obj" : obj }); s_call.call(this); }, e_call); },
2546
+ _is_loaded : function (obj) {
2547
+ var s = this._get_settings().xml_data;
2548
+ obj = this._get_node(obj);
2549
+ return obj == -1 || !obj || !s.ajax || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0;
2550
+ },
2551
+ load_node_xml : function (obj, s_call, e_call) {
2552
+ var s = this.get_settings().xml_data,
2553
+ error_func = function () {},
2554
+ success_func = function () {};
2555
+
2556
+ obj = this._get_node(obj);
2557
+ if(obj && obj !== -1) {
2558
+ if(obj.data("jstree-is-loading")) { return; }
2559
+ else { obj.data("jstree-is-loading",true); }
2560
+ }
2561
+ switch(!0) {
2562
+ case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied.";
2563
+ case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
2564
+ if(!obj || obj == -1) {
2565
+ this.parse_xml(s.data, $.proxy(function (d) {
2566
+ if(d) {
2567
+ d = d.replace(/ ?xmlns="[^"]*"/ig, "");
2568
+ if(d.length > 10) {
2569
+ d = $(d);
2570
+ this.get_container().children("ul").empty().append(d.children());
2571
+ if(s.clean_node) { this.clean_node(obj); }
2572
+ if(s_call) { s_call.call(this); }
2573
+ }
2574
+ }
2575
+ else {
2576
+ if(s.correct_state) {
2577
+ this.get_container().children("ul").empty();
2578
+ if(s_call) { s_call.call(this); }
2579
+ }
2580
+ }
2581
+ }, this));
2582
+ }
2583
+ break;
2584
+ case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
2585
+ error_func = function (x, t, e) {
2586
+ var ef = this.get_settings().xml_data.ajax.error;
2587
+ if(ef) { ef.call(this, x, t, e); }
2588
+ if(obj !== -1 && obj.length) {
2589
+ obj.children(".jstree-loading").removeClass("jstree-loading");
2590
+ obj.data("jstree-is-loading",false);
2591
+ if(t === "success" && s.correct_state) { obj.removeClass("jstree-open jstree-closed").addClass("jstree-leaf"); }
2592
+ }
2593
+ else {
2594
+ if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); }
2595
+ }
2596
+ if(e_call) { e_call.call(this); }
2597
+ };
2598
+ success_func = function (d, t, x) {
2599
+ d = x.responseText;
2600
+ var sf = this.get_settings().xml_data.ajax.success;
2601
+ if(sf) { d = sf.call(this,d,t,x) || d; }
2602
+ if(d == "") {
2603
+ return error_func.call(this, x, t, "");
2604
+ }
2605
+ this.parse_xml(d, $.proxy(function (d) {
2606
+ if(d) {
2607
+ d = d.replace(/ ?xmlns="[^"]*"/ig, "");
2608
+ if(d.length > 10) {
2609
+ d = $(d);
2610
+ if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); }
2611
+ else { obj.children(".jstree-loading").removeClass("jstree-loading"); obj.append(d); obj.data("jstree-is-loading",false); }
2612
+ if(s.clean_node) { this.clean_node(obj); }
2613
+ if(s_call) { s_call.call(this); }
2614
+ }
2615
+ else {
2616
+ if(obj && obj !== -1) {
2617
+ obj.children(".jstree-loading").removeClass("jstree-loading");
2618
+ obj.data("jstree-is-loading",false);
2619
+ if(s.correct_state) {
2620
+ obj.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");
2621
+ if(s_call) { s_call.call(this); }
2622
+ }
2623
+ }
2624
+ else {
2625
+ if(s.correct_state) {
2626
+ this.get_container().children("ul").empty();
2627
+ if(s_call) { s_call.call(this); }
2628
+ }
2629
+ }
2630
+ }
2631
+ }
2632
+ }, this));
2633
+ };
2634
+ s.ajax.context = this;
2635
+ s.ajax.error = error_func;
2636
+ s.ajax.success = success_func;
2637
+ if(!s.ajax.dataType) { s.ajax.dataType = "xml"; }
2638
+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); }
2639
+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); }
2640
+ $.ajax(s.ajax);
2641
+ break;
2642
+ }
2643
+ },
2644
+ parse_xml : function (xml, callback) {
2645
+ var s = this._get_settings().xml_data;
2646
+ $.vakata.xslt(xml, xsl[s.xsl], callback);
2647
+ },
2648
+ get_xml : function (tp, obj, li_attr, a_attr, is_callback) {
2649
+ var result = "",
2650
+ s = this._get_settings(),
2651
+ _this = this,
2652
+ tmp1, tmp2, li, a, lang;
2653
+ if(!tp) { tp = "flat"; }
2654
+ if(!is_callback) { is_callback = 0; }
2655
+ obj = this._get_node(obj);
2656
+ if(!obj || obj === -1) { obj = this.get_container().find("> ul > li"); }
2657
+ li_attr = $.isArray(li_attr) ? li_attr : [ "id", "class" ];
2658
+ if(!is_callback && this.data.types && $.inArray(s.types.type_attr, li_attr) === -1) { li_attr.push(s.types.type_attr); }
2659
+
2660
+ a_attr = $.isArray(a_attr) ? a_attr : [ ];
2661
+
2662
+ if(!is_callback) { result += "<root>"; }
2663
+ obj.each(function () {
2664
+ result += "<item";
2665
+ li = $(this);
2666
+ $.each(li_attr, function (i, v) { result += " " + v + "=\"" + (li.attr(v) || "").replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"") + "\""; });
2667
+ if(li.hasClass("jstree-open")) { result += " state=\"open\""; }
2668
+ if(li.hasClass("jstree-closed")) { result += " state=\"closed\""; }
2669
+ if(tp === "flat") { result += " parent_id=\"" + is_callback + "\""; }
2670
+ result += ">";
2671
+ result += "<content>";
2672
+ a = li.children("a");
2673
+ a.each(function () {
2674
+ tmp1 = $(this);
2675
+ lang = false;
2676
+ result += "<name";
2677
+ if($.inArray("languages", s.plugins) !== -1) {
2678
+ $.each(s.languages, function (k, z) {
2679
+ if(tmp1.hasClass(z)) { result += " lang=\"" + z + "\""; lang = z; return false; }
2680
+ });
2681
+ }
2682
+ if(a_attr.length) {
2683
+ $.each(a_attr, function (k, z) {
2684
+ result += " " + z + "=\"" + (tmp1.attr(z) || "").replace(/jstree[^ ]*|$/ig,'') + "\"";
2685
+ });
2686
+ }
2687
+ if(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length) {
2688
+ result += ' icon="' + tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"") + '"';
2689
+ }
2690
+ if(tmp1.children("ins").get(0).style.backgroundImage.length) {
2691
+ result += ' icon="' + tmp1.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","") + '"';
2692
+ }
2693
+ result += ">";
2694
+ result += "<![CDATA[" + _this.get_text(tmp1, lang) + "]]>";
2695
+ result += "</name>";
2696
+ });
2697
+ result += "</content>";
2698
+ tmp2 = li[0].id;
2699
+ li = li.find("> ul > li");
2700
+ if(li.length) { tmp2 = _this.get_xml(tp, li, li_attr, a_attr, tmp2); }
2701
+ else { tmp2 = ""; }
2702
+ if(tp == "nest") { result += tmp2; }
2703
+ result += "</item>";
2704
+ if(tp == "flat") { result += tmp2; }
2705
+ });
2706
+ if(!is_callback) { result += "</root>"; }
2707
+ return result;
2708
+ }
2709
+ }
2710
+ });
2711
+ })(jQuery);
2712
+ //*/
2713
+
2714
+ /*
2715
+ * jsTree search plugin 1.0
2716
+ * Enables both sync and async search on the tree
2717
+ * DOES NOT WORK WITH JSON PROGRESSIVE RENDER
2718
+ */
2719
+ (function ($) {
2720
+ $.expr[':'].jstree_contains = function(a,i,m){
2721
+ return (a.textContent || a.innerText || "").toLowerCase().indexOf(m[3].toLowerCase())>=0;
2722
+ };
2723
+ $.jstree.plugin("search", {
2724
+ __init : function () {
2725
+ this.data.search.str = "";
2726
+ this.data.search.result = $();
2727
+ },
2728
+ defaults : {
2729
+ ajax : false, // OR ajax object
2730
+ case_insensitive : false
2731
+ },
2732
+ _fn : {
2733
+ search : function (str, skip_async) {
2734
+ if(str === "") { return; }
2735
+ var s = this.get_settings().search,
2736
+ t = this,
2737
+ error_func = function () { },
2738
+ success_func = function () { };
2739
+ this.data.search.str = str;
2740
+
2741
+ if(!skip_async && s.ajax !== false && this.get_container().find(".jstree-closed:eq(0)").length > 0) {
2742
+ this.search.supress_callback = true;
2743
+ error_func = function () { };
2744
+ success_func = function (d, t, x) {
2745
+ var sf = this.get_settings().search.ajax.success;
2746
+ if(sf) { d = sf.call(this,d,t,x) || d; }
2747
+ this.data.search.to_open = d;
2748
+ this._search_open();
2749
+ };
2750
+ s.ajax.context = this;
2751
+ s.ajax.error = error_func;
2752
+ s.ajax.success = success_func;
2753
+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, str); }
2754
+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, str); }
2755
+ if(!s.ajax.data) { s.ajax.data = { "search_string" : str }; }
2756
+ if(!s.ajax.dataType || /^json/.exec(s.ajax.dataType)) { s.ajax.dataType = "json"; }
2757
+ $.ajax(s.ajax);
2758
+ return;
2759
+ }
2760
+ if(this.data.search.result.length) { this.clear_search(); }
2761
+ this.data.search.result = this.get_container().find("a" + (this.data.languages ? "." + this.get_lang() : "" ) + ":" + (s.case_insensitive ? "jstree_contains" : "contains") + "(" + this.data.search.str + ")");
2762
+ this.data.search.result.addClass("jstree-search").parents(".jstree-closed").each(function () {
2763
+ t.open_node(this, false, true);
2764
+ });
2765
+ this.__callback({ nodes : this.data.search.result, str : str });
2766
+ },
2767
+ clear_search : function (str) {
2768
+ this.data.search.result.removeClass("jstree-search");
2769
+ this.__callback(this.data.search.result);
2770
+ this.data.search.result = $();
2771
+ },
2772
+ _search_open : function (is_callback) {
2773
+ var _this = this,
2774
+ done = true,
2775
+ current = [],
2776
+ remaining = [];
2777
+ if(this.data.search.to_open.length) {
2778
+ $.each(this.data.search.to_open, function (i, val) {
2779
+ if(val == "#") { return true; }
2780
+ if($(val).length && $(val).is(".jstree-closed")) { current.push(val); }
2781
+ else { remaining.push(val); }
2782
+ });
2783
+ if(current.length) {
2784
+ this.data.search.to_open = remaining;
2785
+ $.each(current, function (i, val) {
2786
+ _this.open_node(val, function () { _this._search_open(true); });
2787
+ });
2788
+ done = false;
2789
+ }
2790
+ }
2791
+ if(done) { this.search(this.data.search.str, true); }
2792
+ }
2793
+ }
2794
+ });
2795
+ })(jQuery);
2796
+ //*/
2797
+
2798
+ /*
2799
+ * jsTree contextmenu plugin 1.0
2800
+ */
2801
+ (function ($) {
2802
+ $.vakata.context = {
2803
+ cnt : $("<div id='vakata-contextmenu'>"),
2804
+ vis : false,
2805
+ tgt : false,
2806
+ par : false,
2807
+ func : false,
2808
+ data : false,
2809
+ show : function (s, t, x, y, d, p) {
2810
+ var html = $.vakata.context.parse(s), h, w;
2811
+ if(!html) { return; }
2812
+ $.vakata.context.vis = true;
2813
+ $.vakata.context.tgt = t;
2814
+ $.vakata.context.par = p || t || null;
2815
+ $.vakata.context.data = d || null;
2816
+ $.vakata.context.cnt
2817
+ .html(html)
2818
+ .css({ "visibility" : "hidden", "display" : "block", "left" : 0, "top" : 0 });
2819
+ h = $.vakata.context.cnt.height();
2820
+ w = $.vakata.context.cnt.width();
2821
+ if(x + w > $(document).width()) {
2822
+ x = $(document).width() - (w + 5);
2823
+ $.vakata.context.cnt.find("li > ul").addClass("right");
2824
+ }
2825
+ if(y + h > $(document).height()) {
2826
+ y = y - (h + t[0].offsetHeight);
2827
+ $.vakata.context.cnt.find("li > ul").addClass("bottom");
2828
+ }
2829
+
2830
+ $.vakata.context.cnt
2831
+ .css({ "left" : x, "top" : y })
2832
+ .find("li:has(ul)")
2833
+ .bind("mouseenter", function (e) {
2834
+ var w = $(document).width(),
2835
+ h = $(document).height(),
2836
+ ul = $(this).children("ul").show();
2837
+ if(w !== $(document).width()) { ul.toggleClass("right"); }
2838
+ if(h !== $(document).height()) { ul.toggleClass("bottom"); }
2839
+ })
2840
+ .bind("mouseleave", function (e) {
2841
+ $(this).children("ul").hide();
2842
+ })
2843
+ .end()
2844
+ .css({ "visibility" : "visible" })
2845
+ .show();
2846
+ $(document).triggerHandler("context_show.vakata");
2847
+ },
2848
+ hide : function () {
2849
+ $.vakata.context.vis = false;
2850
+ $.vakata.context.cnt.attr("class","").hide();
2851
+ $(document).triggerHandler("context_hide.vakata");
2852
+ },
2853
+ parse : function (s, is_callback) {
2854
+ if(!s) { return false; }
2855
+ var str = "",
2856
+ tmp = false,
2857
+ was_sep = true;
2858
+ if(!is_callback) { $.vakata.context.func = {}; }
2859
+ str += "<ul>";
2860
+ $.each(s, function (i, val) {
2861
+ if(!val) { return true; }
2862
+ $.vakata.context.func[i] = val.action;
2863
+ if(!was_sep && val.separator_before) {
2864
+ str += "<li class='vakata-separator vakata-separator-before'></li>";
2865
+ }
2866
+ was_sep = false;
2867
+ str += "<li class='" + (val._class || "") + (val._disabled ? " jstree-contextmenu-disabled " : "") + "'><ins ";
2868
+ if(val.icon && val.icon.indexOf("/") === -1) { str += " class='" + val.icon + "' "; }
2869
+ if(val.icon && val.icon.indexOf("/") !== -1) { str += " style='background:url(" + val.icon + ") center center no-repeat;' "; }
2870
+ str += ">&#160;</ins><a href='#' rel='" + i + "'>";
2871
+ if(val.submenu) {
2872
+ str += "<span style='float:right;'>&raquo;</span>";
2873
+ }
2874
+ str += val.label + "</a>";
2875
+ if(val.submenu) {
2876
+ tmp = $.vakata.context.parse(val.submenu, true);
2877
+ if(tmp) { str += tmp; }
2878
+ }
2879
+ str += "</li>";
2880
+ if(val.separator_after) {
2881
+ str += "<li class='vakata-separator vakata-separator-after'></li>";
2882
+ was_sep = true;
2883
+ }
2884
+ });
2885
+ str = str.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,"");
2886
+ str += "</ul>";
2887
+ return str.length > 10 ? str : false;
2888
+ },
2889
+ exec : function (i) {
2890
+ if($.isFunction($.vakata.context.func[i])) {
2891
+ $.vakata.context.func[i].call($.vakata.context.data, $.vakata.context.par);
2892
+ return true;
2893
+ }
2894
+ else { return false; }
2895
+ }
2896
+ };
2897
+ $(function () {
2898
+ var css_string = '' +
2899
+ '#vakata-contextmenu { display:none; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } ' +
2900
+ '#vakata-contextmenu ul { min-width:180px; *width:180px; } ' +
2901
+ '#vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } ' +
2902
+ '#vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } ' +
2903
+ '#vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } ' +
2904
+ '#vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } ' +
2905
+ '#vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } ' +
2906
+ '#vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } ' +
2907
+ '#vakata-contextmenu .right { right:100%; left:auto; } ' +
2908
+ '#vakata-contextmenu .bottom { bottom:-1px; top:auto; } ' +
2909
+ '#vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ';
2910
+ $.vakata.css.add_sheet({ str : css_string });
2911
+ $.vakata.context.cnt
2912
+ .delegate("a","click", function (e) { e.preventDefault(); })
2913
+ .delegate("a","mouseup", function (e) {
2914
+ if(!$(this).parent().hasClass("jstree-contextmenu-disabled") && $.vakata.context.exec($(this).attr("rel"))) {
2915
+ $.vakata.context.hide();
2916
+ }
2917
+ else { $(this).blur(); }
2918
+ })
2919
+ .delegate("a","mouseover", function () {
2920
+ $.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover");
2921
+ })
2922
+ .appendTo("body");
2923
+ $(document).bind("mousedown", function (e) { if($.vakata.context.vis && !$.contains($.vakata.context.cnt[0], e.target)) { $.vakata.context.hide(); } });
2924
+ if(typeof $.hotkeys !== "undefined") {
2925
+ $(document)
2926
+ .bind("keydown", "up", function (e) {
2927
+ if($.vakata.context.vis) {
2928
+ var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();
2929
+ if(!o.length) { o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last(); }
2930
+ o.addClass("vakata-hover");
2931
+ e.stopImmediatePropagation();
2932
+ e.preventDefault();
2933
+ }
2934
+ })
2935
+ .bind("keydown", "down", function (e) {
2936
+ if($.vakata.context.vis) {
2937
+ var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();
2938
+ if(!o.length) { o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first(); }
2939
+ o.addClass("vakata-hover");
2940
+ e.stopImmediatePropagation();
2941
+ e.preventDefault();
2942
+ }
2943
+ })
2944
+ .bind("keydown", "right", function (e) {
2945
+ if($.vakata.context.vis) {
2946
+ $.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover");
2947
+ e.stopImmediatePropagation();
2948
+ e.preventDefault();
2949
+ }
2950
+ })
2951
+ .bind("keydown", "left", function (e) {
2952
+ if($.vakata.context.vis) {
2953
+ $.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover");
2954
+ e.stopImmediatePropagation();
2955
+ e.preventDefault();
2956
+ }
2957
+ })
2958
+ .bind("keydown", "esc", function (e) {
2959
+ $.vakata.context.hide();
2960
+ e.preventDefault();
2961
+ })
2962
+ .bind("keydown", "space", function (e) {
2963
+ $.vakata.context.cnt.find(".vakata-hover").last().children("a").click();
2964
+ e.preventDefault();
2965
+ });
2966
+ }
2967
+ });
2968
+
2969
+ $.jstree.plugin("contextmenu", {
2970
+ __init : function () {
2971
+ this.get_container()
2972
+ .delegate("a", "contextmenu.jstree", $.proxy(function (e) {
2973
+ e.preventDefault();
2974
+ this.show_contextmenu(e.currentTarget, e.pageX, e.pageY);
2975
+ }, this))
2976
+ .bind("destroy.jstree", $.proxy(function () {
2977
+ if(this.data.contextmenu) {
2978
+ $.vakata.context.hide();
2979
+ }
2980
+ }, this));
2981
+ $(document).bind("context_hide.vakata", $.proxy(function () { this.data.contextmenu = false; }, this));
2982
+ },
2983
+ defaults : {
2984
+ select_node : false, // requires UI plugin
2985
+ show_at_node : true,
2986
+ items : { // Could be a function that should return an object like this one
2987
+ "create" : {
2988
+ "separator_before" : false,
2989
+ "separator_after" : true,
2990
+ "label" : "Create",
2991
+ "action" : function (obj) { this.create(obj); }
2992
+ },
2993
+ "rename" : {
2994
+ "separator_before" : false,
2995
+ "separator_after" : false,
2996
+ "label" : "Rename",
2997
+ "action" : function (obj) { this.rename(obj); }
2998
+ },
2999
+ "remove" : {
3000
+ "separator_before" : false,
3001
+ "icon" : false,
3002
+ "separator_after" : false,
3003
+ "label" : "Delete",
3004
+ "action" : function (obj) { this.remove(obj); }
3005
+ },
3006
+ "ccp" : {
3007
+ "separator_before" : true,
3008
+ "icon" : false,
3009
+ "separator_after" : false,
3010
+ "label" : "Edit",
3011
+ "action" : false,
3012
+ "submenu" : {
3013
+ "cut" : {
3014
+ "separator_before" : false,
3015
+ "separator_after" : false,
3016
+ "label" : "Cut",
3017
+ "action" : function (obj) { this.cut(obj); }
3018
+ },
3019
+ "copy" : {
3020
+ "separator_before" : false,
3021
+ "icon" : false,
3022
+ "separator_after" : false,
3023
+ "label" : "Copy",
3024
+ "action" : function (obj) { this.copy(obj); }
3025
+ },
3026
+ "paste" : {
3027
+ "separator_before" : false,
3028
+ "icon" : false,
3029
+ "separator_after" : false,
3030
+ "label" : "Paste",
3031
+ "action" : function (obj) { this.paste(obj); }
3032
+ }
3033
+ }
3034
+ }
3035
+ }
3036
+ },
3037
+ _fn : {
3038
+ show_contextmenu : function (obj, x, y) {
3039
+ obj = this._get_node(obj);
3040
+ var s = this.get_settings().contextmenu,
3041
+ a = obj.children("a:visible:eq(0)"),
3042
+ o = false;
3043
+ if(s.select_node && this.data.ui && !this.is_selected(obj)) {
3044
+ this.deselect_all();
3045
+ this.select_node(obj, true);
3046
+ }
3047
+ if(s.show_at_node || typeof x === "undefined" || typeof y === "undefined") {
3048
+ o = a.offset();
3049
+ x = o.left;
3050
+ y = o.top + this.data.core.li_height;
3051
+ }
3052
+ if($.isFunction(s.items)) { s.items = s.items.call(this, obj); }
3053
+ this.data.contextmenu = true;
3054
+ $.vakata.context.show(s.items, a, x, y, this, obj);
3055
+ if(this.data.themes) { $.vakata.context.cnt.attr("class", "jstree-" + this.data.themes.theme + "-context"); }
3056
+ }
3057
+ }
3058
+ });
3059
+ })(jQuery);
3060
+ //*/
3061
+
3062
+ /*
3063
+ * jsTree types plugin 1.0
3064
+ * Adds support types of nodes
3065
+ * You can set an attribute on each li node, that represents its type.
3066
+ * According to the type setting the node may get custom icon/validation rules
3067
+ */
3068
+ (function ($) {
3069
+ $.jstree.plugin("types", {
3070
+ __init : function () {
3071
+ var s = this._get_settings().types;
3072
+ this.data.types.attach_to = [];
3073
+ this.get_container()
3074
+ .bind("init.jstree", $.proxy(function () {
3075
+ var types = s.types,
3076
+ attr = s.type_attr,
3077
+ icons_css = "",
3078
+ _this = this;
3079
+
3080
+ $.each(types, function (i, tp) {
3081
+ $.each(tp, function (k, v) {
3082
+ if(!/^(max_depth|max_children|icon|valid_children)$/.test(k)) { _this.data.types.attach_to.push(k); }
3083
+ });
3084
+ if(!tp.icon) { return true; }
3085
+ if( tp.icon.image || tp.icon.position) {
3086
+ if(i == "default") { icons_css += '.jstree-' + _this.get_index() + ' a > .jstree-icon { '; }
3087
+ else { icons_css += '.jstree-' + _this.get_index() + ' li[' + attr + '=' + i + '] > a > .jstree-icon { '; }
3088
+ if(tp.icon.image) { icons_css += ' background-image:url(' + tp.icon.image + '); '; }
3089
+ if(tp.icon.position){ icons_css += ' background-position:' + tp.icon.position + '; '; }
3090
+ else { icons_css += ' background-position:0 0; '; }
3091
+ icons_css += '} ';
3092
+ }
3093
+ });
3094
+ if(icons_css != "") { $.vakata.css.add_sheet({ 'str' : icons_css }); }
3095
+ }, this))
3096
+ .bind("before.jstree", $.proxy(function (e, data) {
3097
+ if($.inArray(data.func, this.data.types.attach_to) !== -1) {
3098
+ var s = this._get_settings().types.types,
3099
+ t = this._get_type(data.args[0]);
3100
+ if(
3101
+ (
3102
+ (s[t] && typeof s[t][data.func] !== "undefined") ||
3103
+ (s["default"] && typeof s["default"][data.func] !== "undefined")
3104
+ ) && !this._check(data.func, data.args[0])
3105
+ ) {
3106
+ e.stopImmediatePropagation();
3107
+ return false;
3108
+ }
3109
+ }
3110
+ }, this));
3111
+ },
3112
+ defaults : {
3113
+ // defines maximum number of root nodes (-1 means unlimited, -2 means disable max_children checking)
3114
+ max_children : -1,
3115
+ // defines the maximum depth of the tree (-1 means unlimited, -2 means disable max_depth checking)
3116
+ max_depth : -1,
3117
+ // defines valid node types for the root nodes
3118
+ valid_children : "all",
3119
+
3120
+ // where is the type stores (the rel attribute of the LI element)
3121
+ type_attr : "rel",
3122
+ // a list of types
3123
+ types : {
3124
+ // the default type
3125
+ "default" : {
3126
+ "max_children" : -1,
3127
+ "max_depth" : -1,
3128
+ "valid_children": "all"
3129
+
3130
+ // Bound functions - you can bind any other function here (using boolean or function)
3131
+ //"select_node" : true,
3132
+ //"open_node" : true,
3133
+ //"close_node" : true,
3134
+ //"create_node" : true,
3135
+ //"delete_node" : true
3136
+ }
3137
+ }
3138
+ },
3139
+ _fn : {
3140
+ _get_type : function (obj) {
3141
+ obj = this._get_node(obj);
3142
+ return (!obj || !obj.length) ? false : obj.attr(this._get_settings().types.type_attr) || "default";
3143
+ },
3144
+ set_type : function (str, obj) {
3145
+ obj = this._get_node(obj);
3146
+ return (!obj.length || !str) ? false : obj.attr(this._get_settings().types.type_attr, str);
3147
+ },
3148
+ _check : function (rule, obj, opts) {
3149
+ var v = false, t = this._get_type(obj), d = 0, _this = this, s = this._get_settings().types;
3150
+ if(obj === -1) {
3151
+ if(!!s[rule]) { v = s[rule]; }
3152
+ else { return; }
3153
+ }
3154
+ else {
3155
+ if(t === false) { return; }
3156
+ if(!!s.types[t] && !!s.types[t][rule]) { v = s.types[t][rule]; }
3157
+ else if(!!s.types["default"] && !!s.types["default"][rule]) { v = s.types["default"][rule]; }
3158
+ }
3159
+ if($.isFunction(v)) { v = v.call(this, obj); }
3160
+ if(rule === "max_depth" && obj !== -1 && opts !== false && s.max_depth !== -2 && v !== 0) {
3161
+ // also include the node itself - otherwise if root node it is not checked
3162
+ this._get_node(obj).children("a:eq(0)").parentsUntil(".jstree","li").each(function (i) {
3163
+ // check if current depth already exceeds global tree depth
3164
+ if(s.max_depth !== -1 && s.max_depth - (i + 1) <= 0) { v = 0; return false; }
3165
+ d = (i === 0) ? v : _this._check(rule, this, false);
3166
+ // check if current node max depth is already matched or exceeded
3167
+ if(d !== -1 && d - (i + 1) <= 0) { v = 0; return false; }
3168
+ // otherwise - set the max depth to the current value minus current depth
3169
+ if(d >= 0 && (d - (i + 1) < v || v < 0) ) { v = d - (i + 1); }
3170
+ // if the global tree depth exists and it minus the nodes calculated so far is less than `v` or `v` is unlimited
3171
+ if(s.max_depth >= 0 && (s.max_depth - (i + 1) < v || v < 0) ) { v = s.max_depth - (i + 1); }
3172
+ });
3173
+ }
3174
+ return v;
3175
+ },
3176
+ check_move : function () {
3177
+ if(!this.__call_old()) { return false; }
3178
+ var m = this._get_move(),
3179
+ s = m.rt._get_settings().types,
3180
+ mc = m.rt._check("max_children", m.cr),
3181
+ md = m.rt._check("max_depth", m.cr),
3182
+ vc = m.rt._check("valid_children", m.cr),
3183
+ ch = 0, d = 1, t;
3184
+
3185
+ if(vc === "none") { return false; }
3186
+ if($.isArray(vc) && m.ot && m.ot._get_type) {
3187
+ m.o.each(function () {
3188
+ if($.inArray(m.ot._get_type(this), vc) === -1) { d = false; return false; }
3189
+ });
3190
+ if(d === false) { return false; }
3191
+ }
3192
+ if(s.max_children !== -2 && mc !== -1) {
3193
+ ch = m.cr === -1 ? this.get_container().children("> ul > li").not(m.o).length : m.cr.children("> ul > li").not(m.o).length;
3194
+ if(ch + m.o.length > mc) { return false; }
3195
+ }
3196
+ if(s.max_depth !== -2 && md !== -1) {
3197
+ d = 0;
3198
+ if(md === 0) { return false; }
3199
+ if(typeof m.o.d === "undefined") {
3200
+ // TODO: deal with progressive rendering and async when checking max_depth (how to know the depth of the moved node)
3201
+ t = m.o;
3202
+ while(t.length > 0) {
3203
+ t = t.find("> ul > li");
3204
+ d ++;
3205
+ }
3206
+ m.o.d = d;
3207
+ }
3208
+ if(md - m.o.d < 0) { return false; }
3209
+ }
3210
+ return true;
3211
+ },
3212
+ create_node : function (obj, position, js, callback, is_loaded, skip_check) {
3213
+ if(!skip_check && (is_loaded || this._is_loaded(obj))) {
3214
+ var p = (position && position.match(/^before|after$/i) && obj !== -1) ? this._get_parent(obj) : this._get_node(obj),
3215
+ s = this._get_settings().types,
3216
+ mc = this._check("max_children", p),
3217
+ md = this._check("max_depth", p),
3218
+ vc = this._check("valid_children", p),
3219
+ ch;
3220
+ if(!js) { js = {}; }
3221
+ if(vc === "none") { return false; }
3222
+ if($.isArray(vc)) {
3223
+ if(!js.attr || !js.attr[s.type_attr]) {
3224
+ if(!js.attr) { js.attr = {}; }
3225
+ js.attr[s.type_attr] = vc[0];
3226
+ }
3227
+ else {
3228
+ if($.inArray(js.attr[s.type_attr], vc) === -1) { return false; }
3229
+ }
3230
+ }
3231
+ if(s.max_children !== -2 && mc !== -1) {
3232
+ ch = p === -1 ? this.get_container().children("> ul > li").length : p.children("> ul > li").length;
3233
+ if(ch + 1 > mc) { return false; }
3234
+ }
3235
+ if(s.max_depth !== -2 && md !== -1 && (md - 1) < 0) { return false; }
3236
+ }
3237
+ return this.__call_old(true, obj, position, js, callback, is_loaded, skip_check);
3238
+ }
3239
+ }
3240
+ });
3241
+ })(jQuery);
3242
+ //*/
3243
+
3244
+ /*
3245
+ * jsTree HTML data 1.0
3246
+ * The HTML data store. Datastores are build by replacing the `load_node` and `_is_loaded` functions.
3247
+ */
3248
+ (function ($) {
3249
+ $.jstree.plugin("html_data", {
3250
+ __init : function () {
3251
+ // this used to use html() and clean the whitespace, but this way any attached data was lost
3252
+ this.data.html_data.original_container_html = this.get_container().find(" > ul > li").clone(true);
3253
+ // remove white space from LI node - otherwise nodes appear a bit to the right
3254
+ this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function() { return this.nodeType == 3; }).remove();
3255
+ },
3256
+ defaults : {
3257
+ data : false,
3258
+ ajax : false,
3259
+ correct_state : true
3260
+ },
3261
+ _fn : {
3262
+ load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_html(obj, function () { _this.__callback({ "obj" : obj }); s_call.call(this); }, e_call); },
3263
+ _is_loaded : function (obj) {
3264
+ obj = this._get_node(obj);
3265
+ return obj == -1 || !obj || !this._get_settings().html_data.ajax || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0;
3266
+ },
3267
+ load_node_html : function (obj, s_call, e_call) {
3268
+ var d,
3269
+ s = this.get_settings().html_data,
3270
+ error_func = function () {},
3271
+ success_func = function () {};
3272
+ obj = this._get_node(obj);
3273
+ if(obj && obj !== -1) {
3274
+ if(obj.data("jstree-is-loading")) { return; }
3275
+ else { obj.data("jstree-is-loading",true); }
3276
+ }
3277
+ switch(!0) {
3278
+ case (!s.data && !s.ajax):
3279
+ if(!obj || obj == -1) {
3280
+ this.get_container()
3281
+ .children("ul").empty()
3282
+ .append(this.data.html_data.original_container_html)
3283
+ .find("li, a").filter(function () { return this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'>&#160;</ins>").end()
3284
+ .filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");
3285
+ this.clean_node();
3286
+ }
3287
+ if(s_call) { s_call.call(this); }
3288
+ break;
3289
+ case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
3290
+ if(!obj || obj == -1) {
3291
+ d = $(s.data);
3292
+ if(!d.is("ul")) { d = $("<ul>").append(d); }
3293
+ this.get_container()
3294
+ .children("ul").empty().append(d.children())
3295
+ .find("li, a").filter(function () { return this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'>&#160;</ins>").end()
3296
+ .filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");
3297
+ this.clean_node();
3298
+ }
3299
+ if(s_call) { s_call.call(this); }
3300
+ break;
3301
+ case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
3302
+ obj = this._get_node(obj);
3303
+ error_func = function (x, t, e) {
3304
+ var ef = this.get_settings().html_data.ajax.error;
3305
+ if(ef) { ef.call(this, x, t, e); }
3306
+ if(obj != -1 && obj.length) {
3307
+ obj.children(".jstree-loading").removeClass("jstree-loading");
3308
+ obj.data("jstree-is-loading",false);
3309
+ if(t === "success" && s.correct_state) { obj.removeClass("jstree-open jstree-closed").addClass("jstree-leaf"); }
3310
+ }
3311
+ else {
3312
+ if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); }
3313
+ }
3314
+ if(e_call) { e_call.call(this); }
3315
+ };
3316
+ success_func = function (d, t, x) {
3317
+ var sf = this.get_settings().html_data.ajax.success;
3318
+ if(sf) { d = sf.call(this,d,t,x) || d; }
3319
+ if(d == "") {
3320
+ return error_func.call(this, x, t, "");
3321
+ }
3322
+ if(d) {
3323
+ d = $(d);
3324
+ if(!d.is("ul")) { d = $("<ul>").append(d); }
3325
+ if(obj == -1 || !obj) { this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function () { return this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); }
3326
+ else { obj.children(".jstree-loading").removeClass("jstree-loading"); obj.append(d).find("li, a").filter(function () { return this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); obj.data("jstree-is-loading",false); }
3327
+ this.clean_node(obj);
3328
+ if(s_call) { s_call.call(this); }
3329
+ }
3330
+ else {
3331
+ if(obj && obj !== -1) {
3332
+ obj.children(".jstree-loading").removeClass("jstree-loading");
3333
+ obj.data("jstree-is-loading",false);
3334
+ if(s.correct_state) {
3335
+ obj.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");
3336
+ if(s_call) { s_call.call(this); }
3337
+ }
3338
+ }
3339
+ else {
3340
+ if(s.correct_state) {
3341
+ this.get_container().children("ul").empty();
3342
+ if(s_call) { s_call.call(this); }
3343
+ }
3344
+ }
3345
+ }
3346
+ };
3347
+ s.ajax.context = this;
3348
+ s.ajax.error = error_func;
3349
+ s.ajax.success = success_func;
3350
+ if(!s.ajax.dataType) { s.ajax.dataType = "html"; }
3351
+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); }
3352
+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); }
3353
+ $.ajax(s.ajax);
3354
+ break;
3355
+ }
3356
+ }
3357
+ }
3358
+ });
3359
+ // include the HTML data plugin by default
3360
+ $.jstree.defaults.plugins.push("html_data");
3361
+ })(jQuery);
3362
+ //*/
3363
+
3364
+ /*
3365
+ * jsTree themeroller plugin 1.0
3366
+ * Adds support for jQuery UI themes. Include this at the end of your plugins list, also make sure "themes" is not included.
3367
+ */
3368
+ (function ($) {
3369
+ $.jstree.plugin("themeroller", {
3370
+ __init : function () {
3371
+ var s = this._get_settings().themeroller;
3372
+ this.get_container()
3373
+ .addClass("ui-widget-content")
3374
+ .delegate("a","mouseenter.jstree", function () {
3375
+ $(this).addClass(s.item_h);
3376
+ })
3377
+ .delegate("a","mouseleave.jstree", function () {
3378
+ $(this).removeClass(s.item_h);
3379
+ })
3380
+ .bind("open_node.jstree create_node.jstree", $.proxy(function (e, data) {
3381
+ this._themeroller(data.rslt.obj);
3382
+ }, this))
3383
+ .bind("loaded.jstree refresh.jstree", $.proxy(function (e) {
3384
+ this._themeroller();
3385
+ }, this))
3386
+ .bind("close_node.jstree", $.proxy(function (e, data) {
3387
+ data.rslt.obj.children("ins").removeClass(s.opened).addClass(s.closed);
3388
+ }, this))
3389
+ .bind("select_node.jstree", $.proxy(function (e, data) {
3390
+ data.rslt.obj.children("a").addClass(s.item_a);
3391
+ }, this))
3392
+ .bind("deselect_node.jstree deselect_all.jstree", $.proxy(function (e, data) {
3393
+ this.get_container()
3394
+ .find("." + s.item_a).removeClass(s.item_a).end()
3395
+ .find(".jstree-clicked").addClass(s.item_a);
3396
+ }, this))
3397
+ .bind("move_node.jstree", $.proxy(function (e, data) {
3398
+ this._themeroller(data.rslt.o);
3399
+ }, this));
3400
+ },
3401
+ __destroy : function () {
3402
+ var s = this._get_settings().themeroller,
3403
+ c = [ "ui-icon" ];
3404
+ $.each(s, function (i, v) {
3405
+ v = v.split(" ");
3406
+ if(v.length) { c = c.concat(v); }
3407
+ });
3408
+ this.get_container()
3409
+ .removeClass("ui-widget-content")
3410
+ .find("." + c.join(", .")).removeClass(c.join(" "));
3411
+ },
3412
+ _fn : {
3413
+ _themeroller : function (obj) {
3414
+ var s = this._get_settings().themeroller;
3415
+ obj = !obj || obj == -1 ? this.get_container() : this._get_node(obj).parent();
3416
+ obj
3417
+ .find("li.jstree-closed > ins.jstree-icon").removeClass(s.opened).addClass("ui-icon " + s.closed).end()
3418
+ .find("li.jstree-open > ins.jstree-icon").removeClass(s.closed).addClass("ui-icon " + s.opened).end()
3419
+ .find("a").addClass(s.item)
3420
+ .children("ins.jstree-icon").addClass("ui-icon " + s.item_icon);
3421
+ }
3422
+ },
3423
+ defaults : {
3424
+ "opened" : "ui-icon-triangle-1-se",
3425
+ "closed" : "ui-icon-triangle-1-e",
3426
+ "item" : "ui-state-default",
3427
+ "item_h" : "ui-state-hover",
3428
+ "item_a" : "ui-state-active",
3429
+ "item_icon" : "ui-icon-folder-collapsed"
3430
+ }
3431
+ });
3432
+ $(function() {
3433
+ var css_string = '.jstree .ui-icon { overflow:visible; } .jstree a { padding:0 2px; }';
3434
+ $.vakata.css.add_sheet({ str : css_string });
3435
+ });
3436
+ })(jQuery);
3437
+ //*/
3438
+
3439
+ /*
3440
+ * jsTree unique plugin 1.0
3441
+ * Forces different names amongst siblings (still a bit experimental)
3442
+ * NOTE: does not check language versions (it will not be possible to have nodes with the same title, even in different languages)
3443
+ */
3444
+ (function ($) {
3445
+ $.jstree.plugin("unique", {
3446
+ __init : function () {
3447
+ this.get_container()
3448
+ .bind("before.jstree", $.proxy(function (e, data) {
3449
+ var nms = [], res = true, p, t;
3450
+ if(data.func == "move_node") {
3451
+ // obj, ref, position, is_copy, is_prepared, skip_check
3452
+ if(data.args[4] === true) {
3453
+ if(data.args[0].o && data.args[0].o.length) {
3454
+ data.args[0].o.children("a").each(function () { nms.push($(this).text().replace(/^\s+/g,"")); });
3455
+ res = this._check_unique(nms, data.args[0].np.find("> ul > li").not(data.args[0].o));
3456
+ }
3457
+ }
3458
+ }
3459
+ if(data.func == "create_node") {
3460
+ // obj, position, js, callback, is_loaded
3461
+ if(data.args[4] || this._is_loaded(data.args[0])) {
3462
+ p = this._get_node(data.args[0]);
3463
+ if(data.args[1] && (data.args[1] === "before" || data.args[1] === "after")) {
3464
+ p = this._get_parent(data.args[0]);
3465
+ if(!p || p === -1) { p = this.get_container(); }
3466
+ }
3467
+ if(typeof data.args[2] === "string") { nms.push(data.args[2]); }
3468
+ else if(!data.args[2] || !data.args[2].data) { nms.push(this._get_settings().core.strings.new_node); }
3469
+ else { nms.push(data.args[2].data); }
3470
+ res = this._check_unique(nms, p.find("> ul > li"));
3471
+ }
3472
+ }
3473
+ if(data.func == "rename_node") {
3474
+ // obj, val
3475
+ nms.push(data.args[1]);
3476
+ t = this._get_node(data.args[0]);
3477
+ p = this._get_parent(t);
3478
+ if(!p || p === -1) { p = this.get_container(); }
3479
+ res = this._check_unique(nms, p.find("> ul > li").not(t));
3480
+ }
3481
+ if(!res) {
3482
+ e.stopPropagation();
3483
+ return false;
3484
+ }
3485
+ }, this));
3486
+ },
3487
+ _fn : {
3488
+ _check_unique : function (nms, p) {
3489
+ var cnms = [];
3490
+ p.children("a").each(function () { cnms.push($(this).text().replace(/^\s+/g,"")); });
3491
+ if(!cnms.length || !nms.length) { return true; }
3492
+ cnms = cnms.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");
3493
+ if((cnms.length + nms.length) != cnms.concat(nms).sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",").length) {
3494
+ return false;
3495
+ }
3496
+ return true;
3497
+ },
3498
+ check_move : function () {
3499
+ if(!this.__call_old()) { return false; }
3500
+ var p = this._get_move(), nms = [];
3501
+ if(p.o && p.o.length) {
3502
+ p.o.children("a").each(function () { nms.push($(this).text().replace(/^\s+/g,"")); });
3503
+ return this._check_unique(nms, p.np.find("> ul > li").not(p.o));
3504
+ }
3505
+ return true;
3506
+ }
3507
+ }
3508
+ });
3509
+ })(jQuery);
3510
+ //*/