radiantcms-couchrest_model 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1438) hide show
  1. data/CHANGELOG +390 -271
  2. data/CONTRIBUTORS +0 -27
  3. data/INSTALL +5 -0
  4. data/README +0 -21
  5. data/app/controllers/admin/layouts_controller.rb +8 -3
  6. data/app/controllers/admin/pages_controller.rb +19 -0
  7. data/app/controllers/admin/preferences_controller.rb +7 -7
  8. data/app/controllers/admin/references_controller.rb +1 -1
  9. data/app/controllers/admin/resource_controller.rb +17 -72
  10. data/app/controllers/admin/snippets_controller.rb +6 -6
  11. data/app/controllers/admin/users_controller.rb +1 -16
  12. data/app/controllers/admin/welcome_controller.rb +5 -5
  13. data/app/controllers/application_controller.rb +2 -17
  14. data/app/controllers/site_controller.rb +5 -21
  15. data/app/helpers/admin/layouts_helper.rb +0 -19
  16. data/app/helpers/admin/node_helper.rb +10 -10
  17. data/app/helpers/admin/pages_helper.rb +22 -82
  18. data/app/helpers/admin/references_helper.rb +3 -6
  19. data/app/helpers/admin/snippets_helper.rb +0 -39
  20. data/app/helpers/admin/users_helper.rb +2 -2
  21. data/app/helpers/application_helper.rb +27 -112
  22. data/app/models/layout.rb +4 -3
  23. data/app/models/page.rb +20 -35
  24. data/app/models/page_part.rb +4 -4
  25. data/app/models/radiant/config.rb +7 -11
  26. data/app/models/snippet.rb +5 -5
  27. data/app/models/standard_tags.rb +21 -311
  28. data/app/models/status.rb +1 -3
  29. data/app/models/user.rb +35 -39
  30. data/app/views/admin/extensions/index.html.haml +25 -26
  31. data/app/views/admin/layouts/_form.html.haml +25 -28
  32. data/app/views/admin/layouts/edit.html.haml +3 -5
  33. data/app/views/admin/layouts/index.html.haml +32 -31
  34. data/app/views/admin/layouts/new.html.haml +2 -4
  35. data/app/views/admin/layouts/remove.html.haml +9 -9
  36. data/app/views/admin/page_parts/_page_part.html.haml +11 -12
  37. data/app/views/admin/pages/_edit_styles.html.haml +15 -0
  38. data/app/views/admin/pages/_fields.html.haml +50 -44
  39. data/app/views/admin/pages/_meta_row.html.haml +4 -2
  40. data/app/views/admin/pages/_node.html.haml +5 -5
  41. data/app/views/admin/pages/_popups.html.haml +29 -12
  42. data/app/views/admin/pages/edit.html.haml +3 -6
  43. data/app/views/admin/pages/index.html.haml +24 -22
  44. data/app/views/admin/pages/new.html.haml +3 -4
  45. data/app/views/admin/pages/remove.html.haml +17 -14
  46. data/app/views/admin/preferences/edit.html.haml +30 -38
  47. data/app/views/admin/references/_tag_reference.haml +2 -2
  48. data/app/views/admin/references/filters.js.erb +5 -0
  49. data/app/views/admin/references/tags.js.erb +5 -0
  50. data/app/views/admin/snippets/_form.html.haml +20 -24
  51. data/app/views/admin/snippets/edit.html.haml +2 -6
  52. data/app/views/admin/snippets/index.html.haml +29 -29
  53. data/app/views/admin/snippets/new.html.haml +2 -4
  54. data/app/views/admin/snippets/remove.html.haml +11 -9
  55. data/app/views/admin/users/_form.html.haml +69 -48
  56. data/app/views/admin/users/edit.html.haml +1 -5
  57. data/app/views/admin/users/index.html.haml +30 -34
  58. data/app/views/admin/users/new.html.haml +1 -2
  59. data/app/views/admin/users/remove.html.haml +10 -8
  60. data/app/views/admin/welcome/login.html.haml +58 -19
  61. data/app/views/layouts/application.html.haml +29 -30
  62. data/config/boot.rb +1 -1
  63. data/config/database.db2.yml +1 -4
  64. data/config/database.mysql.yml +2 -5
  65. data/config/database.postgresql.yml +2 -5
  66. data/config/database.sqlite.yml +1 -4
  67. data/config/database.sqlserver.yml +2 -5
  68. data/config/environment.rb +3 -15
  69. data/config/environments/production.rb +1 -6
  70. data/config/environments/test.rb +3 -6
  71. data/config/routes.rb +2 -2
  72. data/db/migrate/20081203140407_add_indexes.rb +10 -10
  73. data/db/schema.rb +2 -3
  74. data/features/admin/content_negotiation.feature +4 -4
  75. data/features/admin/layouts_management.feature +2 -2
  76. data/features/admin/pages_management.feature +17 -31
  77. data/features/admin/snippets_management.feature +17 -19
  78. data/features/admin/user_permissions.feature +41 -49
  79. data/features/admin/user_preferences.feature +5 -22
  80. data/features/admin/users_management.feature +9 -8
  81. data/features/page_serving.feature +8 -8
  82. data/features/step_definitions/admin/admin_steps.rb +2 -8
  83. data/features/step_definitions/admin/content_negotiation_steps.rb +5 -14
  84. data/features/step_definitions/admin/pages_management_steps.rb +1 -1
  85. data/features/step_definitions/admin/users_management_steps.rb +0 -3
  86. data/features/step_definitions/page_serving_steps.rb +19 -0
  87. data/features/step_definitions/webrat_steps.rb +117 -0
  88. data/features/support/env.rb +14 -48
  89. data/features/support/paths.rb +12 -57
  90. data/lib/generators/extension/extension_generator.rb +1 -29
  91. data/lib/generators/extension/templates/RSpecRakefile +1 -14
  92. data/lib/generators/extension/templates/Rakefile +0 -17
  93. data/lib/generators/extension/templates/extension.rb +10 -10
  94. data/lib/generators/extension/templates/tasks.rake +0 -27
  95. data/lib/generators/extension/templates/test_helper.rb +1 -1
  96. data/lib/generators/instance/instance_generator.rb +2 -3
  97. data/lib/generators/instance/templates/databases/sqlserver.yml +1 -2
  98. data/lib/generators/instance/templates/instance_boot.rb +1 -1
  99. data/lib/generators/instance/templates/instance_environment.rb +2 -9
  100. data/lib/login_system.rb +17 -14
  101. data/lib/plugins/active_record_extensions/lib/active_record_extensions.rb +29 -0
  102. data/lib/radiant.rb +3 -4
  103. data/lib/radiant/admin_ui.rb +58 -114
  104. data/lib/radiant/cache.rb +0 -12
  105. data/lib/radiant/extension.rb +3 -29
  106. data/lib/radiant/extension/script.rb +17 -63
  107. data/lib/radiant/extension_loader.rb +8 -22
  108. data/lib/radiant/initializer.rb +23 -29
  109. data/lib/radiant/setup.rb +0 -1
  110. data/lib/radiant/taggable.rb +1 -2
  111. data/lib/task_support.rb +1 -26
  112. data/lib/tasks/cucumber.rake +13 -39
  113. data/lib/tasks/extensions.rake +1 -12
  114. data/lib/tasks/framework.rake +8 -43
  115. data/lib/tasks/release.rake +4 -14
  116. data/lib/tasks/rspec.rake +8 -8
  117. data/lib/tasks/undefine.rake +0 -4
  118. data/public/images/admin/add-child.png +0 -0
  119. data/public/images/admin/{brown_bottom_line.gif → brown-bottom-line.gif} +0 -0
  120. data/public/images/admin/clear-page-cache.png +0 -0
  121. data/public/images/admin/collapse.png +0 -0
  122. data/public/images/admin/expand.png +0 -0
  123. data/public/images/admin/layout.png +0 -0
  124. data/public/images/admin/{new_homepage.png → new-homepage.png} +0 -0
  125. data/public/images/admin/{new_layout.png → new-layout.png} +0 -0
  126. data/public/images/admin/{new_snippet.png → new-snippet.png} +0 -0
  127. data/public/images/admin/{new_user.png → new-user.png} +0 -0
  128. data/public/images/admin/page.png +0 -0
  129. data/public/images/admin/remove-disabled.png +0 -0
  130. data/public/images/admin/remove.png +0 -0
  131. data/public/images/admin/snippet.png +0 -0
  132. data/public/images/admin/view-site.gif +0 -0
  133. data/public/images/admin/virtual-page.png +0 -0
  134. data/public/javascripts/admin/admin.js +149 -0
  135. data/public/javascripts/admin/ruledtable.js +5 -5
  136. data/public/javascripts/admin/sitemap.js +20 -37
  137. data/public/javascripts/admin/tabcontrol.js +100 -88
  138. data/public/javascripts/application.js +2 -0
  139. data/public/javascripts/{admin/controls.js → controls.js} +76 -78
  140. data/public/javascripts/{admin/dragdrop.js → dragdrop.js} +166 -167
  141. data/public/javascripts/{admin/effects.js → effects.js} +174 -168
  142. data/public/javascripts/pngfix.js +39 -0
  143. data/public/javascripts/{admin/prototype.js → prototype.js} +1022 -1576
  144. data/public/javascripts/string.js +17 -0
  145. data/public/stylesheets/admin/main.css +588 -1161
  146. data/radiantcms-couchrest_model.gemspec +246 -970
  147. data/script/cucumber +7 -9
  148. data/spec/controllers/admin/export_controller_spec.rb +1 -1
  149. data/spec/controllers/admin/layouts_controller_spec.rb +5 -5
  150. data/spec/controllers/admin/pages_controller_spec.rb +7 -26
  151. data/spec/controllers/admin/preferences_controller_spec.rb +6 -19
  152. data/spec/controllers/admin/references_controller_spec.rb +1 -1
  153. data/spec/controllers/admin/snippets_controller_spec.rb +6 -6
  154. data/spec/controllers/admin/users_controller_spec.rb +1 -10
  155. data/spec/controllers/admin/welcome_controller_spec.rb +3 -3
  156. data/spec/controllers/application_controller_spec.rb +1 -5
  157. data/spec/controllers/site_controller_spec.rb +1 -57
  158. data/spec/datasets/pages_dataset.rb +1 -5
  159. data/spec/datasets/users_dataset.rb +10 -23
  160. data/spec/generators/extension_controller_generator_spec.rb +6 -16
  161. data/spec/generators/extension_generator_spec.rb +18 -49
  162. data/spec/generators/extension_generators_spec_helper.rb +26 -53
  163. data/spec/generators/extension_mailer_generator_spec.rb +3 -3
  164. data/spec/helpers/admin/node_helper_spec.rb +8 -8
  165. data/spec/helpers/admin/references_helper_spec.rb +4 -4
  166. data/spec/helpers/admin/users_helper_spec.rb +2 -2
  167. data/spec/helpers/application_helper_spec.rb +32 -106
  168. data/spec/lib/login_system_spec.rb +1 -1
  169. data/spec/lib/radiant/admin_ui_spec.rb +131 -30
  170. data/spec/lib/radiant/extension/script_spec.rb +12 -29
  171. data/spec/lib/radiant/extension_loader_spec.rb +7 -37
  172. data/spec/lib/radiant/extension_spec.rb +1 -32
  173. data/spec/lib/radiant/initializer_spec.rb +2 -39
  174. data/spec/lib/radiant/taggable_spec.rb +8 -10
  175. data/spec/lib/radiant_spec.rb +1 -5
  176. data/spec/lib/task_support_spec.rb +0 -45
  177. data/spec/matchers/generator_matchers.rb +147 -145
  178. data/spec/matchers/render_form_errors_matcher.rb +1 -1
  179. data/spec/matchers/render_matcher.rb +1 -14
  180. data/spec/models/layout_spec.rb +3 -3
  181. data/spec/models/page_part_spec.rb +3 -3
  182. data/spec/models/page_spec.rb +6 -41
  183. data/spec/models/radiant/config_spec.rb +2 -2
  184. data/spec/models/snippet_spec.rb +3 -3
  185. data/spec/models/standard_tags_spec.rb +26 -190
  186. data/spec/models/user_spec.rb +19 -43
  187. data/test/fixtures/extensions/{basic → 01_basic}/app/controllers/basic_extension_controller.rb +0 -0
  188. data/test/fixtures/extensions/{basic → 01_basic}/app/metal/basic_metal.rb +0 -0
  189. data/test/fixtures/extensions/{basic → 01_basic}/app/models/basic_extension_mailer.rb +0 -0
  190. data/test/fixtures/extensions/{basic → 01_basic}/app/models/basic_extension_model.rb +0 -0
  191. data/test/fixtures/extensions/{basic → 01_basic}/app/views/basic_extension/index.html.erb +0 -0
  192. data/test/fixtures/extensions/{basic → 01_basic}/app/views/basic_extension/override.html.erb +0 -0
  193. data/test/fixtures/extensions/{basic → 01_basic}/app/views/basic_extension_mailer/message.text.html.erb +0 -0
  194. data/test/fixtures/extensions/{basic → 01_basic}/basic_extension.rb +4 -3
  195. data/test/fixtures/extensions/{basic → 01_basic}/db/migrate/200812131420_create_initial_schema.rb +0 -0
  196. data/test/fixtures/extensions/{basic → 01_basic}/db/migrate/200812131421_modify_initial_schema.rb +0 -0
  197. data/test/fixtures/extensions/{basic → 01_basic}/lib/new_module.rb +0 -0
  198. data/test/fixtures/extensions/{basic → 01_basic}/vendor/plugins/multiple/init.rb +0 -0
  199. data/test/fixtures/extensions/{basic → 01_basic}/vendor/plugins/multiple/lib/multiple.rb +0 -0
  200. data/test/fixtures/extensions/{basic → 01_basic}/vendor/plugins/plugin_normal/init.rb +0 -0
  201. data/test/fixtures/extensions/{basic → 01_basic}/vendor/plugins/plugin_normal/lib/normal_plugin.rb +0 -0
  202. data/test/fixtures/extensions/{overriding → 02_overriding}/app/metal/basic_metal.rb +0 -0
  203. data/test/fixtures/extensions/{overriding → 02_overriding}/app/views/basic_extension/override.html.erb +0 -0
  204. data/test/fixtures/extensions/{overriding → 02_overriding}/overriding_extension.rb +3 -0
  205. data/test/fixtures/extensions/{overriding → 02_overriding}/vendor/plugins/multiple/init.rb +0 -0
  206. data/test/fixtures/extensions/{overriding → 02_overriding}/vendor/plugins/multiple/lib/multiple.rb +0 -0
  207. data/test/fixtures/extensions/{upgrading → 03_upgrading}/db/migrate/01_first.rb +0 -0
  208. data/test/fixtures/extensions/{upgrading → 03_upgrading}/db/migrate/02_second.rb +0 -0
  209. data/test/fixtures/extensions/{upgrading → 03_upgrading}/db/migrate/03_pending.rb +0 -0
  210. data/test/fixtures/extensions/{upgrading → 03_upgrading}/db/migrate/04_dont_run.rb +0 -0
  211. data/test/fixtures/extensions/{upgrading → 03_upgrading}/upgrading_extension.rb +0 -0
  212. data/test/fixtures/extensions/load_order_blue/load_order_blue_extension.rb +3 -0
  213. data/test/fixtures/extensions/load_order_green/load_order_green_extension.rb +3 -0
  214. data/test/fixtures/extensions/load_order_red/load_order_red_extension.rb +3 -0
  215. data/test/test_helper.rb +1 -1
  216. data/vendor/extensions/archive/app/models/archive_finder.rb +0 -5
  217. data/vendor/extensions/archive/archive_extension.rb +1 -1
  218. data/vendor/extensions/markdown_filter/README +1 -1
  219. data/vendor/extensions/markdown_filter/lib/markdown_filter.rb +1 -5
  220. data/vendor/extensions/markdown_filter/lib/markdown_tags.rb +17 -2
  221. data/vendor/extensions/{smarty_pants_filter → markdown_filter}/lib/smarty_pants_filter.rb +0 -0
  222. data/vendor/extensions/markdown_filter/lib/tasks/textile_filter_extension_tasks.rake +0 -0
  223. data/vendor/extensions/markdown_filter/markdown.html +122 -122
  224. data/vendor/extensions/markdown_filter/markdown_filter_extension.rb +12 -3
  225. data/vendor/extensions/{smarty_pants_filter → markdown_filter}/smartypants.html +47 -47
  226. data/vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb +1 -1
  227. data/vendor/extensions/{smarty_pants_filter → markdown_filter}/spec/models/smarty_pants_filter_spec.rb +0 -0
  228. data/vendor/extensions/{smarty_pants_filter → markdown_filter}/test/unit/smarty_pants_filter_test.rb +0 -0
  229. data/vendor/extensions/markdown_filter/vendor/bluecloth/CHANGES +366 -0
  230. data/vendor/extensions/markdown_filter/vendor/bluecloth/LICENSE +340 -0
  231. data/vendor/extensions/markdown_filter/vendor/bluecloth/README +99 -0
  232. data/vendor/extensions/markdown_filter/vendor/bluecloth/bin/bluecloth +83 -0
  233. data/vendor/extensions/markdown_filter/vendor/bluecloth/install.rb +150 -0
  234. data/vendor/extensions/markdown_filter/vendor/bluecloth/lib/bluecloth.rb +1144 -0
  235. data/vendor/extensions/markdown_filter/vendor/bluecloth/test.rb +117 -0
  236. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb +71 -0
  237. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/05_Markdown.tests.rb +1527 -0
  238. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb +57 -0
  239. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/15_Contrib.tests.rb +132 -0
  240. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/bctestcase.rb +274 -0
  241. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/antsugar.txt +34 -0
  242. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/ml-announce.txt +17 -0
  243. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/re-overflow.txt +67 -0
  244. data/vendor/extensions/markdown_filter/vendor/bluecloth/tests/data/re-overflow2.txt +281 -0
  245. data/vendor/extensions/markdown_filter/vendor/bluecloth/utils.rb +553 -0
  246. data/vendor/extensions/{smarty_pants_filter → markdown_filter}/vendor/rubypants/README +0 -0
  247. data/vendor/extensions/{smarty_pants_filter → markdown_filter}/vendor/rubypants/Rakefile +0 -0
  248. data/vendor/extensions/{smarty_pants_filter → markdown_filter}/vendor/rubypants/install.rb +0 -0
  249. data/vendor/extensions/{smarty_pants_filter → markdown_filter}/vendor/rubypants/rubypants.rb +0 -0
  250. data/vendor/extensions/{smarty_pants_filter → markdown_filter}/vendor/rubypants/test_rubypants.rb +0 -0
  251. data/vendor/extensions/textile_filter/textile.html +114 -114
  252. data/vendor/plugins/dataset/lib/dataset/extensions/cucumber.rb +4 -5
  253. data/vendor/plugins/dataset/lib/dataset/load.rb +10 -0
  254. data/vendor/plugins/dataset/lib/dataset/session.rb +20 -4
  255. data/vendor/plugins/dataset/lib/dataset/session_binding.rb +15 -5
  256. data/vendor/plugins/haml/FAQ +138 -0
  257. data/vendor/plugins/haml/MIT-LICENSE +1 -1
  258. data/vendor/plugins/haml/README.rdoc +319 -0
  259. data/vendor/plugins/haml/REVISION +1 -0
  260. data/vendor/plugins/haml/Rakefile +47 -286
  261. data/vendor/plugins/haml/VERSION +1 -1
  262. data/vendor/plugins/haml/extra/haml-mode.el +97 -517
  263. data/vendor/plugins/haml/extra/sass-mode.el +38 -155
  264. data/vendor/plugins/haml/init.rb +3 -13
  265. data/vendor/plugins/haml/lib/haml.rb +993 -16
  266. data/vendor/plugins/haml/lib/haml/buffer.rb +85 -147
  267. data/vendor/plugins/haml/lib/haml/engine.rb +103 -137
  268. data/vendor/plugins/haml/lib/haml/error.rb +7 -7
  269. data/vendor/plugins/haml/lib/haml/exec.rb +45 -141
  270. data/vendor/plugins/haml/lib/haml/filters.rb +44 -121
  271. data/vendor/plugins/haml/lib/haml/helpers.rb +177 -296
  272. data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rb +39 -51
  273. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +107 -144
  274. data/vendor/plugins/haml/lib/haml/html.rb +100 -146
  275. data/vendor/plugins/haml/lib/haml/precompiler.rb +279 -531
  276. data/vendor/plugins/haml/lib/haml/template.rb +15 -60
  277. data/vendor/plugins/haml/lib/haml/template/patch.rb +2 -2
  278. data/vendor/plugins/haml/lib/haml/template/plugin.rb +6 -44
  279. data/vendor/plugins/haml/lib/haml/util.rb +6 -353
  280. data/vendor/plugins/haml/lib/haml/version.rb +24 -56
  281. data/vendor/plugins/haml/lib/sass.rb +856 -7
  282. data/vendor/plugins/haml/lib/sass/constant.rb +216 -0
  283. data/vendor/plugins/haml/lib/sass/constant/color.rb +101 -0
  284. data/vendor/plugins/haml/lib/sass/constant/literal.rb +54 -0
  285. data/vendor/plugins/haml/lib/sass/constant/nil.rb +9 -0
  286. data/vendor/plugins/haml/lib/sass/constant/number.rb +87 -0
  287. data/vendor/plugins/haml/lib/sass/constant/operation.rb +30 -0
  288. data/vendor/plugins/haml/lib/sass/constant/string.rb +22 -0
  289. data/vendor/plugins/haml/lib/sass/css.rb +161 -171
  290. data/vendor/plugins/haml/lib/sass/engine.rb +316 -365
  291. data/vendor/plugins/haml/lib/sass/error.rb +11 -33
  292. data/vendor/plugins/haml/lib/sass/plugin.rb +120 -179
  293. data/vendor/plugins/haml/lib/sass/plugin/merb.rb +16 -9
  294. data/vendor/plugins/haml/lib/sass/plugin/rails.rb +15 -16
  295. data/vendor/plugins/haml/lib/sass/tree/attr_node.rb +57 -0
  296. data/vendor/plugins/haml/lib/sass/tree/comment_node.rb +10 -74
  297. data/vendor/plugins/haml/lib/sass/tree/directive_node.rb +17 -39
  298. data/vendor/plugins/haml/lib/sass/tree/node.rb +11 -216
  299. data/vendor/plugins/haml/lib/sass/tree/rule_node.rb +51 -190
  300. data/vendor/plugins/haml/lib/sass/tree/value_node.rb +20 -0
  301. data/vendor/plugins/haml/test/haml/engine_test.rb +45 -682
  302. data/vendor/plugins/haml/test/haml/helper_test.rb +11 -120
  303. data/vendor/plugins/haml/test/haml/html2haml_test.rb +0 -60
  304. data/vendor/plugins/haml/test/haml/results/content_for_layout.xhtml +3 -0
  305. data/vendor/plugins/haml/test/haml/results/filters.xhtml +0 -2
  306. data/vendor/plugins/haml/test/haml/results/just_stuff.xhtml +3 -3
  307. data/vendor/plugins/haml/test/haml/results/list.xhtml +1 -1
  308. data/vendor/plugins/haml/test/haml/results/standard.xhtml +0 -120
  309. data/vendor/plugins/haml/test/haml/rhtml/standard.rhtml +2 -2
  310. data/vendor/plugins/haml/test/haml/template_test.rb +13 -196
  311. data/vendor/plugins/haml/test/haml/templates/content_for_layout.haml +2 -0
  312. data/vendor/plugins/haml/test/haml/templates/helpers.haml +0 -26
  313. data/vendor/plugins/haml/test/haml/templates/list.haml +1 -1
  314. data/vendor/plugins/haml/test/haml/templates/partial_layout.haml +2 -6
  315. data/vendor/plugins/haml/test/haml/templates/standard.haml +2 -2
  316. data/vendor/plugins/haml/test/haml/templates/standard_ugly.haml +2 -2
  317. data/vendor/plugins/haml/test/linked_rails.rb +2 -11
  318. data/vendor/plugins/haml/test/sass/css2sass_test.rb +24 -83
  319. data/vendor/plugins/haml/test/sass/engine_test.rb +68 -749
  320. data/vendor/plugins/haml/test/sass/plugin_test.rb +48 -130
  321. data/vendor/plugins/haml/test/sass/results/{script.css → constants.css} +4 -4
  322. data/vendor/plugins/haml/test/sass/results/subdir/subdir.css +0 -2
  323. data/vendor/plugins/haml/test/sass/templates/complex.sass +3 -0
  324. data/vendor/plugins/haml/test/sass/templates/{script.sass → constants.sass} +10 -11
  325. data/vendor/plugins/haml/test/sass/templates/import.sass +2 -2
  326. data/vendor/plugins/haml/test/sass/templates/importee.sass +2 -7
  327. data/vendor/plugins/haml/test/sass/templates/subdir/subdir.sass +2 -2
  328. data/vendor/plugins/haml/test/test_helper.rb +4 -41
  329. data/vendor/rack-cache/CHANGES +128 -0
  330. data/vendor/rack-cache/COPYING +18 -0
  331. data/vendor/rack-cache/README +110 -0
  332. data/vendor/rack-cache/Rakefile +137 -0
  333. data/vendor/rack-cache/TODO +31 -0
  334. data/vendor/rack-cache/doc/configuration.markdown +86 -0
  335. data/vendor/rack-cache/doc/faq.markdown +141 -0
  336. data/vendor/rack-cache/doc/index.markdown +118 -0
  337. data/vendor/rack-cache/doc/layout.html.erb +34 -0
  338. data/vendor/rack-cache/doc/license.markdown +24 -0
  339. data/vendor/rack-cache/doc/rack-cache.css +362 -0
  340. data/vendor/rack-cache/doc/server.ru +34 -0
  341. data/vendor/rack-cache/doc/storage.markdown +162 -0
  342. data/vendor/rack-cache/example/sinatra/app.rb +25 -0
  343. data/vendor/rack-cache/example/sinatra/views/index.erb +44 -0
  344. data/vendor/rack-cache/lib/rack/cache.rb +45 -0
  345. data/vendor/rack-cache/lib/rack/cache/cachecontrol.rb +193 -0
  346. data/vendor/rack-cache/lib/rack/cache/context.rb +233 -0
  347. data/vendor/rack-cache/lib/rack/cache/entitystore.rb +253 -0
  348. data/vendor/rack-cache/lib/rack/cache/key.rb +52 -0
  349. data/vendor/rack-cache/lib/rack/cache/metastore.rb +328 -0
  350. data/vendor/rack-cache/lib/rack/cache/options.rb +150 -0
  351. data/vendor/rack-cache/lib/rack/cache/request.rb +33 -0
  352. data/vendor/rack-cache/lib/rack/cache/response.rb +267 -0
  353. data/vendor/rack-cache/lib/rack/cache/storage.rb +49 -0
  354. data/vendor/rack-cache/rack-cache.gemspec +69 -0
  355. data/vendor/rack-cache/test/cache_test.rb +38 -0
  356. data/vendor/rack-cache/test/cachecontrol_test.rb +139 -0
  357. data/vendor/rack-cache/test/context_test.rb +727 -0
  358. data/vendor/rack-cache/test/entitystore_test.rb +189 -0
  359. data/vendor/rack-cache/test/key_test.rb +50 -0
  360. data/vendor/rack-cache/test/metastore_test.rb +263 -0
  361. data/vendor/rack-cache/test/options_test.rb +78 -0
  362. data/vendor/rack-cache/test/pony.jpg +0 -0
  363. data/vendor/rack-cache/test/request_test.rb +19 -0
  364. data/vendor/rack-cache/test/response_test.rb +178 -0
  365. data/vendor/rack-cache/test/spec_setup.rb +202 -0
  366. data/vendor/rack-cache/test/storage_test.rb +94 -0
  367. data/vendor/radius/CHANGELOG +0 -8
  368. data/vendor/radius/{QUICKSTART.rdoc → QUICKSTART} +19 -18
  369. data/vendor/radius/README +97 -0
  370. data/vendor/radius/ROADMAP +12 -0
  371. data/vendor/radius/Rakefile +86 -8
  372. data/vendor/radius/lib/radius.rb +502 -10
  373. data/vendor/radius/test/{parser_test.rb → radius_test.rb} +82 -50
  374. data/vendor/rails/actionmailer/CHANGELOG +0 -22
  375. data/vendor/rails/actionmailer/MIT-LICENSE +1 -1
  376. data/vendor/rails/actionmailer/Rakefile +1 -1
  377. data/vendor/rails/actionmailer/lib/action_mailer.rb +1 -1
  378. data/vendor/rails/actionmailer/lib/action_mailer/base.rb +2 -2
  379. data/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +0 -1
  380. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail.rb +0 -1
  381. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/address.rb +38 -4
  382. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb +46 -0
  383. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/base64.rb +0 -0
  384. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/compat.rb +0 -0
  385. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/config.rb +0 -0
  386. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/core_extensions.rb +0 -0
  387. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/encode.rb +0 -9
  388. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/header.rb +2 -4
  389. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/index.rb +0 -0
  390. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/interface.rb +1 -33
  391. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/loader.rb +0 -0
  392. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/mail.rb +1 -1
  393. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/mailbox.rb +2 -3
  394. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/main.rb +0 -0
  395. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/mbox.rb +0 -0
  396. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/net.rb +1 -3
  397. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/obsolete.rb +0 -0
  398. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb +1476 -0
  399. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/port.rb +0 -0
  400. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/quoting.rb +1 -47
  401. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/require_arch.rb +0 -0
  402. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/scanner.rb +0 -0
  403. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/scanner_r.rb +1 -2
  404. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/stringio.rb +0 -0
  405. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/utils.rb +25 -50
  406. data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.7 → tmail-1.2.3}/tmail/version.rb +1 -1
  407. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb +2 -2
  408. data/vendor/rails/actionmailer/lib/action_mailer/version.rb +1 -1
  409. data/vendor/rails/actionmailer/lib/actionmailer.rb +0 -1
  410. data/vendor/rails/actionmailer/pkg/actionmailer-3.0.pre.gem +0 -0
  411. data/vendor/rails/actionmailer/test/abstract_unit.rb +4 -4
  412. data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +1 -1
  413. data/vendor/rails/actionmailer/test/mail_service_test.rb +3 -69
  414. data/vendor/rails/actionmailer/test/quoting_test.rb +4 -10
  415. data/vendor/rails/actionpack/CHANGELOG +0 -67
  416. data/vendor/rails/actionpack/MIT-LICENSE +1 -1
  417. data/vendor/rails/actionpack/README +7 -7
  418. data/vendor/rails/actionpack/Rakefile +2 -2
  419. data/vendor/rails/actionpack/lib/action_controller.rb +2 -4
  420. data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +3 -19
  421. data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +9 -18
  422. data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +10 -16
  423. data/vendor/rails/actionpack/lib/action_controller/base.rb +15 -15
  424. data/vendor/rails/actionpack/lib/action_controller/caching.rb +0 -1
  425. data/vendor/rails/actionpack/lib/action_controller/caching/fragments.rb +6 -6
  426. data/vendor/rails/actionpack/lib/action_controller/cookies.rb +1 -98
  427. data/vendor/rails/actionpack/lib/action_controller/failsafe.rb +0 -1
  428. data/vendor/rails/actionpack/lib/action_controller/flash.rb +0 -42
  429. data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +2 -3
  430. data/vendor/rails/actionpack/lib/action_controller/integration.rb +4 -20
  431. data/vendor/rails/actionpack/lib/action_controller/layout.rb +1 -6
  432. data/vendor/rails/actionpack/lib/action_controller/middlewares.rb +0 -2
  433. data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +22 -7
  434. data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +2 -6
  435. data/vendor/rails/actionpack/lib/action_controller/rescue.rb +2 -2
  436. data/vendor/rails/actionpack/lib/action_controller/response.rb +8 -6
  437. data/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb +0 -1
  438. data/vendor/rails/actionpack/lib/action_controller/session/abstract_store.rb +0 -6
  439. data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +0 -6
  440. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.erb +2 -2
  441. data/vendor/rails/actionpack/lib/action_controller/test_case.rb +1 -6
  442. data/vendor/rails/actionpack/lib/action_controller/test_process.rb +1 -1
  443. data/vendor/rails/actionpack/lib/action_controller/translation.rb +2 -2
  444. data/vendor/rails/actionpack/lib/action_controller/uploaded_file.rb +2 -2
  445. data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +1 -4
  446. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +1 -1
  447. data/vendor/rails/actionpack/lib/action_pack.rb +1 -1
  448. data/vendor/rails/actionpack/lib/action_pack/version.rb +1 -1
  449. data/vendor/rails/actionpack/lib/action_view.rb +4 -4
  450. data/vendor/rails/actionpack/lib/action_view/base.rb +1 -6
  451. data/vendor/rails/{activesupport/lib/active_support/core_ext/string/output_safety.rb → actionpack/lib/action_view/erb/util.rb} +1 -75
  452. data/vendor/rails/actionpack/lib/action_view/helpers.rb +0 -2
  453. data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +11 -11
  454. data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +2 -2
  455. data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +1 -1
  456. data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +23 -36
  457. data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +2 -2
  458. data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +21 -79
  459. data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +4 -3
  460. data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +4 -7
  461. data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +1 -1
  462. data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +2 -7
  463. data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +2 -2
  464. data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +2 -2
  465. data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +5 -6
  466. data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +5 -5
  467. data/vendor/rails/actionpack/lib/action_view/helpers/translation_helper.rb +10 -38
  468. data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +10 -8
  469. data/vendor/rails/actionpack/lib/action_view/locale/en.yml +0 -3
  470. data/vendor/rails/actionpack/lib/action_view/partials.rb +1 -2
  471. data/vendor/rails/actionpack/lib/action_view/paths.rb +0 -8
  472. data/vendor/rails/actionpack/lib/action_view/renderable.rb +2 -16
  473. data/vendor/rails/actionpack/lib/action_view/template.rb +2 -8
  474. data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +4 -7
  475. data/vendor/rails/actionpack/lib/action_view/test_case.rb +26 -101
  476. data/vendor/rails/actionpack/lib/actionpack.rb +0 -1
  477. data/vendor/rails/actionpack/pkg/actionpack-3.0.pre.gem +0 -0
  478. data/vendor/rails/actionpack/test/abstract_unit.rb +8 -8
  479. data/vendor/rails/actionpack/test/active_record_unit.rb +1 -1
  480. data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +1 -3
  481. data/vendor/rails/actionpack/test/controller/assert_select_test.rb +5 -6
  482. data/vendor/rails/actionpack/test/controller/caching_test.rb +2 -16
  483. data/vendor/rails/actionpack/test/controller/capture_test.rb +1 -1
  484. data/vendor/rails/actionpack/test/controller/cookie_test.rb +1 -44
  485. data/vendor/rails/actionpack/test/controller/filter_params_test.rb +0 -1
  486. data/vendor/rails/actionpack/test/controller/flash_test.rb +1 -28
  487. data/vendor/rails/actionpack/test/controller/helper_test.rb +1 -1
  488. data/vendor/rails/actionpack/test/controller/html-scanner/sanitizer_test.rb +0 -1
  489. data/vendor/rails/actionpack/test/controller/http_digest_authentication_test.rb +0 -22
  490. data/vendor/rails/actionpack/test/controller/integration_test.rb +1 -38
  491. data/vendor/rails/actionpack/test/controller/layout_test.rb +0 -11
  492. data/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb +0 -4
  493. data/vendor/rails/actionpack/test/controller/rack_test.rb +4 -1
  494. data/vendor/rails/actionpack/test/controller/render_test.rb +2 -11
  495. data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +1 -19
  496. data/vendor/rails/actionpack/test/controller/rescue_test.rb +2 -8
  497. data/vendor/rails/actionpack/test/controller/routing_test.rb +15 -24
  498. data/vendor/rails/actionpack/test/controller/send_file_test.rb +1 -1
  499. data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +2 -2
  500. data/vendor/rails/actionpack/test/controller/session/test_session_test.rb +2 -2
  501. data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +6 -10
  502. data/vendor/rails/actionpack/test/fixtures/test/capturing.erb +2 -2
  503. data/vendor/rails/actionpack/test/fixtures/test/utf8.html.erb +2 -4
  504. data/vendor/rails/actionpack/test/template/active_record_helper_i18n_test.rb +2 -9
  505. data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +1 -1
  506. data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +1 -12
  507. data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +6 -6
  508. data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +1 -2
  509. data/vendor/rails/actionpack/test/template/date_helper_i18n_test.rb +9 -10
  510. data/vendor/rails/actionpack/test/template/date_helper_test.rb +13 -147
  511. data/vendor/rails/actionpack/test/template/erb_util_test.rb +0 -12
  512. data/vendor/rails/actionpack/test/template/form_helper_test.rb +12 -146
  513. data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +9 -21
  514. data/vendor/rails/actionpack/test/template/number_helper_test.rb +0 -4
  515. data/vendor/rails/actionpack/test/template/render_test.rb +8 -47
  516. data/vendor/rails/actionpack/test/template/sanitize_helper_test.rb +1 -10
  517. data/vendor/rails/actionpack/test/template/tag_helper_test.rb +0 -1
  518. data/vendor/rails/actionpack/test/template/text_helper_test.rb +1 -26
  519. data/vendor/rails/actionpack/test/template/translation_helper_test.rb +9 -72
  520. data/vendor/rails/actionpack/test/template/url_helper_test.rb +1 -20
  521. data/vendor/rails/actionpack/test/view/test_case_test.rb +4 -172
  522. data/vendor/rails/activemodel/pkg/activemodel-3.0.pre.gem +0 -0
  523. data/vendor/rails/activerecord/CHANGELOG +0 -51
  524. data/vendor/rails/activerecord/Rakefile +1 -1
  525. data/vendor/rails/activerecord/lib/active_record.rb +2 -1
  526. data/vendor/rails/activerecord/lib/active_record/association_preload.rb +2 -9
  527. data/vendor/rails/activerecord/lib/active_record/associations.rb +44 -57
  528. data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +11 -15
  529. data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +9 -18
  530. data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +1 -11
  531. data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +10 -34
  532. data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +2 -2
  533. data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +0 -5
  534. data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +5 -5
  535. data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +1 -19
  536. data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +1 -5
  537. data/vendor/rails/activerecord/lib/active_record/autosave_association.rb +48 -88
  538. data/vendor/rails/activerecord/lib/active_record/base.rb +36 -84
  539. data/vendor/rails/activerecord/lib/active_record/batches.rb +9 -13
  540. data/vendor/rails/activerecord/lib/active_record/calculations.rb +3 -6
  541. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +3 -3
  542. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +1 -1
  543. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +7 -3
  544. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +1 -1
  545. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +10 -64
  546. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +0 -2
  547. data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +3 -37
  548. data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +66 -31
  549. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +5 -5
  550. data/vendor/rails/activerecord/lib/active_record/dirty.rb +2 -2
  551. data/vendor/rails/activerecord/lib/active_record/fixtures.rb +1 -2
  552. data/vendor/rails/activerecord/lib/active_record/i18n_interpolation_deprecation.rb +26 -0
  553. data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +18 -18
  554. data/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb +22 -0
  555. data/vendor/rails/activerecord/lib/active_record/migration.rb +0 -5
  556. data/vendor/rails/activerecord/lib/active_record/nested_attributes.rb +60 -135
  557. data/vendor/rails/activerecord/lib/active_record/reflection.rb +1 -66
  558. data/vendor/rails/activerecord/lib/active_record/schema.rb +1 -5
  559. data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +0 -3
  560. data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +1 -1
  561. data/vendor/rails/activerecord/lib/active_record/validations.rb +36 -48
  562. data/vendor/rails/activerecord/lib/active_record/version.rb +1 -1
  563. data/vendor/rails/activerecord/lib/activerecord.rb +0 -1
  564. data/vendor/rails/activerecord/pkg/activerecord-3.0.pre.gem +0 -0
  565. data/vendor/rails/activerecord/test/cases/active_schema_test_mysql.rb +0 -22
  566. data/vendor/rails/activerecord/test/cases/associations/belongs_to_associations_test.rb +0 -13
  567. data/vendor/rails/activerecord/test/cases/associations/eager_load_nested_include_test.rb +7 -8
  568. data/vendor/rails/activerecord/test/cases/associations/eager_test.rb +1 -7
  569. data/vendor/rails/activerecord/test/cases/associations/has_many_associations_test.rb +0 -38
  570. data/vendor/rails/activerecord/test/cases/associations/has_many_through_associations_test.rb +0 -22
  571. data/vendor/rails/activerecord/test/cases/associations/has_one_associations_test.rb +0 -21
  572. data/vendor/rails/activerecord/test/cases/associations_test.rb +0 -10
  573. data/vendor/rails/activerecord/test/cases/autosave_association_test.rb +21 -316
  574. data/vendor/rails/activerecord/test/cases/base_test.rb +0 -31
  575. data/vendor/rails/activerecord/test/cases/batches_test.rb +0 -20
  576. data/vendor/rails/activerecord/test/cases/calculations_test.rb +3 -2
  577. data/vendor/rails/activerecord/test/cases/connection_test_mysql.rb +0 -8
  578. data/vendor/rails/activerecord/test/cases/finder_test.rb +3 -19
  579. data/vendor/rails/activerecord/test/cases/fixtures_test.rb +2 -7
  580. data/vendor/rails/activerecord/test/cases/json_serialization_test.rb +0 -14
  581. data/vendor/rails/activerecord/test/cases/locking_test.rb +3 -30
  582. data/vendor/rails/activerecord/test/cases/migration_test.rb +0 -115
  583. data/vendor/rails/activerecord/test/cases/modules_test.rb +0 -28
  584. data/vendor/rails/activerecord/test/cases/named_scope_test.rb +1 -1
  585. data/vendor/rails/activerecord/test/cases/nested_attributes_test.rb +38 -342
  586. data/vendor/rails/activerecord/test/cases/query_cache_test.rb +1 -7
  587. data/vendor/rails/activerecord/test/cases/reflection_test.rb +10 -50
  588. data/vendor/rails/activerecord/test/cases/schema_test_postgresql.rb +2 -2
  589. data/vendor/rails/activerecord/test/cases/validations_i18n_test.rb +36 -14
  590. data/vendor/rails/activerecord/test/cases/validations_test.rb +10 -70
  591. data/vendor/rails/activerecord/test/fixtures/accounts.yml +0 -1
  592. data/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite +0 -0
  593. data/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite3 +0 -0
  594. data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite +0 -0
  595. data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite3 +0 -0
  596. data/vendor/rails/activerecord/test/models/author.rb +0 -3
  597. data/vendor/rails/activerecord/test/models/bird.rb +0 -6
  598. data/vendor/rails/activerecord/test/models/company.rb +0 -10
  599. data/vendor/rails/activerecord/test/models/company_in_module.rb +0 -17
  600. data/vendor/rails/activerecord/test/models/parrot.rb +0 -6
  601. data/vendor/rails/activerecord/test/models/pirate.rb +2 -19
  602. data/vendor/rails/activerecord/test/models/ship.rb +1 -10
  603. data/vendor/rails/activerecord/test/models/ship_part.rb +1 -3
  604. data/vendor/rails/activerecord/test/models/treasure.rb +0 -2
  605. data/vendor/rails/activerecord/test/schema/mysql_specific_schema.rb +0 -12
  606. data/vendor/rails/activerecord/test/schema/schema.rb +0 -42
  607. data/vendor/rails/activeresource/CHANGELOG +0 -24
  608. data/vendor/rails/activeresource/Rakefile +1 -1
  609. data/vendor/rails/activeresource/lib/active_resource/base.rb +2 -11
  610. data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +2 -2
  611. data/vendor/rails/activeresource/lib/active_resource/validations.rb +3 -3
  612. data/vendor/rails/activeresource/lib/active_resource/version.rb +1 -1
  613. data/vendor/rails/activeresource/lib/activeresource.rb +0 -1
  614. data/vendor/rails/activeresource/pkg/activeresource-3.0.pre.gem +0 -0
  615. data/vendor/rails/activeresource/test/abstract_unit.rb +2 -2
  616. data/vendor/rails/activeresource/test/base_errors_test.rb +2 -15
  617. data/vendor/rails/activeresource/test/base_test.rb +0 -49
  618. data/vendor/rails/activeresource/test/debug.log +2939 -75315
  619. data/vendor/rails/activesupport/CHANGELOG +0 -45
  620. data/vendor/rails/activesupport/lib/active_support.rb +0 -1
  621. data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +1 -1
  622. data/vendor/rails/activesupport/lib/active_support/cache.rb +0 -7
  623. data/vendor/rails/activesupport/lib/active_support/cache/mem_cache_store.rb +0 -5
  624. data/vendor/rails/activesupport/lib/active_support/cache/memory_store.rb +1 -7
  625. data/vendor/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb +6 -6
  626. data/vendor/rails/activesupport/lib/active_support/core_ext.rb +3 -7
  627. data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +1 -1
  628. data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +1 -11
  629. data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +58 -2
  630. data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +28 -35
  631. data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +4 -14
  632. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +3 -14
  633. data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +0 -6
  634. data/vendor/rails/activesupport/lib/active_support/core_ext/file/atomic.rb +1 -2
  635. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +0 -1
  636. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb +1 -1
  637. data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +1 -1
  638. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +1 -1
  639. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +26 -33
  640. data/vendor/rails/activesupport/lib/active_support/core_ext/module/synchronization.rb +1 -1
  641. data/vendor/rails/activesupport/lib/active_support/core_ext/name_error.rb +1 -3
  642. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/conversions.rb +2 -2
  643. data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +0 -2
  644. data/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb +5 -6
  645. data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +0 -1
  646. data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +4 -2
  647. data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +4 -8
  648. data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +4 -14
  649. data/vendor/rails/activesupport/lib/active_support/deprecation.rb +3 -4
  650. data/vendor/rails/activesupport/lib/active_support/inflections.rb +1 -1
  651. data/vendor/rails/activesupport/lib/active_support/inflector.rb +2 -5
  652. data/vendor/rails/activesupport/lib/active_support/json/backends/jsongem.rb +3 -2
  653. data/vendor/rails/activesupport/lib/active_support/json/backends/yaml.rb +12 -11
  654. data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +1 -18
  655. data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +2 -11
  656. data/vendor/rails/activesupport/lib/active_support/memoizable.rb +1 -1
  657. data/vendor/rails/activesupport/lib/active_support/message_verifier.rb +10 -30
  658. data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +1 -1
  659. data/vendor/rails/activesupport/lib/active_support/multibyte/unicode_database.rb +2 -2
  660. data/vendor/rails/activesupport/lib/active_support/multibyte/utils.rb +9 -8
  661. data/vendor/rails/activesupport/lib/active_support/ordered_hash.rb +11 -35
  662. data/vendor/rails/activesupport/lib/active_support/testing/assertions.rb +0 -14
  663. data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +76 -84
  664. data/vendor/rails/activesupport/lib/active_support/vendor.rb +3 -11
  665. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/MIT-LICENSE +20 -0
  666. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/README.textile +20 -0
  667. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/Rakefile +5 -0
  668. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/i18n.gemspec +27 -0
  669. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.1.3/lib}/i18n.rb +39 -175
  670. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb +214 -0
  671. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.1.3/lib}/i18n/exceptions.rb +7 -15
  672. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/all.rb +5 -0
  673. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/i18n_exceptions_test.rb +99 -0
  674. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/i18n_test.rb +124 -0
  675. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/locale/en.rb +1 -0
  676. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/locale/en.yml +3 -0
  677. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb +567 -0
  678. data/vendor/rails/activesupport/lib/active_support/version.rb +1 -1
  679. data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +2 -8
  680. data/vendor/rails/activesupport/lib/active_support/xml_mini/libxml.rb +83 -23
  681. data/vendor/rails/activesupport/lib/active_support/xml_mini/nokogiri.rb +29 -24
  682. data/vendor/rails/activesupport/lib/activesupport.rb +0 -1
  683. data/vendor/rails/activesupport/pkg/activesupport-3.0.pre.gem +0 -0
  684. data/vendor/rails/pkg/rails-3.0.pre.gem +0 -0
  685. data/vendor/rails/railties/CHANGELOG +0 -22
  686. data/vendor/rails/railties/MIT-LICENSE +1 -1
  687. data/vendor/rails/railties/Rakefile +6 -6
  688. data/vendor/rails/railties/bin/rails +5 -6
  689. data/vendor/rails/railties/builtin/rails_info/rails/info.rb +1 -1
  690. data/vendor/rails/railties/guides/source/getting_started.textile +2 -2
  691. data/vendor/rails/railties/lib/commands/dbconsole.rb +1 -1
  692. data/vendor/rails/railties/lib/commands/plugin.rb +1 -1
  693. data/vendor/rails/railties/lib/commands/runner.rb +1 -1
  694. data/vendor/rails/railties/lib/dispatcher.rb +1 -1
  695. data/vendor/rails/railties/lib/rails/gem_dependency.rb +4 -11
  696. data/vendor/rails/railties/lib/rails/rack/debugger.rb +0 -2
  697. data/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb +1 -1
  698. data/vendor/rails/railties/lib/rails/version.rb +1 -1
  699. data/vendor/rails/railties/lib/rails_generator.rb +2 -5
  700. data/vendor/rails/railties/lib/rails_generator/generated_attribute.rb +6 -7
  701. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +0 -3
  702. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +5 -9
  703. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +2 -2
  704. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +4 -2
  705. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb +1 -1
  706. data/vendor/rails/railties/lib/rails_generator/options.rb +7 -7
  707. data/vendor/rails/railties/lib/tasks/databases.rake +14 -14
  708. data/vendor/rails/railties/lib/tasks/framework.rake +1 -4
  709. data/vendor/rails/railties/lib/tasks/rails.rb +1 -7
  710. data/vendor/rails/railties/pkg/railties-3.0.pre.gem +0 -0
  711. metadata +183 -804
  712. data/app/views/admin/references/filters.haml +0 -6
  713. data/app/views/admin/references/tags.haml +0 -30
  714. data/app/views/admin/users/_avatar.html.haml +0 -3
  715. data/app/views/admin/users/_password_fields.html.haml +0 -18
  716. data/config/cucumber.yml +0 -7
  717. data/config/environments/cucumber.rb +0 -29
  718. data/config/initializers/haml.rb +0 -2
  719. data/config/locales/en.yml +0 -190
  720. data/config/locales/en_available_tags.yml +0 -533
  721. data/db/migrate/20090226140109_add_user_language.rb +0 -9
  722. data/db/migrate/20090929164633_rename_developer_role_to_designer.rb +0 -9
  723. data/db/migrate/20091003095744_change_user_language_to_locale.rb +0 -9
  724. data/features/admin/resource_pagination.feature +0 -27
  725. data/features/step_definitions/admin/pagination_steps.rb +0 -46
  726. data/features/step_definitions/web_steps.rb +0 -273
  727. data/features/support/dataset.rb +0 -9
  728. data/files +0 -7283
  729. data/lib/generators/extension/templates/en.yml +0 -3
  730. data/lib/generators/extension/templates/routes.rb +0 -5
  731. data/lib/generators/language_extension/USAGE +0 -27
  732. data/lib/generators/language_extension/language_extension_generator.rb +0 -49
  733. data/lib/generators/language_extension/templates/README +0 -3
  734. data/lib/generators/language_extension/templates/RSpecRakefile +0 -123
  735. data/lib/generators/language_extension/templates/Rakefile +0 -25
  736. data/lib/generators/language_extension/templates/available_tags.yml +0 -553
  737. data/lib/generators/language_extension/templates/cucumber.yml +0 -1
  738. data/lib/generators/language_extension/templates/cucumber_env.rb +0 -16
  739. data/lib/generators/language_extension/templates/cucumber_paths.rb +0 -14
  740. data/lib/generators/language_extension/templates/extension.rb +0 -8
  741. data/lib/generators/language_extension/templates/functional_test.rb +0 -15
  742. data/lib/generators/language_extension/templates/lang.yml +0 -181
  743. data/lib/generators/language_extension/templates/spec.opts +0 -6
  744. data/lib/generators/language_extension/templates/spec_helper.rb +0 -36
  745. data/lib/generators/language_extension/templates/tasks.rake +0 -28
  746. data/lib/generators/language_extension/templates/test_helper.rb +0 -26
  747. data/lib/radiant/available_locales.rb +0 -31
  748. data/lib/radiant/pagination/controller.rb +0 -34
  749. data/lib/radiant/pagination/link_renderer.rb +0 -34
  750. data/lib/tasks/ci.rake +0 -17
  751. data/lib/tasks/prototype.rake +0 -34
  752. data/lib/tasks/translate.rake +0 -59
  753. data/lib/translation_support.rb +0 -54
  754. data/public/images/admin/add_tab.png +0 -0
  755. data/public/images/admin/avatar_32x32.png +0 -0
  756. data/public/images/admin/avatar_96x96.png +0 -0
  757. data/public/images/admin/buttons_background.png +0 -0
  758. data/public/images/admin/calendar_down.gif +0 -0
  759. data/public/images/admin/draft_page.png +0 -0
  760. data/public/images/admin/login_shadow.png +0 -0
  761. data/public/images/admin/metadata_toggle.png +0 -0
  762. data/public/images/admin/minus_disabled.png +0 -0
  763. data/public/images/admin/minus_grey.png +0 -0
  764. data/public/images/admin/navigation_background.gif +0 -0
  765. data/public/images/admin/navigation_secondary_background.png +0 -0
  766. data/public/images/admin/navigation_secondary_separator.gif +0 -0
  767. data/public/images/admin/navigation_shadow.png +0 -0
  768. data/public/images/admin/navigation_tabs.png +0 -0
  769. data/public/images/admin/plus_grey.png +0 -0
  770. data/public/images/admin/popup_border_background.png +0 -0
  771. data/public/images/admin/popup_border_bottom_left.png +0 -0
  772. data/public/images/admin/popup_border_bottom_right.png +0 -0
  773. data/public/images/admin/popup_border_top_left.png +0 -0
  774. data/public/images/admin/popup_border_top_right.png +0 -0
  775. data/public/images/admin/shadow.png +0 -0
  776. data/public/images/admin/shadow_grey.png +0 -0
  777. data/public/images/admin/single_form_shadow.png +0 -0
  778. data/public/images/admin/spacer.gif +0 -0
  779. data/public/images/admin/status_background.png +0 -0
  780. data/public/images/admin/status_bottom_left.png +0 -0
  781. data/public/images/admin/status_bottom_right.png +0 -0
  782. data/public/images/admin/status_spinner.gif +0 -0
  783. data/public/images/admin/status_top_left.png +0 -0
  784. data/public/images/admin/status_top_right.png +0 -0
  785. data/public/images/admin/tab_close.png +0 -0
  786. data/public/images/admin/vertical_tan_gradient.png +0 -0
  787. data/public/images/admin/view_site.png +0 -0
  788. data/public/images/admin/virtual_page.png +0 -0
  789. data/public/images/radiant-badge-color.png +0 -0
  790. data/public/javascripts/admin/application.js +0 -85
  791. data/public/javascripts/admin/codearea.js +0 -165
  792. data/public/javascripts/admin/cookie.js +0 -80
  793. data/public/javascripts/admin/dateinput.js +0 -402
  794. data/public/javascripts/admin/lowpro.js +0 -340
  795. data/public/javascripts/admin/overrides.js +0 -1
  796. data/public/javascripts/admin/pagestatus.js +0 -17
  797. data/public/javascripts/admin/popup.js +0 -216
  798. data/public/javascripts/admin/shortcuts.js +0 -27
  799. data/public/javascripts/admin/status.js +0 -233
  800. data/public/javascripts/admin/toggle.js +0 -430
  801. data/public/javascripts/admin/utility.js +0 -52
  802. data/public/javascripts/admin/validationerror.js +0 -18
  803. data/public/stylesheets/admin/overrides.css +0 -1
  804. data/public/stylesheets/sass/admin/main.sass +0 -27
  805. data/public/stylesheets/sass/admin/modules/_grid.sass +0 -56
  806. data/public/stylesheets/sass/admin/modules/_links.sass +0 -15
  807. data/public/stylesheets/sass/admin/modules/_opacity.sass +0 -7
  808. data/public/stylesheets/sass/admin/modules/_rounded.sass +0 -41
  809. data/public/stylesheets/sass/admin/modules/_shadow.sass +0 -9
  810. data/public/stylesheets/sass/admin/overrides.sass +0 -2
  811. data/public/stylesheets/sass/admin/partials/_actions.sass +0 -83
  812. data/public/stylesheets/sass/admin/partials/_avatars.sass +0 -10
  813. data/public/stylesheets/sass/admin/partials/_base.sass +0 -59
  814. data/public/stylesheets/sass/admin/partials/_content.sass +0 -199
  815. data/public/stylesheets/sass/admin/partials/_dateinput.sass +0 -62
  816. data/public/stylesheets/sass/admin/partials/_deprecated.sass +0 -26
  817. data/public/stylesheets/sass/admin/partials/_footer.sass +0 -12
  818. data/public/stylesheets/sass/admin/partials/_forms.sass +0 -309
  819. data/public/stylesheets/sass/admin/partials/_header.sass +0 -112
  820. data/public/stylesheets/sass/admin/partials/_layout.sass +0 -10
  821. data/public/stylesheets/sass/admin/partials/_messages.sass +0 -10
  822. data/public/stylesheets/sass/admin/partials/_popup.sass +0 -117
  823. data/public/stylesheets/sass/admin/partials/_reset.sass +0 -36
  824. data/public/stylesheets/sass/admin/partials/_tabcontrol.sass +0 -70
  825. data/public/stylesheets/sass/admin/partials/_toolbar.sass +0 -31
  826. data/public/stylesheets/sass/admin/partials/_validations.sass +0 -21
  827. data/rerun.txt +0 -1
  828. data/spec/controllers/admin/paginated_controller_spec.rb +0 -26
  829. data/spec/generators/instance_generator_spec.rb +0 -152
  830. data/spec/lib/radiant/admin_ui/nav_tabs_spec.rb +0 -139
  831. data/spec/lib/radiant/available_locales_spec.rb +0 -13
  832. data/spec/lib/translation_support_spec.rb +0 -16
  833. data/test/fixtures/extensions/locale/config/locales/en-uk.yml +0 -3
  834. data/test/fixtures/extensions/locale/config/locales/en.yml +0 -3
  835. data/test/fixtures/extensions/locale/locale_extension.rb +0 -5
  836. data/test/fixtures/extensions/routed/config/routes.rb +0 -1
  837. data/test/fixtures/extensions/routed/routed_extension.rb +0 -2
  838. data/test/fixtures/gems/misnamed_ext-0.0.0/misnamed_ext_extension.rb +0 -2
  839. data/test/fixtures/gems/radiant-gem_ext-extension-0.0.0/gem_ext_extension.rb +0 -2
  840. data/test/fixtures/gems/radiant-gem_ext-extension-0.0.0/lib/gem_ext.rb +0 -3
  841. data/vendor/extensions/dutch_language_pack/README +0 -3
  842. data/vendor/extensions/dutch_language_pack/Rakefile +0 -123
  843. data/vendor/extensions/dutch_language_pack/config/locales/nl.yml +0 -187
  844. data/vendor/extensions/dutch_language_pack/config/locales/nl_available_tags.yml +0 -553
  845. data/vendor/extensions/dutch_language_pack/dutch_language_pack_extension.rb +0 -9
  846. data/vendor/extensions/dutch_language_pack/lib/tasks/i18n_nl_extension_tasks.rake +0 -28
  847. data/vendor/extensions/french_language_pack/README +0 -3
  848. data/vendor/extensions/french_language_pack/Rakefile +0 -123
  849. data/vendor/extensions/french_language_pack/config/locales/fr.yml +0 -190
  850. data/vendor/extensions/french_language_pack/config/locales/fr_available_tags.yml +0 -553
  851. data/vendor/extensions/french_language_pack/french_language_pack_extension.rb +0 -9
  852. data/vendor/extensions/french_language_pack/lib/tasks/i18n_fr_extension_tasks.rake +0 -28
  853. data/vendor/extensions/german_language_pack/README +0 -4
  854. data/vendor/extensions/german_language_pack/Rakefile +0 -123
  855. data/vendor/extensions/german_language_pack/config/locales/de.yml +0 -186
  856. data/vendor/extensions/german_language_pack/config/locales/de_available_tags.yml +0 -624
  857. data/vendor/extensions/german_language_pack/german_language_pack_extension.rb +0 -9
  858. data/vendor/extensions/german_language_pack/lib/tasks/i18n_de_extension_tasks.rake +0 -28
  859. data/vendor/extensions/italian_language_pack/README +0 -3
  860. data/vendor/extensions/italian_language_pack/Rakefile +0 -123
  861. data/vendor/extensions/italian_language_pack/config/locales/it.yml +0 -184
  862. data/vendor/extensions/italian_language_pack/config/locales/it_available_tags.yml +0 -553
  863. data/vendor/extensions/italian_language_pack/italian_language_pack_extension.rb +0 -8
  864. data/vendor/extensions/italian_language_pack/lib/tasks/i18n_it_extension_tasks.rake +0 -28
  865. data/vendor/extensions/japanese_language_pack/README +0 -3
  866. data/vendor/extensions/japanese_language_pack/Rakefile +0 -123
  867. data/vendor/extensions/japanese_language_pack/config/locales/ja.yml +0 -184
  868. data/vendor/extensions/japanese_language_pack/config/locales/ja_available_tags.yml +0 -553
  869. data/vendor/extensions/japanese_language_pack/japanese_language_pack_extension.rb +0 -9
  870. data/vendor/extensions/japanese_language_pack/lib/tasks/i18n_ja_extension_tasks.rake +0 -28
  871. data/vendor/extensions/markdown_filter/vendor/kramdown/AUTHORS +0 -1
  872. data/vendor/extensions/markdown_filter/vendor/kramdown/CONTRIBUTERS +0 -4
  873. data/vendor/extensions/markdown_filter/vendor/kramdown/COPYING +0 -24
  874. data/vendor/extensions/markdown_filter/vendor/kramdown/ChangeLog +0 -3956
  875. data/vendor/extensions/markdown_filter/vendor/kramdown/GPL +0 -674
  876. data/vendor/extensions/markdown_filter/vendor/kramdown/README +0 -30
  877. data/vendor/extensions/markdown_filter/vendor/kramdown/Rakefile +0 -342
  878. data/vendor/extensions/markdown_filter/vendor/kramdown/VERSION +0 -1
  879. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/benchmark.rb +0 -34
  880. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/generate_data.rb +0 -112
  881. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/historic-jruby-1.4.0.dat +0 -7
  882. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/historic-ruby-1.8.6.dat +0 -7
  883. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/historic-ruby-1.8.7.dat +0 -7
  884. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/historic-ruby-1.9.1p243.dat +0 -7
  885. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/historic-ruby-1.9.2dev.dat +0 -7
  886. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/mdbasics.text +0 -306
  887. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/mdsyntax.text +0 -888
  888. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/static-jruby-1.4.0.dat +0 -7
  889. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/static-ruby-1.8.6.dat +0 -7
  890. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/static-ruby-1.8.7.dat +0 -7
  891. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/static-ruby-1.9.1p243.dat +0 -7
  892. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/static-ruby-1.9.2dev.dat +0 -7
  893. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/testing.sh +0 -9
  894. data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/timing.sh +0 -10
  895. data/vendor/extensions/markdown_filter/vendor/kramdown/bin/kramdown +0 -78
  896. data/vendor/extensions/markdown_filter/vendor/kramdown/data/kramdown/document.html +0 -9
  897. data/vendor/extensions/markdown_filter/vendor/kramdown/data/kramdown/document.latex +0 -43
  898. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/default.less.css +0 -510
  899. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/default.template +0 -71
  900. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/documentation.page +0 -72
  901. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/index.page +0 -63
  902. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/installation.page +0 -90
  903. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/links.markdown +0 -6
  904. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/news.feed +0 -10
  905. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/news.page +0 -28
  906. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/quickref.page +0 -564
  907. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/syntax.page +0 -1521
  908. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/tests.page +0 -51
  909. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/virtual +0 -2
  910. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown.rb +0 -23
  911. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/compatibility.rb +0 -34
  912. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter.rb +0 -41
  913. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter/base.rb +0 -111
  914. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter/html.rb +0 -397
  915. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter/latex.rb +0 -555
  916. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/document.rb +0 -164
  917. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/error.rb +0 -27
  918. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/options.rb +0 -282
  919. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser.rb +0 -39
  920. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/base.rb +0 -95
  921. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/html.rb +0 -387
  922. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown.rb +0 -301
  923. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/abbreviation.rb +0 -65
  924. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/attribute_list.rb +0 -103
  925. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/autolink.rb +0 -47
  926. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/blank_line.rb +0 -43
  927. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/blockquote.rb +0 -42
  928. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/codeblock.rb +0 -58
  929. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/codespan.rb +0 -57
  930. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/emphasis.rb +0 -70
  931. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/eob.rb +0 -39
  932. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/escaped_chars.rb +0 -38
  933. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/extension.rb +0 -101
  934. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/footnote.rb +0 -73
  935. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/header.rb +0 -66
  936. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/horizontal_rule.rb +0 -39
  937. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/html.rb +0 -173
  938. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/html_entity.rb +0 -38
  939. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/line_break.rb +0 -38
  940. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/link.rb +0 -153
  941. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/list.rb +0 -228
  942. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/math.rb +0 -53
  943. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/paragraph.rb +0 -44
  944. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/smart_quotes.rb +0 -214
  945. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/table.rb +0 -126
  946. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/typographic_symbol.rb +0 -52
  947. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/version.rb +0 -28
  948. data/vendor/extensions/markdown_filter/vendor/kramdown/man/man1/kramdown.1 +0 -222
  949. data/vendor/extensions/markdown_filter/vendor/kramdown/setup.rb +0 -1585
  950. data/vendor/extensions/markdown_filter/vendor/kramdown/test/run_tests.rb +0 -59
  951. data/vendor/extensions/markdown_filter/vendor/kramdown/test/test_files.rb +0 -100
  952. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/01_blank_line/spaces.html +0 -1
  953. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/01_blank_line/spaces.text +0 -3
  954. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/01_blank_line/tabs.html +0 -1
  955. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/01_blank_line/tabs.text +0 -6
  956. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/02_eob/beginning.html +0 -1
  957. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/02_eob/beginning.text +0 -3
  958. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/02_eob/end.html +0 -1
  959. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/02_eob/end.text +0 -3
  960. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/02_eob/middle.html +0 -2
  961. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/02_eob/middle.text +0 -5
  962. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/03_paragraph/indented.html +0 -18
  963. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/03_paragraph/indented.text +0 -19
  964. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/03_paragraph/no_newline_at_end.html +0 -5
  965. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/03_paragraph/no_newline_at_end.text +0 -5
  966. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/03_paragraph/one_para.html +0 -1
  967. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/03_paragraph/one_para.text +0 -1
  968. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/03_paragraph/two_para.html +0 -4
  969. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/03_paragraph/two_para.text +0 -4
  970. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/atx_header.html +0 -34
  971. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/atx_header.text +0 -32
  972. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/atx_header_no_newline_at_end.html +0 -1
  973. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/atx_header_no_newline_at_end.text +0 -1
  974. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/setext_header.html +0 -31
  975. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/setext_header.text +0 -36
  976. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/setext_header_no_newline_at_end.html +0 -1
  977. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/setext_header_no_newline_at_end.text +0 -2
  978. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/with_auto_id_prefix.html +0 -3
  979. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/with_auto_id_prefix.options +0 -2
  980. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/with_auto_id_prefix.text +0 -3
  981. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/with_auto_ids.html +0 -17
  982. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/with_auto_ids.options +0 -1
  983. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/with_auto_ids.text +0 -19
  984. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/indented.html +0 -25
  985. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/indented.text +0 -14
  986. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/nested.html +0 -9
  987. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/nested.text +0 -5
  988. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/no_newline_at_end.html +0 -4
  989. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/no_newline_at_end.text +0 -2
  990. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/only_first_quoted.html +0 -8
  991. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/only_first_quoted.text +0 -4
  992. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/with_code_blocks.html +0 -15
  993. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/with_code_blocks.text +0 -11
  994. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/error.html +0 -4
  995. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/error.text +0 -4
  996. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/no_newline_at_end.html +0 -2
  997. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/no_newline_at_end.text +0 -1
  998. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/normal.html +0 -13
  999. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/normal.text +0 -10
  1000. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/tilde_syntax.html +0 -7
  1001. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/tilde_syntax.text +0 -9
  1002. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/whitespace.html +0 -3
  1003. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/whitespace.text +0 -3
  1004. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/with_blank_line.html +0 -13
  1005. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/with_blank_line.text +0 -12
  1006. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/with_eob_marker.html +0 -6
  1007. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/with_eob_marker.text +0 -5
  1008. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/error.html +0 -7
  1009. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/error.text +0 -7
  1010. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/normal.html +0 -19
  1011. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/normal.text +0 -19
  1012. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/sepspaces.html +0 -3
  1013. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/sepspaces.text +0 -3
  1014. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/septabs.html +0 -3
  1015. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/septabs.text +0 -3
  1016. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/escaping.html +0 -17
  1017. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/escaping.text +0 -17
  1018. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/item_ial.html +0 -9
  1019. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/item_ial.text +0 -5
  1020. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/list_and_hr.html +0 -9
  1021. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/list_and_hr.text +0 -5
  1022. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/list_and_others.html +0 -38
  1023. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/list_and_others.text +0 -25
  1024. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/mixed.html +0 -117
  1025. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/mixed.text +0 -66
  1026. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/nested.html +0 -17
  1027. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/nested.text +0 -7
  1028. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/other_first_element.html +0 -39
  1029. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/other_first_element.text +0 -18
  1030. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/simple_ol.html +0 -19
  1031. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/simple_ol.text +0 -13
  1032. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/simple_ul.html +0 -61
  1033. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/simple_ul.text +0 -43
  1034. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/single_item.html +0 -3
  1035. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/single_item.text +0 -1
  1036. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/special_cases.html +0 -78
  1037. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/special_cases.text +0 -48
  1038. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/comment.html +0 -18
  1039. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/comment.text +0 -15
  1040. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/content_model/deflists.html +0 -6
  1041. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/content_model/deflists.options +0 -1
  1042. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/content_model/deflists.text +0 -6
  1043. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/content_model/tables.html +0 -14
  1044. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/content_model/tables.options +0 -1
  1045. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/content_model/tables.text +0 -14
  1046. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/filtered_html.html +0 -1
  1047. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/filtered_html.options +0 -1
  1048. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/filtered_html.text +0 -1
  1049. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_and_codeblocks.html +0 -15
  1050. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_and_codeblocks.options +0 -1
  1051. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_and_codeblocks.text +0 -13
  1052. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/code.html +0 -10
  1053. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/code.text +0 -9
  1054. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/comment.html +0 -7
  1055. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/comment.text +0 -8
  1056. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/emphasis.html +0 -1
  1057. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/emphasis.text +0 -1
  1058. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/entity.html +0 -1
  1059. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/entity.text +0 -1
  1060. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/header.html +0 -6
  1061. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/header.options +0 -2
  1062. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/header.text +0 -6
  1063. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_dl.html +0 -8
  1064. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_dl.text +0 -8
  1065. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_ol.html +0 -15
  1066. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_ol.text +0 -17
  1067. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_ul.html +0 -19
  1068. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_ul.text +0 -22
  1069. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/options +0 -1
  1070. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/paragraph.html +0 -3
  1071. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/paragraph.text +0 -4
  1072. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_normal.html +0 -13
  1073. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_normal.text +0 -12
  1074. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_simple.html +0 -10
  1075. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_simple.text +0 -14
  1076. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/typography.html +0 -1
  1077. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/typography.text +0 -1
  1078. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/invalid_html_1.html +0 -3
  1079. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/invalid_html_1.text +0 -5
  1080. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/invalid_html_2.html +0 -5
  1081. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/invalid_html_2.text +0 -5
  1082. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/markdown_attr.html +0 -38
  1083. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/markdown_attr.text +0 -38
  1084. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/not_parsed.html +0 -24
  1085. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/not_parsed.text +0 -24
  1086. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_as_raw.html +0 -30
  1087. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_as_raw.options +0 -1
  1088. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_as_raw.text +0 -29
  1089. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_as_span.html +0 -12
  1090. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_as_span.options +0 -1
  1091. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_as_span.text +0 -9
  1092. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_block_html.html +0 -21
  1093. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_block_html.options +0 -1
  1094. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_block_html.text +0 -17
  1095. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/processing_instruction.html +0 -13
  1096. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/processing_instruction.text +0 -12
  1097. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/simple.html +0 -62
  1098. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/simple.options +0 -1
  1099. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/simple.text +0 -57
  1100. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/10_ald/simple.html +0 -2
  1101. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/10_ald/simple.text +0 -8
  1102. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/auto_id_and_ial.html +0 -1
  1103. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/auto_id_and_ial.options +0 -1
  1104. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/auto_id_and_ial.text +0 -2
  1105. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/simple.html +0 -25
  1106. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/simple.text +0 -34
  1107. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/comment.html +0 -5
  1108. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/comment.text +0 -11
  1109. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/ignored.html +0 -4
  1110. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/ignored.text +0 -8
  1111. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/nomarkdown.html +0 -6
  1112. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/nomarkdown.text +0 -11
  1113. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options.html +0 -24
  1114. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options.text +0 -27
  1115. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options2.html +0 -10
  1116. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options2.text +0 -5
  1117. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options3.html +0 -7
  1118. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options3.text +0 -7
  1119. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/definition_at_beginning.html +0 -1
  1120. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/definition_at_beginning.text +0 -1
  1121. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/multiple_terms.html +0 -13
  1122. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/multiple_terms.text +0 -10
  1123. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/no_def_list.html +0 -2
  1124. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/no_def_list.text +0 -2
  1125. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/para_wrapping.html +0 -10
  1126. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/para_wrapping.text +0 -6
  1127. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/separated_by_eob.html +0 -8
  1128. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/separated_by_eob.text +0 -5
  1129. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/simple.html +0 -8
  1130. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/simple.text +0 -7
  1131. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/styled_terms.html +0 -4
  1132. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/styled_terms.text +0 -2
  1133. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/too_much_space.html +0 -3
  1134. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/too_much_space.text +0 -4
  1135. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/with_blocks.html +0 -38
  1136. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/with_blocks.text +0 -24
  1137. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/errors.html +0 -3
  1138. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/errors.text +0 -3
  1139. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/footer.html +0 -65
  1140. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/footer.text +0 -25
  1141. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/header.html +0 -103
  1142. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/header.text +0 -32
  1143. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/no_table.html +0 -3
  1144. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/no_table.text +0 -3
  1145. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/simple.html +0 -61
  1146. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/simple.text +0 -16
  1147. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/15_math/normal.html +0 -19
  1148. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/15_math/normal.text +0 -18
  1149. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/encoding.html +0 -46
  1150. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/encoding.text +0 -28
  1151. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/empty.html +0 -3
  1152. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/empty.text +0 -3
  1153. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/image_in_a.html +0 -5
  1154. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/image_in_a.text +0 -5
  1155. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/imagelinks.html +0 -12
  1156. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/imagelinks.text +0 -14
  1157. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/inline.html +0 -40
  1158. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/inline.text +0 -42
  1159. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/link_defs.html +0 -8
  1160. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/link_defs.text +0 -22
  1161. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/links_with_angle_brackets.html +0 -3
  1162. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/links_with_angle_brackets.text +0 -3
  1163. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/reference.html +0 -32
  1164. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/reference.text +0 -42
  1165. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/empty.html +0 -3
  1166. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/empty.text +0 -3
  1167. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/errors.html +0 -9
  1168. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/errors.text +0 -9
  1169. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/nesting.html +0 -38
  1170. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/nesting.text +0 -33
  1171. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/normal.html +0 -46
  1172. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/normal.text +0 -46
  1173. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/03_codespan/empty.html +0 -5
  1174. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/03_codespan/empty.text +0 -5
  1175. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/03_codespan/errors.html +0 -1
  1176. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/03_codespan/errors.text +0 -1
  1177. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/03_codespan/normal.html +0 -16
  1178. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/03_codespan/normal.text +0 -16
  1179. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/definitions.html +0 -14
  1180. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/definitions.latex +0 -18
  1181. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/definitions.text +0 -18
  1182. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/footnote_nr.html +0 -12
  1183. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/footnote_nr.latex +0 -6
  1184. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/footnote_nr.options +0 -1
  1185. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/footnote_nr.text +0 -4
  1186. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/markers.html +0 -46
  1187. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/markers.latex +0 -32
  1188. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/markers.text +0 -26
  1189. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/across_lines.html +0 -1
  1190. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/across_lines.text +0 -2
  1191. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/invalid.html +0 -1
  1192. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/invalid.text +0 -1
  1193. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/link_with_mailto.html +0 -1
  1194. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/link_with_mailto.text +0 -1
  1195. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/markdown_attr.html +0 -6
  1196. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/markdown_attr.text +0 -6
  1197. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/normal.html +0 -28
  1198. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/normal.text +0 -28
  1199. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/abbreviations/abbrev.html +0 -8
  1200. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/abbreviations/abbrev.text +0 -15
  1201. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/abbreviations/abbrev_defs.html +0 -2
  1202. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/abbreviations/abbrev_defs.text +0 -5
  1203. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/autolinks/url_links.html +0 -12
  1204. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/autolinks/url_links.text +0 -12
  1205. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/escaped_chars/normal.html +0 -41
  1206. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/escaped_chars/normal.text +0 -41
  1207. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/comment.html +0 -6
  1208. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/comment.text +0 -6
  1209. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/ignored.html +0 -1
  1210. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/ignored.text +0 -1
  1211. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/nomarkdown.html +0 -1
  1212. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/nomarkdown.text +0 -1
  1213. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/options.html +0 -1
  1214. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/options.text +0 -1
  1215. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/ial/simple.html +0 -6
  1216. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/ial/simple.text +0 -6
  1217. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/line_breaks/normal.html +0 -11
  1218. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/line_breaks/normal.text +0 -11
  1219. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/math/normal.html +0 -5
  1220. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/math/normal.text +0 -5
  1221. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities.html +0 -4
  1222. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities.text +0 -4
  1223. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/greaterthan.html +0 -1
  1224. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/greaterthan.text +0 -1
  1225. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/lowerthan.html +0 -1
  1226. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/lowerthan.text +0 -1
  1227. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/typography.html +0 -18
  1228. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/typography.text +0 -18
  1229. data/vendor/extensions/russian_language_pack/README +0 -3
  1230. data/vendor/extensions/russian_language_pack/Rakefile +0 -123
  1231. data/vendor/extensions/russian_language_pack/config/locales/ru.yml +0 -180
  1232. data/vendor/extensions/russian_language_pack/config/locales/ru_available_tags.yml +0 -553
  1233. data/vendor/extensions/russian_language_pack/lib/tasks/i18n_ru_extension_tasks.rake +0 -28
  1234. data/vendor/extensions/russian_language_pack/russian_language_pack_extension.rb +0 -9
  1235. data/vendor/extensions/smarty_pants_filter/README +0 -1
  1236. data/vendor/extensions/smarty_pants_filter/Rakefile +0 -136
  1237. data/vendor/extensions/smarty_pants_filter/lib/smarty_pants_tags.rb +0 -18
  1238. data/vendor/extensions/smarty_pants_filter/lib/tasks/smarty_pants_filter_extension_tasks.rake +0 -28
  1239. data/vendor/extensions/smarty_pants_filter/smarty_pants_filter_extension.rb +0 -18
  1240. data/vendor/extensions/smarty_pants_filter/spec/spec.opts +0 -6
  1241. data/vendor/extensions/smarty_pants_filter/spec/spec_helper.rb +0 -36
  1242. data/vendor/extensions/smarty_pants_filter/test/test_helper.rb +0 -19
  1243. data/vendor/plugins/haml/CONTRIBUTING +0 -4
  1244. data/vendor/plugins/haml/README.md +0 -357
  1245. data/vendor/plugins/haml/TODO +0 -47
  1246. data/vendor/plugins/haml/VERSION_NAME +0 -1
  1247. data/vendor/plugins/haml/doc-src/FAQ.md +0 -175
  1248. data/vendor/plugins/haml/doc-src/HAML_CHANGELOG.md +0 -556
  1249. data/vendor/plugins/haml/doc-src/HAML_REFERENCE.md +0 -1184
  1250. data/vendor/plugins/haml/doc-src/SASS_CHANGELOG.md +0 -755
  1251. data/vendor/plugins/haml/doc-src/SASS_REFERENCE.md +0 -1150
  1252. data/vendor/plugins/haml/extra/update_watch.rb +0 -13
  1253. data/vendor/plugins/haml/haml.gemspec +0 -60
  1254. data/vendor/plugins/haml/lib/haml/helpers/xss_mods.rb +0 -154
  1255. data/vendor/plugins/haml/lib/haml/railtie.rb +0 -18
  1256. data/vendor/plugins/haml/lib/haml/shared.rb +0 -78
  1257. data/vendor/plugins/haml/lib/sass/environment.rb +0 -79
  1258. data/vendor/plugins/haml/lib/sass/files.rb +0 -155
  1259. data/vendor/plugins/haml/lib/sass/plugin/rack.rb +0 -65
  1260. data/vendor/plugins/haml/lib/sass/repl.rb +0 -58
  1261. data/vendor/plugins/haml/lib/sass/script.rb +0 -62
  1262. data/vendor/plugins/haml/lib/sass/script/bool.rb +0 -17
  1263. data/vendor/plugins/haml/lib/sass/script/color.rb +0 -222
  1264. data/vendor/plugins/haml/lib/sass/script/funcall.rb +0 -50
  1265. data/vendor/plugins/haml/lib/sass/script/functions.rb +0 -257
  1266. data/vendor/plugins/haml/lib/sass/script/lexer.rb +0 -194
  1267. data/vendor/plugins/haml/lib/sass/script/literal.rb +0 -177
  1268. data/vendor/plugins/haml/lib/sass/script/node.rb +0 -14
  1269. data/vendor/plugins/haml/lib/sass/script/number.rb +0 -383
  1270. data/vendor/plugins/haml/lib/sass/script/operation.rb +0 -45
  1271. data/vendor/plugins/haml/lib/sass/script/parser.rb +0 -222
  1272. data/vendor/plugins/haml/lib/sass/script/string.rb +0 -12
  1273. data/vendor/plugins/haml/lib/sass/script/unary_operation.rb +0 -34
  1274. data/vendor/plugins/haml/lib/sass/script/variable.rb +0 -31
  1275. data/vendor/plugins/haml/lib/sass/tree/debug_node.rb +0 -30
  1276. data/vendor/plugins/haml/lib/sass/tree/for_node.rb +0 -48
  1277. data/vendor/plugins/haml/lib/sass/tree/if_node.rb +0 -55
  1278. data/vendor/plugins/haml/lib/sass/tree/import_node.rb +0 -65
  1279. data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rb +0 -29
  1280. data/vendor/plugins/haml/lib/sass/tree/mixin_node.rb +0 -48
  1281. data/vendor/plugins/haml/lib/sass/tree/prop_node.rb +0 -121
  1282. data/vendor/plugins/haml/lib/sass/tree/variable_node.rb +0 -34
  1283. data/vendor/plugins/haml/lib/sass/tree/while_node.rb +0 -31
  1284. data/vendor/plugins/haml/test/haml/util_test.rb +0 -107
  1285. data/vendor/plugins/haml/test/sass/functions_test.rb +0 -174
  1286. data/vendor/plugins/haml/test/sass/more_results/more1.css +0 -9
  1287. data/vendor/plugins/haml/test/sass/more_results/more1_with_line_comments.css +0 -26
  1288. data/vendor/plugins/haml/test/sass/more_results/more_import.css +0 -29
  1289. data/vendor/plugins/haml/test/sass/more_templates/_more_partial.sass +0 -2
  1290. data/vendor/plugins/haml/test/sass/more_templates/more1.sass +0 -23
  1291. data/vendor/plugins/haml/test/sass/more_templates/more_import.sass +0 -11
  1292. data/vendor/plugins/haml/test/sass/results/line_numbers.css +0 -49
  1293. data/vendor/plugins/haml/test/sass/results/units.css +0 -11
  1294. data/vendor/plugins/haml/test/sass/script_test.rb +0 -267
  1295. data/vendor/plugins/haml/test/sass/templates/line_numbers.sass +0 -13
  1296. data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +0 -2
  1297. data/vendor/plugins/haml/test/sass/templates/units.sass +0 -11
  1298. data/vendor/plugins/haml/yard/default/fulldoc/html/css/common.sass +0 -22
  1299. data/vendor/plugins/haml/yard/default/layout/html/footer.erb +0 -12
  1300. data/vendor/plugins/haml/yard/inherited_hash.rb +0 -41
  1301. data/vendor/radius/LICENSE +0 -19
  1302. data/vendor/radius/README.rdoc +0 -102
  1303. data/vendor/radius/VERSION +0 -1
  1304. data/vendor/radius/lib/radius/context.rb +0 -139
  1305. data/vendor/radius/lib/radius/delegating_open_struct.rb +0 -31
  1306. data/vendor/radius/lib/radius/error.rb +0 -43
  1307. data/vendor/radius/lib/radius/parse_tag.rb +0 -24
  1308. data/vendor/radius/lib/radius/parser.rb +0 -65
  1309. data/vendor/radius/lib/radius/parser/scan.rb +0 -678
  1310. data/vendor/radius/lib/radius/parser/scan.rl +0 -124
  1311. data/vendor/radius/lib/radius/tag_binding.rb +0 -71
  1312. data/vendor/radius/lib/radius/tag_definitions.rb +0 -78
  1313. data/vendor/radius/lib/radius/utility.rb +0 -30
  1314. data/vendor/radius/lib/radius/version.rb +0 -8
  1315. data/vendor/radius/radius.gemspec +0 -71
  1316. data/vendor/radius/tasks/jeweler.rake +0 -21
  1317. data/vendor/radius/tasks/rdoc.rake +0 -13
  1318. data/vendor/radius/tasks/scan.rake +0 -27
  1319. data/vendor/radius/tasks/test.rake +0 -7
  1320. data/vendor/radius/test/context_test.rb +0 -61
  1321. data/vendor/radius/test/quickstart_test.rb +0 -153
  1322. data/vendor/radius/test/test_helper.rb +0 -29
  1323. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/Makefile +0 -18
  1324. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb +0 -65
  1325. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.rb +0 -1060
  1326. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.y +0 -416
  1327. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/COPYING +0 -504
  1328. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/README +0 -12
  1329. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet.rb +0 -67
  1330. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5freq.rb +0 -927
  1331. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5prober.rb +0 -42
  1332. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb +0 -238
  1333. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetgroupprober.rb +0 -112
  1334. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb +0 -75
  1335. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb +0 -64
  1336. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/constants.rb +0 -42
  1337. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escprober.rb +0 -89
  1338. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escsm.rb +0 -244
  1339. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/eucjpprober.rb +0 -88
  1340. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrfreq.rb +0 -596
  1341. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrprober.rb +0 -42
  1342. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwfreq.rb +0 -430
  1343. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwprober.rb +0 -42
  1344. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312freq.rb +0 -474
  1345. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312prober.rb +0 -42
  1346. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/hebrewprober.rb +0 -289
  1347. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jisfreq.rb +0 -570
  1348. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb +0 -229
  1349. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langbulgarianmodel.rb +0 -229
  1350. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langcyrillicmodel.rb +0 -330
  1351. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langgreekmodel.rb +0 -227
  1352. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhebrewmodel.rb +0 -202
  1353. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhungarianmodel.rb +0 -226
  1354. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langthaimodel.rb +0 -201
  1355. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/latin1prober.rb +0 -147
  1356. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcharsetprober.rb +0 -89
  1357. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcsgroupprober.rb +0 -45
  1358. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcssm.rb +0 -542
  1359. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb +0 -124
  1360. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcsgroupprober.rb +0 -56
  1361. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sjisprober.rb +0 -88
  1362. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/universaldetector.rb +0 -168
  1363. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb +0 -87
  1364. data/vendor/rails/actionpack/lib/action_controller/rack_lint_patch.rb +0 -36
  1365. data/vendor/rails/actionpack/lib/action_controller/string_coercion.rb +0 -29
  1366. data/vendor/rails/actionpack/lib/action_view/helpers/raw_output_helper.rb +0 -9
  1367. data/vendor/rails/actionpack/test/controller/dom_assertions_test.rb +0 -53
  1368. data/vendor/rails/actionpack/test/controller/localized_templates_test.rb +0 -24
  1369. data/vendor/rails/actionpack/test/controller/output_escaping_test.rb +0 -19
  1370. data/vendor/rails/actionpack/test/fixtures/layout_tests/abs_path_layout.rhtml +0 -1
  1371. data/vendor/rails/actionpack/test/fixtures/localized/hello_world.de.html +0 -1
  1372. data/vendor/rails/actionpack/test/fixtures/localized/hello_world.en.html +0 -1
  1373. data/vendor/rails/actionpack/test/fixtures/test/_customer_counter_with_as.erb +0 -1
  1374. data/vendor/rails/actionpack/test/fixtures/test/_from_helper.erb +0 -1
  1375. data/vendor/rails/actionpack/test/fixtures/test/_utf8_partial.html.erb +0 -1
  1376. data/vendor/rails/actionpack/test/fixtures/test/_utf8_partial_magic.html.erb +0 -2
  1377. data/vendor/rails/actionpack/test/fixtures/test/array_translation.erb +0 -1
  1378. data/vendor/rails/actionpack/test/fixtures/test/scoped_array_translation.erb +0 -1
  1379. data/vendor/rails/actionpack/test/fixtures/test/translation.erb +0 -1
  1380. data/vendor/rails/actionpack/test/fixtures/test/utf8_magic.html.erb +0 -5
  1381. data/vendor/rails/actionpack/test/fixtures/test/utf8_magic_with_bare_partial.html.erb +0 -5
  1382. data/vendor/rails/actionpack/test/template/raw_output_helper_test.rb +0 -21
  1383. data/vendor/rails/activerecord/examples/performance.sql +0 -85
  1384. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb +0 -57
  1385. data/vendor/rails/activerecord/test/cases/associations/inverse_associations_test.rb +0 -566
  1386. data/vendor/rails/activerecord/test/cases/encoding_test.rb +0 -6
  1387. data/vendor/rails/activerecord/test/cases/yaml_serialization_test.rb +0 -11
  1388. data/vendor/rails/activerecord/test/fixtures/faces.yml +0 -11
  1389. data/vendor/rails/activerecord/test/fixtures/interests.yml +0 -33
  1390. data/vendor/rails/activerecord/test/fixtures/men.yml +0 -5
  1391. data/vendor/rails/activerecord/test/fixtures/zines.yml +0 -5
  1392. data/vendor/rails/activerecord/test/models/event_author.rb +0 -5
  1393. data/vendor/rails/activerecord/test/models/face.rb +0 -7
  1394. data/vendor/rails/activerecord/test/models/interest.rb +0 -5
  1395. data/vendor/rails/activerecord/test/models/invoice.rb +0 -4
  1396. data/vendor/rails/activerecord/test/models/line_item.rb +0 -3
  1397. data/vendor/rails/activerecord/test/models/man.rb +0 -9
  1398. data/vendor/rails/activerecord/test/models/zine.rb +0 -3
  1399. data/vendor/rails/activesupport/lib/active_support/core_ext/object/blank.rb +0 -76
  1400. data/vendor/rails/activesupport/lib/active_support/core_ext/object/singleton_class.rb +0 -13
  1401. data/vendor/rails/activesupport/lib/active_support/json/backends/yajl.rb +0 -40
  1402. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend.rb +0 -19
  1403. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record.rb +0 -66
  1404. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record/missing.rb +0 -67
  1405. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record/store_procs.rb +0 -38
  1406. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record/translation.rb +0 -88
  1407. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/base.rb +0 -266
  1408. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/cache.rb +0 -76
  1409. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/cascade.rb +0 -58
  1410. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/chain.rb +0 -75
  1411. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/cldr.rb +0 -100
  1412. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/fallbacks.rb +0 -69
  1413. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/fast.rb +0 -69
  1414. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/gettext.rb +0 -75
  1415. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/helpers.rb +0 -68
  1416. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/interpolation_compiler.rb +0 -119
  1417. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/links.rb +0 -34
  1418. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/metadata.rb +0 -73
  1419. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/pluralization.rb +0 -57
  1420. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/simple.rb +0 -22
  1421. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/hash/except.rb +0 -8
  1422. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/hash/slice.rb +0 -8
  1423. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/object/meta_class.rb +0 -5
  1424. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/string/interpolate.rb +0 -99
  1425. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb +0 -25
  1426. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/gettext/po_parser.rb +0 -329
  1427. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/helpers.rb +0 -5
  1428. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/helpers/gettext.rb +0 -65
  1429. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale.rb +0 -6
  1430. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale/fallbacks.rb +0 -98
  1431. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag.rb +0 -28
  1432. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag/parents.rb +0 -24
  1433. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag/rfc4646.rb +0 -76
  1434. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag/simple.rb +0 -41
  1435. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/version.rb +0 -3
  1436. data/vendor/rails/activesupport/lib/active_support/xml_mini/libxmlsax.rb +0 -74
  1437. data/vendor/rails/activesupport/lib/active_support/xml_mini/nokogirisax.rb +0 -73
  1438. data/vendor/rails/railties/configs/initializers/cookie_verification_secret.rb +0 -7
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Correctly handle PNG transparency in Win IE 5.5 & 6.
3
+ * http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006.
4
+ *
5
+ * Use in <HEAD> with DEFER keyword wrapped in conditional comments:
6
+ *
7
+ * <!--[if lt IE 7]>
8
+ * <script defer type="text/javascript" src="pngfix.js"></script>
9
+ * <![endif]-->
10
+ *
11
+ */
12
+
13
+ var arVersion = navigator.appVersion.split("MSIE"),
14
+ version = parseFloat(arVersion[1]),
15
+ filters = false;
16
+
17
+ try { filters = !!document.body.filters }
18
+ catch (e) {}
19
+
20
+ if (version >= 5.5 && filters) {
21
+ $A(document.images).each(function(img) {
22
+ if (!img.src.toLowerCase().endsWith('png')) return;
23
+
24
+ var span = new Element('span', { id: img.id, className: img.className, title: (img.title || img.alt) }).
25
+ setStyle({
26
+ display: 'inline-block',
27
+ width: img.width + 'px',
28
+ height: img.height + 'px',
29
+ filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + img.src + '", sizingMethod="scale")'
30
+ }).
31
+ setStyle(img.style.cssText);
32
+
33
+ if (img.align == "left") span.setStyle("float: left");
34
+ else if (img.align == "right") span.setStyle("float: right");
35
+ if (img.parentElement.href) span.setStyle("cursor: hand");
36
+
37
+ $(img).replace(span);
38
+ });
39
+ }
@@ -1,5 +1,5 @@
1
- /* Prototype JavaScript framework, version 1.6.1
2
- * (c) 2005-2009 Sam Stephenson
1
+ /* Prototype JavaScript framework, version 1.6.0.3
2
+ * (c) 2005-2008 Sam Stephenson
3
3
  *
4
4
  * Prototype is freely distributable under the terms of an MIT-style license.
5
5
  * For details, see the Prototype web site: http://www.prototypejs.org/
@@ -7,43 +7,26 @@
7
7
  *--------------------------------------------------------------------------*/
