zen 0.2.8 → 0.3b

Sign up to get free protection for your applications and to get access to all the features.
Files changed (422) hide show
  1. data/.gems +20 -0
  2. data/.mailmap +3 -2
  3. data/.rvmrc +1 -1
  4. data/.travis.yml +13 -2
  5. data/.yardopts +13 -0
  6. data/AUTHORS +1 -1
  7. data/README.md +115 -77
  8. data/Rakefile +6 -7
  9. data/bin/zen +12 -5
  10. data/guide/_static/categories/categories.png +0 -0
  11. data/guide/_static/categories/category_groups.png +0 -0
  12. data/guide/_static/categories/new_category.png +0 -0
  13. data/guide/_static/categories/new_category_group.png +0 -0
  14. data/guide/_static/comments/comments.png +0 -0
  15. data/guide/_static/comments/edit_comment.png +0 -0
  16. data/guide/_static/custom_fields/custom_field_groups.png +0 -0
  17. data/guide/_static/custom_fields/custom_field_types.png +0 -0
  18. data/guide/_static/custom_fields/custom_fields.png +0 -0
  19. data/guide/_static/custom_fields/edit_custom_field_general.png +0 -0
  20. data/guide/_static/custom_fields/edit_custom_field_group.png +0 -0
  21. data/guide/_static/custom_fields/edit_custom_field_settings.png +0 -0
  22. data/guide/_static/custom_fields/edit_custom_field_type.png +0 -0
  23. data/guide/_static/menus/edit_menu.png +0 -0
  24. data/guide/_static/menus/edit_menu_item.png +0 -0
  25. data/guide/_static/menus/menu_items.png +0 -0
  26. data/guide/_static/menus/menus.png +0 -0
  27. data/guide/_static/sections/edit_entry.png +0 -0
  28. data/guide/_static/sections/edit_entry_categories.png +0 -0
  29. data/guide/_static/sections/edit_entry_general.png +0 -0
  30. data/guide/_static/sections/edit_entry_meta.png +0 -0
  31. data/guide/_static/sections/edit_section_comments.png +0 -0
  32. data/guide/_static/sections/edit_section_general.png +0 -0
  33. data/guide/_static/sections/edit_section_groups.png +0 -0
  34. data/guide/_static/sections/entries.png +0 -0
  35. data/guide/_static/sections/sections.png +0 -0
  36. data/guide/_static/settings/overview_general.png +0 -0
  37. data/guide/_static/settings/overview_security.png +0 -0
  38. data/guide/_static/settings/overview_user.png +0 -0
  39. data/guide/_static/users/edit_user.png +0 -0
  40. data/guide/_static/users/edit_user_group.png +0 -0
  41. data/guide/_static/users/edit_user_group_permissions.png +0 -0
  42. data/guide/_static/users/edit_user_permissions.png +0 -0
  43. data/guide/_static/users/overview.png +0 -0
  44. data/guide/_static/users/user_groups_overview.png +0 -0
  45. data/guide/asset_management.md +117 -0
  46. data/{CHANGELOG.md → guide/changelog.md} +42 -0
  47. data/guide/css/common.css +20 -0
  48. data/guide/getting_started.md +61 -0
  49. data/guide/hacking.md +52 -0
  50. data/guide/installation.md +44 -0
  51. data/guide/javascript.md +352 -0
  52. data/lib/vendor/sequel_sluggable.rb +137 -0
  53. data/lib/yard/tags.rb +13 -0
  54. data/lib/zen.rb +148 -78
  55. data/lib/zen/asset_groups.rb +85 -0
  56. data/lib/zen/bin/create.rb +267 -56
  57. data/lib/zen/bin/default.rb +84 -0
  58. data/lib/zen/controller/admin_controller.rb +1 -82
  59. data/lib/zen/controller/base_controller.rb +9 -5
  60. data/lib/zen/controller/frontend_controller.rb +0 -1
  61. data/lib/zen/controller/main_controller.rb +30 -42
  62. data/lib/zen/controller/preview.rb +9 -8
  63. data/lib/zen/controller/translations.rb +49 -0
  64. data/lib/zen/error.rb +17 -0
  65. data/lib/zen/event.rb +118 -0
  66. data/lib/zen/helper/asset.rb +63 -0
  67. data/lib/zen/helper/breadcrumb.rb +1 -4
  68. data/lib/zen/helper/controller.rb +73 -0
  69. data/lib/zen/helper/locale.rb +42 -0
  70. data/lib/zen/helper/message.rb +0 -3
  71. data/lib/zen/helper/search.rb +54 -0
  72. data/lib/zen/helper/stacked_aspect.rb +249 -0
  73. data/lib/zen/helper/theme.rb +3 -10
  74. data/lib/zen/language.rb +356 -181
  75. data/lib/zen/language/en/zen_general.rb +52 -0
  76. data/lib/zen/language/en/zen_models.rb +19 -0
  77. data/lib/zen/language/nl/zen_general.rb +57 -0
  78. data/lib/zen/language/nl/zen_models.rb +22 -0
  79. data/lib/zen/language/translation.rb +132 -0
  80. data/lib/zen/languages.rb +9 -0
  81. data/lib/zen/layout/admin.xhtml +3 -3
  82. data/lib/zen/layout/login.xhtml +1 -1
  83. data/lib/zen/markup.rb +189 -0
  84. data/lib/zen/model/helper.rb +65 -0
  85. data/lib/zen/model/init.rb +62 -0
  86. data/lib/zen/model/methods.rb +6 -7
  87. data/lib/zen/package.rb +312 -201
  88. data/lib/zen/package/all.rb +4 -3
  89. data/lib/zen/package/categories/lib/categories.rb +29 -41
  90. data/lib/zen/package/categories/lib/categories/controller/categories.rb +185 -130
  91. data/lib/zen/package/categories/lib/categories/controller/category_groups.rb +172 -102
  92. data/lib/zen/package/categories/lib/categories/helper/category.rb +4 -9
  93. data/lib/zen/package/categories/lib/categories/helper/category_frontend.rb +86 -0
  94. data/lib/zen/package/categories/lib/categories/language/en/categories.rb +40 -0
  95. data/lib/zen/package/categories/lib/categories/language/en/category_groups.rb +39 -0
  96. data/lib/zen/package/categories/lib/categories/language/nl/categories.rb +42 -0
  97. data/lib/zen/package/categories/lib/categories/language/nl/category_groups.rb +42 -0
  98. data/lib/zen/package/categories/lib/categories/model/category.rb +21 -25
  99. data/lib/zen/package/categories/lib/categories/model/category_group.rb +21 -15
  100. data/lib/zen/package/categories/lib/categories/view/admin/categories/form.xhtml +25 -26
  101. data/lib/zen/package/categories/lib/categories/view/admin/categories/index.xhtml +24 -24
  102. data/lib/zen/package/categories/lib/categories/view/admin/category-groups/form.xhtml +18 -20
  103. data/lib/zen/package/categories/lib/categories/view/admin/category-groups/index.xhtml +21 -18
  104. data/lib/zen/package/comments/lib/comments.rb +30 -50
  105. data/lib/zen/package/comments/lib/comments/anti_spam.rb +138 -0
  106. data/lib/zen/package/comments/lib/comments/controller/comments.rb +159 -92
  107. data/lib/zen/package/comments/lib/comments/controller/comments_form.rb +122 -34
  108. data/lib/zen/package/comments/lib/comments/helper/comment.rb +0 -3
  109. data/lib/zen/package/comments/lib/comments/helper/comment_frontend.rb +90 -0
  110. data/lib/zen/package/comments/lib/comments/language/en/comments.rb +57 -0
  111. data/lib/zen/package/comments/lib/comments/language/nl/comments.rb +61 -0
  112. data/lib/zen/package/comments/lib/comments/model/comment.rb +147 -49
  113. data/lib/zen/package/comments/lib/comments/model/comment_status.rb +0 -2
  114. data/lib/zen/package/comments/lib/comments/view/admin/comments/form.xhtml +37 -40
  115. data/lib/zen/package/comments/lib/comments/view/admin/comments/index.xhtml +23 -42
  116. data/lib/zen/package/comments/migrations/1308774099_comment_status.rb +12 -4
  117. data/lib/zen/package/comments/migrations/1313851786_remove_defensio_signature.rb +11 -0
  118. data/lib/zen/package/custom_fields/lib/custom_fields.rb +40 -43
  119. data/lib/zen/package/custom_fields/lib/custom_fields/blue_form_parameters.rb +72 -17
  120. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_groups.rb +154 -118
  121. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_types.rb +147 -90
  122. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_fields.rb +161 -131
  123. data/lib/zen/package/custom_fields/lib/custom_fields/helper/custom_field.rb +4 -9
  124. data/lib/zen/package/custom_fields/lib/custom_fields/language/en/custom_field_groups.rb +42 -0
  125. data/lib/zen/package/custom_fields/lib/custom_fields/language/en/custom_field_types.rb +51 -0
  126. data/lib/zen/package/custom_fields/lib/custom_fields/language/en/custom_fields.rb +60 -0
  127. data/lib/zen/package/custom_fields/lib/custom_fields/language/nl/custom_field_groups.rb +41 -0
  128. data/lib/zen/package/custom_fields/lib/custom_fields/language/nl/custom_field_types.rb +49 -0
  129. data/lib/zen/package/custom_fields/lib/custom_fields/language/nl/custom_fields.rb +61 -0
  130. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field.rb +18 -23
  131. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_group.rb +20 -19
  132. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_method.rb +1 -3
  133. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_type.rb +19 -9
  134. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_value.rb +18 -15
  135. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-groups/form.xhtml +18 -18
  136. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-groups/index.xhtml +30 -24
  137. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-types/form.xhtml +15 -10
  138. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-types/index.xhtml +24 -19
  139. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-fields/form.xhtml +18 -13
  140. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-fields/index.xhtml +30 -20
  141. data/lib/zen/package/extensions/lib/extensions.rb +20 -0
  142. data/lib/zen/package/extensions/lib/extensions/controller/extensions.rb +41 -0
  143. data/lib/zen/package/extensions/lib/extensions/language/en/extensions.rb +23 -0
  144. data/lib/zen/package/extensions/lib/extensions/language/nl/extensions.rb +25 -0
  145. data/lib/zen/package/extensions/lib/extensions/view/admin/extensions/index.xhtml +86 -0
  146. data/lib/zen/package/menu.rb +109 -0
  147. data/lib/zen/package/menus/lib/menus.rb +25 -34
  148. data/lib/zen/package/menus/lib/menus/controller/menu_items.rb +143 -107
  149. data/lib/zen/package/menus/lib/menus/controller/menus.rb +166 -115
  150. data/lib/zen/package/menus/lib/menus/helper/menu.rb +2 -8
  151. data/lib/zen/package/menus/lib/menus/helper/menu_frontend.rb +114 -0
  152. data/lib/zen/package/menus/lib/menus/language/en/menu_items.rb +48 -0
  153. data/lib/zen/package/menus/lib/menus/language/en/menus.rb +48 -0
  154. data/lib/zen/package/menus/lib/menus/language/nl/menu_items.rb +48 -0
  155. data/lib/zen/package/menus/lib/menus/language/nl/menus.rb +50 -0
  156. data/lib/zen/package/menus/lib/menus/model/menu.rb +24 -17
  157. data/lib/zen/package/menus/lib/menus/model/menu_item.rb +37 -13
  158. data/lib/zen/package/menus/lib/menus/view/admin/menu-items/form.xhtml +32 -25
  159. data/lib/zen/package/menus/lib/menus/view/admin/menu-items/index.xhtml +23 -17
  160. data/lib/zen/package/menus/lib/menus/view/admin/menus/form.xhtml +31 -26
  161. data/lib/zen/package/menus/lib/menus/view/admin/menus/index.xhtml +20 -22
  162. data/lib/zen/package/sections/lib/sections.rb +25 -68
  163. data/lib/zen/package/sections/lib/sections/controller/section_entries.rb +178 -138
  164. data/lib/zen/package/sections/lib/sections/controller/sections.rb +173 -140
  165. data/lib/zen/package/sections/lib/sections/helper/section.rb +3 -6
  166. data/lib/zen/package/sections/lib/sections/helper/section_frontend.rb +146 -0
  167. data/lib/zen/package/sections/lib/sections/language/en/section_entries.rb +50 -0
  168. data/lib/zen/package/sections/lib/sections/language/en/sections.rb +55 -0
  169. data/lib/zen/package/sections/lib/sections/language/nl/section_entries.rb +50 -0
  170. data/lib/zen/package/sections/lib/sections/language/nl/sections.rb +55 -0
  171. data/lib/zen/package/sections/lib/sections/model/section.rb +36 -36
  172. data/lib/zen/package/sections/lib/sections/model/section_entry.rb +52 -59
  173. data/lib/zen/package/sections/lib/sections/model/section_entry_status.rb +2 -2
  174. data/lib/zen/package/sections/lib/sections/view/admin/form.xhtml +24 -21
  175. data/lib/zen/package/sections/lib/sections/view/admin/index.xhtml +24 -26
  176. data/lib/zen/package/sections/lib/sections/view/admin/section-entries/form.xhtml +33 -31
  177. data/lib/zen/package/sections/lib/sections/view/admin/section-entries/index.xhtml +24 -25
  178. data/lib/zen/package/sections/migrations/1308672298_use_id_for_default_section.rb +14 -10
  179. data/lib/zen/package/sections/migrations/1308813320_section_entry_statuses.rb +12 -6
  180. data/lib/zen/package/settings/lib/settings.rb +25 -120
  181. data/lib/zen/package/settings/lib/settings/blue_form_parameters.rb +157 -0
  182. data/lib/zen/package/settings/lib/settings/controller/settings.rb +94 -69
  183. data/lib/zen/package/settings/lib/settings/language/en/settings.rb +41 -0
  184. data/lib/zen/package/settings/lib/settings/language/nl/settings.rb +41 -0
  185. data/lib/zen/package/settings/lib/settings/model/setting.rb +0 -2
  186. data/lib/zen/package/settings/lib/settings/setting.rb +379 -0
  187. data/lib/zen/package/settings/lib/settings/setting_groups.rb +11 -0
  188. data/lib/zen/package/settings/lib/settings/settings.rb +83 -0
  189. data/lib/zen/package/settings/lib/settings/settings_group.rb +84 -0
  190. data/lib/zen/package/settings/lib/settings/singleton_methods.rb +35 -0
  191. data/lib/zen/package/settings/lib/settings/view/admin/settings/index.xhtml +15 -57
  192. data/lib/zen/package/settings/migrations/1321197919_remove_unused_columns.rb +17 -0
  193. data/lib/zen/package/users/lib/users.rb +51 -36
  194. data/lib/zen/package/users/lib/users/controller/user_groups.rb +133 -98
  195. data/lib/zen/package/users/lib/users/controller/users.rb +253 -136
  196. data/lib/zen/package/users/lib/users/helper/access.rb +102 -0
  197. data/lib/zen/package/users/lib/users/helper/acl.rb +113 -0
  198. data/lib/zen/package/users/lib/users/helper/users.rb +41 -24
  199. data/lib/zen/package/users/lib/users/language/en/permissions.rb +16 -0
  200. data/lib/zen/package/users/lib/users/language/en/user_groups.rb +39 -0
  201. data/lib/zen/package/users/lib/users/language/en/users.rb +73 -0
  202. data/lib/zen/package/users/lib/users/language/nl/permissions.rb +16 -0
  203. data/lib/zen/package/users/lib/users/language/nl/user_groups.rb +41 -0
  204. data/lib/zen/package/users/lib/users/language/nl/users.rb +74 -0
  205. data/lib/zen/package/users/lib/users/model/permission.rb +28 -0
  206. data/lib/zen/package/users/lib/users/model/user.rb +104 -65
  207. data/lib/zen/package/users/lib/users/model/user_group.rb +28 -24
  208. data/lib/zen/package/users/lib/users/model/user_status.rb +27 -0
  209. data/lib/zen/package/users/lib/users/public/admin/css/users/permissions.css +22 -0
  210. data/lib/zen/package/users/lib/users/public/admin/js/users/permissions.js +33 -0
  211. data/lib/zen/package/users/lib/users/settings.rb +19 -0
  212. data/lib/zen/package/users/lib/users/view/admin/user-groups/form.xhtml +58 -28
  213. data/lib/zen/package/users/lib/users/view/admin/user-groups/index.xhtml +19 -15
  214. data/lib/zen/package/users/lib/users/view/admin/users/form.xhtml +93 -62
  215. data/lib/zen/package/users/lib/users/view/admin/users/index.xhtml +23 -36
  216. data/lib/zen/package/users/lib/users/view/admin/users/login.xhtml +13 -6
  217. data/lib/zen/package/users/lib/users/view/admin/users/permissions.xhtml +33 -0
  218. data/lib/zen/package/users/lib/users/view/admin/users/register.xhtml +52 -0
  219. data/lib/zen/package/users/migrations/1313786058_update_default_date.rb +41 -0
  220. data/lib/zen/package/users/migrations/1316432327_permissions.rb +36 -0
  221. data/lib/zen/package/users/migrations/1320272365_status_ids.rb +67 -0
  222. data/lib/zen/public/admin/css/zen/buttons.css +3 -11
  223. data/lib/zen/public/admin/css/zen/datepicker.css +23 -13
  224. data/lib/zen/public/admin/css/zen/editor.css +6 -14
  225. data/lib/zen/public/admin/css/zen/forms.css +19 -12
  226. data/lib/zen/public/admin/css/zen/general.css +22 -18
  227. data/lib/zen/public/admin/css/zen/grid.css +1 -20
  228. data/lib/zen/public/admin/css/zen/layout.css +26 -11
  229. data/lib/zen/public/admin/css/zen/messages.css +3 -10
  230. data/lib/zen/public/admin/css/zen/reset.css +13 -15
  231. data/lib/zen/public/admin/css/zen/tables.css +8 -10
  232. data/lib/zen/public/admin/css/zen/tabs.css +2 -10
  233. data/lib/zen/public/admin/css/zen/window.css +2 -8
  234. data/lib/zen/public/admin/js/vendor/datepicker.js +540 -240
  235. data/lib/zen/public/admin/js/vendor/mootools/core.js +273 -283
  236. data/lib/zen/public/admin/js/vendor/mootools/more.js +131 -136
  237. data/lib/zen/public/admin/js/zen/index.js +8 -14
  238. data/lib/zen/public/admin/js/zen/lib/editor.js +36 -33
  239. data/lib/zen/public/admin/js/zen/lib/editor/markdown.js +0 -6
  240. data/lib/zen/public/admin/js/zen/lib/editor/textile.js +0 -6
  241. data/lib/zen/public/admin/js/zen/lib/html_table.js +0 -5
  242. data/lib/zen/public/admin/js/zen/lib/tabs.js +22 -79
  243. data/lib/zen/public/admin/js/zen/lib/window.js +12 -22
  244. data/lib/zen/spec/bacon/color_output.rb +1 -1
  245. data/lib/zen/spec/helper.rb +6 -11
  246. data/lib/zen/spec/simplecov.rb +3 -3
  247. data/lib/zen/task.rb +0 -1
  248. data/lib/zen/task/build.rake +46 -26
  249. data/lib/zen/task/clean.rake +14 -7
  250. data/lib/zen/task/db.rake +31 -29
  251. data/lib/zen/task/package.rake +19 -23
  252. data/lib/zen/task/proto.rake +3 -5
  253. data/lib/zen/task/setup.rake +4 -0
  254. data/lib/zen/task/test.rake +31 -6
  255. data/lib/zen/task/theme.rake +13 -19
  256. data/lib/zen/theme.rb +377 -52
  257. data/lib/zen/validation.rb +22 -30
  258. data/lib/zen/version.rb +1 -2
  259. data/lib/zen/view/bottom.xhtml +9 -1
  260. data/lib/zen/view/head.xhtml +1 -1
  261. data/lib/zen/view/main.xhtml +1 -1
  262. data/lib/zen/view/search.xhtml +9 -0
  263. data/proto/app/Rakefile +0 -1
  264. data/proto/app/app.rb +21 -16
  265. data/proto/app/config/config.rb.erb +41 -0
  266. data/proto/app/config/{database.rb → database.rb.erb} +17 -14
  267. data/proto/app/config/middlewares.rb +1 -1
  268. data/proto/app/theme/default/index.xhtml +25 -0
  269. data/proto/app/theme/theme.rb +19 -0
  270. data/proto/app/{log/database/dev → tmp}/.gitkeep +0 -0
  271. data/proto/migration.rb +3 -5
  272. data/proto/rack/thin.yml +41 -0
  273. data/proto/rack/unicorn.rb +38 -0
  274. data/spec/Rakefile +15 -11
  275. data/spec/fixtures/zen/helper/controller.rb +13 -0
  276. data/spec/fixtures/zen/helper/locale.rb +7 -0
  277. data/spec/fixtures/zen/helper/message.rb +0 -4
  278. data/spec/fixtures/zen/language.rb +31 -0
  279. data/spec/fixtures/zen/language/en/spec.rb +11 -0
  280. data/spec/fixtures/zen/language/nl/spec.rb +11 -0
  281. data/spec/fixtures/zen/package.rb +0 -10
  282. data/spec/fixtures/zen/package/categories/helper/category_frontend.rb +16 -0
  283. data/spec/fixtures/zen/package/comments/helper/comment_frontend.rb +16 -0
  284. data/spec/fixtures/zen/package/sections/helper/section_frontend.rb +16 -0
  285. data/spec/fixtures/zen/package/settings/controller/settings.rb +17 -0
  286. data/spec/fixtures/zen/package/users/helper/access.rb +18 -0
  287. data/spec/fixtures/zen/package/users/helper/acl.rb +23 -0
  288. data/spec/fixtures/zen/theme/{default-section → default}/index.xhtml +0 -0
  289. data/spec/helper.rb +12 -27
  290. data/{proto/app/log/database/live → spec/public}/.gitkeep +0 -0
  291. data/spec/zen/controller/admin_controller.rb +5 -6
  292. data/spec/zen/controller/main_controller.rb +29 -35
  293. data/spec/zen/controller/preview.rb +9 -10
  294. data/spec/zen/event.rb +44 -0
  295. data/spec/zen/helper/breadcrumb.rb +4 -5
  296. data/spec/zen/helper/controller.rb +21 -0
  297. data/spec/zen/helper/locale.rb +25 -0
  298. data/spec/zen/helper/message.rb +4 -11
  299. data/spec/zen/helper/theme.rb +11 -14
  300. data/spec/zen/language.rb +48 -22
  301. data/spec/zen/markup.rb +39 -0
  302. data/spec/zen/package.rb +48 -11
  303. data/spec/zen/package/categories/controller/categories.rb +99 -45
  304. data/spec/zen/package/categories/controller/category_groups.rb +109 -33
  305. data/spec/zen/package/categories/helper/category.rb +19 -32
  306. data/spec/zen/package/categories/helper/category_frontend.rb +61 -0
  307. data/spec/zen/package/comments/anti_spam.rb +50 -0
  308. data/spec/zen/package/comments/controller/comments.rb +121 -61
  309. data/spec/zen/package/comments/controller/comments_form.rb +120 -94
  310. data/spec/zen/package/comments/helper/comment.rb +13 -13
  311. data/spec/zen/package/comments/helper/comment_frontend.rb +92 -0
  312. data/spec/zen/package/custom_fields/blue_form_parameters.rb +50 -50
  313. data/spec/zen/package/custom_fields/controller/custom_field_groups.rb +135 -43
  314. data/spec/zen/package/custom_fields/controller/custom_field_types.rb +153 -48
  315. data/spec/zen/package/custom_fields/controller/custom_fields.rb +130 -51
  316. data/spec/zen/package/custom_fields/helper/custom_field.rb +8 -8
  317. data/spec/zen/package/extensions/controller/extensions.rb +38 -0
  318. data/spec/zen/package/menus/controller/menu_items.rb +121 -42
  319. data/spec/zen/package/menus/controller/menus.rb +125 -38
  320. data/spec/zen/package/menus/helper/menu.rb +26 -26
  321. data/spec/zen/package/menus/helper/menu_frontend.rb +104 -0
  322. data/spec/zen/package/sections/controller/section_entries.rb +145 -89
  323. data/spec/zen/package/sections/controller/sections.rb +130 -35
  324. data/spec/zen/package/sections/helper/section.rb +27 -38
  325. data/spec/zen/package/sections/helper/section_frontend.rb +160 -0
  326. data/spec/zen/package/settings/controller/settings.rb +73 -8
  327. data/spec/zen/package/settings/settings.rb +119 -0
  328. data/spec/zen/package/users/controller/user_groups.rb +134 -34
  329. data/spec/zen/package/users/controller/users.rb +189 -44
  330. data/spec/zen/package/users/helper/access.rb +29 -0
  331. data/spec/zen/package/users/helper/acl.rb +46 -0
  332. data/spec/zen/package/users/helper/users.rb +20 -64
  333. data/spec/zen/theme.rb +7 -9
  334. data/spec/zen/validation.rb +1 -2
  335. data/zen.gemspec +25 -22
  336. metadata +303 -222
  337. data/lib/zen/asset.rb +0 -292
  338. data/lib/zen/bin/runner.rb +0 -118
  339. data/lib/zen/error/language_error.rb +0 -10
  340. data/lib/zen/error/package_error.rb +0 -10
  341. data/lib/zen/error/plugin_error.rb +0 -10
  342. data/lib/zen/error/theme_error.rb +0 -10
  343. data/lib/zen/error/validation_error.rb +0 -10
  344. data/lib/zen/helper/acl.rb +0 -182
  345. data/lib/zen/helper/blue_form_vendor.rb +0 -689
  346. data/lib/zen/language/en/zen_general.yml +0 -25
  347. data/lib/zen/language/en/zen_models.yml +0 -13
  348. data/lib/zen/language/nl/zen_general.yml +0 -25
  349. data/lib/zen/language/nl/zen_models.yml +0 -13
  350. data/lib/zen/model/settings.rb +0 -78
  351. data/lib/zen/package/base.rb +0 -62
  352. data/lib/zen/package/categories/lib/categories/language/en/categories.yml +0 -36
  353. data/lib/zen/package/categories/lib/categories/language/en/category_groups.yml +0 -34
  354. data/lib/zen/package/categories/lib/categories/language/nl/categories.yml +0 -40
  355. data/lib/zen/package/categories/lib/categories/language/nl/category_groups.yml +0 -34
  356. data/lib/zen/package/categories/lib/categories/plugin/categories.rb +0 -141
  357. data/lib/zen/package/comments/lib/comments/language/en/comments.yml +0 -48
  358. data/lib/zen/package/comments/lib/comments/language/nl/comments.yml +0 -50
  359. data/lib/zen/package/comments/lib/comments/plugin/anti_spam.rb +0 -156
  360. data/lib/zen/package/comments/lib/comments/plugin/comments.rb +0 -115
  361. data/lib/zen/package/custom_fields/lib/custom_fields/language/en/custom_field_groups.yml +0 -33
  362. data/lib/zen/package/custom_fields/lib/custom_fields/language/en/custom_field_types.yml +0 -40
  363. data/lib/zen/package/custom_fields/lib/custom_fields/language/en/custom_fields.yml +0 -54
  364. data/lib/zen/package/custom_fields/lib/custom_fields/language/nl/custom_field_groups.yml +0 -33
  365. data/lib/zen/package/custom_fields/lib/custom_fields/language/nl/custom_field_types.yml +0 -40
  366. data/lib/zen/package/custom_fields/lib/custom_fields/language/nl/custom_fields.yml +0 -54
  367. data/lib/zen/package/menus/lib/menus/language/en/menu_items.yml +0 -41
  368. data/lib/zen/package/menus/lib/menus/language/en/menus.yml +0 -40
  369. data/lib/zen/package/menus/lib/menus/language/nl/menu_items.yml +0 -41
  370. data/lib/zen/package/menus/lib/menus/language/nl/menus.yml +0 -40
  371. data/lib/zen/package/menus/lib/menus/plugin/menus.rb +0 -152
  372. data/lib/zen/package/sections/lib/sections/language/en/section_entries.yml +0 -44
  373. data/lib/zen/package/sections/lib/sections/language/en/sections.yml +0 -48
  374. data/lib/zen/package/sections/lib/sections/language/nl/section_entries.yml +0 -44
  375. data/lib/zen/package/sections/lib/sections/language/nl/sections.yml +0 -48
  376. data/lib/zen/package/sections/lib/sections/plugin/section_entries.rb +0 -244
  377. data/lib/zen/package/sections/lib/sections/plugin/sections.rb +0 -87
  378. data/lib/zen/package/settings/lib/settings/language/en/settings.yml +0 -36
  379. data/lib/zen/package/settings/lib/settings/language/nl/settings.yml +0 -37
  380. data/lib/zen/package/settings/lib/settings/plugin/group_base.rb +0 -39
  381. data/lib/zen/package/settings/lib/settings/plugin/setting_base.rb +0 -133
  382. data/lib/zen/package/settings/lib/settings/plugin/settings.rb +0 -251
  383. data/lib/zen/package/users/lib/users/controller/access_rules.rb +0 -284
  384. data/lib/zen/package/users/lib/users/language/en/access_rules.yml +0 -38
  385. data/lib/zen/package/users/lib/users/language/en/user_groups.yml +0 -32
  386. data/lib/zen/package/users/lib/users/language/en/users.yml +0 -57
  387. data/lib/zen/package/users/lib/users/language/nl/access_rules.yml +0 -38
  388. data/lib/zen/package/users/lib/users/language/nl/user_groups.yml +0 -32
  389. data/lib/zen/package/users/lib/users/language/nl/users.yml +0 -57
  390. data/lib/zen/package/users/lib/users/model/access_rule.rb +0 -42
  391. data/lib/zen/package/users/lib/users/public/admin/js/users/access_rules.js +0 -65
  392. data/lib/zen/package/users/lib/users/public/admin/js/users/lib/access_rules.js +0 -49
  393. data/lib/zen/package/users/lib/users/view/admin/access-rules/form.xhtml +0 -120
  394. data/lib/zen/package/users/lib/users/view/admin/access-rules/index.xhtml +0 -102
  395. data/lib/zen/plugin.rb +0 -182
  396. data/lib/zen/plugin/base.rb +0 -46
  397. data/lib/zen/plugin/helper.rb +0 -47
  398. data/lib/zen/plugin/markup/lib/markup.rb +0 -14
  399. data/lib/zen/plugin/markup/lib/markup/language/en/markup.yml +0 -6
  400. data/lib/zen/plugin/markup/lib/markup/markup.rb +0 -165
  401. data/lib/zen/public/admin/js/zen/lib/asset.js +0 -111
  402. data/lib/zen/task/plugin.rake +0 -18
  403. data/lib/zen/theme/base.rb +0 -65
  404. data/proto/app/config/config.rb +0 -18
  405. data/spec/fixtures/zen/language/en/spec.yml +0 -10
  406. data/spec/fixtures/zen/language/nl/spec.yml +0 -7
  407. data/spec/fixtures/zen/package/settings/plugin/settings.rb +0 -20
  408. data/spec/zen/asset.rb +0 -97
  409. data/spec/zen/bin/create.rb +0 -89
  410. data/spec/zen/bin/runner.rb +0 -47
  411. data/spec/zen/helper/acl.rb +0 -149
  412. data/spec/zen/package/categories/plugin/categories.rb +0 -92
  413. data/spec/zen/package/comments/plugin/anti_spam.rb +0 -59
  414. data/spec/zen/package/comments/plugin/comments.rb +0 -107
  415. data/spec/zen/package/menus/plugin/menus.rb +0 -120
  416. data/spec/zen/package/sections/plugin/section_entries.rb +0 -161
  417. data/spec/zen/package/sections/plugin/sections.rb +0 -75
  418. data/spec/zen/package/settings/plugin/settings.rb +0 -33
  419. data/spec/zen/package/users/controller/access_rules.rb +0 -90
  420. data/spec/zen/plugin.rb +0 -64
  421. data/spec/zen/plugin/helper.rb +0 -11
  422. data/spec/zen/plugin/markup.rb +0 -44
