hurry 0.1.0
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/Gemfile +55 -0
- data/Rakefile +69 -0
- data/app/assets/audios/twilight-hole.mp3 +0 -0
- data/app/assets/files/arvind resume (1).doc +0 -0
- data/app/assets/files/toma v 0 1.ppt +0 -0
- data/app/assets/images/0d0a413.png +0 -0
- data/app/assets/images/120.jpg +0 -0
- data/app/assets/images/51.jpg +0 -0
- data/app/assets/images/Untitled Document +97 -0
- data/app/assets/images/Untitled Document~ +97 -0
- data/app/assets/images/access.png +0 -0
- data/app/assets/images/adv.png +0 -0
- data/app/assets/images/article.png +0 -0
- data/app/assets/images/audio_icon.jpg +0 -0
- data/app/assets/images/background.gif +0 -0
- data/app/assets/images/banners/111.jpg +0 -0
- data/app/assets/images/banners/90.jpg +0 -0
- data/app/assets/images/banners/userimg.png +0 -0
- data/app/assets/images/blog.png +0 -0
- data/app/assets/images/body.png +0 -0
- data/app/assets/images/cancel.png +0 -0
- data/app/assets/images/cat.png +0 -0
- data/app/assets/images/contributions_userimg2.png +0 -0
- data/app/assets/images/delete.png +0 -0
- data/app/assets/images/edit.png +0 -0
- data/app/assets/images/excel.jpg +0 -0
- data/app/assets/images/file.gif +0 -0
- data/app/assets/images/file.jpeg +0 -0
- data/app/assets/images/folder-closed.gif +0 -0
- data/app/assets/images/folder.gif +0 -0
- data/app/assets/images/group.png +0 -0
- data/app/assets/images/header.png +0 -0
- data/app/assets/images/icons.gif +0 -0
- data/app/assets/images/loading.gif +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/logout.png +0 -0
- data/app/assets/images/media.png +0 -0
- data/app/assets/images/minus.gif +0 -0
- data/app/assets/images/new.png +0 -0
- data/app/assets/images/page_manager.png +0 -0
- data/app/assets/images/pdf.png +0 -0
- data/app/assets/images/personal/ice glass.jpg +0 -0
- data/app/assets/images/plus.gif +0 -0
- data/app/assets/images/ppt.jpg +0 -0
- data/app/assets/images/profileimg.png +0 -0
- data/app/assets/images/rails.png +0 -0
- data/app/assets/images/setting.png +0 -0
- data/app/assets/images/status.png +0 -0
- data/app/assets/images/treeview-black-line.gif +0 -0
- data/app/assets/images/treeview-black.gif +0 -0
- data/app/assets/images/treeview-default-line.gif +0 -0
- data/app/assets/images/treeview-default.gif +0 -0
- data/app/assets/images/treeview-famfamfam-line.gif +0 -0
- data/app/assets/images/treeview-famfamfam.gif +0 -0
- data/app/assets/images/treeview-gray-line.gif +0 -0
- data/app/assets/images/treeview-gray.gif +0 -0
- data/app/assets/images/treeview-red-line.gif +0 -0
- data/app/assets/images/treeview-red.gif +0 -0
- data/app/assets/images/ui.dynatree.css +440 -0
- data/app/assets/images/user.png +0 -0
- data/app/assets/images/user1.png +0 -0
- data/app/assets/images/user_manager.png +0 -0
- data/app/assets/images/video_icon.jpg +0 -0
- data/app/assets/images/vline.gif +0 -0
- data/app/assets/images/word.png +0 -0
- data/app/assets/javascripts/application.js +9 -0
- data/app/assets/javascripts/bolt/articles.js.coffee +3 -0
- data/app/assets/javascripts/bolt/groups.js.coffee +3 -0
- data/app/assets/javascripts/bolt/user_groups.js.coffee +3 -0
- data/app/assets/javascripts/bolt/users_groups.js.coffee +3 -0
- data/app/assets/javascripts/imagebubble.js~ +68 -0
- data/app/assets/javascripts/javascript_functions.js +65 -0
- data/app/assets/javascripts/jquery.dynatree.js +3312 -0
- data/app/assets/javascripts/jquery.js +154 -0
- data/app/assets/javascripts/jquery.treeview.js +251 -0
- data/app/assets/javascripts/jquery_new.js +19 -0
- data/app/assets/javascripts/login.js +24 -0
- data/app/assets/javascripts/media.js +64 -0
- data/app/assets/javascripts/media.js.coffee +3 -0
- data/app/assets/javascripts/rails.js +132 -0
- data/app/assets/miscellaneous/1leader.flv +0 -0
- data/app/assets/miscellaneous/users_controller.1.rb +237 -0
- data/app/assets/stylesheets/application.css +8 -0
- data/app/assets/stylesheets/application.css~ +8 -0
- data/app/assets/stylesheets/bolt/articles.css.scss +3 -0
- data/app/assets/stylesheets/bolt/groups.css.scss +3 -0
- data/app/assets/stylesheets/bolt/user_groups.css.scss +3 -0
- data/app/assets/stylesheets/bolt/users_groups.css.scss +3 -0
- data/app/assets/stylesheets/bubble.css +28 -0
- data/app/assets/stylesheets/depot.css +26 -0
- data/app/assets/stylesheets/depot.css~ +34 -0
- data/app/assets/stylesheets/dropdown.css +49 -0
- data/app/assets/stylesheets/imagebubbles.css~ +32 -0
- data/app/assets/stylesheets/jquery.treeview.css +68 -0
- data/app/assets/stylesheets/media.css.scss +3 -0
- data/app/assets/stylesheets/mediamanager.css +10 -0
- data/app/assets/stylesheets/scaffolds.css +56 -0
- data/app/assets/stylesheets/scaffolds.css.scss +56 -0
- data/app/assets/stylesheets/ui.dynatree.css +440 -0
- data/app/assets/stylesheets/users_style.css +80 -0
- data/app/assets/videos/1leader.flv +0 -0
- data/app/controllers/application_controller.rb +7 -0
- data/app/controllers/application_controller.rb~ +3 -0
- data/app/controllers/articles_controller.rb~ +91 -0
- data/app/controllers/bolt/accesses_controller.rb +71 -0
- data/app/controllers/bolt/articles_categories_controller.rb +71 -0
- data/app/controllers/bolt/articles_controller.rb +97 -0
- data/app/controllers/bolt/articles_controller.rb~ +60 -0
- data/app/controllers/bolt/banners_controller.rb +58 -0
- data/app/controllers/bolt/blogs_controller.rb +82 -0
- data/app/controllers/bolt/bolt_controller.rb +234 -0
- data/app/controllers/bolt/bolt_controller.rb~ +201 -0
- data/app/controllers/bolt/categories_controller.rb +72 -0
- data/app/controllers/bolt/dashboard_controller.rb +14 -0
- data/app/controllers/bolt/dashboard_controller.rb~ +14 -0
- data/app/controllers/bolt/groups_controller.rb +100 -0
- data/app/controllers/bolt/groups_controller.rb~ +85 -0
- data/app/controllers/bolt/info_controller.rb +26 -0
- data/app/controllers/bolt/media_controller.rb +120 -0
- data/app/controllers/bolt/page_sections_controller.rb +58 -0
- data/app/controllers/bolt/pages_controller.rb +90 -0
- data/app/controllers/bolt/password_resets_controller.rb +66 -0
- data/app/controllers/bolt/settings_controller.rb +59 -0
- data/app/controllers/bolt/statuses_controller.rb +72 -0
- data/app/controllers/bolt/user_sessions_controller.rb +40 -0
- data/app/controllers/bolt/user_statuses_controller.rb +58 -0
- data/app/controllers/bolt/users_controller.rb +104 -0
- data/app/controllers/bolt/users_controller.rb~ +79 -0
- data/app/controllers/bolt/users_groups_controller.rb +99 -0
- data/app/controllers/bolt/users_groups_controller.rb~ +83 -0
- data/app/controllers/groups_controller.rb~ +83 -0
- data/app/controllers/users_groups_controller.rb~ +83 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/bolt/articles_helper.rb +2 -0
- data/app/helpers/bolt/bolt_helper.rb +208 -0
- data/app/helpers/bolt/bolt_helper.rb~ +208 -0
- data/app/helpers/bolt/config_helper.rb +46 -0
- data/app/helpers/bolt/config_helper.rb~ +46 -0
- data/app/helpers/bolt/groups_helper.rb +2 -0
- data/app/helpers/bolt/user_groups_helper.rb +2 -0
- data/app/helpers/bolt/users_groups_helper.rb +2 -0
- data/app/helpers/media_helper.rb +2 -0
- data/app/mailers/bolt/backbone_notification.rb~ +39 -0
- data/app/mailers/bolt/bolt_notification.rb +39 -0
- data/app/models/access.rb +5 -0
- data/app/models/article.rb +23 -0
- data/app/models/article.rb~ +3 -0
- data/app/models/articles_category.rb +12 -0
- data/app/models/blog.rb +5 -0
- data/app/models/bolt.rb +3 -0
- data/app/models/bolt.rb~ +5 -0
- data/app/models/bolt/group.rb~ +2 -0
- data/app/models/bolt/user.rb +56 -0
- data/app/models/bolt/user.rb~ +62 -0
- data/app/models/bolt/user_group.rb~ +3 -0
- data/app/models/bolt/user_session.rb +8 -0
- data/app/models/bolt/users_group.rb~ +2 -0
- data/app/models/category.rb +7 -0
- data/app/models/group.rb +8 -0
- data/app/models/group.rb~ +7 -0
- data/app/models/media_image.rb +19 -0
- data/app/models/media_images.rb +21 -0
- data/app/models/media_images.rb~ +21 -0
- data/app/models/medium.rb +8 -0
- data/app/models/page.rb +10 -0
- data/app/models/page_section.rb +3 -0
- data/app/models/setting.rb +3 -0
- data/app/models/status.rb +3 -0
- data/app/models/user_status.rb +3 -0
- data/app/models/users_group.rb +14 -0
- data/app/models/users_group.rb~ +6 -0
- data/app/views/bolt/accesses/_form.html.erb +13 -0
- data/app/views/bolt/accesses/_table.html.erb +17 -0
- data/app/views/bolt/accesses/_title.html.erb +9 -0
- data/app/views/bolt/accesses/index.html.erb +44 -0
- data/app/views/bolt/accesses/new.html.erb +18 -0
- data/app/views/bolt/accesses/show.html.erb +17 -0
- data/app/views/bolt/articles/_form.html.erb +113 -0
- data/app/views/bolt/articles/_form.html.erb~ +33 -0
- data/app/views/bolt/articles/_table.html.erb +29 -0
- data/app/views/bolt/articles/_table.html.erb~ +28 -0
- data/app/views/bolt/articles/_title.html.erb +9 -0
- data/app/views/bolt/articles/index.html.erb +37 -0
- data/app/views/bolt/articles/index.html.erb~ +10 -0
- data/app/views/bolt/articles/new.html.erb +16 -0
- data/app/views/bolt/articles/new.html.erb~ +18 -0
- data/app/views/bolt/articles/show.html.erb +17 -0
- data/app/views/bolt/articles/show.html.erb~ +17 -0
- data/app/views/bolt/articles_categories/_form.html.erb +13 -0
- data/app/views/bolt/articles_categories/_table.html.erb +18 -0
- data/app/views/bolt/articles_categories/index.html.erb +10 -0
- data/app/views/bolt/articles_categories/new.html.erb +18 -0
- data/app/views/bolt/articles_categories/show.html.erb +17 -0
- data/app/views/bolt/banners/_form.html.erb +13 -0
- data/app/views/bolt/banners/_table.html.erb +18 -0
- data/app/views/bolt/banners/index.html.erb +10 -0
- data/app/views/bolt/banners/new.html.erb +18 -0
- data/app/views/bolt/banners/show.html.erb +17 -0
- data/app/views/bolt/blogs/_form.html.erb +24 -0
- data/app/views/bolt/blogs/_table.html.erb +22 -0
- data/app/views/bolt/blogs/index.html.erb +33 -0
- data/app/views/bolt/blogs/new.html.erb +18 -0
- data/app/views/bolt/blogs/show.html.erb +17 -0
- data/app/views/bolt/bolt/index.html.erb +0 -0
- data/app/views/bolt/bolt/index.html.erb~ +3 -0
- data/app/views/bolt/bolt_notification/generate_new_password.erb +12 -0
- data/app/views/bolt/bolt_notification/new_user_information.erb +12 -0
- data/app/views/bolt/bolt_notification/password_reset_instructions.erb +11 -0
- data/app/views/bolt/categories/_form.html.erb +9 -0
- data/app/views/bolt/categories/_table.html.erb +17 -0
- data/app/views/bolt/categories/_title.html.erb +8 -0
- data/app/views/bolt/categories/index.html.erb +36 -0
- data/app/views/bolt/categories/new.html.erb +19 -0
- data/app/views/bolt/categories/show.html.erb +17 -0
- data/app/views/bolt/dashboard/index.html.erb +69 -0
- data/app/views/bolt/dashboard/index.html.erb~ +1 -0
- data/app/views/bolt/groups/_form.html.erb +18 -0
- data/app/views/bolt/groups/_form.html.erb~ +21 -0
- data/app/views/bolt/groups/_title.html.erb +5 -0
- data/app/views/bolt/groups/edit.html.erb +6 -0
- data/app/views/bolt/groups/index.html.erb +43 -0
- data/app/views/bolt/groups/index.html.erb~ +23 -0
- data/app/views/bolt/groups/new.html.erb +14 -0
- data/app/views/bolt/groups/new.html.erb~ +5 -0
- data/app/views/bolt/groups/show.html.erb +16 -0
- data/app/views/bolt/info/show.html.erb +43 -0
- data/app/views/bolt/info/show.html.erb~ +5 -0
- data/app/views/bolt/layouts/_left_navigation.html.erb +9 -0
- data/app/views/bolt/layouts/_left_navigation.html.erb~ +16 -0
- data/app/views/bolt/layouts/_right_navigation.html.erb +1 -0
- data/app/views/bolt/layouts/_right_navigation.html.erb~ +1 -0
- data/app/views/bolt/layouts/bolt_auth.html.erb +23 -0
- data/app/views/bolt/layouts/bolt_auth.html.erb~ +23 -0
- data/app/views/bolt/layouts/bolt_main.html.erb +86 -0
- data/app/views/bolt/layouts/bolt_main.html.erb~ +64 -0
- data/app/views/bolt/media/getfolderdatas.html.erb +31 -0
- data/app/views/bolt/media/index.html.erb +195 -0
- data/app/views/bolt/page_sections/_form.html.erb +21 -0
- data/app/views/bolt/page_sections/_table.html.erb +22 -0
- data/app/views/bolt/page_sections/index.html.erb +10 -0
- data/app/views/bolt/page_sections/new.html.erb +18 -0
- data/app/views/bolt/page_sections/show.html.erb +17 -0
- data/app/views/bolt/pages/_form.html.erb +166 -0
- data/app/views/bolt/pages/_form.html.erb~ +41 -0
- data/app/views/bolt/pages/_page_sections_form.html.erb +39 -0
- data/app/views/bolt/pages/_page_sections_form.html.erb~ +3 -0
- data/app/views/bolt/pages/_table.html.erb +29 -0
- data/app/views/bolt/pages/index.html.erb +34 -0
- data/app/views/bolt/pages/new.html.erb +18 -0
- data/app/views/bolt/pages/show.html.erb +18 -0
- data/app/views/bolt/password_resets/edit.html.erb +48 -0
- data/app/views/bolt/settings/_form.html.erb +25 -0
- data/app/views/bolt/settings/_table.html.erb +23 -0
- data/app/views/bolt/settings/index.html.erb +10 -0
- data/app/views/bolt/settings/new.html.erb +18 -0
- data/app/views/bolt/settings/show.html.erb +80 -0
- data/app/views/bolt/statuses/_form.html.erb +14 -0
- data/app/views/bolt/statuses/_table.html.erb +17 -0
- data/app/views/bolt/statuses/_title.html.erb +9 -0
- data/app/views/bolt/statuses/index.html.erb +37 -0
- data/app/views/bolt/statuses/new.html.erb +18 -0
- data/app/views/bolt/statuses/show.html.erb +17 -0
- data/app/views/bolt/user_sessions/new.html.erb +66 -0
- data/app/views/bolt/user_sessions_bk/new.html.erb +69 -0
- data/app/views/bolt/user_statuses/_form.html.erb +9 -0
- data/app/views/bolt/user_statuses/_table.html.erb +16 -0
- data/app/views/bolt/user_statuses/index.html.erb +10 -0
- data/app/views/bolt/user_statuses/new.html.erb +18 -0
- data/app/views/bolt/user_statuses/show.html.erb +17 -0
- data/app/views/bolt/users/_title.html.erb +8 -0
- data/app/views/bolt/users/index.html.erb +60 -0
- data/app/views/bolt/users/index.html.erb~ +35 -0
- data/app/views/bolt/users/new.html.erb +64 -0
- data/app/views/bolt/users/new.html.erb~ +46 -0
- data/app/views/bolt/users/response.json.builder~ +26 -0
- data/app/views/bolt/users/show.html.erb +130 -0
- data/app/views/bolt/users/show.html.erb~ +94 -0
- data/app/views/bolt/users_bk/_form.html.erb +77 -0
- data/app/views/bolt/users_bk/edit.html.erb +6 -0
- data/app/views/bolt/users_bk/index.html.erb +58 -0
- data/app/views/bolt/users_bk/index.html.erb~ +60 -0
- data/app/views/bolt/users_bk/new.html.erb +6 -0
- data/app/views/bolt/users_bk/show.html.erb +100 -0
- data/app/views/bolt/users_groups/_form.html.erb +25 -0
- data/app/views/bolt/users_groups/edit.html.erb +6 -0
- data/app/views/bolt/users_groups/index.html.erb +25 -0
- data/app/views/bolt/users_groups/new.html.erb +5 -0
- data/app/views/bolt/users_groups/show.html.erb +15 -0
- data/app/views/layouts/application.html.erb +18 -0
- data/app/views/layouts/application.html.erb~ +51 -0
- data/app/views/layouts/bolt_auth.html.erb +24 -0
- data/app/views/layouts/bolt_auth.html.erb~ +25 -0
- data/app/views/layouts/bolt_main.html.erb +142 -0
- data/app/views/layouts/bolt_main.html.erb~ +56 -0
- data/app/views/layouts/default_site.html.erb +81 -0
- data/app/views/user_groups/_form.html.erb +21 -0
- data/app/views/user_groups/edit.html.erb +6 -0
- data/app/views/user_groups/index.html.erb +32 -0
- data/app/views/user_groups/new.html.erb +5 -0
- data/app/views/user_groups/show.html.erb +10 -0
- data/config/application.rb +49 -0
- data/config/application.rb~ +48 -0
- data/config/boot.rb +6 -0
- data/config/database.yml +31 -0
- data/config/database.yml~ +25 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +30 -0
- data/config/environments/production.rb +60 -0
- data/config/environments/test.rb +39 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/inflections.rb +10 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/secret_token.rb +7 -0
- data/config/initializers/session_store.rb +8 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +101 -0
- data/config/routes.rb~ +81 -0
- data/db/migrate/20111028162853_create_bolt_users.rb +49 -0
- data/db/migrate/20111028162853_create_bolt_users.rb~ +49 -0
- data/db/migrate/20120302083233_create_articles.rb~ +15 -0
- data/db/migrate/20120307133203_create_groups.rb +10 -0
- data/db/migrate/20120307133203_create_groups.rb~ +9 -0
- data/db/migrate/20120308113354_create_users_groups.rb +10 -0
- data/db/migrate/20120308113354_create_users_groups.rb~ +10 -0
- data/db/migrate/20120309070442_create_articles.rb +18 -0
- data/db/migrate/20120312063336_create_blogs.rb +15 -0
- data/db/migrate/20120312071401_create_categories.rb +13 -0
- data/db/migrate/20120313051136_create_accesses.rb +13 -0
- data/db/migrate/20120313051206_create_statuses.rb +13 -0
- data/db/migrate/20120313061322_create_media.rb +18 -0
- data/db/migrate/20120313061459_create_media_images.rb +10 -0
- data/db/migrate/20120313085220_create_user_statuses.rb +13 -0
- data/db/migrate/20120314060252_create_articles_categories.rb +14 -0
- data/db/migrate/20120314110540_create_pages.rb +24 -0
- data/db/migrate/20120314110540_create_pages.rb~ +24 -0
- data/db/migrate/20120314110602_create_page_sections.rb +20 -0
- data/db/migrate/20120314110602_create_page_sections.rb~ +20 -0
- data/db/migrate/20120314110922_add_ancestry_to_page.rb +9 -0
- data/db/migrate/20120315071805_change_mediaimages_column.rb +8 -0
- data/db/migrate/20120319132523_create_settings.rb +18 -0
- data/db/schema.rb +169 -0
- data/db/seeds.rb +7 -0
- data/doc/README_FOR_APP +2 -0
- data/lib/tasks/tasks.rake +31 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/bolt/images/backbone.png +0 -0
- data/public/bolt/images/header.png +0 -0
- data/public/bolt/images/icons/add.png +0 -0
- data/public/bolt/images/icons/ajax-spinner.gif +0 -0
- data/public/bolt/images/icons/delete.png +0 -0
- data/public/bolt/images/icons/icons.gif +0 -0
- data/public/bolt/images/icons/loading.gif +0 -0
- data/public/bolt/images/icons/spinner-sm.gif +0 -0
- data/public/bolt/images/icons/spinner.png +0 -0
- data/public/bolt/images/icons/table.png +0 -0
- data/public/bolt/images/icons/vline.gif +0 -0
- data/public/bolt/images/login/bottom.png +0 -0
- data/public/bolt/images/login/top.png +0 -0
- data/public/bolt/images/nav.png +0 -0
- data/public/bolt/images/rightNav.png +0 -0
- data/public/bolt/images/rightNavButton.png +0 -0
- data/public/bolt/images/visitSiteNav.png +0 -0
- data/public/bolt/imagesx/backbone.png +0 -0
- data/public/bolt/imagesx/header.png +0 -0
- data/public/bolt/imagesx/icons/add.png +0 -0
- data/public/bolt/imagesx/icons/ajax-spinner.gif +0 -0
- data/public/bolt/imagesx/icons/delete.png +0 -0
- data/public/bolt/imagesx/icons/icons.gif +0 -0
- data/public/bolt/imagesx/icons/loading.gif +0 -0
- data/public/bolt/imagesx/icons/spinner-sm.gif +0 -0
- data/public/bolt/imagesx/icons/spinner.png +0 -0
- data/public/bolt/imagesx/icons/table.png +0 -0
- data/public/bolt/imagesx/icons/vline.gif +0 -0
- data/public/bolt/imagesx/login/bottom.png +0 -0
- data/public/bolt/imagesx/login/top.png +0 -0
- data/public/bolt/imagesx/nav.png +0 -0
- data/public/bolt/imagesx/rightNav.png +0 -0
- data/public/bolt/imagesx/rightNavButton.png +0 -0
- data/public/bolt/imagesx/visitSiteNav.png +0 -0
- data/public/bolt/javascripts/backbone.js +25 -0
- data/public/bolt/javascripts/custom.js +2 -0
- data/public/bolt/javascripts/jquery.js +154 -0
- data/public/bolt/javascripts/login.js +24 -0
- data/public/bolt/javascripts/rails.js +132 -0
- data/public/bolt/stylesheets/custom.css +82 -0
- data/public/bolt/stylesheets/custom.css~ +82 -0
- data/public/bolt/stylesheets/elements.css +316 -0
- data/public/bolt/stylesheets/elements.css~ +307 -0
- data/public/bolt/stylesheets/login.css +137 -0
- data/public/bolt/stylesheets/login.css~ +137 -0
- data/public/bolt/stylesheets/screen.css +224 -0
- data/public/bolt/stylesheets/screen.css~ +224 -0
- data/public/favicon.ico +0 -0
- data/public/images/article.png +0 -0
- data/public/images/backbone.png +0 -0
- data/public/images/cancel.png +0 -0
- data/public/images/cat.png +0 -0
- data/public/images/delete.png +0 -0
- data/public/images/edit.png +0 -0
- data/public/images/file.gif +0 -0
- data/public/images/folder-closed.gif +0 -0
- data/public/images/folder.gif +0 -0
- data/public/images/header.png +0 -0
- data/public/images/icons.gif +0 -0
- data/public/images/icons/add.png +0 -0
- data/public/images/icons/ajax-spinner.gif +0 -0
- data/public/images/icons/delete.png +0 -0
- data/public/images/icons/icons.gif +0 -0
- data/public/images/icons/loading.gif +0 -0
- data/public/images/icons/spinner-sm.gif +0 -0
- data/public/images/icons/spinner.png +0 -0
- data/public/images/icons/table.png +0 -0
- data/public/images/icons/vline.gif +0 -0
- data/public/images/ii.jpg +0 -0
- data/public/images/loading.gif +0 -0
- data/public/images/login/bottom.png +0 -0
- data/public/images/login/top.png +0 -0
- data/public/images/logo.png +0 -0
- data/public/images/logout.png +0 -0
- data/public/images/media.png +0 -0
- data/public/images/minus.gif +0 -0
- data/public/images/nav.png +0 -0
- data/public/images/new.png +0 -0
- data/public/images/plus.gif +0 -0
- data/public/images/profileimg.png +0 -0
- data/public/images/rails.png +0 -0
- data/public/images/rightNav.png +0 -0
- data/public/images/rightNavButton.png +0 -0
- data/public/images/treeview-black-line.gif +0 -0
- data/public/images/treeview-black.gif +0 -0
- data/public/images/treeview-default-line.gif +0 -0
- data/public/images/treeview-default.gif +0 -0
- data/public/images/treeview-famfamfam-line.gif +0 -0
- data/public/images/treeview-famfamfam.gif +0 -0
- data/public/images/treeview-gray-line.gif +0 -0
- data/public/images/treeview-gray.gif +0 -0
- data/public/images/treeview-red-line.gif +0 -0
- data/public/images/treeview-red.gif +0 -0
- data/public/images/ui.dynatree.css +440 -0
- data/public/images/user.png +0 -0
- data/public/images/user1.png +0 -0
- data/public/images/visitSiteNav.png +0 -0
- data/public/images/vline.gif +0 -0
- data/public/javascripts/backbone.js +25 -0
- data/public/javascripts/custom.js +2 -0
- data/public/javascripts/jquery.js +154 -0
- data/public/javascripts/login.js +24 -0
- data/public/javascripts/rails.js +132 -0
- data/public/jqueryui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/public/jqueryui/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/jqueryui/css/ui-lightness/jquery-ui-1.8.18.custom.css +336 -0
- data/public/jqueryui/development-bundle/AUTHORS.txt +30 -0
- data/public/jqueryui/development-bundle/GPL-LICENSE.txt +278 -0
- data/public/jqueryui/development-bundle/MIT-LICENSE.txt +25 -0
- data/public/jqueryui/development-bundle/demos/demos.css +334 -0
- data/public/jqueryui/development-bundle/demos/dialog/animated.html +56 -0
- data/public/jqueryui/development-bundle/demos/dialog/default.html +54 -0
- data/public/jqueryui/development-bundle/demos/dialog/index.html +23 -0
- data/public/jqueryui/development-bundle/demos/dialog/modal-confirmation.html +69 -0
- data/public/jqueryui/development-bundle/demos/dialog/modal-form.html +167 -0
- data/public/jqueryui/development-bundle/demos/dialog/modal-message.html +71 -0
- data/public/jqueryui/development-bundle/demos/dialog/modal.html +60 -0
- data/public/jqueryui/development-bundle/demos/draggable/constrain-movement.html +69 -0
- data/public/jqueryui/development-bundle/demos/draggable/cursor-style.html +49 -0
- data/public/jqueryui/development-bundle/demos/draggable/default.html +39 -0
- data/public/jqueryui/development-bundle/demos/draggable/delay-start.html +45 -0
- data/public/jqueryui/development-bundle/demos/draggable/events.html +77 -0
- data/public/jqueryui/development-bundle/demos/draggable/handle.html +50 -0
- data/public/jqueryui/development-bundle/demos/draggable/index.html +28 -0
- data/public/jqueryui/development-bundle/demos/draggable/revert.html +44 -0
- data/public/jqueryui/development-bundle/demos/draggable/scroll.html +51 -0
- data/public/jqueryui/development-bundle/demos/draggable/snap-to.html +68 -0
- data/public/jqueryui/development-bundle/demos/draggable/sortable.html +57 -0
- data/public/jqueryui/development-bundle/demos/draggable/visual-feedback.html +77 -0
- data/public/jqueryui/development-bundle/demos/droppable/accepted-elements.html +60 -0
- data/public/jqueryui/development-bundle/demos/droppable/default.html +53 -0
- data/public/jqueryui/development-bundle/demos/droppable/images/high_tatras.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/droppable/images/high_tatras2.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/droppable/images/high_tatras2_min.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/droppable/images/high_tatras3.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/droppable/images/high_tatras3_min.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/droppable/images/high_tatras4.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/droppable/images/high_tatras4_min.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/droppable/images/high_tatras_min.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/droppable/index.html +24 -0
- data/public/jqueryui/development-bundle/demos/droppable/photo-manager.html +184 -0
- data/public/jqueryui/development-bundle/demos/droppable/propagation.html +80 -0
- data/public/jqueryui/development-bundle/demos/droppable/revert.html +61 -0
- data/public/jqueryui/development-bundle/demos/droppable/shopping-cart.html +101 -0
- data/public/jqueryui/development-bundle/demos/droppable/visual-feedback.html +78 -0
- data/public/jqueryui/development-bundle/demos/images/calendar.gif +0 -0
- data/public/jqueryui/development-bundle/demos/images/demo-config-on-tile.gif +0 -0
- data/public/jqueryui/development-bundle/demos/images/demo-config-on.gif +0 -0
- data/public/jqueryui/development-bundle/demos/images/demo-spindown-closed.gif +0 -0
- data/public/jqueryui/development-bundle/demos/images/demo-spindown-open.gif +0 -0
- data/public/jqueryui/development-bundle/demos/images/icon-docs-info.gif +0 -0
- data/public/jqueryui/development-bundle/demos/images/pbar-ani.gif +0 -0
- data/public/jqueryui/development-bundle/demos/index.html +328 -0
- data/public/jqueryui/development-bundle/demos/position/cycler.html +122 -0
- data/public/jqueryui/development-bundle/demos/position/default.html +153 -0
- data/public/jqueryui/development-bundle/demos/position/images/earth.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/position/images/flight.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/position/images/rocket.jpg +0 -0
- data/public/jqueryui/development-bundle/demos/position/index.html +19 -0
- data/public/jqueryui/development-bundle/demos/resizable/animate.html +43 -0
- data/public/jqueryui/development-bundle/demos/resizable/aspect-ratio.html +42 -0
- data/public/jqueryui/development-bundle/demos/resizable/constrain-area.html +47 -0
- data/public/jqueryui/development-bundle/demos/resizable/default.html +40 -0
- data/public/jqueryui/development-bundle/demos/resizable/delay-start.html +52 -0
- data/public/jqueryui/development-bundle/demos/resizable/helper.html +43 -0
- data/public/jqueryui/development-bundle/demos/resizable/index.html +28 -0
- data/public/jqueryui/development-bundle/demos/resizable/max-min.html +45 -0
- data/public/jqueryui/development-bundle/demos/resizable/snap-to-grid.html +42 -0
- data/public/jqueryui/development-bundle/demos/resizable/synchronous-resize.html +49 -0
- data/public/jqueryui/development-bundle/demos/resizable/textarea.html +41 -0
- data/public/jqueryui/development-bundle/demos/resizable/visual-feedback.html +43 -0
- data/public/jqueryui/development-bundle/demos/selectable/default.html +50 -0
- data/public/jqueryui/development-bundle/demos/selectable/display-grid.html +55 -0
- data/public/jqueryui/development-bundle/demos/selectable/index.html +20 -0
- data/public/jqueryui/development-bundle/demos/selectable/serialize.html +61 -0
- data/public/jqueryui/development-bundle/demos/sortable/connect-lists-through-tabs.html +78 -0
- data/public/jqueryui/development-bundle/demos/sortable/connect-lists.html +58 -0
- data/public/jqueryui/development-bundle/demos/sortable/default.html +51 -0
- data/public/jqueryui/development-bundle/demos/sortable/delay-start.html +67 -0
- data/public/jqueryui/development-bundle/demos/sortable/display-grid.html +54 -0
- data/public/jqueryui/development-bundle/demos/sortable/empty-lists.html +69 -0
- data/public/jqueryui/development-bundle/demos/sortable/index.html +26 -0
- data/public/jqueryui/development-bundle/demos/sortable/items.html +70 -0
- data/public/jqueryui/development-bundle/demos/sortable/placeholder.html +56 -0
- data/public/jqueryui/development-bundle/demos/sortable/portlets.html +96 -0
- data/public/jqueryui/development-bundle/docs/dialog.html +1698 -0
- data/public/jqueryui/development-bundle/docs/draggable.html +1577 -0
- data/public/jqueryui/development-bundle/docs/droppable.html +829 -0
- data/public/jqueryui/development-bundle/docs/position.html +245 -0
- data/public/jqueryui/development-bundle/docs/resizable.html +1201 -0
- data/public/jqueryui/development-bundle/docs/selectable.html +848 -0
- data/public/jqueryui/development-bundle/docs/sortable.html +1953 -0
- data/public/jqueryui/development-bundle/external/jquery.bgiframe-2.1.2.js +39 -0
- data/public/jqueryui/development-bundle/external/jquery.cookie.js +89 -0
- data/public/jqueryui/development-bundle/external/jquery.metadata.js +122 -0
- data/public/jqueryui/development-bundle/external/qunit.css +225 -0
- data/public/jqueryui/development-bundle/external/qunit.js +1448 -0
- data/public/jqueryui/development-bundle/jquery-1.7.1.js +9266 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-icons_222222_256x240.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-icons_454545_256x240.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-icons_888888_256x240.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/jqueryui/development-bundle/themes/base/jquery.ui.all.css +11 -0
- data/public/jqueryui/development-bundle/themes/base/jquery.ui.base.css +4 -0
- data/public/jqueryui/development-bundle/themes/base/jquery.ui.core.css +38 -0
- data/public/jqueryui/development-bundle/themes/base/jquery.ui.dialog.css +21 -0
- data/public/jqueryui/development-bundle/themes/base/jquery.ui.resizable.css +20 -0
- data/public/jqueryui/development-bundle/themes/base/jquery.ui.selectable.css +10 -0
- data/public/jqueryui/development-bundle/themes/base/jquery.ui.theme.css +247 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/jquery-ui-1.8.18.custom.css +336 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/jquery.ui.all.css +11 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/jquery.ui.base.css +4 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/jquery.ui.core.css +38 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/jquery.ui.dialog.css +21 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/jquery.ui.resizable.css +20 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/jquery.ui.selectable.css +10 -0
- data/public/jqueryui/development-bundle/themes/ui-lightness/jquery.ui.theme.css +249 -0
- data/public/jqueryui/development-bundle/ui/jquery-ui-1.8.18.custom.js +5206 -0
- data/public/jqueryui/development-bundle/ui/jquery.ui.core.js +319 -0
- data/public/jqueryui/development-bundle/ui/jquery.ui.dialog.js +878 -0
- data/public/jqueryui/development-bundle/ui/jquery.ui.draggable.js +825 -0
- data/public/jqueryui/development-bundle/ui/jquery.ui.droppable.js +296 -0
- data/public/jqueryui/development-bundle/ui/jquery.ui.mouse.js +162 -0
- data/public/jqueryui/development-bundle/ui/jquery.ui.position.js +298 -0
- data/public/jqueryui/development-bundle/ui/jquery.ui.resizable.js +808 -0
- data/public/jqueryui/development-bundle/ui/jquery.ui.selectable.js +267 -0
- data/public/jqueryui/development-bundle/ui/jquery.ui.sortable.js +1081 -0
- data/public/jqueryui/development-bundle/ui/jquery.ui.widget.js +272 -0
- data/public/jqueryui/development-bundle/ui/minified/jquery.ui.core.min.js +9 -0
- data/public/jqueryui/development-bundle/ui/minified/jquery.ui.dialog.min.js +18 -0
- data/public/jqueryui/development-bundle/ui/minified/jquery.ui.draggable.min.js +14 -0
- data/public/jqueryui/development-bundle/ui/minified/jquery.ui.droppable.min.js +15 -0
- data/public/jqueryui/development-bundle/ui/minified/jquery.ui.mouse.min.js +12 -0
- data/public/jqueryui/development-bundle/ui/minified/jquery.ui.position.min.js +9 -0
- data/public/jqueryui/development-bundle/ui/minified/jquery.ui.resizable.min.js +14 -0
- data/public/jqueryui/development-bundle/ui/minified/jquery.ui.selectable.min.js +14 -0
- data/public/jqueryui/development-bundle/ui/minified/jquery.ui.sortable.min.js +14 -0
- data/public/jqueryui/development-bundle/ui/minified/jquery.ui.widget.min.js +9 -0
- data/public/jqueryui/development-bundle/version.txt +1 -0
- data/public/jqueryui/js/jquery-1.7.1.min.js +4 -0
- data/public/jqueryui/js/jquery-ui-1.8.18.custom.min.js +119 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/custom.css +91 -0
- data/public/stylesheets/custom.css~ +82 -0
- data/public/stylesheets/elements.css +315 -0
- data/public/stylesheets/elements.css~ +307 -0
- data/public/stylesheets/login.css +137 -0
- data/public/stylesheets/login.css~ +137 -0
- data/public/stylesheets/screen.css +224 -0
- data/public/stylesheets/screen.css~ +224 -0
- data/script/rails +6 -0
- data/test/fixtures/bolt/groups.yml +7 -0
- data/test/fixtures/bolt/users_groups.yml +9 -0
- data/test/fixtures/media.yml +13 -0
- data/test/fixtures/media_images.yml +9 -0
- data/test/functional/bolt/groups_controller_test.rb +49 -0
- data/test/functional/bolt/users_groups_controller_test.rb +49 -0
- data/test/functional/media_controller_test.rb +49 -0
- data/test/performance/browsing_test.rb +12 -0
- data/test/test_helper.rb +13 -0
- data/test/unit/bolt/group_test.rb +7 -0
- data/test/unit/bolt/users_group_test.rb +7 -0
- data/test/unit/helpers/bolt/groups_helper_test.rb +4 -0
- data/test/unit/helpers/bolt/users_groups_helper_test.rb +4 -0
- data/test/unit/helpers/media_helper_test.rb +4 -0
- data/test/unit/media_images_test.rb +7 -0
- data/test/unit/medium_test.rb +7 -0
- metadata +716 -0
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* jQuery UI 1.8.18
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
|
5
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
6
|
+
* http://jquery.org/license
|
|
7
|
+
*
|
|
8
|
+
* http://docs.jquery.com/UI
|
|
9
|
+
*/
|
|
10
|
+
(function( $, undefined ) {
|
|
11
|
+
|
|
12
|
+
// prevent duplicate loading
|
|
13
|
+
// this is only a problem because we proxy existing functions
|
|
14
|
+
// and we don't want to double proxy them
|
|
15
|
+
$.ui = $.ui || {};
|
|
16
|
+
if ( $.ui.version ) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
$.extend( $.ui, {
|
|
21
|
+
version: "1.8.18",
|
|
22
|
+
|
|
23
|
+
keyCode: {
|
|
24
|
+
ALT: 18,
|
|
25
|
+
BACKSPACE: 8,
|
|
26
|
+
CAPS_LOCK: 20,
|
|
27
|
+
COMMA: 188,
|
|
28
|
+
COMMAND: 91,
|
|
29
|
+
COMMAND_LEFT: 91, // COMMAND
|
|
30
|
+
COMMAND_RIGHT: 93,
|
|
31
|
+
CONTROL: 17,
|
|
32
|
+
DELETE: 46,
|
|
33
|
+
DOWN: 40,
|
|
34
|
+
END: 35,
|
|
35
|
+
ENTER: 13,
|
|
36
|
+
ESCAPE: 27,
|
|
37
|
+
HOME: 36,
|
|
38
|
+
INSERT: 45,
|
|
39
|
+
LEFT: 37,
|
|
40
|
+
MENU: 93, // COMMAND_RIGHT
|
|
41
|
+
NUMPAD_ADD: 107,
|
|
42
|
+
NUMPAD_DECIMAL: 110,
|
|
43
|
+
NUMPAD_DIVIDE: 111,
|
|
44
|
+
NUMPAD_ENTER: 108,
|
|
45
|
+
NUMPAD_MULTIPLY: 106,
|
|
46
|
+
NUMPAD_SUBTRACT: 109,
|
|
47
|
+
PAGE_DOWN: 34,
|
|
48
|
+
PAGE_UP: 33,
|
|
49
|
+
PERIOD: 190,
|
|
50
|
+
RIGHT: 39,
|
|
51
|
+
SHIFT: 16,
|
|
52
|
+
SPACE: 32,
|
|
53
|
+
TAB: 9,
|
|
54
|
+
UP: 38,
|
|
55
|
+
WINDOWS: 91 // COMMAND
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// plugins
|
|
60
|
+
$.fn.extend({
|
|
61
|
+
propAttr: $.fn.prop || $.fn.attr,
|
|
62
|
+
|
|
63
|
+
_focus: $.fn.focus,
|
|
64
|
+
focus: function( delay, fn ) {
|
|
65
|
+
return typeof delay === "number" ?
|
|
66
|
+
this.each(function() {
|
|
67
|
+
var elem = this;
|
|
68
|
+
setTimeout(function() {
|
|
69
|
+
$( elem ).focus();
|
|
70
|
+
if ( fn ) {
|
|
71
|
+
fn.call( elem );
|
|
72
|
+
}
|
|
73
|
+
}, delay );
|
|
74
|
+
}) :
|
|
75
|
+
this._focus.apply( this, arguments );
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
scrollParent: function() {
|
|
79
|
+
var scrollParent;
|
|
80
|
+
if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
|
|
81
|
+
scrollParent = this.parents().filter(function() {
|
|
82
|
+
return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
|
|
83
|
+
}).eq(0);
|
|
84
|
+
} else {
|
|
85
|
+
scrollParent = this.parents().filter(function() {
|
|
86
|
+
return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
|
|
87
|
+
}).eq(0);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
zIndex: function( zIndex ) {
|
|
94
|
+
if ( zIndex !== undefined ) {
|
|
95
|
+
return this.css( "zIndex", zIndex );
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if ( this.length ) {
|
|
99
|
+
var elem = $( this[ 0 ] ), position, value;
|
|
100
|
+
while ( elem.length && elem[ 0 ] !== document ) {
|
|
101
|
+
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
|
102
|
+
// This makes behavior of this function consistent across browsers
|
|
103
|
+
// WebKit always returns auto if the element is positioned
|
|
104
|
+
position = elem.css( "position" );
|
|
105
|
+
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
|
|
106
|
+
// IE returns 0 when zIndex is not specified
|
|
107
|
+
// other browsers return a string
|
|
108
|
+
// we ignore the case of nested elements with an explicit value of 0
|
|
109
|
+
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
|
110
|
+
value = parseInt( elem.css( "zIndex" ), 10 );
|
|
111
|
+
if ( !isNaN( value ) && value !== 0 ) {
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
elem = elem.parent();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return 0;
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
disableSelection: function() {
|
|
123
|
+
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
|
|
124
|
+
".ui-disableSelection", function( event ) {
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
});
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
enableSelection: function() {
|
|
130
|
+
return this.unbind( ".ui-disableSelection" );
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
$.each( [ "Width", "Height" ], function( i, name ) {
|
|
135
|
+
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
|
|
136
|
+
type = name.toLowerCase(),
|
|
137
|
+
orig = {
|
|
138
|
+
innerWidth: $.fn.innerWidth,
|
|
139
|
+
innerHeight: $.fn.innerHeight,
|
|
140
|
+
outerWidth: $.fn.outerWidth,
|
|
141
|
+
outerHeight: $.fn.outerHeight
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
function reduce( elem, size, border, margin ) {
|
|
145
|
+
$.each( side, function() {
|
|
146
|
+
size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
|
|
147
|
+
if ( border ) {
|
|
148
|
+
size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
|
|
149
|
+
}
|
|
150
|
+
if ( margin ) {
|
|
151
|
+
size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
return size;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
$.fn[ "inner" + name ] = function( size ) {
|
|
158
|
+
if ( size === undefined ) {
|
|
159
|
+
return orig[ "inner" + name ].call( this );
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return this.each(function() {
|
|
163
|
+
$( this ).css( type, reduce( this, size ) + "px" );
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
$.fn[ "outer" + name] = function( size, margin ) {
|
|
168
|
+
if ( typeof size !== "number" ) {
|
|
169
|
+
return orig[ "outer" + name ].call( this, size );
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return this.each(function() {
|
|
173
|
+
$( this).css( type, reduce( this, size, true, margin ) + "px" );
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// selectors
|
|
179
|
+
function focusable( element, isTabIndexNotNaN ) {
|
|
180
|
+
var nodeName = element.nodeName.toLowerCase();
|
|
181
|
+
if ( "area" === nodeName ) {
|
|
182
|
+
var map = element.parentNode,
|
|
183
|
+
mapName = map.name,
|
|
184
|
+
img;
|
|
185
|
+
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
img = $( "img[usemap=#" + mapName + "]" )[0];
|
|
189
|
+
return !!img && visible( img );
|
|
190
|
+
}
|
|
191
|
+
return ( /input|select|textarea|button|object/.test( nodeName )
|
|
192
|
+
? !element.disabled
|
|
193
|
+
: "a" == nodeName
|
|
194
|
+
? element.href || isTabIndexNotNaN
|
|
195
|
+
: isTabIndexNotNaN)
|
|
196
|
+
// the element and all of its ancestors must be visible
|
|
197
|
+
&& visible( element );
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function visible( element ) {
|
|
201
|
+
return !$( element ).parents().andSelf().filter(function() {
|
|
202
|
+
return $.curCSS( this, "visibility" ) === "hidden" ||
|
|
203
|
+
$.expr.filters.hidden( this );
|
|
204
|
+
}).length;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
$.extend( $.expr[ ":" ], {
|
|
208
|
+
data: function( elem, i, match ) {
|
|
209
|
+
return !!$.data( elem, match[ 3 ] );
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
focusable: function( element ) {
|
|
213
|
+
return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
tabbable: function( element ) {
|
|
217
|
+
var tabIndex = $.attr( element, "tabindex" ),
|
|
218
|
+
isTabIndexNaN = isNaN( tabIndex );
|
|
219
|
+
return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
// support
|
|
224
|
+
$(function() {
|
|
225
|
+
var body = document.body,
|
|
226
|
+
div = body.appendChild( div = document.createElement( "div" ) );
|
|
227
|
+
|
|
228
|
+
// access offsetHeight before setting the style to prevent a layout bug
|
|
229
|
+
// in IE 9 which causes the elemnt to continue to take up space even
|
|
230
|
+
// after it is removed from the DOM (#8026)
|
|
231
|
+
div.offsetHeight;
|
|
232
|
+
|
|
233
|
+
$.extend( div.style, {
|
|
234
|
+
minHeight: "100px",
|
|
235
|
+
height: "auto",
|
|
236
|
+
padding: 0,
|
|
237
|
+
borderWidth: 0
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
$.support.minHeight = div.offsetHeight === 100;
|
|
241
|
+
$.support.selectstart = "onselectstart" in div;
|
|
242
|
+
|
|
243
|
+
// set display to none to avoid a layout bug in IE
|
|
244
|
+
// http://dev.jquery.com/ticket/4014
|
|
245
|
+
body.removeChild( div ).style.display = "none";
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
// deprecated
|
|
253
|
+
$.extend( $.ui, {
|
|
254
|
+
// $.ui.plugin is deprecated. Use the proxy pattern instead.
|
|
255
|
+
plugin: {
|
|
256
|
+
add: function( module, option, set ) {
|
|
257
|
+
var proto = $.ui[ module ].prototype;
|
|
258
|
+
for ( var i in set ) {
|
|
259
|
+
proto.plugins[ i ] = proto.plugins[ i ] || [];
|
|
260
|
+
proto.plugins[ i ].push( [ option, set[ i ] ] );
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
call: function( instance, name, args ) {
|
|
264
|
+
var set = instance.plugins[ name ];
|
|
265
|
+
if ( !set || !instance.element[ 0 ].parentNode ) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
for ( var i = 0; i < set.length; i++ ) {
|
|
270
|
+
if ( instance.options[ set[ i ][ 0 ] ] ) {
|
|
271
|
+
set[ i ][ 1 ].apply( instance.element, args );
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
|
|
277
|
+
// will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
|
|
278
|
+
contains: function( a, b ) {
|
|
279
|
+
return document.compareDocumentPosition ?
|
|
280
|
+
a.compareDocumentPosition( b ) & 16 :
|
|
281
|
+
a !== b && a.contains( b );
|
|
282
|
+
},
|
|
283
|
+
|
|
284
|
+
// only used by resizable
|
|
285
|
+
hasScroll: function( el, a ) {
|
|
286
|
+
|
|
287
|
+
//If overflow is hidden, the element might have extra content, but the user wants to hide it
|
|
288
|
+
if ( $( el ).css( "overflow" ) === "hidden") {
|
|
289
|
+
return false;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
|
|
293
|
+
has = false;
|
|
294
|
+
|
|
295
|
+
if ( el[ scroll ] > 0 ) {
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// TODO: determine which cases actually cause this to happen
|
|
300
|
+
// if the element doesn't have the scroll set, see if it's possible to
|
|
301
|
+
// set the scroll
|
|
302
|
+
el[ scroll ] = 1;
|
|
303
|
+
has = ( el[ scroll ] > 0 );
|
|
304
|
+
el[ scroll ] = 0;
|
|
305
|
+
return has;
|
|
306
|
+
},
|
|
307
|
+
|
|
308
|
+
// these are odd functions, fix the API or move into individual plugins
|
|
309
|
+
isOverAxis: function( x, reference, size ) {
|
|
310
|
+
//Determines when x coordinate is over "b" element axis
|
|
311
|
+
return ( x > reference ) && ( x < ( reference + size ) );
|
|
312
|
+
},
|
|
313
|
+
isOver: function( y, x, top, left, height, width ) {
|
|
314
|
+
//Determines when x, y coordinates is over "b" element
|
|
315
|
+
return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
})( jQuery );
|
|
@@ -0,0 +1,878 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* jQuery UI Dialog 1.8.18
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
|
5
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
6
|
+
* http://jquery.org/license
|
|
7
|
+
*
|
|
8
|
+
* http://docs.jquery.com/UI/Dialog
|
|
9
|
+
*
|
|
10
|
+
* Depends:
|
|
11
|
+
* jquery.ui.core.js
|
|
12
|
+
* jquery.ui.widget.js
|
|
13
|
+
* jquery.ui.button.js
|
|
14
|
+
* jquery.ui.draggable.js
|
|
15
|
+
* jquery.ui.mouse.js
|
|
16
|
+
* jquery.ui.position.js
|
|
17
|
+
* jquery.ui.resizable.js
|
|
18
|
+
*/
|
|
19
|
+
(function( $, undefined ) {
|
|
20
|
+
|
|
21
|
+
var uiDialogClasses =
|
|
22
|
+
'ui-dialog ' +
|
|
23
|
+
'ui-widget ' +
|
|
24
|
+
'ui-widget-content ' +
|
|
25
|
+
'ui-corner-all ',
|
|
26
|
+
sizeRelatedOptions = {
|
|
27
|
+
buttons: true,
|
|
28
|
+
height: true,
|
|
29
|
+
maxHeight: true,
|
|
30
|
+
maxWidth: true,
|
|
31
|
+
minHeight: true,
|
|
32
|
+
minWidth: true,
|
|
33
|
+
width: true
|
|
34
|
+
},
|
|
35
|
+
resizableRelatedOptions = {
|
|
36
|
+
maxHeight: true,
|
|
37
|
+
maxWidth: true,
|
|
38
|
+
minHeight: true,
|
|
39
|
+
minWidth: true
|
|
40
|
+
},
|
|
41
|
+
// support for jQuery 1.3.2 - handle common attrFn methods for dialog
|
|
42
|
+
attrFn = $.attrFn || {
|
|
43
|
+
val: true,
|
|
44
|
+
css: true,
|
|
45
|
+
html: true,
|
|
46
|
+
text: true,
|
|
47
|
+
data: true,
|
|
48
|
+
width: true,
|
|
49
|
+
height: true,
|
|
50
|
+
offset: true,
|
|
51
|
+
click: true
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
$.widget("ui.dialog", {
|
|
55
|
+
options: {
|
|
56
|
+
autoOpen: true,
|
|
57
|
+
buttons: {},
|
|
58
|
+
closeOnEscape: true,
|
|
59
|
+
closeText: 'close',
|
|
60
|
+
dialogClass: '',
|
|
61
|
+
draggable: true,
|
|
62
|
+
hide: null,
|
|
63
|
+
height: 'auto',
|
|
64
|
+
maxHeight: false,
|
|
65
|
+
maxWidth: false,
|
|
66
|
+
minHeight: 150,
|
|
67
|
+
minWidth: 150,
|
|
68
|
+
modal: false,
|
|
69
|
+
position: {
|
|
70
|
+
my: 'center',
|
|
71
|
+
at: 'center',
|
|
72
|
+
collision: 'fit',
|
|
73
|
+
// ensure that the titlebar is never outside the document
|
|
74
|
+
using: function(pos) {
|
|
75
|
+
var topOffset = $(this).css(pos).offset().top;
|
|
76
|
+
if (topOffset < 0) {
|
|
77
|
+
$(this).css('top', pos.top - topOffset);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
resizable: true,
|
|
82
|
+
show: null,
|
|
83
|
+
stack: true,
|
|
84
|
+
title: '',
|
|
85
|
+
width: 300,
|
|
86
|
+
zIndex: 1000
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
_create: function() {
|
|
90
|
+
this.originalTitle = this.element.attr('title');
|
|
91
|
+
// #5742 - .attr() might return a DOMElement
|
|
92
|
+
if ( typeof this.originalTitle !== "string" ) {
|
|
93
|
+
this.originalTitle = "";
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
this.options.title = this.options.title || this.originalTitle;
|
|
97
|
+
var self = this,
|
|
98
|
+
options = self.options,
|
|
99
|
+
|
|
100
|
+
title = options.title || ' ',
|
|
101
|
+
titleId = $.ui.dialog.getTitleId(self.element),
|
|
102
|
+
|
|
103
|
+
uiDialog = (self.uiDialog = $('<div></div>'))
|
|
104
|
+
.appendTo(document.body)
|
|
105
|
+
.hide()
|
|
106
|
+
.addClass(uiDialogClasses + options.dialogClass)
|
|
107
|
+
.css({
|
|
108
|
+
zIndex: options.zIndex
|
|
109
|
+
})
|
|
110
|
+
// setting tabIndex makes the div focusable
|
|
111
|
+
// setting outline to 0 prevents a border on focus in Mozilla
|
|
112
|
+
.attr('tabIndex', -1).css('outline', 0).keydown(function(event) {
|
|
113
|
+
if (options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
|
|
114
|
+
event.keyCode === $.ui.keyCode.ESCAPE) {
|
|
115
|
+
|
|
116
|
+
self.close(event);
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
.attr({
|
|
121
|
+
role: 'dialog',
|
|
122
|
+
'aria-labelledby': titleId
|
|
123
|
+
})
|
|
124
|
+
.mousedown(function(event) {
|
|
125
|
+
self.moveToTop(false, event);
|
|
126
|
+
}),
|
|
127
|
+
|
|
128
|
+
uiDialogContent = self.element
|
|
129
|
+
.show()
|
|
130
|
+
.removeAttr('title')
|
|
131
|
+
.addClass(
|
|
132
|
+
'ui-dialog-content ' +
|
|
133
|
+
'ui-widget-content')
|
|
134
|
+
.appendTo(uiDialog),
|
|
135
|
+
|
|
136
|
+
uiDialogTitlebar = (self.uiDialogTitlebar = $('<div></div>'))
|
|
137
|
+
.addClass(
|
|
138
|
+
'ui-dialog-titlebar ' +
|
|
139
|
+
'ui-widget-header ' +
|
|
140
|
+
'ui-corner-all ' +
|
|
141
|
+
'ui-helper-clearfix'
|
|
142
|
+
)
|
|
143
|
+
.prependTo(uiDialog),
|
|
144
|
+
|
|
145
|
+
uiDialogTitlebarClose = $('<a href="#"></a>')
|
|
146
|
+
.addClass(
|
|
147
|
+
'ui-dialog-titlebar-close ' +
|
|
148
|
+
'ui-corner-all'
|
|
149
|
+
)
|
|
150
|
+
.attr('role', 'button')
|
|
151
|
+
.hover(
|
|
152
|
+
function() {
|
|
153
|
+
uiDialogTitlebarClose.addClass('ui-state-hover');
|
|
154
|
+
},
|
|
155
|
+
function() {
|
|
156
|
+
uiDialogTitlebarClose.removeClass('ui-state-hover');
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
.focus(function() {
|
|
160
|
+
uiDialogTitlebarClose.addClass('ui-state-focus');
|
|
161
|
+
})
|
|
162
|
+
.blur(function() {
|
|
163
|
+
uiDialogTitlebarClose.removeClass('ui-state-focus');
|
|
164
|
+
})
|
|
165
|
+
.click(function(event) {
|
|
166
|
+
self.close(event);
|
|
167
|
+
return false;
|
|
168
|
+
})
|
|
169
|
+
.appendTo(uiDialogTitlebar),
|
|
170
|
+
|
|
171
|
+
uiDialogTitlebarCloseText = (self.uiDialogTitlebarCloseText = $('<span></span>'))
|
|
172
|
+
.addClass(
|
|
173
|
+
'ui-icon ' +
|
|
174
|
+
'ui-icon-closethick'
|
|
175
|
+
)
|
|
176
|
+
.text(options.closeText)
|
|
177
|
+
.appendTo(uiDialogTitlebarClose),
|
|
178
|
+
|
|
179
|
+
uiDialogTitle = $('<span></span>')
|
|
180
|
+
.addClass('ui-dialog-title')
|
|
181
|
+
.attr('id', titleId)
|
|
182
|
+
.html(title)
|
|
183
|
+
.prependTo(uiDialogTitlebar);
|
|
184
|
+
|
|
185
|
+
//handling of deprecated beforeclose (vs beforeClose) option
|
|
186
|
+
//Ticket #4669 http://dev.jqueryui.com/ticket/4669
|
|
187
|
+
//TODO: remove in 1.9pre
|
|
188
|
+
if ($.isFunction(options.beforeclose) && !$.isFunction(options.beforeClose)) {
|
|
189
|
+
options.beforeClose = options.beforeclose;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
|
|
193
|
+
|
|
194
|
+
if (options.draggable && $.fn.draggable) {
|
|
195
|
+
self._makeDraggable();
|
|
196
|
+
}
|
|
197
|
+
if (options.resizable && $.fn.resizable) {
|
|
198
|
+
self._makeResizable();
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
self._createButtons(options.buttons);
|
|
202
|
+
self._isOpen = false;
|
|
203
|
+
|
|
204
|
+
if ($.fn.bgiframe) {
|
|
205
|
+
uiDialog.bgiframe();
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
_init: function() {
|
|
210
|
+
if ( this.options.autoOpen ) {
|
|
211
|
+
this.open();
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
destroy: function() {
|
|
216
|
+
var self = this;
|
|
217
|
+
|
|
218
|
+
if (self.overlay) {
|
|
219
|
+
self.overlay.destroy();
|
|
220
|
+
}
|
|
221
|
+
self.uiDialog.hide();
|
|
222
|
+
self.element
|
|
223
|
+
.unbind('.dialog')
|
|
224
|
+
.removeData('dialog')
|
|
225
|
+
.removeClass('ui-dialog-content ui-widget-content')
|
|
226
|
+
.hide().appendTo('body');
|
|
227
|
+
self.uiDialog.remove();
|
|
228
|
+
|
|
229
|
+
if (self.originalTitle) {
|
|
230
|
+
self.element.attr('title', self.originalTitle);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
return self;
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
widget: function() {
|
|
237
|
+
return this.uiDialog;
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
close: function(event) {
|
|
241
|
+
var self = this,
|
|
242
|
+
maxZ, thisZ;
|
|
243
|
+
|
|
244
|
+
if (false === self._trigger('beforeClose', event)) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if (self.overlay) {
|
|
249
|
+
self.overlay.destroy();
|
|
250
|
+
}
|
|
251
|
+
self.uiDialog.unbind('keypress.ui-dialog');
|
|
252
|
+
|
|
253
|
+
self._isOpen = false;
|
|
254
|
+
|
|
255
|
+
if (self.options.hide) {
|
|
256
|
+
self.uiDialog.hide(self.options.hide, function() {
|
|
257
|
+
self._trigger('close', event);
|
|
258
|
+
});
|
|
259
|
+
} else {
|
|
260
|
+
self.uiDialog.hide();
|
|
261
|
+
self._trigger('close', event);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
$.ui.dialog.overlay.resize();
|
|
265
|
+
|
|
266
|
+
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
|
|
267
|
+
if (self.options.modal) {
|
|
268
|
+
maxZ = 0;
|
|
269
|
+
$('.ui-dialog').each(function() {
|
|
270
|
+
if (this !== self.uiDialog[0]) {
|
|
271
|
+
thisZ = $(this).css('z-index');
|
|
272
|
+
if(!isNaN(thisZ)) {
|
|
273
|
+
maxZ = Math.max(maxZ, thisZ);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
$.ui.dialog.maxZ = maxZ;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
return self;
|
|
281
|
+
},
|
|
282
|
+
|
|
283
|
+
isOpen: function() {
|
|
284
|
+
return this._isOpen;
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
// the force parameter allows us to move modal dialogs to their correct
|
|
288
|
+
// position on open
|
|
289
|
+
moveToTop: function(force, event) {
|
|
290
|
+
var self = this,
|
|
291
|
+
options = self.options,
|
|
292
|
+
saveScroll;
|
|
293
|
+
|
|
294
|
+
if ((options.modal && !force) ||
|
|
295
|
+
(!options.stack && !options.modal)) {
|
|
296
|
+
return self._trigger('focus', event);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (options.zIndex > $.ui.dialog.maxZ) {
|
|
300
|
+
$.ui.dialog.maxZ = options.zIndex;
|
|
301
|
+
}
|
|
302
|
+
if (self.overlay) {
|
|
303
|
+
$.ui.dialog.maxZ += 1;
|
|
304
|
+
self.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
//Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
|
|
308
|
+
// http://ui.jquery.com/bugs/ticket/3193
|
|
309
|
+
saveScroll = { scrollTop: self.element.scrollTop(), scrollLeft: self.element.scrollLeft() };
|
|
310
|
+
$.ui.dialog.maxZ += 1;
|
|
311
|
+
self.uiDialog.css('z-index', $.ui.dialog.maxZ);
|
|
312
|
+
self.element.attr(saveScroll);
|
|
313
|
+
self._trigger('focus', event);
|
|
314
|
+
|
|
315
|
+
return self;
|
|
316
|
+
},
|
|
317
|
+
|
|
318
|
+
open: function() {
|
|
319
|
+
if (this._isOpen) { return; }
|
|
320
|
+
|
|
321
|
+
var self = this,
|
|
322
|
+
options = self.options,
|
|
323
|
+
uiDialog = self.uiDialog;
|
|
324
|
+
|
|
325
|
+
self.overlay = options.modal ? new $.ui.dialog.overlay(self) : null;
|
|
326
|
+
self._size();
|
|
327
|
+
self._position(options.position);
|
|
328
|
+
uiDialog.show(options.show);
|
|
329
|
+
self.moveToTop(true);
|
|
330
|
+
|
|
331
|
+
// prevent tabbing out of modal dialogs
|
|
332
|
+
if ( options.modal ) {
|
|
333
|
+
uiDialog.bind( "keydown.ui-dialog", function( event ) {
|
|
334
|
+
if ( event.keyCode !== $.ui.keyCode.TAB ) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
var tabbables = $(':tabbable', this),
|
|
339
|
+
first = tabbables.filter(':first'),
|
|
340
|
+
last = tabbables.filter(':last');
|
|
341
|
+
|
|
342
|
+
if (event.target === last[0] && !event.shiftKey) {
|
|
343
|
+
first.focus(1);
|
|
344
|
+
return false;
|
|
345
|
+
} else if (event.target === first[0] && event.shiftKey) {
|
|
346
|
+
last.focus(1);
|
|
347
|
+
return false;
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// set focus to the first tabbable element in the content area or the first button
|
|
353
|
+
// if there are no tabbable elements, set focus on the dialog itself
|
|
354
|
+
$(self.element.find(':tabbable').get().concat(
|
|
355
|
+
uiDialog.find('.ui-dialog-buttonpane :tabbable').get().concat(
|
|
356
|
+
uiDialog.get()))).eq(0).focus();
|
|
357
|
+
|
|
358
|
+
self._isOpen = true;
|
|
359
|
+
self._trigger('open');
|
|
360
|
+
|
|
361
|
+
return self;
|
|
362
|
+
},
|
|
363
|
+
|
|
364
|
+
_createButtons: function(buttons) {
|
|
365
|
+
var self = this,
|
|
366
|
+
hasButtons = false,
|
|
367
|
+
uiDialogButtonPane = $('<div></div>')
|
|
368
|
+
.addClass(
|
|
369
|
+
'ui-dialog-buttonpane ' +
|
|
370
|
+
'ui-widget-content ' +
|
|
371
|
+
'ui-helper-clearfix'
|
|
372
|
+
),
|
|
373
|
+
uiButtonSet = $( "<div></div>" )
|
|
374
|
+
.addClass( "ui-dialog-buttonset" )
|
|
375
|
+
.appendTo( uiDialogButtonPane );
|
|
376
|
+
|
|
377
|
+
// if we already have a button pane, remove it
|
|
378
|
+
self.uiDialog.find('.ui-dialog-buttonpane').remove();
|
|
379
|
+
|
|
380
|
+
if (typeof buttons === 'object' && buttons !== null) {
|
|
381
|
+
$.each(buttons, function() {
|
|
382
|
+
return !(hasButtons = true);
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
if (hasButtons) {
|
|
386
|
+
$.each(buttons, function(name, props) {
|
|
387
|
+
props = $.isFunction( props ) ?
|
|
388
|
+
{ click: props, text: name } :
|
|
389
|
+
props;
|
|
390
|
+
var button = $('<button type="button"></button>')
|
|
391
|
+
.click(function() {
|
|
392
|
+
props.click.apply(self.element[0], arguments);
|
|
393
|
+
})
|
|
394
|
+
.appendTo(uiButtonSet);
|
|
395
|
+
// can't use .attr( props, true ) with jQuery 1.3.2.
|
|
396
|
+
$.each( props, function( key, value ) {
|
|
397
|
+
if ( key === "click" ) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
if ( key in attrFn ) {
|
|
401
|
+
button[ key ]( value );
|
|
402
|
+
} else {
|
|
403
|
+
button.attr( key, value );
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
if ($.fn.button) {
|
|
407
|
+
button.button();
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
uiDialogButtonPane.appendTo(self.uiDialog);
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
|
|
414
|
+
_makeDraggable: function() {
|
|
415
|
+
var self = this,
|
|
416
|
+
options = self.options,
|
|
417
|
+
doc = $(document),
|
|
418
|
+
heightBeforeDrag;
|
|
419
|
+
|
|
420
|
+
function filteredUi(ui) {
|
|
421
|
+
return {
|
|
422
|
+
position: ui.position,
|
|
423
|
+
offset: ui.offset
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
self.uiDialog.draggable({
|
|
428
|
+
cancel: '.ui-dialog-content, .ui-dialog-titlebar-close',
|
|
429
|
+
handle: '.ui-dialog-titlebar',
|
|
430
|
+
containment: 'document',
|
|
431
|
+
start: function(event, ui) {
|
|
432
|
+
heightBeforeDrag = options.height === "auto" ? "auto" : $(this).height();
|
|
433
|
+
$(this).height($(this).height()).addClass("ui-dialog-dragging");
|
|
434
|
+
self._trigger('dragStart', event, filteredUi(ui));
|
|
435
|
+
},
|
|
436
|
+
drag: function(event, ui) {
|
|
437
|
+
self._trigger('drag', event, filteredUi(ui));
|
|
438
|
+
},
|
|
439
|
+
stop: function(event, ui) {
|
|
440
|
+
options.position = [ui.position.left - doc.scrollLeft(),
|
|
441
|
+
ui.position.top - doc.scrollTop()];
|
|
442
|
+
$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
|
|
443
|
+
self._trigger('dragStop', event, filteredUi(ui));
|
|
444
|
+
$.ui.dialog.overlay.resize();
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
},
|
|
448
|
+
|
|
449
|
+
_makeResizable: function(handles) {
|
|
450
|
+
handles = (handles === undefined ? this.options.resizable : handles);
|
|
451
|
+
var self = this,
|
|
452
|
+
options = self.options,
|
|
453
|
+
// .ui-resizable has position: relative defined in the stylesheet
|
|
454
|
+
// but dialogs have to use absolute or fixed positioning
|
|
455
|
+
position = self.uiDialog.css('position'),
|
|
456
|
+
resizeHandles = (typeof handles === 'string' ?
|
|
457
|
+
handles :
|
|
458
|
+
'n,e,s,w,se,sw,ne,nw'
|
|
459
|
+
);
|
|
460
|
+
|
|
461
|
+
function filteredUi(ui) {
|
|
462
|
+
return {
|
|
463
|
+
originalPosition: ui.originalPosition,
|
|
464
|
+
originalSize: ui.originalSize,
|
|
465
|
+
position: ui.position,
|
|
466
|
+
size: ui.size
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
self.uiDialog.resizable({
|
|
471
|
+
cancel: '.ui-dialog-content',
|
|
472
|
+
containment: 'document',
|
|
473
|
+
alsoResize: self.element,
|
|
474
|
+
maxWidth: options.maxWidth,
|
|
475
|
+
maxHeight: options.maxHeight,
|
|
476
|
+
minWidth: options.minWidth,
|
|
477
|
+
minHeight: self._minHeight(),
|
|
478
|
+
handles: resizeHandles,
|
|
479
|
+
start: function(event, ui) {
|
|
480
|
+
$(this).addClass("ui-dialog-resizing");
|
|
481
|
+
self._trigger('resizeStart', event, filteredUi(ui));
|
|
482
|
+
},
|
|
483
|
+
resize: function(event, ui) {
|
|
484
|
+
self._trigger('resize', event, filteredUi(ui));
|
|
485
|
+
},
|
|
486
|
+
stop: function(event, ui) {
|
|
487
|
+
$(this).removeClass("ui-dialog-resizing");
|
|
488
|
+
options.height = $(this).height();
|
|
489
|
+
options.width = $(this).width();
|
|
490
|
+
self._trigger('resizeStop', event, filteredUi(ui));
|
|
491
|
+
$.ui.dialog.overlay.resize();
|
|
492
|
+
}
|
|
493
|
+
})
|
|
494
|
+
.css('position', position)
|
|
495
|
+
.find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se');
|
|
496
|
+
},
|
|
497
|
+
|
|
498
|
+
_minHeight: function() {
|
|
499
|
+
var options = this.options;
|
|
500
|
+
|
|
501
|
+
if (options.height === 'auto') {
|
|
502
|
+
return options.minHeight;
|
|
503
|
+
} else {
|
|
504
|
+
return Math.min(options.minHeight, options.height);
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
|
|
508
|
+
_position: function(position) {
|
|
509
|
+
var myAt = [],
|
|
510
|
+
offset = [0, 0],
|
|
511
|
+
isVisible;
|
|
512
|
+
|
|
513
|
+
if (position) {
|
|
514
|
+
// deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
|
|
515
|
+
// if (typeof position == 'string' || $.isArray(position)) {
|
|
516
|
+
// myAt = $.isArray(position) ? position : position.split(' ');
|
|
517
|
+
|
|
518
|
+
if (typeof position === 'string' || (typeof position === 'object' && '0' in position)) {
|
|
519
|
+
myAt = position.split ? position.split(' ') : [position[0], position[1]];
|
|
520
|
+
if (myAt.length === 1) {
|
|
521
|
+
myAt[1] = myAt[0];
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
$.each(['left', 'top'], function(i, offsetPosition) {
|
|
525
|
+
if (+myAt[i] === myAt[i]) {
|
|
526
|
+
offset[i] = myAt[i];
|
|
527
|
+
myAt[i] = offsetPosition;
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
position = {
|
|
532
|
+
my: myAt.join(" "),
|
|
533
|
+
at: myAt.join(" "),
|
|
534
|
+
offset: offset.join(" ")
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
position = $.extend({}, $.ui.dialog.prototype.options.position, position);
|
|
539
|
+
} else {
|
|
540
|
+
position = $.ui.dialog.prototype.options.position;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// need to show the dialog to get the actual offset in the position plugin
|
|
544
|
+
isVisible = this.uiDialog.is(':visible');
|
|
545
|
+
if (!isVisible) {
|
|
546
|
+
this.uiDialog.show();
|
|
547
|
+
}
|
|
548
|
+
this.uiDialog
|
|
549
|
+
// workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
|
|
550
|
+
.css({ top: 0, left: 0 })
|
|
551
|
+
.position($.extend({ of: window }, position));
|
|
552
|
+
if (!isVisible) {
|
|
553
|
+
this.uiDialog.hide();
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
|
|
557
|
+
_setOptions: function( options ) {
|
|
558
|
+
var self = this,
|
|
559
|
+
resizableOptions = {},
|
|
560
|
+
resize = false;
|
|
561
|
+
|
|
562
|
+
$.each( options, function( key, value ) {
|
|
563
|
+
self._setOption( key, value );
|
|
564
|
+
|
|
565
|
+
if ( key in sizeRelatedOptions ) {
|
|
566
|
+
resize = true;
|
|
567
|
+
}
|
|
568
|
+
if ( key in resizableRelatedOptions ) {
|
|
569
|
+
resizableOptions[ key ] = value;
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
if ( resize ) {
|
|
574
|
+
this._size();
|
|
575
|
+
}
|
|
576
|
+
if ( this.uiDialog.is( ":data(resizable)" ) ) {
|
|
577
|
+
this.uiDialog.resizable( "option", resizableOptions );
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
|
|
581
|
+
_setOption: function(key, value){
|
|
582
|
+
var self = this,
|
|
583
|
+
uiDialog = self.uiDialog;
|
|
584
|
+
|
|
585
|
+
switch (key) {
|
|
586
|
+
//handling of deprecated beforeclose (vs beforeClose) option
|
|
587
|
+
//Ticket #4669 http://dev.jqueryui.com/ticket/4669
|
|
588
|
+
//TODO: remove in 1.9pre
|
|
589
|
+
case "beforeclose":
|
|
590
|
+
key = "beforeClose";
|
|
591
|
+
break;
|
|
592
|
+
case "buttons":
|
|
593
|
+
self._createButtons(value);
|
|
594
|
+
break;
|
|
595
|
+
case "closeText":
|
|
596
|
+
// ensure that we always pass a string
|
|
597
|
+
self.uiDialogTitlebarCloseText.text("" + value);
|
|
598
|
+
break;
|
|
599
|
+
case "dialogClass":
|
|
600
|
+
uiDialog
|
|
601
|
+
.removeClass(self.options.dialogClass)
|
|
602
|
+
.addClass(uiDialogClasses + value);
|
|
603
|
+
break;
|
|
604
|
+
case "disabled":
|
|
605
|
+
if (value) {
|
|
606
|
+
uiDialog.addClass('ui-dialog-disabled');
|
|
607
|
+
} else {
|
|
608
|
+
uiDialog.removeClass('ui-dialog-disabled');
|
|
609
|
+
}
|
|
610
|
+
break;
|
|
611
|
+
case "draggable":
|
|
612
|
+
var isDraggable = uiDialog.is( ":data(draggable)" );
|
|
613
|
+
if ( isDraggable && !value ) {
|
|
614
|
+
uiDialog.draggable( "destroy" );
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
if ( !isDraggable && value ) {
|
|
618
|
+
self._makeDraggable();
|
|
619
|
+
}
|
|
620
|
+
break;
|
|
621
|
+
case "position":
|
|
622
|
+
self._position(value);
|
|
623
|
+
break;
|
|
624
|
+
case "resizable":
|
|
625
|
+
// currently resizable, becoming non-resizable
|
|
626
|
+
var isResizable = uiDialog.is( ":data(resizable)" );
|
|
627
|
+
if (isResizable && !value) {
|
|
628
|
+
uiDialog.resizable('destroy');
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
// currently resizable, changing handles
|
|
632
|
+
if (isResizable && typeof value === 'string') {
|
|
633
|
+
uiDialog.resizable('option', 'handles', value);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
// currently non-resizable, becoming resizable
|
|
637
|
+
if (!isResizable && value !== false) {
|
|
638
|
+
self._makeResizable(value);
|
|
639
|
+
}
|
|
640
|
+
break;
|
|
641
|
+
case "title":
|
|
642
|
+
// convert whatever was passed in o a string, for html() to not throw up
|
|
643
|
+
$(".ui-dialog-title", self.uiDialogTitlebar).html("" + (value || ' '));
|
|
644
|
+
break;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
$.Widget.prototype._setOption.apply(self, arguments);
|
|
648
|
+
},
|
|
649
|
+
|
|
650
|
+
_size: function() {
|
|
651
|
+
/* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
|
|
652
|
+
* divs will both have width and height set, so we need to reset them
|
|
653
|
+
*/
|
|
654
|
+
var options = this.options,
|
|
655
|
+
nonContentHeight,
|
|
656
|
+
minContentHeight,
|
|
657
|
+
isVisible = this.uiDialog.is( ":visible" );
|
|
658
|
+
|
|
659
|
+
// reset content sizing
|
|
660
|
+
this.element.show().css({
|
|
661
|
+
width: 'auto',
|
|
662
|
+
minHeight: 0,
|
|
663
|
+
height: 0
|
|
664
|
+
});
|
|
665
|
+
|
|
666
|
+
if (options.minWidth > options.width) {
|
|
667
|
+
options.width = options.minWidth;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
// reset wrapper sizing
|
|
671
|
+
// determine the height of all the non-content elements
|
|
672
|
+
nonContentHeight = this.uiDialog.css({
|
|
673
|
+
height: 'auto',
|
|
674
|
+
width: options.width
|
|
675
|
+
})
|
|
676
|
+
.height();
|
|
677
|
+
minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
|
|
678
|
+
|
|
679
|
+
if ( options.height === "auto" ) {
|
|
680
|
+
// only needed for IE6 support
|
|
681
|
+
if ( $.support.minHeight ) {
|
|
682
|
+
this.element.css({
|
|
683
|
+
minHeight: minContentHeight,
|
|
684
|
+
height: "auto"
|
|
685
|
+
});
|
|
686
|
+
} else {
|
|
687
|
+
this.uiDialog.show();
|
|
688
|
+
var autoHeight = this.element.css( "height", "auto" ).height();
|
|
689
|
+
if ( !isVisible ) {
|
|
690
|
+
this.uiDialog.hide();
|
|
691
|
+
}
|
|
692
|
+
this.element.height( Math.max( autoHeight, minContentHeight ) );
|
|
693
|
+
}
|
|
694
|
+
} else {
|
|
695
|
+
this.element.height( Math.max( options.height - nonContentHeight, 0 ) );
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
if (this.uiDialog.is(':data(resizable)')) {
|
|
699
|
+
this.uiDialog.resizable('option', 'minHeight', this._minHeight());
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
|
|
704
|
+
$.extend($.ui.dialog, {
|
|
705
|
+
version: "1.8.18",
|
|
706
|
+
|
|
707
|
+
uuid: 0,
|
|
708
|
+
maxZ: 0,
|
|
709
|
+
|
|
710
|
+
getTitleId: function($el) {
|
|
711
|
+
var id = $el.attr('id');
|
|
712
|
+
if (!id) {
|
|
713
|
+
this.uuid += 1;
|
|
714
|
+
id = this.uuid;
|
|
715
|
+
}
|
|
716
|
+
return 'ui-dialog-title-' + id;
|
|
717
|
+
},
|
|
718
|
+
|
|
719
|
+
overlay: function(dialog) {
|
|
720
|
+
this.$el = $.ui.dialog.overlay.create(dialog);
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
|
|
724
|
+
$.extend($.ui.dialog.overlay, {
|
|
725
|
+
instances: [],
|
|
726
|
+
// reuse old instances due to IE memory leak with alpha transparency (see #5185)
|
|
727
|
+
oldInstances: [],
|
|
728
|
+
maxZ: 0,
|
|
729
|
+
events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),
|
|
730
|
+
function(event) { return event + '.dialog-overlay'; }).join(' '),
|
|
731
|
+
create: function(dialog) {
|
|
732
|
+
if (this.instances.length === 0) {
|
|
733
|
+
// prevent use of anchors and inputs
|
|
734
|
+
// we use a setTimeout in case the overlay is created from an
|
|
735
|
+
// event that we're going to be cancelling (see #2804)
|
|
736
|
+
setTimeout(function() {
|
|
737
|
+
// handle $(el).dialog().dialog('close') (see #4065)
|
|
738
|
+
if ($.ui.dialog.overlay.instances.length) {
|
|
739
|
+
$(document).bind($.ui.dialog.overlay.events, function(event) {
|
|
740
|
+
// stop events if the z-index of the target is < the z-index of the overlay
|
|
741
|
+
// we cannot return true when we don't want to cancel the event (#3523)
|
|
742
|
+
if ($(event.target).zIndex() < $.ui.dialog.overlay.maxZ) {
|
|
743
|
+
return false;
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
}, 1);
|
|
748
|
+
|
|
749
|
+
// allow closing by pressing the escape key
|
|
750
|
+
$(document).bind('keydown.dialog-overlay', function(event) {
|
|
751
|
+
if (dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
|
|
752
|
+
event.keyCode === $.ui.keyCode.ESCAPE) {
|
|
753
|
+
|
|
754
|
+
dialog.close(event);
|
|
755
|
+
event.preventDefault();
|
|
756
|
+
}
|
|
757
|
+
});
|
|
758
|
+
|
|
759
|
+
// handle window resize
|
|
760
|
+
$(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
var $el = (this.oldInstances.pop() || $('<div></div>').addClass('ui-widget-overlay'))
|
|
764
|
+
.appendTo(document.body)
|
|
765
|
+
.css({
|
|
766
|
+
width: this.width(),
|
|
767
|
+
height: this.height()
|
|
768
|
+
});
|
|
769
|
+
|
|
770
|
+
if ($.fn.bgiframe) {
|
|
771
|
+
$el.bgiframe();
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
this.instances.push($el);
|
|
775
|
+
return $el;
|
|
776
|
+
},
|
|
777
|
+
|
|
778
|
+
destroy: function($el) {
|
|
779
|
+
var indexOf = $.inArray($el, this.instances);
|
|
780
|
+
if (indexOf != -1){
|
|
781
|
+
this.oldInstances.push(this.instances.splice(indexOf, 1)[0]);
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
if (this.instances.length === 0) {
|
|
785
|
+
$([document, window]).unbind('.dialog-overlay');
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
$el.remove();
|
|
789
|
+
|
|
790
|
+
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
|
|
791
|
+
var maxZ = 0;
|
|
792
|
+
$.each(this.instances, function() {
|
|
793
|
+
maxZ = Math.max(maxZ, this.css('z-index'));
|
|
794
|
+
});
|
|
795
|
+
this.maxZ = maxZ;
|
|
796
|
+
},
|
|
797
|
+
|
|
798
|
+
height: function() {
|
|
799
|
+
var scrollHeight,
|
|
800
|
+
offsetHeight;
|
|
801
|
+
// handle IE 6
|
|
802
|
+
if ($.browser.msie && $.browser.version < 7) {
|
|
803
|
+
scrollHeight = Math.max(
|
|
804
|
+
document.documentElement.scrollHeight,
|
|
805
|
+
document.body.scrollHeight
|
|
806
|
+
);
|
|
807
|
+
offsetHeight = Math.max(
|
|
808
|
+
document.documentElement.offsetHeight,
|
|
809
|
+
document.body.offsetHeight
|
|
810
|
+
);
|
|
811
|
+
|
|
812
|
+
if (scrollHeight < offsetHeight) {
|
|
813
|
+
return $(window).height() + 'px';
|
|
814
|
+
} else {
|
|
815
|
+
return scrollHeight + 'px';
|
|
816
|
+
}
|
|
817
|
+
// handle "good" browsers
|
|
818
|
+
} else {
|
|
819
|
+
return $(document).height() + 'px';
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
|
|
823
|
+
width: function() {
|
|
824
|
+
var scrollWidth,
|
|
825
|
+
offsetWidth;
|
|
826
|
+
// handle IE
|
|
827
|
+
if ( $.browser.msie ) {
|
|
828
|
+
scrollWidth = Math.max(
|
|
829
|
+
document.documentElement.scrollWidth,
|
|
830
|
+
document.body.scrollWidth
|
|
831
|
+
);
|
|
832
|
+
offsetWidth = Math.max(
|
|
833
|
+
document.documentElement.offsetWidth,
|
|
834
|
+
document.body.offsetWidth
|
|
835
|
+
);
|
|
836
|
+
|
|
837
|
+
if (scrollWidth < offsetWidth) {
|
|
838
|
+
return $(window).width() + 'px';
|
|
839
|
+
} else {
|
|
840
|
+
return scrollWidth + 'px';
|
|
841
|
+
}
|
|
842
|
+
// handle "good" browsers
|
|
843
|
+
} else {
|
|
844
|
+
return $(document).width() + 'px';
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
|
|
848
|
+
resize: function() {
|
|
849
|
+
/* If the dialog is draggable and the user drags it past the
|
|
850
|
+
* right edge of the window, the document becomes wider so we
|
|
851
|
+
* need to stretch the overlay. If the user then drags the
|
|
852
|
+
* dialog back to the left, the document will become narrower,
|
|
853
|
+
* so we need to shrink the overlay to the appropriate size.
|
|
854
|
+
* This is handled by shrinking the overlay before setting it
|
|
855
|
+
* to the full document size.
|
|
856
|
+
*/
|
|
857
|
+
var $overlays = $([]);
|
|
858
|
+
$.each($.ui.dialog.overlay.instances, function() {
|
|
859
|
+
$overlays = $overlays.add(this);
|
|
860
|
+
});
|
|
861
|
+
|
|
862
|
+
$overlays.css({
|
|
863
|
+
width: 0,
|
|
864
|
+
height: 0
|
|
865
|
+
}).css({
|
|
866
|
+
width: $.ui.dialog.overlay.width(),
|
|
867
|
+
height: $.ui.dialog.overlay.height()
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
|
|
872
|
+
$.extend($.ui.dialog.overlay.prototype, {
|
|
873
|
+
destroy: function() {
|
|
874
|
+
$.ui.dialog.overlay.destroy(this.$el);
|
|
875
|
+
}
|
|
876
|
+
});
|
|
877
|
+
|
|
878
|
+
}(jQuery));
|