activeldap 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
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,703 +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 TreeView = Class.create();
23
- TreeView.className = {
24
- top: 'treeview',
25
- dir: 'treeview_dir',
26
- dirBody: 'treeview_dirBody',
27
- dirBodyText: 'treeview_dirBodyText',
28
- dirBodyTextActive: 'treeview_dirBodyTextActive',
29
- dirContainer: 'treeview_dirContainer',
30
- dirContainerHover: 'treeview_dirContainerHover',
31
- file: 'treeview_file',
32
- fileBody: 'treeview_fileBody',
33
- fileBodyText: 'treeview_fileBodyText',
34
- fileBodyTextActive: 'treeview_fileBodyTextActive',
35
- state_open: 'treeview_stateOpen',
36
- state_close: 'treeview_stateClose',
37
- state_empty: 'treeview_stateEmpty',
38
- dirIcon: 'treeview_dirIcon',
39
- fileIcon: 'treeview_fileIcon',
40
- handle: 'treeview_handle'
41
- }
42
-
43
- TreeView.iconId = 'treeview_icon';
44
-
45
- TreeView.prototype = {
46
- initialize: function(element) {
47
- this.options = Object.extend({
48
- dirSymbol: 'dir',
49
- fileSymbol: 'file',
50
- cssPrefix: 'custom_',
51
- open: true,
52
- callBackFunctions: false,
53
- dirSelect: true,
54
- fileSelect: true,
55
- noSelectedInsert: true,
56
- iconIdPrefix: TreeView.iconId,
57
- move: false,
58
- unselected: Prototype.emptyFunction,
59
- enableUnselected: true,
60
- sortOptions: {},
61
- openDir: Prototype.emptyFunction,
62
- closeDir: Prototype.emptyFunction,
63
- emptyImg: false,
64
- initialSelected: null,
65
- build: true
66
- }, arguments[1] || {});
67
-
68
- this.element = $(element);
69
- this.customCss = CssUtil.appendPrefix(this.options.cssPrefix, TreeView.className);
70
- this.classNames = new CssUtil([TreeView.className, this.customCss]);
71
-
72
- if (this.options.build) {
73
- Element.setStyle(this.element, {visibility: 'hidden'});
74
- Element.hide(this.element);
75
-
76
- this.idCount = 0;
77
- this.fileIds = [];
78
- this.dirIds = [];
79
- this.buildTreeView(this.element);
80
- this.observeEvent();
81
-
82
- this.classNames.addClassNames(this.element, 'top');
83
- Element.setStyle(this.element, {visibility: 'visible'});
84
- Element.show(this.element);
85
-
86
- if (this.options.initialSelected) {
87
- this.selectEffect(this.options.initialSelected);
88
- }
89
-
90
- if (this.options.move) this.setSortable();
91
- }
92
- },
93
-
94
- open: function(element) {
95
- this._toggle(element, Element.show);
96
- },
97
-
98
- openAll: function() {
99
- var nodes = this.element.getElementsByTagName('ul');
100
- $A(nodes).each(function(node) {
101
- Element.show(node);
102
- this.refreshStateImg(node.parentNode);
103
- }.bind(this));
104
- },
105
-
106
- close: function(element) {
107
- this._toggle(element, Element.hide);
108
- },
109
-
110
- closeAll: function() {
111
- var nodes = this.element.getElementsByTagName('ul');
112
- $A(nodes).each(function(node) {
113
- Element.hide(node);
114
- this.refreshStateImg(node.parentNode);
115
- }.bind(this));
116
- },
117
-
118
- addChildById: function(element, parent, number) {
119
- this.fileIds = [];
120
- this.dirIds = [];
121
- element = $(element);
122
- parent = $(parent);
123
-
124
- var container = null;
125
- if (!element || !parent)
126
- return;
127
- else if (Element.hasClassName(parent, TreeView.className.dir))
128
- container = this.getChildDirContainer(parent);
129
- else if (Element.hasClassName(parent, TreeView.className.top))
130
- container = parent;
131
- else
132
- return;
133
-
134
- element = this.build(element).toElement();
135
- if (isNaN(number)) {
136
- container.appendChild(element);
137
- } else {
138
- var children = this.getDirectoryContents(container);
139
- if (children[number]) container.insertBefore(element, children[number]);
140
- else container.appendChild(element);
141
- }
142
-
143
- this.refreshStateImg(parent);
144
- this.observeEvent();
145
- if (this.options.dragAdrop) this.setSortable();
146
- },
147
-
148
- addChildByPath: function(element, path) {
149
- this.fileIds = [];
150
- this.dirIds = [];
151
- element = $(element);
152
- if (!element) return;
153
-
154
- element = this.build(element).toElement();
155
- var paths = path.split('/').findAll(function(elm) { return (elm != '') });
156
- var last = paths.pop();
157
- var container = this.search(paths.join('/'));
158
- var children = this.getDirectoryContents(container);
159
-
160
- if(children[last])
161
- container.insertBefore(element, children[last]);
162
- else
163
- container.appendChild(element);
164
-
165
- this.refreshStateImg(container.parentNode);
166
- this.observeEvent();
167
- if (this.options.dragAdrop) this.setSortable();
168
- },
169
-
170
- addChildBySelected: function(element, number) {
171
- if (!this.selected && !this.options.noSelectedInsert) return;
172
-
173
- if (this.selected)
174
- this.addChildById(element, this.selected, number);
175
- else
176
- this.addChildById(element, this.element, number);
177
- },
178
-
179
- addSelectItemCallback: function(functionObj) {
180
- if (!this.options.callBackFunctions) {
181
- this.options.callBackFunctions = new Array();
182
- }
183
- this.options.callBackFunctions.push(functionObj);
184
- },
185
-
186
- buildTreeView: function(element) {
187
- this.classNames.addClassNames(element, 'top');
188
- element.innerHTML = $A(element.childNodes).inject('', function(html, node) {
189
- return html + this.build(node);
190
- }.bind(this));
191
- },
192
-
193
- build: function(element) {
194
- if (!Element.isElementNode(element)) return '';
195
-
196
- if (Element.hasClassName(element, this.options.dirSymbol)) {
197
- return this.buildDir(element);
198
- } else if (Element.hasClassName(element, this.options.fileSymbol)) {
199
- return this.buildFile(element);
200
- }
201
- },
202
-
203
- buildDir: function(element) {
204
- var customClass = new Element.ClassNames(element).select(function(name) {
205
- return name != this.options.dirSymbol;
206
- }.bind(this)).join(' ');
207
-
208
- var baseId = element.id || this.getBaseId();
209
- var state = this.getState(element);
210
- var iconId = this.options.iconIdPrefix.appendSuffix(baseId);
211
- var stateId = iconId.appendSuffix('stateImg');
212
- var bodyTextId = iconId.appendSuffix('dirBodyText');
213
- var iconClass = [
214
- this.classNames.joinClassNames('dirIcon'),
215
- customClass,
216
- this.classNames.joinClassNames('handle')
217
- ];
218
- var display = (this.options.open) ? 'block' : 'none';
219
- this.dirIds.push({state: stateId, icon: iconId, bodyText: bodyTextId});
220
-
221
- var html =
222
- "<li id='" + baseId + "' class='" + this.classNames.joinClassNames('dir') + "'>" +
223
- "<div class='" + this.classNames.joinClassNames('dirBody') + "'>" +
224
- "<div id='" + stateId + "' class='" + this.classNames.joinClassNames(state) + "'></div>" +
225
- "<div id='" + iconId + "' class='" + iconClass.join(' ') + "'></div>" +
226
- "<span id='" + bodyTextId + "'class='" + this.classNames.joinClassNames('dirBodyText') + "'>" +
227
- this.getDirectoryText(element) +
228
- "</span>" +
229
- "</div>" +
230
- "<ul style='display: " + display + "' class='" + this.classNames.joinClassNames('dirContainer') + "'>" +
231
- this.buildSubContent(element) +
232
- "</ul>" +
233
- "</li>";
234
- return html;
235
- },
236
-
237
- buildSubContent: function(element) {
238
- var ul = $A(element.childNodes).detect(function(node) { return Element.hasTagName(node, 'ul') });
239
- if (ul) {
240
- return $A(ul.childNodes).inject('', function(html, node) {
241
- return html + this.build(node);
242
- }.bind(this));
243
- } else {
244
- return '';
245
- }
246
- },
247
-
248
- getState: function(element) {
249
- if (!this.hasChildNodes(element) && !this.options.emptyImg) {
250
- return 'state_empty';
251
- } else if (this.options.open) {
252
- return 'state_open';
253
- } else {
254
- return 'state_close';
255
- }
256
- },
257
-
258
- hasChildNodes: function(element) {
259
- var ul = $A(element.childNodes).detect(function(node) { return Element.hasTagName(node, 'ul') });
260
- return ul && (ul.childNodes.length != 0);
261
- },
262
-
263
- buildFile: function(element) {
264
- var customClass = new Element.ClassNames(element).select(function(name) {
265
- return name != this.options.fileSymbol
266
- }.bind(this)).join(' ');
267
-
268
- var baseId = element.id || this.getBaseId();
269
- var iconId = this.options.iconIdPrefix.appendSuffix(baseId);
270
- var iconClass = [
271
- this.classNames.joinClassNames('fileIcon'),
272
- customClass,
273
- this.classNames.joinClassNames('handle')
274
- ];
275
- var bodyTextId = baseId.appendSuffix('fileBodyText');
276
- this.fileIds.push({icon: iconId, bodyText: bodyTextId});
277
-
278
- // Too late
279
- // var events = Element.eventHTML(element);
280
- var events = Element.attributeHTML(element, 'onclick');
281
-
282
- var html =
283
- // "<li id='" + baseId + "' class='" + this.classNames.joinClassNames('file') + "' " + events + ">" +
284
- "<li id='" + baseId + "' class='" + this.classNames.joinClassNames('file') + "' " + events + ">" +
285
- "<div class='" + this.classNames.joinClassNames('fileBody') + "'>" +
286
- "<div id='" + iconId + "' class='" + iconClass.join(' ') + "'></div>" +
287
- "<span id='" + bodyTextId + "'class='" + this.classNames.joinClassNames('fileBodyText') + "'>" +
288
- element.innerHTML +
289
- "</span>" +
290
- "</div>" +
291
- "</li>";
292
- return html;
293
- },
294
-
295
- getBaseId: function() {
296
- return this.element.id.appendSuffix(++this.idCount);
297
- },
298
-
299
- observeEvent: function() {
300
- this.observeDirEvent();
301
- if (this.options.fileSelect) this.observeFileEvent();
302
- },
303
-
304
- observeDirEvent: function() {
305
- this.dirIds.each(function(idSet) {
306
- Event.observe(idSet.state, "click", this.toggle.bindAsEventListener(this));
307
- if (this.options.dirSelect) {
308
- Event.observe(idSet.icon, "click", this.selectDirItem.bindAsEventListener(this));
309
- Event.observe(idSet.bodyText, "click", this.selectDirItem.bindAsEventListener(this));
310
- }
311
- }.bind(this));
312
- },
313
-
314
- observeFileEvent: function() {
315
- this.fileIds.each(function(idSet) {
316
- Event.observe(idSet.icon, "click", this.selectFileItem.bindAsEventListener(this));
317
- Event.observe(idSet.bodyText, "click", this.selectFileItem.bindAsEventListener(this));
318
- }.bind(this));
319
- },
320
-
321
- convertJSON: function() {
322
- return JSON.stringify(this.parse());
323
- },
324
-
325
- getChildBody: function(element) {
326
- var names = [TreeView.className.fileBody, TreeView.className.dirBody];
327
- return Element.getFirstElementByClassNames(element, names);
328
- },
329
-
330
- getChildBodyText: function(element) {
331
- var names = [
332
- TreeView.className.fileBodyText,
333
- TreeView.className.fileBodyTextActive,
334
- TreeView.className.dirBodyText,
335
- TreeView.className.dirBodyTextActive
336
- ];
337
- return Element.getFirstElementByClassNames(element, names);
338
- },
339
-
340
- getChildBodyTextNode: function(element) {
341
- var body = this.getChildBody(element);
342
- var bodyText = this.getChildBodyText(body);
343
- return this.searchTextNode(bodyText);
344
- },
345
-
346
- getChildDir: function(element) {
347
- return document.getElementsByClassName(TreeView.className.dir, element);
348
- },
349
-
350
- getChildDirBody: function(element) {
351
- return document.getElementsByClassName(TreeView.className.dirBody, element)[0];
352
- },
353
-
354
- getChildDirContainer: function(element) {
355
- return document.getElementsByClassName(TreeView.className.dirContainer, element)[0];
356
- },
357
-
358
- getChildStateImg: function(element) {
359
- var body = this.getChildDirBody(element);
360
- var names = [
361
- TreeView.className.state_close,
362
- TreeView.className.state_open,
363
- TreeView.className.state_empty
364
- ];
365
-
366
- return Element.getFirstElementByClassNames(body, names);
367
- },
368
-
369
- getChildren: function(element, ignoreDir, ignoreFile) {
370
- var parent;
371
- var children = new Array();
372
- if(element) {
373
- parent = $(element).getElementsByTagName('ul')[0];
374
- } else {
375
- parent = this.element;
376
- }
377
- $A(Element.getTagNodes(parent)).each(
378
- function(node) {
379
- if(!ignoreDir && Element.hasClassName(node, TreeView.className.dir)) {
380
- children.push(node);
381
- }
382
- if(!ignoreFile && Element.hasClassName(node, TreeView.className.file)) {
383
- children.push(node);
384
- }
385
- }
386
- );
387
- return children;
388
- },
389
-
390
- getDirectoryContents: function(element) {
391
- return $A(element.childNodes).findAll(function(child) {
392
- if ((child.nodeType != 1)) {
393
- return false;
394
- }
395
- if (child.tagName.toLowerCase() == 'li') {
396
- return true;
397
- }
398
- return false;
399
- });
400
- },
401
-
402
- getDirectoryText: function(element) {
403
- return $A(element.childNodes).inject('', function(html, node) {
404
- if (Element.isTextNode(node)) {
405
- html += node.nodeValue;
406
- } else if (node.tagName.toLowerCase() != 'ul') {
407
- html += Element.outerHTML(node);
408
- }
409
- return html;
410
- });
411
- },
412
-
413
- getHierarchyNumber: function() {
414
- if (!this.selected) return;
415
- var element = this.selected;
416
- var i = 0;
417
- while (true) {
418
- if (this.element == element) {
419
- return i;
420
- } else {
421
- element = this.getParentDir(element, true);
422
- if (!element) return;
423
- i++;
424
- }
425
- }
426
- },
427
-
428
- ancestor: function() {
429
- var arr = [];
430
- if(this.selected) {
431
- var element = this.selected;
432
- arr.push(element);
433
- while(element) {
434
- element = this.getParentDir(element, false);
435
- if(element) {
436
- arr.push(element);
437
- }
438
- }
439
- }
440
- return arr.reverse();
441
- },
442
-
443
- getParentDir: function(element, top) {
444
- var result = Element.getParentByClassName(TreeView.className.dir, element);
445
- if (!result && top)
446
- result = Element.getParentByClassName(TreeView.className.top, element);
447
- return result;
448
- },
449
-
450
- hasContents: function(element) {
451
- if (element) {
452
- if (!Element.hasClassName(element, TreeView.className.dirContainer) &&
453
- !Element.hasClassName(element, TreeView.className.top)) {
454
- return false;
455
- }
456
-
457
- var nodes = element.childNodes;
458
- for (var i = 0; i < nodes.length; i++) {
459
- if (nodes[i].nodeType == 1) {
460
- if (Element.hasClassName(nodes[i], TreeView.className.dir) ||
461
- Element.hasClassName(nodes[i], TreeView.className.file)) {
462
- return true;
463
- }
464
- }
465
- }
466
- }
467
- return false;
468
- },
469
-
470
- parse: function(container) {
471
- if (!container) container = this.element;
472
-
473
- var itemList = [];
474
- var contents = this.getDirectoryContents(container);
475
-
476
- for (var i = 0; i < contents.length; i++) {
477
- var node = contents[i];
478
- var body = this.getChildBody(node);
479
- var text = this.getChildBodyText(body);
480
-
481
- var item = {};
482
- item.id = node.id;
483
-
484
- item.name = Element.collectTextNodes(text).replace(/\n/, '');
485
- if (Element.hasClassName(node, TreeView.className.dir)) {
486
- item.type = this.options.dirSymbol;
487
- item.contents = this.parse(this.getChildDirContainer(node));
488
-
489
- } else {
490
- item.type = this.options.fileSymbol;
491
- }
492
-
493
- itemList.push(item);
494
- }
495
-
496
- return itemList;
497
- },
498
-
499
- refreshStateImg: function(element) {
500
- if (!Element.hasClassName(element, TreeView.className.dir)) return;
501
-
502
- var container = this.getChildDirContainer(element);
503
- var img = this.getChildStateImg(element);
504
-
505
- if (!this.hasContents(container) && !this.options.emptyImg)
506
- this.classNames.refreshClassNames(img, 'state_empty');
507
- else if (Element.visible(container))
508
- this.classNames.refreshClassNames(img, 'state_open');
509
- else
510
- this.classNames.refreshClassNames(img, 'state_close');
511
- },
512
-
513
- removeById: function(element) {
514
- element = $(element);
515
- if (element) {
516
- var parent = element.parentNode.parentNode;
517
- Element.remove(element);
518
- this.refreshStateImg(parent);
519
- }
520
- },
521
-
522
- removeByPath: function(path) {
523
- var paths = path.split('/').findAll(function(elm) {
524
- return (elm != '');
525
- });
526
-
527
- var last = paths.pop();
528
- var container = this.search(paths.join('/'));
529
-
530
- var target = this.getDirectoryContents(container)[last];
531
- if (target)
532
- this.removeById(target);
533
- },
534
-
535
- removeBySelected: function() {
536
- if (!this.selected) return;
537
- this.removeById(this.selected);
538
- this.selected = false;
539
- },
540
-
541
- renameById: function(name, element) {
542
- element = $(element);
543
- if (!Element.hasClassName(element, TreeView.className.dir) &&
544
- !Element.hasClassName(element, TreeView.className.file)) {
545
- return;
546
- }
547
- var node = this.getChildBodyTextNode(element);
548
- node.nodeValue = name;
549
- },
550
-
551
- renameByPath: function(name, path) {
552
- var paths = path.split('/').findAll(function(elm) {
553
- return (elm != '');
554
- });
555
-
556
- var last = paths.pop();
557
- var container = this.search(paths.join('/'));
558
-
559
- var target = this.getDirectoryContents(container)[last];
560
- if (target)
561
- this.renameById(name, target);
562
- },
563
-
564
- renameBySelected: function(name) {
565
- if (!this.selected) return;
566
- this.renameById(name, this.selected);
567
- },
568
-
569
- search: function(path) {
570
- var paths = path.split('/').findAll(function(elm) {
571
- return (elm != '');
572
- });
573
-
574
- var container = this.element;
575
- for (var i = 0; i < paths.length; i++) {
576
- var num = paths[i];
577
- var contents = this.getDirectoryContents(container);
578
- if (contents[num] && Element.hasClassName(contents[num], TreeView.className.dir)) {
579
- container = this.getChildDirContainer(contents[num]);
580
- } else {
581
- return false;
582
- }
583
- }
584
- return container;
585
- },
586
-
587
- searchTextNode: function(element) {
588
- var text = null;
589
- var nodes = element.childNodes;
590
-
591
- for (var i = 0; i < nodes.length; i++) {
592
- if (nodes[i].nodeType == 3) {
593
- text = nodes[i];
594
- break;
595
- } else if (nodes[i].nodeType == 1) {
596
- var tmp = this.searchTextNode(nodes[i]);
597
- if (tmp) {
598
- text = tmp;
599
- break;
600
- }
601
- }
602
- }
603
- return text;
604
- },
605
-
606
- selectDirItem: function(event) {
607
- var itemBody = Element.getParentByClassName(TreeView.className.dirBody, Event.element(event));
608
- this.selectItem(itemBody);
609
- },
610
-
611
- selectEffect: function(element) {
612
- element = $(element);
613
- if(element) {
614
- var itemBody = $A(element.childNodes).detect(function(node) { return Element.isElementNode(node); });
615
- if (this.selectItemUnselect(itemBody, false)) {
616
- return;
617
- }
618
- this.selectItemSelect(itemBody, false);
619
- }
620
- },
621
-
622
- selectFileItem: function(event) {
623
- var itemBody = Element.getParentByClassName(TreeView.className.fileBody, Event.element(event));
624
- this.selectItem(itemBody);
625
- },
626
-
627
- selectItem: function(itemBody) {
628
- if (this.selectItemUnselect(itemBody, true)) {
629
- return;
630
- }
631
- this.selectItemSelect(itemBody, true);
632
- },
633
-
634
- selectItemSelect: function(itemBody, callback) {
635
- this.selected = itemBody.parentNode;
636
- var text = this.getChildBodyText(itemBody);
637
- if (Element.hasClassName(text, TreeView.className.dirBodyText)) {
638
- this.classNames.refreshClassNames(text, 'dirBodyTextActive');
639
- this.defaultCss = 'dirBodyText';
640
- } else if (Element.hasClassName(text, TreeView.className.fileBodyText)) {
641
- this.classNames.refreshClassNames(text, 'fileBodyTextActive');
642
- this.defaultCss = 'fileBodyText';
643
- }
644
- if (callback) {
645
- if (this.options.callBackFunctions) {
646
- for (var i = 0; i < this.options.callBackFunctions.length; i++) {
647
- this.options.callBackFunctions[i](itemBody.parentNode);
648
- }
649
- }
650
- }
651
- },
652
-
653
- selectItemUnselect: function(itemBody, callback) {
654
- if (this.selected) {
655
- var selectedBody = this.getChildBody(this.selected);
656
- var selectedText = this.getChildBodyText(selectedBody);
657
- this.classNames.refreshClassNames(selectedText, this.defaultCss);
658
- if (this.selected == itemBody.parentNode && this.options.enableUnselected) {
659
- this.selected = false;
660
- this.defaultCss = false;
661
- if (callback) {
662
- this.options.unselected();
663
- }
664
- return true;
665
- }
666
- }
667
- return false;
668
- },
669
-
670
- setSortable: function() {
671
- var options = Object.extend({
672
- dropOnEmpty: true,
673
- tree: true,
674
- hoverclass: 'treeview_dirContainerHover',
675
- scroll: window,
676
- ghosting: true
677
- }, this.options.sortOptions);
678
- Sortable.create(this.element, options);
679
- },
680
-
681
- toggle: function(event) {
682
- Event.stop(event);
683
- var src = Event.element(event);
684
- this._toggle(this.getParentDir(src), Element.toggle);
685
- },
686
-
687
- _toggle: function(element, method) {
688
- element = $(element);
689
- if (element && !Element.hasClassName(element, TreeView.className.dir)) return;
690
- var container = this.getChildDirContainer(element);
691
- if (!this.hasContents(container) && !this.options.emptyImg) return;
692
-
693
- method(container);
694
- this.refreshStateImg(element);
695
-
696
- if (!this.hasContents(container) && !this.options.emptyImg)
697
- this.options.openDir(element, container);
698
- else if (Element.visible(container))
699
- this.options.openDir(element, container);
700
- else
701
- this.options.closeDir(element, container);
702
- }
703
- }