@@ -1,6 +1,6 @@
1
1
  // MooTools: the javascript framework.
2
- // Load this file's selection again by visiting: http://mootools.net/more/649f3f210baf7341e0918184d8cb99a0
3
- // Or build this file again with packager using: packager build More/More More/Events.Pseudos More/Class.Refactor More/Class.Binds More/Class.Occlude More/Chain.Wait More/Array.Extras More/Date More/Date.Extras More/Number.Format More/Object.Extras More/String.Extras More/String.QueryString More/URI More/URI.Relative More/Hash More/Hash.Extras More/Element.Forms More/Elements.From More/Element.Event.Pseudos More/Element.Event.Pseudos.Keys More/Element.Delegation More/Element.Measure More/Element.Pin More/Element.Position More/Element.Shortcuts More/Form.Request More/Drag More/Drag.Move More/Sortables More/Request.Periodical More/Assets More/Color More/IframeShim More/HtmlTable More/HtmlTable.Zebra More/HtmlTable.Sort More/HtmlTable.Select More/Keyboard More/Keyboard.Extras More/Tips
2
+ // Load this file's selection again by visiting: http://mootools.net/more/4f1d45e6fea68c1c704ed51c26e63f50
3
+ // Or build this file again with packager using: packager build More/More More/Events.Pseudos More/Class.Refactor More/Class.Binds More/Class.Occlude More/Chain.Wait More/Array.Extras More/Date More/Date.Extras More/Number.Format More/Object.Extras More/String.Extras More/String.QueryString More/URI More/URI.Relative More/Hash More/Hash.Extras More/Element.Forms More/Elements.From More/Element.Event.Pseudos More/Element.Event.Pseudos.Keys More/Element.Measure More/Element.Pin More/Element.Position More/Element.Shortcuts More/Form.Request More/Drag More/Drag.Move More/Sortables More/Request.Periodical More/Assets More/Color More/IframeShim More/HtmlTable More/HtmlTable.Sort More/HtmlTable.Select More/Keyboard More/Keyboard.Extras More/Tips
4
4
  /*
5
5
  ---
6
6
  copyrights:
@@ -10,24 +10,23 @@ licenses:
10
10
  - [MIT License](http://mootools.net/license.txt)
11
11
  ...
12
12
  */
