activeldap 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. data/CHANGES +6 -0
  2. data/README +1 -0
  3. data/lib/active_ldap/get_text_support.rb +3 -1
  4. data/lib/active_ldap.rb +1 -1
  5. metadata +5 -321
  6. data/examples/al-admin/README +0 -182
  7. data/examples/al-admin/Rakefile +0 -16
  8. data/examples/al-admin/app/controllers/account_controller.rb +0 -60
  9. data/examples/al-admin/app/controllers/application_controller.rb +0 -46
  10. data/examples/al-admin/app/controllers/attributes_controller.rb +0 -17
  11. data/examples/al-admin/app/controllers/directory_controller.rb +0 -49
  12. data/examples/al-admin/app/controllers/object_classes_controller.rb +0 -17
  13. data/examples/al-admin/app/controllers/syntaxes_controller.rb +0 -17
  14. data/examples/al-admin/app/controllers/users_controller.rb +0 -66
  15. data/examples/al-admin/app/controllers/welcome_controller.rb +0 -12
  16. data/examples/al-admin/app/helpers/account_helper.rb +0 -2
  17. data/examples/al-admin/app/helpers/application_helper.rb +0 -46
  18. data/examples/al-admin/app/helpers/attributes_helper.rb +0 -15
  19. data/examples/al-admin/app/helpers/directory_helper.rb +0 -7
  20. data/examples/al-admin/app/helpers/object_classes_helper.rb +0 -10
  21. data/examples/al-admin/app/helpers/syntaxes_helper.rb +0 -10
  22. data/examples/al-admin/app/helpers/url_helper.rb +0 -17
  23. data/examples/al-admin/app/helpers/users_helper.rb +0 -17
  24. data/examples/al-admin/app/helpers/welcome_helper.rb +0 -2
  25. data/examples/al-admin/app/models/entry.rb +0 -23
  26. data/examples/al-admin/app/models/ldap_user.rb +0 -58
  27. data/examples/al-admin/app/models/user.rb +0 -91
  28. data/examples/al-admin/app/views/_entry/_attributes_information.html.erb +0 -29
  29. data/examples/al-admin/app/views/_entry/_entry.html.erb +0 -15
  30. data/examples/al-admin/app/views/_schema/_aliases.html.erb +0 -7
  31. data/examples/al-admin/app/views/_switcher/_after.html.erb +0 -2
  32. data/examples/al-admin/app/views/_switcher/_before.html.erb +0 -5
  33. data/examples/al-admin/app/views/account/login.html.erb +0 -26
  34. data/examples/al-admin/app/views/account/sign_up.html.erb +0 -29
  35. data/examples/al-admin/app/views/attributes/_attributes.html.erb +0 -19
  36. data/examples/al-admin/app/views/attributes/_detail.html.erb +0 -29
  37. data/examples/al-admin/app/views/attributes/index.html.erb +0 -3
  38. data/examples/al-admin/app/views/attributes/show.html.erb +0 -31
  39. data/examples/al-admin/app/views/directory/_tree.html.erb +0 -10
  40. data/examples/al-admin/app/views/directory/_tree_view_js.html.erb +0 -25
  41. data/examples/al-admin/app/views/directory/index.html.erb +0 -13
  42. data/examples/al-admin/app/views/directory/populate.html.erb +0 -2
  43. data/examples/al-admin/app/views/layouts/_footer.html.erb +0 -11
  44. data/examples/al-admin/app/views/layouts/_header_menu.html.erb +0 -10
  45. data/examples/al-admin/app/views/layouts/_main_menu.html.erb +0 -18
  46. data/examples/al-admin/app/views/layouts/application.html.erb +0 -57
  47. data/examples/al-admin/app/views/object_classes/_attributes.html.erb +0 -28
  48. data/examples/al-admin/app/views/object_classes/_object_classes.html.erb +0 -19
  49. data/examples/al-admin/app/views/object_classes/index.html.erb +0 -3
  50. data/examples/al-admin/app/views/object_classes/show.html.erb +0 -39
  51. data/examples/al-admin/app/views/syntaxes/_detail.html.erb +0 -14
  52. data/examples/al-admin/app/views/syntaxes/_syntaxes.html.erb +0 -19
  53. data/examples/al-admin/app/views/syntaxes/index.html.erb +0 -3
  54. data/examples/al-admin/app/views/syntaxes/show.html.erb +0 -22
  55. data/examples/al-admin/app/views/users/_attributes_update_form.html.erb +0 -42
  56. data/examples/al-admin/app/views/users/_form.html.erb +0 -13
  57. data/examples/al-admin/app/views/users/_object_classes_update_form.html.erb +0 -46
  58. data/examples/al-admin/app/views/users/_password_change_form.html.erb +0 -20
  59. data/examples/al-admin/app/views/users/edit.html.erb +0 -15
  60. data/examples/al-admin/app/views/users/index.html.erb +0 -10
  61. data/examples/al-admin/app/views/users/show.html.erb +0 -11
  62. data/examples/al-admin/app/views/welcome/index.html.erb +0 -13
  63. data/examples/al-admin/config/boot.rb +0 -110
  64. data/examples/al-admin/config/database.yml.example +0 -19
  65. data/examples/al-admin/config/environment.rb +0 -73
  66. data/examples/al-admin/config/environments/development.rb +0 -17
  67. data/examples/al-admin/config/environments/production.rb +0 -24
  68. data/examples/al-admin/config/environments/test.rb +0 -22
  69. data/examples/al-admin/config/initializers/exception_notifier.rb +0 -2
  70. data/examples/al-admin/config/initializers/fast_gettext.rb +0 -3
  71. data/examples/al-admin/config/initializers/inflections.rb +0 -10
  72. data/examples/al-admin/config/initializers/mime_types.rb +0 -5
  73. data/examples/al-admin/config/initializers/session_store.rb +0 -23
  74. data/examples/al-admin/config/ldap.yml.example +0 -21
  75. data/examples/al-admin/config/routes.rb +0 -58
  76. data/examples/al-admin/config/session_secret.txt +0 -1
  77. data/examples/al-admin/config.ru +0 -7
  78. data/examples/al-admin/db/migrate/001_create_users.rb +0 -16
  79. data/examples/al-admin/db/schema.rb +0 -23
  80. data/examples/al-admin/lib/authenticated_system.rb +0 -124
  81. data/examples/al-admin/lib/authenticated_test_helper.rb +0 -113
  82. data/examples/al-admin/lib/ldap_test_helper.rb +0 -38
  83. data/examples/al-admin/lib/tasks/testing.rake +0 -10
  84. data/examples/al-admin/po/en/al-admin.po +0 -343
  85. data/examples/al-admin/po/ja/al-admin.po +0 -343
  86. data/examples/al-admin/po/nl/al-admin.po +0 -380
  87. data/examples/al-admin/public/.htaccess +0 -40
  88. data/examples/al-admin/public/404.html +0 -30
  89. data/examples/al-admin/public/500.html +0 -30
  90. data/examples/al-admin/public/dispatch.cgi +0 -10
  91. data/examples/al-admin/public/dispatch.fcgi +0 -24
  92. data/examples/al-admin/public/dispatch.rb +0 -10
  93. data/examples/al-admin/public/favicon.ico +0 -0
  94. data/examples/al-admin/public/images/active-ldap.svg +0 -6351
  95. data/examples/al-admin/public/images/al-admin.png +0 -0
  96. data/examples/al-admin/public/images/al-admin.svg +0 -6371
  97. data/examples/al-admin/public/images/header-background.png +0 -0
  98. data/examples/al-admin/public/images/header-background.svg +0 -99
  99. data/examples/al-admin/public/images/rails.png +0 -0
  100. data/examples/al-admin/public/images/spinelz/accordion_tab_left_active.gif +0 -0
  101. data/examples/al-admin/public/images/spinelz/accordion_tab_left_inactive.gif +0 -0
  102. data/examples/al-admin/public/images/spinelz/accordion_tab_middle_active.gif +0 -0
  103. data/examples/al-admin/public/images/spinelz/accordion_tab_middle_inactive.gif +0 -0
  104. data/examples/al-admin/public/images/spinelz/accordion_tab_right_active.gif +0 -0
  105. data/examples/al-admin/public/images/spinelz/accordion_tab_right_inactive.gif +0 -0
  106. data/examples/al-admin/public/images/spinelz/balloon_back.gif +0 -0
  107. data/examples/al-admin/public/images/spinelz/balloon_bottom_left.gif +0 -0
  108. data/examples/al-admin/public/images/spinelz/balloon_bottom_middle.gif +0 -0
  109. data/examples/al-admin/public/images/spinelz/balloon_bottom_right.gif +0 -0
  110. data/examples/al-admin/public/images/spinelz/balloon_left_down_arrow.gif +0 -0
  111. data/examples/al-admin/public/images/spinelz/balloon_left_up_arrow.gif +0 -0
  112. data/examples/al-admin/public/images/spinelz/balloon_middle_left.gif +0 -0
  113. data/examples/al-admin/public/images/spinelz/balloon_middle_right.gif +0 -0
  114. data/examples/al-admin/public/images/spinelz/balloon_right_down_arrow.gif +0 -0
  115. data/examples/al-admin/public/images/spinelz/balloon_right_up_arrow.gif +0 -0
  116. data/examples/al-admin/public/images/spinelz/balloon_top_left.gif +0 -0
  117. data/examples/al-admin/public/images/spinelz/balloon_top_middle.gif +0 -0
  118. data/examples/al-admin/public/images/spinelz/balloon_top_right.gif +0 -0
  119. data/examples/al-admin/public/images/spinelz/barchart_h.gif +0 -0
  120. data/examples/al-admin/public/images/spinelz/barchart_v.gif +0 -0
  121. data/examples/al-admin/public/images/spinelz/button.gif +0 -0
  122. data/examples/al-admin/public/images/spinelz/calendar_default_handler.gif +0 -0
  123. data/examples/al-admin/public/images/spinelz/calendar_delete.gif +0 -0
  124. data/examples/al-admin/public/images/spinelz/calendar_next.gif +0 -0
  125. data/examples/al-admin/public/images/spinelz/calendar_next_second.gif +0 -0
  126. data/examples/al-admin/public/images/spinelz/calendar_pre.gif +0 -0
  127. data/examples/al-admin/public/images/spinelz/calendar_pre_second.gif +0 -0
  128. data/examples/al-admin/public/images/spinelz/calendar_private_icon.gif +0 -0
  129. data/examples/al-admin/public/images/spinelz/calendar_schedule.gif +0 -0
  130. data/examples/al-admin/public/images/spinelz/calender_back.gif +0 -0
  131. data/examples/al-admin/public/images/spinelz/calender_back_second.gif +0 -0
  132. data/examples/al-admin/public/images/spinelz/datepicker2_back.gif +0 -0
  133. data/examples/al-admin/public/images/spinelz/datepicker2_back_second.gif +0 -0
  134. data/examples/al-admin/public/images/spinelz/datepicker2_next.gif +0 -0
  135. data/examples/al-admin/public/images/spinelz/datepicker2_next_second.gif +0 -0
  136. data/examples/al-admin/public/images/spinelz/datepicker2_pre.gif +0 -0
  137. data/examples/al-admin/public/images/spinelz/datepicker2_pre_second.gif +0 -0
  138. data/examples/al-admin/public/images/spinelz/datepicker_back.gif +0 -0
  139. data/examples/al-admin/public/images/spinelz/datepicker_back_second.gif +0 -0
  140. data/examples/al-admin/public/images/spinelz/datepicker_next.gif +0 -0
  141. data/examples/al-admin/public/images/spinelz/datepicker_next_second.gif +0 -0
  142. data/examples/al-admin/public/images/spinelz/datepicker_pre.gif +0 -0
  143. data/examples/al-admin/public/images/spinelz/datepicker_pre_second.gif +0 -0
  144. data/examples/al-admin/public/images/spinelz/grid_down.gif +0 -0
  145. data/examples/al-admin/public/images/spinelz/grid_state.gif +0 -0
  146. data/examples/al-admin/public/images/spinelz/grid_up.gif +0 -0
  147. data/examples/al-admin/public/images/spinelz/icon_day.gif +0 -0
  148. data/examples/al-admin/public/images/spinelz/icon_month.gif +0 -0
  149. data/examples/al-admin/public/images/spinelz/icon_week.gif +0 -0
  150. data/examples/al-admin/public/images/spinelz/menubar_back.gif +0 -0
  151. data/examples/al-admin/public/images/spinelz/menubar_subcontents_back.gif +0 -0
  152. data/examples/al-admin/public/images/spinelz/navPanel_tab_left_active.gif +0 -0
  153. data/examples/al-admin/public/images/spinelz/navPanel_tab_left_inactive.gif +0 -0
  154. data/examples/al-admin/public/images/spinelz/navPanel_tab_middle_active.gif +0 -0
  155. data/examples/al-admin/public/images/spinelz/navPanel_tab_middle_inactive.gif +0 -0
  156. data/examples/al-admin/public/images/spinelz/navPanel_tab_right_active.gif +0 -0
  157. data/examples/al-admin/public/images/spinelz/navPanel_tab_right_inactive.gif +0 -0
  158. data/examples/al-admin/public/images/spinelz/select_date.gif +0 -0
  159. data/examples/al-admin/public/images/spinelz/selectabletable_selected.gif +0 -0
  160. data/examples/al-admin/public/images/spinelz/sideBarBox_about.gif +0 -0
  161. data/examples/al-admin/public/images/spinelz/sideBarBox_menu.gif +0 -0
  162. data/examples/al-admin/public/images/spinelz/sideBarBox_sample.gif +0 -0
  163. data/examples/al-admin/public/images/spinelz/sideBarBox_tabBottomActive.gif +0 -0
  164. data/examples/al-admin/public/images/spinelz/sideBarBox_tabBottomInactive.gif +0 -0
  165. data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleActive.gif +0 -0
  166. data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleActive2.gif +0 -0
  167. data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleInactive.gif +0 -0
  168. data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleInactive2.gif +0 -0
  169. data/examples/al-admin/public/images/spinelz/sideBarBox_tabTopActive.gif +0 -0
  170. data/examples/al-admin/public/images/spinelz/sideBarBox_tabTopInactive.gif +0 -0
  171. data/examples/al-admin/public/images/spinelz/sideBarBox_tabbar.gif +0 -0
  172. data/examples/al-admin/public/images/spinelz/sortableTable_down.gif +0 -0
  173. data/examples/al-admin/public/images/spinelz/sortableTable_normal.gif +0 -0
  174. data/examples/al-admin/public/images/spinelz/sortableTable_up.gif +0 -0
  175. data/examples/al-admin/public/images/spinelz/switcher_close.gif +0 -0
  176. data/examples/al-admin/public/images/spinelz/switcher_open.gif +0 -0
  177. data/examples/al-admin/public/images/spinelz/tabBox_close.gif +0 -0
  178. data/examples/al-admin/public/images/spinelz/tabBox_tabLeftActive.gif +0 -0
  179. data/examples/al-admin/public/images/spinelz/tabBox_tabLeftInactive.gif +0 -0
  180. data/examples/al-admin/public/images/spinelz/tabBox_tabMiddleActive.gif +0 -0
  181. data/examples/al-admin/public/images/spinelz/tabBox_tabMiddleInactive.gif +0 -0
  182. data/examples/al-admin/public/images/spinelz/tabBox_tabRightActive.gif +0 -0
  183. data/examples/al-admin/public/images/spinelz/tabBox_tabRightInactive.gif +0 -0
  184. data/examples/al-admin/public/images/spinelz/tab_bar.gif +0 -0
  185. data/examples/al-admin/public/images/spinelz/table_back.gif +0 -0
  186. data/examples/al-admin/public/images/spinelz/timepicker_clock.gif +0 -0
  187. data/examples/al-admin/public/images/spinelz/toolbar_close.gif +0 -0
  188. data/examples/al-admin/public/images/spinelz/toolbar_left.gif +0 -0
  189. data/examples/al-admin/public/images/spinelz/toolbar_max.gif +0 -0
  190. data/examples/al-admin/public/images/spinelz/toolbar_middle.gif +0 -0
  191. data/examples/al-admin/public/images/spinelz/toolbar_min.gif +0 -0
  192. data/examples/al-admin/public/images/spinelz/toolbar_next.gif +0 -0
  193. data/examples/al-admin/public/images/spinelz/toolbar_right.gif +0 -0
  194. data/examples/al-admin/public/images/spinelz/treeview_dir.gif +0 -0
  195. data/examples/al-admin/public/images/spinelz/treeview_file.gif +0 -0
  196. data/examples/al-admin/public/images/spinelz/treeview_group.gif +0 -0
  197. data/examples/al-admin/public/images/spinelz/treeview_group_special.gif +0 -0
  198. data/examples/al-admin/public/images/spinelz/treeview_state.gif +0 -0
  199. data/examples/al-admin/public/images/spinelz/treeview_user.gif +0 -0
  200. data/examples/al-admin/public/images/spinelz/window_bottom_left.gif +0 -0
  201. data/examples/al-admin/public/images/spinelz/window_bottom_middle.gif +0 -0
  202. data/examples/al-admin/public/images/spinelz/window_bottom_right.gif +0 -0
  203. data/examples/al-admin/public/images/spinelz/window_close.gif +0 -0
  204. data/examples/al-admin/public/images/spinelz/window_max.gif +0 -0
  205. data/examples/al-admin/public/images/spinelz/window_middle_left.gif +0 -0
  206. data/examples/al-admin/public/images/spinelz/window_middle_right.gif +0 -0
  207. data/examples/al-admin/public/images/spinelz/window_min.gif +0 -0
  208. data/examples/al-admin/public/images/spinelz/window_top_left.gif +0 -0
  209. data/examples/al-admin/public/images/spinelz/window_top_middle.gif +0 -0
  210. data/examples/al-admin/public/images/spinelz/window_top_right.gif +0 -0
  211. data/examples/al-admin/public/javascripts/application.js +0 -2
  212. data/examples/al-admin/public/javascripts/controls.js +0 -963
  213. data/examples/al-admin/public/javascripts/dragdrop.js +0 -973
  214. data/examples/al-admin/public/javascripts/effects.js +0 -1128
  215. data/examples/al-admin/public/javascripts/prototype.js +0 -4320
  216. data/examples/al-admin/public/javascripts/spinelz/accordion.js +0 -185
  217. data/examples/al-admin/public/javascripts/spinelz/ajaxHistory.js +0 -157
  218. data/examples/al-admin/public/javascripts/spinelz/balloon.js +0 -287
  219. data/examples/al-admin/public/javascripts/spinelz/barchart.js +0 -524
  220. data/examples/al-admin/public/javascripts/spinelz/calendar.js +0 -3012
  221. data/examples/al-admin/public/javascripts/spinelz/colorpicker.js +0 -128
  222. data/examples/al-admin/public/javascripts/spinelz/datepicker.js +0 -438
  223. data/examples/al-admin/public/javascripts/spinelz/grid.js +0 -1391
  224. data/examples/al-admin/public/javascripts/spinelz/grid_resizeEx.js +0 -100
  225. data/examples/al-admin/public/javascripts/spinelz/grid_sortabletableEx.js +0 -129
  226. data/examples/al-admin/public/javascripts/spinelz/inplaceEditorEx.js +0 -148
  227. data/examples/al-admin/public/javascripts/spinelz/menubar.js +0 -232
  228. data/examples/al-admin/public/javascripts/spinelz/navPanel.js +0 -170
  229. data/examples/al-admin/public/javascripts/spinelz/selectableTable.js +0 -433
  230. data/examples/al-admin/public/javascripts/spinelz/sideBarBox.js +0 -282
  231. data/examples/al-admin/public/javascripts/spinelz/sideBarBox_effects.js +0 -83
  232. data/examples/al-admin/public/javascripts/spinelz/sortableTable.js +0 -270
  233. data/examples/al-admin/public/javascripts/spinelz/switcher.js +0 -78
  234. data/examples/al-admin/public/javascripts/spinelz/tabBox.js +0 -469
  235. data/examples/al-admin/public/javascripts/spinelz/timepicker.js +0 -384
  236. data/examples/al-admin/public/javascripts/spinelz/toolbar.js +0 -152
  237. data/examples/al-admin/public/javascripts/spinelz/treeview.js +0 -703
  238. data/examples/al-admin/public/javascripts/spinelz/window.js +0 -641
  239. data/examples/al-admin/public/javascripts/spinelz/window_resizeEx.js +0 -130
  240. data/examples/al-admin/public/javascripts/spinelz_lib/builder.js +0 -131
  241. data/examples/al-admin/public/javascripts/spinelz_lib/controls.js +0 -835
  242. data/examples/al-admin/public/javascripts/spinelz_lib/dragdrop.js +0 -944
  243. data/examples/al-admin/public/javascripts/spinelz_lib/effects.js +0 -1090
  244. data/examples/al-admin/public/javascripts/spinelz_lib/json.js +0 -139
  245. data/examples/al-admin/public/javascripts/spinelz_lib/prototype.js +0 -2515
  246. data/examples/al-admin/public/javascripts/spinelz_lib/resize.js +0 -215
  247. data/examples/al-admin/public/javascripts/spinelz_lib/scriptaculous.js +0 -51
  248. data/examples/al-admin/public/javascripts/spinelz_lib/slider.js +0 -278
  249. data/examples/al-admin/public/javascripts/spinelz_lib/spinelz_util.js +0 -1266
  250. data/examples/al-admin/public/javascripts/spinelz_lib/unittest.js +0 -564
  251. data/examples/al-admin/public/robots.txt +0 -1
  252. data/examples/al-admin/public/stylesheets/account.css +0 -41
  253. data/examples/al-admin/public/stylesheets/attributes.css +0 -1
  254. data/examples/al-admin/public/stylesheets/base.css +0 -104
  255. data/examples/al-admin/public/stylesheets/detail.css +0 -36
  256. data/examples/al-admin/public/stylesheets/directory.css +0 -22
  257. data/examples/al-admin/public/stylesheets/object-classes.css +0 -6
  258. data/examples/al-admin/public/stylesheets/rails.css +0 -35
  259. data/examples/al-admin/public/stylesheets/spinelz/accordion.css +0 -59
  260. data/examples/al-admin/public/stylesheets/spinelz/balloon.css +0 -151
  261. data/examples/al-admin/public/stylesheets/spinelz/calendar.css +0 -564
  262. data/examples/al-admin/public/stylesheets/spinelz/datepicker.css +0 -175
  263. data/examples/al-admin/public/stylesheets/spinelz/grid.css +0 -137
  264. data/examples/al-admin/public/stylesheets/spinelz/menubar.css +0 -78
  265. data/examples/al-admin/public/stylesheets/spinelz/modal.css +0 -22
  266. data/examples/al-admin/public/stylesheets/spinelz/navPanel.css +0 -58
  267. data/examples/al-admin/public/stylesheets/spinelz/selectableTable.css +0 -28
  268. data/examples/al-admin/public/stylesheets/spinelz/sideBarBox.css +0 -82
  269. data/examples/al-admin/public/stylesheets/spinelz/sortableTable.css +0 -51
  270. data/examples/al-admin/public/stylesheets/spinelz/switcher.css +0 -23
  271. data/examples/al-admin/public/stylesheets/spinelz/tabBox.css +0 -94
  272. data/examples/al-admin/public/stylesheets/spinelz/timepicker.css +0 -508
  273. data/examples/al-admin/public/stylesheets/spinelz/toolbar.css +0 -82
  274. data/examples/al-admin/public/stylesheets/spinelz/treeview.css +0 -121
  275. data/examples/al-admin/public/stylesheets/spinelz/window.css +0 -140
  276. data/examples/al-admin/public/stylesheets/structure.css +0 -81
  277. data/examples/al-admin/public/stylesheets/syntaxes.css +0 -1
  278. data/examples/al-admin/public/stylesheets/users.css +0 -13
  279. data/examples/al-admin/public/stylesheets/welcome.css +0 -0
  280. data/examples/al-admin/script/about +0 -3
  281. data/examples/al-admin/script/console +0 -3
  282. data/examples/al-admin/script/dbconsole +0 -3
  283. data/examples/al-admin/script/destroy +0 -3
  284. data/examples/al-admin/script/generate +0 -3
  285. data/examples/al-admin/script/performance/benchmarker +0 -3
  286. data/examples/al-admin/script/performance/profiler +0 -3
  287. data/examples/al-admin/script/performance/request +0 -3
  288. data/examples/al-admin/script/plugin +0 -3
  289. data/examples/al-admin/script/process/inspector +0 -3
  290. data/examples/al-admin/script/process/reaper +0 -3
  291. data/examples/al-admin/script/process/spawner +0 -3
  292. data/examples/al-admin/script/runner +0 -3
  293. data/examples/al-admin/script/server +0 -3
  294. data/examples/al-admin/test/fixtures/users.yml +0 -9
  295. data/examples/al-admin/test/functional/account_controller_test.rb +0 -12
  296. data/examples/al-admin/test/functional/attributes_controller_test.rb +0 -8
  297. data/examples/al-admin/test/functional/directory_controller_test.rb +0 -8
  298. data/examples/al-admin/test/functional/object_classes_controller_test.rb +0 -8
  299. data/examples/al-admin/test/functional/syntaxes_controller_test.rb +0 -8
  300. data/examples/al-admin/test/functional/users_controller_test.rb +0 -8
  301. data/examples/al-admin/test/functional/welcome_controller_test.rb +0 -8
  302. data/examples/al-admin/test/integration/sign_up_test.rb +0 -44
  303. data/examples/al-admin/test/run-test.sh +0 -3
  304. data/examples/al-admin/test/test_helper.rb +0 -52
  305. data/examples/al-admin/test/unit/user_test.rb +0 -12
  306. data/examples/al-admin/vendor/plugins/exception_notification/README +0 -111
  307. data/examples/al-admin/vendor/plugins/exception_notification/init.rb +0 -1
  308. data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifiable.rb +0 -99
  309. data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifier.rb +0 -66
  310. data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifier_helper.rb +0 -78
  311. data/examples/al-admin/vendor/plugins/exception_notification/test/exception_notifier_helper_test.rb +0 -61
  312. data/examples/al-admin/vendor/plugins/exception_notification/test/test_helper.rb +0 -7
  313. data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_backtrace.rhtml +0 -1
  314. data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_environment.rhtml +0 -7
  315. data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_inspect_model.rhtml +0 -16
  316. data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_request.rhtml +0 -4
  317. data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_session.rhtml +0 -2
  318. data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_title.rhtml +0 -3
  319. data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/exception_notification.rhtml +0 -6