8
8
 
9
9
  var Prototype = {
10
- Version: '1.6.1',
11
-
12
- Browser: (function(){
13
- var ua = navigator.userAgent;
14
- var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
15
- return {
16
- IE: !!window.attachEvent && !isOpera,
17
- Opera: isOpera,
18
- WebKit: ua.indexOf('AppleWebKit/') > -1,
19
- Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1,
20
- MobileSafari: /Apple.*Mobile.*Safari/.test(ua)
21
- }
22
- })(),
10
+ Version: '1.6.0.3',
11
+
12
+ Browser: {
13
+ IE: !!(window.attachEvent &&
14
+ navigator.userAgent.indexOf('Opera') === -1),
15
+ Opera: navigator.userAgent.indexOf('Opera') > -1,
16
+ WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
17
+ Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&
18
+ navigator.userAgent.indexOf('KHTML') === -1,
19
+ MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
20
+ },
23
21
 
24
22
  BrowserFeatures: {
25
23
  XPath: !!document.evaluate,
26
24
  SelectorsAPI: !!document.querySelector,
27
- ElementExtensions: (function() {
28
- var constructor = window.Element || window.HTMLElement;
29
- return !!(constructor && constructor.prototype);
30
- })(),
31
- SpecificElementExtensions: (function() {
32
- if (typeof window.HTMLDivElement !== 'undefined')
33
- return true;
34
-
35
- var div = document.createElement('div');
36
- var form = document.createElement('form');
37
- var isSupported = false;
38
-
39
- if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {
40
- isSupported = true;
41
- }
42
-
43
- div = form = null;
44
-
45
- return isSupported;
46
- })()
25
+ ElementExtensions: !!window.HTMLElement,
26
+ SpecificElementExtensions:
27
+ document.createElement('div')['__proto__'] &&
28
+ document.createElement('div')['__proto__'] !==
29
+ document.createElement('form')['__proto__']
47
30
  },
48
31
 
49
32
  ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
@@ -57,30 +40,9 @@ if (Prototype.Browser.MobileSafari)
57
40
  Prototype.BrowserFeatures.SpecificElementExtensions = false;
58
41
 
59
42
 
60
- var Abstract = { };
61
-
62
-
63
- var Try = {
64
- these: function() {
65
- var returnValue;
66
-
67
- for (var i = 0, length = arguments.length; i < length; i++) {
68
- var lambda = arguments[i];
69
- try {
70
- returnValue = lambda();
71
- break;
72
- } catch (e) { }
73
- }
74
-
75
- return returnValue;
76
- }
77
- };
78
-
79
43
  /* Based on Alex Arnell's inheritance implementation. */
80
-
81
- var Class = (function() {
82
- function subclass() {};
83
- function create() {
44
+ var Class = {
45
+ create: function() {
84
46
  var parent = null, properties = $A(arguments);
85
47
  if (Object.isFunction(properties[0]))
86
48
  parent = properties.shift();
@@ -94,6 +56,7 @@ var Class = (function() {
94
56
  klass.subclasses = [];
95
57
 
96
58
  if (parent) {
59
+ var subclass = function() { };
97
60
  subclass.prototype = parent.prototype;
98
61
  klass.prototype = new subclass;
99
62
  parent.subclasses.push(klass);
@@ -106,19 +69,18 @@ var Class = (function() {
106
69
  klass.prototype.initialize = Prototype.emptyFunction;
107
70
 
108
71
  klass.prototype.constructor = klass;
72
+
109
73
  return klass;
110
74
  }
75
+ };
111
76
 
112
- function addMethods(source) {
77
+ Class.Methods = {
78
+ addMethods: function(source) {
113
79
  var ancestor = this.superclass && this.superclass.prototype;
114
80
  var properties = Object.keys(source);
115
81
 
116
- if (!Object.keys({ toString: true }).length) {
117
- if (source.toString != Object.prototype.toString)
118
- properties.push("toString");
119
- if (source.valueOf != Object.prototype.valueOf)
120
- properties.push("valueOf");
121
- }
82
+ if (!Object.keys({ toString: true }).length)
83
+ properties.push("toString", "valueOf");
122
84
 
123
85
  for (var i = 0, length = properties.length; i < length; i++) {
124
86
  var property = properties[i], value = source[property];
@@ -126,7 +88,7 @@ var Class = (function() {
126
88
  value.argumentNames().first() == "$super") {
127
89
  var method = value;
128
90
  value = (function(m) {
129
- return function() { return ancestor[m].apply(this, arguments); };
91
+ return function() { return ancestor[m].apply(this, arguments) };
130
92
  })(property).wrap(method);
131
93
 
132
94
  value.valueOf = method.valueOf.bind(method);
@@ -137,36 +99,29 @@ var Class = (function() {
137
99
 
138
100
  return this;
139
101
  }
102
+ };
140
103
 
141
- return {
142
- create: create,
143
- Methods: {
144
- addMethods: addMethods
145
- }
146
- };
147
- })();
148
- (function() {
149
-
150
- var _toString = Object.prototype.toString;
104
+ var Abstract = { };
151
105
 
152
- function extend(destination, source) {
153
- for (var property in source)
154
- destination[property] = source[property];
155
- return destination;
156
- }
106
+ Object.extend = function(destination, source) {
107
+ for (var property in source)
108
+ destination[property] = source[property];
109
+ return destination;
110
+ };
157
111
 
158
- function inspect(object) {
112
+ Object.extend(Object, {
113
+ inspect: function(object) {
159
114
  try {
160
- if (isUndefined(object)) return 'undefined';
115
+ if (Object.isUndefined(object)) return 'undefined';
161
116
  if (object === null) return 'null';
162
117
  return object.inspect ? object.inspect() : String(object);
163
118
  } catch (e) {
164
119
  if (e instanceof RangeError) return '...';
165
120
  throw e;
166
121
  }
167
- }
122
+ },
168
123
 
169
- function toJSON(object) {
124
+ toJSON: function(object) {
170
125
  var type = typeof object;
171
126
  switch (type) {
172
127
  case 'undefined':
@@ -177,180 +132,131 @@ var Class = (function() {
177
132
 
178
133
  if (object === null) return 'null';
179
134
  if (object.toJSON) return object.toJSON();
180
- if (isElement(object)) return;
135
+ if (Object.isElement(object)) return;
181
136
 
182
137
  var results = [];
183
138
  for (var property in object) {
184
- var value = toJSON(object[property]);
185
- if (!isUndefined(value))
139
+ var value = Object.toJSON(object[property]);
140
+ if (!Object.isUndefined(value))
186
141
  results.push(property.toJSON() + ': ' + value);
187
142
  }
188
143
 
189
144
  return '{' + results.join(', ') + '}';
190
- }
145
+ },
191
146
 
192
- function toQueryString(object) {
147
+ toQueryString: function(object) {
193
148
  return $H(object).toQueryString();
194
- }
149
+ },
195
150
 
196
- function toHTML(object) {
151
+ toHTML: function(object) {
197
152
  return object && object.toHTML ? object.toHTML() : String.interpret(object);
198
- }
153
+ },
199
154
 
200
- function keys(object) {
201
- var results = [];
155
+ keys: function(object) {
156
+ var keys = [];
202
157
  for (var property in object)
203
- results.push(property);
204
- return results;
205
- }
158
+ keys.push(property);
159
+ return keys;
160
+ },
206
161
 
207
- function values(object) {
208
- var results = [];
162
+ values: function(object) {
163
+ var values = [];
209
164
  for (var property in object)
210
- results.push(object[property]);
211
- return results;
212
- }
165
+ values.push(object[property]);
166
+ return values;
167
+ },
213
168
 
214
- function clone(object) {
215
- return extend({ }, object);
216
- }
169
+ clone: function(object) {
170
+ return Object.extend({ }, object);
171
+ },
217
172
 
218
- function isElement(object) {
173
+ isElement: function(object) {
219
174
  return !!(object && object.nodeType == 1);
220
- }
221
-
222
- function isArray(object) {
223
- return _toString.call(object) == "[object Array]";
224
- }
175
+ },
225
176
 
177
+ isArray: function(object) {
178
+ return object != null && typeof object == "object" &&
179
+ 'splice' in object && 'join' in object;
180
+ },
226
181
 
227
- function isHash(object) {
182
+ isHash: function(object) {
228
183
  return object instanceof Hash;
229
- }
230
-
231
- function isFunction(object) {
232
- return typeof object === "function";
233
- }
234
-
235
- function isString(object) {
236
- return _toString.call(object) == "[object String]";
237
- }
238
-
239
- function isNumber(object) {
240
- return _toString.call(object) == "[object Number]";
241
- }
184
+ },
242
185
 
243
- function isUndefined(object) {
244
- return typeof object === "undefined";
245
- }
186
+ isFunction: function(object) {
187
+ return typeof object == "function";
188
+ },
246
189
 
247
- extend(Object, {
248
- extend: extend,
249
- inspect: inspect,
250
- toJSON: toJSON,
251
- toQueryString: toQueryString,
252
- toHTML: toHTML,
253
- keys: keys,
254
- values: values,
255
- clone: clone,
256
- isElement: isElement,
257
- isArray: isArray,
258
- isHash: isHash,
259
- isFunction: isFunction,
260
- isString: isString,
261
- isNumber: isNumber,
262
- isUndefined: isUndefined
263
- });
264
- })();
265
- Object.extend(Function.prototype, (function() {
266
- var slice = Array.prototype.slice;
190
+ isString: function(object) {
191
+ return typeof object == "string";
192
+ },
267
193
 
268
- function update(array, args) {
269
- var arrayLength = array.length, length = args.length;
270
- while (length--) array[arrayLength + length] = args[length];
271
- return array;
272
- }
194
+ isNumber: function(object) {
195
+ return typeof object == "number";
196
+ },
273
197
 
274
- function merge(array, args) {
275
- array = slice.call(array, 0);
276
- return update(array, args);
198
+ isUndefined: function(object) {
199
+ return typeof object == "undefined";
277
200
  }
201
+ });
278
202
 
279
- function argumentNames() {
280
- var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1]
281
- .replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '')
203
+ Object.extend(Function.prototype, {
204
+ argumentNames: function() {
205
+ var names = this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1]
282
206
  .replace(/\s+/g, '').split(',');
283
207
  return names.length == 1 && !names[0] ? [] : names;
284
- }
208
+ },
285
209
 
286
- function bind(context) {
210
+ bind: function() {
287
211
  if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
288
- var __method = this, args = slice.call(arguments, 1);
212
+ var __method = this, args = $A(arguments), object = args.shift();
289
213
  return function() {
290
- var a = merge(args, arguments);
291
- return __method.apply(context, a);
214
+ return __method.apply(object, args.concat($A(arguments)));
292
215
  }
293
- }
216
+ },
294
217
 
295
- function bindAsEventListener(context) {
296
- var __method = this, args = slice.call(arguments, 1);
218
+ bindAsEventListener: function() {
219
+ var __method = this, args = $A(arguments), object = args.shift();
297
220
  return function(event) {
298
- var a = update([event || window.event], args);
299
- return __method.apply(context, a);
221
+ return __method.apply(object, [event || window.event].concat(args));
300
222
  }
301
- }
223
+ },
302
224
 
303
- function curry() {
225
+ curry: function() {
304
226
  if (!arguments.length) return this;
305
- var __method = this, args = slice.call(arguments, 0);
227
+ var __method = this, args = $A(arguments);
306
228
  return function() {
307
- var a = merge(args, arguments);
308
- return __method.apply(this, a);
229
+ return __method.apply(this, args.concat($A(arguments)));
309
230
  }
310
- }
231
+ },
311
232
 
312
- function delay(timeout) {
313
- var __method = this, args = slice.call(arguments, 1);
314
- timeout = timeout * 1000
233
+ delay: function() {
234
+ var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
315
235
  return window.setTimeout(function() {
316
236
  return __method.apply(__method, args);
317
237
  }, timeout);
318
- }
238
+ },
319
239
 
320
- function defer() {
321
- var args = update([0.01], arguments);
240
+ defer: function() {
241
+ var args = [0.01].concat($A(arguments));
322
242
  return this.delay.apply(this, args);
323
- }
243
+ },
324
244
 
325
- function wrap(wrapper) {
245
+ wrap: function(wrapper) {
326
246
  var __method = this;
327
247
  return function() {
328
- var a = update([__method.bind(this)], arguments);
329
- return wrapper.apply(this, a);
248
+ return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
330
249
  }
331
- }
250
+ },
332
251
 
333
- function methodize() {
252
+ methodize: function() {
334
253
  if (this._methodized) return this._methodized;
335
254
  var __method = this;
336
255
  return this._methodized = function() {
337
- var a = update([this], arguments);
338
- return __method.apply(null, a);
256
+ return __method.apply(null, [this].concat($A(arguments)));
339
257
  };
340
258
  }
341
-
342
- return {
343
- argumentNames: argumentNames,
344
- bind: bind,
345
- bindAsEventListener: bindAsEventListener,
346
- curry: curry,
347
- delay: delay,
348
- defer: defer,
349
- wrap: wrap,
350
- methodize: methodize
351
- }
352
- })());
353
-
259
+ });
354
260
 
355
261
  Date.prototype.toJSON = function() {
356
262
  return '"' + this.getUTCFullYear() + '-' +
@@ -361,12 +267,30 @@ Date.prototype.toJSON = function() {
361
267
  this.getUTCSeconds().toPaddedString(2) + 'Z"';
362
268
  };
363
269
 
270
+ var Try = {
271
+ these: function() {
272
+ var returnValue;
273
+
274
+ for (var i = 0, length = arguments.length; i < length; i++) {
275
+ var lambda = arguments[i];
276
+ try {
277
+ returnValue = lambda();
278
+ break;
279
+ } catch (e) { }
280
+ }
281
+
282
+ return returnValue;
283
+ }
284
+ };
364
285
 
365
286
  RegExp.prototype.match = RegExp.prototype.test;
366
287
 
367
288
  RegExp.escape = function(str) {
368
289
  return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
369
290
  };
291
+
292
+ /*--------------------------------------------------------------------------*/
293
+
370
294
  var PeriodicalExecuter = Class.create({
371
295
  initialize: function(callback, frequency) {
372
296
  this.callback = callback;
@@ -395,10 +319,8 @@ var PeriodicalExecuter = Class.create({
395
319
  try {
396
320
  this.currentlyExecuting = true;
397
321
  this.execute();
322
+ } finally {
398
323
  this.currentlyExecuting = false;
399
- } catch(e) {
400
- this.currentlyExecuting = false;
401
- throw e;
402
324
  }
403
325
  }
404
326
  }
@@ -417,25 +339,10 @@ Object.extend(String, {
417
339
  }
418
340
  });
419
341
 
420
- Object.extend(String.prototype, (function() {
421
-
422
- function prepareReplacement(replacement) {
423
- if (Object.isFunction(replacement)) return replacement;
424
- var template = new Template(replacement);
425
- return function(match) { return template.evaluate(match) };
426
- }
427
-
428
- function gsub(pattern, replacement) {
342
+ Object.extend(String.prototype, {
343
+ gsub: function(pattern, replacement) {
429
344
  var result = '', source = this, match;
430
- replacement = prepareReplacement(replacement);
431
-
432
- if (Object.isString(pattern))
433
- pattern = RegExp.escape(pattern);
434
-
435
- if (!(pattern.length || pattern.source)) {
436
- replacement = replacement('');
437
- return replacement + source.split('').join(replacement) + replacement;
438
- }
345
+ replacement = arguments.callee.prepareReplacement(replacement);
439
346
 
440
347
  while (source.length > 0) {
441
348
  if (match = source.match(pattern)) {
@@ -447,64 +354,69 @@ Object.extend(String.prototype, (function() {
447
354
  }
448
355
  }
449
356
  return result;
450
- }
357
+ },
451
358
 
452
- function sub(pattern, replacement, count) {
453
- replacement = prepareReplacement(replacement);
359
+ sub: function(pattern, replacement, count) {
360
+ replacement = this.gsub.prepareReplacement(replacement);
454
361
  count = Object.isUndefined(count) ? 1 : count;
455
362
 
456
363
  return this.gsub(pattern, function(match) {
457
364
  if (--count < 0) return match[0];
458
365
  return replacement(match);
459
366
  });
460
- }
367
+ },
461
368
 
462
- function scan(pattern, iterator) {
369
+ scan: function(pattern, iterator) {
463
370
  this.gsub(pattern, iterator);
464
371
  return String(this);
465
- }
372
+ },
466
373
 
467
- function truncate(length, truncation) {
374
+ truncate: function(length, truncation) {
468
375
  length = length || 30;
469
376
  truncation = Object.isUndefined(truncation) ? '...' : truncation;
470
377
  return this.length > length ?
471
378
  this.slice(0, length - truncation.length) + truncation : String(this);
472
- }
379
+ },
473
380
 
474
- function strip() {
381
+ strip: function() {
475
382
  return this.replace(/^\s+/, '').replace(/\s+$/, '');
476
- }
383
+ },
477
384
 
478
- function stripTags() {
479
- return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, '');
480
- }
385
+ stripTags: function() {
386
+ return this.replace(/<\/?[^>]+>/gi, '');
387
+ },
481
388
 
482
- function stripScripts() {
389
+ stripScripts: function() {
483
390
  return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
484
- }
391
+ },
485
392
 
486
- function extractScripts() {
393
+ extractScripts: function() {
487
394
  var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
488
395
  var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
489
396
  return (this.match(matchAll) || []).map(function(scriptTag) {
490
397
  return (scriptTag.match(matchOne) || ['', ''])[1];
491
398
  });
492
- }
399
+ },
493
400
 
494
- function evalScripts() {
401
+ evalScripts: function() {
495
402
  return this.extractScripts().map(function(script) { return eval(script) });
496
- }
497
-
498
- function escapeHTML() {
499
- return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
500
- }
403
+ },
501
404
 
502
- function unescapeHTML() {
503
- return this.stripTags().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');
504
- }
405
+ escapeHTML: function() {
406
+ var self = arguments.callee;
407
+ self.text.data = this;
408
+ return self.div.innerHTML;
409
+ },
505
410
 
411
+ unescapeHTML: function() {
412
+ var div = new Element('div');
413
+ div.innerHTML = this.stripTags();
414
+ return div.childNodes[0] ? (div.childNodes.length > 1 ?
415
+ $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
416
+ div.childNodes[0].nodeValue) : '';
417
+ },
506
418
 
507
- function toQueryParams(separator) {
419
+ toQueryParams: function(separator) {
508
420
  var match = this.strip().match(/([^?#]*)(#.*)?$/);
509
421
  if (!match) return { };
510
422
 
@@ -522,22 +434,22 @@ Object.extend(String.prototype, (function() {
522
434
  }
523
435
  return hash;
524
436
  });
525
- }
437
+ },
526
438
 
527
- function toArray() {
439
+ toArray: function() {
528
440
  return this.split('');
529
- }
441
+ },
530
442
 
531
- function succ() {
443
+ succ: function() {
532
444
  return this.slice(0, this.length - 1) +
533
445
  String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
534
- }
446
+ },
535
447
 
536
- function times(count) {
448
+ times: function(count) {
537
449
  return count < 1 ? '' : new Array(count + 1).join(this);
538
- }
450
+ },
539
451
 
540
- function camelize() {
452
+ camelize: function() {
541
453
  var parts = this.split('-'), len = parts.length;
542
454
  if (len == 1) return parts[0];
543
455
 
@@ -549,117 +461,101 @@ Object.extend(String.prototype, (function() {
549
461
  camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
550
462
 
551
463
  return camelized;
552
- }
464
+ },
553
465
 
554
- function capitalize() {
466
+ capitalize: function() {
555
467
  return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
556
- }
468
+ },
557
469
 
558
- function underscore() {
559
- return this.replace(/::/g, '/')
560
- .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')
561
- .replace(/([a-z\d])([A-Z])/g, '$1_$2')
562
- .replace(/-/g, '_')
563
- .toLowerCase();
564
- }
470
+ underscore: function() {
471
+ return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
472
+ },
565
473
 
566
- function dasherize() {
567
- return this.replace(/_/g, '-');
568
- }
474
+ dasherize: function() {
475
+ return this.gsub(/_/,'-');
476
+ },
569
477
 
570
- function inspect(useDoubleQuotes) {
571
- var escapedString = this.replace(/[\x00-\x1f\\]/g, function(character) {
572
- if (character in String.specialChar) {
573
- return String.specialChar[character];
574
- }
575
- return '\\u00' + character.charCodeAt().toPaddedString(2, 16);
478
+ inspect: function(useDoubleQuotes) {
479
+ var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
480
+ var character = String.specialChar[match[0]];
481
+ return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
576
482
  });
577
483
  if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
578
484
  return "'" + escapedString.replace(/'/g, '\\\'') + "'";
579
- }
485
+ },
580
486
 
581
- function toJSON() {
487
+ toJSON: function() {
582
488
  return this.inspect(true);
583
- }
489
+ },
584
490
 
585
- function unfilterJSON(filter) {
586
- return this.replace(filter || Prototype.JSONFilter, '$1');
587
- }
491
+ unfilterJSON: function(filter) {
492
+ return this.sub(filter || Prototype.JSONFilter, '#{1}');
493
+ },
588
494
 
589
- function isJSON() {
495
+ isJSON: function() {
590
496
  var str = this;
591
497
  if (str.blank()) return false;
592
498
  str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
593
499
  return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
594
- }
500
+ },
595
501
 
596
- function evalJSON(sanitize) {
502
+ evalJSON: function(sanitize) {
597
503
  var json = this.unfilterJSON();
598
504
  try {
599
505
  if (!sanitize || json.isJSON()) return eval('(' + json + ')');
600
506
  } catch (e) { }
601
507
  throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
602
- }
508
+ },
603
509
 
604
- function include(pattern) {
510
+ include: function(pattern) {
605
511
  return this.indexOf(pattern) > -1;
606
- }
512
+ },
607
513
 
608
- function startsWith(pattern) {
514
+ startsWith: function(pattern) {
609
515
  return this.indexOf(pattern) === 0;
610
- }
516
+ },
611
517
 
612
- function endsWith(pattern) {
518
+ endsWith: function(pattern) {
613
519
  var d = this.length - pattern.length;
614
520
  return d >= 0 && this.lastIndexOf(pattern) === d;
615
- }
521
+ },
616
522
 
617
- function empty() {
523
+ empty: function() {
618
524
  return this == '';
619
- }
525
+ },
620
526
 
621
- function blank() {
527
+ blank: function() {
622
528
  return /^\s*$/.test(this);
623
- }
529
+ },
624
530
 
625
- function interpolate(object, pattern) {
531
+ interpolate: function(object, pattern) {
626
532
  return new Template(this, pattern).evaluate(object);
627
533
  }
534
+ });
628
535
 
629
- return {
630
- gsub: gsub,
631
- sub: sub,
632
- scan: scan,
633
- truncate: truncate,
634
- strip: String.prototype.trim ? String.prototype.trim : strip,
635
- stripTags: stripTags,
636
- stripScripts: stripScripts,
637
- extractScripts: extractScripts,
638
- evalScripts: evalScripts,
639
- escapeHTML: escapeHTML,
640
- unescapeHTML: unescapeHTML,
641
- toQueryParams: toQueryParams,
642
- parseQuery: toQueryParams,
643
- toArray: toArray,
644
- succ: succ,
645
- times: times,
646
- camelize: camelize,
647
- capitalize: capitalize,
648
- underscore: underscore,
649
- dasherize: dasherize,
650
- inspect: inspect,
651
- toJSON: toJSON,
652
- unfilterJSON: unfilterJSON,
653
- isJSON: isJSON,
654
- evalJSON: evalJSON,
655
- include: include,
656
- startsWith: startsWith,
657
- endsWith: endsWith,
658
- empty: empty,
659
- blank: blank,
660
- interpolate: interpolate
661
- };
662
- })());
536
+ if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
537
+ escapeHTML: function() {
538
+ return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
539
+ },
540
+ unescapeHTML: function() {
541
+ return this.stripTags().replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
542
+ }
543
+ });
544
+
545
+ String.prototype.gsub.prepareReplacement = function(replacement) {
546
+ if (Object.isFunction(replacement)) return replacement;
547
+ var template = new Template(replacement);
548
+ return function(match) { return template.evaluate(match) };
549
+ };
550
+
551
+ String.prototype.parseQuery = String.prototype.toQueryParams;
552
+
553
+ Object.extend(String.prototype.escapeHTML, {
554
+ div: document.createElement('div'),
555
+ text: document.createTextNode('')
556
+ });
557
+
558
+ String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);
663
559
 
664
560
  var Template = Class.create({
665
561
  initialize: function(template, pattern) {
@@ -668,11 +564,11 @@ var Template = Class.create({
668
564
  },
669
565
 
670
566
  evaluate: function(object) {
671
- if (object && Object.isFunction(object.toTemplateReplacements))
567
+ if (Object.isFunction(object.toTemplateReplacements))
672
568
  object = object.toTemplateReplacements();
673
569
 
674
570
  return this.template.gsub(this.pattern, function(match) {
675
- if (object == null) return (match[1] + '');
571
+ if (object == null) return '';
676
572
 
677
573
  var before = match[1] || '';
678
574
  if (before == '\\') return match[2];
@@ -683,7 +579,7 @@ var Template = Class.create({
683
579
  if (match == null) return before;
684
580
 
685
581
  while (match != null) {
686
- var comp = match[1].startsWith('[') ? match[2].replace(/\\\\]/g, ']') : match[1];
582
+ var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1];
687
583
  ctx = ctx[comp];
688
584
  if (null == ctx || '' == match[3]) break;
689
585
  expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
@@ -698,8 +594,8 @@ Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
698
594
 
699
595
  var $break = { };
700
596
 
701
- var Enumerable = (function() {
702
- function each(iterator, context) {
597
+ var Enumerable = {
598
+ each: function(iterator, context) {
703
599
  var index = 0;
704
600
  try {
705
601
  this._each(function(value) {
@@ -709,17 +605,17 @@ var Enumerable = (function() {
709
605
  if (e != $break) throw e;
710
606
  }
711
607
  return this;
712
- }
608
+ },
713
609
 
714
- function eachSlice(number, iterator, context) {
610
+ eachSlice: function(number, iterator, context) {
715
611
  var index = -number, slices = [], array = this.toArray();
716
612
  if (number < 1) return array;
717
613
  while ((index += number) < array.length)
718
614
  slices.push(array.slice(index, index+number));
719
615
  return slices.collect(iterator, context);
720
- }
616
+ },
721
617
 
722
- function all(iterator, context) {
618
+ all: function(iterator, context) {
723
619
  iterator = iterator || Prototype.K;
724
620
  var result = true;
725
621
  this.each(function(value, index) {
@@ -727,9 +623,9 @@ var Enumerable = (function() {
727
623
  if (!result) throw $break;
728
624
  });
729
625
  return result;
730
- }
626
+ },
731
627
 
732
- function any(iterator, context) {
628
+ any: function(iterator, context) {
733
629
  iterator = iterator || Prototype.K;
734
630
  var result = false;
735
631
  this.each(function(value, index) {
@@ -737,18 +633,18 @@ var Enumerable = (function() {
737
633
  throw $break;
738
634
  });
739
635
  return result;
740
- }
636
+ },
741
637
 
742
- function collect(iterator, context) {
638
+ collect: function(iterator, context) {
743
639
  iterator = iterator || Prototype.K;
744
640
  var results = [];
745
641
  this.each(function(value, index) {
746
642
  results.push(iterator.call(context, value, index));
747
643
  });
748
644
  return results;
749
- }
645
+ },
750
646
 
751
- function detect(iterator, context) {
647
+ detect: function(iterator, context) {
752
648
  var result;
753
649
  this.each(function(value, index) {
754
650
  if (iterator.call(context, value, index)) {
@@ -757,32 +653,32 @@ var Enumerable = (function() {
757
653
  }
758
654
  });
759
655
  return result;
760
- }
656
+ },
761
657
 
762
- function findAll(iterator, context) {
658
+ findAll: function(iterator, context) {
763
659
  var results = [];
764
660
  this.each(function(value, index) {
765
661
  if (iterator.call(context, value, index))
766
662
  results.push(value);
767
663
  });
768
664
  return results;
769
- }
665
+ },
770
666
 
771
- function grep(filter, iterator, context) {
667
+ grep: function(filter, iterator, context) {
772
668
  iterator = iterator || Prototype.K;
773
669
  var results = [];
774
670
 
775
671
  if (Object.isString(filter))
776
- filter = new RegExp(RegExp.escape(filter));
672
+ filter = new RegExp(filter);
777
673
 
778
674
  this.each(function(value, index) {
779
675
  if (filter.match(value))
780
676
  results.push(iterator.call(context, value, index));
781
677
  });
782
678
  return results;
783
- }
679
+ },
784
680
 
785
- function include(object) {
681
+ include: function(object) {
786
682
  if (Object.isFunction(this.indexOf))
787
683
  if (this.indexOf(object) != -1) return true;
788
684
 
@@ -794,31 +690,31 @@ var Enumerable = (function() {
794
690
  }
795
691
  });
796
692
  return found;
797
- }
693
+ },
798
694
 
799
- function inGroupsOf(number, fillWith) {
695
+ inGroupsOf: function(number, fillWith) {
800
696
  fillWith = Object.isUndefined(fillWith) ? null : fillWith;
801
697
  return this.eachSlice(number, function(slice) {
802
698
  while(slice.length < number) slice.push(fillWith);
803
699
  return slice;
804
700
  });
805
- }
701
+ },
806
702
 
807
- function inject(memo, iterator, context) {
703
+ inject: function(memo, iterator, context) {
808
704
  this.each(function(value, index) {
809
705
  memo = iterator.call(context, memo, value, index);
810
706
  });
811
707
  return memo;
812
- }
708
+ },
813
709
 
814
- function invoke(method) {
710
+ invoke: function(method) {
815
711
  var args = $A(arguments).slice(1);
816
712
  return this.map(function(value) {
817
713
  return value[method].apply(value, args);
818
714
  });
819
- }
715
+ },
820
716
 
821
- function max(iterator, context) {
717
+ max: function(iterator, context) {
822
718
  iterator = iterator || Prototype.K;
823
719
  var result;
824
720
  this.each(function(value, index) {
@@ -827,9 +723,9 @@ var Enumerable = (function() {
827
723
  result = value;
828
724
  });
829
725
  return result;
830
- }
726
+ },
831
727
 
832
- function min(iterator, context) {
728
+ min: function(iterator, context) {
833
729
  iterator = iterator || Prototype.K;
834
730
  var result;
835
731
  this.each(function(value, index) {
@@ -838,9 +734,9 @@ var Enumerable = (function() {
838
734
  result = value;
839
735
  });
840
736
  return result;
841
- }
737
+ },
842
738
 
843
- function partition(iterator, context) {
739
+ partition: function(iterator, context) {
844
740
  iterator = iterator || Prototype.K;
845
741
  var trues = [], falses = [];
846
742
  this.each(function(value, index) {
@@ -848,26 +744,26 @@ var Enumerable = (function() {
848
744
  trues : falses).push(value);
849
745
  });
850
746
  return [trues, falses];
851
- }
747
+ },
852
748
 
853
- function pluck(property) {
749
+ pluck: function(property) {
854
750
  var results = [];
855
751
  this.each(function(value) {
856
752
  results.push(value[property]);
857
753
  });
858
754
  return results;
859
- }
755
+ },
860
756
 
861
- function reject(iterator, context) {
757
+ reject: function(iterator, context) {
862
758
  var results = [];
863
759
  this.each(function(value, index) {
864
760
  if (!iterator.call(context, value, index))
865
761
  results.push(value);
866
762
  });
867
763
  return results;
868
- }
764
+ },
869
765
 
870
- function sortBy(iterator, context) {
766
+ sortBy: function(iterator, context) {
871
767
  return this.map(function(value, index) {
872
768
  return {
873
769
  value: value,
@@ -877,13 +773,13 @@ var Enumerable = (function() {
877
773
  var a = left.criteria, b = right.criteria;
878
774
  return a < b ? -1 : a > b ? 1 : 0;
879
775
  }).pluck('value');
880
- }
776
+ },
881
777
 
882
- function toArray() {
778
+ toArray: function() {
883
779
  return this.map();
884
- }
780
+ },
885
781
 
886
- function zip() {
782
+ zip: function() {
887
783
  var iterator = Prototype.K, args = $A(arguments);
888
784
  if (Object.isFunction(args.last()))
889
785
  iterator = args.pop();
@@ -892,152 +788,130 @@ var Enumerable = (function() {
892
788
  return this.map(function(value, index) {
893
789
  return iterator(collections.pluck(index));
894
790
  });
895
- }
791
+ },
896
792
 
897
- function size() {
793
+ size: function() {
898
794
  return this.toArray().length;
899
- }
795
+ },
900
796
 
901
- function inspect() {
797
+ inspect: function() {
902
798
  return '#<Enumerable:' + this.toArray().inspect() + '>';
903
799
  }
800
+ };
904
801
 
905
-
906
-
907
-
908
-
909
-
910
-
911
-
912
-
913
- return {
914
- each: each,
915
- eachSlice: eachSlice,
916
- all: all,
917
- every: all,
918
- any: any,
919
- some: any,
920
- collect: collect,
921
- map: collect,
922
- detect: detect,
923
- findAll: findAll,
924
- select: findAll,
925
- filter: findAll,
926
- grep: grep,
927
- include: include,
928
- member: include,
929
- inGroupsOf: inGroupsOf,
930
- inject: inject,
931
- invoke: invoke,
932
- max: max,
933
- min: min,
934
- partition: partition,
935
- pluck: pluck,
936
- reject: reject,
937
- sortBy: sortBy,
938
- toArray: toArray,
939
- entries: toArray,
940
- zip: zip,
941
- size: size,
942
- inspect: inspect,
943
- find: detect
944
- };
945
- })();
802
+ Object.extend(Enumerable, {
803
+ map: Enumerable.collect,
804
+ find: Enumerable.detect,
805
+ select: Enumerable.findAll,
806
+ filter: Enumerable.findAll,
807
+ member: Enumerable.include,
808
+ entries: Enumerable.toArray,
809
+ every: Enumerable.all,
810
+ some: Enumerable.any
811
+ });
946
812
  function $A(iterable) {
947
813
  if (!iterable) return [];
948
- if ('toArray' in Object(iterable)) return iterable.toArray();
814
+ if (iterable.toArray) return iterable.toArray();
949
815
  var length = iterable.length || 0, results = new Array(length);
950
816
  while (length--) results[length] = iterable[length];
951
817
  return results;
952
818
  }
953
819
 
954
- function $w(string) {
955
- if (!Object.isString(string)) return [];
956
- string = string.strip();
957
- return string ? string.split(/\s+/) : [];
820
+ if (Prototype.Browser.WebKit) {
821
+ $A = function(iterable) {
822
+ if (!iterable) return [];
823
+ // In Safari, only use the `toArray` method if it's not a NodeList.
824
+ // A NodeList is a function, has an function `item` property, and a numeric
825
+ // `length` property. Adapted from Google Doctype.
826
+ if (!(typeof iterable === 'function' && typeof iterable.length ===
827
+ 'number' && typeof iterable.item === 'function') && iterable.toArray)
828
+ return iterable.toArray();
829
+ var length = iterable.length || 0, results = new Array(length);
830
+ while (length--) results[length] = iterable[length];
831
+ return results;
832
+ };
958
833
  }
959
834
 
960
835
  Array.from = $A;
961
836
 
837
+ Object.extend(Array.prototype, Enumerable);
962
838
 
963
- (function() {
964
- var arrayProto = Array.prototype,
965
- slice = arrayProto.slice,
966
- _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available
839
+ if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse;
967
840
 
968
- function each(iterator) {
841
+ Object.extend(Array.prototype, {
842
+ _each: function(iterator) {
969
843
  for (var i = 0, length = this.length; i < length; i++)
970
844
  iterator(this[i]);
971
- }
972
- if (!_each) _each = each;
845
+ },
973
846
 
974
- function clear() {
847
+ clear: function() {
975
848
  this.length = 0;
976
849
  return this;
977
- }
850
+ },
978
851
 
979
- function first() {
852
+ first: function() {
980
853
  return this[0];
981
- }
854
+ },
982
855
 
983
- function last() {
856
+ last: function() {
984
857
  return this[this.length - 1];
985
- }
858
+ },
986
859
 
987
- function compact() {
860
+ compact: function() {
988
861
  return this.select(function(value) {
989
862
  return value != null;
990
863
  });
991
- }
864
+ },
992
865
 
993
- function flatten() {
866
+ flatten: function() {
994
867
  return this.inject([], function(array, value) {
995
- if (Object.isArray(value))
996
- return array.concat(value.flatten());
997
- array.push(value);
998
- return array;
868
+ return array.concat(Object.isArray(value) ?
869
+ value.flatten() : [value]);
999
870
  });
1000
- }
871
+ },
1001
872
 
1002
- function without() {
1003
- var values = slice.call(arguments, 0);
873
+ without: function() {
874
+ var values = $A(arguments);
1004
875
  return this.select(function(value) {
1005
876
  return !values.include(value);
1006
877
  });
1007
- }
878
+ },
1008
879
 
1009
- function reverse(inline) {
880
+ reverse: function(inline) {
1010
881
  return (inline !== false ? this : this.toArray())._reverse();
1011
- }
882
+ },
1012
883
 
1013
- function uniq(sorted) {
884
+ reduce: function() {
885
+ return this.length > 1 ? this : this[0];
886
+ },
887
+
888
+ uniq: function(sorted) {
1014
889
  return this.inject([], function(array, value, index) {
1015
890
  if (0 == index || (sorted ? array.last() != value : !array.include(value)))
1016
891
  array.push(value);
1017
892
  return array;
1018
893
  });
1019
- }
894
+ },
1020
895
 
1021
- function intersect(array) {
896
+ intersect: function(array) {
1022
897
  return this.uniq().findAll(function(item) {
1023
898
  return array.detect(function(value) { return item === value });
1024
- });
1025
- }
1026
-
899
+ });
900
+ },
1027
901
 
1028
- function clone() {
1029
- return slice.call(this, 0);
1030
- }
902
+ clone: function() {
903
+ return [].concat(this);
904
+ },
1031
905
 
1032
- function size() {
906
+ size: function() {
1033
907
  return this.length;
1034
- }
908
+ },
1035
909
 
1036
- function inspect() {
910
+ inspect: function() {
1037
911
  return '[' + this.map(Object.inspect).join(', ') + ']';
1038
- }
912
+ },
1039
913
 
1040
- function toJSON() {
914
+ toJSON: function() {
1041
915
  var results = [];
1042
916
  this.each(function(object) {
1043
917
  var value = Object.toJSON(object);
@@ -1045,270 +919,205 @@ Array.from = $A;
1045
919
  });
1046
920
  return '[' + results.join(', ') + ']';
1047
921
  }
922
+ });
1048
923
 
1049
- function indexOf(item, i) {
1050
- i || (i = 0);
1051
- var length = this.length;
1052
- if (i < 0) i = length + i;
1053
- for (; i < length; i++)
1054
- if (this[i] === item) return i;
1055
- return -1;
1056
- }
924
+ // use native browser JS 1.6 implementation if available
925
+ if (Object.isFunction(Array.prototype.forEach))
926
+ Array.prototype._each = Array.prototype.forEach;
927
+
928
+ if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
929
+ i || (i = 0);
930
+ var length = this.length;
931
+ if (i < 0) i = length + i;
932
+ for (; i < length; i++)
933
+ if (this[i] === item) return i;
934
+ return -1;
935
+ };
1057
936
 
1058
- function lastIndexOf(item, i) {
1059
- i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
1060
- var n = this.slice(0, i).reverse().indexOf(item);
1061
- return (n < 0) ? n : i - n - 1;
1062
- }
937
+ if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
938
+ i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
939
+ var n = this.slice(0, i).reverse().indexOf(item);
940
+ return (n < 0) ? n : i - n - 1;
941
+ };
942
+
943
+ Array.prototype.toArray = Array.prototype.clone;
944
+
945
+ function $w(string) {
946
+ if (!Object.isString(string)) return [];
947
+ string = string.strip();
948
+ return string ? string.split(/\s+/) : [];
949
+ }
1063
950
 
1064
- function concat() {
1065
- var array = slice.call(this, 0), item;
951
+ if (Prototype.Browser.Opera){
952
+ Array.prototype.concat = function() {
953
+ var array = [];
954
+ for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
1066
955
  for (var i = 0, length = arguments.length; i < length; i++) {
1067
- item = arguments[i];
1068
- if (Object.isArray(item) && !('callee' in item)) {
1069
- for (var j = 0, arrayLength = item.length; j < arrayLength; j++)
1070
- array.push(item[j]);
956
+ if (Object.isArray(arguments[i])) {
957
+ for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
958
+ array.push(arguments[i][j]);
1071
959
  } else {
1072
- array.push(item);
960
+ array.push(arguments[i]);
1073
961
  }
1074
962
  }
1075
963
  return array;
1076
- }
964
+ };
965
+ }
966
+ Object.extend(Number.prototype, {
967
+ toColorPart: function() {
968
+ return this.toPaddedString(2, 16);
969
+ },
1077
970
 
1078
- Object.extend(arrayProto, Enumerable);
1079
-
1080
- if (!arrayProto._reverse)
1081
- arrayProto._reverse = arrayProto.reverse;
1082
-
1083
- Object.extend(arrayProto, {
1084
- _each: _each,
1085
- clear: clear,
1086
- first: first,
1087
- last: last,
1088
- compact: compact,
1089
- flatten: flatten,
1090
- without: without,
1091
- reverse: reverse,
1092
- uniq: uniq,
1093
- intersect: intersect,
1094
- clone: clone,
1095
- toArray: clone,
1096
- size: size,
1097
- inspect: inspect,
1098
- toJSON: toJSON
1099
- });
971
+ succ: function() {
972
+ return this + 1;
973
+ },
974
+
975
+ times: function(iterator, context) {
976
+ $R(0, this, true).each(iterator, context);
977
+ return this;
978
+ },
1100
979
 
1101
- var CONCAT_ARGUMENTS_BUGGY = (function() {
1102
- return [].concat(arguments)[0][0] !== 1;
1103
- })(1,2)
980
+ toPaddedString: function(length, radix) {
981
+ var string = this.toString(radix || 10);
982
+ return '0'.times(length - string.length) + string;
983
+ },
1104
984
 
1105
- if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat;
985
+ toJSON: function() {
986
+ return isFinite(this) ? this.toString() : 'null';
987
+ }
988
+ });
1106
989
 
1107
- if (!arrayProto.indexOf) arrayProto.indexOf = indexOf;
1108
- if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf;
1109
- })();
990
+ $w('abs round ceil floor').each(function(method){
991
+ Number.prototype[method] = Math[method].methodize();
992
+ });
1110
993
  function $H(object) {
1111
994
  return new Hash(object);
1112
995
  };
1113
996
 
1114
997
  var Hash = Class.create(Enumerable, (function() {
1115
- function initialize(object) {
1116
- this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
1117
- }
1118
-
1119
- function _each(iterator) {
1120
- for (var key in this._object) {
1121
- var value = this._object[key], pair = [key, value];
1122
- pair.key = key;
1123
- pair.value = value;
1124
- iterator(pair);
1125
- }
1126
- }
1127
-
1128
- function set(key, value) {
1129
- return this._object[key] = value;
1130
- }
1131
-
1132
- function get(key) {
1133
- if (this._object[key] !== Object.prototype[key])
1134
- return this._object[key];
1135
- }
1136
-
1137
- function unset(key) {
1138
- var value = this._object[key];
1139
- delete this._object[key];
1140
- return value;
1141
- }
1142
-
1143
- function toObject() {
1144
- return Object.clone(this._object);
1145
- }
1146
-
1147
- function keys() {
1148
- return this.pluck('key');
1149
- }
1150
-
1151
- function values() {
1152
- return this.pluck('value');
1153
- }
1154
-
1155
- function index(value) {
1156
- var match = this.detect(function(pair) {
1157
- return pair.value === value;
1158
- });
1159
- return match && match.key;
1160
- }
1161
-
1162
- function merge(object) {
1163
- return this.clone().update(object);
1164
- }
1165
-
1166
- function update(object) {
1167
- return new Hash(object).inject(this, function(result, pair) {
1168
- result.set(pair.key, pair.value);
1169
- return result;
1170
- });
1171
- }
1172
998
 
1173
999
  function toQueryPair(key, value) {
1174
1000
  if (Object.isUndefined(value)) return key;
1175
1001
  return key + '=' + encodeURIComponent(String.interpret(value));
1176
1002
  }
1177
1003
 
1178
- function toQueryString() {
1179
- return this.inject([], function(results, pair) {
1180
- var key = encodeURIComponent(pair.key), values = pair.value;
1004
+ return {
1005
+ initialize: function(object) {
1006
+ this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
1007
+ },
1181
1008
 
1182
- if (values && typeof values == 'object') {
1183
- if (Object.isArray(values))
1184
- return results.concat(values.map(toQueryPair.curry(key)));
1185
- } else results.push(toQueryPair(key, values));
1186
- return results;
1187
- }).join('&');
1188
- }
1009
+ _each: function(iterator) {
1010
+ for (var key in this._object) {
1011
+ var value = this._object[key], pair = [key, value];
1012
+ pair.key = key;
1013
+ pair.value = value;
1014
+ iterator(pair);
1015
+ }
1016
+ },
1189
1017
 
1190
- function inspect() {
1191
- return '#<Hash:{' + this.map(function(pair) {
1192
- return pair.map(Object.inspect).join(': ');
1193
- }).join(', ') + '}>';
1194
- }
1018
+ set: function(key, value) {
1019
+ return this._object[key] = value;
1020
+ },
1195
1021
 
1196
- function toJSON() {
1197
- return Object.toJSON(this.toObject());
1198
- }
1022
+ get: function(key) {
1023
+ // simulating poorly supported hasOwnProperty
1024
+ if (this._object[key] !== Object.prototype[key])
1025
+ return this._object[key];
1026
+ },
1199
1027
 
1200
- function clone() {
1201
- return new Hash(this);
1202
- }
1028
+ unset: function(key) {
1029
+ var value = this._object[key];
1030
+ delete this._object[key];
1031
+ return value;
1032
+ },
1203
1033
 
1204
- return {
1205
- initialize: initialize,
1206
- _each: _each,
1207
- set: set,
1208
- get: get,
1209
- unset: unset,
1210
- toObject: toObject,
1211
- toTemplateReplacements: toObject,
1212
- keys: keys,
1213
- values: values,
1214
- index: index,
1215
- merge: merge,
1216
- update: update,
1217
- toQueryString: toQueryString,
1218
- inspect: inspect,
1219
- toJSON: toJSON,
1220
- clone: clone
1221
- };
1222
- })());
1034
+ toObject: function() {
1035
+ return Object.clone(this._object);
1036
+ },
1223
1037
 
1224
- Hash.from = $H;
1225
- Object.extend(Number.prototype, (function() {
1226
- function toColorPart() {
1227
- return this.toPaddedString(2, 16);
1228
- }
1038
+ keys: function() {
1039
+ return this.pluck('key');
1040
+ },
1229
1041
 
1230
- function succ() {
1231
- return this + 1;
1232
- }
1042
+ values: function() {
1043
+ return this.pluck('value');
1044
+ },
1233
1045
 
1234
- function times(iterator, context) {
1235
- $R(0, this, true).each(iterator, context);
1236
- return this;
1237
- }
1046
+ index: function(value) {
1047
+ var match = this.detect(function(pair) {
1048
+ return pair.value === value;
1049
+ });
1050
+ return match && match.key;
1051
+ },
1238
1052
 
1239
- function toPaddedString(length, radix) {
1240
- var string = this.toString(radix || 10);
1241
- return '0'.times(length - string.length) + string;
1242
- }
1053
+ merge: function(object) {
1054
+ return this.clone().update(object);
1055
+ },
1243
1056
 
1244
- function toJSON() {
1245
- return isFinite(this) ? this.toString() : 'null';
1246
- }
1057
+ update: function(object) {
1058
+ return new Hash(object).inject(this, function(result, pair) {
1059
+ result.set(pair.key, pair.value);
1060
+ return result;
1061
+ });
1062
+ },
1247
1063
 
1248
- function abs() {
1249
- return Math.abs(this);
1250
- }
1064
+ toQueryString: function() {
1065
+ return this.inject([], function(results, pair) {
1066
+ var key = encodeURIComponent(pair.key), values = pair.value;
1251
1067
 
1252
- function round() {
1253
- return Math.round(this);
1254
- }
1068
+ if (values && typeof values == 'object') {
1069
+ if (Object.isArray(values))
1070
+ return results.concat(values.map(toQueryPair.curry(key)));
1071
+ } else results.push(toQueryPair(key, values));
1072
+ return results;
1073
+ }).join('&');
1074
+ },
1255
1075
 
1256
- function ceil() {
1257
- return Math.ceil(this);
1258
- }
1076
+ inspect: function() {
1077
+ return '#<Hash:{' + this.map(function(pair) {
1078
+ return pair.map(Object.inspect).join(': ');
1079
+ }).join(', ') + '}>';
1080
+ },
1259
1081
 
1260
- function floor() {
1261
- return Math.floor(this);
1262
- }
1082
+ toJSON: function() {
1083
+ return Object.toJSON(this.toObject());
1084
+ },
1263
1085
 
1264
- return {
1265
- toColorPart: toColorPart,
1266
- succ: succ,
1267
- times: times,
1268
- toPaddedString: toPaddedString,
1269
- toJSON: toJSON,
1270
- abs: abs,
1271
- round: round,
1272
- ceil: ceil,
1273
- floor: floor
1274
- };
1086
+ clone: function() {
1087
+ return new Hash(this);
1088
+ }
1089
+ }
1275
1090
  })());
1276
1091
 
1277
- function $R(start, end, exclusive) {
1278
- return new ObjectRange(start, end, exclusive);
1279
- }
1280
-
1281
- var ObjectRange = Class.create(Enumerable, (function() {
1282
- function initialize(start, end, exclusive) {
1092
+ Hash.prototype.toTemplateReplacements = Hash.prototype.toObject;
1093
+ Hash.from = $H;
1094
+ var ObjectRange = Class.create(Enumerable, {
1095
+ initialize: function(start, end, exclusive) {
1283
1096
  this.start = start;
1284
1097
  this.end = end;
1285
1098
  this.exclusive = exclusive;
1286
- }
1099
+ },
1287
1100
 
1288
- function _each(iterator) {
1101
+ _each: function(iterator) {
1289
1102
  var value = this.start;
1290
1103
  while (this.include(value)) {
1291
1104
  iterator(value);
1292
1105
  value = value.succ();
1293
1106
  }
1294
- }
1107
+ },
1295
1108
 
1296
- function include(value) {
1109
+ include: function(value) {
1297
1110
  if (value < this.start)
1298
1111
  return false;
1299
1112
  if (this.exclusive)
1300
1113
  return value < this.end;
1301
1114
  return value <= this.end;
1302
1115
  }
1116
+ });
1303
1117
 
1304
- return {
1305
- initialize: initialize,
1306
- _each: _each,
1307
- include: include
1308
- };
1309
- })());
1310
-
1311
-
1118
+ var $R = function(start, end, exclusive) {
1119
+ return new ObjectRange(start, end, exclusive);
1120
+ };
1312
1121
 
1313
1122
  var Ajax = {
1314
1123
  getTransport: function() {
@@ -1355,6 +1164,7 @@ Ajax.Responders.register({
1355
1164
  onCreate: function() { Ajax.activeRequestCount++ },
1356
1165
  onComplete: function() { Ajax.activeRequestCount-- }
1357
1166
  });
1167
+
1358
1168
  Ajax.Base = Class.create({
1359
1169
  initialize: function(options) {
1360
1170
  this.options = {
@@ -1376,6 +1186,7 @@ Ajax.Base = Class.create({
1376
1186
  this.options.parameters = this.options.parameters.toObject();
1377
1187
  }
1378
1188
  });
1189
+
1379
1190
  Ajax.Request = Class.create(Ajax.Base, {
1380
1191
  _complete: false,
1381
1192
 
@@ -1391,6 +1202,7 @@ Ajax.Request = Class.create(Ajax.Base, {
1391
1202
  var params = Object.clone(this.options.parameters);
1392
1203
 
1393
1204
  if (!['get', 'post'].include(this.method)) {
1205
+ // simulate other verbs over post
1394
1206
  params['_method'] = this.method;
1395
1207
  this.method = 'post';
1396
1208
  }
@@ -1398,6 +1210,7 @@ Ajax.Request = Class.create(Ajax.Base, {
1398
1210
  this.parameters = params;
1399
1211
 
1400
1212
  if (params = Object.toQueryString(params)) {
1213
+ // when GET, append parameters to URL
1401
1214
  if (this.method == 'get')
1402
1215
  this.url += (this.url.include('?') ? '&' : '?') + params;
1403
1216
  else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
@@ -1456,6 +1269,7 @@ Ajax.Request = Class.create(Ajax.Base, {
1456
1269
  headers['Connection'] = 'close';
1457
1270
  }
1458
1271
 
1272
+ // user-defined headers
1459
1273
  if (typeof this.options.requestHeaders == 'object') {
1460
1274
  var extras = this.options.requestHeaders;
1461
1275
 
@@ -1509,6 +1323,7 @@ Ajax.Request = Class.create(Ajax.Base, {
1509
1323
  }
1510
1324
 
1511
1325
  if (state == 'Complete') {
1326
+ // avoid memory leak in MSIE: clean up
1512
1327
  this.transport.onreadystatechange = Prototype.emptyFunction;
1513
1328
  }
1514
1329
  },
@@ -1525,7 +1340,7 @@ Ajax.Request = Class.create(Ajax.Base, {
1525
1340
  getHeader: function(name) {
1526
1341
  try {
1527
1342
  return this.transport.getResponseHeader(name) || null;
1528
- } catch (e) { return null; }
1343
+ } catch (e) { return null }
1529
1344
  },
1530
1345
 
1531
1346
  evalResponse: function() {
@@ -1545,13 +1360,6 @@ Ajax.Request = Class.create(Ajax.Base, {
1545
1360
  Ajax.Request.Events =
1546
1361
  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
1547
1362
 
1548
-
1549
-
1550
-
1551
-
1552
-
1553
-
1554
-
1555
1363
  Ajax.Response = Class.create({
1556
1364
  initialize: function(request){
1557
1365
  this.request = request;
@@ -1573,7 +1381,6 @@ Ajax.Response = Class.create({
1573
1381
  },
1574
1382
 
1575
1383
  status: 0,
1576
-
1577
1384
  statusText: '',
1578
1385
 
1579
1386
  getStatus: Ajax.Request.prototype.getStatus,
@@ -1703,9 +1510,6 @@ Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
1703
1510
  this.updater = new Ajax.Updater(this.container, this.url, this.options);
1704
1511
  }
1705
1512
  });
1706
-
1707
-
1708
-
1709
1513
  function $(element) {
1710
1514
  if (arguments.length > 1) {
1711
1515
  for (var i = 0, elements = [], length = arguments.length; i < length; i++)
@@ -1733,6 +1537,7 @@ if (Prototype.BrowserFeatures.XPath) {
1733
1537
  if (!window.Node) var Node = { };
1734
1538
 
1735
1539
  if (!Node.ELEMENT_NODE) {
1540
+ // DOM level 2 ECMAScript Language Binding
1736
1541
  Object.extend(Node, {
1737
1542
  ELEMENT_NODE: 1,
1738
1543
  ATTRIBUTE_NODE: 2,
@@ -1749,30 +1554,13 @@ if (!Node.ELEMENT_NODE) {
1749
1554
  });
1750
1555
  }
1751
1556
 
1752
-
1753
- (function(global) {
1754
-
1755
- var SETATTRIBUTE_IGNORES_NAME = (function(){
1756
- var elForm = document.createElement("form");
1757
- var elInput = document.createElement("input");
1758
- var root = document.documentElement;
1759
- elInput.setAttribute("name", "test");
1760
- elForm.appendChild(elInput);
1761
- root.appendChild(elForm);
1762
- var isBuggy = elForm.elements
1763
- ? (typeof elForm.elements.test == "undefined")
1764
- : null;
1765
- root.removeChild(elForm);
1766
- elForm = elInput = null;
1767
- return isBuggy;
1768
- })();
1769
-
1770
- var element = global.Element;
1771
- global.Element = function(tagName, attributes) {
1557
+ (function() {
1558
+ var element = this.Element;
1559
+ this.Element = function(tagName, attributes) {
1772
1560
  attributes = attributes || { };
1773
1561
  tagName = tagName.toLowerCase();
1774
1562
  var cache = Element.cache;
1775
- if (SETATTRIBUTE_IGNORES_NAME && attributes.name) {
1563
+ if (Prototype.Browser.IE && attributes.name) {
1776
1564
  tagName = '<' + tagName + ' name="' + attributes.name + '">';
1777
1565
  delete attributes.name;
1778
1566
  return Element.writeAttribute(document.createElement(tagName), attributes);
@@ -1780,12 +1568,11 @@ if (!Node.ELEMENT_NODE) {
1780
1568
  if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
1781
1569
  return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
1782
1570
  };
1783
- Object.extend(global.Element, element || { });
1784
- if (element) global.Element.prototype = element.prototype;
1785
- })(this);
1571
+ Object.extend(this.Element, element || { });
1572
+ if (element) this.Element.prototype = element.prototype;
1573
+ }).call(window);
1786
1574
 
1787
1575
  Element.cache = { };
1788
- Element.idCounter = 1;
1789
1576
 
1790
1577
  Element.Methods = {
1791
1578
  visible: function(element) {
@@ -1798,7 +1585,6 @@ Element.Methods = {
1798
1585
  return element;
1799
1586
  },
1800
1587
 
1801
-
1802
1588
  hide: function(element) {
1803
1589
  element = $(element);
1804
1590
  element.style.display = 'none';
@@ -1817,89 +1603,15 @@ Element.Methods = {
1817
1603
  return element;
1818
1604
  },
1819
1605
 
1820
- update: (function(){
1821
-
1822
- var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){
1823
- var el = document.createElement("select"),
1824
- isBuggy = true;
1825
- el.innerHTML = "<option value=\"test\">test</option>";
1826
- if (el.options && el.options[0]) {
1827
- isBuggy = el.options[0].nodeName.toUpperCase() !== "OPTION";
1828
- }
1829
- el = null;
1830
- return isBuggy;
1831
- })();
1832
-
1833
- var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){
1834
- try {
1835
- var el = document.createElement("table");
1836
- if (el && el.tBodies) {
1837
- el.innerHTML = "<tbody><tr><td>test</td></tr></tbody>";
1838
- var isBuggy = typeof el.tBodies[0] == "undefined";
1839
- el = null;
1840
- return isBuggy;
1841
- }
1842
- } catch (e) {
1843
- return true;
1844
- }
1845
- })();
1846
-
1847
- var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () {
1848
- var s = document.createElement("script"),
1849
- isBuggy = false;
1850
- try {
1851
- s.appendChild(document.createTextNode(""));
1852
- isBuggy = !s.firstChild ||
1853
- s.firstChild && s.firstChild.nodeType !== 3;
1854
- } catch (e) {
1855
- isBuggy = true;
1856
- }
1857
- s = null;
1858
- return isBuggy;
1859
- })();
1860
-
1861
- function update(element, content) {
1862
- element = $(element);
1863
-
1864
- if (content && content.toElement)
1865
- content = content.toElement();
1866
-
1867
- if (Object.isElement(content))
1868
- return element.update().insert(content);
1869
-
1870
- content = Object.toHTML(content);
1871
-
1872
- var tagName = element.tagName.toUpperCase();
1873
-
1874
- if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) {
1875
- element.text = content;
1876
- return element;
1877
- }
1878
-
1879
- if (SELECT_ELEMENT_INNERHTML_BUGGY || TABLE_ELEMENT_INNERHTML_BUGGY) {
1880
- if (tagName in Element._insertionTranslations.tags) {
1881
- while (element.firstChild) {
1882
- element.removeChild(element.firstChild);
1883
- }
1884
- Element._getContentFromAnonymousElement(tagName, content.stripScripts())
1885
- .each(function(node) {
1886
- element.appendChild(node)
1887
- });
1888
- }
1889
- else {
1890
- element.innerHTML = content.stripScripts();
1891
- }
1892
- }
1893
- else {
1894
- element.innerHTML = content.stripScripts();
1895
- }
1896
-
1897
- content.evalScripts.bind(content).defer();
1898
- return element;
1899
- }
1900
-
1901
- return update;
1902
- })(),
1606
+ update: function(element, content) {
1607
+ element = $(element);
1608
+ if (content && content.toElement) content = content.toElement();
1609
+ if (Object.isElement(content)) return element.update().insert(content);
1610
+ content = Object.toHTML(content);
1611
+ element.innerHTML = content.stripScripts();
1612
+ content.evalScripts.bind(content).defer();
1613
+ return element;
1614
+ },
1903
1615
 
1904
1616
  replace: function(element, content) {
1905
1617
  element = $(element);
@@ -1984,11 +1696,11 @@ Element.Methods = {
1984
1696
  },
1985
1697
 
1986
1698
  ancestors: function(element) {
1987
- return Element.recursivelyCollect(element, 'parentNode');
1699
+ return $(element).recursivelyCollect('parentNode');
1988
1700
  },
1989
1701
 
1990
1702
  descendants: function(element) {
1991
- return Element.select(element, "*");
1703
+ return $(element).select("*");
1992
1704
  },
1993
1705
 
1994
1706
  firstDescendant: function(element) {
@@ -2005,17 +1717,16 @@ Element.Methods = {
2005
1717
  },
2006
1718
 
2007
1719
  previousSiblings: function(element) {
2008
- return Element.recursivelyCollect(element, 'previousSibling');
1720
+ return $(element).recursivelyCollect('previousSibling');
2009
1721
  },
2010
1722
 
2011
1723
  nextSiblings: function(element) {
2012
- return Element.recursivelyCollect(element, 'nextSibling');
1724
+ return $(element).recursivelyCollect('nextSibling');
2013
1725
  },
2014
1726
 
2015
1727
  siblings: function(element) {
2016
1728
  element = $(element);
2017
- return Element.previousSiblings(element).reverse()
2018
- .concat(Element.nextSiblings(element));
1729
+ return element.previousSiblings().reverse().concat(element.nextSiblings());
2019
1730
  },
2020
1731
 
2021
1732
  match: function(element, selector) {
@@ -2027,22 +1738,22 @@ Element.Methods = {
2027
1738
  up: function(element, expression, index) {
2028
1739
  element = $(element);
2029
1740
  if (arguments.length == 1) return $(element.parentNode);
2030
- var ancestors = Element.ancestors(element);
1741
+ var ancestors = element.ancestors();
2031
1742
  return Object.isNumber(expression) ? ancestors[expression] :
2032
1743
  Selector.findElement(ancestors, expression, index);
2033
1744
  },
2034
1745
 
2035
1746
  down: function(element, expression, index) {
2036
1747
  element = $(element);
2037
- if (arguments.length == 1) return Element.firstDescendant(element);
2038
- return Object.isNumber(expression) ? Element.descendants(element)[expression] :
1748
+ if (arguments.length == 1) return element.firstDescendant();
1749
+ return Object.isNumber(expression) ? element.descendants()[expression] :
2039
1750
  Element.select(element, expression)[index || 0];
2040
1751
  },
2041
1752
 
2042
1753
  previous: function(element, expression, index) {
2043
1754
  element = $(element);
2044
1755
  if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
2045
- var previousSiblings = Element.previousSiblings(element);
1756
+ var previousSiblings = element.previousSiblings();
2046
1757
  return Object.isNumber(expression) ? previousSiblings[expression] :
2047
1758
  Selector.findElement(previousSiblings, expression, index);
2048
1759
  },
@@ -2050,28 +1761,27 @@ Element.Methods = {
2050
1761
  next: function(element, expression, index) {
2051
1762
  element = $(element);
2052
1763
  if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
2053
- var nextSiblings = Element.nextSiblings(element);
1764
+ var nextSiblings = element.nextSiblings();
2054
1765
  return Object.isNumber(expression) ? nextSiblings[expression] :
2055
1766
  Selector.findElement(nextSiblings, expression, index);
2056
1767
  },
2057
1768
 
2058
-
2059
- select: function(element) {
2060
- var args = Array.prototype.slice.call(arguments, 1);
1769
+ select: function() {
1770
+ var args = $A(arguments), element = $(args.shift());
2061
1771
  return Selector.findChildElements(element, args);
2062
1772
  },
2063
1773
 
2064
- adjacent: function(element) {
2065
- var args = Array.prototype.slice.call(arguments, 1);
1774
+ adjacent: function() {
1775
+ var args = $A(arguments), element = $(args.shift());
2066
1776
  return Selector.findChildElements(element.parentNode, args).without(element);
2067
1777
  },
2068
1778
 
2069
1779
  identify: function(element) {
2070
1780
  element = $(element);
2071
- var id = Element.readAttribute(element, 'id');
1781
+ var id = element.readAttribute('id'), self = arguments.callee;
2072
1782
  if (id) return id;
2073
- do { id = 'anonymous_element_' + Element.idCounter++ } while ($(id));
2074
- Element.writeAttribute(element, 'id', id);
1783
+ do { id = 'anonymous_element_' + self.counter++ } while ($(id));
1784
+ element.writeAttribute('id', id);
2075
1785
  return id;
2076
1786
  },
2077
1787
 
@@ -2110,11 +1820,11 @@ Element.Methods = {
2110
1820
  },
2111
1821
 
2112
1822
  getHeight: function(element) {
2113
- return Element.getDimensions(element).height;
1823
+ return $(element).getDimensions().height;
2114
1824
  },
2115
1825
 
2116
1826
  getWidth: function(element) {
2117
- return Element.getDimensions(element).width;
1827
+ return $(element).getDimensions().width;
2118
1828
  },
2119
1829
 
2120
1830
  classNames: function(element) {
@@ -2130,7 +1840,7 @@ Element.Methods = {
2130
1840
 
2131
1841
  addClassName: function(element, className) {
2132
1842
  if (!(element = $(element))) return;
2133
- if (!Element.hasClassName(element, className))
1843
+ if (!element.hasClassName(className))
2134
1844
  element.className += (element.className ? ' ' : '') + className;
2135
1845
  return element;
2136
1846
  },
@@ -2144,10 +1854,11 @@ Element.Methods = {
2144
1854
 
2145
1855
  toggleClassName: function(element, className) {
2146
1856
  if (!(element = $(element))) return;
2147
- return Element[Element.hasClassName(element, className) ?
2148
- 'removeClassName' : 'addClassName'](element, className);
1857
+ return element[element.hasClassName(className) ?
1858
+ 'removeClassName' : 'addClassName'](className);
2149
1859
  },
2150
1860
 
1861
+ // removes whitespace-only text node children
2151
1862
  cleanWhitespace: function(element) {
2152
1863
  element = $(element);
2153
1864
  var node = element.firstChild;
@@ -2181,7 +1892,7 @@ Element.Methods = {
2181
1892
 
2182
1893
  scrollTo: function(element) {
2183
1894
  element = $(element);
2184
- var pos = Element.cumulativeOffset(element);
1895
+ var pos = element.cumulativeOffset();
2185
1896
  window.scrollTo(pos[0], pos[1]);
2186
1897
  return element;
2187
1898
  },
@@ -2229,17 +1940,18 @@ Element.Methods = {
2229
1940
 
2230
1941
  getDimensions: function(element) {
2231
1942
  element = $(element);
2232
- var display = Element.getStyle(element, 'display');
1943
+ var display = element.getStyle('display');
2233
1944
  if (display != 'none' && display != null) // Safari bug
2234
1945
  return {width: element.offsetWidth, height: element.offsetHeight};
2235
1946
 
1947
+ // All *Width and *Height properties give 0 on elements with display none,
1948
+ // so enable the element temporarily
2236
1949
  var els = element.style;
2237
1950
  var originalVisibility = els.visibility;
2238
1951
  var originalPosition = els.position;
2239
1952
  var originalDisplay = els.display;
2240
1953
  els.visibility = 'hidden';
2241
- if (originalPosition != 'fixed') // Switching fixed to absolute causes issues in Safari
2242
- els.position = 'absolute';
1954
+ els.position = 'absolute';
2243
1955
  els.display = 'block';
2244
1956
  var originalWidth = element.clientWidth;
2245
1957
  var originalHeight = element.clientHeight;
@@ -2255,6 +1967,8 @@ Element.Methods = {
2255
1967
  if (pos == 'static' || !pos) {
2256
1968
  element._madePositioned = true;
2257
1969
  element.style.position = 'relative';
1970
+ // Opera returns the offset relative to the positioning context, when an
1971
+ // element is position relative but top and left have not been defined
2258
1972
  if (Prototype.Browser.Opera) {
2259
1973
  element.style.top = 0;
2260
1974
  element.style.left = 0;
@@ -2320,9 +2034,10 @@ Element.Methods = {
2320
2034
 
2321
2035
  absolutize: function(element) {
2322
2036
  element = $(element);
2323
- if (Element.getStyle(element, 'position') == 'absolute') return element;
2037
+ if (element.getStyle('position') == 'absolute') return element;
2038
+ // Position.prepare(); // To be done manually by Scripty when it needs it.
2324
2039
 
2325
- var offsets = Element.positionedOffset(element);
2040
+ var offsets = element.positionedOffset();
2326
2041
  var top = offsets[1];
2327
2042
  var left = offsets[0];
2328
2043
  var width = element.clientWidth;
@@ -2343,7 +2058,8 @@ Element.Methods = {
2343
2058
 
2344
2059
  relativize: function(element) {
2345
2060
  element = $(element);
2346
- if (Element.getStyle(element, 'position') == 'relative') return element;
2061
+ if (element.getStyle('position') == 'relative') return element;
2062
+ // Position.prepare(); // To be done manually by Scripty when it needs it.
2347
2063
 
2348
2064
  element.style.position = 'relative';
2349
2065
  var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
@@ -2385,6 +2101,7 @@ Element.Methods = {
2385
2101
  valueT += element.offsetTop || 0;
2386
2102
  valueL += element.offsetLeft || 0;
2387
2103
 
2104
+ // Safari fix
2388
2105
  if (element.offsetParent == document.body &&
2389
2106
  Element.getStyle(element, 'position') == 'absolute') break;
2390
2107
 
@@ -2411,22 +2128,28 @@ Element.Methods = {
2411
2128
  offsetLeft: 0
2412
2129
  }, arguments[2] || { });
2413
2130
 
2131
+ // find page position of source
2414
2132
  source = $(source);
2415
- var p = Element.viewportOffset(source);
2133
+ var p = source.viewportOffset();
2416
2134
 
2135
+ // find coordinate system to use
2417
2136
  element = $(element);
2418
2137
  var delta = [0, 0];
2419
2138
  var parent = null;
2139
+ // delta [0,0] will do fine with position: fixed elements,
2140
+ // position:absolute needs offsetParent deltas
2420
2141
  if (Element.getStyle(element, 'position') == 'absolute') {
2421
- parent = Element.getOffsetParent(element);
2422
- delta = Element.viewportOffset(parent);
2142
+ parent = element.getOffsetParent();
2143
+ delta = parent.viewportOffset();
2423
2144
  }
2424
2145
 
2146
+ // correct by body offsets (fixes Safari)
2425
2147
  if (parent == document.body) {
2426
2148
  delta[0] -= document.body.offsetLeft;
2427
2149
  delta[1] -= document.body.offsetTop;
2428
2150
  }
2429
2151
 
2152
+ // set position
2430
2153
  if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
2431
2154
  if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
2432
2155
  if (options.setWidth) element.style.width = source.offsetWidth + 'px';
@@ -2435,9 +2158,10 @@ Element.Methods = {
2435
2158
  }
2436
2159
  };
2437
2160
 
2161
+ Element.Methods.identify.counter = 1;
2162
+
2438
2163
  Object.extend(Element.Methods, {
2439
2164
  getElementsBySelector: Element.Methods.select,
2440
-
2441
2165
  childElements: Element.Methods.immediateDescendants
2442
2166
  });
2443
2167
 
@@ -2458,8 +2182,11 @@ if (Prototype.Browser.Opera) {
2458
2182
  case 'left': case 'top': case 'right': case 'bottom':
2459
2183
  if (proceed(element, 'position') === 'static') return null;
2460
2184
  case 'height': case 'width':
2185
+ // returns '0px' for hidden elements; we want it to return null
2461
2186
  if (!Element.visible(element)) return null;
2462
2187
 
2188
+ // returns the border-box dimensions rather than the content-box
2189
+ // dimensions, so we subtract padding and borders from the value
2463
2190
  var dim = parseInt(proceed(element, style), 10);
2464
2191
 
2465
2192
  if (dim !== element['offset' + style.capitalize()])
@@ -2492,9 +2219,12 @@ if (Prototype.Browser.Opera) {
2492
2219
  }
2493
2220
 
2494
2221
  else if (Prototype.Browser.IE) {
2222
+ // IE doesn't report offsets correctly for static elements, so we change them
2223
+ // to "relative" to get the values, then change them back.
2495
2224
  Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
2496
2225
  function(proceed, element) {
2497
2226
  element = $(element);
2227
+ // IE throws an error if element is not in document
2498
2228
  try { element.offsetParent }
2499
2229
  catch(e) { return $(document.body) }
2500
2230
  var position = element.getStyle('position');
@@ -2514,6 +2244,8 @@ else if (Prototype.Browser.IE) {
2514
2244
  catch(e) { return Element._returnOffset(0,0) }
2515
2245
  var position = element.getStyle('position');
2516
2246
  if (position !== 'static') return proceed(element);
2247
+ // Trigger hasLayout on the offset parent so that IE6 reports
2248
+ // accurate offsetTop and offsetLeft values for position: fixed.
2517
2249
  var offsetParent = element.getOffsetParent();
2518
2250
  if (offsetParent && offsetParent.getStyle('position') === 'fixed')
2519
2251
  offsetParent.setStyle({ zoom: 1 });
@@ -2574,92 +2306,36 @@ else if (Prototype.Browser.IE) {
2574
2306
  return element;
2575
2307
  };
2576
2308
 
2577
- Element._attributeTranslations = (function(){
2578
-
2579
- var classProp = 'className';
2580
- var forProp = 'for';
2581
-
2582
- var el = document.createElement('div');
2583
-
2584
- el.setAttribute(classProp, 'x');
2585
-
2586
- if (el.className !== 'x') {
2587
- el.setAttribute('class', 'x');
2588
- if (el.className === 'x') {
2589
- classProp = 'class';
2590
- }
2591
- }
2592
- el = null;
2593
-
2594
- el = document.createElement('label');
2595
- el.setAttribute(forProp, 'x');
2596
- if (el.htmlFor !== 'x') {
2597
- el.setAttribute('htmlFor', 'x');
2598
- if (el.htmlFor === 'x') {
2599
- forProp = 'htmlFor';
2600
- }
2601
- }
2602
- el = null;
2603
-
2604
- return {
2605
- read: {
2606
- names: {
2607
- 'class': classProp,
2608
- 'className': classProp,
2609
- 'for': forProp,
2610
- 'htmlFor': forProp
2309
+ Element._attributeTranslations = {
2310
+ read: {
2311
+ names: {
2312
+ 'class': 'className',
2313
+ 'for': 'htmlFor'
2314
+ },
2315
+ values: {
2316
+ _getAttr: function(element, attribute) {
2317
+ return element.getAttribute(attribute, 2);
2611
2318
  },
2612
- values: {
2613
- _getAttr: function(element, attribute) {
2614
- return element.getAttribute(attribute);
2615
- },
2616
- _getAttr2: function(element, attribute) {
2617
- return element.getAttribute(attribute, 2);
2618
- },
2619
- _getAttrNode: function(element, attribute) {
2620
- var node = element.getAttributeNode(attribute);
2621
- return node ? node.value : "";
2622
- },
2623
- _getEv: (function(){
2624
-
2625
- var el = document.createElement('div');
2626
- el.onclick = Prototype.emptyFunction;
2627
- var value = el.getAttribute('onclick');
2628
- var f;
2629
-
2630
- if (String(value).indexOf('{') > -1) {
2631
- f = function(element, attribute) {
2632
- attribute = element.getAttribute(attribute);
2633
- if (!attribute) return null;
2634
- attribute = attribute.toString();
2635
- attribute = attribute.split('{')[1];
2636
- attribute = attribute.split('}')[0];
2637
- return attribute.strip();
2638
- };
2639
- }
2640
- else if (value === '') {
2641
- f = function(element, attribute) {
2642
- attribute = element.getAttribute(attribute);
2643
- if (!attribute) return null;
2644
- return attribute.strip();
2645
- };
2646
- }
2647
- el = null;
2648
- return f;
2649
- })(),
2650
- _flag: function(element, attribute) {
2651
- return $(element).hasAttribute(attribute) ? attribute : null;
2652
- },
2653
- style: function(element) {
2654
- return element.style.cssText.toLowerCase();
2655
- },
2656
- title: function(element) {
2657
- return element.title;
2658
- }
2319
+ _getAttrNode: function(element, attribute) {
2320
+ var node = element.getAttributeNode(attribute);
2321
+ return node ? node.value : "";
2322
+ },
2323
+ _getEv: function(element, attribute) {
2324
+ attribute = element.getAttribute(attribute);
2325
+ return attribute ? attribute.toString().slice(23, -2) : null;
2326
+ },
2327
+ _flag: function(element, attribute) {
2328
+ return $(element).hasAttribute(attribute) ? attribute : null;
2329
+ },
2330
+ style: function(element) {
2331
+ return element.style.cssText.toLowerCase();
2332
+ },
2333
+ title: function(element) {
2334
+ return element.title;
2659
2335
  }
2660
2336
  }
2661
2337
  }
2662
- })();
2338
+ };
2663
2339
 
2664
2340
  Element._attributeTranslations.write = {
2665
2341
  names: Object.extend({
@@ -2687,8 +2363,8 @@ else if (Prototype.Browser.IE) {
2687
2363
 
2688
2364
  (function(v) {
2689
2365
  Object.extend(v, {
2690
- href: v._getAttr2,
2691
- src: v._getAttr2,
2366
+ href: v._getAttr,
2367
+ src: v._getAttr,
2692
2368
  type: v._getAttr,
2693
2369
  action: v._getAttrNode,
2694
2370
  disabled: v._flag,
@@ -2715,26 +2391,6 @@ else if (Prototype.Browser.IE) {
2715
2391
  onchange: v._getEv
2716
2392
  });
2717
2393
  })(Element._attributeTranslations.read.values);
2718
-
2719
- if (Prototype.BrowserFeatures.ElementExtensions) {
2720
- (function() {
2721
- function _descendants(element) {
2722
- var nodes = element.getElementsByTagName('*'), results = [];
2723
- for (var i = 0, node; node = nodes[i]; i++)
2724
- if (node.tagName !== "!") // Filter out comment nodes.
2725
- results.push(node);
2726
- return results;
2727
- }
2728
-
2729
- Element.Methods.down = function(element, expression, index) {
2730
- element = $(element);
2731
- if (arguments.length == 1) return element.firstDescendant();
2732
- return Object.isNumber(expression) ? _descendants(element)[expression] :
2733
- Element.select(element, expression)[index || 0];
2734
- }
2735
- })();
2736
- }
2737
-
2738
2394
  }
2739
2395
 
2740
2396
  else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
@@ -2764,6 +2420,9 @@ else if (Prototype.Browser.WebKit) {
2764
2420
  return element;
2765
2421
  };
2766
2422
 
2423
+ // Safari returns margins on body which is incorrect if the child is absolutely
2424
+ // positioned. For performance reasons, redefine Element#cumulativeOffset for
2425
+ // KHTML/WebKit only.
2767
2426
  Element.Methods.cumulativeOffset = function(element) {
2768
2427
  var valueT = 0, valueL = 0;
2769
2428
  do {
@@ -2779,7 +2438,30 @@ else if (Prototype.Browser.WebKit) {
2779
2438
  };
2780
2439
  }
2781
2440
 
2782
- if ('outerHTML' in document.documentElement) {
2441
+ if (Prototype.Browser.IE || Prototype.Browser.Opera) {
2442
+ // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements
2443
+ Element.Methods.update = function(element, content) {
2444
+ element = $(element);
2445
+
2446
+ if (content && content.toElement) content = content.toElement();
2447
+ if (Object.isElement(content)) return element.update().insert(content);
2448
+
2449
+ content = Object.toHTML(content);
2450
+ var tagName = element.tagName.toUpperCase();
2451
+
2452
+ if (tagName in Element._insertionTranslations.tags) {
2453
+ $A(element.childNodes).each(function(node) { element.removeChild(node) });
2454
+ Element._getContentFromAnonymousElement(tagName, content.stripScripts())
2455
+ .each(function(node) { element.appendChild(node) });
2456
+ }
2457
+ else element.innerHTML = content.stripScripts();
2458
+
2459
+ content.evalScripts.bind(content).defer();
2460
+ return element;
2461
+ };
2462
+ }
2463
+
2464
+ if ('outerHTML' in document.createElement('div')) {
2783
2465
  Element.Methods.replace = function(element, content) {
2784
2466
  element = $(element);
2785
2467
 
@@ -2847,13 +2529,12 @@ Element._insertionTranslations = {
2847
2529
  };
2848
2530
 
2849
2531
  (function() {
2850
- var tags = Element._insertionTranslations.tags;
2851
- Object.extend(tags, {
2852
- THEAD: tags.TBODY,
2853
- TFOOT: tags.TBODY,
2854
- TH: tags.TD
2532
+ Object.extend(this.tags, {
2533
+ THEAD: this.tags.TBODY,
2534
+ TFOOT: this.tags.TBODY,
2535
+ TH: this.tags.TD
2855
2536
  });
2856
- })();
2537
+ }).call(Element._insertionTranslations);
2857
2538
 
2858
2539
  Element.Methods.Simulated = {
2859
2540
  hasAttribute: function(element, attribute) {
@@ -2867,81 +2548,41 @@ Element.Methods.ByTag = { };
2867
2548
 
2868
2549
  Object.extend(Element, Element.Methods);
2869
2550
 
2870
- (function(div) {
2871
-
2872
- if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) {
2873
- window.HTMLElement = { };
2874
- window.HTMLElement.prototype = div['__proto__'];
2875
- Prototype.BrowserFeatures.ElementExtensions = true;
2876
- }
2877
-
2878
- div = null;
2879
-
2880
- })(document.createElement('div'))
2881
-
2882
- Element.extend = (function() {
2883
-
2884
- function checkDeficiency(tagName) {
2885
- if (typeof window.Element != 'undefined') {
2886
- var proto = window.Element.prototype;
2887
- if (proto) {
2888
- var id = '_' + (Math.random()+'').slice(2);
2889
- var el = document.createElement(tagName);
2890
- proto[id] = 'x';
2891
- var isBuggy = (el[id] !== 'x');
2892
- delete proto[id];
2893
- el = null;
2894
- return isBuggy;
2895
- }
2896
- }
2897
- return false;
2898
- }
2899
-
2900
- function extendElementWith(element, methods) {
2901
- for (var property in methods) {
2902
- var value = methods[property];
2903
- if (Object.isFunction(value) && !(property in element))
2904
- element[property] = value.methodize();
2905
- }
2906
- }
2551
+ if (!Prototype.BrowserFeatures.ElementExtensions &&
2552
+ document.createElement('div')['__proto__']) {
2553
+ window.HTMLElement = { };
2554
+ window.HTMLElement.prototype = document.createElement('div')['__proto__'];
2555
+ Prototype.BrowserFeatures.ElementExtensions = true;
2556
+ }
2907
2557
 
2908
- var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object');
2909
-
2910
- if (Prototype.BrowserFeatures.SpecificElementExtensions) {
2911
- if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) {
2912
- return function(element) {
2913
- if (element && typeof element._extendedByPrototype == 'undefined') {
2914
- var t = element.tagName;
2915
- if (t && (/^(?:object|applet|embed)$/i.test(t))) {
2916
- extendElementWith(element, Element.Methods);
2917
- extendElementWith(element, Element.Methods.Simulated);
2918
- extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]);
2919
- }
2920
- }
2921
- return element;
2922
- }
2923
- }
2558
+ Element.extend = (function() {
2559
+ if (Prototype.BrowserFeatures.SpecificElementExtensions)
2924
2560
  return Prototype.K;
2925
- }
2926
2561
 
2927
2562
  var Methods = { }, ByTag = Element.Methods.ByTag;
2928
2563
 
2929
2564
  var extend = Object.extend(function(element) {
2930
- if (!element || typeof element._extendedByPrototype != 'undefined' ||
2565
+ if (!element || element._extendedByPrototype ||
2931
2566
  element.nodeType != 1 || element == window) return element;
2932
2567
 
2933
2568
  var methods = Object.clone(Methods),
2934
- tagName = element.tagName.toUpperCase();
2569
+ tagName = element.tagName.toUpperCase(), property, value;
2935
2570
 
2571
+ // extend methods for specific tags
2936
2572
  if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
2937
2573
 
2938
- extendElementWith(element, methods);
2574
+ for (property in methods) {
2575
+ value = methods[property];
2576
+ if (Object.isFunction(value) && !(property in element))
2577
+ element[property] = value.methodize();
2578
+ }
2939
2579
 
2940
2580
  element._extendedByPrototype = Prototype.emptyFunction;
2941
2581
  return element;
2942
2582
 
2943
2583
  }, {
2944
2584
  refresh: function() {
2585
+ // extend methods for all tags (Safari doesn't need this)
2945
2586
  if (!Prototype.BrowserFeatures.ElementExtensions) {
2946
2587
  Object.extend(Methods, Element.Methods);
2947
2588
  Object.extend(Methods, Element.Methods.Simulated);
@@ -3020,18 +2661,14 @@ Element.addMethods = function(methods) {
3020
2661
  klass = 'HTML' + tagName.capitalize() + 'Element';
3021
2662
  if (window[klass]) return window[klass];
3022
2663
 
3023
- var element = document.createElement(tagName);
3024
- var proto = element['__proto__'] || element.constructor.prototype;
3025
- element = null;
3026
- return proto;
2664
+ window[klass] = { };
2665
+ window[klass].prototype = document.createElement(tagName)['__proto__'];
2666
+ return window[klass];
3027
2667
  }
3028
2668
 
3029
- var elementPrototype = window.HTMLElement ? HTMLElement.prototype :
3030
- Element.prototype;
3031
-
3032
2669
  if (F.ElementExtensions) {
3033
- copy(Element.Methods, elementPrototype);
3034
- copy(Element.Methods.Simulated, elementPrototype, true);
2670
+ copy(Element.Methods, HTMLElement.prototype);
2671
+ copy(Element.Methods.Simulated, HTMLElement.prototype, true);
3035
2672
  }
3036
2673
 
3037
2674
  if (F.SpecificElementExtensions) {
@@ -3049,109 +2686,38 @@ Element.addMethods = function(methods) {
3049
2686
  Element.cache = { };
3050
2687
  };
3051
2688
 
3052
-
3053
2689
  document.viewport = {
3054
-
3055
2690
  getDimensions: function() {
3056
- return { width: this.getWidth(), height: this.getHeight() };
3057
- },
3058
-
3059
- getScrollOffsets: function() {
3060
- return Element._returnOffset(
3061
- window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
3062
- window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
3063
- }
3064
- };
3065
-
3066
- (function(viewport) {
3067
- var B = Prototype.Browser, doc = document, element, property = {};
3068
-
3069
- function getRootElement() {
3070
- if (B.WebKit && !doc.evaluate)
3071
- return document;
3072
-
3073
- if (B.Opera && window.parseFloat(window.opera.version()) < 9.5)
3074
- return document.body;
3075
-
3076
- return document.documentElement;
3077
- }
3078
-
3079
- function define(D) {
3080
- if (!element) element = getRootElement();
3081
-
3082
- property[D] = 'client' + D;
3083
-
3084
- viewport['get' + D] = function() { return element[property[D]] };
3085
- return viewport['get' + D]();
3086
- }
3087
-
3088
- viewport.getWidth = define.curry('Width');
3089
-
3090
- viewport.getHeight = define.curry('Height');
3091
- })(document.viewport);
3092
-
3093
-
3094
- Element.Storage = {
3095
- UID: 1
3096
- };
3097
-
3098
- Element.addMethods({
3099
- getStorage: function(element) {
3100
- if (!(element = $(element))) return;
3101
-
3102
- var uid;
3103
- if (element === window) {
3104
- uid = 0;
3105
- } else {
3106
- if (typeof element._prototypeUID === "undefined")
3107
- element._prototypeUID = [Element.Storage.UID++];
3108
- uid = element._prototypeUID[0];
3109
- }
3110
-
3111
- if (!Element.Storage[uid])
3112
- Element.Storage[uid] = $H();
3113
-
3114
- return Element.Storage[uid];
2691
+ var dimensions = { }, B = Prototype.Browser;
2692
+ $w('width height').each(function(d) {
2693
+ var D = d.capitalize();
2694
+ if (B.WebKit && !document.evaluate) {
2695
+ // Safari <3.0 needs self.innerWidth/Height
2696
+ dimensions[d] = self['inner' + D];
2697
+ } else if (B.Opera && parseFloat(window.opera.version()) < 9.5) {
2698
+ // Opera <9.5 needs document.body.clientWidth/Height
2699
+ dimensions[d] = document.body['client' + D]
2700
+ } else {
2701
+ dimensions[d] = document.documentElement['client' + D];
2702
+ }
2703
+ });
2704
+ return dimensions;
3115
2705
  },
3116
2706
 
3117
- store: function(element, key, value) {
3118
- if (!(element = $(element))) return;
3119
-
3120
- if (arguments.length === 2) {
3121
- Element.getStorage(element).update(key);
3122
- } else {
3123
- Element.getStorage(element).set(key, value);
3124
- }
3125
-
3126
- return element;
2707
+ getWidth: function() {
2708
+ return this.getDimensions().width;
3127
2709
  },
3128
2710
 
3129
- retrieve: function(element, key, defaultValue) {
3130
- if (!(element = $(element))) return;
3131
- var hash = Element.getStorage(element), value = hash.get(key);
3132
-
3133
- if (Object.isUndefined(value)) {
3134
- hash.set(key, defaultValue);
3135
- value = defaultValue;
3136
- }
3137
-
3138
- return value;
2711
+ getHeight: function() {
2712
+ return this.getDimensions().height;
3139
2713
  },
3140
2714
 
3141
- clone: function(element, deep) {
3142
- if (!(element = $(element))) return;
3143
- var clone = element.cloneNode(deep);
3144
- clone._prototypeUID = void 0;
3145
- if (deep) {
3146
- var descendants = Element.select(clone, '*'),
3147
- i = descendants.length;
3148
- while (i--) {
3149
- descendants[i]._prototypeUID = void 0;
3150
- }
3151
- }
3152
- return Element.extend(clone);
2715
+ getScrollOffsets: function() {
2716
+ return Element._returnOffset(
2717
+ window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
2718
+ window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
3153
2719
  }
3154
- });
2720
+ };
3155
2721
  /* Portions of the Selector class are derived from Jack Slocum's DomQuery,
3156
2722
  * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
3157
2723
  * license. Please see http://www.yui-ext.com/ for more information. */
@@ -3172,52 +2738,31 @@ var Selector = Class.create({
3172
2738
 
3173
2739
  },
3174
2740
 
3175
- shouldUseXPath: (function() {
3176
-
3177
- var IS_DESCENDANT_SELECTOR_BUGGY = (function(){
3178
- var isBuggy = false;
3179
- if (document.evaluate && window.XPathResult) {
3180
- var el = document.createElement('div');
3181
- el.innerHTML = '<ul><li></li></ul><div><ul><li></li></ul></div>';
3182
-
3183
- var xpath = ".//*[local-name()='ul' or local-name()='UL']" +
3184
- "//*[local-name()='li' or local-name()='LI']";
3185
-
3186
- var result = document.evaluate(xpath, el, null,
3187
- XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
3188
-
3189
- isBuggy = (result.snapshotLength !== 2);
3190
- el = null;
3191
- }
3192
- return isBuggy;
3193
- })();
3194
-
3195
- return function() {
3196
- if (!Prototype.BrowserFeatures.XPath) return false;
3197
-
3198
- var e = this.expression;
3199
-
3200
- if (Prototype.Browser.WebKit &&
3201
- (e.include("-of-type") || e.include(":empty")))
3202
- return false;
2741
+ shouldUseXPath: function() {
2742
+ if (!Prototype.BrowserFeatures.XPath) return false;
3203
2743
 
3204
- if ((/(\[[\w-]*?:|:checked)/).test(e))
3205
- return false;
2744
+ var e = this.expression;
3206
2745
 
3207
- if (IS_DESCENDANT_SELECTOR_BUGGY) return false;
2746
+ // Safari 3 chokes on :*-of-type and :empty
2747
+ if (Prototype.Browser.WebKit &&
2748
+ (e.include("-of-type") || e.include(":empty")))
2749
+ return false;
3208
2750
 
3209
- return true;
3210
- }
2751
+ // XPath can't do namespaced attributes, nor can it read
2752
+ // the "checked" property from DOM nodes
2753
+ if ((/(\[[\w-]*?:|:checked)/).test(e))
2754
+ return false;
3211
2755
 
3212
- })(),
2756
+ return true;
2757
+ },
3213
2758
 
3214
2759
  shouldUseSelectorsAPI: function() {
3215
2760
  if (!Prototype.BrowserFeatures.SelectorsAPI) return false;
3216
2761
 
3217
- if (Selector.CASE_INSENSITIVE_CLASS_NAMES) return false;
3218
-
3219
2762
  if (!Selector._div) Selector._div = new Element('div');
3220
2763
 
2764
+ // Make sure the browser treats the selector as valid. Test on an
2765
+ // isolated element to minimize cost of this check.
3221
2766
  try {
3222
2767
  Selector._div.querySelector(this.expression);
3223
2768
  } catch(e) {
@@ -3229,7 +2774,7 @@ var Selector = Class.create({
3229
2774
 
3230
2775
  compileMatcher: function() {
3231
2776
  var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
3232
- c = Selector.criteria, le, p, m, len = ps.length, name;
2777
+ c = Selector.criteria, le, p, m;
3233
2778
 
3234
2779
  if (Selector._cache[e]) {
3235
2780
  this.matcher = Selector._cache[e];
@@ -3241,12 +2786,11 @@ var Selector = Class.create({
3241
2786
 
3242
2787
  while (e && le != e && (/\S/).test(e)) {
3243
2788
  le = e;
3244
- for (var i = 0; i<len; i++) {
3245
- p = ps[i].re;
3246
- name = ps[i].name;
2789
+ for (var i in ps) {
2790
+ p = ps[i];
3247
2791
  if (m = e.match(p)) {
3248
- this.matcher.push(Object.isFunction(c[name]) ? c[name](m) :
3249
- new Template(c[name]).evaluate(m));
2792
+ this.matcher.push(Object.isFunction(c[i]) ? c[i](m) :
2793
+ new Template(c[i]).evaluate(m));
3250
2794
  e = e.replace(m[0], '');
3251
2795
  break;
3252
2796
  }
@@ -3260,7 +2804,7 @@ var Selector = Class.create({
3260
2804
 
3261
2805
  compileXPathMatcher: function() {
3262
2806
  var e = this.expression, ps = Selector.patterns,
3263
- x = Selector.xpath, le, m, len = ps.length, name;
2807
+ x = Selector.xpath, le, m;
3264
2808
 
3265
2809
  if (Selector._cache[e]) {
3266
2810
  this.xpath = Selector._cache[e]; return;
@@ -3269,11 +2813,10 @@ var Selector = Class.create({
3269
2813
  this.matcher = ['.//*'];
3270
2814
  while (e && le != e && (/\S/).test(e)) {
3271
2815
  le = e;
3272
- for (var i = 0; i<len; i++) {
3273
- name = ps[i].name;
3274
- if (m = e.match(ps[i].re)) {
3275
- this.matcher.push(Object.isFunction(x[name]) ? x[name](m) :
3276
- new Template(x[name]).evaluate(m));
2816
+ for (var i in ps) {
2817
+ if (m = e.match(ps[i])) {
2818
+ this.matcher.push(Object.isFunction(x[i]) ? x[i](m) :
2819
+ new Template(x[i]).evaluate(m));
3277
2820
  e = e.replace(m[0], '');
3278
2821
  break;
3279
2822
  }
@@ -3290,9 +2833,11 @@ var Selector = Class.create({
3290
2833
 
3291
2834
  switch (this.mode) {
3292
2835
  case 'selectorsAPI':
2836
+ // querySelectorAll queries document-wide, then filters to descendants
2837
+ // of the context element. That's not what we want.
2838
+ // Add an explicit context to the selector if necessary.
3293
2839
  if (root !== document) {
3294
2840
  var oldId = root.id, id = $(root).identify();
3295
- id = id.replace(/([\.:])/g, "\\$1");
3296
2841
  e = "#" + id + " " + e;
3297
2842
  }
3298
2843
 
@@ -3311,18 +2856,21 @@ var Selector = Class.create({
3311
2856
  this.tokens = [];
3312
2857
 
3313
2858
  var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
3314
- var le, p, m, len = ps.length, name;
2859
+ var le, p, m;
3315
2860
 
3316
2861
  while (e && le !== e && (/\S/).test(e)) {
3317
2862
  le = e;
3318
- for (var i = 0; i<len; i++) {
3319
- p = ps[i].re;
3320
- name = ps[i].name;
2863
+ for (var i in ps) {
2864
+ p = ps[i];
3321
2865
  if (m = e.match(p)) {
3322
- if (as[name]) {
3323
- this.tokens.push([name, Object.clone(m)]);
2866
+ // use the Selector.assertions methods unless the selector
2867
+ // is too complex.
2868
+ if (as[i]) {
2869
+ this.tokens.push([i, Object.clone(m)]);
3324
2870
  e = e.replace(m[0], '');
3325
2871
  } else {
2872
+ // reluctantly do a document-wide search
2873
+ // and look for a match in the array
3326
2874
  return this.findElements(document).include(element);
3327
2875
  }
3328
2876
  }
@@ -3349,21 +2897,6 @@ var Selector = Class.create({
3349
2897
  }
3350
2898
  });
3351
2899
 
3352
- if (Prototype.BrowserFeatures.SelectorsAPI &&
3353
- document.compatMode === 'BackCompat') {
3354
- Selector.CASE_INSENSITIVE_CLASS_NAMES = (function(){
3355
- var div = document.createElement('div'),
3356
- span = document.createElement('span');
3357
-
3358
- div.id = "prototype_test_id";
3359
- span.className = 'Test';
3360
- div.appendChild(span);
3361
- var isIgnored = (div.querySelector('#prototype_test_id .test') !== null);
3362
- div = span = null;
3363
- return isIgnored;
3364
- })();
3365
- }
3366
-
3367
2900
  Object.extend(Selector, {
3368
2901
  _cache: { },
3369
2902
 
@@ -3413,15 +2946,14 @@ Object.extend(Selector, {
3413
2946
  'enabled': "[not(@disabled) and (@type!='hidden')]",
3414
2947
  'not': function(m) {
3415
2948
  var e = m[6], p = Selector.patterns,
3416
- x = Selector.xpath, le, v, len = p.length, name;
2949
+ x = Selector.xpath, le, v;
3417
2950
 
3418
2951
  var exclusion = [];
3419
2952
  while (e && le != e && (/\S/).test(e)) {
3420
2953
  le = e;
3421
- for (var i = 0; i<len; i++) {
3422
- name = p[i].name
3423
- if (m = e.match(p[i].re)) {
3424
- v = Object.isFunction(x[name]) ? x[name](m) : new Template(x[name]).evaluate(m);
2954
+ for (var i in p) {
2955
+ if (m = e.match(p[i])) {
2956
+ v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m);
3425
2957
  exclusion.push("(" + v.substring(1, v.length - 1) + ")");
3426
2958
  e = e.replace(m[0], '');
3427
2959
  break;
@@ -3489,20 +3021,25 @@ Object.extend(Selector, {
3489
3021
  laterSibling: 'c = "laterSibling";'
3490
3022
  },
3491
3023
 
3492
- patterns: [
3493
- { name: 'laterSibling', re: /^\s*~\s*/ },
3494
- { name: 'child', re: /^\s*>\s*/ },
3495
- { name: 'adjacent', re: /^\s*\+\s*/ },
3496
- { name: 'descendant', re: /^\s/ },
3024
+ patterns: {
3025
+ // combinators must be listed first
3026
+ // (and descendant needs to be last combinator)
3027
+ laterSibling: /^\s*~\s*/,
3028
+ child: /^\s*>\s*/,
3029
+ adjacent: /^\s*\+\s*/,
3030
+ descendant: /^\s/,
3497
3031
 
3498
- { name: 'tagName', re: /^\s*(\*|[\w\-]+)(\b|$)?/ },
3499
- { name: 'id', re: /^#([\w\-\*]+)(\b|$)/ },
3500
- { name: 'className', re: /^\.([\w\-\*]+)(\b|$)/ },
3501
- { name: 'pseudo', re: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/ },
3502
- { name: 'attrPresence', re: /^\[((?:[\w-]+:)?[\w-]+)\]/ },
3503
- { name: 'attr', re: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ }
3504
- ],
3032
+ // selectors follow
3033
+ tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,
3034
+ id: /^#([\w\-\*]+)(\b|$)/,
3035
+ className: /^\.([\w\-\*]+)(\b|$)/,
3036
+ pseudo:
3037
+ /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,
3038
+ attrPresence: /^\[((?:[\w]+:)?[\w]+)\]/,
3039
+ attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
3040
+ },
3505
3041
 
3042
+ // for Selector.match and Element#match
3506
3043
  assertions: {
3507
3044
  tagName: function(element, matches) {
3508
3045
  return matches[1].toUpperCase() == element.tagName.toUpperCase();
@@ -3527,12 +3064,15 @@ Object.extend(Selector, {
3527
3064
  },
3528
3065
 
3529
3066
  handlers: {
3067
+ // UTILITY FUNCTIONS
3068
+ // joins two collections
3530
3069
  concat: function(a, b) {
3531
3070
  for (var i = 0, node; node = b[i]; i++)
3532
3071
  a.push(node);
3533
3072
  return a;
3534
3073
  },
3535
3074
 
3075
+ // marks an array of nodes for counting
3536
3076
  mark: function(nodes) {
3537
3077
  var _true = Prototype.emptyFunction;
3538
3078
  for (var i = 0, node; node = nodes[i]; i++)
@@ -3540,32 +3080,15 @@ Object.extend(Selector, {
3540
3080
  return nodes;
3541
3081
  },
3542
3082
 
3543
- unmark: (function(){
3544
-
3545
- var PROPERTIES_ATTRIBUTES_MAP = (function(){
3546
- var el = document.createElement('div'),
3547
- isBuggy = false,
3548
- propName = '_countedByPrototype',
3549
- value = 'x'
3550
- el[propName] = value;
3551
- isBuggy = (el.getAttribute(propName) === value);
3552
- el = null;
3553
- return isBuggy;
3554
- })();
3555
-
3556
- return PROPERTIES_ATTRIBUTES_MAP ?
3557
- function(nodes) {
3558
- for (var i = 0, node; node = nodes[i]; i++)
3559
- node.removeAttribute('_countedByPrototype');
3560
- return nodes;
3561
- } :
3562
- function(nodes) {
3563
- for (var i = 0, node; node = nodes[i]; i++)
3564
- node._countedByPrototype = void 0;
3565
- return nodes;
3566
- }
3567
- })(),
3083
+ unmark: function(nodes) {
3084
+ for (var i = 0, node; node = nodes[i]; i++)
3085
+ node._countedByPrototype = undefined;
3086
+ return nodes;
3087
+ },
3568
3088
 
3089
+ // mark each child node with its position (for nth calls)
3090
+ // "ofType" flag indicates whether we're indexing for nth-of-type
3091
+ // rather than nth-child
3569
3092
  index: function(parentNode, reverse, ofType) {
3570
3093
  parentNode._countedByPrototype = Prototype.emptyFunction;
3571
3094
  if (reverse) {
@@ -3579,17 +3102,19 @@ Object.extend(Selector, {
3579
3102
  }
3580
3103
  },
3581
3104
 
3105
+ // filters out duplicates and extends all nodes
3582
3106
  unique: function(nodes) {
3583
3107
  if (nodes.length == 0) return nodes;
3584
3108
  var results = [], n;
3585
3109
  for (var i = 0, l = nodes.length; i < l; i++)
3586
- if (typeof (n = nodes[i])._countedByPrototype == 'undefined') {
3110
+ if (!(n = nodes[i])._countedByPrototype) {
3587
3111
  n._countedByPrototype = Prototype.emptyFunction;
3588
3112
  results.push(Element.extend(n));
3589
3113
  }
3590
3114
  return Selector.handlers.unmark(results);
3591
3115
  },
3592
3116
 
3117
+ // COMBINATOR FUNCTIONS
3593
3118
  descendant: function(nodes) {
3594
3119
  var h = Selector.handlers;
3595
3120
  for (var i = 0, results = [], node; node = nodes[i]; i++)
@@ -3633,11 +3158,13 @@ Object.extend(Selector, {
3633
3158
  return null;
3634
3159
  },
3635
3160
 
3161
+ // TOKEN FUNCTIONS
3636
3162
  tagName: function(nodes, root, tagName, combinator) {
3637
3163
  var uTagName = tagName.toUpperCase();
3638
3164
  var results = [], h = Selector.handlers;
3639
3165
  if (nodes) {
3640
3166
  if (combinator) {
3167
+ // fastlane for ordinary descendant combinators
3641
3168
  if (combinator == "descendant") {
3642
3169
  for (var i = 0, node; node = nodes[i]; i++)
3643
3170
  h.concat(results, node.getElementsByTagName(tagName));
@@ -3653,19 +3180,8 @@ Object.extend(Selector, {
3653
3180
 
3654
3181
  id: function(nodes, root, id, combinator) {
3655
3182
  var targetNode = $(id), h = Selector.handlers;
3656
-
3657
- if (root == document) {
3658
- if (!targetNode) return [];
3659
- if (!nodes) return [targetNode];
3660
- } else {
3661
- if (!root.sourceIndex || root.sourceIndex < 1) {
3662
- var nodes = root.getElementsByTagName('*');
3663
- for (var j = 0, node; node = nodes[j]; j++) {
3664
- if (node.id === id) return [node];
3665
- }
3666
- }
3667
- }
3668
-
3183
+ if (!targetNode) return [];
3184
+ if (!nodes && root == document) return [targetNode];
3669
3185
  if (nodes) {
3670
3186
  if (combinator) {
3671
3187
  if (combinator == 'child') {
@@ -3777,6 +3293,7 @@ Object.extend(Selector, {
3777
3293
  return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
3778
3294
  },
3779
3295
 
3296
+ // handles the an+b logic
3780
3297
  getIndices: function(a, b, total) {
3781
3298
  if (a == 0) return b > 0 ? [b] : [];
3782
3299
  return $R(1, total).inject([], function(memo, i) {
@@ -3785,6 +3302,7 @@ Object.extend(Selector, {
3785
3302
  });
3786
3303
  },
3787
3304
 
3305
+ // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type
3788
3306
  nth: function(nodes, formula, root, reverse, ofType) {
3789
3307
  if (nodes.length == 0) return [];
3790
3308
  if (formula == 'even') formula = '2n+0';
@@ -3818,6 +3336,7 @@ Object.extend(Selector, {
3818
3336
 
3819
3337
  'empty': function(nodes, value, root) {
3820
3338
  for (var i = 0, results = [], node; node = nodes[i]; i++) {
3339
+ // IE treats comments as element nodes
3821
3340
  if (node.tagName == '!' || node.firstChild) continue;
3822
3341
  results.push(node);
3823
3342
  }
@@ -3860,6 +3379,8 @@ Object.extend(Selector, {
3860
3379
  '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
3861
3380
  '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
3862
3381
  '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
3382
+ '$=': function(nv, v) { return nv.endsWith(v); },
3383
+ '*=': function(nv, v) { return nv.include(v); },
3863
3384
  '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
3864
3385
  '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
3865
3386
  '-').include('-' + (v || "").toUpperCase() + '-'); }
@@ -3902,10 +3423,19 @@ Object.extend(Selector, {
3902
3423
 
3903
3424
  if (Prototype.Browser.IE) {
3904
3425
  Object.extend(Selector.handlers, {
3426
+ // IE returns comment nodes on getElementsByTagName("*").
3427
+ // Filter them out.
3905
3428
  concat: function(a, b) {
3906
3429
  for (var i = 0, node; node = b[i]; i++)
3907
3430
  if (node.tagName !== "!") a.push(node);
3908
3431
  return a;
3432
+ },
3433
+
3434
+ // IE improperly serializes _countedByPrototype in (inner|outer)HTML.
3435
+ unmark: function(nodes) {
3436
+ for (var i = 0, node; node = nodes[i]; i++)
3437
+ node.removeAttribute('_countedByPrototype');
3438
+ return nodes;
3909
3439
  }
3910
3440
  });
3911
3441
  }
@@ -3913,11 +3443,9 @@ if (Prototype.Browser.IE) {
3913
3443
  function $$() {
3914
3444
  return Selector.findChildElements(document, $A(arguments));
3915
3445
  }
3916
-
3917
3446
  var Form = {
3918
3447
  reset: function(form) {
3919
- form = $(form);
3920
- form.reset();
3448
+ $(form).reset();
3921
3449
  return form;
3922
3450
  },
3923
3451
 
@@ -3932,6 +3460,7 @@ var Form = {
3932
3460
  if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
3933
3461
  submit !== false && (!submit || key == submit) && (submitted = true)))) {
3934
3462
  if (key in result) {
3463
+ // a key is already present; construct an array of values
3935
3464
  if (!Object.isArray(result[key])) result[key] = [result[key]];
3936
3465
  result[key].push(value);
3937
3466
  }
@@ -3951,18 +3480,13 @@ Form.Methods = {
3951
3480
  },
3952
3481
 
3953
3482
  getElements: function(form) {
3954
- var elements = $(form).getElementsByTagName('*'),
3955
- element,
3956
- arr = [ ],
3957
- serializers = Form.Element.Serializers;
3958
- for (var i = 0; element = elements[i]; i++) {
3959
- arr.push(element);
3960
- }
3961
- return arr.inject([], function(elements, child) {
3962
- if (serializers[child.tagName.toLowerCase()])
3963
- elements.push(Element.extend(child));
3964
- return elements;
3965
- })
3483
+ return $A($(form).getElementsByTagName('*')).inject([],
3484
+ function(elements, child) {
3485
+ if (Form.Element.Serializers[child.tagName.toLowerCase()])
3486
+ elements.push(Element.extend(child));
3487
+ return elements;
3488
+ }
3489
+ );
3966
3490
  },
3967
3491
 
3968
3492
  getInputs: function(form, typeName, name) {
@@ -4002,7 +3526,7 @@ Form.Methods = {
4002
3526
  }).sortBy(function(element) { return element.tabIndex }).first();
4003
3527
 
4004
3528
  return firstByIndex ? firstByIndex : elements.find(function(element) {
4005
- return /^(?:input|select|textarea)$/i.test(element.tagName);
3529
+ return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
4006
3530
  });
4007
3531
  },
4008
3532
 
@@ -4033,7 +3557,6 @@ Form.Methods = {
4033
3557
 
4034
3558
  /*--------------------------------------------------------------------------*/
4035
3559
 
4036
-
4037
3560
  Form.Element = {
4038
3561
  focus: function(element) {
4039
3562
  $(element).focus();
@@ -4047,7 +3570,6 @@ Form.Element = {
4047
3570
  };
4048
3571
 
4049
3572
  Form.Element.Methods = {
4050
-
4051
3573
  serialize: function(element) {
4052
3574
  element = $(element);
4053
3575
  if (!element.disabled && element.name) {
@@ -4088,7 +3610,7 @@ Form.Element.Methods = {
4088
3610
  try {
4089
3611
  element.focus();
4090
3612
  if (element.select && (element.tagName.toLowerCase() != 'input' ||
4091
- !(/^(?:button|reset|submit)$/i.test(element.type))))
3613
+ !['button', 'reset', 'submit'].include(element.type)))
4092
3614
  element.select();
4093
3615
  } catch (e) { }
4094
3616
  return element;
@@ -4110,7 +3632,6 @@ Form.Element.Methods = {
4110
3632
  /*--------------------------------------------------------------------------*/
4111
3633
 
4112
3634
  var Field = Form.Element;
4113
-
4114
3635
  var $F = Form.Element.Methods.getValue;
4115
3636
 
4116
3637
  /*--------------------------------------------------------------------------*/
@@ -4173,13 +3694,13 @@ Form.Element.Serializers = {
4173
3694
  },
4174
3695
 
4175
3696
  optionValue: function(opt) {
3697
+ // extend element because hasAttribute may not be native
4176
3698
  return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
4177
3699
  }
4178
3700
  };
4179
3701
 
4180
3702
  /*--------------------------------------------------------------------------*/
4181
3703
 
4182
-
4183
3704
  Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
4184
3705
  initialize: function($super, element, frequency, callback) {
4185
3706
  $super(callback, frequency);
@@ -4261,441 +3782,354 @@ Form.EventObserver = Class.create(Abstract.EventObserver, {
4261
3782
  return Form.serialize(this.element);
4262
3783
  }
4263
3784
  });
4264
- (function() {
4265
-
4266
- var Event = {
4267
- KEY_BACKSPACE: 8,
4268
- KEY_TAB: 9,
4269
- KEY_RETURN: 13,
4270
- KEY_ESC: 27,
4271
- KEY_LEFT: 37,
4272
- KEY_UP: 38,
4273
- KEY_RIGHT: 39,
4274
- KEY_DOWN: 40,
4275
- KEY_DELETE: 46,
4276
- KEY_HOME: 36,
4277
- KEY_END: 35,
4278
- KEY_PAGEUP: 33,
4279
- KEY_PAGEDOWN: 34,
4280
- KEY_INSERT: 45,
4281
-
4282
- cache: {}
4283
- };
3785
+ if (!window.Event) var Event = { };
3786
+
3787
+ Object.extend(Event, {
3788
+ KEY_BACKSPACE: 8,
3789
+ KEY_TAB: 9,
3790
+ KEY_RETURN: 13,
3791
+ KEY_ESC: 27,
3792
+ KEY_LEFT: 37,
3793
+ KEY_UP: 38,
3794
+ KEY_RIGHT: 39,
3795
+ KEY_DOWN: 40,
3796
+ KEY_DELETE: 46,
3797
+ KEY_HOME: 36,
3798
+ KEY_END: 35,
3799
+ KEY_PAGEUP: 33,
3800
+ KEY_PAGEDOWN: 34,
3801
+ KEY_INSERT: 45,
3802
+
3803
+ cache: { },
3804
+
3805
+ relatedTarget: function(event) {
3806
+ var element;
3807
+ switch(event.type) {
3808
+ case 'mouseover': element = event.fromElement; break;
3809
+ case 'mouseout': element = event.toElement; break;
3810
+ default: return null;
3811
+ }
3812
+ return Element.extend(element);
3813
+ }
3814
+ });
4284
3815
 
4285
- var docEl = document.documentElement;
4286
- var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl
4287
- && 'onmouseleave' in docEl;
3816
+ Event.Methods = (function() {
3817
+ var isButton;
4288
3818
 
4289
- var _isButton;
4290
3819
  if (Prototype.Browser.IE) {
4291
3820
  var buttonMap = { 0: 1, 1: 4, 2: 2 };
4292
- _isButton = function(event, code) {
4293
- return event.button === buttonMap[code];
3821
+ isButton = function(event, code) {
3822
+ return event.button == buttonMap[code];
4294
3823
  };
3824
+
4295
3825
  } else if (Prototype.Browser.WebKit) {
4296
- _isButton = function(event, code) {
3826
+ isButton = function(event, code) {
4297
3827
  switch (code) {
4298
3828
  case 0: return event.which == 1 && !event.metaKey;
4299
3829
  case 1: return event.which == 1 && event.metaKey;
4300
3830
  default: return false;
4301
3831
  }
4302
3832
  };
3833
+
4303
3834
  } else {
4304
- _isButton = function(event, code) {
3835
+ isButton = function(event, code) {
4305
3836
  return event.which ? (event.which === code + 1) : (event.button === code);
4306
3837
  };
4307
3838
  }
4308
3839
 
4309
- function isLeftClick(event) { return _isButton(event, 0) }
4310
-
4311
- function isMiddleClick(event) { return _isButton(event, 1) }
3840
+ return {
3841
+ isLeftClick: function(event) { return isButton(event, 0) },
3842
+ isMiddleClick: function(event) { return isButton(event, 1) },
3843
+ isRightClick: function(event) { return isButton(event, 2) },
3844
+
3845
+ element: function(event) {
3846
+ event = Event.extend(event);
3847
+
3848
+ var node = event.target,
3849
+ type = event.type,
3850
+ currentTarget = event.currentTarget;
3851
+
3852
+ if (currentTarget && currentTarget.tagName) {
3853
+ // Firefox screws up the "click" event when moving between radio buttons
3854
+ // via arrow keys. It also screws up the "load" and "error" events on images,
3855
+ // reporting the document as the target instead of the original image.
3856
+ if (type === 'load' || type === 'error' ||
3857
+ (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
3858
+ && currentTarget.type === 'radio'))
3859
+ node = currentTarget;
3860
+ }
3861
+ if (node.nodeType == Node.TEXT_NODE) node = node.parentNode;
3862
+ return Element.extend(node);
3863
+ },
4312
3864
 
4313
- function isRightClick(event) { return _isButton(event, 2) }
3865
+ findElement: function(event, expression) {
3866
+ var element = Event.element(event);
3867
+ if (!expression) return element;
3868
+ var elements = [element].concat(element.ancestors());
3869
+ return Selector.findElement(elements, expression, 0);
3870
+ },
4314
3871
 
4315
- function element(event) {
4316
- event = Event.extend(event);
3872
+ pointer: function(event) {
3873
+ var docElement = document.documentElement,
3874
+ body = document.body || { scrollLeft: 0, scrollTop: 0 };
3875
+ return {
3876
+ x: event.pageX || (event.clientX +
3877
+ (docElement.scrollLeft || body.scrollLeft) -
3878
+ (docElement.clientLeft || 0)),
3879
+ y: event.pageY || (event.clientY +
3880
+ (docElement.scrollTop || body.scrollTop) -
3881
+ (docElement.clientTop || 0))
3882
+ };
3883
+ },
4317
3884
 
4318
- var node = event.target, type = event.type,
4319
- currentTarget = event.currentTarget;
3885
+ pointerX: function(event) { return Event.pointer(event).x },
3886
+ pointerY: function(event) { return Event.pointer(event).y },
4320
3887
 
4321
- if (currentTarget && currentTarget.tagName) {
4322
- if (type === 'load' || type === 'error' ||
4323
- (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
4324
- && currentTarget.type === 'radio'))
4325
- node = currentTarget;
3888
+ stop: function(event) {
3889
+ Event.extend(event);
3890
+ event.preventDefault();
3891
+ event.stopPropagation();
3892
+ event.stopped = true;
4326
3893
  }
4327
-
4328
- if (node.nodeType == Node.TEXT_NODE)
4329
- node = node.parentNode;
4330
-
4331
- return Element.extend(node);
4332
- }
4333
-
4334
- function findElement(event, expression) {
4335
- var element = Event.element(event);
4336
- if (!expression) return element;
4337
- var elements = [element].concat(element.ancestors());
4338
- return Selector.findElement(elements, expression, 0);
4339
- }
4340
-
4341
- function pointer(event) {
4342
- return { x: pointerX(event), y: pointerY(event) };
4343
- }
4344
-
4345
- function pointerX(event) {
4346
- var docElement = document.documentElement,
4347
- body = document.body || { scrollLeft: 0 };
4348
-
4349
- return event.pageX || (event.clientX +
4350
- (docElement.scrollLeft || body.scrollLeft) -
4351
- (docElement.clientLeft || 0));
4352
- }
4353
-
4354
- function pointerY(event) {
4355
- var docElement = document.documentElement,
4356
- body = document.body || { scrollTop: 0 };
4357
-
4358
- return event.pageY || (event.clientY +
4359
- (docElement.scrollTop || body.scrollTop) -
4360
- (docElement.clientTop || 0));
4361
- }
4362
-
4363
-
4364
- function stop(event) {
4365
- Event.extend(event);
4366
- event.preventDefault();
4367
- event.stopPropagation();
4368
-
4369
- event.stopped = true;
4370
- }
4371
-
4372
- Event.Methods = {
4373
- isLeftClick: isLeftClick,
4374
- isMiddleClick: isMiddleClick,
4375
- isRightClick: isRightClick,
4376
-
4377
- element: element,
4378
- findElement: findElement,
4379
-
4380
- pointer: pointer,
4381
- pointerX: pointerX,
4382
- pointerY: pointerY,
4383
-
4384
- stop: stop
4385
3894
  };
3895
+ })();
4386
3896
 
4387
-
3897
+ Event.extend = (function() {
4388
3898
  var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
4389
3899
  m[name] = Event.Methods[name].methodize();
4390
3900
  return m;
4391
3901
  });
4392
3902
 
4393
3903
  if (Prototype.Browser.IE) {
4394
- function _relatedTarget(event) {
4395
- var element;
4396
- switch (event.type) {
4397
- case 'mouseover': element = event.fromElement; break;
4398
- case 'mouseout': element = event.toElement; break;
4399
- default: return null;
4400
- }
4401
- return Element.extend(element);
4402
- }
4403
-
4404
3904
  Object.extend(methods, {
4405
3905
  stopPropagation: function() { this.cancelBubble = true },
4406
3906
  preventDefault: function() { this.returnValue = false },
4407
- inspect: function() { return '[object Event]' }
3907
+ inspect: function() { return "[object Event]" }
4408
3908
  });
4409
3909
 
4410
- Event.extend = function(event, element) {
3910
+ return function(event) {
4411
3911
  if (!event) return false;
4412
3912
  if (event._extendedByPrototype) return event;
4413
3913
 
4414
3914
  event._extendedByPrototype = Prototype.emptyFunction;
4415
3915
  var pointer = Event.pointer(event);
4416
-
4417
3916
  Object.extend(event, {
4418
- target: event.srcElement || element,
4419
- relatedTarget: _relatedTarget(event),
3917
+ target: event.srcElement,
3918
+ relatedTarget: Event.relatedTarget(event),
4420
3919
  pageX: pointer.x,
4421
3920
  pageY: pointer.y
4422
3921
  });
4423
-
4424
3922
  return Object.extend(event, methods);
4425
3923
  };
3924
+
4426
3925
  } else {
4427
- Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__;
3926
+ Event.prototype = Event.prototype || document.createEvent("HTMLEvents")['__proto__'];
4428
3927
  Object.extend(Event.prototype, methods);
4429
- Event.extend = Prototype.K;
3928
+ return Prototype.K;
4430
3929
  }
3930
+ })();
4431
3931
 
4432
- function _createResponder(element, eventName, handler) {
4433
- var registry = Element.retrieve(element, 'prototype_event_registry');
3932
+ Object.extend(Event, (function() {
3933
+ var cache = Event.cache;
4434
3934
 
4435
- if (Object.isUndefined(registry)) {
4436
- CACHE.push(element);
4437
- registry = Element.retrieve(element, 'prototype_event_registry', $H());
4438
- }
3935
+ function getEventID(element) {
3936
+ if (element._prototypeEventID) return element._prototypeEventID[0];
3937
+ arguments.callee.id = arguments.callee.id || 1;
3938
+ return element._prototypeEventID = [++arguments.callee.id];
3939
+ }
4439
3940
 
4440
- var respondersForEvent = registry.get(eventName);
4441
- if (Object.isUndefined(respondersForEvent)) {
4442
- respondersForEvent = [];
4443
- registry.set(eventName, respondersForEvent);
4444
- }
3941
+ function getDOMEventName(eventName) {
3942
+ if (eventName && eventName.include(':')) return "dataavailable";
3943
+ return eventName;
3944
+ }
4445
3945
 
4446
- if (respondersForEvent.pluck('handler').include(handler)) return false;
3946
+ function getCacheForID(id) {
3947
+ return cache[id] = cache[id] || { };
3948
+ }
4447
3949
 
4448
- var responder;
4449
- if (eventName.include(":")) {
4450
- responder = function(event) {
4451
- if (Object.isUndefined(event.eventName))
4452
- return false;
3950
+ function getWrappersForEventName(id, eventName) {
3951
+ var c = getCacheForID(id);
3952
+ return c[eventName] = c[eventName] || [];
3953
+ }
4453
3954
 
4454
- if (event.eventName !== eventName)
3955
+ function createWrapper(element, eventName, handler) {
3956
+ var id = getEventID(element);
3957
+ var c = getWrappersForEventName(id, eventName);
3958
+ if (c.pluck("handler").include(handler)) return false;
3959
+
3960
+ var wrapper = function(event) {
3961
+ if (!Event || !Event.extend ||
3962
+ (event.eventName && event.eventName != eventName))
4455
3963
  return false;
4456
3964
 
4457
- Event.extend(event, element);
4458
- handler.call(element, event);
4459
- };
4460
- } else {
4461
- if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED &&
4462
- (eventName === "mouseenter" || eventName === "mouseleave")) {
4463
- if (eventName === "mouseenter" || eventName === "mouseleave") {
4464
- responder = function(event) {
4465
- Event.extend(event, element);
4466
-
4467
- var parent = event.relatedTarget;
4468
- while (parent && parent !== element) {
4469
- try { parent = parent.parentNode; }
4470
- catch(e) { parent = element; }
4471
- }
3965
+ Event.extend(event);
3966
+ handler.call(element, event);
3967
+ };
4472
3968
 
4473
- if (parent === element) return;
3969
+ wrapper.handler = handler;
3970
+ c.push(wrapper);
3971
+ return wrapper;
3972
+ }
4474
3973
 
4475
- handler.call(element, event);
4476
- };
4477
- }
4478
- } else {
4479
- responder = function(event) {
4480
- Event.extend(event, element);
4481
- handler.call(element, event);
4482
- };
4483
- }
4484
- }
3974
+ function findWrapper(id, eventName, handler) {
3975
+ var c = getWrappersForEventName(id, eventName);
3976
+ return c.find(function(wrapper) { return wrapper.handler == handler });
3977
+ }
4485
3978
 
4486
- responder.handler = handler;
4487
- respondersForEvent.push(responder);
4488
- return responder;
3979
+ function destroyWrapper(id, eventName, handler) {
3980
+ var c = getCacheForID(id);
3981
+ if (!c[eventName]) return false;
3982
+ c[eventName] = c[eventName].without(findWrapper(id, eventName, handler));
4489
3983
  }
4490
3984
 
4491
- function _destroyCache() {
4492
- for (var i = 0, length = CACHE.length; i < length; i++) {
4493
- Event.stopObserving(CACHE[i]);
4494
- CACHE[i] = null;
4495
- }
3985
+ function destroyCache() {
3986
+ for (var id in cache)
3987
+ for (var eventName in cache[id])
3988
+ cache[id][eventName] = null;
4496
3989
  }
4497
3990
 
4498
- var CACHE = [];
4499
3991
 
4500
- if (Prototype.Browser.IE)
4501
- window.attachEvent('onunload', _destroyCache);
3992
+ // Internet Explorer needs to remove event handlers on page unload
3993
+ // in order to avoid memory leaks.
3994
+ if (window.attachEvent) {
3995
+ window.attachEvent("onunload", destroyCache);
3996
+ }
4502
3997
 
4503
- if (Prototype.Browser.WebKit)
3998
+ // Safari has a dummy event handler on page unload so that it won't
3999
+ // use its bfcache. Safari <= 3.1 has an issue with restoring the "document"
4000
+ // object when page is returned to via the back button using its bfcache.
4001
+ if (Prototype.Browser.WebKit) {
4504
4002
  window.addEventListener('unload', Prototype.emptyFunction, false);
4505
-
4506
-
4507
- var _getDOMEventName = Prototype.K;
4508
-
4509
- if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) {
4510
- _getDOMEventName = function(eventName) {
4511
- var translations = { mouseenter: "mouseover", mouseleave: "mouseout" };
4512
- return eventName in translations ? translations[eventName] : eventName;
4513
- };
4514
4003
  }
4515
4004
 
4516
- function observe(element, eventName, handler) {
4517
- element = $(element);
4518
-
4519
- var responder = _createResponder(element, eventName, handler);
4005
+ return {
4006
+ observe: function(element, eventName, handler) {
4007
+ element = $(element);
4008
+ var name = getDOMEventName(eventName);
4520
4009
 
4521
- if (!responder) return element;
4010
+ var wrapper = createWrapper(element, eventName, handler);
4011
+ if (!wrapper) return element;
4522
4012
 
4523
- if (eventName.include(':')) {
4524
- if (element.addEventListener)
4525
- element.addEventListener("dataavailable", responder, false);
4526
- else {
4527
- element.attachEvent("ondataavailable", responder);
4528
- element.attachEvent("onfilterchange", responder);
4013
+ if (element.addEventListener) {
4014
+ element.addEventListener(name, wrapper, false);
4015
+ } else {
4016
+ element.attachEvent("on" + name, wrapper);
4529
4017
  }
4530
- } else {
4531
- var actualEventName = _getDOMEventName(eventName);
4532
4018
 
4533
- if (element.addEventListener)
4534
- element.addEventListener(actualEventName, responder, false);
4535
- else
4536
- element.attachEvent("on" + actualEventName, responder);
4537
- }
4538
-
4539
- return element;
4540
- }
4019
+ return element;
4020
+ },
4541
4021
 
4542
- function stopObserving(element, eventName, handler) {
4543
- element = $(element);
4022
+ stopObserving: function(element, eventName, handler) {
4023
+ element = $(element);
4024
+ var id = getEventID(element), name = getDOMEventName(eventName);
4544
4025
 
4545
- var registry = Element.retrieve(element, 'prototype_event_registry');
4026
+ if (!handler && eventName) {
4027
+ getWrappersForEventName(id, eventName).each(function(wrapper) {
4028
+ element.stopObserving(eventName, wrapper.handler);
4029
+ });
4030
+ return element;
4546
4031
 
4547
- if (Object.isUndefined(registry)) return element;
4032
+ } else if (!eventName) {
4033
+ Object.keys(getCacheForID(id)).each(function(eventName) {
4034
+ element.stopObserving(eventName);
4035
+ });
4036
+ return element;
4037
+ }
4548
4038
 
4549
- if (eventName && !handler) {
4550
- var responders = registry.get(eventName);
4039
+ var wrapper = findWrapper(id, eventName, handler);
4040
+ if (!wrapper) return element;
4551
4041
 
4552
- if (Object.isUndefined(responders)) return element;
4042
+ if (element.removeEventListener) {
4043
+ element.removeEventListener(name, wrapper, false);
4044
+ } else {
4045
+ element.detachEvent("on" + name, wrapper);
4046
+ }
4553
4047
 
4554
- responders.each( function(r) {
4555
- Element.stopObserving(element, eventName, r.handler);
4556
- });
4557
- return element;
4558
- } else if (!eventName) {
4559
- registry.each( function(pair) {
4560
- var eventName = pair.key, responders = pair.value;
4048
+ destroyWrapper(id, eventName, handler);
4561
4049
 
4562
- responders.each( function(r) {
4563
- Element.stopObserving(element, eventName, r.handler);
4564
- });
4565
- });
4566
4050
  return element;
4567
- }
4568
-
4569
- var responders = registry.get(eventName);
4570
-
4571
- if (!responders) return;
4572
-
4573
- var responder = responders.find( function(r) { return r.handler === handler; });
4574
- if (!responder) return element;
4051
+ },
4575
4052
 
4576
- var actualEventName = _getDOMEventName(eventName);
4053
+ fire: function(element, eventName, memo) {
4054
+ element = $(element);
4055
+ if (element == document && document.createEvent && !element.dispatchEvent)
4056
+ element = document.documentElement;
4577
4057
 
4578
- if (eventName.include(':')) {
4579
- if (element.removeEventListener)
4580
- element.removeEventListener("dataavailable", responder, false);
4581
- else {
4582
- element.detachEvent("ondataavailable", responder);
4583
- element.detachEvent("onfilterchange", responder);
4058
+ var event;
4059
+ if (document.createEvent) {
4060
+ event = document.createEvent("HTMLEvents");
4061
+ event.initEvent("dataavailable", true, true);
4062
+ } else {
4063
+ event = document.createEventObject();
4064
+ event.eventType = "ondataavailable";
4584
4065
  }
4585
- } else {
4586
- if (element.removeEventListener)
4587
- element.removeEventListener(actualEventName, responder, false);
4588
- else
4589
- element.detachEvent('on' + actualEventName, responder);
4590
- }
4591
-
4592
- registry.set(eventName, responders.without(responder));
4593
-
4594
- return element;
4595
- }
4596
-
4597
- function fire(element, eventName, memo, bubble) {
4598
- element = $(element);
4599
4066
 
4600
- if (Object.isUndefined(bubble))
4601
- bubble = true;
4067
+ event.eventName = eventName;
4068
+ event.memo = memo || { };
4602
4069
 
4603
- if (element == document && document.createEvent && !element.dispatchEvent)
4604
- element = document.documentElement;
4070
+ if (document.createEvent) {
4071
+ element.dispatchEvent(event);
4072
+ } else {
4073
+ element.fireEvent(event.eventType, event);
4074
+ }
4605
4075
 
4606
- var event;
4607
- if (document.createEvent) {
4608
- event = document.createEvent('HTMLEvents');
4609
- event.initEvent('dataavailable', true, true);
4610
- } else {
4611
- event = document.createEventObject();
4612
- event.eventType = bubble ? 'ondataavailable' : 'onfilterchange';
4076
+ return Event.extend(event);
4613
4077
  }
4078
+ };
4079
+ })());
4614
4080
 
4615
- event.eventName = eventName;
4616
- event.memo = memo || { };
4617
-
4618
- if (document.createEvent)
4619
- element.dispatchEvent(event);
4620
- else
4621
- element.fireEvent(event.eventType, event);
4622
-
4623
- return Event.extend(event);
4624
- }
4625
-
4626
-
4627
- Object.extend(Event, Event.Methods);
4628
-
4629
- Object.extend(Event, {
4630
- fire: fire,
4631
- observe: observe,
4632
- stopObserving: stopObserving
4633
- });
4634
-
4635
- Element.addMethods({
4636
- fire: fire,
4637
-
4638
- observe: observe,
4639
-
4640
- stopObserving: stopObserving
4641
- });
4642
-
4643
- Object.extend(document, {
4644
- fire: fire.methodize(),
4645
-
4646
- observe: observe.methodize(),
4647
-
4648
- stopObserving: stopObserving.methodize(),
4081
+ Object.extend(Event, Event.Methods);
4649
4082
 
4650
- loaded: false
4651
- });
4083
+ Element.addMethods({
4084
+ fire: Event.fire,
4085
+ observe: Event.observe,
4086
+ stopObserving: Event.stopObserving
4087
+ });
4652
4088
 
4653
- if (window.Event) Object.extend(window.Event, Event);
4654
- else window.Event = Event;
4655
- })();
4089
+ Object.extend(document, {
4090
+ fire: Element.Methods.fire.methodize(),
4091
+ observe: Element.Methods.observe.methodize(),
4092
+ stopObserving: Element.Methods.stopObserving.methodize(),
4093
+ loaded: false
4094
+ });
4656
4095
 
4657
4096
  (function() {
4658
4097
  /* Support for the DOMContentLoaded event is based on work by Dan Webb,
4659
- Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */
4098
+ Matthias Miller, Dean Edwards and John Resig. */
4660
4099
 
4661
4100
  var timer;
4662
4101
 
4663
4102
  function fireContentLoadedEvent() {
4664
4103
  if (document.loaded) return;
4665
- if (timer) window.clearTimeout(timer);
4104
+ if (timer) window.clearInterval(timer);
4105
+ document.fire("dom:loaded");
4666
4106
  document.loaded = true;
4667
- document.fire('dom:loaded');
4668
4107
  }
4669
4108
 
4670
- function checkReadyState() {
4671
- if (document.readyState === 'complete') {
4672
- document.stopObserving('readystatechange', checkReadyState);
4673
- fireContentLoadedEvent();
4674
- }
4675
- }
4109
+ if (document.addEventListener) {
4110
+ if (Prototype.Browser.WebKit) {
4111
+ timer = window.setInterval(function() {
4112
+ if (/loaded|complete/.test(document.readyState))
4113
+ fireContentLoadedEvent();
4114
+ }, 0);
4676
4115
 
4677
- function pollDoScroll() {
4678
- try { document.documentElement.doScroll('left'); }
4679
- catch(e) {
4680
- timer = pollDoScroll.defer();
4681
- return;
4116
+ Event.observe(window, "load", fireContentLoadedEvent);
4117
+
4118
+ } else {
4119
+ document.addEventListener("DOMContentLoaded",
4120
+ fireContentLoadedEvent, false);
4682
4121
  }
4683
- fireContentLoadedEvent();
4684
- }
4685
4122
 
4686
- if (document.addEventListener) {
4687
- document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
4688
4123
  } else {
4689
- document.observe('readystatechange', checkReadyState);
4690
- if (window == top)
4691
- timer = pollDoScroll.defer();
4124
+ document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");
4125
+ $("__onDOMContentLoaded").onreadystatechange = function() {
4126
+ if (this.readyState == "complete") {
4127
+ this.onreadystatechange = null;
4128
+ fireContentLoadedEvent();
4129
+ }
4130
+ };
4692
4131
  }
4693
-
4694
- Event.observe(window, 'load', fireContentLoadedEvent);
4695
4132
  })();
4696
-
4697
- Element.addMethods();
4698
-
4699
4133
  /*------------------------------- DEPRECATED -------------------------------*/
4700
4134
 
4701
4135
  Hash.toQueryString = Object.toQueryString;
@@ -4724,9 +4158,16 @@ var Insertion = {
4724
4158
 
4725
4159
  var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
4726
4160
 
4161
+ // This should be moved to script.aculo.us; notice the deprecated methods
4162
+ // further below, that map to the newer Element methods.
4727
4163
  var Position = {
4164
+ // set to true if needed, warning: firefox performance problems
4165
+ // NOT neeeded for page scrolling, only if draggable contained in
4166
+ // scrollable elements
4728
4167
  includeScrollOffsets: false,
4729
4168
 
4169
+ // must be called before calling withinIncludingScrolloffset, every time the
4170
+ // page is scrolled
4730
4171
  prepare: function() {
4731
4172
  this.deltaX = window.pageXOffset
4732
4173
  || document.documentElement.scrollLeft
@@ -4738,6 +4179,7 @@ var Position = {
4738
4179
  || 0;
4739
4180
  },
4740
4181
 
4182
+ // caches x/y coordinate pair to use with overlap
4741
4183
  within: function(element, x, y) {
4742
4184
  if (this.includeScrollOffsets)
4743
4185
  return this.withinIncludingScrolloffsets(element, x, y);
@@ -4764,6 +4206,7 @@ var Position = {
4764
4206
  this.xcomp < this.offset[0] + element.offsetWidth);
4765
4207
  },
4766
4208
 
4209
+ // within must be called directly before
4767
4210
  overlap: function(mode, element) {
4768
4211
  if (!mode) return 0;
4769
4212
  if (mode == 'vertical')
@@ -4774,6 +4217,7 @@ var Position = {
4774
4217
  element.offsetWidth;
4775
4218
  },
4776
4219
 
4220
+ // Deprecation layer -- use newer Element methods now (1.5.2).
4777
4221
 
4778
4222
  cumulativeOffset: Element.Methods.cumulativeOffset,
4779
4223
 
@@ -4871,4 +4315,6 @@ Element.ClassNames.prototype = {
4871
4315
 
4872
4316
  Object.extend(Element.ClassNames.prototype, Enumerable);
4873
4317
 
4874
- /*--------------------------------------------------------------------------*/
4318
+ /*--------------------------------------------------------------------------*/
4319
+
4320
+ Element.addMethods();