activeldap 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,100 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2005 spinelz.org (http://script.spinelz.org/)
|
|
2
|
-
//
|
|
3
|
-
// This code is substantially based on code from Thomas Fakes(http://craz8.com)
|
|
4
|
-
// which has the following copyright and permission notice
|
|
5
|
-
//
|
|
6
|
-
// Copyright (c) 2005 Thomas Fakes (http://craz8.com)
|
|
7
|
-
//
|
|
8
|
-
// This code is substantially based on code from script.aculo.us which has the
|
|
9
|
-
// following copyright and permission notice
|
|
10
|
-
//
|
|
11
|
-
// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
|
12
|
-
//
|
|
13
|
-
// Permission is hereby granted, free of charge, to any person obtaining
|
|
14
|
-
// a copy of this software and associated documentation files (the
|
|
15
|
-
// "Software"), to deal in the Software without restriction, including
|
|
16
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
17
|
-
// distribute, sublicense, and/or sell copies of the Software, and to
|
|
18
|
-
// permit persons to whom the Software is furnished to do so, subject to
|
|
19
|
-
// the following conditions:
|
|
20
|
-
//
|
|
21
|
-
// The above copyright notice and this permission notice shall be
|
|
22
|
-
// included in all copies or substantial portions of the Software.
|
|
23
|
-
//
|
|
24
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
-
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
27
|
-
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
28
|
-
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
29
|
-
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
30
|
-
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
-
|
|
32
|
-
ResizeableGridEx = Class.create();
|
|
33
|
-
Object.extend(Object.extend(ResizeableGridEx.prototype, Resizeable.prototype), {
|
|
34
|
-
|
|
35
|
-
draw: function(event) {
|
|
36
|
-
|
|
37
|
-
var pointer = [Event.pointerX(event), Event.pointerY(event)];
|
|
38
|
-
var style = this.element.style;
|
|
39
|
-
var newHeight = 0;
|
|
40
|
-
var newWidth = 0;
|
|
41
|
-
var newTop = 0;
|
|
42
|
-
var newLeft = 0;
|
|
43
|
-
if (this.currentDirection.indexOf('n') != -1) {
|
|
44
|
-
var pointerMoved = this.startY - pointer[1];
|
|
45
|
-
var margin = Element.getStyle(this.element, 'margin-top') || "0";
|
|
46
|
-
newHeight = this.startHeight + pointerMoved;
|
|
47
|
-
newTop = (this.startTop - pointerMoved - parseInt(margin)) + "px";
|
|
48
|
-
}
|
|
49
|
-
if (this.currentDirection.indexOf('w') != -1) {
|
|
50
|
-
var pointerMoved = this.startX - pointer[0];
|
|
51
|
-
var margin = Element.getStyle(this.element, 'margin-left') || "0";
|
|
52
|
-
newWidth = this.startWidth + pointerMoved;
|
|
53
|
-
newLeft = (this.startLeft - pointerMoved - parseInt(margin)) + "px";
|
|
54
|
-
}
|
|
55
|
-
if (this.currentDirection.indexOf('s') != -1) {
|
|
56
|
-
newHeight = this.startHeight + pointer[1] - this.startY;
|
|
57
|
-
}
|
|
58
|
-
if (this.currentDirection.indexOf('e') != -1) {
|
|
59
|
-
newWidth = this.startWidth + pointer[0] - this.startX;
|
|
60
|
-
}
|
|
61
|
-
var newStyle = {
|
|
62
|
-
height: newHeight,
|
|
63
|
-
width: newWidth,
|
|
64
|
-
top: newTop,
|
|
65
|
-
left: newLeft
|
|
66
|
-
}
|
|
67
|
-
if (this.options.draw) {
|
|
68
|
-
this.options.draw(newStyle, this.element);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (newHeight && newHeight > this.options.minHeight) {
|
|
72
|
-
|
|
73
|
-
style.top = newStyle.top;
|
|
74
|
-
|
|
75
|
-
style.height = newStyle.height + "px";
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
if (newWidth && newWidth > this.options.minWidth) {
|
|
79
|
-
|
|
80
|
-
style.left = newStyle.left;
|
|
81
|
-
style.width = newStyle.width + "px";
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
directions: function(event) {
|
|
89
|
-
var pointer = [Event.pointerX(event) + Grid.scrollLeft, Event.pointerY(event) + Grid.scrollTop];
|
|
90
|
-
//var pointer = [Event.pointerX(event), Event.pointerY(event)];
|
|
91
|
-
var offsets = Position.cumulativeOffset(this.element);
|
|
92
|
-
var cursor = '';
|
|
93
|
-
if (this.between(pointer[1] - offsets[1], 0, this.options.top)) cursor += 'n';
|
|
94
|
-
if (this.between((offsets[1] + this.element.offsetHeight) - pointer[1], 0, this.options.bottom)) cursor += 's';
|
|
95
|
-
if (this.between(pointer[0] - offsets[0], 0, this.options.left)) cursor += 'w';
|
|
96
|
-
if (this.between((offsets[0] + this.element.offsetWidth) - pointer[0], 0, this.options.right)) cursor += 'e';
|
|
97
|
-
|
|
98
|
-
return cursor;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
@@ -1,129 +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
|
-
SortableTableGridEx = Class.create();
|
|
24
|
-
Object.extend(Object.extend(SortableTableGridEx.prototype, SortableTable.prototype), {
|
|
25
|
-
|
|
26
|
-
initialize: function(element) {
|
|
27
|
-
this.element = $(element);
|
|
28
|
-
Element.setStyle(this.element, {visibility: 'hidden'});
|
|
29
|
-
|
|
30
|
-
var options = Object.extend({
|
|
31
|
-
ascImg: false,
|
|
32
|
-
descImg: false,
|
|
33
|
-
handle: false,
|
|
34
|
-
callBack: false
|
|
35
|
-
}, arguments[1] || {});
|
|
36
|
-
this.options = options;
|
|
37
|
-
|
|
38
|
-
this.handle = options.handle ? $(options.handle) : this.element.rows[0];
|
|
39
|
-
this.ascImg = options.ascImg ? options.ascImg : 'images/spinelz/sortableTable_down.gif';
|
|
40
|
-
this.descImg = options.descImg ? options.descImg : 'images/spinelz/sortableTable_up.gif';
|
|
41
|
-
this.sortType = options.sortType;
|
|
42
|
-
|
|
43
|
-
this.currentOrder = 'default';
|
|
44
|
-
this.defaultOrder = new Array();
|
|
45
|
-
for (var i = 0; i < this.element.rows.length; i++) {
|
|
46
|
-
this.defaultOrder[i] = this.element.rows[i];
|
|
47
|
-
}
|
|
48
|
-
this.addEvents();
|
|
49
|
-
Element.setStyle(this.element, {visibility: 'visible'});
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
addEvents: function() {
|
|
53
|
-
var rows = this.handle.rows[0];
|
|
54
|
-
if (!rows) return;
|
|
55
|
-
|
|
56
|
-
for (var i = 0; i < rows.cells.length; i++) {
|
|
57
|
-
Element.cleanWhitespace(rows.cells[i]);
|
|
58
|
-
Element.cleanWhitespace(rows.cells[i].firstChild);
|
|
59
|
-
this.addEvent(rows.cells[i].firstChild.firstChild);
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
addEvent: function(handle) {
|
|
64
|
-
if (handle) {
|
|
65
|
-
handle.style.cursor = 'pointer';
|
|
66
|
-
Event.observe(handle, 'click', this.sortTable.bindAsEventListener(this));
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
sortTable: function(event) {
|
|
71
|
-
var target = Event.element(event);
|
|
72
|
-
if (target.tagName.toUpperCase() == 'IMG') {
|
|
73
|
-
target = target.parentNode;
|
|
74
|
-
}
|
|
75
|
-
var cell = target;
|
|
76
|
-
if (cell.tagName.toUpperCase() != 'TD' && cell.tagName.toUpperCase() != 'TH') {
|
|
77
|
-
cell = Element.getParentByTagName(['TD','TH'], cell);
|
|
78
|
-
}
|
|
79
|
-
var tmpColumn = cell.cellIndex;
|
|
80
|
-
if (this.targetColumn != tmpColumn) {
|
|
81
|
-
this.currentOrder = 'default';
|
|
82
|
-
}
|
|
83
|
-
this.targetColumn = tmpColumn;
|
|
84
|
-
|
|
85
|
-
var newRows = new Array();
|
|
86
|
-
for (var i = 0; i < this.element.rows.length; i++) {
|
|
87
|
-
newRows[i] = this.element.rows[i];
|
|
88
|
-
}
|
|
89
|
-
if (newRows.length < 1) return;
|
|
90
|
-
|
|
91
|
-
if (this.currentOrder == 'default') {
|
|
92
|
-
newRows.sort(this.getSortFunc());
|
|
93
|
-
this.currentOrder = 'asc';
|
|
94
|
-
|
|
95
|
-
} else if (this.currentOrder == 'asc') {
|
|
96
|
-
newRows = newRows.reverse();
|
|
97
|
-
this.currentOrder = 'desc';
|
|
98
|
-
} else if (this.currentOrder == 'desc') {
|
|
99
|
-
newRows = this.defaultOrder;
|
|
100
|
-
this.currentOrder = 'default';
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
for (var i = 0; i < newRows.length; i++) {
|
|
104
|
-
this.element.tBodies[0].appendChild(newRows[i]);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
this.mark(target);
|
|
108
|
-
if (this.options.callBack) this.options.callBack(this.element);
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
mark: function(cell) {
|
|
112
|
-
var row = this.options.handle ? this.options.handle.rows[0] : this.element.rows[0];
|
|
113
|
-
|
|
114
|
-
var imgs = row.getElementsByTagName('IMG');
|
|
115
|
-
|
|
116
|
-
for (var i = 0; i < imgs.length; i++){
|
|
117
|
-
var parent = imgs[i].parentNode;
|
|
118
|
-
parent.removeChild(imgs[i]);
|
|
119
|
-
}
|
|
120
|
-
var imgFile;
|
|
121
|
-
if (this.currentOrder == 'asc') imgFile = this.ascImg;
|
|
122
|
-
else if (this.currentOrder == 'desc') imgFile = this.descImg;
|
|
123
|
-
|
|
124
|
-
if (imgFile)
|
|
125
|
-
cell.appendChild(Builder.node('IMG', {src: imgFile, alt: 'sortImg'}));
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
});
|
|
129
|
-
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2006 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
|
-
InPlaceEditorEx = Class.create();
|
|
28
|
-
Object.extend(Object.extend(InPlaceEditorEx.prototype, Ajax.InPlaceEditor.prototype), {
|
|
29
|
-
/*********************************************
|
|
30
|
-
* Edit
|
|
31
|
-
* The URL option is unnecessary because
|
|
32
|
-
* of updating without Ajax.
|
|
33
|
-
*********************************************
|
|
34
|
-
initialize: function(element, url, options) {
|
|
35
|
-
this.url = url;
|
|
36
|
-
*********************************************/
|
|
37
|
-
initialize: function(element, options) {
|
|
38
|
-
/*********************************************/
|
|
39
|
-
this.element = $(element);
|
|
40
|
-
|
|
41
|
-
this.options = Object.extend({
|
|
42
|
-
okButton: true,
|
|
43
|
-
okText: "ok",
|
|
44
|
-
cancelLink: true,
|
|
45
|
-
cancelText: "cancel",
|
|
46
|
-
savingText: "Saving...",
|
|
47
|
-
clickToEditText: "Click to edit",
|
|
48
|
-
okText: "ok",
|
|
49
|
-
rows: 1,
|
|
50
|
-
onComplete: function(transport, element) {
|
|
51
|
-
new Effect.Highlight(element, {startcolor: this.options.highlightcolor});
|
|
52
|
-
},
|
|
53
|
-
onFailure: function(transport) {
|
|
54
|
-
alert("Error communicating with the server: " + transport.responseText.stripTags());
|
|
55
|
-
},
|
|
56
|
-
callback: function(form) {
|
|
57
|
-
return Form.serialize(form);
|
|
58
|
-
},
|
|
59
|
-
handleLineBreaks: true,
|
|
60
|
-
loadingText: 'Loading...',
|
|
61
|
-
savingClassName: 'inplaceeditor-saving',
|
|
62
|
-
loadingClassName: 'inplaceeditor-loading',
|
|
63
|
-
formClassName: 'inplaceeditor-form',
|
|
64
|
-
highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor,
|
|
65
|
-
highlightendcolor: "#FFFFFF",
|
|
66
|
-
externalControl: null,
|
|
67
|
-
submitOnBlur: false,
|
|
68
|
-
ajaxOptions: {},
|
|
69
|
-
evalScripts: false
|
|
70
|
-
}, options || {});
|
|
71
|
-
|
|
72
|
-
if(!this.options.formId && this.element.id) {
|
|
73
|
-
this.options.formId = this.element.id + "-inplaceeditor";
|
|
74
|
-
if ($(this.options.formId)) {
|
|
75
|
-
// there's already a form with that name, don't specify an id
|
|
76
|
-
this.options.formId = null;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (this.options.externalControl) {
|
|
81
|
-
this.options.externalControl = $(this.options.externalControl);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
this.originalBackground = Element.getStyle(this.element, 'background-color');
|
|
85
|
-
if (!this.originalBackground) {
|
|
86
|
-
this.originalBackground = "transparent";
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
this.element.title = this.options.clickToEditText;
|
|
90
|
-
|
|
91
|
-
/*********************************************
|
|
92
|
-
* Edit
|
|
93
|
-
* The event to enter edit mode is changed
|
|
94
|
-
* from single-click to double-click.
|
|
95
|
-
*********************************************
|
|
96
|
-
this.onclickListener = this.enterEditMode.bindAsEventListener(this);
|
|
97
|
-
this.mouseoverListener = this.enterHover.bindAsEventListener(this);
|
|
98
|
-
this.mouseoutListener = this.leaveHover.bindAsEventListener(this);
|
|
99
|
-
Event.observe(this.element, 'click', this.onclickListener);
|
|
100
|
-
Event.observe(this.element, 'mouseover', this.mouseoverListener);
|
|
101
|
-
Event.observe(this.element, 'mouseout', this.mouseoutListener);
|
|
102
|
-
if (this.options.externalControl) {
|
|
103
|
-
Event.observe(this.options.externalControl, 'click', this.onclickListener);
|
|
104
|
-
Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener);
|
|
105
|
-
Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener);
|
|
106
|
-
}
|
|
107
|
-
*********************************************/
|
|
108
|
-
this.ondblclickListener = this.enterEditMode.bindAsEventListener(this);
|
|
109
|
-
this.mouseoverListener = this.enterHover.bindAsEventListener(this);
|
|
110
|
-
this.mouseoutListener = this.leaveHover.bindAsEventListener(this);
|
|
111
|
-
Event.observe(this.element, 'dblclick', this.ondblclickListener);
|
|
112
|
-
Event.observe(this.element, 'mouseover', this.mouseoverListener);
|
|
113
|
-
Event.observe(this.element, 'mouseout', this.mouseoutListener);
|
|
114
|
-
if (this.options.externalControl) {
|
|
115
|
-
Event.observe(this.options.externalControl, 'dblclick', this.ondblclickListener);
|
|
116
|
-
Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener);
|
|
117
|
-
Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener);
|
|
118
|
-
}
|
|
119
|
-
/*********************************************/
|
|
120
|
-
},
|
|
121
|
-
getText: function() {
|
|
122
|
-
return this.element.innerHTML.unescapeHTML();
|
|
123
|
-
},
|
|
124
|
-
onSubmit: function() {
|
|
125
|
-
var value = this.editField.value.escapeHTML();
|
|
126
|
-
if(value == '') {
|
|
127
|
-
this.onclickCancel();
|
|
128
|
-
return false;
|
|
129
|
-
} else {
|
|
130
|
-
this.onLoading();
|
|
131
|
-
this.element.innerHTML = value;
|
|
132
|
-
new InPlaceEditorEx(this.element.id, this.options);
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
removeForm: function() {
|
|
137
|
-
if(this.form) {
|
|
138
|
-
if(this.form.parentNode) {
|
|
139
|
-
var childNodes = this.form.parentNode.childNodes;
|
|
140
|
-
for(var i = 0; i < childNodes.length; i++) {
|
|
141
|
-
childNodes[i].data = '';
|
|
142
|
-
}
|
|
143
|
-
Element.remove(this.form);
|
|
144
|
-
}
|
|
145
|
-
this.form = null;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
});
|
|
@@ -1,232 +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 MenuBar = Class.create();
|
|
23
|
-
MenuBar.cssNames = {
|
|
24
|
-
container: 'menubar',
|
|
25
|
-
menu: 'menubar_menu',
|
|
26
|
-
menuBody: 'menubar_menuBody',
|
|
27
|
-
menuBodyHover: 'menubar_menuBodyHover',
|
|
28
|
-
subMenu: 'menubar_subMenu',
|
|
29
|
-
subMenuBody: 'menubar_subMenuBody',
|
|
30
|
-
subMenuBodyHover: 'menubar_subMenuBodyHover',
|
|
31
|
-
subMenuContainer: 'menubar_menuContainer',
|
|
32
|
-
dirMark: 'menubar_dirMark'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
MenuBar.idSuffixes = ['topContaier', 'menu', 'body'];
|
|
36
|
-
|
|
37
|
-
MenuBar.mark = {
|
|
38
|
-
dir: '>>'
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
MenuBar.prototype = {
|
|
42
|
-
|
|
43
|
-
initialize: function(element) {
|
|
44
|
-
this.options = Object.extend({
|
|
45
|
-
hideOnClickSubmenu: true,
|
|
46
|
-
cssPrefix: 'custom_'
|
|
47
|
-
}, arguments[1] || {});
|
|
48
|
-
|
|
49
|
-
this.element = $(element);
|
|
50
|
-
Element.setStyle(this.element, {visibility: 'hidden'});
|
|
51
|
-
Element.hide(this.element);
|
|
52
|
-
|
|
53
|
-
this.classNames = CssUtil.getInstance(
|
|
54
|
-
this.options.cssPrefix, MenuBar.cssNames).allJoinClassNames();
|
|
55
|
-
this.baseIds = SpinelzUtil.concat(this.element.id, MenuBar.idSuffixes);
|
|
56
|
-
this.menuIds = [];
|
|
57
|
-
this.clicked = [];
|
|
58
|
-
|
|
59
|
-
this.element.innerHTML = this.build(this.element);
|
|
60
|
-
this.menubar = $(this.baseIds.topContaier);
|
|
61
|
-
this.setEvent();
|
|
62
|
-
|
|
63
|
-
Event.observe(document, "click", this.hideAllTrigger(this.menubar).bindAsEventListener(this));
|
|
64
|
-
Element.setStyle(this.element, {visibility: 'visible'});
|
|
65
|
-
Element.show(this.element);
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
build: function(element) {
|
|
69
|
-
var menuNodes = $A(element.childNodes).inject('', function(nodes, node) {
|
|
70
|
-
return nodes + (Element.isElementNode(node) ? this.buildMenu(node, 'menu') : '');
|
|
71
|
-
}.bind(this));
|
|
72
|
-
return "<div id='" + this.baseIds.topContaier + "'class='" + this.classNames['container'] + "'>" + menuNodes + "</div>";
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
buildMenu: function(element, classKey) {
|
|
76
|
-
var bodyText = '';
|
|
77
|
-
var subMenuHtml = '';
|
|
78
|
-
$A(element.childNodes).each(function(node) {
|
|
79
|
-
if (Element.isTextNode(node)) {
|
|
80
|
-
bodyText += node.nodeValue;
|
|
81
|
-
} else if (Element.isElementNode(node)) {
|
|
82
|
-
if (Element.hasTagName(node, 'div')) {
|
|
83
|
-
subMenuHtml += this.buildMenu(node, 'subMenu');
|
|
84
|
-
} else {
|
|
85
|
-
bodyText += Element.outerHTML(node);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}.bind(this));
|
|
89
|
-
|
|
90
|
-
var dirMark = '';
|
|
91
|
-
if (subMenuHtml != '') {
|
|
92
|
-
if (classKey == 'subMenu') {
|
|
93
|
-
dirMark = "<div class='" + this.classNames['dirMark'] + "'>" + MenuBar.mark.dir + "</div>";
|
|
94
|
-
}
|
|
95
|
-
subMenuHtml =
|
|
96
|
-
"<div style='visibility: hidden;' class='" + this.classNames['subMenuContainer'] + "'>" +
|
|
97
|
-
subMenuHtml +
|
|
98
|
-
"</div>";
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
var menuId = SpinelzUtil.getId(this.baseIds.menu);
|
|
102
|
-
var bodyId = SpinelzUtil.getId(this.baseIds.body);
|
|
103
|
-
this.menuIds.push({menu: menuId, body: bodyId});
|
|
104
|
-
|
|
105
|
-
var html =
|
|
106
|
-
"<div id='" + menuId + "'class='" + this.classNames[classKey] + "'>" +
|
|
107
|
-
"<div id='" + bodyId + "' class='" + this.classNames[classKey + 'Body'] + "'>" +
|
|
108
|
-
bodyText + dirMark +
|
|
109
|
-
"</div>" +
|
|
110
|
-
subMenuHtml +
|
|
111
|
-
"</div>";
|
|
112
|
-
return html;
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
setEvent: function() {
|
|
116
|
-
this.menuIds.each(function(idSet) {
|
|
117
|
-
new Hover(idSet.body);
|
|
118
|
-
Event.observe(idSet.menu, "click", this.onClick.bindAsEventListener(this, $(idSet.body)));
|
|
119
|
-
}.bind(this));
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
onClick: function(event, menuBody) {
|
|
123
|
-
var menu = menuBody.parentNode;
|
|
124
|
-
var parentContainer = this.getParentContainer(menu);
|
|
125
|
-
|
|
126
|
-
var container = this.getContainer(menu);
|
|
127
|
-
var className = MenuBar.cssNames.menu;
|
|
128
|
-
if (Element.hasClassName(menu, className)) {
|
|
129
|
-
if (this.clicked.length > 0) {
|
|
130
|
-
this.hideAll(this.menubar);
|
|
131
|
-
this.clicked = [];
|
|
132
|
-
}
|
|
133
|
-
if (container) this.showAtBottom(container, menuBody);
|
|
134
|
-
|
|
135
|
-
} else {
|
|
136
|
-
if (container) {
|
|
137
|
-
var lastMenuBody = this.clicked.pop();
|
|
138
|
-
var lastMenu = lastMenuBody.parentNode;
|
|
139
|
-
var lastContainer = this.getContainer(lastMenu);
|
|
140
|
-
var lastParentContainer = this.getParentContainer(lastMenu);
|
|
141
|
-
|
|
142
|
-
if (lastMenu == menu) {
|
|
143
|
-
this.hide(container);
|
|
144
|
-
} else if (Element.hasClassName(lastContainer, MenuBar.cssNames.container)) {
|
|
145
|
-
this.clicked.push(last);
|
|
146
|
-
} else if (lastParentContainer == parentContainer) {
|
|
147
|
-
this.hide(lastContainer);
|
|
148
|
-
} else {
|
|
149
|
-
this.clicked.push(lastMenuBody);
|
|
150
|
-
}
|
|
151
|
-
this.showAtLeft(container, menu);
|
|
152
|
-
} else if (this.options.hideOnClickSubmenu) {
|
|
153
|
-
this.hideAll(this.menubar);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (container) this.clicked.push(menuBody);
|
|
158
|
-
Event.stop(event);
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
showAtBottom: function(contents, menuBody) {
|
|
162
|
-
var offset = Position.positionedOffset(menuBody);
|
|
163
|
-
var height = 0;
|
|
164
|
-
|
|
165
|
-
if (menuBody.style.height) height = Element.getHeight(menuBody);
|
|
166
|
-
else height = menuBody.clientHeight;
|
|
167
|
-
height += offset[1];
|
|
168
|
-
height += (UserAgent.isIE()) ? 4 : 3;
|
|
169
|
-
|
|
170
|
-
contents.style.top = height + 'px';
|
|
171
|
-
contents.style.left = offset[0] + 'px';
|
|
172
|
-
|
|
173
|
-
this.show(contents);
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
showAtLeft: function(contents, menuBody) {
|
|
177
|
-
var offset = Position.positionedOffset(menuBody);
|
|
178
|
-
|
|
179
|
-
contents.style.top = (offset[1] - 1) + 'px';
|
|
180
|
-
contents.style.left = (offset[0] + menuBody.offsetWidth + 2) + 'px';
|
|
181
|
-
|
|
182
|
-
this.show(contents);
|
|
183
|
-
},
|
|
184
|
-
|
|
185
|
-
hideAllTrigger: function(element) {
|
|
186
|
-
return function(event) {
|
|
187
|
-
if (!this.isMenuElement(Event.element(event))) this.hideAll(element);
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
hideAll: function(element) {
|
|
192
|
-
var nodes = element.childNodes;
|
|
193
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
194
|
-
if (nodes[i].nodeType == 1) {
|
|
195
|
-
if (Element.hasClassName(nodes[i], MenuBar.cssNames.subMenuContainer)) {
|
|
196
|
-
this.hide(nodes[i]);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
this.hideAll(nodes[i]);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
show: function(element) {
|
|
205
|
-
element.style.visibility = 'visible';
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
hide: function(element) {
|
|
209
|
-
element.style.visibility = 'hidden';
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
getContainer: function(element) {
|
|
213
|
-
|
|
214
|
-
if (!element) return;
|
|
215
|
-
return document.getElementsByClassName(MenuBar.cssNames.subMenuContainer, element)[0];
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
getParentContainer: function(element) {
|
|
219
|
-
var container = Element.getParentByClassName(MenuBar.cssNames.subMenuContainer, element);
|
|
220
|
-
if (!container) {
|
|
221
|
-
container = Element.getParentByClassName(MenuBar.cssNames.container, element);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
return container;
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
isMenuElement: function(element) {
|
|
228
|
-
return Element.hasClassName(element, MenuBar.cssNames.menuBodyHover)
|
|
229
|
-
|| Element.hasClassName(element, MenuBar.cssNames.subMenuBodyHover)
|
|
230
|
-
|| Element.hasClassName(element, MenuBar.cssNames.dirMark);
|
|
231
|
-
}
|
|
232
|
-
}
|