@@ -1,282 +0,0 @@
1
- // Copyright (c) 2005 spinelz.org (http://script.spinelz.org/)
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining
4
- // a copy of this software and associated documentation files (the
5
- // "Software"), to deal in the Software without restriction, including
6
- // without limitation the rights to use, copy, modify, merge, publish,
7
- // distribute, sublicense, and/or sell copies of the Software, and to
8
- // permit persons to whom the Software is furnished to do so, subject to
9
- // the following conditions:
10
- //
11
- // The above copyright notice and this permission notice shall be
12
- // included in all copies or substantial portions of the Software.
13
- //
14
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
-
22
-
23
- SideBarBox = Class.create();
24
-
25
- SideBarBox.className = {
26
- panelContainer: 'sideBarBox_panelContainer',
27
- tabContainer: 'sideBarBox_tabContainer',
28
- title: 'sideBarBox_tabTitle',
29
- tab: 'sideBarBox_tab',
30
- tabTopInactive: 'sideBarBox_tabTopInactive',
31
- tabTopActive: 'sideBarBox_tabTopActive',
32
- tabMiddleInactive: 'sideBarBox_tabMiddleInactive',
33
- tabMiddleActive: 'sideBarBox_tabMiddleActive',
34
- tabBottomInactive: 'sideBarBox_tabBottomInactive',
35
- tabBottomActive: 'sideBarBox_tabBottomActive'
36
- }
37
-
38
- SideBarBox.prototype = {
39
-
40
- initialize: function(element) {
41
- var options = Object.extend({
42
- selected: 1,
43
- beforeSelect: function() {return true},
44
- afterSelect: Prototype.emptyFunction,
45
- visible: false,
46
- close: true,
47
- cssPrefix: 'custom_',
48
- build: true
49
- }, arguments[1] || {});
50
-
51
- this.options = options;
52
- this.element = $(element);
53
- if (this.options.build) Element.setStyle(this.element, {visibility: 'hidden'});
54
-
55
- this.css = CssUtil.getInstance(this.options.cssPrefix, SideBarBox.className);
56
- this.classNames = this.css.allJoinClassNames();
57
-
58
- this.start();
59
- Element.setStyle(this.element, {visibility: 'visible'});
60
- },
61
-
62
- start: function() {
63
- this.tabs = [];
64
- this.panelContents = [];
65
- this.tabSets = [];
66
-
67
- this.visible = this.options.visible;
68
- this.selected = (this.options.selected > 0) ? this.options.selected - 1 : 0 ;
69
- this.selected = (this.visible) ? this.selected : -1;
70
-
71
- this.tabId = this.element.id + '_tab';
72
- this.tabTopId = this.tabId + '_top';
73
- this.tabMiddleId = this.tabId + '_middle';
74
- this.tabBottomId = this.tabId + '_bottom';
75
- this.tabContainerId = this.element.id + '_tabContainer';
76
- this.panelId = this.element.id + '_panel';
77
- this.panelContainerId = this.element.id + '_panelContainer';
78
-
79
- this.ids = [];
80
- this.holder = [];
81
- if (this.options.build) this.buildTabBox();
82
-
83
- this.tabContainer = $(this.tabContainerId);
84
- this.panelContainer = $(this.panelContainerId);
85
- this.tabs = this.tabs.collect(function(tab) { return $(tab); });
86
- this.panelContents = this.panelContents.collect(function(panel) { return $(panel); });
87
-
88
- if (this.options.build) {
89
- this.selectTab();
90
- this.setEvent();
91
- this.appendElements();
92
- }
93
- },
94
-
95
- setEvent: function() {
96
- this.ids.each(function(tab) {
97
- Event.observe(tab, 'click', this.selectTab.bindAsEventListener(this));
98
- }.bind(this));
99
- },
100
-
101
- appendElements: function() {
102
- this.holder.each(function(set) {
103
- $(this.tabMiddleId + set.number).appendChild(set.tab);
104
- this.panelContents[set.number].appendChild(set.content);
105
- }.bind(this));
106
- },
107
-
108
- buildTabBox: function() {
109
- var tabContainer =
110
- "<div id='" + this.tabContainerId + "' class='" + this.classNames['tabContainer'] + "'>";
111
- var panelContainer =
112
- "<div id='" + this.panelContainerId + "' class='" + this.classNames['panelContainer'] + "'>";
113
-
114
- var tabSetCount = 0;
115
- $A(this.element.childNodes).each(function(node) {
116
- if (Element.isElementNode(node)) {
117
- var tabSet = this.buildTabSet(node, tabSetCount);
118
- tabContainer += tabSet.tab;
119
- panelContainer += tabSet.panel;
120
- tabSetCount++;
121
- }
122
- }.bind(this));
123
-
124
- tabContainer += "</div>";
125
- panelContainer += "</div>";
126
- this.addContainers(panelContainer, tabContainer);
127
- },
128
-
129
- addContainers : function(panelContainer, tabContainer) {
130
- this.element.innerHTML = panelContainer + tabContainer + "<div style='clear: left'></div>";
131
- },
132
-
133
- buildTabSet: function(element, i) {
134
- var nodes = Element.getChildNodesWithoutWhitespace(element);
135
- this.holdElements(nodes[0], nodes[1], i);
136
- return {
137
- tab: this.buildTab(nodes[0], i),
138
- panel: this.buildPanel(nodes[1], i)
139
- }
140
- },
141
-
142
- buildTab: function(tab, i) {
143
- var tabId = this.tabId + i;
144
- this.ids.push(tabId);
145
- this.tabs[i] = tabId;
146
-
147
- var title = tab.title;
148
- title = title ? " title='" + title + "'" : '';
149
-
150
- var html =
151
- "<div id='" + tabId + "' class='" + this.classNames['tab'] + "'" + title + ">" +
152
- "<div id='" + this.tabTopId + i + "' class='" + this.classNames['tabTopInactive'] + "'></div>" +
153
- "<div id='" + this.tabMiddleId + i + "' class='" + this.classNames['tabMiddleInactive'] + "'>" +
154
- "</div>" +
155
- "<div id='" + this.tabBottomId + i + "' class='" + this.classNames['tabBottomInactive'] + "'></div>" +
156
- "</div>";
157
- return html;
158
- },
159
-
160
- buildPanel: function(panelContent, i) {
161
- var id = this.panelId + i;
162
- this.panelContents[i] = id;
163
- return "<div id='" + id + "' style='display: none;'></div>";
164
- },
165
-
166
- holdElements: function(tab, content, number) {
167
- this.holder.push({number: number, tab: tab, content: content});
168
- var tmpParent = document.createDocumentFragment();
169
- tmpParent.appendChild(tab);
170
- tmpParent.appendChild(content);
171
- },
172
-
173
- selectTab: function(e) {
174
- if (!this.options.beforeSelect()) return;
175
- if (!e) {
176
- this.setTabActive(this.tabs[this.selected]);
177
- Element.show(this.panelContents[this.selected]);
178
- return;
179
- }
180
-
181
- var currentPanel = this.panelContents[this.selected];
182
- var currentTab = this.tabs[this.selected];
183
-
184
- var targetElement = null;
185
- if (e.nodeType) {
186
- targetElement = e;
187
- } else {
188
- targetElement = Event.element(e);
189
- }
190
- var targetIndex = this.getTargetIndex(targetElement);
191
- var targetPanel = this.panelContents[targetIndex];
192
- var targetTab = this.tabs[targetIndex];
193
- if (this.visible) {
194
- if (targetTab.id == currentTab.id) {
195
- if (this.options.close) {
196
- Effect.SlideRightOutOfView(this.panelContainer);
197
- this.visible = false;
198
- this.selected = -1;
199
- this.setTabInactive(currentTab);
200
- Element.toggle(targetPanel);
201
- }
202
- } else {
203
- this.setTabActive(targetTab);
204
- this.setTabInactive(currentTab);
205
- Element.toggle(currentPanel);
206
- Element.toggle(targetPanel);
207
- this.selected = targetIndex;
208
- }
209
- } else {
210
- this.setTabActive(targetTab);
211
- Element.toggle(targetPanel);
212
- Effect.SlideRightIntoView(this.panelContainer);
213
- this.visible = true;
214
- this.selected = targetIndex;
215
- }
216
- this.options.afterSelect(targetPanel, currentPanel);
217
- },
218
-
219
- setTabActive: function(tab) {
220
- var tabChildren = Element.getTagNodes(tab);
221
- this.css.refreshClassNames(tabChildren[0], 'tabTopActive');
222
- this.css.refreshClassNames(tabChildren[1], 'tabMiddleActive');
223
- this.css.refreshClassNames(tabChildren[2], 'tabBottomActive');
224
- },
225
-
226
- setTabInactive: function(tab) {
227
- var tabChildren = Element.getTagNodes(tab);
228
- this.css.refreshClassNames(tabChildren[0], 'tabTopInactive');
229
- this.css.refreshClassNames(tabChildren[1], 'tabMiddleInactive');
230
- this.css.refreshClassNames(tabChildren[2], 'tabBottomInactive');
231
- },
232
-
233
- getTargetIndex: function(element) {
234
- while(element) {
235
- if (element.id && element.id.indexOf(this.tabId, 0) >= 0) {
236
- var index = element.id.substring(this.tabId.length);
237
- if (!isNaN(index)) {
238
- return index;
239
- }
240
- }
241
- element = element.parentNode;
242
- }
243
- },
244
-
245
- hasNextTab: function() {
246
- return this.getNextTab() ? true : false;
247
- },
248
-
249
- hasPreviousTab: function() {
250
- return this.getPreviousTab() ? true : false;
251
- },
252
-
253
- getNextTab: function() {
254
- return Element.next(this.getCurrentTab());
255
- },
256
-
257
- getPreviousTab: function() {
258
- return Element.previous(this.getCurrentTab());
259
- },
260
-
261
- selectNextTab: function() {
262
- this.selectTab(this.getNextTab());
263
- },
264
-
265
- selectPreviousTab: function() {
266
- this.selectTab(this.getPreviousTab());
267
- },
268
-
269
- tabCount: function() {
270
- return this.tabs.inject(0, function(i, t) {
271
- return t ? ++i : i;
272
- })
273
- },
274
-
275
- getCurrentPanel: function() {
276
- return this.panelContents[this.selected];
277
- },
278
-
279
- getCurrentTab: function() {
280
- return this.tabs[this.selected];
281
- }
282
- }
@@ -1,83 +0,0 @@
1
- // Copyright (c) 2005 spinelz.org (http://script.spinelz.org/)
2
- //
3
- // This code is substantially based on code from script.aculo.us which has the
4
- // following copyright and permission notice
5
- //
6
- // Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
7
- //
8
- // Permission is hereby granted, free of charge, to any person obtaining
9
- // a copy of this software and associated documentation files (the
10
- // "Software"), to deal in the Software without restriction, including
11
- // without limitation the rights to use, copy, modify, merge, publish,
12
- // distribute, sublicense, and/or sell copies of the Software, and to
13
- // permit persons to whom the Software is furnished to do so, subject to
14
- // the following conditions:
15
- //
16
- // The above copyright notice and this permission notice shall be
17
- // included in all copies or substantial portions of the Software.
18
- //
19
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
- // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
- // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23
- // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24
- // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25
- // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
-
27
- Effect.SlideRightIntoView = function(element) {
28
- element = $(element);
29
- Element.cleanWhitespace(element);
30
-
31
- var oldInnerRight = element.firstChild.style.right;
32
- var elementDimensions = Element.getDimensions(element);
33
- return new Effect.Scale(element, 100,
34
- Object.extend({ scaleContent: false,
35
- scaleY: false,
36
- scaleFrom: 0,
37
- scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
38
- restoreAfterFinish: true,
39
- afterSetup: function(effect) {
40
- Element.makePositioned(effect.element.firstChild);
41
- if (window.opera) effect.element.firstChild.style.left = "";
42
- Element.makeClipping(effect.element);
43
- element.style.width = '0';
44
- Element.show(element);
45
- },
46
- afterUpdateInternal: function(effect) {
47
- effect.element.firstChild.style.right =
48
- (effect.dims[1] - effect.element.clientWidth) + 'px'; },
49
- afterFinishInternal: function(effect) {
50
- Element.undoClipping(effect.element);
51
- Element.undoPositioned(effect.element.firstChild);
52
- effect.element.firstChild.style.right = oldInnerRight; }
53
- }, arguments[1] || {})
54
- );
55
- }
56
-
57
- Effect.SlideRightOutOfView = function(element) {
58
- element = $(element);
59
- Element.cleanWhitespace(element);
60
- var oldInnerRight = element.firstChild.style.right;
61
- return new Effect.Scale(element, 0,
62
- Object.extend({ scaleContent: false,
63
- scaleY: false,
64
- scaleMode: 'box',
65
- scaleFrom: 100,
66
- restoreAfterFinish: true,
67
- beforeStartInternal: function(effect) {
68
- Element.makePositioned(effect.element.firstChild);
69
- if (window.opera) effect.element.firstChild.style.left = "";
70
- Element.makeClipping(effect.element);
71
- Element.show(element);
72
- },
73
- afterUpdateInternal: function(effect) {
74
- effect.element.firstChild.style.right =
75
- (effect.dims[1] - effect.element.clientWidth) + 'px'; },
76
- afterFinishInternal: function(effect) {
77
- Element.hide(effect.element);
78
- Element.undoClipping(effect.element);
79
- Element.undoPositioned(effect.element.firstChild);
80
- effect.element.firstChild.style.right = oldInnerRight; }
81
- }, arguments[1] || {})
82
- );
83
- }
@@ -1,270 +0,0 @@
1
- // Copyright (c) 2005 spinelz.org (http://script.spinelz.org/)
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining
4
- // a copy of this software and associated documentation files (the
5
- // "Software"), to deal in the Software without restriction, including
6
- // without limitation the rights to use, copy, modify, merge, publish,
7
- // distribute, sublicense, and/or sell copies of the Software, and to
8
- // permit persons to whom the Software is furnished to do so, subject to
9
- // the following conditions:
10
- //
11
- // The above copyright notice and this permission notice shall be
12
- // included in all copies or substantial portions of the Software.
13
- //
14
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
-
22
- var SortableTable = Class.create();
23
-
24
- SortableTable.classNames = {
25
- header: 'sortableTable_header',
26
- title: 'sortableTable_title',
27
- empty: 'sortableTable_empty',
28
- down: 'sortableTable_down',
29
- up: 'sortableTable_up',
30
- mark: 'sortableTable_mark',
31
- thead: 'sortableTable_thead',
32
- tbody: 'sortableTable_tbody'
33
- }
34
-
35
- SortableTable.prototype = {
36
-
37
- initialize: function(element) {
38
- this.element = $(element);
39
- Element.setStyle(this.element, {visibility: 'hidden'});
40
-
41
- var options = Object.extend({
42
- sortType: false,
43
- cssPrefix: 'custom_'
44
- }, arguments[1] || {});
45
-
46
- var customCss = CssUtil.appendPrefix(options.cssPrefix, SortableTable.classNames);
47
- this.classNames = new CssUtil([SortableTable.classNames, customCss]);
48
-
49
- this.sortType = options.sortType;
50
-
51
- this.currentOrder = 'default';
52
- this.defaultOrder = new Array();
53
- for (var i = 1; i < this.element.rows.length; i++) {
54
- this.defaultOrder[i - 1] = this.element.rows[i];
55
- }
56
-
57
- this.build();
58
- Element.setStyle(this.element, {visibility: 'visible'});
59
- },
60
-
61
- build: function() {
62
- thead = this.element.tHead;
63
- this.classNames.addClassNames(thead, 'thead');
64
- tbody = thead.nextSibling;
65
- while ((tbody.nodeType != 1) || (tbody.tagName.toLowerCase() != 'tbody')) {
66
- tbody = tbody.nextSibling;
67
- }
68
- this.classNames.addClassNames(tbody, 'tbody');
69
- var rows = this.element.rows[0];
70
- if (!rows) return;
71
-
72
- for (var i = 0; i < rows.cells.length; i++) {
73
-
74
- var cell = rows.cells[i];
75
- cell.style.cursor = 'pointer';
76
-
77
- Element.cleanWhitespace(cell);
78
- var title = Builder.node('DIV', $A(cell.childNodes));
79
- this.classNames.addClassNames(title, 'title');
80
-
81
- var img = Builder.node('DIV');
82
- this.classNames.addClassNames(img, 'mark');
83
- this.classNames.addClassNames(img, 'empty');
84
-
85
- var header = Builder.node('DIV', [title, img]);
86
- this.classNames.addClassNames(header, 'header');
87
- cell.appendChild(header);
88
-
89
- var titleWidth = title.offsetWidth;
90
- var imgWidth = img.offsetWidth;
91
-
92
- title.style.width = (titleWidth + imgWidth) + 'px';
93
- Event.observe(rows.cells[i], 'click', this.sortTable.bindAsEventListener(this));
94
- }
95
- },
96
-
97
- sortTable: function(event) {
98
- var cell = Event.element(event);
99
-
100
- if (cell.tagName.toUpperCase() != 'TD' && cell.tagName.toUpperCase() != 'TH') {
101
- cell = Element.getParentByTagName(['TD','TH'], cell);
102
- }
103
-
104
- var tmpColumn = cell.cellIndex;
105
- if (this.targetColumn != tmpColumn) {
106
- this.currentOrder = 'default';
107
- }
108
- this.targetColumn = tmpColumn;
109
-
110
- var newRows = new Array();
111
- for (var i = 1; i < this.element.rows.length; i++) {
112
- newRows[i - 1] = this.element.rows[i];
113
- }
114
- if (newRows.length < 1) return;
115
-
116
- if (this.currentOrder == 'default') {
117
- newRows.sort(this.getSortFunc());
118
- this.currentOrder = 'asc';
119
- } else if (this.currentOrder == 'asc') {
120
- newRows = newRows.reverse();
121
- this.currentOrder = 'desc';
122
- } else if (this.currentOrder == 'desc') {
123
- newRows = this.defaultOrder;
124
- this.currentOrder = 'default';
125
- }
126
-
127
- for (var i = 0; i < newRows.length; i++) {
128
- this.element.tBodies[0].appendChild(newRows[i]);
129
- }
130
-
131
- this.mark(cell);
132
- },
133
-
134
- mark: function(cell) {
135
- var images = document.getElementsByClassName(SortableTable.classNames.mark, this.element);
136
- var targetImg = document.getElementsByClassName(SortableTable.classNames.mark, cell)[0];
137
-
138
- for (var i = 0; i < images.length; i++) {
139
- var parent = images[i].parentNode;
140
- var title = document.getElementsByClassName(SortableTable.classNames.title, parent)[0];
141
- var titleWidth = title.offsetWidth;
142
-
143
- if (targetImg == images[i]) {
144
-
145
- var imgWidth = targetImg.offsetWidth;
146
-
147
- if (this.currentOrder == 'asc') {
148
- this.classNames.addClassNames(targetImg, 'down');
149
- this.classNames.removeClassNames(targetImg, 'empty');
150
- if (!document.all) title.style.width = (titleWidth - imgWidth) + 'px';
151
-
152
- } else if (this.currentOrder == 'desc') {
153
- this.classNames.addClassNames(targetImg, 'up');
154
- this.classNames.removeClassNames(targetImg, 'down');
155
-
156
- } else if (this.currentOrder == 'default') {
157
- this.classNames.addClassNames(targetImg, 'empty');
158
- this.classNames.removeClassNames(targetImg, 'up');
159
- if (!document.all) title.style.width = (titleWidth + imgWidth) + 'px';
160
- }
161
-
162
- } else {
163
-
164
- if (Element.hasClassName(images[i], SortableTable.classNames.empty))
165
- continue;
166
-
167
- else if (Element.hasClassName(images[i], SortableTable.classNames.down))
168
- this.classNames.removeClassNames(images[i], 'down');
169
-
170
- else if (Element.hasClassName(images[i], SortableTable.classNames.up))
171
- this.classNames.removeClassNames(images[i], 'up');
172
-
173
- var imgWidth = targetImg.offsetWidth;
174
- this.classNames.addClassNames(images[i], 'empty');
175
- if (!document.all) title.style.width = (titleWidth + imgWidth) + 'px';
176
- }
177
- }
178
- },
179
-
180
- getSortFunc: function() {
181
- if (!this.sortType || !this.sortType[this.targetColumn])
182
- return SortFunction.string(this);
183
-
184
- var type = this.getSortType();
185
-
186
- if (!this.sortType || !type) {
187
- return SortFunction.string(this);
188
- } else if (type == SortFunction.numeric) {
189
- return SortFunction.number(this);
190
- }
191
-
192
- return SortFunction.date(this);
193
- },
194
-
195
- getSortType: function() {
196
- return this.sortType[this.targetColumn];
197
- }
198
- }
199
-
200
- var SortFunction = Class.create();
201
- SortFunction = {
202
- string: 'string',
203
- numeric: 'numeric',
204
- mmddyyyy: 'mmddyyyy',
205
- mmddyy: 'mmddyy',
206
- yyyymmdd: 'yyyymmdd',
207
- yymmdd: 'yymmdd',
208
- ddmmyyyy: 'ddmmyyyy',
209
- ddmmyy: 'ddmmyy',
210
-
211
- date: function(grid) {
212
- return function(fst, snd) {
213
- var aValue = Element.collectTextNodes(fst.cells[grid.targetColumn]);
214
- var bValue = Element.collectTextNodes(snd.cells[grid.targetColumn]);
215
- var date1, date2;
216
-
217
- var date1 = SortFunction.getDateString(aValue, grid.getSortType());
218
- var date2 = SortFunction.getDateString(bValue, grid.getSortType());
219
-
220
- if (date1 == date2) return 0;
221
- if (date1 < date2) return -1;
222
-
223
- return 1;
224
- }
225
- },
226
-
227
- number: function(grid) {
228
- return function(fst, snd) {
229
- var aValue = parseFloat(Element.collectTextNodes(fst.cells[grid.targetColumn]));
230
- if (isNaN(aValue)) aValue = 0;
231
- var bValue = parseFloat(Element.collectTextNodes(snd.cells[grid.targetColumn]));
232
- if (isNaN(bValue)) bValue = 0;
233
-
234
- return aValue - bValue;
235
- }
236
- },
237
-
238
- string: function(grid) {
239
- return function(fst, snd) {
240
- var aValue = Element.collectTextNodes(fst.cells[grid.targetColumn]);
241
- var bValue = Element.collectTextNodes(snd.cells[grid.targetColumn]);
242
- if (aValue == bValue) return 0;
243
- if (aValue < bValue) return -1;
244
- return 1;
245
- }
246
- },
247
-
248
- getDateString: function(date, type) {
249
- var array = date.split('/');
250
-
251
- if ((type == SortFunction.mmddyyyy) ||
252
- (type == SortFunction.mmddyy)) {
253
- var newArray = new Array();
254
- newArray.push(array[2]);
255
- newArray.push(array[0]);
256
- newArray.push(array[1]);
257
- } else if ((type == SortFunction.ddmmyyyy) ||
258
- (type == SortFunction.ddmmyy)) {
259
- var newArray = new Array();
260
- newArray.push(array[2]);
261
- newArray.push(array[1]);
262
- newArray.push(array[0]);
263
- } else {
264
- newArray = array;
265
- }
266
-
267
- return newArray.join();
268
- }
269
- }
270
-