test_server 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/.bowerrc +4 -0
- data/.gitignore +19 -0
- data/.rdebugrc +7 -0
- data/.rspec +3 -0
- data/.simplecov +8 -0
- data/.travis.yml +8 -0
- data/.yardopts +5 -0
- data/Gemfile +55 -0
- data/LICENSE.md +22 -0
- data/README.md +29 -0
- data/Rakefile +107 -0
- data/app/assets/javascripts/application.js +65 -0
- data/app/assets/stylesheets/application.scss +150 -0
- data/app/controllers/application_controller.rb +71 -0
- data/app/controllers/assets_controller.rb +72 -0
- data/app/controllers/javascript_controller.rb +31 -0
- data/app/controllers/streaming_controller.rb +52 -0
- data/app/controllers/string_controller.rb +51 -0
- data/app/views/application.haml +19 -0
- data/app/views/xhr/show.haml +38 -0
- data/bin/test_server +10 -0
- data/bower.json +8 -0
- data/config.ru +51 -0
- data/files/config.yaml +1 -0
- data/files/example-config.erb +12 -0
- data/lib/test_server/access_logger.rb +13 -0
- data/lib/test_server/actions/create_directory.rb +33 -0
- data/lib/test_server/actions/create_file.rb +55 -0
- data/lib/test_server/actions/create_output.rb +36 -0
- data/lib/test_server/actions/handle_error.rb +39 -0
- data/lib/test_server/actions/initialize_application.rb +56 -0
- data/lib/test_server/actions/reload_configuration.rb +21 -0
- data/lib/test_server/actions/send_signal.rb +32 -0
- data/lib/test_server/cli/helper.rb +12 -0
- data/lib/test_server/cli/main.rb +105 -0
- data/lib/test_server/cli/reload.rb +40 -0
- data/lib/test_server/config.rb +107 -0
- data/lib/test_server/data.rb +23 -0
- data/lib/test_server/encoder.rb +39 -0
- data/lib/test_server/encoders/base64.rb +14 -0
- data/lib/test_server/encoders/base64_strict.rb +14 -0
- data/lib/test_server/encoders/gzip.rb +14 -0
- data/lib/test_server/encoders/null.rb +14 -0
- data/lib/test_server/erb_generator.rb +35 -0
- data/lib/test_server/error_handler.rb +109 -0
- data/lib/test_server/error_messages.rb +67 -0
- data/lib/test_server/exceptions.rb +39 -0
- data/lib/test_server/locales/en.yml +72 -0
- data/lib/test_server/main.rb +31 -0
- data/lib/test_server/null_access_logger.rb +6 -0
- data/lib/test_server/process_environment.rb +23 -0
- data/lib/test_server/server.rb +19 -0
- data/lib/test_server/server_commands/puma.rb +37 -0
- data/lib/test_server/server_commands/rackup.rb +44 -0
- data/lib/test_server/template_file.rb +19 -0
- data/lib/test_server/template_repository.rb +22 -0
- data/lib/test_server/ui_logger.rb +37 -0
- data/lib/test_server/version.rb +4 -0
- data/lib/test_server/web_helper.rb +66 -0
- data/lib/test_server.rb +78 -0
- data/share/archlinux/Makefile +7 -0
- data/share/archlinux/PKGBUILD.sh.erb +110 -0
- data/share/archlinux/config.yaml.erb +10 -0
- data/share/archlinux/defaults.sh.erb +3 -0
- data/share/archlinux/startup.sh.erb +9 -0
- data/share/archlinux/test_server.install +65 -0
- data/share/archlinux/tmpfiles.conf.erb +2 -0
- data/share/systemd/test_server.service +9 -0
- data/share/systemd/test_server.service.erb +11 -0
- data/share/systemd/test_server.socket +10 -0
- data/spec/encoder_spec.rb +50 -0
- data/spec/encoders/base64_spec.rb +18 -0
- data/spec/encoders/base64_strict_spec.rb +18 -0
- data/spec/encoders/gzip_spec.rb +18 -0
- data/spec/encoders/null_spec.rb +18 -0
- data/spec/error_handler_spec.rb +155 -0
- data/spec/features/fetch_data_via_javascript_spec.rb +19 -0
- data/spec/features/fetch_test_data_plain_spec.rb +109 -0
- data/spec/features/fetch_test_data_via_streaming_spec.rb +53 -0
- data/spec/features/helper_spec.rb +125 -0
- data/spec/process_environment_spec.rb +44 -0
- data/spec/spec_helper.rb +20 -0
- data/spec/support/capybara.rb +16 -0
- data/spec/support/debugging.rb +3 -0
- data/spec/support/encoding.rb +1 -0
- data/spec/support/environment.rb +33 -0
- data/spec/support/example.rb +16 -0
- data/spec/support/filesystem.rb +19 -0
- data/spec/support/html.rb +20 -0
- data/spec/support/matcher.rb +17 -0
- data/spec/support/pretty_print.xsl +46 -0
- data/spec/support/reporting.rb +8 -0
- data/spec/support/rspec.rb +5 -0
- data/spec/support/string.rb +2 -0
- data/spec/support/timeout.rb +18 -0
- data/test_server.gemspec +40 -0
- data/vendor/assets/components/bootstrap-sass/.bower.json +25 -0
- data/vendor/assets/components/bootstrap-sass/CNAME +1 -0
- data/vendor/assets/components/bootstrap-sass/CONTRIBUTING.md +61 -0
- data/vendor/assets/components/bootstrap-sass/DOCS-LICENSE +319 -0
- data/vendor/assets/components/bootstrap-sass/Gemfile +5 -0
- data/vendor/assets/components/bootstrap-sass/Gruntfile.js +244 -0
- data/vendor/assets/components/bootstrap-sass/LICENSE +176 -0
- data/vendor/assets/components/bootstrap-sass/LICENSE-MIT +21 -0
- data/vendor/assets/components/bootstrap-sass/README.md +277 -0
- data/vendor/assets/components/bootstrap-sass/Rakefile +44 -0
- data/vendor/assets/components/bootstrap-sass/_config.yml +25 -0
- data/vendor/assets/components/bootstrap-sass/_includes/ads.html +1 -0
- data/vendor/assets/components/bootstrap-sass/_includes/footer.html +34 -0
- data/vendor/assets/components/bootstrap-sass/_includes/header.html +42 -0
- data/vendor/assets/components/bootstrap-sass/_includes/nav-about.html +12 -0
- data/vendor/assets/components/bootstrap-sass/_includes/nav-components.html +137 -0
- data/vendor/assets/components/bootstrap-sass/_includes/nav-css.html +99 -0
- data/vendor/assets/components/bootstrap-sass/_includes/nav-customize.html +40 -0
- data/vendor/assets/components/bootstrap-sass/_includes/nav-getting-started.html +44 -0
- data/vendor/assets/components/bootstrap-sass/_includes/nav-javascript.html +88 -0
- data/vendor/assets/components/bootstrap-sass/_includes/nav-main.html +37 -0
- data/vendor/assets/components/bootstrap-sass/_includes/old-bs-docs.html +8 -0
- data/vendor/assets/components/bootstrap-sass/_includes/social-buttons.html +16 -0
- data/vendor/assets/components/bootstrap-sass/_layouts/default.html +79 -0
- data/vendor/assets/components/bootstrap-sass/_layouts/home.html +47 -0
- data/vendor/assets/components/bootstrap-sass/about.html +93 -0
- data/vendor/assets/components/bootstrap-sass/bower.json +11 -0
- data/vendor/assets/components/bootstrap-sass/browserstack.json +37 -0
- data/vendor/assets/components/bootstrap-sass/components.html +3689 -0
- data/vendor/assets/components/bootstrap-sass/composer.json +28 -0
- data/vendor/assets/components/bootstrap-sass/css.html +2674 -0
- data/vendor/assets/components/bootstrap-sass/customize.html +1715 -0
- data/vendor/assets/components/bootstrap-sass/dist/css/bootstrap-theme.css +427 -0
- data/vendor/assets/components/bootstrap-sass/dist/css/bootstrap-theme.min.css +1 -0
- data/vendor/assets/components/bootstrap-sass/dist/css/bootstrap.css +6350 -0
- data/vendor/assets/components/bootstrap-sass/dist/css/bootstrap.min.css +1 -0
- data/vendor/assets/components/bootstrap-sass/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/components/bootstrap-sass/dist/fonts/glyphicons-halflings-regular.svg +229 -0
- data/vendor/assets/components/bootstrap-sass/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/components/bootstrap-sass/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/components/bootstrap-sass/dist/js/bootstrap.js +2002 -0
- data/vendor/assets/components/bootstrap-sass/dist/js/bootstrap.min.js +9 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/css/docs.css +1195 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/css/pygments-manni.css +66 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/ico/apple-touch-icon-144-precomposed.png +0 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/ico/favicon.png +0 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/js/application.js +103 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/js/customizer.js +332 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/js/filesaver.js +169 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/js/holder.js +404 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/js/ie8-responsive-file-warning.js +12 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/js/jszip.js +1467 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/js/less.js +9 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/js/raw-files.js +3 -0
- data/vendor/assets/components/bootstrap-sass/docs-assets/js/uglify.js +14 -0
- data/vendor/assets/components/bootstrap-sass/examples/carousel/carousel.css +148 -0
- data/vendor/assets/components/bootstrap-sass/examples/carousel/index.html +206 -0
- data/vendor/assets/components/bootstrap-sass/examples/grid/grid.css +28 -0
- data/vendor/assets/components/bootstrap-sass/examples/grid/index.html +148 -0
- data/vendor/assets/components/bootstrap-sass/examples/jumbotron/index.html +99 -0
- data/vendor/assets/components/bootstrap-sass/examples/jumbotron/jumbotron.css +5 -0
- data/vendor/assets/components/bootstrap-sass/examples/jumbotron-narrow/index.html +82 -0
- data/vendor/assets/components/bootstrap-sass/examples/jumbotron-narrow/jumbotron-narrow.css +79 -0
- data/vendor/assets/components/bootstrap-sass/examples/justified-nav/index.html +83 -0
- data/vendor/assets/components/bootstrap-sass/examples/justified-nav/justified-nav.css +88 -0
- data/vendor/assets/components/bootstrap-sass/examples/navbar/index.html +88 -0
- data/vendor/assets/components/bootstrap-sass/examples/navbar/navbar.css +8 -0
- data/vendor/assets/components/bootstrap-sass/examples/navbar-fixed-top/index.html +91 -0
- data/vendor/assets/components/bootstrap-sass/examples/navbar-fixed-top/navbar-fixed-top.css +4 -0
- data/vendor/assets/components/bootstrap-sass/examples/navbar-static-top/index.html +92 -0
- data/vendor/assets/components/bootstrap-sass/examples/navbar-static-top/navbar-static-top.css +7 -0
- data/vendor/assets/components/bootstrap-sass/examples/non-responsive/index.html +101 -0
- data/vendor/assets/components/bootstrap-sass/examples/non-responsive/non-responsive.css +116 -0
- data/vendor/assets/components/bootstrap-sass/examples/offcanvas/index.html +130 -0
- data/vendor/assets/components/bootstrap-sass/examples/offcanvas/offcanvas.css +50 -0
- data/vendor/assets/components/bootstrap-sass/examples/offcanvas/offcanvas.js +5 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/carousel.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/grid.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/jumbotron-narrow.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/jumbotron.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/justified-nav.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/navbar-fixed.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/navbar-static.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/navbar.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/non-responsive.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/offcanvas.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/sign-in.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/starter-template.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/sticky-footer-navbar.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/sticky-footer.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/screenshots/theme.jpg +0 -0
- data/vendor/assets/components/bootstrap-sass/examples/signin/index.html +50 -0
- data/vendor/assets/components/bootstrap-sass/examples/signin/signin.css +40 -0
- data/vendor/assets/components/bootstrap-sass/examples/starter-template/index.html +68 -0
- data/vendor/assets/components/bootstrap-sass/examples/starter-template/starter-template.css +7 -0
- data/vendor/assets/components/bootstrap-sass/examples/sticky-footer/index.html +55 -0
- data/vendor/assets/components/bootstrap-sass/examples/sticky-footer/sticky-footer.css +38 -0
- data/vendor/assets/components/bootstrap-sass/examples/sticky-footer-navbar/index.html +91 -0
- data/vendor/assets/components/bootstrap-sass/examples/sticky-footer-navbar/sticky-footer-navbar.css +45 -0
- data/vendor/assets/components/bootstrap-sass/examples/theme/index.html +384 -0
- data/vendor/assets/components/bootstrap-sass/examples/theme/theme.css +14 -0
- data/vendor/assets/components/bootstrap-sass/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/components/bootstrap-sass/fonts/glyphicons-halflings-regular.svg +229 -0
- data/vendor/assets/components/bootstrap-sass/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/components/bootstrap-sass/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/components/bootstrap-sass/getting-started.html +1021 -0
- data/vendor/assets/components/bootstrap-sass/index.html +16 -0
- data/vendor/assets/components/bootstrap-sass/javascript.html +1983 -0
- data/vendor/assets/components/bootstrap-sass/js/affix.js +126 -0
- data/vendor/assets/components/bootstrap-sass/js/alert.js +98 -0
- data/vendor/assets/components/bootstrap-sass/js/button.js +109 -0
- data/vendor/assets/components/bootstrap-sass/js/carousel.js +217 -0
- data/vendor/assets/components/bootstrap-sass/js/collapse.js +179 -0
- data/vendor/assets/components/bootstrap-sass/js/dropdown.js +154 -0
- data/vendor/assets/components/bootstrap-sass/js/modal.js +246 -0
- data/vendor/assets/components/bootstrap-sass/js/popover.js +117 -0
- data/vendor/assets/components/bootstrap-sass/js/scrollspy.js +158 -0
- data/vendor/assets/components/bootstrap-sass/js/tab.js +135 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/index.html +52 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/affix.js +25 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/alert.js +62 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/button.js +116 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/carousel.js +87 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/collapse.js +164 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/dropdown.js +219 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/modal.js +196 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/phantom.js +69 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/popover.js +133 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/scrollspy.js +37 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/tab.js +86 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/tooltip.js +437 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/unit/transition.js +13 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/vendor/jquery.js +6 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/vendor/qunit.css +232 -0
- data/vendor/assets/components/bootstrap-sass/js/tests/vendor/qunit.js +1510 -0
- data/vendor/assets/components/bootstrap-sass/js/tooltip.js +386 -0
- data/vendor/assets/components/bootstrap-sass/js/transition.js +56 -0
- data/vendor/assets/components/bootstrap-sass/lib/_alerts.scss +67 -0
- data/vendor/assets/components/bootstrap-sass/lib/_badges.scss +51 -0
- data/vendor/assets/components/bootstrap-sass/lib/_breadcrumbs.scss +23 -0
- data/vendor/assets/components/bootstrap-sass/lib/_button-groups.scss +253 -0
- data/vendor/assets/components/bootstrap-sass/lib/_buttons.scss +158 -0
- data/vendor/assets/components/bootstrap-sass/lib/_carousel.scss +231 -0
- data/vendor/assets/components/bootstrap-sass/lib/_close.scss +35 -0
- data/vendor/assets/components/bootstrap-sass/lib/_code.scss +53 -0
- data/vendor/assets/components/bootstrap-sass/lib/_component-animations.scss +29 -0
- data/vendor/assets/components/bootstrap-sass/lib/_dropdowns.scss +193 -0
- data/vendor/assets/components/bootstrap-sass/lib/_forms.scss +363 -0
- data/vendor/assets/components/bootstrap-sass/lib/_glyphicons.scss +237 -0
- data/vendor/assets/components/bootstrap-sass/lib/_grid.scss +93 -0
- data/vendor/assets/components/bootstrap-sass/lib/_input-groups.scss +136 -0
- data/vendor/assets/components/bootstrap-sass/lib/_jumbotron.scss +40 -0
- data/vendor/assets/components/bootstrap-sass/lib/_labels.scss +58 -0
- data/vendor/assets/components/bootstrap-sass/lib/_list-group.scss +88 -0
- data/vendor/assets/components/bootstrap-sass/lib/_media.scss +56 -0
- data/vendor/assets/components/bootstrap-sass/lib/_mixins.scss +861 -0
- data/vendor/assets/components/bootstrap-sass/lib/_modals.scss +132 -0
- data/vendor/assets/components/bootstrap-sass/lib/_navbar.scss +628 -0
- data/vendor/assets/components/bootstrap-sass/lib/_navs.scss +262 -0
- data/vendor/assets/components/bootstrap-sass/lib/_normalize.scss +406 -0
- data/vendor/assets/components/bootstrap-sass/lib/_pager.scss +55 -0
- data/vendor/assets/components/bootstrap-sass/lib/_pagination.scss +85 -0
- data/vendor/assets/components/bootstrap-sass/lib/_panels.scss +172 -0
- data/vendor/assets/components/bootstrap-sass/lib/_popovers.scss +133 -0
- data/vendor/assets/components/bootstrap-sass/lib/_print.scss +105 -0
- data/vendor/assets/components/bootstrap-sass/lib/_progress-bars.scss +92 -0
- data/vendor/assets/components/bootstrap-sass/lib/_responsive-utilities.scss +198 -0
- data/vendor/assets/components/bootstrap-sass/lib/_scaffolding.scss +119 -0
- data/vendor/assets/components/bootstrap-sass/lib/_tables.scss +244 -0
- data/vendor/assets/components/bootstrap-sass/lib/_theme.scss +247 -0
- data/vendor/assets/components/bootstrap-sass/lib/_thumbnails.scss +32 -0
- data/vendor/assets/components/bootstrap-sass/lib/_tooltip.scss +95 -0
- data/vendor/assets/components/bootstrap-sass/lib/_type.scss +279 -0
- data/vendor/assets/components/bootstrap-sass/lib/_utilities.scss +56 -0
- data/vendor/assets/components/bootstrap-sass/lib/_variables.scss +637 -0
- data/vendor/assets/components/bootstrap-sass/lib/_wells.scss +29 -0
- data/vendor/assets/components/bootstrap-sass/lib/bootstrap.scss +49 -0
- data/vendor/assets/components/bootstrap-sass/package.json +40 -0
- data/vendor/assets/components/jquery/.bower.json +37 -0
- data/vendor/assets/components/jquery/MIT-LICENSE.txt +21 -0
- data/vendor/assets/components/jquery/bower.json +27 -0
- data/vendor/assets/components/jquery/dist/jquery.js +9174 -0
- data/vendor/assets/components/jquery/dist/jquery.min.js +5 -0
- data/vendor/assets/components/jquery/dist/jquery.min.map +1 -0
- data/vendor/assets/components/jquery/src/ajax/jsonp.js +89 -0
- data/vendor/assets/components/jquery/src/ajax/load.js +75 -0
- data/vendor/assets/components/jquery/src/ajax/parseJSON.js +13 -0
- data/vendor/assets/components/jquery/src/ajax/parseXML.js +28 -0
- data/vendor/assets/components/jquery/src/ajax/script.js +64 -0
- data/vendor/assets/components/jquery/src/ajax/var/nonce.js +5 -0
- data/vendor/assets/components/jquery/src/ajax/var/rquery.js +3 -0
- data/vendor/assets/components/jquery/src/ajax/xhr.js +135 -0
- data/vendor/assets/components/jquery/src/ajax.js +806 -0
- data/vendor/assets/components/jquery/src/attributes/attr.js +143 -0
- data/vendor/assets/components/jquery/src/attributes/classes.js +158 -0
- data/vendor/assets/components/jquery/src/attributes/prop.js +96 -0
- data/vendor/assets/components/jquery/src/attributes/support.js +35 -0
- data/vendor/assets/components/jquery/src/attributes/val.js +163 -0
- data/vendor/assets/components/jquery/src/attributes.js +11 -0
- data/vendor/assets/components/jquery/src/callbacks.js +205 -0
- data/vendor/assets/components/jquery/src/core/access.js +60 -0
- data/vendor/assets/components/jquery/src/core/init.js +123 -0
- data/vendor/assets/components/jquery/src/core/parseHTML.js +39 -0
- data/vendor/assets/components/jquery/src/core/ready.js +97 -0
- data/vendor/assets/components/jquery/src/core/var/rsingleTag.js +4 -0
- data/vendor/assets/components/jquery/src/core.js +498 -0
- data/vendor/assets/components/jquery/src/css/addGetHookIf.js +24 -0
- data/vendor/assets/components/jquery/src/css/curCSS.js +57 -0
- data/vendor/assets/components/jquery/src/css/defaultDisplay.js +70 -0
- data/vendor/assets/components/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/vendor/assets/components/jquery/src/css/support.js +91 -0
- data/vendor/assets/components/jquery/src/css/swap.js +28 -0
- data/vendor/assets/components/jquery/src/css/var/cssExpand.js +3 -0
- data/vendor/assets/components/jquery/src/css/var/getStyles.js +5 -0
- data/vendor/assets/components/jquery/src/css/var/isHidden.js +13 -0
- data/vendor/assets/components/jquery/src/css/var/rmargin.js +3 -0
- data/vendor/assets/components/jquery/src/css/var/rnumnonpx.js +5 -0
- data/vendor/assets/components/jquery/src/css.js +451 -0
- data/vendor/assets/components/jquery/src/data/Data.js +181 -0
- data/vendor/assets/components/jquery/src/data/accepts.js +20 -0
- data/vendor/assets/components/jquery/src/data/var/data_priv.js +5 -0
- data/vendor/assets/components/jquery/src/data/var/data_user.js +5 -0
- data/vendor/assets/components/jquery/src/data.js +175 -0
- data/vendor/assets/components/jquery/src/deferred.js +149 -0
- data/vendor/assets/components/jquery/src/deprecated.js +13 -0
- data/vendor/assets/components/jquery/src/dimensions.js +50 -0
- data/vendor/assets/components/jquery/src/effects/Tween.js +114 -0
- data/vendor/assets/components/jquery/src/effects/animatedSelector.js +13 -0
- data/vendor/assets/components/jquery/src/effects.js +647 -0
- data/vendor/assets/components/jquery/src/event/alias.js +39 -0
- data/vendor/assets/components/jquery/src/event/support.js +9 -0
- data/vendor/assets/components/jquery/src/event.js +868 -0
- data/vendor/assets/components/jquery/src/exports/amd.js +24 -0
- data/vendor/assets/components/jquery/src/exports/global.js +32 -0
- data/vendor/assets/components/jquery/src/intro.js +44 -0
- data/vendor/assets/components/jquery/src/jquery.js +36 -0
- data/vendor/assets/components/jquery/src/manipulation/_evalUrl.js +18 -0
- data/vendor/assets/components/jquery/src/manipulation/support.js +31 -0
- data/vendor/assets/components/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/vendor/assets/components/jquery/src/manipulation.js +582 -0
- data/vendor/assets/components/jquery/src/offset.js +204 -0
- data/vendor/assets/components/jquery/src/outro.js +1 -0
- data/vendor/assets/components/jquery/src/queue/delay.js +22 -0
- data/vendor/assets/components/jquery/src/queue.js +142 -0
- data/vendor/assets/components/jquery/src/selector-native.js +172 -0
- data/vendor/assets/components/jquery/src/selector-sizzle.js +14 -0
- data/vendor/assets/components/jquery/src/selector.js +1 -0
- data/vendor/assets/components/jquery/src/serialize.js +111 -0
- data/vendor/assets/components/jquery/src/sizzle/dist/sizzle.js +2034 -0
- data/vendor/assets/components/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/vendor/assets/components/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/vendor/assets/components/jquery/src/traversing/findFilter.js +100 -0
- data/vendor/assets/components/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/vendor/assets/components/jquery/src/traversing.js +200 -0
- data/vendor/assets/components/jquery/src/var/arr.js +3 -0
- data/vendor/assets/components/jquery/src/var/class2type.js +4 -0
- data/vendor/assets/components/jquery/src/var/concat.js +5 -0
- data/vendor/assets/components/jquery/src/var/hasOwn.js +5 -0
- data/vendor/assets/components/jquery/src/var/indexOf.js +5 -0
- data/vendor/assets/components/jquery/src/var/pnum.js +3 -0
- data/vendor/assets/components/jquery/src/var/push.js +5 -0
- data/vendor/assets/components/jquery/src/var/rnotwhite.js +3 -0
- data/vendor/assets/components/jquery/src/var/slice.js +5 -0
- data/vendor/assets/components/jquery/src/var/strundefined.js +3 -0
- data/vendor/assets/components/jquery/src/var/support.js +4 -0
- data/vendor/assets/components/jquery/src/var/toString.js +5 -0
- data/vendor/assets/components/jquery/src/wrap.js +78 -0
- data/vendor/assets/components/open-sans/.bower.json +36 -0
- data/vendor/assets/components/open-sans/bower.json +27 -0
- data/vendor/assets/components/open-sans/css/open-sans.css +91 -0
- data/vendor/assets/components/open-sans/css/open-sans.min.css +1 -0
- data/vendor/assets/components/open-sans/fonts/bold/opensans-bold-webfont.eot +0 -0
- data/vendor/assets/components/open-sans/fonts/bold/opensans-bold-webfont.svg +958 -0
- data/vendor/assets/components/open-sans/fonts/bold/opensans-bold-webfont.ttf +0 -0
- data/vendor/assets/components/open-sans/fonts/bold/opensans-bold-webfont.woff +0 -0
- data/vendor/assets/components/open-sans/fonts/bold-italic/opensans-bold-italic-webfont.eot +0 -0
- data/vendor/assets/components/open-sans/fonts/bold-italic/opensans-bold-italic-webfont.svg +958 -0
- data/vendor/assets/components/open-sans/fonts/bold-italic/opensans-bold-italic-webfont.ttf +0 -0
- data/vendor/assets/components/open-sans/fonts/bold-italic/opensans-bold-italic-webfont.woff +0 -0
- data/vendor/assets/components/open-sans/fonts/extrabold/opensans-extrabold-webfont.eot +0 -0
- data/vendor/assets/components/open-sans/fonts/extrabold/opensans-extrabold-webfont.svg +958 -0
- data/vendor/assets/components/open-sans/fonts/extrabold/opensans-extrabold-webfont.ttf +0 -0
- data/vendor/assets/components/open-sans/fonts/extrabold/opensans-extrabold-webfont.woff +0 -0
- data/vendor/assets/components/open-sans/fonts/extrabold-italic/opensans-extrabold-italic-webfont.eot +0 -0
- data/vendor/assets/components/open-sans/fonts/extrabold-italic/opensans-extrabold-italic-webfont.svg +958 -0
- data/vendor/assets/components/open-sans/fonts/extrabold-italic/opensans-extrabold-italic-webfont.ttf +0 -0
- data/vendor/assets/components/open-sans/fonts/extrabold-italic/opensans-extrabold-italic-webfont.woff +0 -0
- data/vendor/assets/components/open-sans/fonts/italic/opensans-italic-webfont.eot +0 -0
- data/vendor/assets/components/open-sans/fonts/italic/opensans-italic-webfont.svg +958 -0
- data/vendor/assets/components/open-sans/fonts/italic/opensans-italic-webfont.ttf +0 -0
- data/vendor/assets/components/open-sans/fonts/italic/opensans-italic-webfont.woff +0 -0
- data/vendor/assets/components/open-sans/fonts/light/opensans-light-webfont.eot +0 -0
- data/vendor/assets/components/open-sans/fonts/light/opensans-light-webfont.svg +958 -0
- data/vendor/assets/components/open-sans/fonts/light/opensans-light-webfont.ttf +0 -0
- data/vendor/assets/components/open-sans/fonts/light/opensans-light-webfont.woff +0 -0
- data/vendor/assets/components/open-sans/fonts/light-italic/opensans-light-italic-webfont.eot +0 -0
- data/vendor/assets/components/open-sans/fonts/light-italic/opensans-light-italic-webfont.svg +958 -0
- data/vendor/assets/components/open-sans/fonts/light-italic/opensans-light-italic-webfont.ttf +0 -0
- data/vendor/assets/components/open-sans/fonts/light-italic/opensans-light-italic-webfont.woff +0 -0
- data/vendor/assets/components/open-sans/fonts/regular/opensans-regular-webfont.eot +0 -0
- data/vendor/assets/components/open-sans/fonts/regular/opensans-regular-webfont.svg +958 -0
- data/vendor/assets/components/open-sans/fonts/regular/opensans-regular-webfont.ttf +0 -0
- data/vendor/assets/components/open-sans/fonts/regular/opensans-regular-webfont.woff +0 -0
- data/vendor/assets/components/open-sans/fonts/semibold/opensans-semibold-webfont.eot +0 -0
- data/vendor/assets/components/open-sans/fonts/semibold/opensans-semibold-webfont.svg +958 -0
- data/vendor/assets/components/open-sans/fonts/semibold/opensans-semibold-webfont.ttf +0 -0
- data/vendor/assets/components/open-sans/fonts/semibold/opensans-semibold-webfont.woff +0 -0
- data/vendor/assets/components/open-sans/fonts/semibold-italic/opensans-semibold-italic-webfont.eot +0 -0
- data/vendor/assets/components/open-sans/fonts/semibold-italic/opensans-semibold-italic-webfont.svg +958 -0
- data/vendor/assets/components/open-sans/fonts/semibold-italic/opensans-semibold-italic-webfont.ttf +0 -0
- data/vendor/assets/components/open-sans/fonts/semibold-italic/opensans-semibold-italic-webfont.woff +0 -0
- data/vendor/assets/components/open-sans/scss/_base.scss +19 -0
- data/vendor/assets/components/open-sans/scss/_bold-italic.scss +8 -0
- data/vendor/assets/components/open-sans/scss/_bold.scss +4 -0
- data/vendor/assets/components/open-sans/scss/_extrabold-italic.scss +8 -0
- data/vendor/assets/components/open-sans/scss/_extrabold.scss +4 -0
- data/vendor/assets/components/open-sans/scss/_italic.scss +8 -0
- data/vendor/assets/components/open-sans/scss/_light-italic.scss +8 -0
- data/vendor/assets/components/open-sans/scss/_light.scss +4 -0
- data/vendor/assets/components/open-sans/scss/_regular.scss +4 -0
- data/vendor/assets/components/open-sans/scss/_semibold-italic.scss +8 -0
- data/vendor/assets/components/open-sans/scss/_semibold.scss +4 -0
- data/vendor/assets/components/open-sans/scss/open-sans.scss +15 -0
- metadata +795 -0
@@ -0,0 +1,179 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: collapse.js v3.0.2
|
3
|
+
* http://getbootstrap.com/javascript/#collapse
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2013 Twitter, Inc.
|
6
|
+
*
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
18
|
+
* ======================================================================== */
|
19
|
+
|
20
|
+
|
21
|
+
+function ($) { "use strict";
|
22
|
+
|
23
|
+
// COLLAPSE PUBLIC CLASS DEFINITION
|
24
|
+
// ================================
|
25
|
+
|
26
|
+
var Collapse = function (element, options) {
|
27
|
+
this.$element = $(element)
|
28
|
+
this.options = $.extend({}, Collapse.DEFAULTS, options)
|
29
|
+
this.transitioning = null
|
30
|
+
|
31
|
+
if (this.options.parent) this.$parent = $(this.options.parent)
|
32
|
+
if (this.options.toggle) this.toggle()
|
33
|
+
}
|
34
|
+
|
35
|
+
Collapse.DEFAULTS = {
|
36
|
+
toggle: true
|
37
|
+
}
|
38
|
+
|
39
|
+
Collapse.prototype.dimension = function () {
|
40
|
+
var hasWidth = this.$element.hasClass('width')
|
41
|
+
return hasWidth ? 'width' : 'height'
|
42
|
+
}
|
43
|
+
|
44
|
+
Collapse.prototype.show = function () {
|
45
|
+
if (this.transitioning || this.$element.hasClass('in')) return
|
46
|
+
|
47
|
+
var startEvent = $.Event('show.bs.collapse')
|
48
|
+
this.$element.trigger(startEvent)
|
49
|
+
if (startEvent.isDefaultPrevented()) return
|
50
|
+
|
51
|
+
var actives = this.$parent && this.$parent.find('> .panel > .in')
|
52
|
+
|
53
|
+
if (actives && actives.length) {
|
54
|
+
var hasData = actives.data('bs.collapse')
|
55
|
+
if (hasData && hasData.transitioning) return
|
56
|
+
actives.collapse('hide')
|
57
|
+
hasData || actives.data('bs.collapse', null)
|
58
|
+
}
|
59
|
+
|
60
|
+
var dimension = this.dimension()
|
61
|
+
|
62
|
+
this.$element
|
63
|
+
.removeClass('collapse')
|
64
|
+
.addClass('collapsing')
|
65
|
+
[dimension](0)
|
66
|
+
|
67
|
+
this.transitioning = 1
|
68
|
+
|
69
|
+
var complete = function () {
|
70
|
+
this.$element
|
71
|
+
.removeClass('collapsing')
|
72
|
+
.addClass('in')
|
73
|
+
[dimension]('auto')
|
74
|
+
this.transitioning = 0
|
75
|
+
this.$element.trigger('shown.bs.collapse')
|
76
|
+
}
|
77
|
+
|
78
|
+
if (!$.support.transition) return complete.call(this)
|
79
|
+
|
80
|
+
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
|
81
|
+
|
82
|
+
this.$element
|
83
|
+
.one($.support.transition.end, $.proxy(complete, this))
|
84
|
+
.emulateTransitionEnd(350)
|
85
|
+
[dimension](this.$element[0][scrollSize])
|
86
|
+
}
|
87
|
+
|
88
|
+
Collapse.prototype.hide = function () {
|
89
|
+
if (this.transitioning || !this.$element.hasClass('in')) return
|
90
|
+
|
91
|
+
var startEvent = $.Event('hide.bs.collapse')
|
92
|
+
this.$element.trigger(startEvent)
|
93
|
+
if (startEvent.isDefaultPrevented()) return
|
94
|
+
|
95
|
+
var dimension = this.dimension()
|
96
|
+
|
97
|
+
this.$element
|
98
|
+
[dimension](this.$element[dimension]())
|
99
|
+
[0].offsetHeight
|
100
|
+
|
101
|
+
this.$element
|
102
|
+
.addClass('collapsing')
|
103
|
+
.removeClass('collapse')
|
104
|
+
.removeClass('in')
|
105
|
+
|
106
|
+
this.transitioning = 1
|
107
|
+
|
108
|
+
var complete = function () {
|
109
|
+
this.transitioning = 0
|
110
|
+
this.$element
|
111
|
+
.trigger('hidden.bs.collapse')
|
112
|
+
.removeClass('collapsing')
|
113
|
+
.addClass('collapse')
|
114
|
+
}
|
115
|
+
|
116
|
+
if (!$.support.transition) return complete.call(this)
|
117
|
+
|
118
|
+
this.$element
|
119
|
+
[dimension](0)
|
120
|
+
.one($.support.transition.end, $.proxy(complete, this))
|
121
|
+
.emulateTransitionEnd(350)
|
122
|
+
}
|
123
|
+
|
124
|
+
Collapse.prototype.toggle = function () {
|
125
|
+
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
126
|
+
}
|
127
|
+
|
128
|
+
|
129
|
+
// COLLAPSE PLUGIN DEFINITION
|
130
|
+
// ==========================
|
131
|
+
|
132
|
+
var old = $.fn.collapse
|
133
|
+
|
134
|
+
$.fn.collapse = function (option) {
|
135
|
+
return this.each(function () {
|
136
|
+
var $this = $(this)
|
137
|
+
var data = $this.data('bs.collapse')
|
138
|
+
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
139
|
+
|
140
|
+
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
141
|
+
if (typeof option == 'string') data[option]()
|
142
|
+
})
|
143
|
+
}
|
144
|
+
|
145
|
+
$.fn.collapse.Constructor = Collapse
|
146
|
+
|
147
|
+
|
148
|
+
// COLLAPSE NO CONFLICT
|
149
|
+
// ====================
|
150
|
+
|
151
|
+
$.fn.collapse.noConflict = function () {
|
152
|
+
$.fn.collapse = old
|
153
|
+
return this
|
154
|
+
}
|
155
|
+
|
156
|
+
|
157
|
+
// COLLAPSE DATA-API
|
158
|
+
// =================
|
159
|
+
|
160
|
+
$(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
161
|
+
var $this = $(this), href
|
162
|
+
var target = $this.attr('data-target')
|
163
|
+
|| e.preventDefault()
|
164
|
+
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
165
|
+
var $target = $(target)
|
166
|
+
var data = $target.data('bs.collapse')
|
167
|
+
var option = data ? 'toggle' : $this.data()
|
168
|
+
var parent = $this.attr('data-parent')
|
169
|
+
var $parent = parent && $(parent)
|
170
|
+
|
171
|
+
if (!data || !data.transitioning) {
|
172
|
+
if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
173
|
+
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
174
|
+
}
|
175
|
+
|
176
|
+
$target.collapse(option)
|
177
|
+
})
|
178
|
+
|
179
|
+
}(jQuery);
|
@@ -0,0 +1,154 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: dropdown.js v3.0.2
|
3
|
+
* http://getbootstrap.com/javascript/#dropdowns
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2013 Twitter, Inc.
|
6
|
+
*
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
18
|
+
* ======================================================================== */
|
19
|
+
|
20
|
+
|
21
|
+
+function ($) { "use strict";
|
22
|
+
|
23
|
+
// DROPDOWN CLASS DEFINITION
|
24
|
+
// =========================
|
25
|
+
|
26
|
+
var backdrop = '.dropdown-backdrop'
|
27
|
+
var toggle = '[data-toggle=dropdown]'
|
28
|
+
var Dropdown = function (element) {
|
29
|
+
var $el = $(element).on('click.bs.dropdown', this.toggle)
|
30
|
+
}
|
31
|
+
|
32
|
+
Dropdown.prototype.toggle = function (e) {
|
33
|
+
var $this = $(this)
|
34
|
+
|
35
|
+
if ($this.is('.disabled, :disabled')) return
|
36
|
+
|
37
|
+
var $parent = getParent($this)
|
38
|
+
var isActive = $parent.hasClass('open')
|
39
|
+
|
40
|
+
clearMenus()
|
41
|
+
|
42
|
+
if (!isActive) {
|
43
|
+
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
|
44
|
+
// if mobile we we use a backdrop because click events don't delegate
|
45
|
+
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
|
46
|
+
}
|
47
|
+
|
48
|
+
$parent.trigger(e = $.Event('show.bs.dropdown'))
|
49
|
+
|
50
|
+
if (e.isDefaultPrevented()) return
|
51
|
+
|
52
|
+
$parent
|
53
|
+
.toggleClass('open')
|
54
|
+
.trigger('shown.bs.dropdown')
|
55
|
+
|
56
|
+
$this.focus()
|
57
|
+
}
|
58
|
+
|
59
|
+
return false
|
60
|
+
}
|
61
|
+
|
62
|
+
Dropdown.prototype.keydown = function (e) {
|
63
|
+
if (!/(38|40|27)/.test(e.keyCode)) return
|
64
|
+
|
65
|
+
var $this = $(this)
|
66
|
+
|
67
|
+
e.preventDefault()
|
68
|
+
e.stopPropagation()
|
69
|
+
|
70
|
+
if ($this.is('.disabled, :disabled')) return
|
71
|
+
|
72
|
+
var $parent = getParent($this)
|
73
|
+
var isActive = $parent.hasClass('open')
|
74
|
+
|
75
|
+
if (!isActive || (isActive && e.keyCode == 27)) {
|
76
|
+
if (e.which == 27) $parent.find(toggle).focus()
|
77
|
+
return $this.click()
|
78
|
+
}
|
79
|
+
|
80
|
+
var $items = $('[role=menu] li:not(.divider):visible a', $parent)
|
81
|
+
|
82
|
+
if (!$items.length) return
|
83
|
+
|
84
|
+
var index = $items.index($items.filter(':focus'))
|
85
|
+
|
86
|
+
if (e.keyCode == 38 && index > 0) index-- // up
|
87
|
+
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
|
88
|
+
if (!~index) index=0
|
89
|
+
|
90
|
+
$items.eq(index).focus()
|
91
|
+
}
|
92
|
+
|
93
|
+
function clearMenus() {
|
94
|
+
$(backdrop).remove()
|
95
|
+
$(toggle).each(function (e) {
|
96
|
+
var $parent = getParent($(this))
|
97
|
+
if (!$parent.hasClass('open')) return
|
98
|
+
$parent.trigger(e = $.Event('hide.bs.dropdown'))
|
99
|
+
if (e.isDefaultPrevented()) return
|
100
|
+
$parent.removeClass('open').trigger('hidden.bs.dropdown')
|
101
|
+
})
|
102
|
+
}
|
103
|
+
|
104
|
+
function getParent($this) {
|
105
|
+
var selector = $this.attr('data-target')
|
106
|
+
|
107
|
+
if (!selector) {
|
108
|
+
selector = $this.attr('href')
|
109
|
+
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
110
|
+
}
|
111
|
+
|
112
|
+
var $parent = selector && $(selector)
|
113
|
+
|
114
|
+
return $parent && $parent.length ? $parent : $this.parent()
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
// DROPDOWN PLUGIN DEFINITION
|
119
|
+
// ==========================
|
120
|
+
|
121
|
+
var old = $.fn.dropdown
|
122
|
+
|
123
|
+
$.fn.dropdown = function (option) {
|
124
|
+
return this.each(function () {
|
125
|
+
var $this = $(this)
|
126
|
+
var data = $this.data('dropdown')
|
127
|
+
|
128
|
+
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
|
129
|
+
if (typeof option == 'string') data[option].call($this)
|
130
|
+
})
|
131
|
+
}
|
132
|
+
|
133
|
+
$.fn.dropdown.Constructor = Dropdown
|
134
|
+
|
135
|
+
|
136
|
+
// DROPDOWN NO CONFLICT
|
137
|
+
// ====================
|
138
|
+
|
139
|
+
$.fn.dropdown.noConflict = function () {
|
140
|
+
$.fn.dropdown = old
|
141
|
+
return this
|
142
|
+
}
|
143
|
+
|
144
|
+
|
145
|
+
// APPLY TO STANDARD DROPDOWN ELEMENTS
|
146
|
+
// ===================================
|
147
|
+
|
148
|
+
$(document)
|
149
|
+
.on('click.bs.dropdown.data-api', clearMenus)
|
150
|
+
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
151
|
+
.on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
152
|
+
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
153
|
+
|
154
|
+
}(jQuery);
|
@@ -0,0 +1,246 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: modal.js v3.0.2
|
3
|
+
* http://getbootstrap.com/javascript/#modals
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2013 Twitter, Inc.
|
6
|
+
*
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
18
|
+
* ======================================================================== */
|
19
|
+
|
20
|
+
|
21
|
+
+function ($) { "use strict";
|
22
|
+
|
23
|
+
// MODAL CLASS DEFINITION
|
24
|
+
// ======================
|
25
|
+
|
26
|
+
var Modal = function (element, options) {
|
27
|
+
this.options = options
|
28
|
+
this.$element = $(element)
|
29
|
+
this.$backdrop =
|
30
|
+
this.isShown = null
|
31
|
+
|
32
|
+
if (this.options.remote) this.$element.load(this.options.remote)
|
33
|
+
}
|
34
|
+
|
35
|
+
Modal.DEFAULTS = {
|
36
|
+
backdrop: true
|
37
|
+
, keyboard: true
|
38
|
+
, show: true
|
39
|
+
}
|
40
|
+
|
41
|
+
Modal.prototype.toggle = function (_relatedTarget) {
|
42
|
+
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
|
43
|
+
}
|
44
|
+
|
45
|
+
Modal.prototype.show = function (_relatedTarget) {
|
46
|
+
var that = this
|
47
|
+
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
|
48
|
+
|
49
|
+
this.$element.trigger(e)
|
50
|
+
|
51
|
+
if (this.isShown || e.isDefaultPrevented()) return
|
52
|
+
|
53
|
+
this.isShown = true
|
54
|
+
|
55
|
+
this.escape()
|
56
|
+
|
57
|
+
this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
58
|
+
|
59
|
+
this.backdrop(function () {
|
60
|
+
var transition = $.support.transition && that.$element.hasClass('fade')
|
61
|
+
|
62
|
+
if (!that.$element.parent().length) {
|
63
|
+
that.$element.appendTo(document.body) // don't move modals dom position
|
64
|
+
}
|
65
|
+
|
66
|
+
that.$element.show()
|
67
|
+
|
68
|
+
if (transition) {
|
69
|
+
that.$element[0].offsetWidth // force reflow
|
70
|
+
}
|
71
|
+
|
72
|
+
that.$element
|
73
|
+
.addClass('in')
|
74
|
+
.attr('aria-hidden', false)
|
75
|
+
|
76
|
+
that.enforceFocus()
|
77
|
+
|
78
|
+
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
|
79
|
+
|
80
|
+
transition ?
|
81
|
+
that.$element.find('.modal-dialog') // wait for modal to slide in
|
82
|
+
.one($.support.transition.end, function () {
|
83
|
+
that.$element.focus().trigger(e)
|
84
|
+
})
|
85
|
+
.emulateTransitionEnd(300) :
|
86
|
+
that.$element.focus().trigger(e)
|
87
|
+
})
|
88
|
+
}
|
89
|
+
|
90
|
+
Modal.prototype.hide = function (e) {
|
91
|
+
if (e) e.preventDefault()
|
92
|
+
|
93
|
+
e = $.Event('hide.bs.modal')
|
94
|
+
|
95
|
+
this.$element.trigger(e)
|
96
|
+
|
97
|
+
if (!this.isShown || e.isDefaultPrevented()) return
|
98
|
+
|
99
|
+
this.isShown = false
|
100
|
+
|
101
|
+
this.escape()
|
102
|
+
|
103
|
+
$(document).off('focusin.bs.modal')
|
104
|
+
|
105
|
+
this.$element
|
106
|
+
.removeClass('in')
|
107
|
+
.attr('aria-hidden', true)
|
108
|
+
.off('click.dismiss.modal')
|
109
|
+
|
110
|
+
$.support.transition && this.$element.hasClass('fade') ?
|
111
|
+
this.$element
|
112
|
+
.one($.support.transition.end, $.proxy(this.hideModal, this))
|
113
|
+
.emulateTransitionEnd(300) :
|
114
|
+
this.hideModal()
|
115
|
+
}
|
116
|
+
|
117
|
+
Modal.prototype.enforceFocus = function () {
|
118
|
+
$(document)
|
119
|
+
.off('focusin.bs.modal') // guard against infinite focus loop
|
120
|
+
.on('focusin.bs.modal', $.proxy(function (e) {
|
121
|
+
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
|
122
|
+
this.$element.focus()
|
123
|
+
}
|
124
|
+
}, this))
|
125
|
+
}
|
126
|
+
|
127
|
+
Modal.prototype.escape = function () {
|
128
|
+
if (this.isShown && this.options.keyboard) {
|
129
|
+
this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
|
130
|
+
e.which == 27 && this.hide()
|
131
|
+
}, this))
|
132
|
+
} else if (!this.isShown) {
|
133
|
+
this.$element.off('keyup.dismiss.bs.modal')
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
Modal.prototype.hideModal = function () {
|
138
|
+
var that = this
|
139
|
+
this.$element.hide()
|
140
|
+
this.backdrop(function () {
|
141
|
+
that.removeBackdrop()
|
142
|
+
that.$element.trigger('hidden.bs.modal')
|
143
|
+
})
|
144
|
+
}
|
145
|
+
|
146
|
+
Modal.prototype.removeBackdrop = function () {
|
147
|
+
this.$backdrop && this.$backdrop.remove()
|
148
|
+
this.$backdrop = null
|
149
|
+
}
|
150
|
+
|
151
|
+
Modal.prototype.backdrop = function (callback) {
|
152
|
+
var that = this
|
153
|
+
var animate = this.$element.hasClass('fade') ? 'fade' : ''
|
154
|
+
|
155
|
+
if (this.isShown && this.options.backdrop) {
|
156
|
+
var doAnimate = $.support.transition && animate
|
157
|
+
|
158
|
+
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
159
|
+
.appendTo(document.body)
|
160
|
+
|
161
|
+
this.$element.on('click.dismiss.modal', $.proxy(function (e) {
|
162
|
+
if (e.target !== e.currentTarget) return
|
163
|
+
this.options.backdrop == 'static'
|
164
|
+
? this.$element[0].focus.call(this.$element[0])
|
165
|
+
: this.hide.call(this)
|
166
|
+
}, this))
|
167
|
+
|
168
|
+
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
169
|
+
|
170
|
+
this.$backdrop.addClass('in')
|
171
|
+
|
172
|
+
if (!callback) return
|
173
|
+
|
174
|
+
doAnimate ?
|
175
|
+
this.$backdrop
|
176
|
+
.one($.support.transition.end, callback)
|
177
|
+
.emulateTransitionEnd(150) :
|
178
|
+
callback()
|
179
|
+
|
180
|
+
} else if (!this.isShown && this.$backdrop) {
|
181
|
+
this.$backdrop.removeClass('in')
|
182
|
+
|
183
|
+
$.support.transition && this.$element.hasClass('fade')?
|
184
|
+
this.$backdrop
|
185
|
+
.one($.support.transition.end, callback)
|
186
|
+
.emulateTransitionEnd(150) :
|
187
|
+
callback()
|
188
|
+
|
189
|
+
} else if (callback) {
|
190
|
+
callback()
|
191
|
+
}
|
192
|
+
}
|
193
|
+
|
194
|
+
|
195
|
+
// MODAL PLUGIN DEFINITION
|
196
|
+
// =======================
|
197
|
+
|
198
|
+
var old = $.fn.modal
|
199
|
+
|
200
|
+
$.fn.modal = function (option, _relatedTarget) {
|
201
|
+
return this.each(function () {
|
202
|
+
var $this = $(this)
|
203
|
+
var data = $this.data('bs.modal')
|
204
|
+
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
205
|
+
|
206
|
+
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
|
207
|
+
if (typeof option == 'string') data[option](_relatedTarget)
|
208
|
+
else if (options.show) data.show(_relatedTarget)
|
209
|
+
})
|
210
|
+
}
|
211
|
+
|
212
|
+
$.fn.modal.Constructor = Modal
|
213
|
+
|
214
|
+
|
215
|
+
// MODAL NO CONFLICT
|
216
|
+
// =================
|
217
|
+
|
218
|
+
$.fn.modal.noConflict = function () {
|
219
|
+
$.fn.modal = old
|
220
|
+
return this
|
221
|
+
}
|
222
|
+
|
223
|
+
|
224
|
+
// MODAL DATA-API
|
225
|
+
// ==============
|
226
|
+
|
227
|
+
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
|
228
|
+
var $this = $(this)
|
229
|
+
var href = $this.attr('href')
|
230
|
+
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
231
|
+
var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
232
|
+
|
233
|
+
e.preventDefault()
|
234
|
+
|
235
|
+
$target
|
236
|
+
.modal(option, this)
|
237
|
+
.one('hide', function () {
|
238
|
+
$this.is(':visible') && $this.focus()
|
239
|
+
})
|
240
|
+
})
|
241
|
+
|
242
|
+
$(document)
|
243
|
+
.on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
|
244
|
+
.on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
|
245
|
+
|
246
|
+
}(jQuery);
|
@@ -0,0 +1,117 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: popover.js v3.0.2
|
3
|
+
* http://getbootstrap.com/javascript/#popovers
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2013 Twitter, Inc.
|
6
|
+
*
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
18
|
+
* ======================================================================== */
|
19
|
+
|
20
|
+
|
21
|
+
+function ($) { "use strict";
|
22
|
+
|
23
|
+
// POPOVER PUBLIC CLASS DEFINITION
|
24
|
+
// ===============================
|
25
|
+
|
26
|
+
var Popover = function (element, options) {
|
27
|
+
this.init('popover', element, options)
|
28
|
+
}
|
29
|
+
|
30
|
+
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
31
|
+
|
32
|
+
Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
|
33
|
+
placement: 'right'
|
34
|
+
, trigger: 'click'
|
35
|
+
, content: ''
|
36
|
+
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
37
|
+
})
|
38
|
+
|
39
|
+
|
40
|
+
// NOTE: POPOVER EXTENDS tooltip.js
|
41
|
+
// ================================
|
42
|
+
|
43
|
+
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
|
44
|
+
|
45
|
+
Popover.prototype.constructor = Popover
|
46
|
+
|
47
|
+
Popover.prototype.getDefaults = function () {
|
48
|
+
return Popover.DEFAULTS
|
49
|
+
}
|
50
|
+
|
51
|
+
Popover.prototype.setContent = function () {
|
52
|
+
var $tip = this.tip()
|
53
|
+
var title = this.getTitle()
|
54
|
+
var content = this.getContent()
|
55
|
+
|
56
|
+
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
57
|
+
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
|
58
|
+
|
59
|
+
$tip.removeClass('fade top bottom left right in')
|
60
|
+
|
61
|
+
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
|
62
|
+
// this manually by checking the contents.
|
63
|
+
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
|
64
|
+
}
|
65
|
+
|
66
|
+
Popover.prototype.hasContent = function () {
|
67
|
+
return this.getTitle() || this.getContent()
|
68
|
+
}
|
69
|
+
|
70
|
+
Popover.prototype.getContent = function () {
|
71
|
+
var $e = this.$element
|
72
|
+
var o = this.options
|
73
|
+
|
74
|
+
return $e.attr('data-content')
|
75
|
+
|| (typeof o.content == 'function' ?
|
76
|
+
o.content.call($e[0]) :
|
77
|
+
o.content)
|
78
|
+
}
|
79
|
+
|
80
|
+
Popover.prototype.arrow = function () {
|
81
|
+
return this.$arrow = this.$arrow || this.tip().find('.arrow')
|
82
|
+
}
|
83
|
+
|
84
|
+
Popover.prototype.tip = function () {
|
85
|
+
if (!this.$tip) this.$tip = $(this.options.template)
|
86
|
+
return this.$tip
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
// POPOVER PLUGIN DEFINITION
|
91
|
+
// =========================
|
92
|
+
|
93
|
+
var old = $.fn.popover
|
94
|
+
|
95
|
+
$.fn.popover = function (option) {
|
96
|
+
return this.each(function () {
|
97
|
+
var $this = $(this)
|
98
|
+
var data = $this.data('bs.popover')
|
99
|
+
var options = typeof option == 'object' && option
|
100
|
+
|
101
|
+
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
102
|
+
if (typeof option == 'string') data[option]()
|
103
|
+
})
|
104
|
+
}
|
105
|
+
|
106
|
+
$.fn.popover.Constructor = Popover
|
107
|
+
|
108
|
+
|
109
|
+
// POPOVER NO CONFLICT
|
110
|
+
// ===================
|
111
|
+
|
112
|
+
$.fn.popover.noConflict = function () {
|
113
|
+
$.fn.popover = old
|
114
|
+
return this
|
115
|
+
}
|
116
|
+
|
117
|
+
}(jQuery);
|