activeldap 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -0
- data/README +1 -0
- data/lib/active_ldap/get_text_support.rb +3 -1
- data/lib/active_ldap.rb +1 -1
- metadata +5 -321
- data/examples/al-admin/README +0 -182
- data/examples/al-admin/Rakefile +0 -16
- data/examples/al-admin/app/controllers/account_controller.rb +0 -60
- data/examples/al-admin/app/controllers/application_controller.rb +0 -46
- data/examples/al-admin/app/controllers/attributes_controller.rb +0 -17
- data/examples/al-admin/app/controllers/directory_controller.rb +0 -49
- data/examples/al-admin/app/controllers/object_classes_controller.rb +0 -17
- data/examples/al-admin/app/controllers/syntaxes_controller.rb +0 -17
- data/examples/al-admin/app/controllers/users_controller.rb +0 -66
- data/examples/al-admin/app/controllers/welcome_controller.rb +0 -12
- data/examples/al-admin/app/helpers/account_helper.rb +0 -2
- data/examples/al-admin/app/helpers/application_helper.rb +0 -46
- data/examples/al-admin/app/helpers/attributes_helper.rb +0 -15
- data/examples/al-admin/app/helpers/directory_helper.rb +0 -7
- data/examples/al-admin/app/helpers/object_classes_helper.rb +0 -10
- data/examples/al-admin/app/helpers/syntaxes_helper.rb +0 -10
- data/examples/al-admin/app/helpers/url_helper.rb +0 -17
- data/examples/al-admin/app/helpers/users_helper.rb +0 -17
- data/examples/al-admin/app/helpers/welcome_helper.rb +0 -2
- data/examples/al-admin/app/models/entry.rb +0 -23
- data/examples/al-admin/app/models/ldap_user.rb +0 -58
- data/examples/al-admin/app/models/user.rb +0 -91
- data/examples/al-admin/app/views/_entry/_attributes_information.html.erb +0 -29
- data/examples/al-admin/app/views/_entry/_entry.html.erb +0 -15
- data/examples/al-admin/app/views/_schema/_aliases.html.erb +0 -7
- data/examples/al-admin/app/views/_switcher/_after.html.erb +0 -2
- data/examples/al-admin/app/views/_switcher/_before.html.erb +0 -5
- data/examples/al-admin/app/views/account/login.html.erb +0 -26
- data/examples/al-admin/app/views/account/sign_up.html.erb +0 -29
- data/examples/al-admin/app/views/attributes/_attributes.html.erb +0 -19
- data/examples/al-admin/app/views/attributes/_detail.html.erb +0 -29
- data/examples/al-admin/app/views/attributes/index.html.erb +0 -3
- data/examples/al-admin/app/views/attributes/show.html.erb +0 -31
- data/examples/al-admin/app/views/directory/_tree.html.erb +0 -10
- data/examples/al-admin/app/views/directory/_tree_view_js.html.erb +0 -25
- data/examples/al-admin/app/views/directory/index.html.erb +0 -13
- data/examples/al-admin/app/views/directory/populate.html.erb +0 -2
- data/examples/al-admin/app/views/layouts/_footer.html.erb +0 -11
- data/examples/al-admin/app/views/layouts/_header_menu.html.erb +0 -10
- data/examples/al-admin/app/views/layouts/_main_menu.html.erb +0 -18
- data/examples/al-admin/app/views/layouts/application.html.erb +0 -57
- data/examples/al-admin/app/views/object_classes/_attributes.html.erb +0 -28
- data/examples/al-admin/app/views/object_classes/_object_classes.html.erb +0 -19
- data/examples/al-admin/app/views/object_classes/index.html.erb +0 -3
- data/examples/al-admin/app/views/object_classes/show.html.erb +0 -39
- data/examples/al-admin/app/views/syntaxes/_detail.html.erb +0 -14
- data/examples/al-admin/app/views/syntaxes/_syntaxes.html.erb +0 -19
- data/examples/al-admin/app/views/syntaxes/index.html.erb +0 -3
- data/examples/al-admin/app/views/syntaxes/show.html.erb +0 -22
- data/examples/al-admin/app/views/users/_attributes_update_form.html.erb +0 -42
- data/examples/al-admin/app/views/users/_form.html.erb +0 -13
- data/examples/al-admin/app/views/users/_object_classes_update_form.html.erb +0 -46
- data/examples/al-admin/app/views/users/_password_change_form.html.erb +0 -20
- data/examples/al-admin/app/views/users/edit.html.erb +0 -15
- data/examples/al-admin/app/views/users/index.html.erb +0 -10
- data/examples/al-admin/app/views/users/show.html.erb +0 -11
- data/examples/al-admin/app/views/welcome/index.html.erb +0 -13
- data/examples/al-admin/config/boot.rb +0 -110
- data/examples/al-admin/config/database.yml.example +0 -19
- data/examples/al-admin/config/environment.rb +0 -73
- data/examples/al-admin/config/environments/development.rb +0 -17
- data/examples/al-admin/config/environments/production.rb +0 -24
- data/examples/al-admin/config/environments/test.rb +0 -22
- data/examples/al-admin/config/initializers/exception_notifier.rb +0 -2
- data/examples/al-admin/config/initializers/fast_gettext.rb +0 -3
- data/examples/al-admin/config/initializers/inflections.rb +0 -10
- data/examples/al-admin/config/initializers/mime_types.rb +0 -5
- data/examples/al-admin/config/initializers/session_store.rb +0 -23
- data/examples/al-admin/config/ldap.yml.example +0 -21
- data/examples/al-admin/config/routes.rb +0 -58
- data/examples/al-admin/config/session_secret.txt +0 -1
- data/examples/al-admin/config.ru +0 -7
- data/examples/al-admin/db/migrate/001_create_users.rb +0 -16
- data/examples/al-admin/db/schema.rb +0 -23
- data/examples/al-admin/lib/authenticated_system.rb +0 -124
- data/examples/al-admin/lib/authenticated_test_helper.rb +0 -113
- data/examples/al-admin/lib/ldap_test_helper.rb +0 -38
- data/examples/al-admin/lib/tasks/testing.rake +0 -10
- data/examples/al-admin/po/en/al-admin.po +0 -343
- data/examples/al-admin/po/ja/al-admin.po +0 -343
- data/examples/al-admin/po/nl/al-admin.po +0 -380
- data/examples/al-admin/public/.htaccess +0 -40
- data/examples/al-admin/public/404.html +0 -30
- data/examples/al-admin/public/500.html +0 -30
- data/examples/al-admin/public/dispatch.cgi +0 -10
- data/examples/al-admin/public/dispatch.fcgi +0 -24
- data/examples/al-admin/public/dispatch.rb +0 -10
- data/examples/al-admin/public/favicon.ico +0 -0
- data/examples/al-admin/public/images/active-ldap.svg +0 -6351
- data/examples/al-admin/public/images/al-admin.png +0 -0
- data/examples/al-admin/public/images/al-admin.svg +0 -6371
- data/examples/al-admin/public/images/header-background.png +0 -0
- data/examples/al-admin/public/images/header-background.svg +0 -99
- data/examples/al-admin/public/images/rails.png +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_left_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_left_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_middle_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_middle_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_right_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_right_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_bottom_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_bottom_middle.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_bottom_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_left_down_arrow.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_left_up_arrow.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_middle_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_middle_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_right_down_arrow.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_right_up_arrow.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_top_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_top_middle.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_top_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/barchart_h.gif +0 -0
- data/examples/al-admin/public/images/spinelz/barchart_v.gif +0 -0
- data/examples/al-admin/public/images/spinelz/button.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_default_handler.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_delete.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_next.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_next_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_pre.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_pre_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_private_icon.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_schedule.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calender_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calender_back_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_back_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_next.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_next_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_pre.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_pre_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_back_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_next.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_next_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_pre.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_pre_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/grid_down.gif +0 -0
- data/examples/al-admin/public/images/spinelz/grid_state.gif +0 -0
- data/examples/al-admin/public/images/spinelz/grid_up.gif +0 -0
- data/examples/al-admin/public/images/spinelz/icon_day.gif +0 -0
- data/examples/al-admin/public/images/spinelz/icon_month.gif +0 -0
- data/examples/al-admin/public/images/spinelz/icon_week.gif +0 -0
- data/examples/al-admin/public/images/spinelz/menubar_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/menubar_subcontents_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_left_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_left_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_middle_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_middle_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_right_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_right_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/select_date.gif +0 -0
- data/examples/al-admin/public/images/spinelz/selectabletable_selected.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_about.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_menu.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_sample.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabBottomActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabBottomInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleActive2.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleInactive2.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabTopActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabTopInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabbar.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sortableTable_down.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sortableTable_normal.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sortableTable_up.gif +0 -0
- data/examples/al-admin/public/images/spinelz/switcher_close.gif +0 -0
- data/examples/al-admin/public/images/spinelz/switcher_open.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_close.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabLeftActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabLeftInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabMiddleActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabMiddleInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabRightActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabRightInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tab_bar.gif +0 -0
- data/examples/al-admin/public/images/spinelz/table_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/timepicker_clock.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_close.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_max.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_middle.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_min.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_next.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_dir.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_file.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_group.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_group_special.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_state.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_user.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_bottom_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_bottom_middle.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_bottom_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_close.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_max.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_middle_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_middle_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_min.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_top_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_top_middle.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_top_right.gif +0 -0
- data/examples/al-admin/public/javascripts/application.js +0 -2
- data/examples/al-admin/public/javascripts/controls.js +0 -963
- data/examples/al-admin/public/javascripts/dragdrop.js +0 -973
- data/examples/al-admin/public/javascripts/effects.js +0 -1128
- data/examples/al-admin/public/javascripts/prototype.js +0 -4320
- data/examples/al-admin/public/javascripts/spinelz/accordion.js +0 -185
- data/examples/al-admin/public/javascripts/spinelz/ajaxHistory.js +0 -157
- data/examples/al-admin/public/javascripts/spinelz/balloon.js +0 -287
- data/examples/al-admin/public/javascripts/spinelz/barchart.js +0 -524
- data/examples/al-admin/public/javascripts/spinelz/calendar.js +0 -3012
- data/examples/al-admin/public/javascripts/spinelz/colorpicker.js +0 -128
- data/examples/al-admin/public/javascripts/spinelz/datepicker.js +0 -438
- data/examples/al-admin/public/javascripts/spinelz/grid.js +0 -1391
- data/examples/al-admin/public/javascripts/spinelz/grid_resizeEx.js +0 -100
- data/examples/al-admin/public/javascripts/spinelz/grid_sortabletableEx.js +0 -129
- data/examples/al-admin/public/javascripts/spinelz/inplaceEditorEx.js +0 -148
- data/examples/al-admin/public/javascripts/spinelz/menubar.js +0 -232
- data/examples/al-admin/public/javascripts/spinelz/navPanel.js +0 -170
- data/examples/al-admin/public/javascripts/spinelz/selectableTable.js +0 -433
- data/examples/al-admin/public/javascripts/spinelz/sideBarBox.js +0 -282
- data/examples/al-admin/public/javascripts/spinelz/sideBarBox_effects.js +0 -83
- data/examples/al-admin/public/javascripts/spinelz/sortableTable.js +0 -270
- data/examples/al-admin/public/javascripts/spinelz/switcher.js +0 -78
- data/examples/al-admin/public/javascripts/spinelz/tabBox.js +0 -469
- data/examples/al-admin/public/javascripts/spinelz/timepicker.js +0 -384
- data/examples/al-admin/public/javascripts/spinelz/toolbar.js +0 -152
- data/examples/al-admin/public/javascripts/spinelz/treeview.js +0 -703
- data/examples/al-admin/public/javascripts/spinelz/window.js +0 -641
- data/examples/al-admin/public/javascripts/spinelz/window_resizeEx.js +0 -130
- data/examples/al-admin/public/javascripts/spinelz_lib/builder.js +0 -131
- data/examples/al-admin/public/javascripts/spinelz_lib/controls.js +0 -835
- data/examples/al-admin/public/javascripts/spinelz_lib/dragdrop.js +0 -944
- data/examples/al-admin/public/javascripts/spinelz_lib/effects.js +0 -1090
- data/examples/al-admin/public/javascripts/spinelz_lib/json.js +0 -139
- data/examples/al-admin/public/javascripts/spinelz_lib/prototype.js +0 -2515
- data/examples/al-admin/public/javascripts/spinelz_lib/resize.js +0 -215
- data/examples/al-admin/public/javascripts/spinelz_lib/scriptaculous.js +0 -51
- data/examples/al-admin/public/javascripts/spinelz_lib/slider.js +0 -278
- data/examples/al-admin/public/javascripts/spinelz_lib/spinelz_util.js +0 -1266
- data/examples/al-admin/public/javascripts/spinelz_lib/unittest.js +0 -564
- data/examples/al-admin/public/robots.txt +0 -1
- data/examples/al-admin/public/stylesheets/account.css +0 -41
- data/examples/al-admin/public/stylesheets/attributes.css +0 -1
- data/examples/al-admin/public/stylesheets/base.css +0 -104
- data/examples/al-admin/public/stylesheets/detail.css +0 -36
- data/examples/al-admin/public/stylesheets/directory.css +0 -22
- data/examples/al-admin/public/stylesheets/object-classes.css +0 -6
- data/examples/al-admin/public/stylesheets/rails.css +0 -35
- data/examples/al-admin/public/stylesheets/spinelz/accordion.css +0 -59
- data/examples/al-admin/public/stylesheets/spinelz/balloon.css +0 -151
- data/examples/al-admin/public/stylesheets/spinelz/calendar.css +0 -564
- data/examples/al-admin/public/stylesheets/spinelz/datepicker.css +0 -175
- data/examples/al-admin/public/stylesheets/spinelz/grid.css +0 -137
- data/examples/al-admin/public/stylesheets/spinelz/menubar.css +0 -78
- data/examples/al-admin/public/stylesheets/spinelz/modal.css +0 -22
- data/examples/al-admin/public/stylesheets/spinelz/navPanel.css +0 -58
- data/examples/al-admin/public/stylesheets/spinelz/selectableTable.css +0 -28
- data/examples/al-admin/public/stylesheets/spinelz/sideBarBox.css +0 -82
- data/examples/al-admin/public/stylesheets/spinelz/sortableTable.css +0 -51
- data/examples/al-admin/public/stylesheets/spinelz/switcher.css +0 -23
- data/examples/al-admin/public/stylesheets/spinelz/tabBox.css +0 -94
- data/examples/al-admin/public/stylesheets/spinelz/timepicker.css +0 -508
- data/examples/al-admin/public/stylesheets/spinelz/toolbar.css +0 -82
- data/examples/al-admin/public/stylesheets/spinelz/treeview.css +0 -121
- data/examples/al-admin/public/stylesheets/spinelz/window.css +0 -140
- data/examples/al-admin/public/stylesheets/structure.css +0 -81
- data/examples/al-admin/public/stylesheets/syntaxes.css +0 -1
- data/examples/al-admin/public/stylesheets/users.css +0 -13
- data/examples/al-admin/public/stylesheets/welcome.css +0 -0
- data/examples/al-admin/script/about +0 -3
- data/examples/al-admin/script/console +0 -3
- data/examples/al-admin/script/dbconsole +0 -3
- data/examples/al-admin/script/destroy +0 -3
- data/examples/al-admin/script/generate +0 -3
- data/examples/al-admin/script/performance/benchmarker +0 -3
- data/examples/al-admin/script/performance/profiler +0 -3
- data/examples/al-admin/script/performance/request +0 -3
- data/examples/al-admin/script/plugin +0 -3
- data/examples/al-admin/script/process/inspector +0 -3
- data/examples/al-admin/script/process/reaper +0 -3
- data/examples/al-admin/script/process/spawner +0 -3
- data/examples/al-admin/script/runner +0 -3
- data/examples/al-admin/script/server +0 -3
- data/examples/al-admin/test/fixtures/users.yml +0 -9
- data/examples/al-admin/test/functional/account_controller_test.rb +0 -12
- data/examples/al-admin/test/functional/attributes_controller_test.rb +0 -8
- data/examples/al-admin/test/functional/directory_controller_test.rb +0 -8
- data/examples/al-admin/test/functional/object_classes_controller_test.rb +0 -8
- data/examples/al-admin/test/functional/syntaxes_controller_test.rb +0 -8
- data/examples/al-admin/test/functional/users_controller_test.rb +0 -8
- data/examples/al-admin/test/functional/welcome_controller_test.rb +0 -8
- data/examples/al-admin/test/integration/sign_up_test.rb +0 -44
- data/examples/al-admin/test/run-test.sh +0 -3
- data/examples/al-admin/test/test_helper.rb +0 -52
- data/examples/al-admin/test/unit/user_test.rb +0 -12
- data/examples/al-admin/vendor/plugins/exception_notification/README +0 -111
- data/examples/al-admin/vendor/plugins/exception_notification/init.rb +0 -1
- data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifiable.rb +0 -99
- data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifier.rb +0 -66
- data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifier_helper.rb +0 -78
- data/examples/al-admin/vendor/plugins/exception_notification/test/exception_notifier_helper_test.rb +0 -61
- data/examples/al-admin/vendor/plugins/exception_notification/test/test_helper.rb +0 -7
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_backtrace.rhtml +0 -1
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_environment.rhtml +0 -7
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_inspect_model.rhtml +0 -16
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_request.rhtml +0 -4
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_session.rhtml +0 -2
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_title.rhtml +0 -3
- 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
|
-
|