13
- MooTools.More={version:"1.3.2.1",build:"e586bcd2496e9b22acfde32e12f84d49ce09e59d"};Events.Pseudos=function(g,c,e){var b="monitorEvents:";var a=function(h){return{store:h.store?function(i,j){h.store(b+i,j);
14
- }:function(i,j){(h.$monitorEvents||(h.$monitorEvents={}))[i]=j;},retrieve:h.retrieve?function(i,j){return h.retrieve(b+i,j);}:function(i,j){if(!h.$monitorEvents){return j;
15
- }return h.$monitorEvents[i]||j;}};};var f=function(j){if(j.indexOf(":")==-1||!g){return null;}var i=Slick.parse(j).expressions[0][0],m=i.pseudos,h=m.length,k=[];
16
- while(h--){if(g[m[h].key]){k.push({event:i.tag,value:m[h].value,pseudo:m[h].key,original:j});}}return k.length?k:null;};var d=function(h){return Object.merge.apply(this,h.map(function(i){return g[i.pseudo].options||{};
17
- }));};return{addEvent:function(m,p,j){var n=f(m);if(!n){return c.call(this,m,p,j);}var k=a(this),s=k.retrieve(m,[]),h=n[0].event,t=d(n),o=p,i=t[h]||{},l=Array.slice(arguments,2),r=this,q;
18
- if(i.args){l.append(Array.from(i.args));}if(i.base){h=i.base;}if(i.onAdd){i.onAdd(this);}n.each(function(u){var v=o;o=function(){(i.listener||g[u.pseudo].listener).call(r,u,v,arguments,q,t);
19
- };});q=o.bind(this);s.include({event:p,monitor:q});k.store(m,s);c.apply(this,[m,p].concat(l));return c.apply(this,[h,q].concat(l));},removeEvent:function(l,n){var m=f(l);
20
- if(!m){return e.call(this,l,n);}var j=a(this),o=j.retrieve(l);if(!o){return this;}var h=m[0].event,p=d(m),i=p[h]||{},k=Array.slice(arguments,2);if(i.args){k.append(Array.from(i.args));
21
- }if(i.base){h=i.base;}if(i.onRemove){i.onRemove(this);}e.apply(this,[l,n].concat(k));o.each(function(q,r){if(!n||q.event==n){e.apply(this,[h,q.monitor].concat(k));
22
- }delete o[r];},this);j.store(l,o);return this;}};};(function(){var b={once:{listener:function(e,f,d,c){f.apply(this,d);this.removeEvent(e.event,c).removeEvent(e.original,f);
23
- }},throttle:{listener:function(d,e,c){if(!e._throttled){e.apply(this,c);e._throttled=setTimeout(function(){e._throttled=false;},d.value||250);}}},pause:{listener:function(d,e,c){clearTimeout(e._pause);
24
- e._pause=e.delay(d.value||250,this,c);}}};Events.definePseudo=function(c,d){b[c]=Type.isFunction(d)?{listener:d}:d;return this;};Events.lookupPseudo=function(c){return b[c];
25
- };var a=Events.prototype;Events.implement(Events.Pseudos(b,a.addEvent,a.removeEvent));["Request","Fx"].each(function(c){if(this[c]){this[c].implement(Events.prototype);
26
- }});})();Class.refactor=function(b,a){Object.each(a,function(e,d){var c=b.prototype[d];c=(c&&c.$origin)||c||function(){};b.implement(d,(typeof e=="function")?function(){var f=this.previous;
27
- this.previous=c;var g=e.apply(this,arguments);this.previous=f;return g;}:e);});return b;};Class.Mutators.Binds=function(a){if(!this.prototype.initialize){this.implement("initialize",function(){});
28
- }return Array.from(a).concat(this.prototype.Binds||[]);};Class.Mutators.initialize=function(a){return function(){Array.from(this.Binds).each(function(b){var c=this[b];
29
- if(c){this[b]=c.bind(this);}},this);return a.apply(this,arguments);};};Class.Occlude=new Class({occlude:function(c,b){b=document.id(b||this.element);var a=b.retrieve(c||this.property);
30
- if(a&&!this.occluded){return(this.occluded=a);}this.occluded=false;b.store(c||this.property,this);return this.occluded;}});(function(){var a={wait:function(b){return this.chain(function(){this.callChain.delay(b==null?500:b,this);
13
+ MooTools.More={version:"1.4.0.1",build:"a4244edf2aa97ac8a196fc96082dd35af1abab87"};(function(){Events.Pseudos=function(h,e,f){var d="_monitorEvents:";var c=function(i){return{store:i.store?function(j,k){i.store(d+j,k);
14
+ }:function(j,k){(i._monitorEvents||(i._monitorEvents={}))[j]=k;},retrieve:i.retrieve?function(j,k){return i.retrieve(d+j,k);}:function(j,k){if(!i._monitorEvents){return k;
15
+ }return i._monitorEvents[j]||k;}};};var g=function(k){if(k.indexOf(":")==-1||!h){return null;}var j=Slick.parse(k).expressions[0][0],p=j.pseudos,i=p.length,o=[];
16
+ while(i--){var n=p[i].key,m=h[n];if(m!=null){o.push({event:j.tag,value:p[i].value,pseudo:n,original:k,listener:m});}}return o.length?o:null;};return{addEvent:function(m,p,j){var n=g(m);
17
+ if(!n){return e.call(this,m,p,j);}var k=c(this),r=k.retrieve(m,[]),i=n[0].event,l=Array.slice(arguments,2),o=p,q=this;n.each(function(s){var t=s.listener,u=o;
18
+ if(t==false){i+=":"+s.pseudo+"("+s.value+")";}else{o=function(){t.call(q,s,u,arguments,o);};}});r.include({type:i,event:p,monitor:o});k.store(m,r);if(m!=i){e.apply(this,[m,p].concat(l));
19
+ }return e.apply(this,[i,o].concat(l));},removeEvent:function(m,l){var k=g(m);if(!k){return f.call(this,m,l);}var n=c(this),j=n.retrieve(m);if(!j){return this;
20
+ }var i=Array.slice(arguments,2);f.apply(this,[m,l].concat(i));j.each(function(o,p){if(!l||o.event==l){f.apply(this,[o.type,o.monitor].concat(i));}delete j[p];
21
+ },this);n.store(m,j);return this;}};};var b={once:function(e,f,d,c){f.apply(this,d);this.removeEvent(e.event,c).removeEvent(e.original,f);},throttle:function(d,e,c){if(!e._throttled){e.apply(this,c);
22
+ e._throttled=setTimeout(function(){e._throttled=false;},d.value||250);}},pause:function(d,e,c){clearTimeout(e._pause);e._pause=e.delay(d.value||250,this,c);
23
+ }};Events.definePseudo=function(c,d){b[c]=d;return this;};Events.lookupPseudo=function(c){return b[c];};var a=Events.prototype;Events.implement(Events.Pseudos(b,a.addEvent,a.removeEvent));
24
+ ["Request","Fx"].each(function(c){if(this[c]){this[c].implement(Events.prototype);}});})();Class.refactor=function(b,a){Object.each(a,function(e,d){var c=b.prototype[d];
25
+ c=(c&&c.$origin)||c||function(){};b.implement(d,(typeof e=="function")?function(){var f=this.previous;this.previous=c;var g=e.apply(this,arguments);this.previous=f;
26
+ return g;}:e);});return b;};Class.Mutators.Binds=function(a){if(!this.prototype.initialize){this.implement("initialize",function(){});}return Array.from(a).concat(this.prototype.Binds||[]);
27
+ };Class.Mutators.initialize=function(a){return function(){Array.from(this.Binds).each(function(b){var c=this[b];if(c){this[b]=c.bind(this);}},this);return a.apply(this,arguments);
28
+ };};Class.Occlude=new Class({occlude:function(c,b){b=document.id(b||this.element);var a=b.retrieve(c||this.property);if(a&&!this.occluded){return(this.occluded=a);
29
+ }this.occluded=false;b.store(c||this.property,this);return this.occluded;}});(function(){var a={wait:function(b){return this.chain(function(){this.callChain.delay(b==null?500:b,this);
31
30
  return this;}.bind(this));}};Chain.implement(a);if(this.Fx){Fx.implement(a);}if(this.Element&&Element.implement&&this.Fx){Element.implement({chains:function(b){Array.from(b||["tween","morph","reveal"]).each(function(c){c=this.get(c);
32
31
  if(!c){return;}c.setOptions({link:"chain"});},this);return this;},pauseFx:function(c,b){this.chains(b).get(b||"tween").wait(c);return this;}});}})();(function(a){Array.implement({min:function(){return Math.min.apply(null,this);
33
32
  },max:function(){return Math.max.apply(null,this);},average:function(){return this.length?this.sum()/this.length:0;},sum:function(){var b=0,c=this.length;
@@ -47,56 +46,55 @@ if(!q){q=[];}for(var g=0,f=k.length;g<f;g++){if(q.contains(k[g])){continue;}q.in
47
46
  }}return"";},inherit:function(g,h){g=Array.from(g);if(h&&!this.inherits.sets[h]){this.inherits.sets[h]=[];}var f=g.length;while(f--){(h?this.inherits.sets[h]:this.inherits.locales).unshift(g[f]);
48
47
  }return this;}});})();Locale.define("en-US","Date",{months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_abbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],days_abbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dateOrder:["month","date","year"],shortDate:"%m/%d/%Y",shortTime:"%I:%M%p",AM:"AM",PM:"PM",firstDayOfWeek:0,ordinal:function(a){return(a>3&&a<21)?"th":["th","st","nd","rd","th"][Math.min(a%10,4)];
49
48
  },lessThanMinuteAgo:"less than a minute ago",minuteAgo:"about a minute ago",minutesAgo:"{delta} minutes ago",hourAgo:"about an hour ago",hoursAgo:"about {delta} hours ago",dayAgo:"1 day ago",daysAgo:"{delta} days ago",weekAgo:"1 week ago",weeksAgo:"{delta} weeks ago",monthAgo:"1 month ago",monthsAgo:"{delta} months ago",yearAgo:"1 year ago",yearsAgo:"{delta} years ago",lessThanMinuteUntil:"less than a minute from now",minuteUntil:"about a minute from now",minutesUntil:"{delta} minutes from now",hourUntil:"about an hour from now",hoursUntil:"about {delta} hours from now",dayUntil:"1 day from now",daysUntil:"{delta} days from now",weekUntil:"1 week from now",weeksUntil:"{delta} weeks from now",monthUntil:"1 month from now",monthsUntil:"{delta} months from now",yearUntil:"1 year from now",yearsUntil:"{delta} years from now"});
50
- (function(){var a=this.Date;var f=a.Methods={ms:"Milliseconds",year:"FullYear",min:"Minutes",mo:"Month",sec:"Seconds",hr:"Hours"};["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds","Time","TimezoneOffset","Week","Timezone","GMTOffset","DayOfYear","LastMonth","LastDayOfMonth","UTCDate","UTCDay","UTCFullYear","AMPM","Ordinal","UTCHours","UTCMilliseconds","UTCMinutes","UTCMonth","UTCSeconds","UTCMilliseconds"].each(function(t){a.Methods[t.toLowerCase()]=t;
51
- });var p=function(v,u,t){if(u==1){return v;}return v<Math.pow(10,u-1)?(t||"0")+p(v,u-1,t):v;};a.implement({set:function(v,t){v=v.toLowerCase();var u=f[v]&&"set"+f[v];
52
- if(u&&this[u]){this[u](t);}return this;}.overloadSetter(),get:function(u){u=u.toLowerCase();var t=f[u]&&"get"+f[u];if(t&&this[t]){return this[t]();}return null;
53
- }.overloadGetter(),clone:function(){return new a(this.get("time"));},increment:function(t,v){t=t||"day";v=v!=null?v:1;switch(t){case"year":return this.increment("month",v*12);
54
- case"month":var u=this.get("date");this.set("date",1).set("mo",this.get("mo")+v);return this.set("date",u.min(this.get("lastdayofmonth")));case"week":return this.increment("day",v*7);
55
- case"day":return this.set("date",this.get("date")+v);}if(!a.units[t]){throw new Error(t+" is not a supported interval");}return this.set("time",this.get("time")+v*a.units[t]());
56
- },decrement:function(t,u){return this.increment(t,-1*(u!=null?u:1));},isLeapYear:function(){return a.isLeapYear(this.get("year"));},clearTime:function(){return this.set({hr:0,min:0,sec:0,ms:0});
57
- },diff:function(u,t){if(typeOf(u)=="string"){u=a.parse(u);}return((u-this)/a.units[t||"day"](3,3)).round();},getLastDayOfMonth:function(){return a.daysInMonth(this.get("mo"),this.get("year"));
58
- },getDayOfYear:function(){return(a.UTC(this.get("year"),this.get("mo"),this.get("date")+1)-a.UTC(this.get("year"),0,1))/a.units.day();},setDay:function(u,t){if(t==null){t=a.getMsg("firstDayOfWeek");
59
- if(t===""){t=1;}}u=(7+a.parseDay(u,true)-t)%7;var v=(7+this.get("day")-t)%7;return this.increment("day",u-v);},getWeek:function(w){if(w==null){w=a.getMsg("firstDayOfWeek");
60
- if(w===""){w=1;}}var y=this,v=(7+y.get("day")-w)%7,u=0,x;if(w==1){var z=y.get("month"),t=y.get("date")-v;if(z==11&&t>28){return 1;}if(z==0&&t<-2){y=new a(y).decrement("day",v);
61
- v=0;}x=new a(y.get("year"),0,1).get("day")||7;if(x>4){u=-7;}}else{x=new a(y.get("year"),0,1).get("day");}u+=y.get("dayofyear");u+=6-v;u+=(7+x-w)%7;return(u/7);
62
- },getOrdinal:function(t){return a.getMsg("ordinal",t||this.get("date"));},getTimezone:function(){return this.toString().replace(/^.*? ([A-Z]{3}).[0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");
63
- },getGMTOffset:function(){var t=this.get("timezoneOffset");return((t>0)?"-":"+")+p((t.abs()/60).floor(),2)+p(t%60,2);},setAMPM:function(t){t=t.toUpperCase();
64
- var u=this.get("hr");if(u>11&&t=="AM"){return this.decrement("hour",12);}else{if(u<12&&t=="PM"){return this.increment("hour",12);}}return this;},getAMPM:function(){return(this.get("hr")<12)?"AM":"PM";
65
- },parse:function(t){this.set("time",a.parse(t));return this;},isValid:function(t){return !isNaN((t||this).valueOf());},format:function(u){if(!this.isValid()){return"invalid date";
66
- }if(!u){u="%x %X";}var t=u.toLowerCase();if(s[t]){return s[t](this);}u=g[t]||u;var v=this;return u.replace(/%([a-z%])/gi,function(x,w){switch(w){case"a":return a.getMsg("days_abbr")[v.get("day")];
67
- case"A":return a.getMsg("days")[v.get("day")];case"b":return a.getMsg("months_abbr")[v.get("month")];case"B":return a.getMsg("months")[v.get("month")];
68
- case"c":return v.format("%a %b %d %H:%M:%S %Y");case"d":return p(v.get("date"),2);case"e":return p(v.get("date"),2," ");case"H":return p(v.get("hr"),2);
69
- case"I":return p((v.get("hr")%12)||12,2);case"j":return p(v.get("dayofyear"),3);case"k":return p(v.get("hr"),2," ");case"l":return p((v.get("hr")%12)||12,2," ");
70
- case"L":return p(v.get("ms"),3);case"m":return p((v.get("mo")+1),2);case"M":return p(v.get("min"),2);case"o":return v.get("ordinal");case"p":return a.getMsg(v.get("ampm"));
71
- case"s":return Math.round(v/1000);case"S":return p(v.get("seconds"),2);case"T":return v.format("%H:%M:%S");case"U":return p(v.get("week"),2);case"w":return v.get("day");
72
- case"x":return v.format(a.getMsg("shortDate"));case"X":return v.format(a.getMsg("shortTime"));case"y":return v.get("year").toString().substr(2);case"Y":return v.get("year");
73
- case"z":return v.get("GMTOffset");case"Z":return v.get("Timezone");}return w;});},toISOString:function(){return this.format("iso8601");}}).alias({toJSON:"toISOString",compare:"diff",strftime:"format"});
74
- var g={db:"%Y-%m-%d %H:%M:%S",compact:"%Y%m%dT%H%M%S","short":"%d %b %H:%M","long":"%B %d, %Y %H:%M"};var k=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
75
- var s={rfc822:function(t){return k[t.get("day")]+t.format(", %d ")+h[t.get("month")]+t.format(" %Y %H:%M:%S %Z");},rfc2822:function(t){return k[t.get("day")]+t.format(", %d ")+h[t.get("month")]+t.format(" %Y %H:%M:%S %z");
76
- },iso8601:function(t){return(t.getUTCFullYear()+"-"+p(t.getUTCMonth()+1,2)+"-"+p(t.getUTCDate(),2)+"T"+p(t.getUTCHours(),2)+":"+p(t.getUTCMinutes(),2)+":"+p(t.getUTCSeconds(),2)+"."+p(t.getUTCMilliseconds(),3)+"Z");
77
- }};var c=[],n=a.parse;var r=function(w,y,v){var u=-1,x=a.getMsg(w+"s");switch(typeOf(y)){case"object":u=x[y.get(w)];break;case"number":u=x[y];if(!u){throw new Error("Invalid "+w+" index: "+y);
78
- }break;case"string":var t=x.filter(function(z){return this.test(z);},new RegExp("^"+y,"i"));if(!t.length){throw new Error("Invalid "+w+" string");}if(t.length>1){throw new Error("Ambiguous "+w);
79
- }u=t[0];}return(v)?x.indexOf(u):u;};var i=1900,o=70;a.extend({getMsg:function(u,t){return Locale.get("Date."+u,t);},units:{ms:Function.from(1),second:Function.from(1000),minute:Function.from(60000),hour:Function.from(3600000),day:Function.from(86400000),week:Function.from(608400000),month:function(u,t){var v=new a;
80
- return a.daysInMonth(u!=null?u:v.get("mo"),t!=null?t:v.get("year"))*86400000;},year:function(t){t=t||new a().get("year");return a.isLeapYear(t)?31622400000:31536000000;
81
- }},daysInMonth:function(u,t){return[31,a.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][u];},isLeapYear:function(t){return((t%4===0)&&(t%100!==0))||(t%400===0);
82
- },parse:function(w){var v=typeOf(w);if(v=="number"){return new a(w);}if(v!="string"){return w;}w=w.clean();if(!w.length){return null;}var u;c.some(function(x){var t=x.re.exec(w);
83
- return(t)?(u=x.handler(t)):false;});if(!(u&&u.isValid())){u=new a(n(w));if(!(u&&u.isValid())){u=new a(w.toInt());}}return u;},parseDay:function(t,u){return r("day",t,u);
84
- },parseMonth:function(u,t){return r("month",u,t);},parseUTC:function(u){var t=new a(u);var v=a.UTC(t.get("year"),t.get("mo"),t.get("date"),t.get("hr"),t.get("min"),t.get("sec"),t.get("ms"));
85
- return new a(v);},orderIndex:function(t){return a.getMsg("dateOrder").indexOf(t)+1;},defineFormat:function(t,u){g[t]=u;return this;},defineFormats:function(t){for(var u in t){a.defineFormat(u,t[u]);
86
- }return this;},defineParser:function(t){c.push((t.re&&t.handler)?t:l(t));return this;},defineParsers:function(){Array.flatten(arguments).each(a.defineParser);
87
- return this;},define2DigitYearStart:function(t){o=t%100;i=t-o;return this;}});var d=function(t){return new RegExp("(?:"+a.getMsg(t).map(function(u){return u.substr(0,3);
88
- }).join("|")+")[a-z]*");};var m=function(t){switch(t){case"T":return"%H:%M:%S";case"x":return((a.orderIndex("month")==1)?"%m[-./]%d":"%d[-./]%m")+"([-./]%y)?";
49
+ (function(){var a=this.Date;var f=a.Methods={ms:"Milliseconds",year:"FullYear",min:"Minutes",mo:"Month",sec:"Seconds",hr:"Hours"};["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds","Time","TimezoneOffset","Week","Timezone","GMTOffset","DayOfYear","LastMonth","LastDayOfMonth","UTCDate","UTCDay","UTCFullYear","AMPM","Ordinal","UTCHours","UTCMilliseconds","UTCMinutes","UTCMonth","UTCSeconds","UTCMilliseconds"].each(function(s){a.Methods[s.toLowerCase()]=s;
50
+ });var p=function(u,t,s){if(t==1){return u;}return u<Math.pow(10,t-1)?(s||"0")+p(u,t-1,s):u;};a.implement({set:function(u,s){u=u.toLowerCase();var t=f[u]&&"set"+f[u];
51
+ if(t&&this[t]){this[t](s);}return this;}.overloadSetter(),get:function(t){t=t.toLowerCase();var s=f[t]&&"get"+f[t];if(s&&this[s]){return this[s]();}return null;
52
+ }.overloadGetter(),clone:function(){return new a(this.get("time"));},increment:function(s,u){s=s||"day";u=u!=null?u:1;switch(s){case"year":return this.increment("month",u*12);
53
+ case"month":var t=this.get("date");this.set("date",1).set("mo",this.get("mo")+u);return this.set("date",t.min(this.get("lastdayofmonth")));case"week":return this.increment("day",u*7);
54
+ case"day":return this.set("date",this.get("date")+u);}if(!a.units[s]){throw new Error(s+" is not a supported interval");}return this.set("time",this.get("time")+u*a.units[s]());
55
+ },decrement:function(s,t){return this.increment(s,-1*(t!=null?t:1));},isLeapYear:function(){return a.isLeapYear(this.get("year"));},clearTime:function(){return this.set({hr:0,min:0,sec:0,ms:0});
56
+ },diff:function(t,s){if(typeOf(t)=="string"){t=a.parse(t);}return((t-this)/a.units[s||"day"](3,3)).round();},getLastDayOfMonth:function(){return a.daysInMonth(this.get("mo"),this.get("year"));
57
+ },getDayOfYear:function(){return(a.UTC(this.get("year"),this.get("mo"),this.get("date")+1)-a.UTC(this.get("year"),0,1))/a.units.day();},setDay:function(t,s){if(s==null){s=a.getMsg("firstDayOfWeek");
58
+ if(s===""){s=1;}}t=(7+a.parseDay(t,true)-s)%7;var u=(7+this.get("day")-s)%7;return this.increment("day",t-u);},getWeek:function(v){if(v==null){v=a.getMsg("firstDayOfWeek");
59
+ if(v===""){v=1;}}var x=this,u=(7+x.get("day")-v)%7,t=0,w;if(v==1){var y=x.get("month"),s=x.get("date")-u;if(y==11&&s>28){return 1;}if(y==0&&s<-2){x=new a(x).decrement("day",u);
60
+ u=0;}w=new a(x.get("year"),0,1).get("day")||7;if(w>4){t=-7;}}else{w=new a(x.get("year"),0,1).get("day");}t+=x.get("dayofyear");t+=6-u;t+=(7+w-v)%7;return(t/7);
61
+ },getOrdinal:function(s){return a.getMsg("ordinal",s||this.get("date"));},getTimezone:function(){return this.toString().replace(/^.*? ([A-Z]{3}).[0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");
62
+ },getGMTOffset:function(){var s=this.get("timezoneOffset");return((s>0)?"-":"+")+p((s.abs()/60).floor(),2)+p(s%60,2);},setAMPM:function(s){s=s.toUpperCase();
63
+ var t=this.get("hr");if(t>11&&s=="AM"){return this.decrement("hour",12);}else{if(t<12&&s=="PM"){return this.increment("hour",12);}}return this;},getAMPM:function(){return(this.get("hr")<12)?"AM":"PM";
64
+ },parse:function(s){this.set("time",a.parse(s));return this;},isValid:function(s){if(!s){s=this;}return typeOf(s)=="date"&&!isNaN(s.valueOf());},format:function(s){if(!this.isValid()){return"invalid date";
65
+ }if(!s){s="%x %X";}if(typeof s=="string"){s=g[s.toLowerCase()]||s;}if(typeof s=="function"){return s(this);}var t=this;return s.replace(/%([a-z%])/gi,function(v,u){switch(u){case"a":return a.getMsg("days_abbr")[t.get("day")];
66
+ case"A":return a.getMsg("days")[t.get("day")];case"b":return a.getMsg("months_abbr")[t.get("month")];case"B":return a.getMsg("months")[t.get("month")];
67
+ case"c":return t.format("%a %b %d %H:%M:%S %Y");case"d":return p(t.get("date"),2);case"e":return p(t.get("date"),2," ");case"H":return p(t.get("hr"),2);
68
+ case"I":return p((t.get("hr")%12)||12,2);case"j":return p(t.get("dayofyear"),3);case"k":return p(t.get("hr"),2," ");case"l":return p((t.get("hr")%12)||12,2," ");
69
+ case"L":return p(t.get("ms"),3);case"m":return p((t.get("mo")+1),2);case"M":return p(t.get("min"),2);case"o":return t.get("ordinal");case"p":return a.getMsg(t.get("ampm"));
70
+ case"s":return Math.round(t/1000);case"S":return p(t.get("seconds"),2);case"T":return t.format("%H:%M:%S");case"U":return p(t.get("week"),2);case"w":return t.get("day");
71
+ case"x":return t.format(a.getMsg("shortDate"));case"X":return t.format(a.getMsg("shortTime"));case"y":return t.get("year").toString().substr(2);case"Y":return t.get("year");
72
+ case"z":return t.get("GMTOffset");case"Z":return t.get("Timezone");}return u;});},toISOString:function(){return this.format("iso8601");}}).alias({toJSON:"toISOString",compare:"diff",strftime:"format"});
73
+ var k=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var g={db:"%Y-%m-%d %H:%M:%S",compact:"%Y%m%dT%H%M%S","short":"%d %b %H:%M","long":"%B %d, %Y %H:%M",rfc822:function(s){return k[s.get("day")]+s.format(", %d ")+h[s.get("month")]+s.format(" %Y %H:%M:%S %Z");
74
+ },rfc2822:function(s){return k[s.get("day")]+s.format(", %d ")+h[s.get("month")]+s.format(" %Y %H:%M:%S %z");},iso8601:function(s){return(s.getUTCFullYear()+"-"+p(s.getUTCMonth()+1,2)+"-"+p(s.getUTCDate(),2)+"T"+p(s.getUTCHours(),2)+":"+p(s.getUTCMinutes(),2)+":"+p(s.getUTCSeconds(),2)+"."+p(s.getUTCMilliseconds(),3)+"Z");
75
+ }};var c=[],n=a.parse;var r=function(v,x,u){var t=-1,w=a.getMsg(v+"s");switch(typeOf(x)){case"object":t=w[x.get(v)];break;case"number":t=w[x];if(!t){throw new Error("Invalid "+v+" index: "+x);
76
+ }break;case"string":var s=w.filter(function(y){return this.test(y);},new RegExp("^"+x,"i"));if(!s.length){throw new Error("Invalid "+v+" string");}if(s.length>1){throw new Error("Ambiguous "+v);
77
+ }t=s[0];}return(u)?w.indexOf(t):t;};var i=1900,o=70;a.extend({getMsg:function(t,s){return Locale.get("Date."+t,s);},units:{ms:Function.from(1),second:Function.from(1000),minute:Function.from(60000),hour:Function.from(3600000),day:Function.from(86400000),week:Function.from(608400000),month:function(t,s){var u=new a;
78
+ return a.daysInMonth(t!=null?t:u.get("mo"),s!=null?s:u.get("year"))*86400000;},year:function(s){s=s||new a().get("year");return a.isLeapYear(s)?31622400000:31536000000;
79
+ }},daysInMonth:function(t,s){return[31,a.isLeapYear(s)?29:28,31,30,31,30,31,31,30,31,30,31][t];},isLeapYear:function(s){return((s%4===0)&&(s%100!==0))||(s%400===0);
80
+ },parse:function(v){var u=typeOf(v);if(u=="number"){return new a(v);}if(u!="string"){return v;}v=v.clean();if(!v.length){return null;}var s;c.some(function(w){var t=w.re.exec(v);
81
+ return(t)?(s=w.handler(t)):false;});if(!(s&&s.isValid())){s=new a(n(v));if(!(s&&s.isValid())){s=new a(v.toInt());}}return s;},parseDay:function(s,t){return r("day",s,t);
82
+ },parseMonth:function(t,s){return r("month",t,s);},parseUTC:function(t){var s=new a(t);var u=a.UTC(s.get("year"),s.get("mo"),s.get("date"),s.get("hr"),s.get("min"),s.get("sec"),s.get("ms"));
83
+ return new a(u);},orderIndex:function(s){return a.getMsg("dateOrder").indexOf(s)+1;},defineFormat:function(s,t){g[s]=t;return this;},defineParser:function(s){c.push((s.re&&s.handler)?s:l(s));
84
+ return this;},defineParsers:function(){Array.flatten(arguments).each(a.defineParser);return this;},define2DigitYearStart:function(s){o=s%100;i=s-o;return this;
85
+ }}).extend({defineFormats:a.defineFormat.overloadSetter()});var d=function(s){return new RegExp("(?:"+a.getMsg(s).map(function(t){return t.substr(0,3);
86
+ }).join("|")+")[a-z]*");};var m=function(s){switch(s){case"T":return"%H:%M:%S";case"x":return((a.orderIndex("month")==1)?"%m[-./]%d":"%d[-./]%m")+"([-./]%y)?";
89
87
  case"X":return"%H([.:]%M)?([.:]%S([.:]%s)?)? ?%p? ?%z?";}return null;};var j={d:/[0-2]?[0-9]|3[01]/,H:/[01]?[0-9]|2[0-3]/,I:/0?[1-9]|1[0-2]/,M:/[0-5]?\d/,s:/\d+/,o:/[a-z]*/,p:/[ap]\.?m\.?/,y:/\d{2}|\d{4}/,Y:/\d{4}/,z:/Z|[+-]\d{2}(?::?\d{2})?/};
90
- j.m=j.I;j.S=j.M;var e;var b=function(t){e=t;j.a=j.A=d("days");j.b=j.B=d("months");c.each(function(v,u){if(v.format){c[u]=l(v.format);}});};var l=function(v){if(!e){return{format:v};
91
- }var t=[];var u=(v.source||v).replace(/%([a-z])/gi,function(x,w){return m(w)||x;}).replace(/\((?!\?)/g,"(?:").replace(/ (?!\?|\*)/g,",? ").replace(/%([a-z%])/gi,function(x,w){var y=j[w];
92
- if(!y){return w;}t.push(w);return"("+y.source+")";}).replace(/\[a-z\]/gi,"[a-z\\u00c0-\\uffff;&]");return{format:v,re:new RegExp("^"+u+"$","i"),handler:function(z){z=z.slice(1).associate(t);
93
- var w=new a().clearTime(),y=z.y||z.Y;if(y!=null){q.call(w,"y",y);}if("d" in z){q.call(w,"d",1);}if("m" in z||z.b||z.B){q.call(w,"m",1);}for(var x in z){q.call(w,x,z[x]);
94
- }return w;}};};var q=function(t,u){if(!u){return this;}switch(t){case"a":case"A":return this.set("day",a.parseDay(u,true));case"b":case"B":return this.set("mo",a.parseMonth(u,true));
95
- case"d":return this.set("date",u);case"H":case"I":return this.set("hr",u);case"m":return this.set("mo",u-1);case"M":return this.set("min",u);case"p":return this.set("ampm",u.replace(/\./g,""));
96
- case"S":return this.set("sec",u);case"s":return this.set("ms",("0."+u)*1000);case"w":return this.set("day",u);case"Y":return this.set("year",u);case"y":u=+u;
97
- if(u<100){u+=i+(u<o?100:0);}return this.set("year",u);case"z":if(u=="Z"){u="+00";}var v=u.match(/([+-])(\d{2}):?(\d{2})?/);v=(v[1]+"1")*(v[2]*60+(+v[3]||0))+this.getTimezoneOffset();
98
- return this.set("time",this-v*60000);}return this;};a.defineParsers("%Y([-./]%m([-./]%d((T| )%X)?)?)?","%Y%m%d(T%H(%M%S?)?)?","%x( %X)?","%d%o( %b( %Y)?)?( %X)?","%b( %d%o)?( %Y)?( %X)?","%Y %b( %d%o( %X)?)?","%o %b %d %X %z %Y","%T","%H:%M( ?%p)?");
99
- Locale.addEvent("change",function(t){if(Locale.get("Date")){b(t);}}).fireEvent("change",Locale.getCurrent());})();Date.implement({timeDiffInWords:function(a){return Date.distanceOfTimeInWords(this,a||new Date);
88
+ j.m=j.I;j.S=j.M;var e;var b=function(s){e=s;j.a=j.A=d("days");j.b=j.B=d("months");c.each(function(u,t){if(u.format){c[t]=l(u.format);}});};var l=function(u){if(!e){return{format:u};
89
+ }var s=[];var t=(u.source||u).replace(/%([a-z])/gi,function(w,v){return m(v)||w;}).replace(/\((?!\?)/g,"(?:").replace(/ (?!\?|\*)/g,",? ").replace(/%([a-z%])/gi,function(w,v){var x=j[v];
90
+ if(!x){return v;}s.push(v);return"("+x.source+")";}).replace(/\[a-z\]/gi,"[a-z\\u00c0-\\uffff;&]");return{format:u,re:new RegExp("^"+t+"$","i"),handler:function(y){y=y.slice(1).associate(s);
91
+ var v=new a().clearTime(),x=y.y||y.Y;if(x!=null){q.call(v,"y",x);}if("d" in y){q.call(v,"d",1);}if("m" in y||y.b||y.B){q.call(v,"m",1);}for(var w in y){q.call(v,w,y[w]);
92
+ }return v;}};};var q=function(s,t){if(!t){return this;}switch(s){case"a":case"A":return this.set("day",a.parseDay(t,true));case"b":case"B":return this.set("mo",a.parseMonth(t,true));
93
+ case"d":return this.set("date",t);case"H":case"I":return this.set("hr",t);case"m":return this.set("mo",t-1);case"M":return this.set("min",t);case"p":return this.set("ampm",t.replace(/\./g,""));
94
+ case"S":return this.set("sec",t);case"s":return this.set("ms",("0."+t)*1000);case"w":return this.set("day",t);case"Y":return this.set("year",t);case"y":t=+t;
95
+ if(t<100){t+=i+(t<o?100:0);}return this.set("year",t);case"z":if(t=="Z"){t="+00";}var u=t.match(/([+-])(\d{2}):?(\d{2})?/);u=(u[1]+"1")*(u[2]*60+(+u[3]||0))+this.getTimezoneOffset();
96
+ return this.set("time",this-u*60000);}return this;};a.defineParsers("%Y([-./]%m([-./]%d((T| )%X)?)?)?","%Y%m%d(T%H(%M%S?)?)?","%x( %X)?","%d%o( %b( %Y)?)?( %X)?","%b( %d%o)?( %Y)?( %X)?","%Y %b( %d%o( %X)?)?","%o %b %d %X %z %Y","%T","%H:%M( ?%p)?");
97
+ Locale.addEvent("change",function(s){if(Locale.get("Date")){b(s);}}).fireEvent("change",Locale.getCurrent());})();Date.implement({timeDiffInWords:function(a){return Date.distanceOfTimeInWords(this,a||new Date);
100
98
  },timeDiff:function(f,c){if(f==null){f=new Date;}var h=((f-this)/1000).floor().abs();var e=[],a=[60,60,24,365,0],d=["s","m","h","d","y"],g,b;for(var i=0;
101
99
  i<a.length;i++){if(i&&!h){break;}g=h;if((b=a[i])){g=(h%b);h=(h/b).floor();}e.unshift(g+(d[i]||""));}return e.join(c||":");}}).extend({distanceOfTimeInWords:function(b,a){return Date.getTimePhrase(((a-b)/1000).toInt());
102
100
  },getTimePhrase:function(f){var d=(f<0)?"Until":"Ago";if(f<0){f*=-1;}var b={minute:60,hour:60,day:24,week:7,month:52/12,year:12,eon:Infinity};var e="lessThanMinute";
@@ -108,9 +106,9 @@ Locale.define("en-US","Number",{decimal:".",group:",",currency:{prefix:"$ "}});N
108
106
  }["prefix","suffix"].each(function(i){if(e[i]){q[i]=a(i)+e[i];}});n=-n;}var l=a("prefix"),p=a("suffix");if(c!==""&&c>=0&&c<=20){n=n.toFixed(c);}if(k>=1&&k<=21){n=(+n).toPrecision(k);
109
107
  }n+="";var m;if(a("scientific")===false&&n.indexOf("e")>-1){var j=n.split("e"),b=+j[1];n=j[0].replace(".","");if(b<0){b=-b-1;m=j[0].indexOf(".");if(m>-1){b-=m-1;
110
108
  }while(b--){n="0"+n;}n="0."+n;}else{m=j[0].lastIndexOf(".");if(m>-1){b-=j[0].length-m-1;}while(b--){n+="0";}}}if(h!="."){n=n.replace(".",h);}if(o){m=n.lastIndexOf(h);
111
- m=(m>-1)?m:n.length;var d=n.substring(m),g=m;while(g--){if((m-g-1)%3==0&&g!=(m-1)){d=o+d;}d=n.charAt(g)+d;}n=d;}if(l){n=l+n;}if(p){n+=p;}return n;},formatCurrency:function(){var a=Locale.get("Number.currency")||{};
112
- if(a.scientific==null){a.scientific=false;}if(a.decimals==null){a.decimals=2;}return this.format(a);},formatPercentage:function(){var a=Locale.get("Number.percentage")||{};
113
- if(a.suffix==null){a.suffix="%";}if(a.decimals==null){a.decimals=2;}return this.format(a);}});(function(){var c={a:/[àáâãäåăą]/g,A:/[ÀÁÂÃÄÅĂĄ]/g,c:/[ćčç]/g,C:/[ĆČÇ]/g,d:/[ďđ]/g,D:/[ĎÐ]/g,e:/[èéêëěę]/g,E:/[ÈÉÊËĚĘ]/g,g:/[ğ]/g,G:/[Ğ]/g,i:/[ìíîï]/g,I:/[ÌÍÎÏ]/g,l:/[ĺľł]/g,L:/[ĹĽŁ]/g,n:/[ñňń]/g,N:/[ÑŇŃ]/g,o:/[òóôõöøő]/g,O:/[ÒÓÔÕÖØ]/g,r:/[řŕ]/g,R:/[ŘŔ]/g,s:/[ššş]/g,S:/[ŠŞŚ]/g,t:/[ťţ]/g,T:/[ŤŢ]/g,ue:/[ü]/g,UE:/[Ü]/g,u:/[ùúûůµ]/g,U:/[ÙÚÛŮ]/g,y:/[ÿý]/g,Y:/[ŸÝ]/g,z:/[žźż]/g,Z:/[ŽŹŻ]/g,th:/[þ]/g,TH:/[Þ]/g,dh:/[ð]/g,DH:/[Ð]/g,ss:/[ß]/g,oe:/[œ]/g,OE:/[Œ]/g,ae:/[æ]/g,AE:/[Æ]/g},b={" ":/[\xa0\u2002\u2003\u2009]/g,"*":/[\xb7]/g,"'":/[\u2018\u2019]/g,'"':/[\u201c\u201d]/g,"...":/[\u2026]/g,"-":/[\u2013]/g,"&raquo;":/[\uFFFD]/g};
109
+ m=(m>-1)?m:n.length;var d=n.substring(m),g=m;while(g--){if((m-g-1)%3==0&&g!=(m-1)){d=o+d;}d=n.charAt(g)+d;}n=d;}if(l){n=l+n;}if(p){n+=p;}return n;},formatCurrency:function(b){var a=Locale.get("Number.currency")||{};
110
+ if(a.scientific==null){a.scientific=false;}a.decimals=b!=null?b:(a.decimals==null?2:a.decimals);return this.format(a);},formatPercentage:function(b){var a=Locale.get("Number.percentage")||{};
111
+ if(a.suffix==null){a.suffix="%";}a.decimals=b!=null?b:(a.decimals==null?2:a.decimals);return this.format(a);}});(function(){var c={a:/[àáâãäåăą]/g,A:/[ÀÁÂÃÄÅĂĄ]/g,c:/[ćčç]/g,C:/[ĆČÇ]/g,d:/[ďđ]/g,D:/[ĎÐ]/g,e:/[èéêëěę]/g,E:/[ÈÉÊËĚĘ]/g,g:/[ğ]/g,G:/[Ğ]/g,i:/[ìíîï]/g,I:/[ÌÍÎÏ]/g,l:/[ĺľł]/g,L:/[ĹĽŁ]/g,n:/[ñňń]/g,N:/[ÑŇŃ]/g,o:/[òóôõöøő]/g,O:/[ÒÓÔÕÖØ]/g,r:/[řŕ]/g,R:/[ŘŔ]/g,s:/[ššş]/g,S:/[ŠŞŚ]/g,t:/[ťţ]/g,T:/[ŤŢ]/g,ue:/[ü]/g,UE:/[Ü]/g,u:/[ùúûůµ]/g,U:/[ÙÚÛŮ]/g,y:/[ÿý]/g,Y:/[ŸÝ]/g,z:/[žźż]/g,Z:/[ŽŹŻ]/g,th:/[þ]/g,TH:/[Þ]/g,dh:/[ð]/g,DH:/[Ð]/g,ss:/[ß]/g,oe:/[œ]/g,OE:/[Œ]/g,ae:/[æ]/g,AE:/[Æ]/g},b={" ":/[\xa0\u2002\u2003\u2009]/g,"*":/[\xb7]/g,"'":/[\u2018\u2019]/g,'"':/[\u201c\u201d]/g,"...":/[\u2026]/g,"-":/[\u2013]/g,"&raquo;":/[\uFFFD]/g};
114
112
  var a=function(f,h){var e=f,g;for(g in h){e=e.replace(h[g],g);}return e;};var d=function(e,g){e=e||"";var h=g?"<"+e+"(?!\\w)[^>]*>([\\s\\S]*?)</"+e+"(?!\\w)>":"</?"+e+"([^>]+)?>",f=new RegExp(h,"gi");
115
113
  return f;};String.implement({standardize:function(){return a(this,c);},repeat:function(e){return new Array(e+1).join(this);},pad:function(e,h,g){if(this.length>=e){return this;
116
114
  }var f=(h==null?" ":""+h).repeat(e-this.length).substr(0,e-this.length);if(!g||g=="right"){return this+f;}if(g=="left"){return f+this;}return f.substr(0,(f.length/2).floor())+this+f.substr(0,(f.length/2).ceil());
@@ -162,21 +160,12 @@ var g=this.getSelectedRange();var f=this.get("value");if(g.start==g.end){this.se
162
160
  this.selectRange(g.start+b.before.length,g.end+b.before.length+c.length);}else{var d=f.substring(g.start,g.end);this.set("value",f.substring(0,g.start)+b.before+d+b.after+f.substring(g.end,f.length));
163
161
  var e=g.start+b.before.length;if(a!==false){this.selectRange(e,e+d.length);}else{this.setCaretPosition(e+f.length);}}return this;}});Elements.from=function(e,d){if(d||d==null){e=e.stripScripts();
164
162
  }var b,c=e.match(/^\s*<(t[dhr]|tbody|tfoot|thead)/i);if(c){b=new Element("table");var a=c[1].toLowerCase();if(["td","th","tr"].contains(a)){b=new Element("tbody").inject(b);
165
- if(a!="tr"){b=new Element("tr").inject(b);}}}return(b||new Element("div")).set("html",e).getChildren();};(function(){var d={},c=["once","throttle","pause"],b=c.length;
166
- while(b--){d[c[b]]=Events.lookupPseudo(c[b]);}Event.definePseudo=function(e,f){d[e]=Type.isFunction(f)?{listener:f}:f;return this;};var a=Element.prototype;
167
- [Element,Window,Document].invoke("implement",Events.Pseudos(d,a.addEvent,a.removeEvent));})();(function(){var a="$moo:keys-pressed",b="$moo:keys-keyup";
168
- Event.definePseudo("keys",function(d,e,c){var g=c[0],f=[],h=this.retrieve(a,[]);f.append(d.value.replace("++",function(){f.push("+");return"";}).split("+"));
169
- h.include(g.key);if(f.every(function(j){return h.contains(j);})){e.apply(this,c);}this.store(a,h);if(!this.retrieve(b)){var i=function(j){(function(){h=this.retrieve(a,[]).erase(j.key);
170
- this.store(a,h);}).delay(0,this);};this.store(b,i).addEvent("keyup",i);}});Object.append(Event.Keys,{shift:16,control:17,alt:18,capslock:20,pageup:33,pagedown:34,end:35,home:36,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":Browser.firefox?109:189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222,"+":107});
171
- })();(function(){var b=!(window.attachEvent&&!window.addEventListener),f=Element.NativeEvents;f.focusin=2;f.focusout=2;var c=function(h,k,i){var j=Element.Events[h.event],l;
172
- if(j){l=j.condition;}return Slick.match(k,h.value)&&(!l||l.call(k,i));};var e=function(h,j,i){for(var k=j.target;k&&k!=this;k=document.id(k.parentNode)){if(k&&c(h,k,j)){return i.call(k,j,k);
173
- }}};var g=function(h){var i="$delegation:";return{base:"focusin",onRemove:function(j){j.retrieve(i+"forms",[]).each(function(k){k.retrieve(i+"listeners",[]).each(function(l){k.removeEvent(h,l);
174
- });k.eliminate(i+h+"listeners").eliminate(i+h+"originalFn");});},listener:function(r,s,q,t,v){var k=q[0],j=this.retrieve(i+"forms",[]),p=k.target,m=(p.get("tag")=="form")?p:k.target.getParent("form");
175
- if(!m){return;}var o=m.retrieve(i+"originalFn",[]),l=m.retrieve(i+"listeners",[]),u=this;j.include(m);this.store(i+"forms",j);if(!o.contains(s)){var n=function(w){e.call(u,r,w,s);
176
- };m.addEvent(h,n);o.push(s);l.push(n);m.store(i+h+"originalFn",o).store(i+h+"listeners",l);}}};};var a=function(h){return{base:"focusin",listener:function(l,m,j){var k={blur:function(){this.removeEvents(k);
177
- }},i=this;k[h]=function(n){e.call(i,l,n,m);};j[0].target.addEvents(k);}};};var d={mouseenter:{base:"mouseover"},mouseleave:{base:"mouseout"},focus:{base:"focus"+(b?"":"in"),args:[true]},blur:{base:b?"blur":"focusout",args:[true]}};
178
- if(!b){Object.append(d,{submit:g("submit"),reset:g("reset"),change:a("change"),select:a("select")});}Event.definePseudo("relay",{listener:function(i,j,h){e.call(this,i,h[0],j);
179
- },options:d});})();(function(){var b=function(e,d){var f=[];Object.each(d,function(g){Object.each(g,function(h){e.each(function(i){f.push(i+"-"+h+(i=="border"?"-width":""));
163
+ if(a!="tr"){b=new Element("tr").inject(b);}}}return(b||new Element("div")).set("html",e).getChildren();};(function(){var d={relay:false},c=["once","throttle","pause"],b=c.length;
164
+ while(b--){d[c[b]]=Events.lookupPseudo(c[b]);}DOMEvent.definePseudo=function(e,f){d[e]=f;return this;};var a=Element.prototype;[Element,Window,Document].invoke("implement",Events.Pseudos(d,a.addEvent,a.removeEvent));
165
+ })();(function(){var a="$moo:keys-pressed",b="$moo:keys-keyup";DOMEvent.definePseudo("keys",function(d,e,c){var g=c[0],f=[],h=this.retrieve(a,[]);f.append(d.value.replace("++",function(){f.push("+");
166
+ return"";}).split("+"));h.include(g.key);if(f.every(function(j){return h.contains(j);})){e.apply(this,c);}this.store(a,h);if(!this.retrieve(b)){var i=function(j){(function(){h=this.retrieve(a,[]).erase(j.key);
167
+ this.store(a,h);}).delay(0,this);};this.store(b,i).addEvent("keyup",i);}});DOMEvent.defineKeys({"16":"shift","17":"control","18":"alt","20":"capslock","33":"pageup","34":"pagedown","35":"end","36":"home","144":"numlock","145":"scrolllock","186":";","187":"=","188":",","190":".","191":"/","192":"`","219":"[","220":"\\","221":"]","222":"'","107":"+"}).defineKey(Browser.firefox?109:189,"-");
168
+ })();(function(){var b=function(e,d){var f=[];Object.each(d,function(g){Object.each(g,function(h){e.each(function(i){f.push(i+"-"+h+(i=="border"?"-width":""));
180
169
  });});});return f;};var c=function(f,e){var d=0;Object.each(e,function(h,g){if(g.test(f)){d=d+h.toInt();}});return d;};var a=function(d){return !!(!d||d.offsetHeight||d.offsetWidth);
181
170
  };Element.implement({measure:function(h){if(a(this)){return h.call(this);}var g=this.getParent(),e=[];while(!a(g)&&g!=document.body){e.push(g.expose());
182
171
  g=g.getParent();}var f=this.expose(),d=h.call(this);f();e.each(function(i){i();});return d;},expose:function(){if(this.getStyle("display")!="none"){return function(){};
@@ -320,8 +309,8 @@ return a;},this));},removeLists:function(){return $$(Array.flatten(arguments).ma
320
309
  }});}return c.inject(this.list).setPosition(a.getPosition(a.getOffsetParent()));},getDroppables:function(){var a=this.list.getChildren().erase(this.clone).erase(this.element);
321
310
  if(!this.options.constrain){a.append(this.lists).erase(this.list);}return a;},insert:function(c,b){var a="inside";if(this.lists.contains(b)){this.list=b;
322
311
  this.drag.droppables=this.getDroppables();}else{a=this.element.getAllPrevious().contains(b)?"before":"after";}this.element.inject(b,a);this.fireEvent("sort",[this.element,this.clone]);
323
- },start:function(b,a){if(!this.idle||b.rightClick||["button","input","a"].contains(b.target.get("tag"))){return;}this.idle=false;this.element=a;this.opacity=a.get("opacity");
324
- this.list=a.getParent();this.clone=this.getClone(b,a);this.drag=new Drag.Move(this.clone,Object.merge({droppables:this.getDroppables()},this.options.dragOptions)).addEvents({onSnap:function(){b.stop();
312
+ },start:function(b,a){if(!this.idle||b.rightClick||["button","input","a","textarea"].contains(b.target.get("tag"))){return;}this.idle=false;this.element=a;
313
+ this.opacity=a.get("opacity");this.list=a.getParent();this.clone=this.getClone(b,a);this.drag=new Drag.Move(this.clone,Object.merge({droppables:this.getDroppables()},this.options.dragOptions)).addEvents({onSnap:function(){b.stop();
325
314
  this.clone.setStyle("visibility","visible");this.element.set("opacity",this.options.opacity||0);this.fireEvent("start",[this.element,this.clone]);}.bind(this),onEnter:this.insert.bind(this),onCancel:this.end.bind(this),onComplete:this.end.bind(this)});
326
315
  this.clone.inject(this.element,"before");this.drag.start(b);},end:function(){this.drag.detach();this.element.set("opacity",this.opacity);if(this.effect){var b=this.element.getStyles("width","height"),d=this.clone,c=d.computePosition(this.element.getPosition(this.clone.getOffsetParent()));
327
316
  var a=function(){this.removeEvent("cancel",a);d.destroy();};this.effect.element=d;this.effect.start({top:c.top,left:c.left,width:b.width,height:b.height,opacity:0.25}).addEvent("cancel",a).chain(a);
@@ -330,13 +319,14 @@ var a=function(){this.removeEvent("cancel",a);d.destroy();};this.effect.element=
330
319
  }return(a||a===0)&&a>=0&&a<this.lists.length?b[a]:b;}});Request.implement({options:{initialDelay:5000,delay:5000,limit:60000},startTimer:function(b){var a=function(){if(!this.running){this.send({data:b});
331
320
  }};this.lastDelay=this.options.initialDelay;this.timer=a.delay(this.lastDelay,this);this.completeCheck=function(c){clearTimeout(this.timer);this.lastDelay=(c)?this.options.delay:(this.lastDelay+this.options.delay).min(this.options.limit);
332
321
  this.timer=a.delay(this.lastDelay,this);};return this.addEvent("complete",this.completeCheck);},stopTimer:function(){clearTimeout(this.timer);return this.removeEvent("complete",this.completeCheck);
333
- }});var Asset={javascript:function(f,c){if(!c){c={};}var a=new Element("script",{src:f,type:"text/javascript"}),g=c.document||document,b=0,d=c.onload||c.onLoad;
334
- var e=d?function(){if(++b==1){d.call(this);}}:function(){};delete c.onload;delete c.onLoad;delete c.document;return a.addEvents({load:e,readystatechange:function(){if(["loaded","complete"].contains(this.readyState)){e.call(this);
335
- }}}).set(c).inject(g.head);},css:function(d,a){if(!a){a={};}var b=new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:d});var c=a.onload||a.onLoad,e=a.document||document;
336
- delete a.onload;delete a.onLoad;delete a.document;if(c){b.addEvent("load",c);}return b.set(a).inject(e.head);},image:function(c,b){if(!b){b={};}var d=new Image(),a=document.id(d)||new Element("img");
337
- ["load","abort","error"].each(function(e){var g="on"+e,f="on"+e.capitalize(),h=b[g]||b[f]||function(){};delete b[f];delete b[g];d[g]=function(){if(!d){return;
338
- }if(!a.parentNode){a.width=d.width;a.height=d.height;}d=d.onload=d.onabort=d.onerror=null;h.delay(1,a,a);a.fireEvent(e,a,1);};});d.src=a.src=c;if(d&&d.complete){d.onload.delay(1);
339
- }return a.set(b);},images:function(c,b){c=Array.from(c);var d=function(){},a=0;b=Object.merge({onComplete:d,onProgress:d,onError:d,properties:{}},b);return new Elements(c.map(function(f,e){return Asset.image(f,Object.append(b.properties,{onload:function(){a++;
322
+ }});var Asset={javascript:function(d,b){if(!b){b={};}var a=new Element("script",{src:d,type:"text/javascript"}),e=b.document||document,c=b.onload||b.onLoad;
323
+ delete b.onload;delete b.onLoad;delete b.document;if(c){if(typeof a.onreadystatechange!="undefined"){a.addEvent("readystatechange",function(){if(["loaded","complete"].contains(this.readyState)){c.call(this);
324
+ }});}else{a.addEvent("load",c);}}return a.set(b).inject(e.head);},css:function(d,a){if(!a){a={};}var b=new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:d});
325
+ var c=a.onload||a.onLoad,e=a.document||document;delete a.onload;delete a.onLoad;delete a.document;if(c){b.addEvent("load",c);}return b.set(a).inject(e.head);
326
+ },image:function(c,b){if(!b){b={};}var d=new Image(),a=document.id(d)||new Element("img");["load","abort","error"].each(function(e){var g="on"+e,f="on"+e.capitalize(),h=b[g]||b[f]||function(){};
327
+ delete b[f];delete b[g];d[g]=function(){if(!d){return;}if(!a.parentNode){a.width=d.width;a.height=d.height;}d=d.onload=d.onabort=d.onerror=null;h.delay(1,a,a);
328
+ a.fireEvent(e,a,1);};});d.src=a.src=c;if(d&&d.complete){d.onload.delay(1);}return a.set(b);},images:function(c,b){c=Array.from(c);var d=function(){},a=0;
329
+ b=Object.merge({onComplete:d,onProgress:d,onError:d,properties:{}},b);return new Elements(c.map(function(f,e){return Asset.image(f,Object.append(b.properties,{onload:function(){a++;
340
330
  b.onProgress.call(this,a,e,f);if(a==c.length){b.onComplete();}},onerror:function(){a++;b.onError.call(this,a,e,f);if(a==c.length){b.onComplete();}}}));
341
331
  }));}};(function(){var a=this.Color=new Type("Color",function(c,d){if(arguments.length>=3){d="rgb";c=Array.slice(arguments,0,3);}else{if(typeof c=="string"){if(c.match(/rgb/)){c=c.rgbToHex().hexToRgb(true);
342
332
  }else{if(c.match(/hsb/)){c=c.hsbToRgb();}else{c=c.hexToRgb(true);}}}}d=d||"rgb";switch(d){case"hsb":var b=c;c=c.hsbToRgb();c.hsb=b;break;case"hex":c=c.hexToRgb(true);
@@ -358,20 +348,19 @@ $$(this.body.rows);if(this.options.headers.length){this.setHeaders(this.options.
358
348
  }this.options.rows.each(function(a){this.push(a);},this);},toElement:function(){return this.element;},empty:function(){this.body.empty();return this;},set:function(e,a){var d=(e=="headers")?"tHead":"tFoot",b=d.toLowerCase();
359
349
  this[b]=(document.id(this.element[d])||new Element(b).inject(this.element,"top")).empty();var c=this.push(a,{},this[b],e=="headers"?"th":"td");if(e=="headers"){this.head=this.getHead();
360
350
  }else{this.foot=this.getHead();}return c;},getHead:function(){var a=this.thead.rows;return a.length>1?$$(a):a.length?document.id(a[0]):false;},setHeaders:function(a){this.set("headers",a);
361
- return this;},setFooters:function(a){this.set("footers",a);return this;},push:function(f,c,e,a,b){if(typeOf(f)=="element"&&f.get("tag")=="tr"){f.inject(e||this.body,b);
362
- return{tr:f,tds:f.getChildren("td")};}var d=f.map(function(i){var j=new Element(a||"td",i?i.properties:{}),h=(i?i.content:"")||i,g=typeOf(h);if(["element","array","collection","elements"].contains(g)){j.adopt(h);
363
- }else{j.set("html",h);}return j;});return{tr:new Element("tr",c).inject(e||this.body,b).adopt(d),tds:d};}});["adopt","inject","wraps","grab","replaces","dispose"].each(function(a){HtmlTable.implement(a,function(){this.element[a].apply(this.element,arguments);
364
- return this;});});HtmlTable=Class.refactor(HtmlTable,{options:{classZebra:"table-tr-odd",zebra:true},initialize:function(){this.previous.apply(this,arguments);
365
- if(this.occluded){return this.occluded;}if(this.options.zebra){this.updateZebras();}},updateZebras:function(){Array.each(this.body.rows,this.zebra,this);
366
- },setRowStyle:function(b,a){if(this.previous){this.previous(b,a);}this.zebra(b,a);},zebra:function(b,a){return b[((a%2)?"remove":"add")+"Class"](this.options.classZebra);
367
- },push:function(){var a=this.previous.apply(this,arguments);if(this.options.zebra){this.updateZebras();}return a;}});HtmlTable=Class.refactor(HtmlTable,{options:{sortIndex:0,sortReverse:false,parsers:[],defaultParser:"string",classSortable:"table-sortable",classHeadSort:"table-th-sort",classHeadSortRev:"table-th-sort-rev",classNoSort:"table-th-nosort",classGroupHead:"table-tr-group-head",classGroup:"table-tr-group",classCellSort:"table-td-sort",classSortSpan:"table-th-sort-span",sortable:false,thSelector:"th"},initialize:function(){this.previous.apply(this,arguments);
368
- if(this.occluded){return this.occluded;}this.sorted={index:null,dir:1};this.bound={headClick:this.headClick.bind(this)};this.sortSpans=new Elements();if(this.options.sortable){this.enableSort();
369
- if(this.options.sortIndex!=null){this.sort(this.options.sortIndex,this.options.sortReverse);}}},attachSorts:function(a){this.detachSorts();if(a!==false){this.element.addEvent("click:relay("+this.options.thSelector+")",this.bound.headClick);
370
- }},detachSorts:function(){this.element.removeEvents("click:relay("+this.options.thSelector+")");},setHeaders:function(){this.previous.apply(this,arguments);
371
- if(this.sortEnabled){this.setParsers();}},setParsers:function(){this.parsers=this.detectParsers();},detectParsers:function(){return this.head&&this.head.getElements(this.options.thSelector).flatten().map(this.detectParser,this);
372
- },detectParser:function(a,b){if(a.hasClass(this.options.classNoSort)||a.retrieve("htmltable-parser")){return a.retrieve("htmltable-parser");}var c=new Element("div");
373
- c.adopt(a.childNodes).inject(a);var f=new Element("span",{"class":this.options.classSortSpan}).inject(c,"top");this.sortSpans.push(f);var g=this.options.parsers[b],e=this.body.rows,d;
374
- switch(typeOf(g)){case"function":g={convert:g};d=true;break;case"string":g=g;d=true;break;}if(!d){HtmlTable.ParserPriority.some(function(k){var o=HtmlTable.Parsers[k],m=o.match;
351
+ return this;},setFooters:function(a){this.set("footers",a);return this;},update:function(d,e,a){var b=d.getChildren(a||"td"),c=b.length-1;e.each(function(i,f){var j=b[f]||new Element(a||"td").inject(d),h=(i?i.content:"")||i,g=typeOf(h);
352
+ if(i&&i.properties){j.set(i.properties);}if(/(element(s?)|array|collection)/.test(g)){j.empty().adopt(h);}else{j.set("html",h);}if(f>c){b.push(j);}else{b[f]=j;
353
+ }});return{tr:d,tds:b};},push:function(e,c,d,a,b){if(typeOf(e)=="element"&&e.get("tag")=="tr"){e.inject(d||this.body,b);return{tr:e,tds:e.getChildren("td")};
354
+ }return this.update(new Element("tr",c).inject(d||this.body,b),e,a);},pushMany:function(d,c,e,a,b){return d.map(function(f){return this.push(f,c,e,a,b);
355
+ },this);}});["adopt","inject","wraps","grab","replaces","dispose"].each(function(a){HtmlTable.implement(a,function(){this.element[a].apply(this.element,arguments);
356
+ return this;});});HtmlTable=Class.refactor(HtmlTable,{options:{sortIndex:0,sortReverse:false,parsers:[],defaultParser:"string",classSortable:"table-sortable",classHeadSort:"table-th-sort",classHeadSortRev:"table-th-sort-rev",classNoSort:"table-th-nosort",classGroupHead:"table-tr-group-head",classGroup:"table-tr-group",classCellSort:"table-td-sort",classSortSpan:"table-th-sort-span",sortable:false,thSelector:"th"},initialize:function(){this.previous.apply(this,arguments);
357
+ if(this.occluded){return this.occluded;}this.sorted={index:null,dir:1};if(!this.bound){this.bound={};}this.bound.headClick=this.headClick.bind(this);this.sortSpans=new Elements();
358
+ if(this.options.sortable){this.enableSort();if(this.options.sortIndex!=null){this.sort(this.options.sortIndex,this.options.sortReverse);}}},attachSorts:function(a){this.detachSorts();
359
+ if(a!==false){this.element.addEvent("click:relay("+this.options.thSelector+")",this.bound.headClick);}},detachSorts:function(){this.element.removeEvents("click:relay("+this.options.thSelector+")");
360
+ },setHeaders:function(){this.previous.apply(this,arguments);if(this.sortEnabled){this.setParsers();}},setParsers:function(){this.parsers=this.detectParsers();
361
+ },detectParsers:function(){return this.head&&this.head.getElements(this.options.thSelector).flatten().map(this.detectParser,this);},detectParser:function(a,b){if(a.hasClass(this.options.classNoSort)||a.retrieve("htmltable-parser")){return a.retrieve("htmltable-parser");
362
+ }var c=new Element("div");c.adopt(a.childNodes).inject(a);var f=new Element("span",{"class":this.options.classSortSpan}).inject(c,"top");this.sortSpans.push(f);
363
+ var g=this.options.parsers[b],e=this.body.rows,d;switch(typeOf(g)){case"function":g={convert:g};d=true;break;case"string":g=g;d=true;break;}if(!d){HtmlTable.ParserPriority.some(function(k){var o=HtmlTable.Parsers[k],m=o.match;
375
364
  if(!m){return false;}for(var n=0,l=e.length;n<l;n++){var h=document.id(e[n].cells[b]),p=h?h.get("html").clean():"";if(p&&m.test(p)){g=o;return true;}}});
376
365
  }if(!g){g=this.options.defaultParser;}a.store("htmltable-parser",g);return g;},headClick:function(b,a){if(!this.head||a.hasClass(this.options.classNoSort)){return;
377
366
  }return this.sort(Array.indexOf(this.head.getElements(this.options.thSelector).flatten(),a)%this.body.rows[0].cells.length);},serialize:function(){var a=this.previous.apply(this,arguments)||{};
@@ -422,43 +411,49 @@ a.name=b;this._shortcutIndex[b]=a;this._shortcuts.push(a);if(a.keys){this.addEve
422
411
  }});Keyboard.rebind=function(b,a){Array.from(a).each(function(c){c.getKeyboard().removeEvent(c.keys,c.handler);c.getKeyboard().addEvent(b,c.handler);c.keys=b;
423
412
  c.getKeyboard().fireEvent("rebound");});};Keyboard.getActiveShortcuts=function(b){var a=[],c=[];Keyboard.each(b,[].push.bind(a));a.each(function(d){c.extend(d.getShortcuts());
424
413
  });return c;};Keyboard.getShortcut=function(c,b,d){d=d||{};var a=d.many?[]:null,e=d.many?function(g){var f=g.getShortcut(c);if(f){a.push(f);}}:function(f){if(!a){a=f.getShortcut(c);
425
- }};Keyboard.each(b,e);return a;};Keyboard.getShortcuts=function(b,a){return Keyboard.getShortcut(b,a,{many:true});};HtmlTable=Class.refactor(HtmlTable,{options:{useKeyboard:true,classRowSelected:"table-tr-selected",classRowHovered:"table-tr-hovered",classSelectable:"table-selectable",shiftForMultiSelect:true,allowMultiSelect:true,selectable:false},initialize:function(){this.previous.apply(this,arguments);
426
- if(this.occluded){return this.occluded;}this.selectedRows=new Elements();this.bound={mouseleave:this.mouseleave.bind(this),clickRow:this.clickRow.bind(this),activateKeyboard:function(){if(this.keyboard&&this.selectEnabled){this.keyboard.activate();
427
- }}.bind(this)};if(this.options.selectable){this.enableSelect();}},empty:function(){this.selectNone();return this.previous();},enableSelect:function(){this.selectEnabled=true;
414
+ }};Keyboard.each(b,e);return a;};Keyboard.getShortcuts=function(b,a){return Keyboard.getShortcut(b,a,{many:true});};HtmlTable=Class.refactor(HtmlTable,{options:{useKeyboard:true,classRowSelected:"table-tr-selected",classRowHovered:"table-tr-hovered",classSelectable:"table-selectable",shiftForMultiSelect:true,allowMultiSelect:true,selectable:false,selectHiddenRows:false},initialize:function(){this.previous.apply(this,arguments);
415
+ if(this.occluded){return this.occluded;}this.selectedRows=new Elements();if(!this.bound){this.bound={};}this.bound.mouseleave=this.mouseleave.bind(this);
416
+ this.bound.clickRow=this.clickRow.bind(this);this.bound.activateKeyboard=function(){if(this.keyboard&&this.selectEnabled){this.keyboard.activate();}}.bind(this);
417
+ if(this.options.selectable){this.enableSelect();}},empty:function(){this.selectNone();return this.previous();},enableSelect:function(){this.selectEnabled=true;
428
418
  this.attachSelects();this.element.addClass(this.options.classSelectable);return this;},disableSelect:function(){this.selectEnabled=false;this.attachSelects(false);
429
419
  this.element.removeClass(this.options.classSelectable);return this;},push:function(){var a=this.previous.apply(this,arguments);this.updateSelects();return a;
430
- },isSelected:function(a){return this.selectedRows.contains(a);},toggleRow:function(a){return this[(this.isSelected(a)?"de":"")+"selectRow"](a);},selectRow:function(b,a){if(this.isSelected(b)||(!a&&!this.body.getChildren().contains(b))){return;
420
+ },toggleRow:function(a){return this[(this.isSelected(a)?"de":"")+"selectRow"](a);},selectRow:function(b,a){if(this.isSelected(b)||(!a&&!this.body.getChildren().contains(b))){return;
431
421
  }if(!this.options.allowMultiSelect){this.selectNone();}if(!this.isSelected(b)){this.selectedRows.push(b);b.addClass(this.options.classRowSelected);this.fireEvent("rowFocus",[b,this.selectedRows]);
432
- this.fireEvent("stateChanged");}this.focused=b;document.clearSelection();return this;},getSelected:function(){return this.selectedRows;},serialize:function(){var a=this.previous.apply(this,arguments)||{};
433
- if(this.options.selectable){a.selectedRows=this.selectedRows.map(function(b){return Array.indexOf(this.body.rows,b);}.bind(this));}return a;},restore:function(a){if(this.options.selectable&&a.selectedRows){a.selectedRows.each(function(b){this.selectRow(this.body.rows[b]);
422
+ this.fireEvent("stateChanged");}this.focused=b;document.clearSelection();return this;},isSelected:function(a){return this.selectedRows.contains(a);},getSelected:function(){return this.selectedRows;
423
+ },getSelected:function(){return this.selectedRows;},serialize:function(){var a=this.previous.apply(this,arguments)||{};if(this.options.selectable){a.selectedRows=this.selectedRows.map(function(b){return Array.indexOf(this.body.rows,b);
424
+ }.bind(this));}return a;},restore:function(a){if(this.options.selectable&&a.selectedRows){a.selectedRows.each(function(b){this.selectRow(this.body.rows[b]);
434
425
  }.bind(this));}this.previous.apply(this,arguments);},deselectRow:function(b,a){if(!this.isSelected(b)||(!a&&!this.body.getChildren().contains(b))){return;
435
426
  }this.selectedRows=new Elements(Array.from(this.selectedRows).erase(b));b.removeClass(this.options.classRowSelected);this.fireEvent("rowUnfocus",[b,this.selectedRows]);
436
427
  this.fireEvent("stateChanged");return this;},selectAll:function(a){if(!a&&!this.options.allowMultiSelect){return;}this.selectRange(0,this.body.rows.length,a);
437
428
  return this;},selectNone:function(){return this.selectAll(true);},selectRange:function(b,a,f){if(!this.options.allowMultiSelect&&!f){return;}var g=f?"deselectRow":"selectRow",e=Array.clone(this.body.rows);
438
429
  if(typeOf(b)=="element"){b=e.indexOf(b);}if(typeOf(a)=="element"){a=e.indexOf(a);}a=a<e.length-1?a:e.length-1;if(a<b){var d=b;b=a;a=d;}for(var c=b;c<=a;
439
- c++){this[g](e[c],true);}return this;},deselectRange:function(b,a){this.selectRange(b,a,true);},getSelected:function(){return this.selectedRows;},enterRow:function(a){if(this.hovered){this.hovered=this.leaveRow(this.hovered);
440
- }this.hovered=a.addClass(this.options.classRowHovered);},leaveRow:function(a){a.removeClass(this.options.classRowHovered);},updateSelects:function(){Array.each(this.body.rows,function(a){var b=a.retrieve("binders");
441
- if(!b&&!this.selectEnabled){return;}if(!b){b={mouseenter:this.enterRow.pass([a],this),mouseleave:this.leaveRow.pass([a],this)};a.store("binders",b);}if(this.selectEnabled){a.addEvents(b);
442
- }else{a.removeEvents(b);}},this);},shiftFocus:function(b,a){if(!this.focused){return this.selectRow(this.body.rows[0],a);}var c=this.getRowByOffset(b);
443
- if(c===null||this.focused==this.body.rows[c]){return this;}this.toggleRow(this.body.rows[c],a);},clickRow:function(a,b){var c=(a.shift||a.meta||a.control)&&this.options.shiftForMultiSelect;
444
- if(!c&&!(a.rightClick&&this.isSelected(b)&&this.options.allowMultiSelect)){this.selectNone();}if(a.rightClick){this.selectRow(b);}else{this.toggleRow(b);
445
- }if(a.shift){this.selectRange(this.rangeStart||this.body.rows[0],b,this.rangeStart?!this.isSelected(b):true);this.focused=b;}this.rangeStart=b;},getRowByOffset:function(c){if(!this.focused){return 0;
446
- }var b=Array.clone(this.body.rows),a=b.indexOf(this.focused)+c;if(a<0){a=null;}if(a>=b.length){a=null;}return a;},attachSelects:function(d){d=d!=null?d:true;
447
- var g=d?"addEvents":"removeEvents";this.element[g]({mouseleave:this.bound.mouseleave,click:this.bound.activateKeyboard});this.body[g]({"click:relay(tr)":this.bound.clickRow,"contextmenu:relay(tr)":this.bound.clickRow});
448
- if(this.options.useKeyboard||this.keyboard){if(!this.keyboard){this.keyboard=new Keyboard();}if(!this.selectKeysDefined){this.selectKeysDefined=true;var f,e;
449
- var c=function(i){var h=function(j){clearTimeout(f);j.preventDefault();var k=this.body.rows[this.getRowByOffset(i)];if(j.shift&&k&&this.isSelected(k)){this.deselectRow(this.focused);
450
- this.focused=k;}else{if(k&&(!this.options.allowMultiSelect||!j.shift)){this.selectNone();}this.shiftFocus(i,j);}if(e){f=h.delay(100,this,j);}else{f=(function(){e=true;
451
- h(j);}).delay(400);}}.bind(this);return h;}.bind(this);var b=function(){clearTimeout(f);e=false;};this.keyboard.addEvents({"keydown:shift+up":c(-1),"keydown:shift+down":c(1),"keyup:shift+up":b,"keyup:shift+down":b,"keyup:up":b,"keyup:down":b});
430
+ c++){if(this.options.selectHiddenRows||e[c].isDisplayed()){this[g](e[c],true);}}return this;},deselectRange:function(b,a){this.selectRange(b,a,true);},getSelected:function(){return this.selectedRows;
431
+ },enterRow:function(a){if(this.hovered){this.hovered=this.leaveRow(this.hovered);}this.hovered=a.addClass(this.options.classRowHovered);},leaveRow:function(a){a.removeClass(this.options.classRowHovered);
432
+ },updateSelects:function(){Array.each(this.body.rows,function(a){var b=a.retrieve("binders");if(!b&&!this.selectEnabled){return;}if(!b){b={mouseenter:this.enterRow.pass([a],this),mouseleave:this.leaveRow.pass([a],this)};
433
+ a.store("binders",b);}if(this.selectEnabled){a.addEvents(b);}else{a.removeEvents(b);}},this);},shiftFocus:function(b,a){if(!this.focused){return this.selectRow(this.body.rows[0],a);
434
+ }var c=this.getRowByOffset(b,this.options.selectHiddenRows);if(c===null||this.focused==this.body.rows[c]){return this;}this.toggleRow(this.body.rows[c],a);
435
+ },clickRow:function(a,b){var c=(a.shift||a.meta||a.control)&&this.options.shiftForMultiSelect;if(!c&&!(a.rightClick&&this.isSelected(b)&&this.options.allowMultiSelect)){this.selectNone();
436
+ }if(a.rightClick){this.selectRow(b);}else{this.toggleRow(b);}if(a.shift){this.selectRange(this.rangeStart||this.body.rows[0],b,this.rangeStart?!this.isSelected(b):true);
437
+ this.focused=b;}this.rangeStart=b;},getRowByOffset:function(e,d){if(!this.focused){return 0;}var b=Array.indexOf(this.body.rows,this.focused);if((b==0&&e<0)||(b==this.body.rows.length-1&&e>0)){return null;
438
+ }if(d){b+=e;}else{var a=0,c=0;if(e>0){while(c<e&&b<this.body.rows.length-1){if(this.body.rows[++b].isDisplayed()){c++;}}}else{while(c>e&&b>0){if(this.body.rows[--b].isDisplayed()){c--;
439
+ }}}}return b;},attachSelects:function(d){d=d!=null?d:true;var g=d?"addEvents":"removeEvents";this.element[g]({mouseleave:this.bound.mouseleave,click:this.bound.activateKeyboard});
440
+ this.body[g]({"click:relay(tr)":this.bound.clickRow,"contextmenu:relay(tr)":this.bound.clickRow});if(this.options.useKeyboard||this.keyboard){if(!this.keyboard){this.keyboard=new Keyboard();
441
+ }if(!this.selectKeysDefined){this.selectKeysDefined=true;var f,e;var c=function(i){var h=function(j){clearTimeout(f);j.preventDefault();var k=this.body.rows[this.getRowByOffset(i,this.options.selectHiddenRows)];
442
+ if(j.shift&&k&&this.isSelected(k)){this.deselectRow(this.focused);this.focused=k;}else{if(k&&(!this.options.allowMultiSelect||!j.shift)){this.selectNone();
443
+ }this.shiftFocus(i,j);}if(e){f=h.delay(100,this,j);}else{f=(function(){e=true;h(j);}).delay(400);}}.bind(this);return h;}.bind(this);var b=function(){clearTimeout(f);
444
+ e=false;};this.keyboard.addEvents({"keydown:shift+up":c(-1),"keydown:shift+down":c(1),"keyup:shift+up":b,"keyup:shift+down":b,"keyup:up":b,"keyup:down":b});
452
445
  var a="";if(this.options.allowMultiSelect&&this.options.shiftForMultiSelect&&this.options.useKeyboard){a=" (Shift multi-selects).";}this.keyboard.addShortcuts({"Select Previous Row":{keys:"up",shortcut:"up arrow",handler:c(-1),description:"Select the previous row in the table."+a},"Select Next Row":{keys:"down",shortcut:"down arrow",handler:c(1),description:"Select the next row in the table."+a}});
453
446
  }this.keyboard[d?"activate":"deactivate"]();}this.updateSelects();},mouseleave:function(){if(this.hovered){this.leaveRow(this.hovered);}}});(function(){var a=function(c,b){return(c)?(typeOf(c)=="function"?c(b):b.get(c)):"";
454
447
  };this.Tips=new Class({Implements:[Events,Options],options:{onShow:function(){this.tip.setStyle("display","block");},onHide:function(){this.tip.setStyle("display","none");
455
- },title:"title",text:function(b){return b.get("rel")||b.get("href");},showDelay:100,hideDelay:100,className:"tip-wrap",offset:{x:16,y:16},windowPadding:{x:0,y:0},fixed:false},initialize:function(){var b=Array.link(arguments,{options:Type.isObject,elements:function(c){return c!=null;
456
- }});this.setOptions(b.options);if(b.elements){this.attach(b.elements);}this.container=new Element("div",{"class":"tip"});},toElement:function(){if(this.tip){return this.tip;
457
- }this.tip=new Element("div",{"class":this.options.className,styles:{position:"absolute",top:0,left:0}}).adopt(new Element("div",{"class":"tip-top"}),this.container,new Element("div",{"class":"tip-bottom"}));
458
- return this.tip;},attach:function(b){$$(b).each(function(d){var f=a(this.options.title,d),e=a(this.options.text,d);d.set("title","").store("tip:native",f).retrieve("tip:title",f);
459
- d.retrieve("tip:text",e);this.fireEvent("attach",[d]);var c=["enter","leave"];if(!this.options.fixed){c.push("move");}c.each(function(h){var g=d.retrieve("tip:"+h);
460
- if(!g){g=function(i){this["element"+h.capitalize()].apply(this,[i,d]);}.bind(this);}d.store("tip:"+h,g).addEvent("mouse"+h,g);},this);},this);return this;
461
- },detach:function(b){$$(b).each(function(d){["enter","leave","move"].each(function(e){d.removeEvent("mouse"+e,d.retrieve("tip:"+e)).eliminate("tip:"+e);
448
+ },title:"title",text:function(b){return b.get("rel")||b.get("href");},showDelay:100,hideDelay:100,className:"tip-wrap",offset:{x:16,y:16},windowPadding:{x:0,y:0},fixed:false,waiAria:true},initialize:function(){var b=Array.link(arguments,{options:Type.isObject,elements:function(c){return c!=null;
449
+ }});this.setOptions(b.options);if(b.elements){this.attach(b.elements);}this.container=new Element("div",{"class":"tip"});if(this.options.id){this.container.set("id",this.options.id);
450
+ if(this.options.waiAria){this.attachWaiAria();}}},toElement:function(){if(this.tip){return this.tip;}this.tip=new Element("div",{"class":this.options.className,styles:{position:"absolute",top:0,left:0}}).adopt(new Element("div",{"class":"tip-top"}),this.container,new Element("div",{"class":"tip-bottom"}));
451
+ return this.tip;},attachWaiAria:function(){var b=this.options.id;this.container.set("role","tooltip");if(!this.waiAria){this.waiAria={show:function(c){if(b){c.set("aria-describedby",b);
452
+ }this.container.set("aria-hidden","false");},hide:function(c){if(b){c.erase("aria-describedby");}this.container.set("aria-hidden","true");}};}this.addEvents(this.waiAria);
453
+ },detachWaiAria:function(){if(this.waiAria){this.container.erase("role");this.container.erase("aria-hidden");this.removeEvents(this.waiAria);}},attach:function(b){$$(b).each(function(d){var f=a(this.options.title,d),e=a(this.options.text,d);
454
+ d.set("title","").store("tip:native",f).retrieve("tip:title",f);d.retrieve("tip:text",e);this.fireEvent("attach",[d]);var c=["enter","leave"];if(!this.options.fixed){c.push("move");
455
+ }c.each(function(h){var g=d.retrieve("tip:"+h);if(!g){g=function(i){this["element"+h.capitalize()].apply(this,[i,d]);}.bind(this);}d.store("tip:"+h,g).addEvent("mouse"+h,g);
456
+ },this);},this);return this;},detach:function(b){$$(b).each(function(d){["enter","leave","move"].each(function(e){d.removeEvent("mouse"+e,d.retrieve("tip:"+e)).eliminate("tip:"+e);
462
457
  });this.fireEvent("detach",[d]);if(this.options.title=="title"){var c=d.retrieve("tip:native");if(c){d.set("title",c);}}},this);return this;},elementEnter:function(c,b){clearTimeout(this.timer);
463
458
  this.timer=(function(){this.container.empty();["title","text"].each(function(e){var d=b.retrieve("tip:"+e);var f=this["_"+e+"Element"]=new Element("div",{"class":"tip-"+e}).inject(this.container);
464
459
  if(d){this.fill(f,d);}},this);this.show(b);this.position((this.options.fixed)?{page:b.getPosition()}:c);}).delay(this.options.showDelay,this);},elementLeave:function(c,b){clearTimeout(this.timer);
@@ -1,23 +1,19 @@
1
1
  window.addEvent('domready', function()
2
2
  {
3
- $$('table').each(function(table)
3
+ $$('table:not(.no_sort)').each(function(table)
4
4
  {
5
5
  new Zen.HtmlTable(table);
6
6
  });
7
7
 
8
- /**
9
- * Create a new instance of the Tabs class. This will create a regular tab
10
- * system for the CSS selector "div.tabs ul".
11
- */
8
+ // Create a new instance of the Tabs class. This will create a regular tab
9
+ // system for the CSS selector "div.tabs ul".
12
10
  if ( $$('div.tabs ul').length > 0 && Zen.Tabs )
13
11
  {
14
12
  new Zen.Tabs('div.tabs ul');
15
13
  }
16
14
 
17
- /**
18
- * Initialize our editor for all elements with a class of "text_editor"
19
- * and retrieve the editor format from the attribute "data-format".
20
- */
15
+ // Initialize our editor for all elements with a class of "text_editor"
16
+ // and retrieve the editor format from the attribute "data-format".
21
17
  $$('.text_editor').each(function(editor)
22
18
  {
23
19
  var markup = editor.get('data-format');
@@ -30,10 +26,8 @@ window.addEvent('domready', function()
30
26
  Zen.Editor.create(markup, editor);
31
27
  });
32
28
 
33
- /**
34
- * Initializes a datepicker object whenever it's loaded and the correct
35
- * element was found.
36
- */
29
+ // Initializes a datepicker object whenever it's loaded and the correct
30
+ // element was found.
37
31
  var date_elements = $$('input[type="text"].date');
38
32
 
39
33
  if ( date_elements.length > 0 )
@@ -42,7 +36,7 @@ window.addEvent('domready', function()
42
36
  {
43
37
  timePicker: true,
44
38
  pickerClass: 'datepicker',
45
- format: '%Y-%m-%d %H:%M:%S'
39
+ format: Zen.date_format
46
40
  });
47
41
  }
48
42
  });
@@ -80,23 +80,15 @@
80
80
  * The key of Zen.Editor.drivers should match the value set in the data-format
81
81
  * attribute, it's value should be the name of the driver's class.
82
82
  *
83
- * @author Yorick Peterse
84
83
  * @since 0.2.6
85
84
  */
86
85
  Zen.Editor = new Class(
87
86
  {
88
87
  Implements: Options,
89
88
 
90
- Depends:
91
- {
92
- stylesheet: ['zen/editor'],
93
- javascript: ['zen/lib/window']
94
- },
95
-
96
89
  /**
97
90
  * Object containing all the default options merged with the custom ones.
98
91
  *
99
- * @author Yorick Peterse
100
92
  * @since 0.2.6
101
93
  * @var {object}
102
94
  */
@@ -118,24 +110,46 @@ Zen.Editor = new Class(
118
110
  * Each callback gets two parameters sent to it: the editor instance and
119
111
  * the object of the button that was clicked.
120
112
  *
121
- * @author Yorick Peterse
122
113
  * @since 0.2.6
123
114
  * @var {array}
124
115
  */
125
116
  buttons:
126
117
  [
127
- {name: 'bold' , label: 'Bold' , onClick: 'bold'},
128
- {name: 'italic' , label: 'Italic' , onClick: 'italic'},
129
- {name: 'link' , label: 'Link' , onClick: 'link'},
130
- {name: 'ul' , label: 'Unordered list', onClick: 'ul'},
131
- {name: 'ol' , label: 'Ordered list' , onClick: 'ol'},
132
- {name: 'preview', label: 'Preview' , onClick: 'preview'}
118
+ {
119
+ name: 'bold',
120
+ label: Zen.translations['zen_general.buttons.bold'],
121
+ onClick: 'bold'
122
+ },
123
+ {
124
+ name: 'italic',
125
+ label: Zen.translations['zen_general.buttons.italic'],
126
+ onClick: 'italic'
127
+ },
128
+ {
129
+ name: 'link',
130
+ label: Zen.translations['zen_general.buttons.link'],
131
+ onClick: 'link'
132
+ },
133
+ {
134
+ name: 'ul',
135
+ label: Zen.translations['zen_general.buttons.ul'],
136
+ onClick: 'ul'
137
+ },
138
+ {
139
+ name: 'ol',
140
+ label: Zen.translations['zen_general.buttons.ol'],
141
+ onClick: 'ol'
142
+ },
143
+ {
144
+ name: 'preview',
145
+ label: Zen.translations['zen_general.buttons.preview'],
146
+ onClick: 'preview'
147
+ }
133
148
  ],
134
149
 
135
150
  /**
136
151
  * The DOM element to use for the editor.
137
152
  *
138
- * @author Yorick Peterse
139
153
  * @since 0.2.6
140
154
  * @var {element}
141
155
  */
@@ -148,7 +162,6 @@ Zen.Editor = new Class(
148
162
  * @example
149
163
  * var editor = new Zen.Editor($('editor'), {markup: 'markdown'});
150
164
  *
151
- * @author Yorick Peterse
152
165
  * @since 0.2.6
153
166
  * @param {object|string} element Either a DOM element or a CSS selector.
154
167
  * If a selector is specified only the first element will be used.
@@ -240,7 +253,6 @@ Zen.Editor = new Class(
240
253
  * Destroys the editor instance. This will remove all HTML and removes the
241
254
  * textarea from Zen.Editor.instances if it has an ID.
242
255
  *
243
- * @author Yorick Peterse
244
256
  * @since 0.2.6
245
257
  */
246
258
  destroy: function()
@@ -267,7 +279,6 @@ Zen.Editor = new Class(
267
279
  /**
268
280
  * Inserts a set of <strong> tags around the cursor.
269
281
  *
270
- * @author Yorick Peterse
271
282
  * @since 0.2.6
272
283
  * @param {element} editor The editor to insert the tags into.
273
284
  */
@@ -279,7 +290,6 @@ Zen.Editor = new Class(
279
290
  /**
280
291
  * Inserts a set of <em> tags around the cursor.
281
292
  *
282
- * @author Yorick Peterse
283
293
  * @since 0.2.6
284
294
  * @param {element} editor The editor to insert the tags into.
285
295
  */
@@ -291,7 +301,6 @@ Zen.Editor = new Class(
291
301
  /**
292
302
  * Asks for a URL and inserts it into the textarea using an <a> tag.
293
303
  *
294
- * @author Yorick Peterse
295
304
  * @since 0.2.6
296
305
  * @param {element} editor The editor to insert the tags into.
297
306
  */
@@ -309,7 +318,6 @@ Zen.Editor = new Class(
309
318
  /**
310
319
  * Inserts a set of <ul> and <li> tags around the cursor.
311
320
  *
312
- * @author Yorick Peterse
313
321
  * @since 0.2.6
314
322
  * @param {element} editor The editor to insert the tags into.
315
323
  */
@@ -325,7 +333,6 @@ Zen.Editor = new Class(
325
333
  /**
326
334
  * Inserts a set of <ol> and <li> tags around the cursor.
327
335
  *
328
- * @author Yorick Peterse
329
336
  * @since 0.2.6
330
337
  * @param {element} editor The editor to insert the tags into.
331
338
  */
@@ -341,7 +348,6 @@ Zen.Editor = new Class(
341
348
  /**
342
349
  * Shows a preview of the content entered in the text area.
343
350
  *
344
- * @author Yorick Peterse
345
351
  * @since 0.2.6
346
352
  * @param {element} editor The editor to render the preview for.
347
353
  */
@@ -360,14 +366,15 @@ Zen.Editor = new Class(
360
366
  new Zen.Window(
361
367
  response,
362
368
  {
363
- title: 'Preview',
364
- width: 700,
365
- move: true,
369
+ title: Zen.translations['zen_general.buttons.preview'],
370
+ width: 700,
366
371
  buttons:
367
372
  [
368
373
  {
369
- name: 'close',
370
- label: 'Close',
374
+ name: 'close',
375
+ label: Zen.translations[
376
+ 'zen_general.buttons.close'
377
+ ],
371
378
  onClick: function(instance)
372
379
  {
373
380
  instance.destroy();
@@ -385,7 +392,6 @@ Zen.Editor = new Class(
385
392
  * Object containing the names of all available drivers and their classes.
386
393
  * Note that these drivers should be declared under the Zen.Editor namespace.
387
394
  *
388
- * @author Yorick Peterse
389
395
  * @since 0.2.6
390
396
  * @var {object}
391
397
  */
@@ -399,7 +405,6 @@ Zen.Editor.drivers = {
399
405
  * Note that the textareas will need an ID in order for them to be added to this
400
406
  * list.
401
407
  *
402
- * @author Yorick Peterse
403
408
  * @since 0.2.6
404
409
  * @var {object}
405
410
  */
@@ -412,7 +417,6 @@ Zen.Editor.instances = {};
412
417
  * @example
413
418
  * var editor = Zen.Editor.create('markdown', $('editor'), {height: 200});
414
419
  *
415
- * @author Yorick Peterse
416
420
  * @since 0.2.6
417
421
  * @see Zen.Editor.initialize
418
422
  * @param {string} driver The name of the driver to use.
@@ -477,7 +481,6 @@ Zen.Editor.create = function(driver, element, options, buttons)
477
481
  * @example
478
482
  * Zen.Editor.getElement($$('.some_class')); # => Element
479
483
  *
480
- * @author Yorick Peterse
481
484
  * @since 0.2.6
482
485
  * @param {string|array|element} The source data from which to extract the
483
486
  * (first) element.