praxis 0.16.1 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +0 -1
- data/.ruby-version +1 -1
- data/.travis.yml +2 -1
- data/CHANGELOG.md +41 -0
- data/CONTRIBUTING.md +3 -0
- data/lib/api_browser/Gruntfile.js +20 -4
- data/lib/api_browser/app/bower_components/angular-mocks/.bower.json +6 -6
- data/lib/api_browser/app/bower_components/angular-mocks/README.md +11 -5
- data/lib/api_browser/app/bower_components/angular-mocks/angular-mocks.js +475 -216
- data/lib/api_browser/app/bower_components/angular-mocks/bower.json +2 -2
- data/lib/api_browser/app/bower_components/angular-mocks/ngAnimateMock.js +2 -0
- data/lib/api_browser/app/bower_components/angular-mocks/ngMock.js +2 -0
- data/lib/api_browser/app/bower_components/angular-mocks/ngMockE2E.js +2 -0
- data/lib/api_browser/app/bower_components/angular-mocks/package.json +1 -1
- data/lib/api_browser/app/bower_components/angular-sanitize/.bower.json +8 -8
- data/lib/api_browser/app/bower_components/angular-sanitize/README.md +19 -5
- data/lib/api_browser/app/bower_components/angular-sanitize/angular-sanitize.js +186 -127
- data/lib/api_browser/app/bower_components/angular-sanitize/angular-sanitize.min.js +12 -10
- data/lib/api_browser/app/bower_components/angular-sanitize/angular-sanitize.min.js.map +3 -3
- data/lib/api_browser/app/bower_components/angular-sanitize/bower.json +3 -2
- data/lib/api_browser/app/bower_components/angular-sanitize/index.js +2 -0
- data/lib/api_browser/app/bower_components/angular-sanitize/package.json +26 -0
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/.bower.json +15 -8
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/bower.json +11 -3
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-csp.css +6 -0
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js +1177 -453
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.min.js +4 -4
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap.js +1066 -404
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap.min.js +3 -3
- data/lib/api_browser/app/bower_components/angular-ui-router/.bower.json +5 -6
- data/lib/api_browser/app/bower_components/angular-ui-router/CHANGELOG.md +208 -3
- data/lib/api_browser/app/bower_components/angular-ui-router/CONTRIBUTING.md +65 -0
- data/lib/api_browser/app/bower_components/angular-ui-router/LICENSE +1 -1
- data/lib/api_browser/app/bower_components/angular-ui-router/README.md +36 -71
- data/lib/api_browser/app/bower_components/angular-ui-router/api/angular-ui-router.d.ts +126 -0
- data/lib/api_browser/app/bower_components/angular-ui-router/bower.json +1 -1
- data/lib/api_browser/app/bower_components/angular-ui-router/release/angular-ui-router.js +1902 -755
- data/lib/api_browser/app/bower_components/angular-ui-router/release/angular-ui-router.min.js +2 -2
- data/lib/api_browser/app/bower_components/angular-ui-router/src/common.js +69 -23
- data/lib/api_browser/app/bower_components/angular-ui-router/src/resolve.js +15 -5
- data/lib/api_browser/app/bower_components/angular-ui-router/src/state.js +556 -295
- data/lib/api_browser/app/bower_components/angular-ui-router/src/stateDirectives.js +101 -42
- data/lib/api_browser/app/bower_components/angular-ui-router/src/stateFilters.js +6 -2
- data/lib/api_browser/app/bower_components/angular-ui-router/src/templateFactory.js +2 -2
- data/lib/api_browser/app/bower_components/angular-ui-router/src/urlMatcherFactory.js +822 -97
- data/lib/api_browser/app/bower_components/angular-ui-router/src/urlRouter.js +274 -120
- data/lib/api_browser/app/bower_components/angular-ui-router/src/viewDirective.js +33 -20
- data/lib/api_browser/app/bower_components/angular-ui-router/src/viewScroll.js +1 -1
- data/lib/api_browser/app/bower_components/angular/.bower.json +5 -5
- data/lib/api_browser/app/bower_components/angular/README.md +2 -5
- data/lib/api_browser/app/bower_components/angular/angular-csp.css +5 -8
- data/lib/api_browser/app/bower_components/angular/angular.js +12975 -6996
- data/lib/api_browser/app/bower_components/angular/angular.min.js +285 -213
- data/lib/api_browser/app/bower_components/angular/angular.min.js.gzip +0 -0
- data/lib/api_browser/app/bower_components/angular/angular.min.js.map +3 -3
- data/lib/api_browser/app/bower_components/angular/bower.json +1 -1
- data/lib/api_browser/app/bower_components/angular/index.js +2 -0
- data/lib/api_browser/app/bower_components/angular/package.json +2 -2
- data/lib/api_browser/app/bower_components/bootstrap-sass/.bower.json +31 -16
- data/lib/api_browser/app/bower_components/bootstrap-sass/CHANGELOG.md +108 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/CONTRIBUTING.md +55 -37
- data/lib/api_browser/app/bower_components/bootstrap-sass/README.md +147 -206
- data/lib/api_browser/app/bower_components/bootstrap-sass/bower.json +19 -8
- data/lib/api_browser/app/bower_components/bootstrap-sass/{dist/fonts → vendor/assets/fonts/bootstrap}/glyphicons-halflings-regular.eot +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{dist/fonts → vendor/assets/fonts/bootstrap}/glyphicons-halflings-regular.svg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{dist/fonts → vendor/assets/fonts/bootstrap}/glyphicons-halflings-regular.ttf +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{dist/fonts → vendor/assets/fonts/bootstrap}/glyphicons-halflings-regular.woff +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/vendor/assets/javascripts/bootstrap.js +12 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/affix.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/alert.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/button.js +11 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/carousel.js +5 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/collapse.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/dropdown.js +5 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/modal.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/popover.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/scrollspy.js +2 -2
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/tab.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/tooltip.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/transition.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss +1 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_alerts.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_badges.scss +6 -6
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_breadcrumbs.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_button-groups.scss +7 -33
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_buttons.scss +2 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_carousel.scss +1 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_close.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_code.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_component-animations.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_dropdowns.scss +3 -8
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_forms.scss +11 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_glyphicons.scss +5 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_grid.scss +12 -26
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_input-groups.scss +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_jumbotron.scss +8 -2
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_labels.scss +6 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_list-group.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_media.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_mixins.scss +38 -51
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_modals.scss +2 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_navbar.scss +41 -53
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_navs.scss +0 -20
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_normalize.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_pager.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_pagination.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_panels.scss +11 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_popovers.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_print.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_progress-bars.scss +0 -12
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_responsive-utilities.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_scaffolding.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_tables.scss +5 -18
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_theme.scss +2 -2
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_thumbnails.scss +9 -3
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_tooltip.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_type.scss +54 -52
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_utilities.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_variables.scss +20 -11
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_wells.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/bootstrap.scss +0 -0
- data/lib/api_browser/app/bower_components/lodash/.bower.json +9 -13
- data/lib/api_browser/app/bower_components/lodash/LICENSE.txt +3 -3
- data/lib/api_browser/app/bower_components/lodash/bower.json +4 -7
- data/lib/api_browser/app/bower_components/lodash/lodash.js +12235 -0
- data/lib/api_browser/app/bower_components/lodash/lodash.min.js +98 -0
- data/lib/api_browser/app/index.html +0 -1
- data/lib/api_browser/app/js/app.js +2 -5
- data/lib/api_browser/app/js/controllers/action.js +21 -37
- data/lib/api_browser/app/js/controllers/controller.js +23 -1
- data/lib/api_browser/app/js/controllers/menu.js +46 -14
- data/lib/api_browser/app/js/controllers/type.js +2 -9
- data/lib/api_browser/app/js/directives/attribute_description.js +15 -5
- data/lib/api_browser/app/js/directives/attribute_table.js +6 -6
- data/lib/api_browser/app/js/directives/fixed_if_fits.js +20 -0
- data/lib/api_browser/app/js/directives/no_container.js +6 -6
- data/lib/api_browser/app/js/directives/type_placeholder.js +21 -0
- data/lib/api_browser/app/js/factories/Configuration.js +13 -0
- data/lib/api_browser/app/js/factories/Documentation.js +0 -3
- data/lib/api_browser/app/js/factories/normalize_attributes.js +19 -0
- data/lib/api_browser/app/js/factories/template_for.js +113 -0
- data/lib/api_browser/app/sass/modules/_body.scss +26 -4
- data/lib/api_browser/app/sass/modules/_sidebar.scss +68 -1
- data/lib/api_browser/app/sass/praxis.scss +1 -5
- data/lib/api_browser/app/sass/variables/_bootstrap-variables.scss +13 -4
- data/lib/api_browser/app/views/action.html +13 -17
- data/lib/api_browser/app/views/controller.html +32 -4
- data/lib/api_browser/app/views/directives/attribute_description.html +1 -1
- data/lib/api_browser/app/views/directives/attribute_description/{_default.html → default.html} +0 -0
- data/lib/api_browser/app/views/directives/attribute_description/example.html +13 -0
- data/lib/api_browser/app/views/directives/attribute_description/headers.html +8 -0
- data/lib/api_browser/app/views/directives/attribute_description/member_options.html +4 -0
- data/lib/api_browser/app/views/directives/attribute_description/values.html +14 -0
- data/lib/api_browser/app/views/directives/attribute_table.html +2 -2
- data/lib/api_browser/app/views/home.html +1 -3
- data/lib/api_browser/app/views/layout.html +3 -36
- data/lib/api_browser/app/views/menu.html +45 -0
- data/lib/api_browser/app/views/navbar.html +1 -1
- data/lib/api_browser/app/views/type.html +2 -2
- data/lib/api_browser/app/views/type/{_details.html → details.html} +6 -6
- data/lib/api_browser/app/views/types/embedded/default.html +10 -0
- data/lib/api_browser/app/views/types/embedded/links.html +11 -0
- data/lib/api_browser/app/views/types/embedded/struct.html +2 -0
- data/lib/api_browser/app/views/types/label/link.html +1 -0
- data/lib/api_browser/app/views/types/label/primitive.html +1 -0
- data/lib/api_browser/app/views/types/label/primitive_collection.html +1 -0
- data/lib/api_browser/app/views/types/label/type.html +1 -0
- data/lib/api_browser/app/views/types/label/type_collection.html +1 -0
- data/lib/api_browser/app/views/{directives/request_body/_default.html → types/standalone/default.html} +1 -1
- data/lib/api_browser/app/views/types/standalone/struct.html +1 -0
- data/lib/api_browser/bower.json +9 -9
- data/lib/api_browser/package.json +1 -1
- data/lib/praxis.rb +10 -4
- data/lib/praxis/action_definition.rb +16 -4
- data/lib/praxis/action_definition/headers_dsl_compiler.rb +5 -2
- data/lib/praxis/api_definition.rb +3 -1
- data/lib/praxis/api_general_info.rb +49 -5
- data/lib/praxis/application.rb +12 -4
- data/lib/praxis/bootloader.rb +1 -0
- data/lib/praxis/bootloader_stages/environment.rb +2 -0
- data/lib/praxis/bootloader_stages/routing.rb +1 -1
- data/lib/praxis/bootloader_stages/subgroup_loader.rb +1 -0
- data/lib/praxis/exceptions/validation.rb +7 -0
- data/lib/praxis/handlers/plain.rb +16 -0
- data/lib/praxis/handlers/xml.rb +4 -4
- data/lib/praxis/links.rb +13 -3
- data/lib/praxis/media_type_identifier.rb +3 -0
- data/lib/praxis/multipart/parser.rb +41 -48
- data/lib/praxis/multipart/part.rb +196 -3
- data/lib/praxis/request.rb +14 -11
- data/lib/praxis/request_stages/request_stage.rb +4 -0
- data/lib/praxis/request_stages/response.rb +10 -9
- data/lib/praxis/request_stages/validate.rb +1 -7
- data/lib/praxis/request_stages/validate_params_and_headers.rb +30 -5
- data/lib/praxis/request_stages/validate_payload.rb +14 -5
- data/lib/praxis/resource_definition.rb +117 -15
- data/lib/praxis/response.rb +6 -5
- data/lib/praxis/response_definition.rb +51 -5
- data/lib/praxis/responses/http.rb +5 -0
- data/lib/praxis/responses/multipart_ok.rb +51 -0
- data/lib/praxis/responses/validation_error.rb +7 -7
- data/lib/praxis/restful_doc_generator.rb +9 -4
- data/lib/praxis/route.rb +3 -2
- data/lib/praxis/router.rb +26 -16
- data/lib/praxis/router/rack.rb +51 -0
- data/lib/praxis/router/simple.rb +146 -0
- data/lib/praxis/routing_config.rb +2 -2
- data/lib/praxis/trait.rb +1 -1
- data/lib/praxis/types/fuzzy_hash.rb +49 -0
- data/lib/praxis/types/media_type_common.rb +1 -1
- data/lib/praxis/types/multipart.rb +47 -12
- data/lib/praxis/types/multipart_array.rb +320 -0
- data/lib/praxis/types/multipart_array/part_definition.rb +52 -0
- data/lib/praxis/validation_handler.rb +10 -0
- data/lib/praxis/version.rb +2 -2
- data/praxis.gemspec +3 -3
- data/spec/api_browser/directives/type_placeholder_spec.js +134 -0
- data/spec/api_browser/factories/normalize_attributes_spec.js +97 -0
- data/spec/api_browser/factories/template_for_spec.js +67 -0
- data/spec/functional_spec.rb +111 -45
- data/spec/praxis/action_definition_spec.rb +31 -7
- data/spec/praxis/api_definition_spec.rb +2 -2
- data/spec/praxis/api_general_info_spec.rb +25 -0
- data/spec/praxis/application_spec.rb +24 -11
- data/spec/praxis/handlers/xml_spec.rb +55 -33
- data/spec/praxis/links_spec.rb +18 -1
- data/spec/praxis/media_type_collection_spec.rb +1 -1
- data/spec/praxis/media_type_spec.rb +2 -2
- data/spec/praxis/multipart/parser_spec.rb +21 -13
- data/spec/praxis/plugins/praxis_mapper_plugin_spec.rb +1 -1
- data/spec/praxis/request_spec.rb +52 -24
- data/spec/praxis/{request_stages_action_spec.rb → request_stages/action_spec.rb} +1 -1
- data/spec/praxis/{request_stage_spec.rb → request_stages/request_stage_spec.rb} +0 -0
- data/spec/praxis/{request_stages_validate_spec.rb → request_stages/validate_spec.rb} +1 -1
- data/spec/praxis/resource_definition_spec.rb +30 -4
- data/spec/praxis/response_definition_spec.rb +60 -19
- data/spec/praxis/response_spec.rb +2 -2
- data/spec/praxis/responses/validation_error_spec.rb +33 -16
- data/spec/praxis/route_spec.rb +4 -2
- data/spec/praxis/router_spec.rb +28 -12
- data/spec/praxis/routing_config_spec.rb +11 -5
- data/spec/praxis/types/collection_spec.rb +1 -1
- data/spec/praxis/types/fuzzy_hash_spec.rb +20 -0
- data/spec/praxis/types/multipart_array/part_definition_spec.rb +5 -0
- data/spec/praxis/types/multipart_array_spec.rb +334 -0
- data/spec/praxis/types/multipart_spec.rb +14 -5
- data/spec/spec_app/app/controllers/instances.rb +20 -10
- data/spec/spec_app/app/controllers/volumes.rb +8 -4
- data/spec/spec_app/app/responses/bulk_response.rb +0 -6
- data/spec/spec_app/config/environment.rb +13 -0
- data/spec/spec_app/design/api.rb +7 -10
- data/spec/spec_app/design/media_types/instance.rb +3 -1
- data/spec/spec_app/design/resources/instances.rb +50 -41
- data/spec/spec_app/design/resources/volume_snapshots.rb +39 -0
- data/spec/spec_app/design/resources/volumes.rb +11 -6
- data/spec/spec_helper.rb +3 -1
- metadata +125 -218
- data/lib/api_browser/app/bower_components/angular-ui-router/src/compat.js +0 -146
- data/lib/api_browser/app/bower_components/bootstrap-sass/CNAME +0 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/DOCS-LICENSE +0 -319
- data/lib/api_browser/app/bower_components/bootstrap-sass/Gemfile +0 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/Gemfile.lock +0 -14
- data/lib/api_browser/app/bower_components/bootstrap-sass/Gruntfile.js +0 -244
- data/lib/api_browser/app/bower_components/bootstrap-sass/LICENSE +0 -176
- data/lib/api_browser/app/bower_components/bootstrap-sass/LICENSE-MIT +0 -21
- data/lib/api_browser/app/bower_components/bootstrap-sass/Rakefile +0 -44
- data/lib/api_browser/app/bower_components/bootstrap-sass/_config.yml +0 -25
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/ads.html +0 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/footer.html +0 -34
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/header.html +0 -42
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-about.html +0 -12
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-components.html +0 -137
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-css.html +0 -99
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-customize.html +0 -40
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-getting-started.html +0 -44
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-javascript.html +0 -88
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-main.html +0 -37
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/old-bs-docs.html +0 -8
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/social-buttons.html +0 -16
- data/lib/api_browser/app/bower_components/bootstrap-sass/_layouts/default.html +0 -79
- data/lib/api_browser/app/bower_components/bootstrap-sass/_layouts/home.html +0 -47
- data/lib/api_browser/app/bower_components/bootstrap-sass/about.html +0 -93
- data/lib/api_browser/app/bower_components/bootstrap-sass/browserstack.json +0 -37
- data/lib/api_browser/app/bower_components/bootstrap-sass/components.html +0 -3689
- data/lib/api_browser/app/bower_components/bootstrap-sass/composer.json +0 -28
- data/lib/api_browser/app/bower_components/bootstrap-sass/css.html +0 -2674
- data/lib/api_browser/app/bower_components/bootstrap-sass/customize.html +0 -1715
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/css/bootstrap-theme.css +0 -427
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/css/bootstrap-theme.min.css +0 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/css/bootstrap.css +0 -6350
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/css/bootstrap.min.css +0 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/js/bootstrap.js +0 -2002
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/js/bootstrap.min.js +0 -9
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/css/docs.css +0 -1195
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/css/pygments-manni.css +0 -66
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/ico/apple-touch-icon-144-precomposed.png +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/ico/favicon.png +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/application.js +0 -103
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/customizer.js +0 -332
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/filesaver.js +0 -169
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/holder.js +0 -404
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/ie8-responsive-file-warning.js +0 -12
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/jszip.js +0 -1467
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/less.js +0 -9
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/raw-files.js +0 -3
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/uglify.js +0 -14
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/carousel/carousel.css +0 -148
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/carousel/index.html +0 -206
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/grid/grid.css +0 -28
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/grid/index.html +0 -148
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/jumbotron-narrow/index.html +0 -82
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/jumbotron-narrow/jumbotron-narrow.css +0 -79
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/jumbotron/index.html +0 -99
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/jumbotron/jumbotron.css +0 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/justified-nav/index.html +0 -83
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/justified-nav/justified-nav.css +0 -88
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar-fixed-top/index.html +0 -91
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar-fixed-top/navbar-fixed-top.css +0 -4
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar-static-top/index.html +0 -92
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar-static-top/navbar-static-top.css +0 -7
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar/index.html +0 -88
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar/navbar.css +0 -8
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/non-responsive/index.html +0 -101
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/non-responsive/non-responsive.css +0 -116
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/offcanvas/index.html +0 -130
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/offcanvas/offcanvas.css +0 -50
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/offcanvas/offcanvas.js +0 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/carousel.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/grid.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/jumbotron-narrow.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/jumbotron.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/justified-nav.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/navbar-fixed.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/navbar-static.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/navbar.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/non-responsive.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/offcanvas.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/sign-in.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/starter-template.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/sticky-footer-navbar.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/sticky-footer.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/theme.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/signin/index.html +0 -50
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/signin/signin.css +0 -40
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/starter-template/index.html +0 -68
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/starter-template/starter-template.css +0 -7
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/sticky-footer-navbar/index.html +0 -91
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/sticky-footer-navbar/sticky-footer-navbar.css +0 -45
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/sticky-footer/index.html +0 -55
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/sticky-footer/sticky-footer.css +0 -38
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/theme/index.html +0 -384
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/theme/theme.css +0 -14
- data/lib/api_browser/app/bower_components/bootstrap-sass/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/fonts/glyphicons-halflings-regular.svg +0 -229
- data/lib/api_browser/app/bower_components/bootstrap-sass/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/getting-started.html +0 -1021
- data/lib/api_browser/app/bower_components/bootstrap-sass/index.html +0 -16
- data/lib/api_browser/app/bower_components/bootstrap-sass/javascript.html +0 -1983
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/index.html +0 -52
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/affix.js +0 -25
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/alert.js +0 -62
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/button.js +0 -116
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/carousel.js +0 -87
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/collapse.js +0 -164
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/dropdown.js +0 -219
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/modal.js +0 -196
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/phantom.js +0 -69
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/popover.js +0 -133
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/scrollspy.js +0 -37
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/tab.js +0 -86
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/tooltip.js +0 -437
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/transition.js +0 -13
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/vendor/jquery.js +0 -6
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/vendor/qunit.css +0 -232
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/vendor/qunit.js +0 -1510
- data/lib/api_browser/app/bower_components/bootstrap-sass/package.json +0 -40
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.compat.js +0 -7157
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.compat.min.js +0 -61
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.js +0 -6785
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.min.js +0 -56
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.underscore.js +0 -4979
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.underscore.min.js +0 -39
- data/lib/api_browser/app/js/directives/attribute_table_row.js +0 -17
- data/lib/api_browser/app/js/directives/request_body.js +0 -25
- data/lib/api_browser/app/js/directives/request_headers.js +0 -17
- data/lib/api_browser/app/js/directives/request_parameters.js +0 -17
- data/lib/api_browser/app/js/directives/type_label.js +0 -52
- data/lib/api_browser/app/js/factories/PayloadTemplates.js +0 -10
- data/lib/api_browser/app/js/factories/TemplateProvider.js +0 -45
- data/lib/api_browser/app/js/factories/TypeTemplates.js +0 -11
- data/lib/api_browser/app/views/directives/attribute_description/_example.html +0 -13
- data/lib/api_browser/app/views/directives/attribute_description/_headers.html +0 -8
- data/lib/api_browser/app/views/directives/attribute_table_row/_default.html +0 -10
- data/lib/api_browser/app/views/directives/attribute_table_row/_links.html +0 -11
- data/lib/api_browser/app/views/directives/attribute_table_row/_struct.html +0 -2
- data/lib/api_browser/app/views/directives/request_body/_struct.html +0 -1
- data/lib/api_browser/app/views/resource/_actions.html +0 -27
@@ -1,14 +1,16 @@
|
|
1
1
|
/*
|
2
|
-
AngularJS v1.
|
3
|
-
(c) 2010-
|
2
|
+
AngularJS v1.4.0
|
3
|
+
(c) 2010-2015 Google, Inc. http://angularjs.org
|
4
4
|
License: MIT
|
5
5
|
*/
|
6
|
-
(function(
|
7
|
-
if(0<=c){for(d=
|
8
|
-
a.replace(b[0],""),
|
9
|
-
"&").replace(N,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function
|
10
|
-
c(B(a))}}}var L=h.$$minErr("$sanitize"),
|
11
|
-
|
12
|
-
n=
|
13
|
-
|
6
|
+
(function(n,h,p){'use strict';function E(a){var f=[];r(f,h.noop).chars(a);return f.join("")}function g(a,f){var d={},c=a.split(","),b;for(b=0;b<c.length;b++)d[f?h.lowercase(c[b]):c[b]]=!0;return d}function F(a,f){function d(a,b,d,l){b=h.lowercase(b);if(s[b])for(;e.last()&&t[e.last()];)c("",e.last());u[b]&&e.last()==b&&c("",b);(l=v[b]||!!l)||e.push(b);var m={};d.replace(G,function(b,a,f,c,d){m[a]=q(f||c||d||"")});f.start&&f.start(b,m,l)}function c(b,a){var c=0,d;if(a=h.lowercase(a))for(c=e.length-
|
7
|
+
1;0<=c&&e[c]!=a;c--);if(0<=c){for(d=e.length-1;d>=c;d--)f.end&&f.end(e[d]);e.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,k,e=[],m=a,l;for(e.last=function(){return e[e.length-1]};a;){l="";k=!0;if(e.last()&&w[e.last()])a=a.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+e.last()+"[^>]*>","i"),function(a,b){b=b.replace(H,"$1").replace(I,"$1");f.chars&&f.chars(q(b));return""}),c("",e.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",
|
8
|
+
b)===b&&(f.comment&&f.comment(a.substring(4,b)),a=a.substring(b+3),k=!1);else if(x.test(a)){if(b=a.match(x))a=a.replace(b[0],""),k=!1}else if(J.test(a)){if(b=a.match(y))a=a.substring(b[0].length),b[0].replace(y,c),k=!1}else K.test(a)&&((b=a.match(z))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(z,d)),k=!1):(l+="<",a=a.substring(1)));k&&(b=a.indexOf("<"),l+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),f.chars&&f.chars(q(l)))}if(a==m)throw L("badparse",a);m=a}c()}function q(a){if(!a)return"";A.innerHTML=
|
9
|
+
a.replace(/</g,"<");return A.textContent}function B(a){return a.replace(/&/g,"&").replace(M,function(a){var d=a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(d-55296)+(a-56320)+65536)+";"}).replace(N,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function r(a,f){var d=!1,c=h.bind(a,a.push);return{start:function(a,k,e){a=h.lowercase(a);!d&&w[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(k,function(d,e){var k=h.lowercase(e),g="img"===a&&"src"===k||
|
10
|
+
"background"===k;!0!==O[k]||!0===D[k]&&!f(d,g)||(c(" "),c(e),c('="'),c(B(d)),c('"'))}),c(e?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c("</"),c(a),c(">"));a==d&&(d=!1)},chars:function(a){d||c(B(a))}}}var L=h.$$minErr("$sanitize"),z=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,y=/^<\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^</,J=/^<\//,H=/\x3c!--(.*?)--\x3e/g,x=/<!DOCTYPE([^>]*?)>/i,
|
11
|
+
I=/<!\[CDATA\[(.*?)]]\x3e/g,M=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N=/([^\#-~| |!])/g,v=g("area,br,col,hr,img,wbr");n=g("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");p=g("rp,rt");var u=h.extend({},p,n),s=h.extend({},n,g("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),t=h.extend({},p,g("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var"));
|
12
|
+
n=g("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan,use");var w=g("script,style"),C=h.extend({},v,s,t,u,n),D=g("background,cite,href,longdesc,src,usemap,xlink:href");n=g("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width");
|
13
|
+
p=g("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",
|
14
|
+
!0);var O=h.extend({},D,p,n),A=document.createElement("pre");h.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(a){return function(f){var d=[];F(f,r(d,function(c,b){return!/^unsafe/.test(a(c,b))}));return d.join("")}}]});h.module("ngSanitize").filter("linky",["$sanitize",function(a){var f=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/,d=/^mailto:/;return function(c,b){function k(a){a&&g.push(E(a))}function e(a,c){g.push("<a ");
|
15
|
+
h.isDefined(b)&&g.push('target="',b,'" ');g.push('href="',a.replace(/"/g,"""),'">');k(c);g.push("</a>")}if(!c)return c;for(var m,l=c,g=[],n,p;m=l.match(f);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),p=m.index,k(l.substr(0,p)),e(n,m[0].replace(d,"")),l=l.substring(p+m[0].length);k(l);return a(g.join(""))}}])})(window,window.angular);
|
14
16
|
//# sourceMappingURL=angular-sanitize.min.js.map
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"version":3,
|
3
3
|
"file":"angular-sanitize.min.js",
|
4
|
-
"lineCount":
|
5
|
-
"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,
|
4
|
+
"lineCount":15,
|
5
|
+
"mappings":"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",
|
6
6
|
"sources":["angular-sanitize.js"],
|
7
|
-
"names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","obj","items","split","i","length","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","
|
7
|
+
"names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","lowercaseKeys","obj","items","split","i","length","lowercase","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","blockElements","stack","last","inlineElements","parseEndTag","optionalEndTagElements","voidElements","push","attrs","replace","ATTR_REGEXP","match","name","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","start","pos","end","index","text","stack.last","specialElements","RegExp","all","COMMENT_REGEXP","CDATA_REGEXP","indexOf","lastIndexOf","comment","substring","DOCTYPE_REGEXP","test","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","value","hiddenPre","innerHTML","textContent","encodeEntities","SURROGATE_PAIR_REGEXP","hi","charCodeAt","low","NON_ALPHANUMERIC_REGEXP","uriValidator","ignore","out","bind","validElements","forEach","key","lkey","isImage","validAttrs","uriAttrs","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","extend","svgElements","htmlAttrs","svgAttrs","document","createElement","module","provider","$SanitizeProvider","$get","$$sanitizeUri","uri","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","target","addText","addLink","url","isDefined","raw","substr"]
|
8
8
|
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"name": "angular-sanitize",
|
3
|
+
"version": "1.4.0",
|
4
|
+
"description": "AngularJS module for sanitizing HTML",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"repository": {
|
10
|
+
"type": "git",
|
11
|
+
"url": "https://github.com/angular/angular.js.git"
|
12
|
+
},
|
13
|
+
"keywords": [
|
14
|
+
"angular",
|
15
|
+
"framework",
|
16
|
+
"browser",
|
17
|
+
"html",
|
18
|
+
"client-side"
|
19
|
+
],
|
20
|
+
"author": "Angular Core Team <angular-core+npm@google.com>",
|
21
|
+
"license": "MIT",
|
22
|
+
"bugs": {
|
23
|
+
"url": "https://github.com/angular/angular.js/issues"
|
24
|
+
},
|
25
|
+
"homepage": "http://angularjs.org"
|
26
|
+
}
|
@@ -3,22 +3,29 @@
|
|
3
3
|
"name": "https://github.com/angular-ui/bootstrap/graphs/contributors"
|
4
4
|
},
|
5
5
|
"name": "angular-bootstrap",
|
6
|
-
"
|
6
|
+
"keywords": [
|
7
|
+
"angular",
|
8
|
+
"angular-ui",
|
9
|
+
"bootstrap"
|
10
|
+
],
|
11
|
+
"license": "MIT",
|
12
|
+
"ignore": [],
|
13
|
+
"description": "Native AngularJS (Angular) directives for Bootstrap.",
|
14
|
+
"version": "0.13.0",
|
7
15
|
"main": [
|
8
16
|
"./ui-bootstrap-tpls.js"
|
9
17
|
],
|
10
18
|
"dependencies": {
|
11
|
-
"angular": ">=1"
|
19
|
+
"angular": ">=1.3.0"
|
12
20
|
},
|
13
21
|
"homepage": "https://github.com/angular-ui/bootstrap-bower",
|
14
|
-
"_release": "0.
|
22
|
+
"_release": "0.13.0",
|
15
23
|
"_resolution": {
|
16
24
|
"type": "version",
|
17
|
-
"tag": "0.
|
18
|
-
"commit": "
|
25
|
+
"tag": "0.13.0",
|
26
|
+
"commit": "a75d899addcafb73344b724bec647620adeebc9a"
|
19
27
|
},
|
20
28
|
"_source": "git://github.com/angular-ui/bootstrap-bower.git",
|
21
|
-
"_target": "~0.
|
22
|
-
"_originalSource": "angular-ui-bootstrap-bower"
|
23
|
-
"_direct": true
|
29
|
+
"_target": "~0.13.0",
|
30
|
+
"_originalSource": "angular-ui-bootstrap-bower"
|
24
31
|
}
|
@@ -3,9 +3,17 @@
|
|
3
3
|
"name": "https://github.com/angular-ui/bootstrap/graphs/contributors"
|
4
4
|
},
|
5
5
|
"name": "angular-bootstrap",
|
6
|
-
"
|
6
|
+
"keywords": [
|
7
|
+
"angular",
|
8
|
+
"angular-ui",
|
9
|
+
"bootstrap"
|
10
|
+
],
|
11
|
+
"license": "MIT",
|
12
|
+
"ignore": [],
|
13
|
+
"description": "Native AngularJS (Angular) directives for Bootstrap.",
|
14
|
+
"version": "0.13.0",
|
7
15
|
"main": ["./ui-bootstrap-tpls.js"],
|
8
16
|
"dependencies": {
|
9
|
-
"angular": ">=1"
|
10
|
-
}
|
17
|
+
"angular": ">=1.3.0"
|
18
|
+
}
|
11
19
|
}
|
@@ -2,155 +2,47 @@
|
|
2
2
|
* angular-ui-bootstrap
|
3
3
|
* http://angular-ui.github.io/bootstrap/
|
4
4
|
|
5
|
-
* Version: 0.
|
5
|
+
* Version: 0.13.0 - 2015-05-02
|
6
6
|
* License: MIT
|
7
7
|
*/
|
8
|
-
angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.
|
9
|
-
angular.module("ui.bootstrap.tpls", ["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]);
|
10
|
-
angular.module('ui.bootstrap.
|
11
|
-
|
12
|
-
/**
|
13
|
-
* $transition service provides a consistent interface to trigger CSS 3 transitions and to be informed when they complete.
|
14
|
-
* @param {DOMElement} element The DOMElement that will be animated.
|
15
|
-
* @param {string|object|function} trigger The thing that will cause the transition to start:
|
16
|
-
* - As a string, it represents the css class to be added to the element.
|
17
|
-
* - As an object, it represents a hash of style attributes to be applied to the element.
|
18
|
-
* - As a function, it represents a function to be called that will cause the transition to occur.
|
19
|
-
* @return {Promise} A promise that is resolved when the transition finishes.
|
20
|
-
*/
|
21
|
-
.factory('$transition', ['$q', '$timeout', '$rootScope', function($q, $timeout, $rootScope) {
|
22
|
-
|
23
|
-
var $transition = function(element, trigger, options) {
|
24
|
-
options = options || {};
|
25
|
-
var deferred = $q.defer();
|
26
|
-
var endEventName = $transition[options.animation ? 'animationEndEventName' : 'transitionEndEventName'];
|
27
|
-
|
28
|
-
var transitionEndHandler = function(event) {
|
29
|
-
$rootScope.$apply(function() {
|
30
|
-
element.unbind(endEventName, transitionEndHandler);
|
31
|
-
deferred.resolve(element);
|
32
|
-
});
|
33
|
-
};
|
34
|
-
|
35
|
-
if (endEventName) {
|
36
|
-
element.bind(endEventName, transitionEndHandler);
|
37
|
-
}
|
38
|
-
|
39
|
-
// Wrap in a timeout to allow the browser time to update the DOM before the transition is to occur
|
40
|
-
$timeout(function() {
|
41
|
-
if ( angular.isString(trigger) ) {
|
42
|
-
element.addClass(trigger);
|
43
|
-
} else if ( angular.isFunction(trigger) ) {
|
44
|
-
trigger(element);
|
45
|
-
} else if ( angular.isObject(trigger) ) {
|
46
|
-
element.css(trigger);
|
47
|
-
}
|
48
|
-
//If browser does not support transitions, instantly resolve
|
49
|
-
if ( !endEventName ) {
|
50
|
-
deferred.resolve(element);
|
51
|
-
}
|
52
|
-
});
|
53
|
-
|
54
|
-
// Add our custom cancel function to the promise that is returned
|
55
|
-
// We can call this if we are about to run a new transition, which we know will prevent this transition from ending,
|
56
|
-
// i.e. it will therefore never raise a transitionEnd event for that transition
|
57
|
-
deferred.promise.cancel = function() {
|
58
|
-
if ( endEventName ) {
|
59
|
-
element.unbind(endEventName, transitionEndHandler);
|
60
|
-
}
|
61
|
-
deferred.reject('Transition cancelled');
|
62
|
-
};
|
63
|
-
|
64
|
-
return deferred.promise;
|
65
|
-
};
|
66
|
-
|
67
|
-
// Work out the name of the transitionEnd event
|
68
|
-
var transElement = document.createElement('trans');
|
69
|
-
var transitionEndEventNames = {
|
70
|
-
'WebkitTransition': 'webkitTransitionEnd',
|
71
|
-
'MozTransition': 'transitionend',
|
72
|
-
'OTransition': 'oTransitionEnd',
|
73
|
-
'transition': 'transitionend'
|
74
|
-
};
|
75
|
-
var animationEndEventNames = {
|
76
|
-
'WebkitTransition': 'webkitAnimationEnd',
|
77
|
-
'MozTransition': 'animationend',
|
78
|
-
'OTransition': 'oAnimationEnd',
|
79
|
-
'transition': 'animationend'
|
80
|
-
};
|
81
|
-
function findEndEventName(endEventNames) {
|
82
|
-
for (var name in endEventNames){
|
83
|
-
if (transElement.style[name] !== undefined) {
|
84
|
-
return endEventNames[name];
|
85
|
-
}
|
86
|
-
}
|
87
|
-
}
|
88
|
-
$transition.transitionEndEventName = findEndEventName(transitionEndEventNames);
|
89
|
-
$transition.animationEndEventName = findEndEventName(animationEndEventNames);
|
90
|
-
return $transition;
|
91
|
-
}]);
|
92
|
-
|
93
|
-
angular.module('ui.bootstrap.collapse', ['ui.bootstrap.transition'])
|
8
|
+
angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.transition","ui.bootstrap.typeahead"]);
|
9
|
+
angular.module("ui.bootstrap.tpls", ["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-popup.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/tooltip/tooltip-template-popup.html","template/popover/popover-template.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]);
|
10
|
+
angular.module('ui.bootstrap.collapse', [])
|
94
11
|
|
95
|
-
.directive('collapse', ['$
|
12
|
+
.directive('collapse', ['$animate', function ($animate) {
|
96
13
|
|
97
14
|
return {
|
98
15
|
link: function (scope, element, attrs) {
|
99
|
-
|
100
|
-
var initialAnimSkip = true;
|
101
|
-
var currentTransition;
|
102
|
-
|
103
|
-
function doTransition(change) {
|
104
|
-
var newTransition = $transition(element, change);
|
105
|
-
if (currentTransition) {
|
106
|
-
currentTransition.cancel();
|
107
|
-
}
|
108
|
-
currentTransition = newTransition;
|
109
|
-
newTransition.then(newTransitionDone, newTransitionDone);
|
110
|
-
return newTransition;
|
111
|
-
|
112
|
-
function newTransitionDone() {
|
113
|
-
// Make sure it's this transition, otherwise, leave it alone.
|
114
|
-
if (currentTransition === newTransition) {
|
115
|
-
currentTransition = undefined;
|
116
|
-
}
|
117
|
-
}
|
118
|
-
}
|
119
|
-
|
120
16
|
function expand() {
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
}
|
125
|
-
element.removeClass('collapse').addClass('collapsing');
|
126
|
-
doTransition({ height: element[0].scrollHeight + 'px' }).then(expandDone);
|
127
|
-
}
|
17
|
+
element.removeClass('collapse').addClass('collapsing');
|
18
|
+
$animate.addClass(element, 'in', {
|
19
|
+
to: { height: element[0].scrollHeight + 'px' }
|
20
|
+
}).then(expandDone);
|
128
21
|
}
|
129
22
|
|
130
23
|
function expandDone() {
|
131
24
|
element.removeClass('collapsing');
|
132
|
-
element.addClass('collapse in');
|
133
25
|
element.css({height: 'auto'});
|
134
26
|
}
|
135
27
|
|
136
28
|
function collapse() {
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
//
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
}
|
29
|
+
element
|
30
|
+
// IMPORTANT: The height must be set before adding "collapsing" class.
|
31
|
+
// Otherwise, the browser attempts to animate from height 0 (in
|
32
|
+
// collapsing class) to the given height here.
|
33
|
+
.css({height: element[0].scrollHeight + 'px'})
|
34
|
+
// initially all panel collapse have the collapse class, this removal
|
35
|
+
// prevents the animation from jumping to collapsed state
|
36
|
+
.removeClass('collapse')
|
37
|
+
.addClass('collapsing');
|
38
|
+
|
39
|
+
$animate.removeClass(element, 'in', {
|
40
|
+
to: {height: '0'}
|
41
|
+
}).then(collapseDone);
|
151
42
|
}
|
152
43
|
|
153
44
|
function collapseDone() {
|
45
|
+
element.css({height: '0'}); // Required so that collapse works when animation is disabled
|
154
46
|
element.removeClass('collapsing');
|
155
47
|
element.addClass('collapse');
|
156
48
|
}
|
@@ -272,7 +164,7 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
|
|
272
164
|
// Pass the heading to the accordion-group controller
|
273
165
|
// so that it can be transcluded into the right place in the template
|
274
166
|
// [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
|
275
|
-
accordionGroupCtrl.setHeading(transclude(scope,
|
167
|
+
accordionGroupCtrl.setHeading(transclude(scope, angular.noop));
|
276
168
|
}
|
277
169
|
};
|
278
170
|
})
|
@@ -295,12 +187,15 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
|
|
295
187
|
});
|
296
188
|
}
|
297
189
|
};
|
298
|
-
})
|
190
|
+
})
|
191
|
+
|
192
|
+
;
|
299
193
|
|
300
194
|
angular.module('ui.bootstrap.alert', [])
|
301
195
|
|
302
196
|
.controller('AlertController', ['$scope', '$attrs', function ($scope, $attrs) {
|
303
197
|
$scope.closeable = 'close' in $attrs;
|
198
|
+
this.close = $scope.close;
|
304
199
|
}])
|
305
200
|
|
306
201
|
.directive('alert', function () {
|
@@ -315,7 +210,18 @@ angular.module('ui.bootstrap.alert', [])
|
|
315
210
|
close: '&'
|
316
211
|
}
|
317
212
|
};
|
318
|
-
})
|
213
|
+
})
|
214
|
+
|
215
|
+
.directive('dismissOnTimeout', ['$timeout', function($timeout) {
|
216
|
+
return {
|
217
|
+
require: 'alert',
|
218
|
+
link: function(scope, element, attrs, alertCtrl) {
|
219
|
+
$timeout(function(){
|
220
|
+
alertCtrl.close();
|
221
|
+
}, parseInt(attrs.dismissOnTimeout, 10));
|
222
|
+
}
|
223
|
+
};
|
224
|
+
}]);
|
319
225
|
|
320
226
|
angular.module('ui.bootstrap.bindHtml', [])
|
321
227
|
|
@@ -410,93 +316,87 @@ angular.module('ui.bootstrap.buttons', [])
|
|
410
316
|
* AngularJS version of an image carousel.
|
411
317
|
*
|
412
318
|
*/
|
413
|
-
angular.module('ui.bootstrap.carousel', [
|
414
|
-
.controller('CarouselController', ['$scope', '$
|
319
|
+
angular.module('ui.bootstrap.carousel', [])
|
320
|
+
.controller('CarouselController', ['$scope', '$interval', '$animate', function ($scope, $interval, $animate) {
|
415
321
|
var self = this,
|
416
322
|
slides = self.slides = $scope.slides = [],
|
417
323
|
currentIndex = -1,
|
418
|
-
|
324
|
+
currentInterval, isPlaying;
|
419
325
|
self.currentSlide = null;
|
420
326
|
|
421
327
|
var destroyed = false;
|
422
328
|
/* direction: "prev" or "next" */
|
423
329
|
self.select = $scope.select = function(nextSlide, direction) {
|
424
|
-
var nextIndex =
|
330
|
+
var nextIndex = self.indexOfSlide(nextSlide);
|
425
331
|
//Decide direction if it's not given
|
426
332
|
if (direction === undefined) {
|
427
|
-
direction = nextIndex >
|
333
|
+
direction = nextIndex > self.getCurrentIndex() ? 'next' : 'prev';
|
428
334
|
}
|
429
335
|
if (nextSlide && nextSlide !== self.currentSlide) {
|
430
|
-
|
431
|
-
$scope.$currentTransition.cancel();
|
432
|
-
//Timeout so ng-class in template has time to fix classes for finished slide
|
433
|
-
$timeout(goNext);
|
434
|
-
} else {
|
435
|
-
goNext();
|
436
|
-
}
|
336
|
+
goNext();
|
437
337
|
}
|
438
338
|
function goNext() {
|
439
339
|
// Scope has been destroyed, stop here.
|
440
340
|
if (destroyed) { return; }
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
angular.forEach(slides, function(slide) {
|
449
|
-
angular.extend(slide, {direction: '', entering: false, leaving: false, active: false});
|
341
|
+
|
342
|
+
angular.extend(nextSlide, {direction: direction, active: true});
|
343
|
+
angular.extend(self.currentSlide || {}, {direction: direction, active: false});
|
344
|
+
if ($animate.enabled() && !$scope.noTransition && nextSlide.$element) {
|
345
|
+
$scope.$currentTransition = true;
|
346
|
+
nextSlide.$element.one('$animate:close', function closeFn() {
|
347
|
+
$scope.$currentTransition = null;
|
450
348
|
});
|
451
|
-
angular.extend(nextSlide, {direction: direction, active: true, entering: true});
|
452
|
-
angular.extend(self.currentSlide||{}, {direction: direction, leaving: true});
|
453
|
-
|
454
|
-
$scope.$currentTransition = $transition(nextSlide.$element, {});
|
455
|
-
//We have to create new pointers inside a closure since next & current will change
|
456
|
-
(function(next,current) {
|
457
|
-
$scope.$currentTransition.then(
|
458
|
-
function(){ transitionDone(next, current); },
|
459
|
-
function(){ transitionDone(next, current); }
|
460
|
-
);
|
461
|
-
}(nextSlide, self.currentSlide));
|
462
|
-
} else {
|
463
|
-
transitionDone(nextSlide, self.currentSlide);
|
464
349
|
}
|
350
|
+
|
465
351
|
self.currentSlide = nextSlide;
|
466
352
|
currentIndex = nextIndex;
|
467
353
|
//every time you change slides, reset the timer
|
468
354
|
restartTimer();
|
469
355
|
}
|
470
|
-
function transitionDone(next, current) {
|
471
|
-
angular.extend(next, {direction: '', active: true, leaving: false, entering: false});
|
472
|
-
angular.extend(current||{}, {direction: '', active: false, leaving: false, entering: false});
|
473
|
-
$scope.$currentTransition = null;
|
474
|
-
}
|
475
356
|
};
|
476
357
|
$scope.$on('$destroy', function () {
|
477
358
|
destroyed = true;
|
478
359
|
});
|
479
360
|
|
361
|
+
function getSlideByIndex(index) {
|
362
|
+
if (angular.isUndefined(slides[index].index)) {
|
363
|
+
return slides[index];
|
364
|
+
}
|
365
|
+
var i, len = slides.length;
|
366
|
+
for (i = 0; i < slides.length; ++i) {
|
367
|
+
if (slides[i].index == index) {
|
368
|
+
return slides[i];
|
369
|
+
}
|
370
|
+
}
|
371
|
+
}
|
372
|
+
|
373
|
+
self.getCurrentIndex = function() {
|
374
|
+
if (self.currentSlide && angular.isDefined(self.currentSlide.index)) {
|
375
|
+
return +self.currentSlide.index;
|
376
|
+
}
|
377
|
+
return currentIndex;
|
378
|
+
};
|
379
|
+
|
480
380
|
/* Allow outside people to call indexOf on slides array */
|
481
381
|
self.indexOfSlide = function(slide) {
|
482
|
-
return slides.indexOf(slide);
|
382
|
+
return angular.isDefined(slide.index) ? +slide.index : slides.indexOf(slide);
|
483
383
|
};
|
484
384
|
|
485
385
|
$scope.next = function() {
|
486
|
-
var newIndex = (
|
386
|
+
var newIndex = (self.getCurrentIndex() + 1) % slides.length;
|
487
387
|
|
488
388
|
//Prevent this user-triggered transition from occurring if there is already one in progress
|
489
389
|
if (!$scope.$currentTransition) {
|
490
|
-
return self.select(
|
390
|
+
return self.select(getSlideByIndex(newIndex), 'next');
|
491
391
|
}
|
492
392
|
};
|
493
393
|
|
494
394
|
$scope.prev = function() {
|
495
|
-
var newIndex =
|
395
|
+
var newIndex = self.getCurrentIndex() - 1 < 0 ? slides.length - 1 : self.getCurrentIndex() - 1;
|
496
396
|
|
497
397
|
//Prevent this user-triggered transition from occurring if there is already one in progress
|
498
398
|
if (!$scope.$currentTransition) {
|
499
|
-
return self.select(
|
399
|
+
return self.select(getSlideByIndex(newIndex), 'prev');
|
500
400
|
}
|
501
401
|
};
|
502
402
|
|
@@ -510,22 +410,22 @@ angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition'])
|
|
510
410
|
function restartTimer() {
|
511
411
|
resetTimer();
|
512
412
|
var interval = +$scope.interval;
|
513
|
-
if (!isNaN(interval) && interval
|
514
|
-
|
413
|
+
if (!isNaN(interval) && interval > 0) {
|
414
|
+
currentInterval = $interval(timerFn, interval);
|
515
415
|
}
|
516
416
|
}
|
517
417
|
|
518
418
|
function resetTimer() {
|
519
|
-
if (
|
520
|
-
$
|
521
|
-
|
419
|
+
if (currentInterval) {
|
420
|
+
$interval.cancel(currentInterval);
|
421
|
+
currentInterval = null;
|
522
422
|
}
|
523
423
|
}
|
524
424
|
|
525
425
|
function timerFn() {
|
526
|
-
|
426
|
+
var interval = +$scope.interval;
|
427
|
+
if (isPlaying && !isNaN(interval) && interval > 0) {
|
527
428
|
$scope.next();
|
528
|
-
restartTimer();
|
529
429
|
} else {
|
530
430
|
$scope.pause();
|
531
431
|
}
|
@@ -559,6 +459,11 @@ angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition'])
|
|
559
459
|
};
|
560
460
|
|
561
461
|
self.removeSlide = function(slide) {
|
462
|
+
if (angular.isDefined(slide.index)) {
|
463
|
+
slides.sort(function(a, b) {
|
464
|
+
return +a.index > +b.index;
|
465
|
+
});
|
466
|
+
}
|
562
467
|
//get the index of the slide inside the carousel
|
563
468
|
var index = slides.indexOf(slide);
|
564
469
|
slides.splice(index, 1);
|
@@ -638,13 +543,14 @@ angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition'])
|
|
638
543
|
* Creates a slide inside a {@link ui.bootstrap.carousel.directive:carousel carousel}. Must be placed as a child of a carousel element.
|
639
544
|
*
|
640
545
|
* @param {boolean=} active Model binding, whether or not this slide is currently active.
|
546
|
+
* @param {number=} index The index of the slide. The slides will be sorted by this parameter.
|
641
547
|
*
|
642
548
|
* @example
|
643
549
|
<example module="ui.bootstrap">
|
644
550
|
<file name="index.html">
|
645
551
|
<div ng-controller="CarouselDemoCtrl">
|
646
552
|
<carousel>
|
647
|
-
<slide ng-repeat="slide in slides" active="slide.active">
|
553
|
+
<slide ng-repeat="slide in slides" active="slide.active" index="$index">
|
648
554
|
<img ng-src="{{slide.image}}" style="margin:auto;">
|
649
555
|
<div class="carousel-caption">
|
650
556
|
<h4>Slide {{$index}}</h4>
|
@@ -678,7 +584,8 @@ function CarouselDemoCtrl($scope) {
|
|
678
584
|
replace: true,
|
679
585
|
templateUrl: 'template/carousel/slide.html',
|
680
586
|
scope: {
|
681
|
-
active: '=?'
|
587
|
+
active: '=?',
|
588
|
+
index: '=?'
|
682
589
|
},
|
683
590
|
link: function (scope, element, attrs, carouselCtrl) {
|
684
591
|
carouselCtrl.addSlide(scope, element);
|
@@ -694,11 +601,64 @@ function CarouselDemoCtrl($scope) {
|
|
694
601
|
});
|
695
602
|
}
|
696
603
|
};
|
697
|
-
})
|
604
|
+
})
|
605
|
+
|
606
|
+
.animation('.item', [
|
607
|
+
'$animate',
|
608
|
+
function ($animate) {
|
609
|
+
return {
|
610
|
+
beforeAddClass: function (element, className, done) {
|
611
|
+
// Due to transclusion, noTransition property is on parent's scope
|
612
|
+
if (className == 'active' && element.parent() &&
|
613
|
+
!element.parent().scope().noTransition) {
|
614
|
+
var stopped = false;
|
615
|
+
var direction = element.isolateScope().direction;
|
616
|
+
var directionClass = direction == 'next' ? 'left' : 'right';
|
617
|
+
element.addClass(direction);
|
618
|
+
$animate.addClass(element, directionClass).then(function () {
|
619
|
+
if (!stopped) {
|
620
|
+
element.removeClass(directionClass + ' ' + direction);
|
621
|
+
}
|
622
|
+
done();
|
623
|
+
});
|
624
|
+
|
625
|
+
return function () {
|
626
|
+
stopped = true;
|
627
|
+
};
|
628
|
+
}
|
629
|
+
done();
|
630
|
+
},
|
631
|
+
beforeRemoveClass: function (element, className, done) {
|
632
|
+
// Due to transclusion, noTransition property is on parent's scope
|
633
|
+
if (className == 'active' && element.parent() &&
|
634
|
+
!element.parent().scope().noTransition) {
|
635
|
+
var stopped = false;
|
636
|
+
var direction = element.isolateScope().direction;
|
637
|
+
var directionClass = direction == 'next' ? 'left' : 'right';
|
638
|
+
$animate.addClass(element, directionClass).then(function () {
|
639
|
+
if (!stopped) {
|
640
|
+
element.removeClass(directionClass);
|
641
|
+
}
|
642
|
+
done();
|
643
|
+
});
|
644
|
+
return function () {
|
645
|
+
stopped = true;
|
646
|
+
};
|
647
|
+
}
|
648
|
+
done();
|
649
|
+
}
|
650
|
+
};
|
651
|
+
|
652
|
+
}])
|
653
|
+
|
654
|
+
|
655
|
+
;
|
698
656
|
|
699
657
|
angular.module('ui.bootstrap.dateparser', [])
|
700
658
|
|
701
659
|
.service('dateParser', ['$locale', 'orderByFilter', function($locale, orderByFilter) {
|
660
|
+
// Pulled from https://github.com/mbostock/d3/blob/master/src/format/requote.js
|
661
|
+
var SPECIAL_CHARACTERS_REGEXP = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
|
702
662
|
|
703
663
|
this.parsers = {};
|
704
664
|
|
@@ -744,10 +704,38 @@ angular.module('ui.bootstrap.dateparser', [])
|
|
744
704
|
},
|
745
705
|
'EEE': {
|
746
706
|
regex: $locale.DATETIME_FORMATS.SHORTDAY.join('|')
|
707
|
+
},
|
708
|
+
'HH': {
|
709
|
+
regex: '(?:0|1)[0-9]|2[0-3]',
|
710
|
+
apply: function(value) { this.hours = +value; }
|
711
|
+
},
|
712
|
+
'H': {
|
713
|
+
regex: '1?[0-9]|2[0-3]',
|
714
|
+
apply: function(value) { this.hours = +value; }
|
715
|
+
},
|
716
|
+
'mm': {
|
717
|
+
regex: '[0-5][0-9]',
|
718
|
+
apply: function(value) { this.minutes = +value; }
|
719
|
+
},
|
720
|
+
'm': {
|
721
|
+
regex: '[0-9]|[1-5][0-9]',
|
722
|
+
apply: function(value) { this.minutes = +value; }
|
723
|
+
},
|
724
|
+
'sss': {
|
725
|
+
regex: '[0-9][0-9][0-9]',
|
726
|
+
apply: function(value) { this.milliseconds = +value; }
|
727
|
+
},
|
728
|
+
'ss': {
|
729
|
+
regex: '[0-5][0-9]',
|
730
|
+
apply: function(value) { this.seconds = +value; }
|
731
|
+
},
|
732
|
+
's': {
|
733
|
+
regex: '[0-9]|[1-5][0-9]',
|
734
|
+
apply: function(value) { this.seconds = +value; }
|
747
735
|
}
|
748
736
|
};
|
749
737
|
|
750
|
-
|
738
|
+
function createParser(format) {
|
751
739
|
var map = [], regex = format.split('');
|
752
740
|
|
753
741
|
angular.forEach(formatCodeToRegex, function(data, code) {
|
@@ -772,17 +760,18 @@ angular.module('ui.bootstrap.dateparser', [])
|
|
772
760
|
regex: new RegExp('^' + regex.join('') + '$'),
|
773
761
|
map: orderByFilter(map, 'index')
|
774
762
|
};
|
775
|
-
}
|
763
|
+
}
|
776
764
|
|
777
|
-
this.parse = function(input, format) {
|
778
|
-
if ( !angular.isString(input) ) {
|
765
|
+
this.parse = function(input, format, baseDate) {
|
766
|
+
if ( !angular.isString(input) || !format ) {
|
779
767
|
return input;
|
780
768
|
}
|
781
769
|
|
782
770
|
format = $locale.DATETIME_FORMATS[format] || format;
|
771
|
+
format = format.replace(SPECIAL_CHARACTERS_REGEXP, '\\$&');
|
783
772
|
|
784
773
|
if ( !this.parsers[format] ) {
|
785
|
-
this.parsers[format] =
|
774
|
+
this.parsers[format] = createParser(format);
|
786
775
|
}
|
787
776
|
|
788
777
|
var parser = this.parsers[format],
|
@@ -791,7 +780,20 @@ angular.module('ui.bootstrap.dateparser', [])
|
|
791
780
|
results = input.match(regex);
|
792
781
|
|
793
782
|
if ( results && results.length ) {
|
794
|
-
var fields
|
783
|
+
var fields, dt;
|
784
|
+
if (baseDate) {
|
785
|
+
fields = {
|
786
|
+
year: baseDate.getFullYear(),
|
787
|
+
month: baseDate.getMonth(),
|
788
|
+
date: baseDate.getDate(),
|
789
|
+
hours: baseDate.getHours(),
|
790
|
+
minutes: baseDate.getMinutes(),
|
791
|
+
seconds: baseDate.getSeconds(),
|
792
|
+
milliseconds: baseDate.getMilliseconds()
|
793
|
+
};
|
794
|
+
} else {
|
795
|
+
fields = { year: 1900, month: 0, date: 1, hours: 0, minutes: 0, seconds: 0, milliseconds: 0 };
|
796
|
+
}
|
795
797
|
|
796
798
|
for( var i = 1, n = results.length; i < n; i++ ) {
|
797
799
|
var mapper = map[i-1];
|
@@ -801,7 +803,8 @@ angular.module('ui.bootstrap.dateparser', [])
|
|
801
803
|
}
|
802
804
|
|
803
805
|
if ( isValid(fields.year, fields.month, fields.date) ) {
|
804
|
-
dt = new Date(
|
806
|
+
dt = new Date(fields.year, fields.month, fields.date, fields.hours, fields.minutes, fields.seconds,
|
807
|
+
fields.milliseconds || 0);
|
805
808
|
}
|
806
809
|
|
807
810
|
return dt;
|
@@ -811,6 +814,10 @@ angular.module('ui.bootstrap.dateparser', [])
|
|
811
814
|
// Check if date is valid for specific month (and year for February).
|
812
815
|
// Month: 0 = Jan, 1 = Feb, etc
|
813
816
|
function isValid(year, month, date) {
|
817
|
+
if (date < 1) {
|
818
|
+
return false;
|
819
|
+
}
|
820
|
+
|
814
821
|
if ( month === 1 && date > 28) {
|
815
822
|
return date === 29 && ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0);
|
816
823
|
}
|
@@ -992,7 +999,8 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
992
999
|
startingDay: 0,
|
993
1000
|
yearRange: 20,
|
994
1001
|
minDate: null,
|
995
|
-
maxDate: null
|
1002
|
+
maxDate: null,
|
1003
|
+
shortcutPropagation: false
|
996
1004
|
})
|
997
1005
|
|
998
1006
|
.controller('DatepickerController', ['$scope', '$attrs', '$parse', '$interpolate', '$timeout', '$log', 'dateFilter', 'datepickerConfig', function($scope, $attrs, $parse, $interpolate, $timeout, $log, dateFilter, datepickerConfig) {
|
@@ -1004,11 +1012,11 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
1004
1012
|
|
1005
1013
|
// Configuration attributes
|
1006
1014
|
angular.forEach(['formatDay', 'formatMonth', 'formatYear', 'formatDayHeader', 'formatDayTitle', 'formatMonthTitle',
|
1007
|
-
'minMode', 'maxMode', 'showWeeks', 'startingDay', 'yearRange'], function( key, index ) {
|
1015
|
+
'minMode', 'maxMode', 'showWeeks', 'startingDay', 'yearRange', 'shortcutPropagation'], function( key, index ) {
|
1008
1016
|
self[key] = angular.isDefined($attrs[key]) ? (index < 8 ? $interpolate($attrs[key])($scope.$parent) : $scope.$parent.$eval($attrs[key])) : datepickerConfig[key];
|
1009
1017
|
});
|
1010
1018
|
|
1011
|
-
// Watchable attributes
|
1019
|
+
// Watchable date attributes
|
1012
1020
|
angular.forEach(['minDate', 'maxDate'], function( key ) {
|
1013
1021
|
if ( $attrs[key] ) {
|
1014
1022
|
$scope.$parent.$watch($parse($attrs[key]), function(value) {
|
@@ -1021,8 +1029,20 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
1021
1029
|
});
|
1022
1030
|
|
1023
1031
|
$scope.datepickerMode = $scope.datepickerMode || datepickerConfig.datepickerMode;
|
1032
|
+
$scope.maxMode = self.maxMode;
|
1024
1033
|
$scope.uniqueId = 'datepicker-' + $scope.$id + '-' + Math.floor(Math.random() * 10000);
|
1025
|
-
|
1034
|
+
|
1035
|
+
if(angular.isDefined($attrs.initDate)) {
|
1036
|
+
this.activeDate = $scope.$parent.$eval($attrs.initDate) || new Date();
|
1037
|
+
$scope.$parent.$watch($attrs.initDate, function(initDate){
|
1038
|
+
if(initDate && (ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue) || ngModelCtrl.$invalid)){
|
1039
|
+
self.activeDate = initDate;
|
1040
|
+
self.refreshView();
|
1041
|
+
}
|
1042
|
+
});
|
1043
|
+
} else {
|
1044
|
+
this.activeDate = new Date();
|
1045
|
+
}
|
1026
1046
|
|
1027
1047
|
$scope.isActive = function(dateObject) {
|
1028
1048
|
if (self.compare(dateObject.date, self.activeDate) === 0) {
|
@@ -1041,8 +1061,8 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
1041
1061
|
};
|
1042
1062
|
|
1043
1063
|
this.render = function() {
|
1044
|
-
if ( ngModelCtrl.$
|
1045
|
-
var date = new Date( ngModelCtrl.$
|
1064
|
+
if ( ngModelCtrl.$viewValue ) {
|
1065
|
+
var date = new Date( ngModelCtrl.$viewValue ),
|
1046
1066
|
isValid = !isNaN(date);
|
1047
1067
|
|
1048
1068
|
if ( isValid ) {
|
@@ -1059,19 +1079,20 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
1059
1079
|
if ( this.element ) {
|
1060
1080
|
this._refreshView();
|
1061
1081
|
|
1062
|
-
var date = ngModelCtrl.$
|
1082
|
+
var date = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
|
1063
1083
|
ngModelCtrl.$setValidity('date-disabled', !date || (this.element && !this.isDisabled(date)));
|
1064
1084
|
}
|
1065
1085
|
};
|
1066
1086
|
|
1067
1087
|
this.createDateObject = function(date, format) {
|
1068
|
-
var model = ngModelCtrl.$
|
1088
|
+
var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
|
1069
1089
|
return {
|
1070
1090
|
date: date,
|
1071
1091
|
label: dateFilter(date, format),
|
1072
1092
|
selected: model && this.compare(date, model) === 0,
|
1073
1093
|
disabled: this.isDisabled(date),
|
1074
|
-
current: this.compare(date, new Date()) === 0
|
1094
|
+
current: this.compare(date, new Date()) === 0,
|
1095
|
+
customClass: this.customClass(date)
|
1075
1096
|
};
|
1076
1097
|
};
|
1077
1098
|
|
@@ -1079,6 +1100,10 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
1079
1100
|
return ((this.minDate && this.compare(date, this.minDate) < 0) || (this.maxDate && this.compare(date, this.maxDate) > 0) || ($attrs.dateDisabled && $scope.dateDisabled({date: date, mode: $scope.datepickerMode})));
|
1080
1101
|
};
|
1081
1102
|
|
1103
|
+
this.customClass = function( date ) {
|
1104
|
+
return $scope.customClass({date: date, mode: $scope.datepickerMode});
|
1105
|
+
};
|
1106
|
+
|
1082
1107
|
// Split array into smaller arrays
|
1083
1108
|
this.split = function(arr, size) {
|
1084
1109
|
var arrays = [];
|
@@ -1090,7 +1115,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
1090
1115
|
|
1091
1116
|
$scope.select = function( date ) {
|
1092
1117
|
if ( $scope.datepickerMode === self.minMode ) {
|
1093
|
-
var dt = ngModelCtrl.$
|
1118
|
+
var dt = ngModelCtrl.$viewValue ? new Date( ngModelCtrl.$viewValue ) : new Date(0, 0, 0, 0, 0, 0, 0);
|
1094
1119
|
dt.setFullYear( date.getFullYear(), date.getMonth(), date.getDate() );
|
1095
1120
|
ngModelCtrl.$setViewValue( dt );
|
1096
1121
|
ngModelCtrl.$render();
|
@@ -1137,7 +1162,9 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
1137
1162
|
}
|
1138
1163
|
|
1139
1164
|
evt.preventDefault();
|
1140
|
-
|
1165
|
+
if(!self.shortcutPropagation){
|
1166
|
+
evt.stopPropagation();
|
1167
|
+
}
|
1141
1168
|
|
1142
1169
|
if (key === 'enter' || key === 'space') {
|
1143
1170
|
if ( self.isDisabled(self.activeDate)) {
|
@@ -1162,7 +1189,9 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
1162
1189
|
templateUrl: 'template/datepicker/datepicker.html',
|
1163
1190
|
scope: {
|
1164
1191
|
datepickerMode: '=?',
|
1165
|
-
dateDisabled: '&'
|
1192
|
+
dateDisabled: '&',
|
1193
|
+
customClass: '&',
|
1194
|
+
shortcutPropagation: '&?'
|
1166
1195
|
},
|
1167
1196
|
require: ['datepicker', '?^ngModel'],
|
1168
1197
|
controller: 'DatepickerController',
|
@@ -1237,9 +1266,12 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
1237
1266
|
|
1238
1267
|
if ( scope.showWeeks ) {
|
1239
1268
|
scope.weekNumbers = [];
|
1240
|
-
var
|
1269
|
+
var thursdayIndex = (4 + 7 - ctrl.startingDay) % 7,
|
1241
1270
|
numWeeks = scope.rows.length;
|
1242
|
-
|
1271
|
+
for (var curWeek = 0; curWeek < numWeeks; curWeek++) {
|
1272
|
+
scope.weekNumbers.push(
|
1273
|
+
getISO8601WeekNumber( scope.rows[curWeek][thursdayIndex].date ));
|
1274
|
+
}
|
1243
1275
|
}
|
1244
1276
|
};
|
1245
1277
|
|
@@ -1400,6 +1432,11 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|
1400
1432
|
|
1401
1433
|
.constant('datepickerPopupConfig', {
|
1402
1434
|
datepickerPopup: 'yyyy-MM-dd',
|
1435
|
+
html5Types: {
|
1436
|
+
date: 'yyyy-MM-dd',
|
1437
|
+
'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss',
|
1438
|
+
'month': 'yyyy-MM'
|
1439
|
+
},
|
1403
1440
|
currentText: 'Today',
|
1404
1441
|
clearText: 'Clear',
|
1405
1442
|
closeText: 'Done',
|
@@ -1418,7 +1455,8 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
|
|
1418
1455
|
currentText: '@',
|
1419
1456
|
clearText: '@',
|
1420
1457
|
closeText: '@',
|
1421
|
-
dateDisabled: '&'
|
1458
|
+
dateDisabled: '&',
|
1459
|
+
customClass: '&'
|
1422
1460
|
},
|
1423
1461
|
link: function(scope, element, attrs, ngModel) {
|
1424
1462
|
var dateFormat,
|
@@ -1431,10 +1469,34 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
|
|
1431
1469
|
return scope[key + 'Text'] || datepickerPopupConfig[key + 'Text'];
|
1432
1470
|
};
|
1433
1471
|
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1472
|
+
var isHtml5DateInput = false;
|
1473
|
+
if (datepickerPopupConfig.html5Types[attrs.type]) {
|
1474
|
+
dateFormat = datepickerPopupConfig.html5Types[attrs.type];
|
1475
|
+
isHtml5DateInput = true;
|
1476
|
+
} else {
|
1477
|
+
dateFormat = attrs.datepickerPopup || datepickerPopupConfig.datepickerPopup;
|
1478
|
+
attrs.$observe('datepickerPopup', function(value, oldValue) {
|
1479
|
+
var newDateFormat = value || datepickerPopupConfig.datepickerPopup;
|
1480
|
+
// Invalidate the $modelValue to ensure that formatters re-run
|
1481
|
+
// FIXME: Refactor when PR is merged: https://github.com/angular/angular.js/pull/10764
|
1482
|
+
if (newDateFormat !== dateFormat) {
|
1483
|
+
dateFormat = newDateFormat;
|
1484
|
+
ngModel.$modelValue = null;
|
1485
|
+
|
1486
|
+
if (!dateFormat) {
|
1487
|
+
throw new Error('datepickerPopup must have a date format specified.');
|
1488
|
+
}
|
1489
|
+
}
|
1490
|
+
});
|
1491
|
+
}
|
1492
|
+
|
1493
|
+
if (!dateFormat) {
|
1494
|
+
throw new Error('datepickerPopup must have a date format specified.');
|
1495
|
+
}
|
1496
|
+
|
1497
|
+
if (isHtml5DateInput && attrs.datepickerPopup) {
|
1498
|
+
throw new Error('HTML5 date input types do not support custom formats.');
|
1499
|
+
}
|
1438
1500
|
|
1439
1501
|
// popup element used to display calendar
|
1440
1502
|
var popupEl = angular.element('<div datepicker-popup-wrap><div datepicker></div></div>');
|
@@ -1449,54 +1511,121 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
|
|
1449
1511
|
|
1450
1512
|
// datepicker element
|
1451
1513
|
var datepickerEl = angular.element(popupEl.children()[0]);
|
1514
|
+
if (isHtml5DateInput) {
|
1515
|
+
if (attrs.type == 'month') {
|
1516
|
+
datepickerEl.attr('datepicker-mode', '"month"');
|
1517
|
+
datepickerEl.attr('min-mode', 'month');
|
1518
|
+
}
|
1519
|
+
}
|
1520
|
+
|
1452
1521
|
if ( attrs.datepickerOptions ) {
|
1453
|
-
|
1522
|
+
var options = scope.$parent.$eval(attrs.datepickerOptions);
|
1523
|
+
if(options.initDate) {
|
1524
|
+
scope.initDate = options.initDate;
|
1525
|
+
datepickerEl.attr( 'init-date', 'initDate' );
|
1526
|
+
delete options.initDate;
|
1527
|
+
}
|
1528
|
+
angular.forEach(options, function( value, option ) {
|
1454
1529
|
datepickerEl.attr( cameltoDash(option), value );
|
1455
1530
|
});
|
1456
1531
|
}
|
1457
1532
|
|
1458
|
-
|
1533
|
+
scope.watchData = {};
|
1534
|
+
angular.forEach(['minDate', 'maxDate', 'datepickerMode', 'initDate', 'shortcutPropagation'], function( key ) {
|
1459
1535
|
if ( attrs[key] ) {
|
1460
|
-
|
1461
|
-
|
1536
|
+
var getAttribute = $parse(attrs[key]);
|
1537
|
+
scope.$parent.$watch(getAttribute, function(value){
|
1538
|
+
scope.watchData[key] = value;
|
1462
1539
|
});
|
1463
|
-
datepickerEl.attr(cameltoDash(key), key);
|
1540
|
+
datepickerEl.attr(cameltoDash(key), 'watchData.' + key);
|
1541
|
+
|
1542
|
+
// Propagate changes from datepicker to outside
|
1543
|
+
if ( key === 'datepickerMode' ) {
|
1544
|
+
var setAttribute = getAttribute.assign;
|
1545
|
+
scope.$watch('watchData.' + key, function(value, oldvalue) {
|
1546
|
+
if ( value !== oldvalue ) {
|
1547
|
+
setAttribute(scope.$parent, value);
|
1548
|
+
}
|
1549
|
+
});
|
1550
|
+
}
|
1464
1551
|
}
|
1465
1552
|
});
|
1466
1553
|
if (attrs.dateDisabled) {
|
1467
1554
|
datepickerEl.attr('date-disabled', 'dateDisabled({ date: date, mode: mode })');
|
1468
1555
|
}
|
1469
1556
|
|
1557
|
+
if (attrs.showWeeks) {
|
1558
|
+
datepickerEl.attr('show-weeks', attrs.showWeeks);
|
1559
|
+
}
|
1560
|
+
|
1561
|
+
if (attrs.customClass){
|
1562
|
+
datepickerEl.attr('custom-class', 'customClass({ date: date, mode: mode })');
|
1563
|
+
}
|
1564
|
+
|
1470
1565
|
function parseDate(viewValue) {
|
1566
|
+
if (angular.isNumber(viewValue)) {
|
1567
|
+
// presumably timestamp to date object
|
1568
|
+
viewValue = new Date(viewValue);
|
1569
|
+
}
|
1570
|
+
|
1471
1571
|
if (!viewValue) {
|
1472
|
-
ngModel.$setValidity('date', true);
|
1473
1572
|
return null;
|
1474
1573
|
} else if (angular.isDate(viewValue) && !isNaN(viewValue)) {
|
1475
|
-
ngModel.$setValidity('date', true);
|
1476
1574
|
return viewValue;
|
1477
1575
|
} else if (angular.isString(viewValue)) {
|
1478
|
-
var date = dateParser.parse(viewValue, dateFormat) || new Date(viewValue);
|
1576
|
+
var date = dateParser.parse(viewValue, dateFormat, scope.date) || new Date(viewValue);
|
1479
1577
|
if (isNaN(date)) {
|
1480
|
-
ngModel.$setValidity('date', false);
|
1481
1578
|
return undefined;
|
1482
1579
|
} else {
|
1483
|
-
ngModel.$setValidity('date', true);
|
1484
1580
|
return date;
|
1485
1581
|
}
|
1486
1582
|
} else {
|
1487
|
-
ngModel.$setValidity('date', false);
|
1488
1583
|
return undefined;
|
1489
1584
|
}
|
1490
1585
|
}
|
1491
|
-
|
1586
|
+
|
1587
|
+
function validator(modelValue, viewValue) {
|
1588
|
+
var value = modelValue || viewValue;
|
1589
|
+
if (angular.isNumber(value)) {
|
1590
|
+
value = new Date(value);
|
1591
|
+
}
|
1592
|
+
if (!value) {
|
1593
|
+
return true;
|
1594
|
+
} else if (angular.isDate(value) && !isNaN(value)) {
|
1595
|
+
return true;
|
1596
|
+
} else if (angular.isString(value)) {
|
1597
|
+
var date = dateParser.parse(value, dateFormat) || new Date(value);
|
1598
|
+
return !isNaN(date);
|
1599
|
+
} else {
|
1600
|
+
return false;
|
1601
|
+
}
|
1602
|
+
}
|
1603
|
+
|
1604
|
+
if (!isHtml5DateInput) {
|
1605
|
+
// Internal API to maintain the correct ng-invalid-[key] class
|
1606
|
+
ngModel.$$parserName = 'date';
|
1607
|
+
ngModel.$validators.date = validator;
|
1608
|
+
ngModel.$parsers.unshift(parseDate);
|
1609
|
+
ngModel.$formatters.push(function (value) {
|
1610
|
+
scope.date = value;
|
1611
|
+
return ngModel.$isEmpty(value) ? value : dateFilter(value, dateFormat);
|
1612
|
+
});
|
1613
|
+
}
|
1614
|
+
else {
|
1615
|
+
ngModel.$formatters.push(function (value) {
|
1616
|
+
scope.date = value;
|
1617
|
+
return value;
|
1618
|
+
});
|
1619
|
+
}
|
1492
1620
|
|
1493
1621
|
// Inner change
|
1494
1622
|
scope.dateSelection = function(dt) {
|
1495
1623
|
if (angular.isDefined(dt)) {
|
1496
1624
|
scope.date = dt;
|
1497
1625
|
}
|
1498
|
-
|
1499
|
-
|
1626
|
+
var date = scope.date ? dateFilter(scope.date, dateFormat) : '';
|
1627
|
+
element.val(date);
|
1628
|
+
ngModel.$setViewValue(date);
|
1500
1629
|
|
1501
1630
|
if ( closeOnDateSelection ) {
|
1502
1631
|
scope.isOpen = false;
|
@@ -1504,19 +1633,11 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
|
|
1504
1633
|
}
|
1505
1634
|
};
|
1506
1635
|
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
});
|
1636
|
+
// Detect changes in the view from the text box
|
1637
|
+
ngModel.$viewChangeListeners.push(function () {
|
1638
|
+
scope.date = dateParser.parse(ngModel.$viewValue, dateFormat, scope.date) || new Date(ngModel.$viewValue);
|
1511
1639
|
});
|
1512
1640
|
|
1513
|
-
// Outter change
|
1514
|
-
ngModel.$render = function() {
|
1515
|
-
var date = ngModel.$viewValue ? dateFilter(ngModel.$viewValue, dateFormat) : '';
|
1516
|
-
element.val(date);
|
1517
|
-
scope.date = parseDate( ngModel.$modelValue );
|
1518
|
-
};
|
1519
|
-
|
1520
1641
|
var documentClickBind = function(event) {
|
1521
1642
|
if (scope.isOpen && event.target !== element[0]) {
|
1522
1643
|
scope.$apply(function() {
|
@@ -1533,7 +1654,9 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
|
|
1533
1654
|
scope.keydown = function(evt) {
|
1534
1655
|
if (evt.which === 27) {
|
1535
1656
|
evt.preventDefault();
|
1536
|
-
|
1657
|
+
if (scope.isOpen) {
|
1658
|
+
evt.stopPropagation();
|
1659
|
+
}
|
1537
1660
|
scope.close();
|
1538
1661
|
} else if (evt.which === 40 && !scope.isOpen) {
|
1539
1662
|
scope.isOpen = true;
|
@@ -1555,8 +1678,8 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
|
|
1555
1678
|
scope.select = function( date ) {
|
1556
1679
|
if (date === 'today') {
|
1557
1680
|
var today = new Date();
|
1558
|
-
if (angular.isDate(
|
1559
|
-
date = new Date(
|
1681
|
+
if (angular.isDate(scope.date)) {
|
1682
|
+
date = new Date(scope.date);
|
1560
1683
|
date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate());
|
1561
1684
|
} else {
|
1562
1685
|
date = new Date(today.setHours(0, 0, 0, 0));
|
@@ -1571,6 +1694,9 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
|
|
1571
1694
|
};
|
1572
1695
|
|
1573
1696
|
var $popup = $compile(popupEl)(scope);
|
1697
|
+
// Prevent jQuery cache memory leak (template is now redundant after linking)
|
1698
|
+
popupEl.remove();
|
1699
|
+
|
1574
1700
|
if ( appendToBody ) {
|
1575
1701
|
$document.find('body').append($popup);
|
1576
1702
|
} else {
|
@@ -1601,13 +1727,13 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
|
|
1601
1727
|
};
|
1602
1728
|
});
|
1603
1729
|
|
1604
|
-
angular.module('ui.bootstrap.dropdown', [])
|
1730
|
+
angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
|
1605
1731
|
|
1606
1732
|
.constant('dropdownConfig', {
|
1607
1733
|
openClass: 'open'
|
1608
1734
|
})
|
1609
1735
|
|
1610
|
-
.service('dropdownService', ['$document', function($document) {
|
1736
|
+
.service('dropdownService', ['$document', '$rootScope', function($document, $rootScope) {
|
1611
1737
|
var openScope = null;
|
1612
1738
|
|
1613
1739
|
this.open = function( dropdownScope ) {
|
@@ -1632,13 +1758,27 @@ angular.module('ui.bootstrap.dropdown', [])
|
|
1632
1758
|
};
|
1633
1759
|
|
1634
1760
|
var closeDropdown = function( evt ) {
|
1635
|
-
|
1761
|
+
// This method may still be called during the same mouse event that
|
1762
|
+
// unbound this event handler. So check openScope before proceeding.
|
1763
|
+
if (!openScope) { return; }
|
1764
|
+
|
1765
|
+
if( evt && openScope.getAutoClose() === 'disabled' ) { return ; }
|
1766
|
+
|
1767
|
+
var toggleElement = openScope.getToggleElement();
|
1768
|
+
if ( evt && toggleElement && toggleElement[0].contains(evt.target) ) {
|
1636
1769
|
return;
|
1637
1770
|
}
|
1638
1771
|
|
1639
|
-
openScope
|
1640
|
-
|
1641
|
-
|
1772
|
+
var $element = openScope.getElement();
|
1773
|
+
if( evt && openScope.getAutoClose() === 'outsideClick' && $element && $element[0].contains(evt.target) ) {
|
1774
|
+
return;
|
1775
|
+
}
|
1776
|
+
|
1777
|
+
openScope.isOpen = false;
|
1778
|
+
|
1779
|
+
if (!$rootScope.$$phase) {
|
1780
|
+
openScope.$apply();
|
1781
|
+
}
|
1642
1782
|
};
|
1643
1783
|
|
1644
1784
|
var escapeKeyBind = function( evt ) {
|
@@ -1649,13 +1789,14 @@ angular.module('ui.bootstrap.dropdown', [])
|
|
1649
1789
|
};
|
1650
1790
|
}])
|
1651
1791
|
|
1652
|
-
.controller('DropdownController', ['$scope', '$attrs', '$parse', 'dropdownConfig', 'dropdownService', '$animate', function($scope, $attrs, $parse, dropdownConfig, dropdownService, $animate) {
|
1792
|
+
.controller('DropdownController', ['$scope', '$attrs', '$parse', 'dropdownConfig', 'dropdownService', '$animate', '$position', '$document', function($scope, $attrs, $parse, dropdownConfig, dropdownService, $animate, $position, $document) {
|
1653
1793
|
var self = this,
|
1654
1794
|
scope = $scope.$new(), // create a child scope so we are not polluting original one
|
1655
1795
|
openClass = dropdownConfig.openClass,
|
1656
1796
|
getIsOpen,
|
1657
1797
|
setIsOpen = angular.noop,
|
1658
|
-
toggleInvoker = $attrs.onToggle ? $parse($attrs.onToggle) : angular.noop
|
1798
|
+
toggleInvoker = $attrs.onToggle ? $parse($attrs.onToggle) : angular.noop,
|
1799
|
+
appendToBody = false;
|
1659
1800
|
|
1660
1801
|
this.init = function( element ) {
|
1661
1802
|
self.$element = element;
|
@@ -1668,6 +1809,15 @@ angular.module('ui.bootstrap.dropdown', [])
|
|
1668
1809
|
scope.isOpen = !!value;
|
1669
1810
|
});
|
1670
1811
|
}
|
1812
|
+
|
1813
|
+
appendToBody = angular.isDefined($attrs.dropdownAppendToBody);
|
1814
|
+
|
1815
|
+
if ( appendToBody && self.dropdownMenu ) {
|
1816
|
+
$document.find('body').append( self.dropdownMenu );
|
1817
|
+
element.on('$destroy', function handleDestroyEvent() {
|
1818
|
+
self.dropdownMenu.remove();
|
1819
|
+
});
|
1820
|
+
}
|
1671
1821
|
};
|
1672
1822
|
|
1673
1823
|
this.toggle = function( open ) {
|
@@ -1679,6 +1829,18 @@ angular.module('ui.bootstrap.dropdown', [])
|
|
1679
1829
|
return scope.isOpen;
|
1680
1830
|
};
|
1681
1831
|
|
1832
|
+
scope.getToggleElement = function() {
|
1833
|
+
return self.toggleElement;
|
1834
|
+
};
|
1835
|
+
|
1836
|
+
scope.getAutoClose = function() {
|
1837
|
+
return $attrs.autoClose || 'always'; //or 'outsideClick' or 'disabled'
|
1838
|
+
};
|
1839
|
+
|
1840
|
+
scope.getElement = function() {
|
1841
|
+
return self.$element;
|
1842
|
+
};
|
1843
|
+
|
1682
1844
|
scope.focusToggleElement = function() {
|
1683
1845
|
if ( self.toggleElement ) {
|
1684
1846
|
self.toggleElement[0].focus();
|
@@ -1686,6 +1848,15 @@ angular.module('ui.bootstrap.dropdown', [])
|
|
1686
1848
|
};
|
1687
1849
|
|
1688
1850
|
scope.$watch('isOpen', function( isOpen, wasOpen ) {
|
1851
|
+
if ( appendToBody && self.dropdownMenu ) {
|
1852
|
+
var pos = $position.positionElements(self.$element, self.dropdownMenu, 'bottom-left', true);
|
1853
|
+
self.dropdownMenu.css({
|
1854
|
+
top: pos.top + 'px',
|
1855
|
+
left: pos.left + 'px',
|
1856
|
+
display: isOpen ? 'block' : 'none'
|
1857
|
+
});
|
1858
|
+
}
|
1859
|
+
|
1689
1860
|
$animate[isOpen ? 'addClass' : 'removeClass'](self.$element, openClass);
|
1690
1861
|
|
1691
1862
|
if ( isOpen ) {
|
@@ -1712,7 +1883,6 @@ angular.module('ui.bootstrap.dropdown', [])
|
|
1712
1883
|
|
1713
1884
|
.directive('dropdown', function() {
|
1714
1885
|
return {
|
1715
|
-
restrict: 'CA',
|
1716
1886
|
controller: 'DropdownController',
|
1717
1887
|
link: function(scope, element, attrs, dropdownCtrl) {
|
1718
1888
|
dropdownCtrl.init( element );
|
@@ -1720,9 +1890,21 @@ angular.module('ui.bootstrap.dropdown', [])
|
|
1720
1890
|
};
|
1721
1891
|
})
|
1722
1892
|
|
1893
|
+
.directive('dropdownMenu', function() {
|
1894
|
+
return {
|
1895
|
+
restrict: 'AC',
|
1896
|
+
require: '?^dropdown',
|
1897
|
+
link: function(scope, element, attrs, dropdownCtrl) {
|
1898
|
+
if ( !dropdownCtrl ) {
|
1899
|
+
return;
|
1900
|
+
}
|
1901
|
+
dropdownCtrl.dropdownMenu = element;
|
1902
|
+
}
|
1903
|
+
};
|
1904
|
+
})
|
1905
|
+
|
1723
1906
|
.directive('dropdownToggle', function() {
|
1724
1907
|
return {
|
1725
|
-
restrict: 'CA',
|
1726
1908
|
require: '?^dropdown',
|
1727
1909
|
link: function(scope, element, attrs, dropdownCtrl) {
|
1728
1910
|
if ( !dropdownCtrl ) {
|
@@ -1756,7 +1938,7 @@ angular.module('ui.bootstrap.dropdown', [])
|
|
1756
1938
|
};
|
1757
1939
|
});
|
1758
1940
|
|
1759
|
-
angular.module('ui.bootstrap.modal', [
|
1941
|
+
angular.module('ui.bootstrap.modal', [])
|
1760
1942
|
|
1761
1943
|
/**
|
1762
1944
|
* A helper, internal data structure that acts as a map but also allows getting / removing
|
@@ -1820,19 +2002,23 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
1820
2002
|
restrict: 'EA',
|
1821
2003
|
replace: true,
|
1822
2004
|
templateUrl: 'template/modal/backdrop.html',
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
//trigger CSS transitions
|
1828
|
-
$timeout(function () {
|
1829
|
-
scope.animate = true;
|
1830
|
-
});
|
2005
|
+
compile: function (tElement, tAttrs) {
|
2006
|
+
tElement.addClass(tAttrs.backdropClass);
|
2007
|
+
return linkFn;
|
1831
2008
|
}
|
1832
2009
|
};
|
2010
|
+
|
2011
|
+
function linkFn(scope, element, attrs) {
|
2012
|
+
scope.animate = false;
|
2013
|
+
|
2014
|
+
//trigger CSS transitions
|
2015
|
+
$timeout(function () {
|
2016
|
+
scope.animate = true;
|
2017
|
+
});
|
2018
|
+
}
|
1833
2019
|
}])
|
1834
2020
|
|
1835
|
-
.directive('modalWindow', ['$modalStack', '$
|
2021
|
+
.directive('modalWindow', ['$modalStack', '$q', function ($modalStack, $q) {
|
1836
2022
|
return {
|
1837
2023
|
restrict: 'EA',
|
1838
2024
|
scope: {
|
@@ -1848,13 +2034,6 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
1848
2034
|
element.addClass(attrs.windowClass || '');
|
1849
2035
|
scope.size = attrs.size;
|
1850
2036
|
|
1851
|
-
$timeout(function () {
|
1852
|
-
// trigger CSS transitions
|
1853
|
-
scope.animate = true;
|
1854
|
-
// focus a freshly-opened modal
|
1855
|
-
element[0].focus();
|
1856
|
-
});
|
1857
|
-
|
1858
2037
|
scope.close = function (evt) {
|
1859
2038
|
var modal = $modalStack.getTop();
|
1860
2039
|
if (modal && modal.value.backdrop && modal.value.backdrop != 'static' && (evt.target === evt.currentTarget)) {
|
@@ -1863,12 +2042,75 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
1863
2042
|
$modalStack.dismiss(modal.key, 'backdrop click');
|
1864
2043
|
}
|
1865
2044
|
};
|
2045
|
+
|
2046
|
+
// This property is only added to the scope for the purpose of detecting when this directive is rendered.
|
2047
|
+
// We can detect that by using this property in the template associated with this directive and then use
|
2048
|
+
// {@link Attribute#$observe} on it. For more details please see {@link TableColumnResize}.
|
2049
|
+
scope.$isRendered = true;
|
2050
|
+
|
2051
|
+
// Deferred object that will be resolved when this modal is render.
|
2052
|
+
var modalRenderDeferObj = $q.defer();
|
2053
|
+
// Observe function will be called on next digest cycle after compilation, ensuring that the DOM is ready.
|
2054
|
+
// In order to use this way of finding whether DOM is ready, we need to observe a scope property used in modal's template.
|
2055
|
+
attrs.$observe('modalRender', function (value) {
|
2056
|
+
if (value == 'true') {
|
2057
|
+
modalRenderDeferObj.resolve();
|
2058
|
+
}
|
2059
|
+
});
|
2060
|
+
|
2061
|
+
modalRenderDeferObj.promise.then(function () {
|
2062
|
+
// trigger CSS transitions
|
2063
|
+
scope.animate = true;
|
2064
|
+
|
2065
|
+
var inputsWithAutofocus = element[0].querySelectorAll('[autofocus]');
|
2066
|
+
/**
|
2067
|
+
* Auto-focusing of a freshly-opened modal element causes any child elements
|
2068
|
+
* with the autofocus attribute to lose focus. This is an issue on touch
|
2069
|
+
* based devices which will show and then hide the onscreen keyboard.
|
2070
|
+
* Attempts to refocus the autofocus element via JavaScript will not reopen
|
2071
|
+
* the onscreen keyboard. Fixed by updated the focusing logic to only autofocus
|
2072
|
+
* the modal element if the modal does not contain an autofocus element.
|
2073
|
+
*/
|
2074
|
+
if (inputsWithAutofocus.length) {
|
2075
|
+
inputsWithAutofocus[0].focus();
|
2076
|
+
} else {
|
2077
|
+
element[0].focus();
|
2078
|
+
}
|
2079
|
+
|
2080
|
+
// Notify {@link $modalStack} that modal is rendered.
|
2081
|
+
var modal = $modalStack.getTop();
|
2082
|
+
if (modal) {
|
2083
|
+
$modalStack.modalRendered(modal.key);
|
2084
|
+
}
|
2085
|
+
});
|
1866
2086
|
}
|
1867
2087
|
};
|
1868
2088
|
}])
|
1869
2089
|
|
1870
|
-
.
|
1871
|
-
function (
|
2090
|
+
.directive('modalAnimationClass', [
|
2091
|
+
function () {
|
2092
|
+
return {
|
2093
|
+
compile: function (tElement, tAttrs) {
|
2094
|
+
if (tAttrs.modalAnimation) {
|
2095
|
+
tElement.addClass(tAttrs.modalAnimationClass);
|
2096
|
+
}
|
2097
|
+
}
|
2098
|
+
};
|
2099
|
+
}])
|
2100
|
+
|
2101
|
+
.directive('modalTransclude', function () {
|
2102
|
+
return {
|
2103
|
+
link: function($scope, $element, $attrs, controller, $transclude) {
|
2104
|
+
$transclude($scope.$parent, function(clone) {
|
2105
|
+
$element.empty();
|
2106
|
+
$element.append(clone);
|
2107
|
+
});
|
2108
|
+
}
|
2109
|
+
};
|
2110
|
+
})
|
2111
|
+
|
2112
|
+
.factory('$modalStack', ['$animate', '$timeout', '$document', '$compile', '$rootScope', '$$stackedMap',
|
2113
|
+
function ($animate, $timeout, $document, $compile, $rootScope, $$stackedMap) {
|
1872
2114
|
|
1873
2115
|
var OPENED_MODAL_CLASS = 'modal-open';
|
1874
2116
|
|
@@ -1902,8 +2144,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
1902
2144
|
openedWindows.remove(modalInstance);
|
1903
2145
|
|
1904
2146
|
//remove window DOM element
|
1905
|
-
removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope,
|
1906
|
-
modalWindow.modalScope.$destroy();
|
2147
|
+
removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, function() {
|
1907
2148
|
body.toggleClass(OPENED_MODAL_CLASS, openedWindows.length() > 0);
|
1908
2149
|
checkRemoveBackdrop();
|
1909
2150
|
});
|
@@ -1913,8 +2154,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
1913
2154
|
//remove backdrop if no longer needed
|
1914
2155
|
if (backdropDomEl && backdropIndex() == -1) {
|
1915
2156
|
var backdropScopeRef = backdropScope;
|
1916
|
-
removeAfterAnimate(backdropDomEl, backdropScope,
|
1917
|
-
backdropScopeRef.$destroy();
|
2157
|
+
removeAfterAnimate(backdropDomEl, backdropScope, function () {
|
1918
2158
|
backdropScopeRef = null;
|
1919
2159
|
});
|
1920
2160
|
backdropDomEl = undefined;
|
@@ -1922,23 +2162,18 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
1922
2162
|
}
|
1923
2163
|
}
|
1924
2164
|
|
1925
|
-
function removeAfterAnimate(domEl, scope,
|
2165
|
+
function removeAfterAnimate(domEl, scope, done) {
|
1926
2166
|
// Closing animation
|
1927
2167
|
scope.animate = false;
|
1928
2168
|
|
1929
|
-
|
1930
|
-
if (transitionEndEventName) {
|
2169
|
+
if (domEl.attr('modal-animation') && $animate.enabled()) {
|
1931
2170
|
// transition out
|
1932
|
-
|
1933
|
-
|
1934
|
-
domEl.bind(transitionEndEventName, function () {
|
1935
|
-
$timeout.cancel(timeout);
|
1936
|
-
afterAnimating();
|
1937
|
-
scope.$apply();
|
2171
|
+
domEl.one('$animate:close', function closeFn() {
|
2172
|
+
$rootScope.$evalAsync(afterAnimating);
|
1938
2173
|
});
|
1939
2174
|
} else {
|
1940
2175
|
// Ensure this call is async
|
1941
|
-
$timeout(afterAnimating
|
2176
|
+
$timeout(afterAnimating);
|
1942
2177
|
}
|
1943
2178
|
|
1944
2179
|
function afterAnimating() {
|
@@ -1948,6 +2183,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
1948
2183
|
afterAnimating.done = true;
|
1949
2184
|
|
1950
2185
|
domEl.remove();
|
2186
|
+
scope.$destroy();
|
1951
2187
|
if (done) {
|
1952
2188
|
done();
|
1953
2189
|
}
|
@@ -1970,8 +2206,11 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
1970
2206
|
|
1971
2207
|
$modalStack.open = function (modalInstance, modal) {
|
1972
2208
|
|
2209
|
+
var modalOpener = $document[0].activeElement;
|
2210
|
+
|
1973
2211
|
openedWindows.add(modalInstance, {
|
1974
2212
|
deferred: modal.deferred,
|
2213
|
+
renderDeferred: modal.renderDeferred,
|
1975
2214
|
modalScope: modal.scope,
|
1976
2215
|
backdrop: modal.backdrop,
|
1977
2216
|
keyboard: modal.keyboard
|
@@ -1983,11 +2222,16 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
1983
2222
|
if (currBackdropIndex >= 0 && !backdropDomEl) {
|
1984
2223
|
backdropScope = $rootScope.$new(true);
|
1985
2224
|
backdropScope.index = currBackdropIndex;
|
1986
|
-
|
2225
|
+
var angularBackgroundDomEl = angular.element('<div modal-backdrop="modal-backdrop"></div>');
|
2226
|
+
angularBackgroundDomEl.attr('backdrop-class', modal.backdropClass);
|
2227
|
+
if (modal.animation) {
|
2228
|
+
angularBackgroundDomEl.attr('modal-animation', 'true');
|
2229
|
+
}
|
2230
|
+
backdropDomEl = $compile(angularBackgroundDomEl)(backdropScope);
|
1987
2231
|
body.append(backdropDomEl);
|
1988
2232
|
}
|
1989
2233
|
|
1990
|
-
var angularDomEl = angular.element('<div modal-window></div>');
|
2234
|
+
var angularDomEl = angular.element('<div modal-window="modal-window"></div>');
|
1991
2235
|
angularDomEl.attr({
|
1992
2236
|
'template-url': modal.windowTemplateUrl,
|
1993
2237
|
'window-class': modal.windowClass,
|
@@ -1995,33 +2239,46 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
1995
2239
|
'index': openedWindows.length() - 1,
|
1996
2240
|
'animate': 'animate'
|
1997
2241
|
}).html(modal.content);
|
2242
|
+
if (modal.animation) {
|
2243
|
+
angularDomEl.attr('modal-animation', 'true');
|
2244
|
+
}
|
1998
2245
|
|
1999
2246
|
var modalDomEl = $compile(angularDomEl)(modal.scope);
|
2000
2247
|
openedWindows.top().value.modalDomEl = modalDomEl;
|
2248
|
+
openedWindows.top().value.modalOpener = modalOpener;
|
2001
2249
|
body.append(modalDomEl);
|
2002
2250
|
body.addClass(OPENED_MODAL_CLASS);
|
2003
2251
|
};
|
2004
2252
|
|
2253
|
+
function broadcastClosing(modalWindow, resultOrReason, closing) {
|
2254
|
+
return !modalWindow.value.modalScope.$broadcast('modal.closing', resultOrReason, closing).defaultPrevented;
|
2255
|
+
}
|
2256
|
+
|
2005
2257
|
$modalStack.close = function (modalInstance, result) {
|
2006
|
-
var modalWindow = openedWindows.get(modalInstance)
|
2007
|
-
if (modalWindow) {
|
2008
|
-
modalWindow.deferred.resolve(result);
|
2258
|
+
var modalWindow = openedWindows.get(modalInstance);
|
2259
|
+
if (modalWindow && broadcastClosing(modalWindow, result, true)) {
|
2260
|
+
modalWindow.value.deferred.resolve(result);
|
2009
2261
|
removeModalWindow(modalInstance);
|
2262
|
+
modalWindow.value.modalOpener.focus();
|
2263
|
+
return true;
|
2010
2264
|
}
|
2265
|
+
return !modalWindow;
|
2011
2266
|
};
|
2012
2267
|
|
2013
2268
|
$modalStack.dismiss = function (modalInstance, reason) {
|
2014
|
-
var modalWindow = openedWindows.get(modalInstance)
|
2015
|
-
if (modalWindow) {
|
2016
|
-
modalWindow.deferred.reject(reason);
|
2269
|
+
var modalWindow = openedWindows.get(modalInstance);
|
2270
|
+
if (modalWindow && broadcastClosing(modalWindow, reason, false)) {
|
2271
|
+
modalWindow.value.deferred.reject(reason);
|
2017
2272
|
removeModalWindow(modalInstance);
|
2273
|
+
modalWindow.value.modalOpener.focus();
|
2274
|
+
return true;
|
2018
2275
|
}
|
2276
|
+
return !modalWindow;
|
2019
2277
|
};
|
2020
2278
|
|
2021
2279
|
$modalStack.dismissAll = function (reason) {
|
2022
2280
|
var topModal = this.getTop();
|
2023
|
-
while (topModal) {
|
2024
|
-
this.dismiss(topModal.key, reason);
|
2281
|
+
while (topModal && this.dismiss(topModal.key, reason)) {
|
2025
2282
|
topModal = this.getTop();
|
2026
2283
|
}
|
2027
2284
|
};
|
@@ -2030,6 +2287,13 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
2030
2287
|
return openedWindows.top();
|
2031
2288
|
};
|
2032
2289
|
|
2290
|
+
$modalStack.modalRendered = function (modalInstance) {
|
2291
|
+
var modalWindow = openedWindows.get(modalInstance);
|
2292
|
+
if (modalWindow) {
|
2293
|
+
modalWindow.value.renderDeferred.resolve();
|
2294
|
+
}
|
2295
|
+
};
|
2296
|
+
|
2033
2297
|
return $modalStack;
|
2034
2298
|
}])
|
2035
2299
|
|
@@ -2037,24 +2301,23 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
2037
2301
|
|
2038
2302
|
var $modalProvider = {
|
2039
2303
|
options: {
|
2040
|
-
|
2304
|
+
animation: true,
|
2305
|
+
backdrop: true, //can also be false or 'static'
|
2041
2306
|
keyboard: true
|
2042
2307
|
},
|
2043
|
-
$get: ['$injector', '$rootScope', '$q', '$
|
2044
|
-
function ($injector, $rootScope, $q, $
|
2308
|
+
$get: ['$injector', '$rootScope', '$q', '$templateRequest', '$controller', '$modalStack',
|
2309
|
+
function ($injector, $rootScope, $q, $templateRequest, $controller, $modalStack) {
|
2045
2310
|
|
2046
2311
|
var $modal = {};
|
2047
2312
|
|
2048
2313
|
function getTemplatePromise(options) {
|
2049
2314
|
return options.template ? $q.when(options.template) :
|
2050
|
-
$
|
2051
|
-
return result.data;
|
2052
|
-
});
|
2315
|
+
$templateRequest(angular.isFunction(options.templateUrl) ? (options.templateUrl)() : options.templateUrl);
|
2053
2316
|
}
|
2054
2317
|
|
2055
2318
|
function getResolvePromises(resolves) {
|
2056
2319
|
var promisesArr = [];
|
2057
|
-
angular.forEach(resolves, function (value
|
2320
|
+
angular.forEach(resolves, function (value) {
|
2058
2321
|
if (angular.isFunction(value) || angular.isArray(value)) {
|
2059
2322
|
promisesArr.push($q.when($injector.invoke(value)));
|
2060
2323
|
}
|
@@ -2066,16 +2329,18 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
2066
2329
|
|
2067
2330
|
var modalResultDeferred = $q.defer();
|
2068
2331
|
var modalOpenedDeferred = $q.defer();
|
2332
|
+
var modalRenderDeferred = $q.defer();
|
2069
2333
|
|
2070
2334
|
//prepare an instance of a modal to be injected into controllers and returned to a caller
|
2071
2335
|
var modalInstance = {
|
2072
2336
|
result: modalResultDeferred.promise,
|
2073
2337
|
opened: modalOpenedDeferred.promise,
|
2338
|
+
rendered: modalRenderDeferred.promise,
|
2074
2339
|
close: function (result) {
|
2075
|
-
$modalStack.close(modalInstance, result);
|
2340
|
+
return $modalStack.close(modalInstance, result);
|
2076
2341
|
},
|
2077
2342
|
dismiss: function (reason) {
|
2078
|
-
$modalStack.dismiss(modalInstance, reason);
|
2343
|
+
return $modalStack.dismiss(modalInstance, reason);
|
2079
2344
|
}
|
2080
2345
|
};
|
2081
2346
|
|
@@ -2110,14 +2375,20 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
2110
2375
|
});
|
2111
2376
|
|
2112
2377
|
ctrlInstance = $controller(modalOptions.controller, ctrlLocals);
|
2378
|
+
if (modalOptions.controllerAs) {
|
2379
|
+
modalScope[modalOptions.controllerAs] = ctrlInstance;
|
2380
|
+
}
|
2113
2381
|
}
|
2114
2382
|
|
2115
2383
|
$modalStack.open(modalInstance, {
|
2116
2384
|
scope: modalScope,
|
2117
2385
|
deferred: modalResultDeferred,
|
2386
|
+
renderDeferred: modalRenderDeferred,
|
2118
2387
|
content: tplAndVars[0],
|
2388
|
+
animation: modalOptions.animation,
|
2119
2389
|
backdrop: modalOptions.backdrop,
|
2120
2390
|
keyboard: modalOptions.keyboard,
|
2391
|
+
backdropClass: modalOptions.backdropClass,
|
2121
2392
|
windowClass: modalOptions.windowClass,
|
2122
2393
|
windowTemplateUrl: modalOptions.windowTemplateUrl,
|
2123
2394
|
size: modalOptions.size
|
@@ -2129,8 +2400,8 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
|
|
2129
2400
|
|
2130
2401
|
templateAndResolvePromise.then(function () {
|
2131
2402
|
modalOpenedDeferred.resolve(true);
|
2132
|
-
}, function () {
|
2133
|
-
modalOpenedDeferred.reject(
|
2403
|
+
}, function (reason) {
|
2404
|
+
modalOpenedDeferred.reject(reason);
|
2134
2405
|
});
|
2135
2406
|
|
2136
2407
|
return modalInstance;
|
@@ -2166,6 +2437,20 @@ angular.module('ui.bootstrap.pagination', [])
|
|
2166
2437
|
} else {
|
2167
2438
|
this.itemsPerPage = config.itemsPerPage;
|
2168
2439
|
}
|
2440
|
+
|
2441
|
+
$scope.$watch('totalItems', function() {
|
2442
|
+
$scope.totalPages = self.calculateTotalPages();
|
2443
|
+
});
|
2444
|
+
|
2445
|
+
$scope.$watch('totalPages', function(value) {
|
2446
|
+
setNumPages($scope.$parent, value); // Readonly variable
|
2447
|
+
|
2448
|
+
if ( $scope.page > value ) {
|
2449
|
+
$scope.selectPage(value);
|
2450
|
+
} else {
|
2451
|
+
ngModelCtrl.$render();
|
2452
|
+
}
|
2453
|
+
});
|
2169
2454
|
};
|
2170
2455
|
|
2171
2456
|
this.calculateTotalPages = function() {
|
@@ -2177,8 +2462,11 @@ angular.module('ui.bootstrap.pagination', [])
|
|
2177
2462
|
$scope.page = parseInt(ngModelCtrl.$viewValue, 10) || 1;
|
2178
2463
|
};
|
2179
2464
|
|
2180
|
-
$scope.selectPage = function(page) {
|
2465
|
+
$scope.selectPage = function(page, evt) {
|
2181
2466
|
if ( $scope.page !== page && page > 0 && page <= $scope.totalPages) {
|
2467
|
+
if (evt && evt.target) {
|
2468
|
+
evt.target.blur();
|
2469
|
+
}
|
2182
2470
|
ngModelCtrl.$setViewValue(page);
|
2183
2471
|
ngModelCtrl.$render();
|
2184
2472
|
}
|
@@ -2193,20 +2481,6 @@ angular.module('ui.bootstrap.pagination', [])
|
|
2193
2481
|
$scope.noNext = function() {
|
2194
2482
|
return $scope.page === $scope.totalPages;
|
2195
2483
|
};
|
2196
|
-
|
2197
|
-
$scope.$watch('totalItems', function() {
|
2198
|
-
$scope.totalPages = self.calculateTotalPages();
|
2199
|
-
});
|
2200
|
-
|
2201
|
-
$scope.$watch('totalPages', function(value) {
|
2202
|
-
setNumPages($scope.$parent, value); // Readonly variable
|
2203
|
-
|
2204
|
-
if ( $scope.page > value ) {
|
2205
|
-
$scope.selectPage(value);
|
2206
|
-
} else {
|
2207
|
-
ngModelCtrl.$render();
|
2208
|
-
}
|
2209
|
-
});
|
2210
2484
|
}])
|
2211
2485
|
|
2212
2486
|
.constant('paginationConfig', {
|
@@ -2374,7 +2648,8 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2374
2648
|
var defaultOptions = {
|
2375
2649
|
placement: 'top',
|
2376
2650
|
animation: true,
|
2377
|
-
popupDelay: 0
|
2651
|
+
popupDelay: 0,
|
2652
|
+
useContentExp: false
|
2378
2653
|
};
|
2379
2654
|
|
2380
2655
|
// Default hide triggers for each show trigger
|
@@ -2424,9 +2699,9 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2424
2699
|
* Returns the actual instance of the $tooltip service.
|
2425
2700
|
* TODO support multiple triggers
|
2426
2701
|
*/
|
2427
|
-
this.$get = [ '$window', '$compile', '$timeout', '$
|
2428
|
-
return function $tooltip ( type, prefix, defaultTriggerShow ) {
|
2429
|
-
|
2702
|
+
this.$get = [ '$window', '$compile', '$timeout', '$document', '$position', '$interpolate', function ( $window, $compile, $timeout, $document, $position, $interpolate ) {
|
2703
|
+
return function $tooltip ( type, prefix, defaultTriggerShow, options ) {
|
2704
|
+
options = angular.extend( {}, defaultOptions, globalOptions, options );
|
2430
2705
|
|
2431
2706
|
/**
|
2432
2707
|
* Returns an object of show and hide triggers.
|
@@ -2457,31 +2732,37 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2457
2732
|
var endSym = $interpolate.endSymbol();
|
2458
2733
|
var template =
|
2459
2734
|
'<div '+ directiveName +'-popup '+
|
2460
|
-
'title="'+startSym+'
|
2461
|
-
|
2462
|
-
|
2463
|
-
|
2464
|
-
'
|
2735
|
+
'title="'+startSym+'title'+endSym+'" '+
|
2736
|
+
(options.useContentExp ?
|
2737
|
+
'content-exp="contentExp()" ' :
|
2738
|
+
'content="'+startSym+'content'+endSym+'" ') +
|
2739
|
+
'placement="'+startSym+'placement'+endSym+'" '+
|
2740
|
+
'popup-class="'+startSym+'popupClass'+endSym+'" '+
|
2741
|
+
'animation="animation" '+
|
2742
|
+
'is-open="isOpen"'+
|
2743
|
+
'origin-scope="origScope" '+
|
2465
2744
|
'>'+
|
2466
2745
|
'</div>';
|
2467
2746
|
|
2468
2747
|
return {
|
2469
2748
|
restrict: 'EA',
|
2470
|
-
scope: true,
|
2471
2749
|
compile: function (tElem, tAttrs) {
|
2472
2750
|
var tooltipLinker = $compile( template );
|
2473
2751
|
|
2474
|
-
return function link ( scope, element, attrs ) {
|
2752
|
+
return function link ( scope, element, attrs, tooltipCtrl ) {
|
2475
2753
|
var tooltip;
|
2754
|
+
var tooltipLinkedScope;
|
2476
2755
|
var transitionTimeout;
|
2477
2756
|
var popupTimeout;
|
2478
2757
|
var appendToBody = angular.isDefined( options.appendToBody ) ? options.appendToBody : false;
|
2479
2758
|
var triggers = getTriggers( undefined );
|
2480
2759
|
var hasEnableExp = angular.isDefined(attrs[prefix+'Enable']);
|
2760
|
+
var ttScope = scope.$new(true);
|
2481
2761
|
|
2482
2762
|
var positionTooltip = function () {
|
2763
|
+
if (!tooltip) { return; }
|
2483
2764
|
|
2484
|
-
var ttPosition = $position.positionElements(element, tooltip,
|
2765
|
+
var ttPosition = $position.positionElements(element, tooltip, ttScope.placement, appendToBody);
|
2485
2766
|
ttPosition.top += 'px';
|
2486
2767
|
ttPosition.left += 'px';
|
2487
2768
|
|
@@ -2489,12 +2770,15 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2489
2770
|
tooltip.css( ttPosition );
|
2490
2771
|
};
|
2491
2772
|
|
2773
|
+
// Set up the correct scope to allow transclusion later
|
2774
|
+
ttScope.origScope = scope;
|
2775
|
+
|
2492
2776
|
// By default, the tooltip is not open.
|
2493
2777
|
// TODO add ability to start tooltip opened
|
2494
|
-
|
2778
|
+
ttScope.isOpen = false;
|
2495
2779
|
|
2496
2780
|
function toggleTooltipBind () {
|
2497
|
-
if ( !
|
2781
|
+
if ( ! ttScope.isOpen ) {
|
2498
2782
|
showTooltipBind();
|
2499
2783
|
} else {
|
2500
2784
|
hideTooltipBind();
|
@@ -2506,11 +2790,14 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2506
2790
|
if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {
|
2507
2791
|
return;
|
2508
2792
|
}
|
2509
|
-
|
2793
|
+
|
2794
|
+
prepareTooltip();
|
2795
|
+
|
2796
|
+
if ( ttScope.popupDelay ) {
|
2510
2797
|
// Do nothing if the tooltip was already scheduled to pop-up.
|
2511
2798
|
// This happens if show is triggered multiple times before any hide is triggered.
|
2512
2799
|
if (!popupTimeout) {
|
2513
|
-
popupTimeout = $timeout( show,
|
2800
|
+
popupTimeout = $timeout( show, ttScope.popupDelay, false );
|
2514
2801
|
popupTimeout.then(function(reposition){reposition();});
|
2515
2802
|
}
|
2516
2803
|
} else {
|
@@ -2537,7 +2824,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2537
2824
|
}
|
2538
2825
|
|
2539
2826
|
// Don't show empty tooltips.
|
2540
|
-
if ( !
|
2827
|
+
if ( !(options.useContentExp ? ttScope.contentExp() : ttScope.content) ) {
|
2541
2828
|
return angular.noop;
|
2542
2829
|
}
|
2543
2830
|
|
@@ -2545,20 +2832,13 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2545
2832
|
|
2546
2833
|
// Set the initial positioning.
|
2547
2834
|
tooltip.css({ top: 0, left: 0, display: 'block' });
|
2548
|
-
|
2549
|
-
// Now we add it to the DOM because need some info about it. But it's not
|
2550
|
-
// visible yet anyway.
|
2551
|
-
if ( appendToBody ) {
|
2552
|
-
$document.find( 'body' ).append( tooltip );
|
2553
|
-
} else {
|
2554
|
-
element.after( tooltip );
|
2555
|
-
}
|
2835
|
+
ttScope.$digest();
|
2556
2836
|
|
2557
2837
|
positionTooltip();
|
2558
2838
|
|
2559
2839
|
// And show the tooltip.
|
2560
|
-
|
2561
|
-
|
2840
|
+
ttScope.isOpen = true;
|
2841
|
+
ttScope.$apply(); // digest required as $apply is not called
|
2562
2842
|
|
2563
2843
|
// Return positioning function as promise callback for correct
|
2564
2844
|
// positioning after draw.
|
@@ -2568,16 +2848,16 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2568
2848
|
// Hide the tooltip popup element.
|
2569
2849
|
function hide() {
|
2570
2850
|
// First things first: we don't show it anymore.
|
2571
|
-
|
2851
|
+
ttScope.isOpen = false;
|
2572
2852
|
|
2573
2853
|
//if tooltip is going to be shown after delay, we must cancel this
|
2574
2854
|
$timeout.cancel( popupTimeout );
|
2575
2855
|
popupTimeout = null;
|
2576
2856
|
|
2577
|
-
// And now we remove it from the DOM. However, if we have animation, we
|
2857
|
+
// And now we remove it from the DOM. However, if we have animation, we
|
2578
2858
|
// need to wait for it to expire beforehand.
|
2579
2859
|
// FIXME: this is a placeholder for a port of the transitions library.
|
2580
|
-
if (
|
2860
|
+
if ( ttScope.animation ) {
|
2581
2861
|
if (!transitionTimeout) {
|
2582
2862
|
transitionTimeout = $timeout(removeTooltip, 500);
|
2583
2863
|
}
|
@@ -2591,10 +2871,26 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2591
2871
|
if (tooltip) {
|
2592
2872
|
removeTooltip();
|
2593
2873
|
}
|
2594
|
-
|
2874
|
+
tooltipLinkedScope = ttScope.$new();
|
2875
|
+
tooltip = tooltipLinker(tooltipLinkedScope, function (tooltip) {
|
2876
|
+
if ( appendToBody ) {
|
2877
|
+
$document.find( 'body' ).append( tooltip );
|
2878
|
+
} else {
|
2879
|
+
element.after( tooltip );
|
2880
|
+
}
|
2881
|
+
});
|
2595
2882
|
|
2596
|
-
|
2597
|
-
|
2883
|
+
tooltipLinkedScope.$watch(function () {
|
2884
|
+
$timeout(positionTooltip, 0, false);
|
2885
|
+
});
|
2886
|
+
|
2887
|
+
if (options.useContentExp) {
|
2888
|
+
tooltipLinkedScope.$watch('contentExp()', function (val) {
|
2889
|
+
if (!val && ttScope.isOpen ) {
|
2890
|
+
hide();
|
2891
|
+
}
|
2892
|
+
});
|
2893
|
+
}
|
2598
2894
|
}
|
2599
2895
|
|
2600
2896
|
function removeTooltip() {
|
@@ -2603,38 +2899,67 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2603
2899
|
tooltip.remove();
|
2604
2900
|
tooltip = null;
|
2605
2901
|
}
|
2902
|
+
if (tooltipLinkedScope) {
|
2903
|
+
tooltipLinkedScope.$destroy();
|
2904
|
+
tooltipLinkedScope = null;
|
2905
|
+
}
|
2606
2906
|
}
|
2607
2907
|
|
2908
|
+
function prepareTooltip() {
|
2909
|
+
prepPopupClass();
|
2910
|
+
prepPlacement();
|
2911
|
+
prepPopupDelay();
|
2912
|
+
}
|
2913
|
+
|
2914
|
+
ttScope.contentExp = function () {
|
2915
|
+
return scope.$eval(attrs[type]);
|
2916
|
+
};
|
2917
|
+
|
2608
2918
|
/**
|
2609
2919
|
* Observe the relevant attributes.
|
2610
2920
|
*/
|
2611
|
-
|
2612
|
-
|
2921
|
+
if (!options.useContentExp) {
|
2922
|
+
attrs.$observe( type, function ( val ) {
|
2923
|
+
ttScope.content = val;
|
2924
|
+
|
2925
|
+
if (!val && ttScope.isOpen ) {
|
2926
|
+
hide();
|
2927
|
+
}
|
2928
|
+
});
|
2929
|
+
}
|
2613
2930
|
|
2614
|
-
|
2931
|
+
attrs.$observe( 'disabled', function ( val ) {
|
2932
|
+
if (val && ttScope.isOpen ) {
|
2615
2933
|
hide();
|
2616
2934
|
}
|
2617
2935
|
});
|
2618
2936
|
|
2619
2937
|
attrs.$observe( prefix+'Title', function ( val ) {
|
2620
|
-
|
2938
|
+
ttScope.title = val;
|
2621
2939
|
});
|
2622
2940
|
|
2623
|
-
|
2624
|
-
|
2625
|
-
}
|
2941
|
+
function prepPopupClass() {
|
2942
|
+
ttScope.popupClass = attrs[prefix + 'Class'];
|
2943
|
+
}
|
2626
2944
|
|
2627
|
-
|
2945
|
+
function prepPlacement() {
|
2946
|
+
var val = attrs[ prefix + 'Placement' ];
|
2947
|
+
ttScope.placement = angular.isDefined( val ) ? val : options.placement;
|
2948
|
+
}
|
2949
|
+
|
2950
|
+
function prepPopupDelay() {
|
2951
|
+
var val = attrs[ prefix + 'PopupDelay' ];
|
2628
2952
|
var delay = parseInt( val, 10 );
|
2629
|
-
|
2630
|
-
}
|
2953
|
+
ttScope.popupDelay = ! isNaN(delay) ? delay : options.popupDelay;
|
2954
|
+
}
|
2631
2955
|
|
2632
2956
|
var unregisterTriggers = function () {
|
2633
2957
|
element.unbind(triggers.show, showTooltipBind);
|
2634
2958
|
element.unbind(triggers.hide, hideTooltipBind);
|
2635
2959
|
};
|
2636
2960
|
|
2637
|
-
|
2961
|
+
function prepTriggers() {
|
2962
|
+
var val = attrs[ prefix + 'Trigger' ];
|
2638
2963
|
unregisterTriggers();
|
2639
2964
|
|
2640
2965
|
triggers = getTriggers( val );
|
@@ -2645,21 +2970,21 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2645
2970
|
element.bind( triggers.show, showTooltipBind );
|
2646
2971
|
element.bind( triggers.hide, hideTooltipBind );
|
2647
2972
|
}
|
2648
|
-
}
|
2973
|
+
}
|
2974
|
+
prepTriggers();
|
2649
2975
|
|
2650
2976
|
var animation = scope.$eval(attrs[prefix + 'Animation']);
|
2651
|
-
|
2977
|
+
ttScope.animation = angular.isDefined(animation) ? !!animation : options.animation;
|
2652
2978
|
|
2653
|
-
|
2654
|
-
|
2655
|
-
});
|
2979
|
+
var appendToBodyVal = scope.$eval(attrs[prefix + 'AppendToBody']);
|
2980
|
+
appendToBody = angular.isDefined(appendToBodyVal) ? appendToBodyVal : appendToBody;
|
2656
2981
|
|
2657
2982
|
// if a tooltip is attached to <body> we need to remove it on
|
2658
2983
|
// location change as its parent scope will probably not be destroyed
|
2659
2984
|
// by the change.
|
2660
2985
|
if ( appendToBody ) {
|
2661
2986
|
scope.$on('$locationChangeSuccess', function closeTooltipOnLocationChangeSuccess () {
|
2662
|
-
if (
|
2987
|
+
if ( ttScope.isOpen ) {
|
2663
2988
|
hide();
|
2664
2989
|
}
|
2665
2990
|
});
|
@@ -2671,6 +2996,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2671
2996
|
$timeout.cancel( popupTimeout );
|
2672
2997
|
unregisterTriggers();
|
2673
2998
|
removeTooltip();
|
2999
|
+
ttScope = null;
|
2674
3000
|
});
|
2675
3001
|
};
|
2676
3002
|
}
|
@@ -2679,11 +3005,101 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2679
3005
|
}];
|
2680
3006
|
})
|
2681
3007
|
|
3008
|
+
// This is mostly ngInclude code but with a custom scope
|
3009
|
+
.directive( 'tooltipTemplateTransclude', [
|
3010
|
+
'$animate', '$sce', '$compile', '$templateRequest',
|
3011
|
+
function ($animate , $sce , $compile , $templateRequest) {
|
3012
|
+
return {
|
3013
|
+
link: function ( scope, elem, attrs ) {
|
3014
|
+
var origScope = scope.$eval(attrs.tooltipTemplateTranscludeScope);
|
3015
|
+
|
3016
|
+
var changeCounter = 0,
|
3017
|
+
currentScope,
|
3018
|
+
previousElement,
|
3019
|
+
currentElement;
|
3020
|
+
|
3021
|
+
var cleanupLastIncludeContent = function() {
|
3022
|
+
if (previousElement) {
|
3023
|
+
previousElement.remove();
|
3024
|
+
previousElement = null;
|
3025
|
+
}
|
3026
|
+
if (currentScope) {
|
3027
|
+
currentScope.$destroy();
|
3028
|
+
currentScope = null;
|
3029
|
+
}
|
3030
|
+
if (currentElement) {
|
3031
|
+
$animate.leave(currentElement).then(function() {
|
3032
|
+
previousElement = null;
|
3033
|
+
});
|
3034
|
+
previousElement = currentElement;
|
3035
|
+
currentElement = null;
|
3036
|
+
}
|
3037
|
+
};
|
3038
|
+
|
3039
|
+
scope.$watch($sce.parseAsResourceUrl(attrs.tooltipTemplateTransclude), function (src) {
|
3040
|
+
var thisChangeId = ++changeCounter;
|
3041
|
+
|
3042
|
+
if (src) {
|
3043
|
+
//set the 2nd param to true to ignore the template request error so that the inner
|
3044
|
+
//contents and scope can be cleaned up.
|
3045
|
+
$templateRequest(src, true).then(function(response) {
|
3046
|
+
if (thisChangeId !== changeCounter) { return; }
|
3047
|
+
var newScope = origScope.$new();
|
3048
|
+
var template = response;
|
3049
|
+
|
3050
|
+
var clone = $compile(template)(newScope, function(clone) {
|
3051
|
+
cleanupLastIncludeContent();
|
3052
|
+
$animate.enter(clone, elem);
|
3053
|
+
});
|
3054
|
+
|
3055
|
+
currentScope = newScope;
|
3056
|
+
currentElement = clone;
|
3057
|
+
|
3058
|
+
currentScope.$emit('$includeContentLoaded', src);
|
3059
|
+
}, function() {
|
3060
|
+
if (thisChangeId === changeCounter) {
|
3061
|
+
cleanupLastIncludeContent();
|
3062
|
+
scope.$emit('$includeContentError', src);
|
3063
|
+
}
|
3064
|
+
});
|
3065
|
+
scope.$emit('$includeContentRequested', src);
|
3066
|
+
} else {
|
3067
|
+
cleanupLastIncludeContent();
|
3068
|
+
}
|
3069
|
+
});
|
3070
|
+
|
3071
|
+
scope.$on('$destroy', cleanupLastIncludeContent);
|
3072
|
+
}
|
3073
|
+
};
|
3074
|
+
}])
|
3075
|
+
|
3076
|
+
/**
|
3077
|
+
* Note that it's intentional that these classes are *not* applied through $animate.
|
3078
|
+
* They must not be animated as they're expected to be present on the tooltip on
|
3079
|
+
* initialization.
|
3080
|
+
*/
|
3081
|
+
.directive('tooltipClasses', function () {
|
3082
|
+
return {
|
3083
|
+
restrict: 'A',
|
3084
|
+
link: function (scope, element, attrs) {
|
3085
|
+
if (scope.placement) {
|
3086
|
+
element.addClass(scope.placement);
|
3087
|
+
}
|
3088
|
+
if (scope.popupClass) {
|
3089
|
+
element.addClass(scope.popupClass);
|
3090
|
+
}
|
3091
|
+
if (scope.animation()) {
|
3092
|
+
element.addClass(attrs.tooltipAnimationClass);
|
3093
|
+
}
|
3094
|
+
}
|
3095
|
+
};
|
3096
|
+
})
|
3097
|
+
|
2682
3098
|
.directive( 'tooltipPopup', function () {
|
2683
3099
|
return {
|
2684
3100
|
restrict: 'EA',
|
2685
3101
|
replace: true,
|
2686
|
-
scope: { content: '@', placement: '@', animation: '&', isOpen: '&' },
|
3102
|
+
scope: { content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
|
2687
3103
|
templateUrl: 'template/tooltip/tooltip-popup.html'
|
2688
3104
|
};
|
2689
3105
|
})
|
@@ -2692,16 +3108,56 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2692
3108
|
return $tooltip( 'tooltip', 'tooltip', 'mouseenter' );
|
2693
3109
|
}])
|
2694
3110
|
|
3111
|
+
.directive( 'tooltipTemplatePopup', function () {
|
3112
|
+
return {
|
3113
|
+
restrict: 'EA',
|
3114
|
+
replace: true,
|
3115
|
+
scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
|
3116
|
+
originScope: '&' },
|
3117
|
+
templateUrl: 'template/tooltip/tooltip-template-popup.html'
|
3118
|
+
};
|
3119
|
+
})
|
3120
|
+
|
3121
|
+
.directive( 'tooltipTemplate', [ '$tooltip', function ( $tooltip ) {
|
3122
|
+
return $tooltip('tooltipTemplate', 'tooltip', 'mouseenter', {
|
3123
|
+
useContentExp: true
|
3124
|
+
});
|
3125
|
+
}])
|
3126
|
+
|
3127
|
+
.directive( 'tooltipHtmlPopup', function () {
|
3128
|
+
return {
|
3129
|
+
restrict: 'EA',
|
3130
|
+
replace: true,
|
3131
|
+
scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
|
3132
|
+
templateUrl: 'template/tooltip/tooltip-html-popup.html'
|
3133
|
+
};
|
3134
|
+
})
|
3135
|
+
|
3136
|
+
.directive( 'tooltipHtml', [ '$tooltip', function ( $tooltip ) {
|
3137
|
+
return $tooltip('tooltipHtml', 'tooltip', 'mouseenter', {
|
3138
|
+
useContentExp: true
|
3139
|
+
});
|
3140
|
+
}])
|
3141
|
+
|
3142
|
+
/*
|
3143
|
+
Deprecated
|
3144
|
+
*/
|
2695
3145
|
.directive( 'tooltipHtmlUnsafePopup', function () {
|
2696
3146
|
return {
|
2697
3147
|
restrict: 'EA',
|
2698
3148
|
replace: true,
|
2699
|
-
scope: { content: '@', placement: '@', animation: '&', isOpen: '&' },
|
3149
|
+
scope: { content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
|
2700
3150
|
templateUrl: 'template/tooltip/tooltip-html-unsafe-popup.html'
|
2701
3151
|
};
|
2702
3152
|
})
|
2703
3153
|
|
2704
|
-
.
|
3154
|
+
.value('tooltipHtmlUnsafeSuppressDeprecated', false)
|
3155
|
+
.directive( 'tooltipHtmlUnsafe', [
|
3156
|
+
'$tooltip', 'tooltipHtmlUnsafeSuppressDeprecated', '$log',
|
3157
|
+
function ( $tooltip , tooltipHtmlUnsafeSuppressDeprecated , $log) {
|
3158
|
+
if (!tooltipHtmlUnsafeSuppressDeprecated) {
|
3159
|
+
$log.warn('tooltip-html-unsafe is now deprecated. Use tooltip-html or tooltip-template instead.');
|
3160
|
+
}
|
2705
3161
|
return $tooltip( 'tooltipHtmlUnsafe', 'tooltip', 'mouseenter' );
|
2706
3162
|
}]);
|
2707
3163
|
|
@@ -2712,11 +3168,27 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2712
3168
|
*/
|
2713
3169
|
angular.module( 'ui.bootstrap.popover', [ 'ui.bootstrap.tooltip' ] )
|
2714
3170
|
|
3171
|
+
.directive( 'popoverTemplatePopup', function () {
|
3172
|
+
return {
|
3173
|
+
restrict: 'EA',
|
3174
|
+
replace: true,
|
3175
|
+
scope: { title: '@', contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
|
3176
|
+
originScope: '&' },
|
3177
|
+
templateUrl: 'template/popover/popover-template.html'
|
3178
|
+
};
|
3179
|
+
})
|
3180
|
+
|
3181
|
+
.directive( 'popoverTemplate', [ '$tooltip', function ( $tooltip ) {
|
3182
|
+
return $tooltip( 'popoverTemplate', 'popover', 'click', {
|
3183
|
+
useContentExp: true
|
3184
|
+
} );
|
3185
|
+
}])
|
3186
|
+
|
2715
3187
|
.directive( 'popoverPopup', function () {
|
2716
3188
|
return {
|
2717
3189
|
restrict: 'EA',
|
2718
3190
|
replace: true,
|
2719
|
-
scope: { title: '@', content: '@', placement: '@', animation: '&', isOpen: '&' },
|
3191
|
+
scope: { title: '@', content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
|
2720
3192
|
templateUrl: 'template/popover/popover.html'
|
2721
3193
|
};
|
2722
3194
|
})
|
@@ -2737,7 +3209,7 @@ angular.module('ui.bootstrap.progressbar', [])
|
|
2737
3209
|
animate = angular.isDefined($attrs.animate) ? $scope.$parent.$eval($attrs.animate) : progressConfig.animate;
|
2738
3210
|
|
2739
3211
|
this.bars = [];
|
2740
|
-
$scope.max = angular.isDefined($
|
3212
|
+
$scope.max = angular.isDefined($scope.max) ? $scope.max : progressConfig.max;
|
2741
3213
|
|
2742
3214
|
this.addBar = function(bar, element) {
|
2743
3215
|
if ( !animate ) {
|
@@ -2781,6 +3253,7 @@ angular.module('ui.bootstrap.progressbar', [])
|
|
2781
3253
|
require: '^progress',
|
2782
3254
|
scope: {
|
2783
3255
|
value: '=',
|
3256
|
+
max: '=?',
|
2784
3257
|
type: '@'
|
2785
3258
|
},
|
2786
3259
|
templateUrl: 'template/progressbar/bar.html',
|
@@ -2798,6 +3271,7 @@ angular.module('ui.bootstrap.progressbar', [])
|
|
2798
3271
|
controller: 'ProgressController',
|
2799
3272
|
scope: {
|
2800
3273
|
value: '=',
|
3274
|
+
max: '=?',
|
2801
3275
|
type: '@'
|
2802
3276
|
},
|
2803
3277
|
templateUrl: 'template/progressbar/progressbar.html',
|
@@ -2806,6 +3280,7 @@ angular.module('ui.bootstrap.progressbar', [])
|
|
2806
3280
|
}
|
2807
3281
|
};
|
2808
3282
|
});
|
3283
|
+
|
2809
3284
|
angular.module('ui.bootstrap.rating', [])
|
2810
3285
|
|
2811
3286
|
.constant('ratingConfig', {
|
@@ -2821,6 +3296,13 @@ angular.module('ui.bootstrap.rating', [])
|
|
2821
3296
|
ngModelCtrl = ngModelCtrl_;
|
2822
3297
|
ngModelCtrl.$render = this.render;
|
2823
3298
|
|
3299
|
+
ngModelCtrl.$formatters.push(function(value) {
|
3300
|
+
if (angular.isNumber(value) && value << 0 !== value) {
|
3301
|
+
value = Math.round(value);
|
3302
|
+
}
|
3303
|
+
return value;
|
3304
|
+
});
|
3305
|
+
|
2824
3306
|
this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn;
|
2825
3307
|
this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff;
|
2826
3308
|
|
@@ -2882,10 +3364,7 @@ angular.module('ui.bootstrap.rating', [])
|
|
2882
3364
|
replace: true,
|
2883
3365
|
link: function(scope, element, attrs, ctrls) {
|
2884
3366
|
var ratingCtrl = ctrls[0], ngModelCtrl = ctrls[1];
|
2885
|
-
|
2886
|
-
if ( ngModelCtrl ) {
|
2887
|
-
ratingCtrl.init( ngModelCtrl );
|
2888
|
-
}
|
3367
|
+
ratingCtrl.init( ngModelCtrl );
|
2889
3368
|
}
|
2890
3369
|
};
|
2891
3370
|
});
|
@@ -2919,23 +3398,31 @@ angular.module('ui.bootstrap.tabs', [])
|
|
2919
3398
|
tabs.push(tab);
|
2920
3399
|
// we can't run the select function on the first tab
|
2921
3400
|
// since that would select it twice
|
2922
|
-
if (tabs.length === 1) {
|
3401
|
+
if (tabs.length === 1 && tab.active !== false) {
|
2923
3402
|
tab.active = true;
|
2924
3403
|
} else if (tab.active) {
|
2925
3404
|
ctrl.select(tab);
|
2926
3405
|
}
|
3406
|
+
else {
|
3407
|
+
tab.active = false;
|
3408
|
+
}
|
2927
3409
|
};
|
2928
3410
|
|
2929
3411
|
ctrl.removeTab = function removeTab(tab) {
|
2930
3412
|
var index = tabs.indexOf(tab);
|
2931
|
-
//Select a new tab if the tab to be removed is selected
|
2932
|
-
if (tab.active && tabs.length > 1) {
|
3413
|
+
//Select a new tab if the tab to be removed is selected and not destroyed
|
3414
|
+
if (tab.active && tabs.length > 1 && !destroyed) {
|
2933
3415
|
//If this is the last tab, select the previous tab. else, the next tab.
|
2934
3416
|
var newActiveIndex = index == tabs.length - 1 ? index - 1 : index + 1;
|
2935
3417
|
ctrl.select(tabs[newActiveIndex]);
|
2936
3418
|
}
|
2937
3419
|
tabs.splice(index, 1);
|
2938
3420
|
};
|
3421
|
+
|
3422
|
+
var destroyed;
|
3423
|
+
$scope.$on('$destroy', function() {
|
3424
|
+
destroyed = true;
|
3425
|
+
});
|
2939
3426
|
}])
|
2940
3427
|
|
2941
3428
|
/**
|
@@ -3065,7 +3552,7 @@ angular.module('ui.bootstrap.tabs', [])
|
|
3065
3552
|
</file>
|
3066
3553
|
</example>
|
3067
3554
|
*/
|
3068
|
-
.directive('tab', ['$parse', function($parse) {
|
3555
|
+
.directive('tab', ['$parse', '$log', function($parse, $log) {
|
3069
3556
|
return {
|
3070
3557
|
require: '^tabset',
|
3071
3558
|
restrict: 'EA',
|
@@ -3091,7 +3578,18 @@ angular.module('ui.bootstrap.tabs', [])
|
|
3091
3578
|
});
|
3092
3579
|
|
3093
3580
|
scope.disabled = false;
|
3581
|
+
if ( attrs.disable ) {
|
3582
|
+
scope.$parent.$watch($parse(attrs.disable), function(value) {
|
3583
|
+
scope.disabled = !! value;
|
3584
|
+
});
|
3585
|
+
}
|
3586
|
+
|
3587
|
+
// Deprecation support of "disabled" parameter
|
3588
|
+
// fix(tab): IE9 disabled attr renders grey text on enabled tab #2677
|
3589
|
+
// This code is duplicated from the lines above to make it easy to remove once
|
3590
|
+
// the feature has been completely deprecated
|
3094
3591
|
if ( attrs.disabled ) {
|
3592
|
+
$log.warn('Use of "disabled" attribute has been deprecated, please use "disable"');
|
3095
3593
|
scope.$parent.$watch($parse(attrs.disabled), function(value) {
|
3096
3594
|
scope.disabled = !! value;
|
3097
3595
|
});
|
@@ -3172,7 +3670,8 @@ angular.module('ui.bootstrap.timepicker', [])
|
|
3172
3670
|
showMeridian: true,
|
3173
3671
|
meridians: null,
|
3174
3672
|
readonlyInput: false,
|
3175
|
-
mousewheel: true
|
3673
|
+
mousewheel: true,
|
3674
|
+
arrowkeys: true
|
3176
3675
|
})
|
3177
3676
|
|
3178
3677
|
.controller('TimepickerController', ['$scope', '$attrs', '$parse', '$log', '$locale', 'timepickerConfig', function($scope, $attrs, $parse, $log, $locale, timepickerConfig) {
|
@@ -3184,6 +3683,10 @@ angular.module('ui.bootstrap.timepicker', [])
|
|
3184
3683
|
ngModelCtrl = ngModelCtrl_;
|
3185
3684
|
ngModelCtrl.$render = this.render;
|
3186
3685
|
|
3686
|
+
ngModelCtrl.$formatters.unshift(function (modelValue) {
|
3687
|
+
return modelValue ? new Date( modelValue ) : null;
|
3688
|
+
});
|
3689
|
+
|
3187
3690
|
var hoursInputEl = inputs.eq(0),
|
3188
3691
|
minutesInputEl = inputs.eq(1);
|
3189
3692
|
|
@@ -3192,6 +3695,11 @@ angular.module('ui.bootstrap.timepicker', [])
|
|
3192
3695
|
this.setupMousewheelEvents( hoursInputEl, minutesInputEl );
|
3193
3696
|
}
|
3194
3697
|
|
3698
|
+
var arrowkeys = angular.isDefined($attrs.arrowkeys) ? $scope.$parent.$eval($attrs.arrowkeys) : timepickerConfig.arrowkeys;
|
3699
|
+
if (arrowkeys) {
|
3700
|
+
this.setupArrowkeyEvents( hoursInputEl, minutesInputEl );
|
3701
|
+
}
|
3702
|
+
|
3195
3703
|
$scope.readonlyInput = angular.isDefined($attrs.readonlyInput) ? $scope.$parent.$eval($attrs.readonlyInput) : timepickerConfig.readonlyInput;
|
3196
3704
|
this.setupInputEvents( hoursInputEl, minutesInputEl );
|
3197
3705
|
};
|
@@ -3254,7 +3762,7 @@ angular.module('ui.bootstrap.timepicker', [])
|
|
3254
3762
|
}
|
3255
3763
|
|
3256
3764
|
function pad( value ) {
|
3257
|
-
return ( angular.isDefined(value) && value.toString().length < 2 ) ? '0' + value : value;
|
3765
|
+
return ( angular.isDefined(value) && value.toString().length < 2 ) ? '0' + value : value.toString();
|
3258
3766
|
}
|
3259
3767
|
|
3260
3768
|
// Respond on mousewheel spin
|
@@ -3280,6 +3788,35 @@ angular.module('ui.bootstrap.timepicker', [])
|
|
3280
3788
|
|
3281
3789
|
};
|
3282
3790
|
|
3791
|
+
// Respond on up/down arrowkeys
|
3792
|
+
this.setupArrowkeyEvents = function( hoursInputEl, minutesInputEl ) {
|
3793
|
+
hoursInputEl.bind('keydown', function(e) {
|
3794
|
+
if ( e.which === 38 ) { // up
|
3795
|
+
e.preventDefault();
|
3796
|
+
$scope.incrementHours();
|
3797
|
+
$scope.$apply();
|
3798
|
+
}
|
3799
|
+
else if ( e.which === 40 ) { // down
|
3800
|
+
e.preventDefault();
|
3801
|
+
$scope.decrementHours();
|
3802
|
+
$scope.$apply();
|
3803
|
+
}
|
3804
|
+
});
|
3805
|
+
|
3806
|
+
minutesInputEl.bind('keydown', function(e) {
|
3807
|
+
if ( e.which === 38 ) { // up
|
3808
|
+
e.preventDefault();
|
3809
|
+
$scope.incrementMinutes();
|
3810
|
+
$scope.$apply();
|
3811
|
+
}
|
3812
|
+
else if ( e.which === 40 ) { // down
|
3813
|
+
e.preventDefault();
|
3814
|
+
$scope.decrementMinutes();
|
3815
|
+
$scope.$apply();
|
3816
|
+
}
|
3817
|
+
});
|
3818
|
+
};
|
3819
|
+
|
3283
3820
|
this.setupInputEvents = function( hoursInputEl, minutesInputEl ) {
|
3284
3821
|
if ( $scope.readonlyInput ) {
|
3285
3822
|
$scope.updateHours = angular.noop;
|
@@ -3339,7 +3876,7 @@ angular.module('ui.bootstrap.timepicker', [])
|
|
3339
3876
|
};
|
3340
3877
|
|
3341
3878
|
this.render = function() {
|
3342
|
-
var date = ngModelCtrl.$
|
3879
|
+
var date = ngModelCtrl.$viewValue;
|
3343
3880
|
|
3344
3881
|
if ( isNaN(date) ) {
|
3345
3882
|
ngModelCtrl.$setValidity('time', false);
|
@@ -3374,7 +3911,9 @@ angular.module('ui.bootstrap.timepicker', [])
|
|
3374
3911
|
}
|
3375
3912
|
|
3376
3913
|
$scope.hours = keyboardChange === 'h' ? hours : pad(hours);
|
3377
|
-
|
3914
|
+
if (keyboardChange !== 'm') {
|
3915
|
+
$scope.minutes = pad(minutes);
|
3916
|
+
}
|
3378
3917
|
$scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];
|
3379
3918
|
}
|
3380
3919
|
|
@@ -3419,6 +3958,96 @@ angular.module('ui.bootstrap.timepicker', [])
|
|
3419
3958
|
};
|
3420
3959
|
});
|
3421
3960
|
|
3961
|
+
angular.module('ui.bootstrap.transition', [])
|
3962
|
+
|
3963
|
+
.value('$transitionSuppressDeprecated', false)
|
3964
|
+
/**
|
3965
|
+
* $transition service provides a consistent interface to trigger CSS 3 transitions and to be informed when they complete.
|
3966
|
+
* @param {DOMElement} element The DOMElement that will be animated.
|
3967
|
+
* @param {string|object|function} trigger The thing that will cause the transition to start:
|
3968
|
+
* - As a string, it represents the css class to be added to the element.
|
3969
|
+
* - As an object, it represents a hash of style attributes to be applied to the element.
|
3970
|
+
* - As a function, it represents a function to be called that will cause the transition to occur.
|
3971
|
+
* @return {Promise} A promise that is resolved when the transition finishes.
|
3972
|
+
*/
|
3973
|
+
.factory('$transition', [
|
3974
|
+
'$q', '$timeout', '$rootScope', '$log', '$transitionSuppressDeprecated',
|
3975
|
+
function($q , $timeout , $rootScope , $log , $transitionSuppressDeprecated) {
|
3976
|
+
|
3977
|
+
if (!$transitionSuppressDeprecated) {
|
3978
|
+
$log.warn('$transition is now deprecated. Use $animate from ngAnimate instead.');
|
3979
|
+
}
|
3980
|
+
|
3981
|
+
var $transition = function(element, trigger, options) {
|
3982
|
+
options = options || {};
|
3983
|
+
var deferred = $q.defer();
|
3984
|
+
var endEventName = $transition[options.animation ? 'animationEndEventName' : 'transitionEndEventName'];
|
3985
|
+
|
3986
|
+
var transitionEndHandler = function(event) {
|
3987
|
+
$rootScope.$apply(function() {
|
3988
|
+
element.unbind(endEventName, transitionEndHandler);
|
3989
|
+
deferred.resolve(element);
|
3990
|
+
});
|
3991
|
+
};
|
3992
|
+
|
3993
|
+
if (endEventName) {
|
3994
|
+
element.bind(endEventName, transitionEndHandler);
|
3995
|
+
}
|
3996
|
+
|
3997
|
+
// Wrap in a timeout to allow the browser time to update the DOM before the transition is to occur
|
3998
|
+
$timeout(function() {
|
3999
|
+
if ( angular.isString(trigger) ) {
|
4000
|
+
element.addClass(trigger);
|
4001
|
+
} else if ( angular.isFunction(trigger) ) {
|
4002
|
+
trigger(element);
|
4003
|
+
} else if ( angular.isObject(trigger) ) {
|
4004
|
+
element.css(trigger);
|
4005
|
+
}
|
4006
|
+
//If browser does not support transitions, instantly resolve
|
4007
|
+
if ( !endEventName ) {
|
4008
|
+
deferred.resolve(element);
|
4009
|
+
}
|
4010
|
+
});
|
4011
|
+
|
4012
|
+
// Add our custom cancel function to the promise that is returned
|
4013
|
+
// We can call this if we are about to run a new transition, which we know will prevent this transition from ending,
|
4014
|
+
// i.e. it will therefore never raise a transitionEnd event for that transition
|
4015
|
+
deferred.promise.cancel = function() {
|
4016
|
+
if ( endEventName ) {
|
4017
|
+
element.unbind(endEventName, transitionEndHandler);
|
4018
|
+
}
|
4019
|
+
deferred.reject('Transition cancelled');
|
4020
|
+
};
|
4021
|
+
|
4022
|
+
return deferred.promise;
|
4023
|
+
};
|
4024
|
+
|
4025
|
+
// Work out the name of the transitionEnd event
|
4026
|
+
var transElement = document.createElement('trans');
|
4027
|
+
var transitionEndEventNames = {
|
4028
|
+
'WebkitTransition': 'webkitTransitionEnd',
|
4029
|
+
'MozTransition': 'transitionend',
|
4030
|
+
'OTransition': 'oTransitionEnd',
|
4031
|
+
'transition': 'transitionend'
|
4032
|
+
};
|
4033
|
+
var animationEndEventNames = {
|
4034
|
+
'WebkitTransition': 'webkitAnimationEnd',
|
4035
|
+
'MozTransition': 'animationend',
|
4036
|
+
'OTransition': 'oAnimationEnd',
|
4037
|
+
'transition': 'animationend'
|
4038
|
+
};
|
4039
|
+
function findEndEventName(endEventNames) {
|
4040
|
+
for (var name in endEventNames){
|
4041
|
+
if (transElement.style[name] !== undefined) {
|
4042
|
+
return endEventNames[name];
|
4043
|
+
}
|
4044
|
+
}
|
4045
|
+
}
|
4046
|
+
$transition.transitionEndEventName = findEndEventName(transitionEndEventNames);
|
4047
|
+
$transition.animationEndEventName = findEndEventName(animationEndEventNames);
|
4048
|
+
return $transition;
|
4049
|
+
}]);
|
4050
|
+
|
3422
4051
|
angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap.bindHtml'])
|
3423
4052
|
|
3424
4053
|
/**
|
@@ -3428,7 +4057,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3428
4057
|
.factory('typeaheadParser', ['$parse', function ($parse) {
|
3429
4058
|
|
3430
4059
|
// 00000111000000000000022200000000000000003333333333333330000000000044000
|
3431
|
-
var TYPEAHEAD_REGEXP = /^\s*(
|
4060
|
+
var TYPEAHEAD_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;
|
3432
4061
|
|
3433
4062
|
return {
|
3434
4063
|
parse:function (input) {
|
@@ -3464,7 +4093,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3464
4093
|
//minimal no of characters that needs to be entered before typeahead kicks-in
|
3465
4094
|
var minSearch = originalScope.$eval(attrs.typeaheadMinLength) || 1;
|
3466
4095
|
|
3467
|
-
//minimal wait time after last character typed before
|
4096
|
+
//minimal wait time after last character typed before typeahead kicks-in
|
3468
4097
|
var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0;
|
3469
4098
|
|
3470
4099
|
//should it restrict model values to the ones selected from the popup only?
|
@@ -3480,6 +4109,8 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3480
4109
|
|
3481
4110
|
var appendToBody = attrs.typeaheadAppendToBody ? originalScope.$eval(attrs.typeaheadAppendToBody) : false;
|
3482
4111
|
|
4112
|
+
var focusFirst = originalScope.$eval(attrs.typeaheadFocusFirst) !== false;
|
4113
|
+
|
3483
4114
|
//INTERNAL VARIABLES
|
3484
4115
|
|
3485
4116
|
//model setter executed upon match selection
|
@@ -3550,9 +4181,9 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3550
4181
|
//but we are interested only in responses that correspond to the current view value
|
3551
4182
|
var onCurrentRequest = (inputValue === modelCtrl.$viewValue);
|
3552
4183
|
if (onCurrentRequest && hasFocus) {
|
3553
|
-
if (matches.length > 0) {
|
4184
|
+
if (matches && matches.length > 0) {
|
3554
4185
|
|
3555
|
-
scope.activeIdx = 0;
|
4186
|
+
scope.activeIdx = focusFirst ? 0 : -1;
|
3556
4187
|
scope.matches.length = 0;
|
3557
4188
|
|
3558
4189
|
//transform labels
|
@@ -3591,9 +4222,21 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3591
4222
|
//we need to propagate user's query so we can higlight matches
|
3592
4223
|
scope.query = undefined;
|
3593
4224
|
|
3594
|
-
//Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later
|
4225
|
+
//Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later
|
3595
4226
|
var timeoutPromise;
|
3596
4227
|
|
4228
|
+
var scheduleSearchWithTimeout = function(inputValue) {
|
4229
|
+
timeoutPromise = $timeout(function () {
|
4230
|
+
getMatchesAsync(inputValue);
|
4231
|
+
}, waitTime);
|
4232
|
+
};
|
4233
|
+
|
4234
|
+
var cancelPreviousTimeout = function() {
|
4235
|
+
if (timeoutPromise) {
|
4236
|
+
$timeout.cancel(timeoutPromise);
|
4237
|
+
}
|
4238
|
+
};
|
4239
|
+
|
3597
4240
|
//plug into $parsers pipeline to open a typeahead on view changes initiated from DOM
|
3598
4241
|
//$parsers kick-in on all the changes coming from the view as well as manually triggered by $setViewValue
|
3599
4242
|
modelCtrl.$parsers.unshift(function (inputValue) {
|
@@ -3602,17 +4245,14 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3602
4245
|
|
3603
4246
|
if (inputValue && inputValue.length >= minSearch) {
|
3604
4247
|
if (waitTime > 0) {
|
3605
|
-
|
3606
|
-
|
3607
|
-
}
|
3608
|
-
timeoutPromise = $timeout(function () {
|
3609
|
-
getMatchesAsync(inputValue);
|
3610
|
-
}, waitTime);
|
4248
|
+
cancelPreviousTimeout();
|
4249
|
+
scheduleSearchWithTimeout(inputValue);
|
3611
4250
|
} else {
|
3612
4251
|
getMatchesAsync(inputValue);
|
3613
4252
|
}
|
3614
4253
|
} else {
|
3615
4254
|
isLoadingSetter(originalScope, false);
|
4255
|
+
cancelPreviousTimeout();
|
3616
4256
|
resetMatches();
|
3617
4257
|
}
|
3618
4258
|
|
@@ -3635,9 +4275,16 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3635
4275
|
var candidateViewValue, emptyViewValue;
|
3636
4276
|
var locals = {};
|
3637
4277
|
|
4278
|
+
// The validity may be set to false via $parsers (see above) if
|
4279
|
+
// the model is restricted to selected values. If the model
|
4280
|
+
// is set manually it is considered to be valid.
|
4281
|
+
if (!isEditable) {
|
4282
|
+
modelCtrl.$setValidity('editable', true);
|
4283
|
+
}
|
4284
|
+
|
3638
4285
|
if (inputFormatter) {
|
3639
4286
|
|
3640
|
-
locals
|
4287
|
+
locals.$model = modelValue;
|
3641
4288
|
return inputFormatter(originalScope, locals);
|
3642
4289
|
|
3643
4290
|
} else {
|
@@ -3662,6 +4309,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3662
4309
|
model = parserResult.modelMapper(originalScope, locals);
|
3663
4310
|
$setModelValue(originalScope, model);
|
3664
4311
|
modelCtrl.$setValidity('editable', true);
|
4312
|
+
modelCtrl.$setValidity('parse', true);
|
3665
4313
|
|
3666
4314
|
onSelectCallback(originalScope, {
|
3667
4315
|
$item: item,
|
@@ -3684,6 +4332,11 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3684
4332
|
return;
|
3685
4333
|
}
|
3686
4334
|
|
4335
|
+
// if there's nothing selected (i.e. focusFirst) and enter is hit, don't do anything
|
4336
|
+
if (scope.activeIdx == -1 && (evt.which === 13 || evt.which === 9)) {
|
4337
|
+
return;
|
4338
|
+
}
|
4339
|
+
|
3687
4340
|
evt.preventDefault();
|
3688
4341
|
|
3689
4342
|
if (evt.which === 40) {
|
@@ -3691,7 +4344,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3691
4344
|
scope.$digest();
|
3692
4345
|
|
3693
4346
|
} else if (evt.which === 38) {
|
3694
|
-
scope.activeIdx = (scope.activeIdx ? scope.activeIdx : scope.matches.length) - 1;
|
4347
|
+
scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
|
3695
4348
|
scope.$digest();
|
3696
4349
|
|
3697
4350
|
} else if (evt.which === 13 || evt.which === 9) {
|
@@ -3723,10 +4376,16 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3723
4376
|
|
3724
4377
|
originalScope.$on('$destroy', function(){
|
3725
4378
|
$document.unbind('click', dismissClickHandler);
|
4379
|
+
if (appendToBody) {
|
4380
|
+
$popup.remove();
|
4381
|
+
}
|
4382
|
+
// Prevent jQuery cache memory leak
|
4383
|
+
popUpEl.remove();
|
3726
4384
|
});
|
3727
4385
|
|
3728
4386
|
var $popup = $compile(popUpEl)(scope);
|
3729
|
-
|
4387
|
+
|
4388
|
+
if (appendToBody) {
|
3730
4389
|
$document.find('body').append($popup);
|
3731
4390
|
} else {
|
3732
4391
|
element.after($popup);
|
@@ -3771,7 +4430,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3771
4430
|
};
|
3772
4431
|
})
|
3773
4432
|
|
3774
|
-
.directive('typeaheadMatch', ['$
|
4433
|
+
.directive('typeaheadMatch', ['$templateRequest', '$compile', '$parse', function ($templateRequest, $compile, $parse) {
|
3775
4434
|
return {
|
3776
4435
|
restrict:'EA',
|
3777
4436
|
scope:{
|
@@ -3781,8 +4440,10 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3781
4440
|
},
|
3782
4441
|
link:function (scope, element, attrs) {
|
3783
4442
|
var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'template/typeahead/typeahead-match.html';
|
3784
|
-
$
|
3785
|
-
|
4443
|
+
$templateRequest(tplUrl).then(function(tplContent) {
|
4444
|
+
$compile(tplContent.trim())(scope, function(clonedElement){
|
4445
|
+
element.replaceWith(clonedElement);
|
4446
|
+
});
|
3786
4447
|
});
|
3787
4448
|
}
|
3788
4449
|
};
|
@@ -3804,13 +4465,14 @@ angular.module("template/accordion/accordion-group.html", []).run(["$templateCac
|
|
3804
4465
|
"<div class=\"panel panel-default\">\n" +
|
3805
4466
|
" <div class=\"panel-heading\">\n" +
|
3806
4467
|
" <h4 class=\"panel-title\">\n" +
|
3807
|
-
" <a class=\"accordion-toggle\" ng-click=\"toggleOpen()\" accordion-transclude=\"heading\"><span ng-class=\"{'text-muted': isDisabled}\">{{heading}}</span></a>\n" +
|
4468
|
+
" <a href=\"javascript:void(0)\" tabindex=\"0\" class=\"accordion-toggle\" ng-click=\"toggleOpen()\" accordion-transclude=\"heading\"><span ng-class=\"{'text-muted': isDisabled}\">{{heading}}</span></a>\n" +
|
3808
4469
|
" </h4>\n" +
|
3809
4470
|
" </div>\n" +
|
3810
|
-
" <div class=\"panel-collapse\" collapse=\"!isOpen\">\n" +
|
4471
|
+
" <div class=\"panel-collapse collapse\" collapse=\"!isOpen\">\n" +
|
3811
4472
|
" <div class=\"panel-body\" ng-transclude></div>\n" +
|
3812
4473
|
" </div>\n" +
|
3813
|
-
"</div
|
4474
|
+
"</div>\n" +
|
4475
|
+
"");
|
3814
4476
|
}]);
|
3815
4477
|
|
3816
4478
|
angular.module("template/accordion/accordion.html", []).run(["$templateCache", function($templateCache) {
|
@@ -3820,7 +4482,7 @@ angular.module("template/accordion/accordion.html", []).run(["$templateCache", f
|
|
3820
4482
|
|
3821
4483
|
angular.module("template/alert/alert.html", []).run(["$templateCache", function($templateCache) {
|
3822
4484
|
$templateCache.put("template/alert/alert.html",
|
3823
|
-
"<div class=\"alert\" ng-class=\"
|
4485
|
+
"<div class=\"alert\" ng-class=\"['alert-' + (type || 'warning'), closeable ? 'alert-dismissable' : null]\" role=\"alert\">\n" +
|
3824
4486
|
" <button ng-show=\"closeable\" type=\"button\" class=\"close\" ng-click=\"close()\">\n" +
|
3825
4487
|
" <span aria-hidden=\"true\">×</span>\n" +
|
3826
4488
|
" <span class=\"sr-only\">Close</span>\n" +
|
@@ -3834,7 +4496,7 @@ angular.module("template/carousel/carousel.html", []).run(["$templateCache", fun
|
|
3834
4496
|
$templateCache.put("template/carousel/carousel.html",
|
3835
4497
|
"<div ng-mouseenter=\"pause()\" ng-mouseleave=\"play()\" class=\"carousel\" ng-swipe-right=\"prev()\" ng-swipe-left=\"next()\">\n" +
|
3836
4498
|
" <ol class=\"carousel-indicators\" ng-show=\"slides.length > 1\">\n" +
|
3837
|
-
" <li ng-repeat=\"slide in slides track by $index\" ng-class=\"{active: isActive(slide)}\" ng-click=\"select(slide)\"></li>\n" +
|
4499
|
+
" <li ng-repeat=\"slide in slides | orderBy:'index' track by $index\" ng-class=\"{active: isActive(slide)}\" ng-click=\"select(slide)\"></li>\n" +
|
3838
4500
|
" </ol>\n" +
|
3839
4501
|
" <div class=\"carousel-inner\" ng-transclude></div>\n" +
|
3840
4502
|
" <a class=\"left carousel-control\" ng-click=\"prev()\" ng-show=\"slides.length > 1\"><span class=\"glyphicon glyphicon-chevron-left\"></span></a>\n" +
|
@@ -3846,11 +4508,7 @@ angular.module("template/carousel/carousel.html", []).run(["$templateCache", fun
|
|
3846
4508
|
angular.module("template/carousel/slide.html", []).run(["$templateCache", function($templateCache) {
|
3847
4509
|
$templateCache.put("template/carousel/slide.html",
|
3848
4510
|
"<div ng-class=\"{\n" +
|
3849
|
-
" 'active':
|
3850
|
-
" 'prev': (next || active) && direction=='prev',\n" +
|
3851
|
-
" 'next': (next || active) && direction=='next',\n" +
|
3852
|
-
" 'right': direction=='prev',\n" +
|
3853
|
-
" 'left': direction=='next'\n" +
|
4511
|
+
" 'active': active\n" +
|
3854
4512
|
" }\" class=\"item text-center\" ng-transclude></div>\n" +
|
3855
4513
|
"");
|
3856
4514
|
}]);
|
@@ -3870,7 +4528,7 @@ angular.module("template/datepicker/day.html", []).run(["$templateCache", functi
|
|
3870
4528
|
" <thead>\n" +
|
3871
4529
|
" <tr>\n" +
|
3872
4530
|
" <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-left\"></i></button></th>\n" +
|
3873
|
-
" <th colspan=\"{{5 + showWeeks}}\"><button id=\"{{uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm\" ng-click=\"toggleMode()\" tabindex=\"-1\" style=\"width:100%;\"><strong>{{title}}</strong></button></th>\n" +
|
4531
|
+
" <th colspan=\"{{5 + showWeeks}}\"><button id=\"{{uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm\" ng-click=\"toggleMode()\" ng-disabled=\"datepickerMode === maxMode\" tabindex=\"-1\" style=\"width:100%;\"><strong>{{title}}</strong></button></th>\n" +
|
3874
4532
|
" <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-right\"></i></button></th>\n" +
|
3875
4533
|
" </tr>\n" +
|
3876
4534
|
" <tr>\n" +
|
@@ -3881,7 +4539,7 @@ angular.module("template/datepicker/day.html", []).run(["$templateCache", functi
|
|
3881
4539
|
" <tbody>\n" +
|
3882
4540
|
" <tr ng-repeat=\"row in rows track by $index\">\n" +
|
3883
4541
|
" <td ng-show=\"showWeeks\" class=\"text-center h6\"><em>{{ weekNumbers[$index] }}</em></td>\n" +
|
3884
|
-
" <td ng-repeat=\"dt in row track by dt.date\" class=\"text-center\" role=\"gridcell\" id=\"{{dt.uid}}\" aria-disabled=\"{{!!dt.disabled}}\">\n" +
|
4542
|
+
" <td ng-repeat=\"dt in row track by dt.date\" class=\"text-center\" role=\"gridcell\" id=\"{{dt.uid}}\" aria-disabled=\"{{!!dt.disabled}}\" ng-class=\"dt.customClass\">\n" +
|
3885
4543
|
" <button type=\"button\" style=\"width:100%;\" class=\"btn btn-default btn-sm\" ng-class=\"{'btn-info': dt.selected, active: isActive(dt)}\" ng-click=\"select(dt.date)\" ng-disabled=\"dt.disabled\" tabindex=\"-1\"><span ng-class=\"{'text-muted': dt.secondary, 'text-info': dt.current}\">{{dt.label}}</span></button>\n" +
|
3886
4544
|
" </td>\n" +
|
3887
4545
|
" </tr>\n" +
|
@@ -3896,7 +4554,7 @@ angular.module("template/datepicker/month.html", []).run(["$templateCache", func
|
|
3896
4554
|
" <thead>\n" +
|
3897
4555
|
" <tr>\n" +
|
3898
4556
|
" <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-left\"></i></button></th>\n" +
|
3899
|
-
" <th><button id=\"{{uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm\" ng-click=\"toggleMode()\" tabindex=\"-1\" style=\"width:100%;\"><strong>{{title}}</strong></button></th>\n" +
|
4557
|
+
" <th><button id=\"{{uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm\" ng-click=\"toggleMode()\" ng-disabled=\"datepickerMode === maxMode\" tabindex=\"-1\" style=\"width:100%;\"><strong>{{title}}</strong></button></th>\n" +
|
3900
4558
|
" <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-right\"></i></button></th>\n" +
|
3901
4559
|
" </tr>\n" +
|
3902
4560
|
" </thead>\n" +
|
@@ -3916,7 +4574,7 @@ angular.module("template/datepicker/popup.html", []).run(["$templateCache", func
|
|
3916
4574
|
"<ul class=\"dropdown-menu\" ng-style=\"{display: (isOpen && 'block') || 'none', top: position.top+'px', left: position.left+'px'}\" ng-keydown=\"keydown($event)\">\n" +
|
3917
4575
|
" <li ng-transclude></li>\n" +
|
3918
4576
|
" <li ng-if=\"showButtonBar\" style=\"padding:10px 9px 2px\">\n" +
|
3919
|
-
" <span class=\"btn-group\">\n" +
|
4577
|
+
" <span class=\"btn-group pull-left\">\n" +
|
3920
4578
|
" <button type=\"button\" class=\"btn btn-sm btn-info\" ng-click=\"select('today')\">{{ getText('current') }}</button>\n" +
|
3921
4579
|
" <button type=\"button\" class=\"btn btn-sm btn-danger\" ng-click=\"select(null)\">{{ getText('clear') }}</button>\n" +
|
3922
4580
|
" </span>\n" +
|
@@ -3932,7 +4590,7 @@ angular.module("template/datepicker/year.html", []).run(["$templateCache", funct
|
|
3932
4590
|
" <thead>\n" +
|
3933
4591
|
" <tr>\n" +
|
3934
4592
|
" <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-left\"></i></button></th>\n" +
|
3935
|
-
" <th colspan=\"3\"><button id=\"{{uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm\" ng-click=\"toggleMode()\" tabindex=\"-1\" style=\"width:100%;\"><strong>{{title}}</strong></button></th>\n" +
|
4593
|
+
" <th colspan=\"3\"><button id=\"{{uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm\" ng-click=\"toggleMode()\" ng-disabled=\"datepickerMode === maxMode\" tabindex=\"-1\" style=\"width:100%;\"><strong>{{title}}</strong></button></th>\n" +
|
3936
4594
|
" <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-right\"></i></button></th>\n" +
|
3937
4595
|
" </tr>\n" +
|
3938
4596
|
" </thead>\n" +
|
@@ -3949,7 +4607,8 @@ angular.module("template/datepicker/year.html", []).run(["$templateCache", funct
|
|
3949
4607
|
|
3950
4608
|
angular.module("template/modal/backdrop.html", []).run(["$templateCache", function($templateCache) {
|
3951
4609
|
$templateCache.put("template/modal/backdrop.html",
|
3952
|
-
"<div class=\"modal-backdrop
|
4610
|
+
"<div class=\"modal-backdrop\"\n" +
|
4611
|
+
" modal-animation-class=\"fade\"\n" +
|
3953
4612
|
" ng-class=\"{in: animate}\"\n" +
|
3954
4613
|
" ng-style=\"{'z-index': 1040 + (index && 1 || 0) + index*10}\"\n" +
|
3955
4614
|
"></div>\n" +
|
@@ -3958,33 +4617,51 @@ angular.module("template/modal/backdrop.html", []).run(["$templateCache", functi
|
|
3958
4617
|
|
3959
4618
|
angular.module("template/modal/window.html", []).run(["$templateCache", function($templateCache) {
|
3960
4619
|
$templateCache.put("template/modal/window.html",
|
3961
|
-
"<div tabindex=\"-1\" role=\"dialog\" class=\"modal
|
3962
|
-
"
|
3963
|
-
"
|
4620
|
+
"<div modal-render=\"{{$isRendered}}\" tabindex=\"-1\" role=\"dialog\" class=\"modal\"\n" +
|
4621
|
+
" modal-animation-class=\"fade\"\n" +
|
4622
|
+
" ng-class=\"{in: animate}\" ng-style=\"{'z-index': 1050 + index*10, display: 'block'}\" ng-click=\"close($event)\">\n" +
|
4623
|
+
" <div class=\"modal-dialog\" ng-class=\"size ? 'modal-' + size : ''\"><div class=\"modal-content\" modal-transclude></div></div>\n" +
|
4624
|
+
"</div>\n" +
|
4625
|
+
"");
|
3964
4626
|
}]);
|
3965
4627
|
|
3966
4628
|
angular.module("template/pagination/pager.html", []).run(["$templateCache", function($templateCache) {
|
3967
4629
|
$templateCache.put("template/pagination/pager.html",
|
3968
4630
|
"<ul class=\"pager\">\n" +
|
3969
|
-
" <li ng-class=\"{disabled: noPrevious(), previous: align}\"><a href ng-click=\"selectPage(page - 1)\">{{getText('previous')}}</a></li>\n" +
|
3970
|
-
" <li ng-class=\"{disabled: noNext(), next: align}\"><a href ng-click=\"selectPage(page + 1)\">{{getText('next')}}</a></li>\n" +
|
4631
|
+
" <li ng-class=\"{disabled: noPrevious(), previous: align}\"><a href ng-click=\"selectPage(page - 1, $event)\">{{getText('previous')}}</a></li>\n" +
|
4632
|
+
" <li ng-class=\"{disabled: noNext(), next: align}\"><a href ng-click=\"selectPage(page + 1, $event)\">{{getText('next')}}</a></li>\n" +
|
3971
4633
|
"</ul>");
|
3972
4634
|
}]);
|
3973
4635
|
|
3974
4636
|
angular.module("template/pagination/pagination.html", []).run(["$templateCache", function($templateCache) {
|
3975
4637
|
$templateCache.put("template/pagination/pagination.html",
|
3976
4638
|
"<ul class=\"pagination\">\n" +
|
3977
|
-
" <li ng-if=\"boundaryLinks\" ng-class=\"{disabled: noPrevious()}\"><a href ng-click=\"selectPage(1)\">{{getText('first')}}</a></li>\n" +
|
3978
|
-
" <li ng-if=\"directionLinks\" ng-class=\"{disabled: noPrevious()}\"><a href ng-click=\"selectPage(page - 1)\">{{getText('previous')}}</a></li>\n" +
|
3979
|
-
" <li ng-repeat=\"page in pages track by $index\" ng-class=\"{active: page.active}\"><a href ng-click=\"selectPage(page.number)\">{{page.text}}</a></li>\n" +
|
3980
|
-
" <li ng-if=\"directionLinks\" ng-class=\"{disabled: noNext()}\"><a href ng-click=\"selectPage(page + 1)\">{{getText('next')}}</a></li>\n" +
|
3981
|
-
" <li ng-if=\"boundaryLinks\" ng-class=\"{disabled: noNext()}\"><a href ng-click=\"selectPage(totalPages)\">{{getText('last')}}</a></li>\n" +
|
4639
|
+
" <li ng-if=\"boundaryLinks\" ng-class=\"{disabled: noPrevious()}\"><a href ng-click=\"selectPage(1, $event)\">{{getText('first')}}</a></li>\n" +
|
4640
|
+
" <li ng-if=\"directionLinks\" ng-class=\"{disabled: noPrevious()}\"><a href ng-click=\"selectPage(page - 1, $event)\">{{getText('previous')}}</a></li>\n" +
|
4641
|
+
" <li ng-repeat=\"page in pages track by $index\" ng-class=\"{active: page.active}\"><a href ng-click=\"selectPage(page.number, $event)\">{{page.text}}</a></li>\n" +
|
4642
|
+
" <li ng-if=\"directionLinks\" ng-class=\"{disabled: noNext()}\"><a href ng-click=\"selectPage(page + 1, $event)\">{{getText('next')}}</a></li>\n" +
|
4643
|
+
" <li ng-if=\"boundaryLinks\" ng-class=\"{disabled: noNext()}\"><a href ng-click=\"selectPage(totalPages, $event)\">{{getText('last')}}</a></li>\n" +
|
3982
4644
|
"</ul>");
|
3983
4645
|
}]);
|
3984
4646
|
|
4647
|
+
angular.module("template/tooltip/tooltip-html-popup.html", []).run(["$templateCache", function($templateCache) {
|
4648
|
+
$templateCache.put("template/tooltip/tooltip-html-popup.html",
|
4649
|
+
"<div class=\"tooltip\"\n" +
|
4650
|
+
" tooltip-animation-class=\"fade\"\n" +
|
4651
|
+
" tooltip-classes\n" +
|
4652
|
+
" ng-class=\"{ in: isOpen() }\">\n" +
|
4653
|
+
" <div class=\"tooltip-arrow\"></div>\n" +
|
4654
|
+
" <div class=\"tooltip-inner\" ng-bind-html=\"contentExp()\"></div>\n" +
|
4655
|
+
"</div>\n" +
|
4656
|
+
"");
|
4657
|
+
}]);
|
4658
|
+
|
3985
4659
|
angular.module("template/tooltip/tooltip-html-unsafe-popup.html", []).run(["$templateCache", function($templateCache) {
|
3986
4660
|
$templateCache.put("template/tooltip/tooltip-html-unsafe-popup.html",
|
3987
|
-
"<div class=\"tooltip
|
4661
|
+
"<div class=\"tooltip\"\n" +
|
4662
|
+
" tooltip-animation-class=\"fade\"\n" +
|
4663
|
+
" tooltip-classes\n" +
|
4664
|
+
" ng-class=\"{ in: isOpen() }\">\n" +
|
3988
4665
|
" <div class=\"tooltip-arrow\"></div>\n" +
|
3989
4666
|
" <div class=\"tooltip-inner\" bind-html-unsafe=\"content\"></div>\n" +
|
3990
4667
|
"</div>\n" +
|
@@ -3993,20 +4670,71 @@ angular.module("template/tooltip/tooltip-html-unsafe-popup.html", []).run(["$tem
|
|
3993
4670
|
|
3994
4671
|
angular.module("template/tooltip/tooltip-popup.html", []).run(["$templateCache", function($templateCache) {
|
3995
4672
|
$templateCache.put("template/tooltip/tooltip-popup.html",
|
3996
|
-
"<div class=\"tooltip
|
4673
|
+
"<div class=\"tooltip\"\n" +
|
4674
|
+
" tooltip-animation-class=\"fade\"\n" +
|
4675
|
+
" tooltip-classes\n" +
|
4676
|
+
" ng-class=\"{ in: isOpen() }\">\n" +
|
3997
4677
|
" <div class=\"tooltip-arrow\"></div>\n" +
|
3998
4678
|
" <div class=\"tooltip-inner\" ng-bind=\"content\"></div>\n" +
|
3999
4679
|
"</div>\n" +
|
4000
4680
|
"");
|
4001
4681
|
}]);
|
4002
4682
|
|
4683
|
+
angular.module("template/tooltip/tooltip-template-popup.html", []).run(["$templateCache", function($templateCache) {
|
4684
|
+
$templateCache.put("template/tooltip/tooltip-template-popup.html",
|
4685
|
+
"<div class=\"tooltip\"\n" +
|
4686
|
+
" tooltip-animation-class=\"fade\"\n" +
|
4687
|
+
" tooltip-classes\n" +
|
4688
|
+
" ng-class=\"{ in: isOpen() }\">\n" +
|
4689
|
+
" <div class=\"tooltip-arrow\"></div>\n" +
|
4690
|
+
" <div class=\"tooltip-inner\"\n" +
|
4691
|
+
" tooltip-template-transclude=\"contentExp()\"\n" +
|
4692
|
+
" tooltip-template-transclude-scope=\"originScope()\"></div>\n" +
|
4693
|
+
"</div>\n" +
|
4694
|
+
"");
|
4695
|
+
}]);
|
4696
|
+
|
4697
|
+
angular.module("template/popover/popover-template.html", []).run(["$templateCache", function($templateCache) {
|
4698
|
+
$templateCache.put("template/popover/popover-template.html",
|
4699
|
+
"<div class=\"popover\"\n" +
|
4700
|
+
" tooltip-animation-class=\"fade\"\n" +
|
4701
|
+
" tooltip-classes\n" +
|
4702
|
+
" ng-class=\"{ in: isOpen() }\">\n" +
|
4703
|
+
" <div class=\"arrow\"></div>\n" +
|
4704
|
+
"\n" +
|
4705
|
+
" <div class=\"popover-inner\">\n" +
|
4706
|
+
" <h3 class=\"popover-title\" ng-bind=\"title\" ng-if=\"title\"></h3>\n" +
|
4707
|
+
" <div class=\"popover-content\"\n" +
|
4708
|
+
" tooltip-template-transclude=\"contentExp()\"\n" +
|
4709
|
+
" tooltip-template-transclude-scope=\"originScope()\"></div>\n" +
|
4710
|
+
" </div>\n" +
|
4711
|
+
"</div>\n" +
|
4712
|
+
"");
|
4713
|
+
}]);
|
4714
|
+
|
4715
|
+
angular.module("template/popover/popover-window.html", []).run(["$templateCache", function($templateCache) {
|
4716
|
+
$templateCache.put("template/popover/popover-window.html",
|
4717
|
+
"<div class=\"popover {{placement}}\" ng-class=\"{ in: isOpen, fade: animation }\">\n" +
|
4718
|
+
" <div class=\"arrow\"></div>\n" +
|
4719
|
+
"\n" +
|
4720
|
+
" <div class=\"popover-inner\">\n" +
|
4721
|
+
" <h3 class=\"popover-title\" ng-bind=\"title\" ng-show=\"title\"></h3>\n" +
|
4722
|
+
" <div class=\"popover-content\" tooltip-template-transclude></div>\n" +
|
4723
|
+
" </div>\n" +
|
4724
|
+
"</div>\n" +
|
4725
|
+
"");
|
4726
|
+
}]);
|
4727
|
+
|
4003
4728
|
angular.module("template/popover/popover.html", []).run(["$templateCache", function($templateCache) {
|
4004
4729
|
$templateCache.put("template/popover/popover.html",
|
4005
|
-
"<div class=\"popover
|
4730
|
+
"<div class=\"popover\"\n" +
|
4731
|
+
" tooltip-animation-class=\"fade\"\n" +
|
4732
|
+
" tooltip-classes\n" +
|
4733
|
+
" ng-class=\"{ in: isOpen() }\">\n" +
|
4006
4734
|
" <div class=\"arrow\"></div>\n" +
|
4007
4735
|
"\n" +
|
4008
4736
|
" <div class=\"popover-inner\">\n" +
|
4009
|
-
" <h3 class=\"popover-title\" ng-bind=\"title\" ng-
|
4737
|
+
" <h3 class=\"popover-title\" ng-bind=\"title\" ng-if=\"title\"></h3>\n" +
|
4010
4738
|
" <div class=\"popover-content\" ng-bind=\"content\"></div>\n" +
|
4011
4739
|
" </div>\n" +
|
4012
4740
|
"</div>\n" +
|
@@ -4015,7 +4743,8 @@ angular.module("template/popover/popover.html", []).run(["$templateCache", funct
|
|
4015
4743
|
|
4016
4744
|
angular.module("template/progressbar/bar.html", []).run(["$templateCache", function($templateCache) {
|
4017
4745
|
$templateCache.put("template/progressbar/bar.html",
|
4018
|
-
"<div class=\"progress-bar\" ng-class=\"type && 'progress-bar-' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: percent + '%'}\" aria-valuetext=\"{{percent | number:0}}%\" ng-transclude></div
|
4746
|
+
"<div class=\"progress-bar\" ng-class=\"type && 'progress-bar-' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: (percent < 100 ? percent : 100) + '%'}\" aria-valuetext=\"{{percent | number:0}}%\" ng-transclude></div>\n" +
|
4747
|
+
"");
|
4019
4748
|
}]);
|
4020
4749
|
|
4021
4750
|
angular.module("template/progressbar/progress.html", []).run(["$templateCache", function($templateCache) {
|
@@ -4026,8 +4755,9 @@ angular.module("template/progressbar/progress.html", []).run(["$templateCache",
|
|
4026
4755
|
angular.module("template/progressbar/progressbar.html", []).run(["$templateCache", function($templateCache) {
|
4027
4756
|
$templateCache.put("template/progressbar/progressbar.html",
|
4028
4757
|
"<div class=\"progress\">\n" +
|
4029
|
-
" <div class=\"progress-bar\" ng-class=\"type && 'progress-bar-' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: percent + '%'}\" aria-valuetext=\"{{percent | number:0}}%\" ng-transclude></div>\n" +
|
4030
|
-
"</div
|
4758
|
+
" <div class=\"progress-bar\" ng-class=\"type && 'progress-bar-' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: (percent < 100 ? percent : 100) + '%'}\" aria-valuetext=\"{{percent | number:0}}%\" ng-transclude></div>\n" +
|
4759
|
+
"</div>\n" +
|
4760
|
+
"");
|
4031
4761
|
}]);
|
4032
4762
|
|
4033
4763
|
angular.module("template/rating/rating.html", []).run(["$templateCache", function($templateCache) {
|
@@ -4042,21 +4772,13 @@ angular.module("template/rating/rating.html", []).run(["$templateCache", functio
|
|
4042
4772
|
angular.module("template/tabs/tab.html", []).run(["$templateCache", function($templateCache) {
|
4043
4773
|
$templateCache.put("template/tabs/tab.html",
|
4044
4774
|
"<li ng-class=\"{active: active, disabled: disabled}\">\n" +
|
4045
|
-
" <a ng-click=\"select()\" tab-heading-transclude>{{heading}}</a>\n" +
|
4775
|
+
" <a href ng-click=\"select()\" tab-heading-transclude>{{heading}}</a>\n" +
|
4046
4776
|
"</li>\n" +
|
4047
4777
|
"");
|
4048
4778
|
}]);
|
4049
4779
|
|
4050
|
-
angular.module("template/tabs/tabset-titles.html", []).run(["$templateCache", function($templateCache) {
|
4051
|
-
$templateCache.put("template/tabs/tabset-titles.html",
|
4052
|
-
"<ul class=\"nav {{type && 'nav-' + type}}\" ng-class=\"{'nav-stacked': vertical}\">\n" +
|
4053
|
-
"</ul>\n" +
|
4054
|
-
"");
|
4055
|
-
}]);
|
4056
|
-
|
4057
4780
|
angular.module("template/tabs/tabset.html", []).run(["$templateCache", function($templateCache) {
|
4058
4781
|
$templateCache.put("template/tabs/tabset.html",
|
4059
|
-
"\n" +
|
4060
4782
|
"<div>\n" +
|
4061
4783
|
" <ul class=\"nav nav-{{type || 'tabs'}}\" ng-class=\"{'nav-stacked': vertical, 'nav-justified': justified}\" ng-transclude></ul>\n" +
|
4062
4784
|
" <div class=\"tab-content\">\n" +
|
@@ -4081,12 +4803,12 @@ angular.module("template/timepicker/timepicker.html", []).run(["$templateCache",
|
|
4081
4803
|
" <td ng-show=\"showMeridian\"></td>\n" +
|
4082
4804
|
" </tr>\n" +
|
4083
4805
|
" <tr>\n" +
|
4084
|
-
" <td
|
4085
|
-
" <input type=\"text\" ng-model=\"hours\" ng-change=\"updateHours()\" class=\"form-control text-center\" ng-
|
4806
|
+
" <td class=\"form-group\" ng-class=\"{'has-error': invalidHours}\">\n" +
|
4807
|
+
" <input style=\"width:50px;\" type=\"text\" ng-model=\"hours\" ng-change=\"updateHours()\" class=\"form-control text-center\" ng-readonly=\"readonlyInput\" maxlength=\"2\">\n" +
|
4086
4808
|
" </td>\n" +
|
4087
4809
|
" <td>:</td>\n" +
|
4088
|
-
" <td
|
4089
|
-
" <input type=\"text\" ng-model=\"minutes\" ng-change=\"updateMinutes()\" class=\"form-control text-center\" ng-readonly=\"readonlyInput\" maxlength=\"2\">\n" +
|
4810
|
+
" <td class=\"form-group\" ng-class=\"{'has-error': invalidMinutes}\">\n" +
|
4811
|
+
" <input style=\"width:50px;\" type=\"text\" ng-model=\"minutes\" ng-change=\"updateMinutes()\" class=\"form-control text-center\" ng-readonly=\"readonlyInput\" maxlength=\"2\">\n" +
|
4090
4812
|
" </td>\n" +
|
4091
4813
|
" <td ng-show=\"showMeridian\"><button type=\"button\" class=\"btn btn-default text-center\" ng-click=\"toggleMeridian()\">{{meridian}}</button></td>\n" +
|
4092
4814
|
" </tr>\n" +
|
@@ -4108,9 +4830,11 @@ angular.module("template/typeahead/typeahead-match.html", []).run(["$templateCac
|
|
4108
4830
|
|
4109
4831
|
angular.module("template/typeahead/typeahead-popup.html", []).run(["$templateCache", function($templateCache) {
|
4110
4832
|
$templateCache.put("template/typeahead/typeahead-popup.html",
|
4111
|
-
"<ul class=\"dropdown-menu\" ng-
|
4833
|
+
"<ul class=\"dropdown-menu\" ng-show=\"isOpen()\" ng-style=\"{top: position.top+'px', left: position.left+'px'}\" style=\"display: block;\" role=\"listbox\" aria-hidden=\"{{!isOpen()}}\">\n" +
|
4112
4834
|
" <li ng-repeat=\"match in matches track by $index\" ng-class=\"{active: isActive($index) }\" ng-mouseenter=\"selectActive($index)\" ng-click=\"selectMatch($index)\" role=\"option\" id=\"{{match.id}}\">\n" +
|
4113
4835
|
" <div typeahead-match index=\"$index\" match=\"match\" query=\"query\" template-url=\"templateUrl\"></div>\n" +
|
4114
4836
|
" </li>\n" +
|
4115
|
-
"</ul
|
4837
|
+
"</ul>\n" +
|
4838
|
+
"");
|
4116
4839
|
}]);
|
4840
|
+
!angular.$$csp() && angular.element(document).find('head').prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>');
|