kms 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{vendor/assets/bower_components/Responsive-Dashboard/src/img → app/assets/images}/avatar.jpg +0 -0
- data/app/assets/javascripts/kms/application.js +3 -0
- data/app/assets/javascripts/kms/application/controllers/assets_controller.coffee.erb +14 -7
- data/app/assets/javascripts/kms/application/controllers/pages_controller.coffee.erb +11 -3
- data/app/assets/javascripts/kms/application/controllers/snippets_controller.coffee.erb +3 -0
- data/app/assets/javascripts/kms/application/controllers/templates_controller.coffee.erb +3 -0
- data/app/assets/javascripts/kms/application/controllers/users_controller.coffee +4 -4
- data/app/assets/javascripts/kms/application/routes.coffee.erb +1 -1
- data/app/assets/javascripts/kms/application/services/transliteration_service.js +160 -0
- data/app/assets/javascripts/templates/assets/edit.html.slim +24 -2
- data/app/assets/javascripts/templates/assets/form.html.slim +23 -0
- data/app/assets/javascripts/templates/assets/index.html.slim +13 -12
- data/app/assets/javascripts/templates/assets/new.html.slim +1 -15
- data/app/assets/javascripts/templates/help.html.slim +1 -1
- data/app/assets/javascripts/templates/pages/index.html.slim +16 -5
- data/app/assets/javascripts/templates/snippets/index.html.slim +16 -5
- data/app/assets/javascripts/templates/templates/index.html.slim +16 -6
- data/app/assets/stylesheets/kms/application.css +2 -2
- data/app/assets/stylesheets/kms/custom.css.scss +38 -0
- data/app/controllers/kms/assets_controller.rb +8 -9
- data/app/controllers/kms/pages_controller.rb +10 -11
- data/app/controllers/kms/public/pages_controller.rb +5 -4
- data/app/controllers/kms/public/search_controller.rb +2 -0
- data/app/controllers/kms/settings_controller.rb +1 -1
- data/app/controllers/kms/snippets_controller.rb +2 -1
- data/app/controllers/kms/templates_controller.rb +6 -5
- data/app/controllers/kms/users_controller.rb +11 -8
- data/app/models/ability.rb +1 -0
- data/app/models/concerns/kms/permalinkable.rb +1 -1
- data/app/models/kms/page.rb +13 -4
- data/app/serializers/kms/asset_serializer.rb +6 -0
- data/app/serializers/kms/page_serializer.rb +5 -0
- data/app/serializers/kms/template_serializer.rb +5 -0
- data/app/serializers/kms/user_serializer.rb +5 -0
- data/app/services/kms/page_fetcher.rb +30 -0
- data/app/services/kms/search_service.rb +28 -3
- data/app/services/kms/template_processor.rb +19 -0
- data/app/views/devise/passwords/edit.html.erb +1 -1
- data/app/views/devise/passwords/new.html.erb +1 -1
- data/app/views/devise/registrations/new.html.erb +1 -1
- data/app/views/devise/sessions/new.html.erb +1 -1
- data/app/views/layouts/kms/devise.html.erb +1 -1
- data/app/views/layouts/kms/kms.html.erb +47 -18
- data/config/initializers/externals.rb +6 -32
- data/config/initializers/search.rb +1 -0
- data/config/locales/en.yml +17 -1
- data/config/locales/ru.yml +17 -1
- data/config/routes.rb +7 -6
- data/lib/kms/dependencies.rb +1 -4
- data/lib/kms/engine.rb +1 -2
- data/lib/kms/search_item.rb +18 -0
- data/lib/kms/version.rb +1 -1
- data/spec/controllers/kms/assets_controller_spec.rb +51 -0
- data/spec/controllers/kms/pages_controller_spec.rb +82 -0
- data/spec/controllers/kms/public/pages_controller_spec.rb +30 -0
- data/spec/controllers/kms/snippets_controller_spec.rb +61 -47
- data/spec/controllers/kms/templates_controller_spec.rb +51 -0
- data/spec/controllers/kms/users_controller_spec.rb +56 -0
- data/spec/factories/assets.rb +8 -0
- data/spec/factories/pages.rb +33 -0
- data/spec/factories/templates.rb +20 -0
- data/spec/factories/users.rb +9 -4
- data/spec/internal/config/routes.rb +12 -1
- data/spec/internal/log/test.log +81239 -0
- data/spec/internal/public/404.html +67 -0
- data/spec/internal/public/avatar.jpg +0 -0
- data/spec/internal/public/style.css +1 -0
- data/spec/internal/public/uploads/kms/asset/file/1/avatar.jpg +0 -0
- data/spec/internal/public/uploads/kms/asset/file/2/avatar.jpg +0 -0
- data/spec/internal/public/uploads/kms/asset/file/2/style.css +1 -0
- data/spec/internal/public/uploads/kms/asset/file/3/style.css +1 -0
- data/spec/internal/public/uploads/kms/asset/file/4/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500976987-41025-0002-0883/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500977082-41195-0002-6495/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500977109-41364-0002-4518/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500977152-41405-0002-2345/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500977327-41694-0002-5448/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500977376-41732-0002-7916/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500977392-41759-0002-7593/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500977410-42259-0002-7527/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500977429-42306-0002-5937/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500977437-42324-0002-5880/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500983228-53594-0002-4559/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500983284-53632-0002-6590/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500983360-53784-0002-7289/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500983469-54321-0002-0386/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500983469-54321-0004-5691/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500983511-54352-0002-5720/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500983511-54352-0004-1399/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500983610-54507-0002-4280/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500983610-54507-0004-9758/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500984466-57012-0002-4146/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500984466-57012-0004-5895/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500984509-57158-0002-9657/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500984509-57158-0004-5003/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500984616-57697-0002-7201/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500984616-57697-0004-6255/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500985257-58947-0002-3629/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500985257-58947-0004-5338/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500985407-58947-0006-5929/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500985473-59264-0002-0397/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500985473-59264-0004-6493/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500985475-59264-0007-8674/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500985538-59468-0002-9206/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500985538-59468-0004-2586/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500985538-59468-0007-6200/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988358-65877-0002-4528/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988358-65877-0004-5904/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988358-65877-0007-7320/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988407-65916-0002-3138/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988407-65916-0004-5400/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988407-65916-0007-1655/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988421-65950-0002-9415/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988421-65950-0004-7130/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988421-65950-0007-9886/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988435-65981-0002-3228/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988435-65981-0004-3682/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988435-65981-0007-1582/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988475-66122-0002-9516/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988475-66122-0004-5634/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988530-66122-0007-2272/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988554-66315-0002-6262/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988554-66315-0004-6099/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500988554-66315-0007-1632/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500991751-73722-0002-9937/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500991751-73722-0004-8034/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1500991751-73722-0007-7763/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1501233238-34385-0002-3210/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1501233238-34385-0004-5881/style.css +1 -0
- data/spec/internal/public/uploads/tmp/1501233238-34385-0007-6280/style.css +1 -0
- data/spec/models/kms/page_spec.rb +31 -0
- data/spec/models/kms/template_spec.rb +15 -0
- data/spec/services/kms/page_fetcher_spec.rb +36 -0
- data/spec/services/kms/search_service_spec.rb +53 -0
- data/spec/services/kms/template_processor_spec.rb +20 -0
- data/spec/support/controller_macros.rb +9 -1
- data/vendor/assets/bower.json +3 -2
- data/vendor/assets/bower_components/angular-ui-select/CHANGELOG.md +169 -0
- data/vendor/assets/bower_components/angular-ui-select/CONTRIBUTING.md +161 -0
- data/vendor/assets/bower_components/angular-ui-select/README.md +27 -13
- data/vendor/assets/bower_components/angular-ui-select/bower.json +6 -3
- data/vendor/assets/bower_components/angular-ui-select/composer.json +29 -0
- data/vendor/assets/bower_components/angular-ui-select/deploy-docs.sh +31 -0
- data/vendor/assets/bower_components/angular-ui-select/dist/select.css +48 -2
- data/vendor/assets/bower_components/angular-ui-select/dist/select.js +454 -111
- data/vendor/assets/bower_components/angular-ui-select/dist/select.min.css +2 -2
- data/vendor/assets/bower_components/angular-ui-select/dist/select.min.js +2 -2
- data/vendor/assets/bower_components/angular-ui-select/docs/assets/app.js +1 -0
- data/vendor/assets/bower_components/angular-ui-select/docs/assets/demo.js +461 -0
- data/vendor/assets/bower_components/angular-ui-select/docs/assets/docs.css +339 -0
- data/vendor/assets/bower_components/angular-ui-select/docs/assets/plunkr.js +110 -0
- data/vendor/assets/bower_components/angular-ui-select/docs/index.html +191 -0
- data/vendor/assets/bower_components/angular-ui-select/docs/partials/_footer.html +2 -0
- data/vendor/assets/bower_components/angular-ui-select/docs/partials/_header.html +64 -0
- data/vendor/assets/bower_components/angular-ui-select/index.js +2 -0
- data/vendor/assets/bower_components/angular-ui-select/package.json +36 -15
- data/vendor/assets/bower_components/bootstrap/CHANGELOG.md +5 -0
- data/vendor/assets/bower_components/bootstrap/Gemfile +6 -0
- data/vendor/assets/bower_components/bootstrap/Gemfile.lock +43 -0
- data/vendor/assets/bower_components/bootstrap/Gruntfile.js +176 -145
- data/vendor/assets/bower_components/bootstrap/ISSUE_TEMPLATE.md +22 -0
- data/vendor/assets/bower_components/bootstrap/LICENSE +1 -1
- data/vendor/assets/bower_components/bootstrap/README.md +55 -40
- data/vendor/assets/bower_components/bootstrap/bower.json +5 -9
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.css +204 -59
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.css.map +1 -1
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.min.css +4 -3
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.min.css.map +1 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/{bootstrap.less → bootstrap.css} +881 -327
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.css.map +1 -1
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.min.css +6 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.min.css.map +1 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +272 -213
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/js/bootstrap.js +549 -286
- data/vendor/assets/bower_components/bootstrap/dist/js/bootstrap.min.js +5 -4
- data/vendor/assets/bower_components/bootstrap/dist/js/npm.js +13 -0
- data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.svg +272 -213
- data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/vendor/assets/bower_components/bootstrap/grunt/bs-commonjs-generator.js +30 -0
- data/vendor/assets/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js +5 -4
- data/vendor/assets/bower_components/bootstrap/grunt/bs-lessdoc-parser.js +13 -12
- data/vendor/assets/bower_components/bootstrap/grunt/bs-raw-files-generator.js +6 -8
- data/vendor/assets/bower_components/bootstrap/grunt/change-version.js +109 -0
- data/vendor/assets/bower_components/bootstrap/grunt/configBridge.json +46 -0
- data/vendor/assets/bower_components/bootstrap/grunt/npm-shrinkwrap.json +2679 -0
- data/vendor/assets/bower_components/bootstrap/grunt/sauce_browsers.yml +5 -5
- data/vendor/assets/bower_components/bootstrap/js/affix.js +46 -26
- data/vendor/assets/bower_components/bootstrap/js/alert.js +8 -6
- data/vendor/assets/bower_components/bootstrap/js/button.js +34 -19
- data/vendor/assets/bower_components/bootstrap/js/carousel.js +35 -21
- data/vendor/assets/bower_components/bootstrap/js/collapse.js +69 -27
- data/vendor/assets/bower_components/bootstrap/js/dropdown.js +55 -41
- data/vendor/assets/bower_components/bootstrap/js/modal.js +91 -32
- data/vendor/assets/bower_components/bootstrap/js/popover.js +5 -10
- data/vendor/assets/bower_components/bootstrap/js/scrollspy.js +28 -26
- data/vendor/assets/bower_components/bootstrap/js/tab.js +45 -18
- data/vendor/assets/bower_components/bootstrap/js/tooltip.js +117 -54
- data/vendor/assets/bower_components/bootstrap/js/transition.js +2 -2
- data/vendor/assets/bower_components/bootstrap/less/alerts.less +5 -0
- data/vendor/assets/bower_components/bootstrap/less/badges.less +14 -3
- data/vendor/assets/bower_components/bootstrap/less/bootstrap.less +6 -0
- data/vendor/assets/bower_components/bootstrap/less/button-groups.less +22 -18
- data/vendor/assets/bower_components/bootstrap/less/buttons.less +19 -10
- data/vendor/assets/bower_components/bootstrap/less/carousel.less +34 -7
- data/vendor/assets/bower_components/bootstrap/less/close.less +1 -0
- data/vendor/assets/bower_components/bootstrap/less/code.less +1 -0
- data/vendor/assets/bower_components/bootstrap/less/component-animations.less +3 -1
- data/vendor/assets/bower_components/bootstrap/less/dropdowns.less +9 -8
- data/vendor/assets/bower_components/bootstrap/less/forms.less +123 -50
- data/vendor/assets/bower_components/bootstrap/less/glyphicons.less +75 -3
- data/vendor/assets/bower_components/bootstrap/less/input-groups.less +8 -3
- data/vendor/assets/bower_components/bootstrap/less/jumbotron.less +10 -4
- data/vendor/assets/bower_components/bootstrap/less/list-group.less +10 -11
- data/vendor/assets/bower_components/bootstrap/less/media.less +40 -30
- data/vendor/assets/bower_components/bootstrap/less/mixins.less +1 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/background-variant.less +2 -1
- data/vendor/assets/bower_components/bootstrap/less/mixins/buttons.less +19 -4
- data/vendor/assets/bower_components/bootstrap/less/mixins/forms.less +5 -1
- data/vendor/assets/bower_components/bootstrap/less/mixins/grid-framework.less +4 -4
- data/vendor/assets/bower_components/bootstrap/less/mixins/grid.less +4 -4
- data/vendor/assets/bower_components/bootstrap/less/mixins/hide-text.less +2 -2
- data/vendor/assets/bower_components/bootstrap/less/mixins/image.less +0 -1
- data/vendor/assets/bower_components/bootstrap/less/mixins/labels.less +1 -1
- data/vendor/assets/bower_components/bootstrap/less/mixins/list-group.less +2 -1
- data/vendor/assets/bower_components/bootstrap/less/mixins/pagination.less +2 -1
- data/vendor/assets/bower_components/bootstrap/less/mixins/reset-text.less +18 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/responsive-visibility.less +1 -1
- data/vendor/assets/bower_components/bootstrap/less/mixins/tab-focus.less +3 -3
- data/vendor/assets/bower_components/bootstrap/less/mixins/text-emphasis.less +2 -1
- data/vendor/assets/bower_components/bootstrap/less/mixins/vendor-prefixes.less +8 -5
- data/vendor/assets/bower_components/bootstrap/less/modals.less +3 -3
- data/vendor/assets/bower_components/bootstrap/less/navbar.less +30 -25
- data/vendor/assets/bower_components/bootstrap/less/navs.less +1 -1
- data/vendor/assets/bower_components/bootstrap/less/normalize.less +12 -13
- data/vendor/assets/bower_components/bootstrap/less/pager.less +1 -2
- data/vendor/assets/bower_components/bootstrap/less/pagination.less +5 -4
- data/vendor/assets/bower_components/bootstrap/less/panels.less +33 -5
- data/vendor/assets/bower_components/bootstrap/less/popovers.less +5 -7
- data/vendor/assets/bower_components/bootstrap/less/print.less +96 -96
- data/vendor/assets/bower_components/bootstrap/less/progress-bars.less +1 -19
- data/vendor/assets/bower_components/bootstrap/less/responsive-embed.less +10 -9
- data/vendor/assets/bower_components/bootstrap/less/scaffolding.less +13 -2
- data/vendor/assets/bower_components/bootstrap/less/tables.less +14 -13
- data/vendor/assets/bower_components/bootstrap/less/theme.less +49 -16
- data/vendor/assets/bower_components/bootstrap/less/thumbnails.less +1 -1
- data/vendor/assets/bower_components/bootstrap/less/tooltip.less +13 -7
- data/vendor/assets/bower_components/bootstrap/less/type.less +2 -13
- data/vendor/assets/bower_components/bootstrap/less/utilities.less +0 -2
- data/vendor/assets/bower_components/bootstrap/less/variables.less +45 -22
- data/vendor/assets/bower_components/bootstrap/nuget/MyGet.ps1 +8 -0
- data/vendor/assets/bower_components/bootstrap/nuget/bootstrap.less.nuspec +28 -0
- data/vendor/assets/bower_components/bootstrap/nuget/bootstrap.nuspec +28 -0
- data/vendor/assets/bower_components/bootstrap/package.js +32 -0
- data/vendor/assets/bower_components/bootstrap/package.json +49 -41
- data/vendor/assets/bower_components/flow.js/README.md +79 -64
- data/vendor/assets/bower_components/flow.js/bower.json +6 -2
- data/vendor/assets/bower_components/flow.js/dist/flow.js +1635 -1532
- data/vendor/assets/bower_components/flow.js/dist/flow.min.js +2 -2
- data/vendor/assets/bower_components/flow.js/package.js +24 -0
- data/vendor/assets/bower_components/flow.js/travis.sh +19 -0
- data/vendor/assets/bower_components/font-awesome/scss/_path.scss +5 -5
- data/vendor/assets/bower_components/font-awesome/scss/_variables.scss +1 -2
- data/vendor/assets/bower_components/ng-flow/bower.json +1 -1
- data/vendor/assets/bower_components/ng-flow/dist/ng-flow-standalone.js +1655 -1542
- data/vendor/assets/bower_components/ng-flow/dist/ng-flow-standalone.min.js +2 -2
- data/vendor/assets/bower_components/ng-flow/dist/ng-flow.js +19 -9
- data/vendor/assets/bower_components/ng-flow/dist/ng-flow.min.js +2 -2
- data/vendor/assets/bower_components/ng-flow/index.js +3 -0
- data/vendor/assets/bower_components/ng-flow/package.js +25 -0
- data/vendor/assets/bower_components/ng-flow/src/directives/drag-events.js +2 -1
- data/vendor/assets/bower_components/ng-flow/src/directives/events.js +2 -1
- data/vendor/assets/bower_components/ng-flow/src/directives/init.js +7 -1
- data/vendor/assets/bower_components/ng-flow/travis.sh +19 -0
- data/vendor/assets/bower_components/{Responsive-Dashboard → rdash-ui}/LICENSE +21 -21
- data/vendor/assets/bower_components/rdash-ui/README.md +55 -0
- data/vendor/assets/bower_components/rdash-ui/bower.json +33 -0
- data/vendor/assets/bower_components/rdash-ui/dist/css/rdash.min.css +1 -0
- data/vendor/assets/bower_components/rdash-ui/dist/css/rdash.scss +489 -0
- data/vendor/assets/bower_components/{Responsive-Dashboard/src → rdash-ui/dist}/fonts/montserrat-regular-webfont.eot +0 -0
- data/vendor/assets/bower_components/{Responsive-Dashboard/src → rdash-ui/dist}/fonts/montserrat-regular-webfont.svg +1316 -1316
- data/vendor/assets/bower_components/{Responsive-Dashboard/src → rdash-ui/dist}/fonts/montserrat-regular-webfont.ttf +0 -0
- data/vendor/assets/bower_components/{Responsive-Dashboard/src → rdash-ui/dist}/fonts/montserrat-regular-webfont.woff +0 -0
- metadata +227 -180
- data/config/initializers/bower_rails.rb +0 -16
- data/vendor/assets/bower_components/Responsive-Dashboard/CONTRIBUTING.md +0 -21
- data/vendor/assets/bower_components/Responsive-Dashboard/README.md +0 -119
- data/vendor/assets/bower_components/Responsive-Dashboard/bower.json +0 -32
- data/vendor/assets/bower_components/Responsive-Dashboard/gulpfile.js +0 -81
- data/vendor/assets/bower_components/Responsive-Dashboard/package.json +0 -21
- data/vendor/assets/bower_components/Responsive-Dashboard/src/index.html +0 -413
- data/vendor/assets/bower_components/Responsive-Dashboard/src/js/dashboard/controllers/alerts-ctrl.js +0 -19
- data/vendor/assets/bower_components/Responsive-Dashboard/src/js/dashboard/controllers/master-ctrl.js +0 -51
- data/vendor/assets/bower_components/Responsive-Dashboard/src/js/dashboard/directives/loading.js +0 -13
- data/vendor/assets/bower_components/Responsive-Dashboard/src/js/dashboard/directives/widget-body.js +0 -16
- data/vendor/assets/bower_components/Responsive-Dashboard/src/js/dashboard/directives/widget-header.js +0 -17
- data/vendor/assets/bower_components/Responsive-Dashboard/src/js/dashboard/directives/widget.js +0 -16
- data/vendor/assets/bower_components/Responsive-Dashboard/src/js/dashboard/module.js +0 -1
- data/vendor/assets/bower_components/Responsive-Dashboard/src/js/dashboard/routes.js +0 -22
- data/vendor/assets/bower_components/Responsive-Dashboard/src/less/dashboard/content.less +0 -19
- data/vendor/assets/bower_components/Responsive-Dashboard/src/less/dashboard/hamburg.less +0 -29
- data/vendor/assets/bower_components/Responsive-Dashboard/src/less/dashboard/header.less +0 -92
- data/vendor/assets/bower_components/Responsive-Dashboard/src/less/dashboard/loading.less +0 -40
- data/vendor/assets/bower_components/Responsive-Dashboard/src/less/dashboard/main.less +0 -73
- data/vendor/assets/bower_components/Responsive-Dashboard/src/less/dashboard/mixins.less +0 -5
- data/vendor/assets/bower_components/Responsive-Dashboard/src/less/dashboard/sidebar.less +0 -122
- data/vendor/assets/bower_components/Responsive-Dashboard/src/less/dashboard/variables.less +0 -10
- data/vendor/assets/bower_components/Responsive-Dashboard/src/less/dashboard/widgets.less +0 -95
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.min.css.erb +0 -5
- data/vendor/assets/bower_components/flow.js/CHANGELOG.md +0 -37
- data/vendor/assets/bower_components/flow.js/Gruntfile.js +0 -132
- data/vendor/assets/bower_components/flow.js/karma.conf.js +0 -114
- data/vendor/assets/bower_components/flow.js/package.json +0 -50
- data/vendor/assets/bower_components/flow.js/src/flow.js +0 -1532
- data/vendor/assets/bower_components/jquery/MIT-LICENSE.txt +0 -21
- data/vendor/assets/bower_components/jquery/bower.json +0 -27
- data/vendor/assets/bower_components/jquery/dist/jquery.js +0 -9190
- data/vendor/assets/bower_components/jquery/dist/jquery.min.js +0 -5
- data/vendor/assets/bower_components/jquery/dist/jquery.min.map +0 -1
- data/vendor/assets/bower_components/jquery/src/ajax.js +0 -806
- data/vendor/assets/bower_components/jquery/src/ajax/jsonp.js +0 -89
- data/vendor/assets/bower_components/jquery/src/ajax/load.js +0 -75
- data/vendor/assets/bower_components/jquery/src/ajax/parseJSON.js +0 -13
- data/vendor/assets/bower_components/jquery/src/ajax/parseXML.js +0 -28
- data/vendor/assets/bower_components/jquery/src/ajax/script.js +0 -64
- data/vendor/assets/bower_components/jquery/src/ajax/var/nonce.js +0 -5
- data/vendor/assets/bower_components/jquery/src/ajax/var/rquery.js +0 -3
- data/vendor/assets/bower_components/jquery/src/ajax/xhr.js +0 -135
- data/vendor/assets/bower_components/jquery/src/attributes.js +0 -11
- data/vendor/assets/bower_components/jquery/src/attributes/attr.js +0 -143
- data/vendor/assets/bower_components/jquery/src/attributes/classes.js +0 -158
- data/vendor/assets/bower_components/jquery/src/attributes/prop.js +0 -96
- data/vendor/assets/bower_components/jquery/src/attributes/support.js +0 -35
- data/vendor/assets/bower_components/jquery/src/attributes/val.js +0 -163
- data/vendor/assets/bower_components/jquery/src/callbacks.js +0 -205
- data/vendor/assets/bower_components/jquery/src/core.js +0 -498
- data/vendor/assets/bower_components/jquery/src/core/access.js +0 -60
- data/vendor/assets/bower_components/jquery/src/core/init.js +0 -123
- data/vendor/assets/bower_components/jquery/src/core/parseHTML.js +0 -39
- data/vendor/assets/bower_components/jquery/src/core/ready.js +0 -97
- data/vendor/assets/bower_components/jquery/src/core/var/rsingleTag.js +0 -4
- data/vendor/assets/bower_components/jquery/src/css.js +0 -451
- data/vendor/assets/bower_components/jquery/src/css/addGetHookIf.js +0 -24
- data/vendor/assets/bower_components/jquery/src/css/curCSS.js +0 -57
- data/vendor/assets/bower_components/jquery/src/css/defaultDisplay.js +0 -70
- data/vendor/assets/bower_components/jquery/src/css/hiddenVisibleSelectors.js +0 -15
- data/vendor/assets/bower_components/jquery/src/css/support.js +0 -91
- data/vendor/assets/bower_components/jquery/src/css/swap.js +0 -28
- data/vendor/assets/bower_components/jquery/src/css/var/cssExpand.js +0 -3
- data/vendor/assets/bower_components/jquery/src/css/var/getStyles.js +0 -5
- data/vendor/assets/bower_components/jquery/src/css/var/isHidden.js +0 -13
- data/vendor/assets/bower_components/jquery/src/css/var/rmargin.js +0 -3
- data/vendor/assets/bower_components/jquery/src/css/var/rnumnonpx.js +0 -5
- data/vendor/assets/bower_components/jquery/src/data.js +0 -179
- data/vendor/assets/bower_components/jquery/src/data/Data.js +0 -181
- data/vendor/assets/bower_components/jquery/src/data/accepts.js +0 -20
- data/vendor/assets/bower_components/jquery/src/data/var/data_priv.js +0 -5
- data/vendor/assets/bower_components/jquery/src/data/var/data_user.js +0 -5
- data/vendor/assets/bower_components/jquery/src/deferred.js +0 -149
- data/vendor/assets/bower_components/jquery/src/deprecated.js +0 -13
- data/vendor/assets/bower_components/jquery/src/dimensions.js +0 -50
- data/vendor/assets/bower_components/jquery/src/effects.js +0 -649
- data/vendor/assets/bower_components/jquery/src/effects/Tween.js +0 -114
- data/vendor/assets/bower_components/jquery/src/effects/animatedSelector.js +0 -13
- data/vendor/assets/bower_components/jquery/src/event.js +0 -868
- data/vendor/assets/bower_components/jquery/src/event/alias.js +0 -39
- data/vendor/assets/bower_components/jquery/src/event/support.js +0 -9
- data/vendor/assets/bower_components/jquery/src/exports/amd.js +0 -24
- data/vendor/assets/bower_components/jquery/src/exports/global.js +0 -32
- data/vendor/assets/bower_components/jquery/src/intro.js +0 -44
- data/vendor/assets/bower_components/jquery/src/jquery.js +0 -36
- data/vendor/assets/bower_components/jquery/src/manipulation.js +0 -582
- data/vendor/assets/bower_components/jquery/src/manipulation/_evalUrl.js +0 -18
- data/vendor/assets/bower_components/jquery/src/manipulation/support.js +0 -31
- data/vendor/assets/bower_components/jquery/src/manipulation/var/rcheckableType.js +0 -3
- data/vendor/assets/bower_components/jquery/src/offset.js +0 -204
- data/vendor/assets/bower_components/jquery/src/outro.js +0 -1
- data/vendor/assets/bower_components/jquery/src/queue.js +0 -142
- data/vendor/assets/bower_components/jquery/src/queue/delay.js +0 -22
- data/vendor/assets/bower_components/jquery/src/selector-native.js +0 -172
- data/vendor/assets/bower_components/jquery/src/selector-sizzle.js +0 -14
- data/vendor/assets/bower_components/jquery/src/selector.js +0 -1
- data/vendor/assets/bower_components/jquery/src/serialize.js +0 -111
- data/vendor/assets/bower_components/jquery/src/sizzle/dist/sizzle.js +0 -2044
- data/vendor/assets/bower_components/jquery/src/sizzle/dist/sizzle.min.js +0 -3
- data/vendor/assets/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -1
- data/vendor/assets/bower_components/jquery/src/traversing.js +0 -200
- data/vendor/assets/bower_components/jquery/src/traversing/findFilter.js +0 -100
- data/vendor/assets/bower_components/jquery/src/traversing/var/rneedsContext.js +0 -6
- data/vendor/assets/bower_components/jquery/src/var/arr.js +0 -3
- data/vendor/assets/bower_components/jquery/src/var/class2type.js +0 -4
- data/vendor/assets/bower_components/jquery/src/var/concat.js +0 -5
- data/vendor/assets/bower_components/jquery/src/var/hasOwn.js +0 -5
- data/vendor/assets/bower_components/jquery/src/var/indexOf.js +0 -5
- data/vendor/assets/bower_components/jquery/src/var/pnum.js +0 -3
- data/vendor/assets/bower_components/jquery/src/var/push.js +0 -5
- data/vendor/assets/bower_components/jquery/src/var/rnotwhite.js +0 -3
- data/vendor/assets/bower_components/jquery/src/var/slice.js +0 -5
- data/vendor/assets/bower_components/jquery/src/var/strundefined.js +0 -3
- data/vendor/assets/bower_components/jquery/src/var/support.js +0 -4
- data/vendor/assets/bower_components/jquery/src/var/toString.js +0 -5
- data/vendor/assets/bower_components/jquery/src/wrap.js +0 -78
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: scrollspy.js v3.
|
2
|
+
* Bootstrap: scrollspy.js v3.3.7
|
3
3
|
* http://getbootstrap.com/javascript/#scrollspy
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2016 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -14,10 +14,8 @@
|
|
14
14
|
// ==========================
|
15
15
|
|
16
16
|
function ScrollSpy(element, options) {
|
17
|
-
|
18
|
-
|
19
|
-
this.$body = $('body')
|
20
|
-
this.$scrollElement = $(element).is('body') ? $(window) : $(element)
|
17
|
+
this.$body = $(document.body)
|
18
|
+
this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
|
21
19
|
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
22
20
|
this.selector = (this.options.target || '') + ' .nav li > a'
|
23
21
|
this.offsets = []
|
@@ -25,12 +23,12 @@
|
|
25
23
|
this.activeTarget = null
|
26
24
|
this.scrollHeight = 0
|
27
25
|
|
28
|
-
this.$scrollElement.on('scroll.bs.scrollspy', process)
|
26
|
+
this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
|
29
27
|
this.refresh()
|
30
28
|
this.process()
|
31
29
|
}
|
32
30
|
|
33
|
-
ScrollSpy.VERSION = '3.
|
31
|
+
ScrollSpy.VERSION = '3.3.7'
|
34
32
|
|
35
33
|
ScrollSpy.DEFAULTS = {
|
36
34
|
offset: 10
|
@@ -41,20 +39,19 @@
|
|
41
39
|
}
|
42
40
|
|
43
41
|
ScrollSpy.prototype.refresh = function () {
|
44
|
-
var
|
45
|
-
var
|
42
|
+
var that = this
|
43
|
+
var offsetMethod = 'offset'
|
44
|
+
var offsetBase = 0
|
45
|
+
|
46
|
+
this.offsets = []
|
47
|
+
this.targets = []
|
48
|
+
this.scrollHeight = this.getScrollHeight()
|
46
49
|
|
47
50
|
if (!$.isWindow(this.$scrollElement[0])) {
|
48
51
|
offsetMethod = 'position'
|
49
52
|
offsetBase = this.$scrollElement.scrollTop()
|
50
53
|
}
|
51
54
|
|
52
|
-
this.offsets = []
|
53
|
-
this.targets = []
|
54
|
-
this.scrollHeight = this.getScrollHeight()
|
55
|
-
|
56
|
-
var self = this
|
57
|
-
|
58
55
|
this.$body
|
59
56
|
.find(this.selector)
|
60
57
|
.map(function () {
|
@@ -69,8 +66,8 @@
|
|
69
66
|
})
|
70
67
|
.sort(function (a, b) { return a[0] - b[0] })
|
71
68
|
.each(function () {
|
72
|
-
|
73
|
-
|
69
|
+
that.offsets.push(this[0])
|
70
|
+
that.targets.push(this[1])
|
74
71
|
})
|
75
72
|
}
|
76
73
|
|
@@ -91,14 +88,15 @@
|
|
91
88
|
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
92
89
|
}
|
93
90
|
|
94
|
-
if (activeTarget && scrollTop
|
95
|
-
|
91
|
+
if (activeTarget && scrollTop < offsets[0]) {
|
92
|
+
this.activeTarget = null
|
93
|
+
return this.clear()
|
96
94
|
}
|
97
95
|
|
98
96
|
for (i = offsets.length; i--;) {
|
99
97
|
activeTarget != targets[i]
|
100
98
|
&& scrollTop >= offsets[i]
|
101
|
-
&& (
|
99
|
+
&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
|
102
100
|
&& this.activate(targets[i])
|
103
101
|
}
|
104
102
|
}
|
@@ -106,13 +104,11 @@
|
|
106
104
|
ScrollSpy.prototype.activate = function (target) {
|
107
105
|
this.activeTarget = target
|
108
106
|
|
109
|
-
|
110
|
-
.parentsUntil(this.options.target, '.active')
|
111
|
-
.removeClass('active')
|
107
|
+
this.clear()
|
112
108
|
|
113
109
|
var selector = this.selector +
|
114
|
-
|
115
|
-
|
110
|
+
'[data-target="' + target + '"],' +
|
111
|
+
this.selector + '[href="' + target + '"]'
|
116
112
|
|
117
113
|
var active = $(selector)
|
118
114
|
.parents('li')
|
@@ -127,6 +123,12 @@
|
|
127
123
|
active.trigger('activate.bs.scrollspy')
|
128
124
|
}
|
129
125
|
|
126
|
+
ScrollSpy.prototype.clear = function () {
|
127
|
+
$(this.selector)
|
128
|
+
.parentsUntil(this.options.target, '.active')
|
129
|
+
.removeClass('active')
|
130
|
+
}
|
131
|
+
|
130
132
|
|
131
133
|
// SCROLLSPY PLUGIN DEFINITION
|
132
134
|
// ===========================
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: tab.js v3.
|
2
|
+
* Bootstrap: tab.js v3.3.7
|
3
3
|
* http://getbootstrap.com/javascript/#tabs
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2016 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -14,10 +14,14 @@
|
|
14
14
|
// ====================
|
15
15
|
|
16
16
|
var Tab = function (element) {
|
17
|
+
// jscs:disable requireDollarBeforejQueryAssignment
|
17
18
|
this.element = $(element)
|
19
|
+
// jscs:enable requireDollarBeforejQueryAssignment
|
18
20
|
}
|
19
21
|
|
20
|
-
Tab.VERSION = '3.
|
22
|
+
Tab.VERSION = '3.3.7'
|
23
|
+
|
24
|
+
Tab.TRANSITION_DURATION = 150
|
21
25
|
|
22
26
|
Tab.prototype.show = function () {
|
23
27
|
var $this = this.element
|
@@ -31,22 +35,30 @@
|
|
31
35
|
|
32
36
|
if ($this.parent('li').hasClass('active')) return
|
33
37
|
|
34
|
-
var previous = $ul.find('.active:last a')
|
35
|
-
var
|
36
|
-
relatedTarget:
|
38
|
+
var $previous = $ul.find('.active:last a')
|
39
|
+
var hideEvent = $.Event('hide.bs.tab', {
|
40
|
+
relatedTarget: $this[0]
|
41
|
+
})
|
42
|
+
var showEvent = $.Event('show.bs.tab', {
|
43
|
+
relatedTarget: $previous[0]
|
37
44
|
})
|
38
45
|
|
39
|
-
$
|
46
|
+
$previous.trigger(hideEvent)
|
47
|
+
$this.trigger(showEvent)
|
40
48
|
|
41
|
-
if (
|
49
|
+
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
|
42
50
|
|
43
51
|
var $target = $(selector)
|
44
52
|
|
45
53
|
this.activate($this.closest('li'), $ul)
|
46
54
|
this.activate($target, $target.parent(), function () {
|
55
|
+
$previous.trigger({
|
56
|
+
type: 'hidden.bs.tab',
|
57
|
+
relatedTarget: $this[0]
|
58
|
+
})
|
47
59
|
$this.trigger({
|
48
60
|
type: 'shown.bs.tab',
|
49
|
-
relatedTarget: previous
|
61
|
+
relatedTarget: $previous[0]
|
50
62
|
})
|
51
63
|
})
|
52
64
|
}
|
@@ -55,15 +67,21 @@
|
|
55
67
|
var $active = container.find('> .active')
|
56
68
|
var transition = callback
|
57
69
|
&& $.support.transition
|
58
|
-
&& $active.hasClass('fade')
|
70
|
+
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
|
59
71
|
|
60
72
|
function next() {
|
61
73
|
$active
|
62
74
|
.removeClass('active')
|
63
75
|
.find('> .dropdown-menu > .active')
|
64
|
-
|
76
|
+
.removeClass('active')
|
77
|
+
.end()
|
78
|
+
.find('[data-toggle="tab"]')
|
79
|
+
.attr('aria-expanded', false)
|
65
80
|
|
66
|
-
element
|
81
|
+
element
|
82
|
+
.addClass('active')
|
83
|
+
.find('[data-toggle="tab"]')
|
84
|
+
.attr('aria-expanded', true)
|
67
85
|
|
68
86
|
if (transition) {
|
69
87
|
element[0].offsetWidth // reflow for transition
|
@@ -72,17 +90,22 @@
|
|
72
90
|
element.removeClass('fade')
|
73
91
|
}
|
74
92
|
|
75
|
-
if (element.parent('.dropdown-menu')) {
|
76
|
-
element
|
93
|
+
if (element.parent('.dropdown-menu').length) {
|
94
|
+
element
|
95
|
+
.closest('li.dropdown')
|
96
|
+
.addClass('active')
|
97
|
+
.end()
|
98
|
+
.find('[data-toggle="tab"]')
|
99
|
+
.attr('aria-expanded', true)
|
77
100
|
}
|
78
101
|
|
79
102
|
callback && callback()
|
80
103
|
}
|
81
104
|
|
82
|
-
transition ?
|
105
|
+
$active.length && transition ?
|
83
106
|
$active
|
84
107
|
.one('bsTransitionEnd', next)
|
85
|
-
.emulateTransitionEnd(
|
108
|
+
.emulateTransitionEnd(Tab.TRANSITION_DURATION) :
|
86
109
|
next()
|
87
110
|
|
88
111
|
$active.removeClass('in')
|
@@ -120,9 +143,13 @@
|
|
120
143
|
// TAB DATA-API
|
121
144
|
// ============
|
122
145
|
|
123
|
-
|
146
|
+
var clickHandler = function (e) {
|
124
147
|
e.preventDefault()
|
125
148
|
Plugin.call($(this), 'show')
|
126
|
-
}
|
149
|
+
}
|
150
|
+
|
151
|
+
$(document)
|
152
|
+
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
|
153
|
+
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
|
127
154
|
|
128
155
|
}(jQuery);
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: tooltip.js v3.
|
2
|
+
* Bootstrap: tooltip.js v3.3.7
|
3
3
|
* http://getbootstrap.com/javascript/#tooltip
|
4
4
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
5
5
|
* ========================================================================
|
6
|
-
* Copyright 2011-
|
6
|
+
* Copyright 2011-2016 Twitter, Inc.
|
7
7
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
8
8
|
* ======================================================================== */
|
9
9
|
|
@@ -15,17 +15,20 @@
|
|
15
15
|
// ===============================
|
16
16
|
|
17
17
|
var Tooltip = function (element, options) {
|
18
|
-
this.type =
|
19
|
-
this.options =
|
20
|
-
this.enabled =
|
21
|
-
this.timeout =
|
22
|
-
this.hoverState =
|
18
|
+
this.type = null
|
19
|
+
this.options = null
|
20
|
+
this.enabled = null
|
21
|
+
this.timeout = null
|
22
|
+
this.hoverState = null
|
23
23
|
this.$element = null
|
24
|
+
this.inState = null
|
24
25
|
|
25
26
|
this.init('tooltip', element, options)
|
26
27
|
}
|
27
28
|
|
28
|
-
Tooltip.VERSION = '3.
|
29
|
+
Tooltip.VERSION = '3.3.7'
|
30
|
+
|
31
|
+
Tooltip.TRANSITION_DURATION = 150
|
29
32
|
|
30
33
|
Tooltip.DEFAULTS = {
|
31
34
|
animation: true,
|
@@ -48,7 +51,12 @@
|
|
48
51
|
this.type = type
|
49
52
|
this.$element = $(element)
|
50
53
|
this.options = this.getOptions(options)
|
51
|
-
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
|
54
|
+
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
|
55
|
+
this.inState = { click: false, hover: false, focus: false }
|
56
|
+
|
57
|
+
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
|
58
|
+
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
|
59
|
+
}
|
52
60
|
|
53
61
|
var triggers = this.options.trigger.split(' ')
|
54
62
|
|
@@ -108,6 +116,15 @@
|
|
108
116
|
$(obj.currentTarget).data('bs.' + this.type, self)
|
109
117
|
}
|
110
118
|
|
119
|
+
if (obj instanceof $.Event) {
|
120
|
+
self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
|
121
|
+
}
|
122
|
+
|
123
|
+
if (self.tip().hasClass('in') || self.hoverState == 'in') {
|
124
|
+
self.hoverState = 'in'
|
125
|
+
return
|
126
|
+
}
|
127
|
+
|
111
128
|
clearTimeout(self.timeout)
|
112
129
|
|
113
130
|
self.hoverState = 'in'
|
@@ -119,6 +136,14 @@
|
|
119
136
|
}, self.options.delay.show)
|
120
137
|
}
|
121
138
|
|
139
|
+
Tooltip.prototype.isInStateTrue = function () {
|
140
|
+
for (var key in this.inState) {
|
141
|
+
if (this.inState[key]) return true
|
142
|
+
}
|
143
|
+
|
144
|
+
return false
|
145
|
+
}
|
146
|
+
|
122
147
|
Tooltip.prototype.leave = function (obj) {
|
123
148
|
var self = obj instanceof this.constructor ?
|
124
149
|
obj : $(obj.currentTarget).data('bs.' + this.type)
|
@@ -128,6 +153,12 @@
|
|
128
153
|
$(obj.currentTarget).data('bs.' + this.type, self)
|
129
154
|
}
|
130
155
|
|
156
|
+
if (obj instanceof $.Event) {
|
157
|
+
self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
|
158
|
+
}
|
159
|
+
|
160
|
+
if (self.isInStateTrue()) return
|
161
|
+
|
131
162
|
clearTimeout(self.timeout)
|
132
163
|
|
133
164
|
self.hoverState = 'out'
|
@@ -145,7 +176,7 @@
|
|
145
176
|
if (this.hasContent() && this.enabled) {
|
146
177
|
this.$element.trigger(e)
|
147
178
|
|
148
|
-
var inDom = $.contains(
|
179
|
+
var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
|
149
180
|
if (e.isDefaultPrevented() || !inDom) return
|
150
181
|
var that = this
|
151
182
|
|
@@ -174,6 +205,7 @@
|
|
174
205
|
.data('bs.' + this.type, this)
|
175
206
|
|
176
207
|
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
208
|
+
this.$element.trigger('inserted.bs.' + this.type)
|
177
209
|
|
178
210
|
var pos = this.getPosition()
|
179
211
|
var actualWidth = $tip[0].offsetWidth
|
@@ -181,13 +213,12 @@
|
|
181
213
|
|
182
214
|
if (autoPlace) {
|
183
215
|
var orgPlacement = placement
|
184
|
-
var
|
185
|
-
var parentDim = this.getPosition($parent)
|
216
|
+
var viewportDim = this.getPosition(this.$viewport)
|
186
217
|
|
187
|
-
placement = placement == 'bottom' && pos.
|
188
|
-
placement == 'top' && pos.top
|
189
|
-
placement == 'right' && pos.right
|
190
|
-
placement == 'left' && pos.left
|
218
|
+
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
|
219
|
+
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
|
220
|
+
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
|
221
|
+
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
|
191
222
|
placement
|
192
223
|
|
193
224
|
$tip
|
@@ -200,14 +231,17 @@
|
|
200
231
|
this.applyPlacement(calculatedOffset, placement)
|
201
232
|
|
202
233
|
var complete = function () {
|
234
|
+
var prevHoverState = that.hoverState
|
203
235
|
that.$element.trigger('shown.bs.' + that.type)
|
204
236
|
that.hoverState = null
|
237
|
+
|
238
|
+
if (prevHoverState == 'out') that.leave(that)
|
205
239
|
}
|
206
240
|
|
207
241
|
$.support.transition && this.$tip.hasClass('fade') ?
|
208
242
|
$tip
|
209
243
|
.one('bsTransitionEnd', complete)
|
210
|
-
.emulateTransitionEnd(
|
244
|
+
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
|
211
245
|
complete()
|
212
246
|
}
|
213
247
|
}
|
@@ -225,8 +259,8 @@
|
|
225
259
|
if (isNaN(marginTop)) marginTop = 0
|
226
260
|
if (isNaN(marginLeft)) marginLeft = 0
|
227
261
|
|
228
|
-
offset.top
|
229
|
-
offset.left
|
262
|
+
offset.top += marginTop
|
263
|
+
offset.left += marginLeft
|
230
264
|
|
231
265
|
// $.fn.offset doesn't round pixel values
|
232
266
|
// so we use setOffset directly with our own function B-0
|
@@ -254,16 +288,18 @@
|
|
254
288
|
if (delta.left) offset.left += delta.left
|
255
289
|
else offset.top += delta.top
|
256
290
|
|
257
|
-
var
|
258
|
-
var
|
259
|
-
var arrowOffsetPosition =
|
291
|
+
var isVertical = /top|bottom/.test(placement)
|
292
|
+
var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
|
293
|
+
var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
|
260
294
|
|
261
295
|
$tip.offset(offset)
|
262
|
-
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition],
|
296
|
+
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
|
263
297
|
}
|
264
298
|
|
265
|
-
Tooltip.prototype.replaceArrow = function (delta, dimension,
|
266
|
-
this.arrow()
|
299
|
+
Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
|
300
|
+
this.arrow()
|
301
|
+
.css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
|
302
|
+
.css(isVertical ? 'top' : 'left', '')
|
267
303
|
}
|
268
304
|
|
269
305
|
Tooltip.prototype.setContent = function () {
|
@@ -274,16 +310,19 @@
|
|
274
310
|
$tip.removeClass('fade in top bottom left right')
|
275
311
|
}
|
276
312
|
|
277
|
-
Tooltip.prototype.hide = function () {
|
313
|
+
Tooltip.prototype.hide = function (callback) {
|
278
314
|
var that = this
|
279
|
-
var $tip = this
|
315
|
+
var $tip = $(this.$tip)
|
280
316
|
var e = $.Event('hide.bs.' + this.type)
|
281
317
|
|
282
|
-
this.$element.removeAttr('aria-describedby')
|
283
|
-
|
284
318
|
function complete() {
|
285
319
|
if (that.hoverState != 'in') $tip.detach()
|
286
|
-
that.$element
|
320
|
+
if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
|
321
|
+
that.$element
|
322
|
+
.removeAttr('aria-describedby')
|
323
|
+
.trigger('hidden.bs.' + that.type)
|
324
|
+
}
|
325
|
+
callback && callback()
|
287
326
|
}
|
288
327
|
|
289
328
|
this.$element.trigger(e)
|
@@ -292,10 +331,10 @@
|
|
292
331
|
|
293
332
|
$tip.removeClass('in')
|
294
333
|
|
295
|
-
$.support.transition &&
|
334
|
+
$.support.transition && $tip.hasClass('fade') ?
|
296
335
|
$tip
|
297
336
|
.one('bsTransitionEnd', complete)
|
298
|
-
.emulateTransitionEnd(
|
337
|
+
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
|
299
338
|
complete()
|
300
339
|
|
301
340
|
this.hoverState = null
|
@@ -305,7 +344,7 @@
|
|
305
344
|
|
306
345
|
Tooltip.prototype.fixTitle = function () {
|
307
346
|
var $e = this.$element
|
308
|
-
if ($e.attr('title') || typeof
|
347
|
+
if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
|
309
348
|
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
310
349
|
}
|
311
350
|
}
|
@@ -316,20 +355,30 @@
|
|
316
355
|
|
317
356
|
Tooltip.prototype.getPosition = function ($element) {
|
318
357
|
$element = $element || this.$element
|
358
|
+
|
319
359
|
var el = $element[0]
|
320
360
|
var isBody = el.tagName == 'BODY'
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
361
|
+
|
362
|
+
var elRect = el.getBoundingClientRect()
|
363
|
+
if (elRect.width == null) {
|
364
|
+
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
|
365
|
+
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
|
366
|
+
}
|
367
|
+
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
368
|
+
// Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
|
369
|
+
// See https://github.com/twbs/bootstrap/issues/20280
|
370
|
+
var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
|
371
|
+
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
372
|
+
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
|
373
|
+
|
374
|
+
return $.extend({}, elRect, scroll, outerDims, elOffset)
|
326
375
|
}
|
327
376
|
|
328
377
|
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
329
|
-
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2
|
330
|
-
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2
|
378
|
+
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
379
|
+
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
331
380
|
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
|
332
|
-
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width
|
381
|
+
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
|
333
382
|
|
334
383
|
}
|
335
384
|
|
@@ -353,7 +402,7 @@
|
|
353
402
|
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
|
354
403
|
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
|
355
404
|
delta.left = viewportDimensions.left - leftEdgeOffset
|
356
|
-
} else if (rightEdgeOffset > viewportDimensions.
|
405
|
+
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
|
357
406
|
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
|
358
407
|
}
|
359
408
|
}
|
@@ -379,21 +428,19 @@
|
|
379
428
|
}
|
380
429
|
|
381
430
|
Tooltip.prototype.tip = function () {
|
382
|
-
|
431
|
+
if (!this.$tip) {
|
432
|
+
this.$tip = $(this.options.template)
|
433
|
+
if (this.$tip.length != 1) {
|
434
|
+
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
|
435
|
+
}
|
436
|
+
}
|
437
|
+
return this.$tip
|
383
438
|
}
|
384
439
|
|
385
440
|
Tooltip.prototype.arrow = function () {
|
386
441
|
return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
|
387
442
|
}
|
388
443
|
|
389
|
-
Tooltip.prototype.validate = function () {
|
390
|
-
if (!this.$element[0].parentNode) {
|
391
|
-
this.hide()
|
392
|
-
this.$element = null
|
393
|
-
this.options = null
|
394
|
-
}
|
395
|
-
}
|
396
|
-
|
397
444
|
Tooltip.prototype.enable = function () {
|
398
445
|
this.enabled = true
|
399
446
|
}
|
@@ -416,12 +463,28 @@
|
|
416
463
|
}
|
417
464
|
}
|
418
465
|
|
419
|
-
|
466
|
+
if (e) {
|
467
|
+
self.inState.click = !self.inState.click
|
468
|
+
if (self.isInStateTrue()) self.enter(self)
|
469
|
+
else self.leave(self)
|
470
|
+
} else {
|
471
|
+
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
|
472
|
+
}
|
420
473
|
}
|
421
474
|
|
422
475
|
Tooltip.prototype.destroy = function () {
|
476
|
+
var that = this
|
423
477
|
clearTimeout(this.timeout)
|
424
|
-
this.hide(
|
478
|
+
this.hide(function () {
|
479
|
+
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
480
|
+
if (that.$tip) {
|
481
|
+
that.$tip.detach()
|
482
|
+
}
|
483
|
+
that.$tip = null
|
484
|
+
that.$arrow = null
|
485
|
+
that.$viewport = null
|
486
|
+
that.$element = null
|
487
|
+
})
|
425
488
|
}
|
426
489
|
|
427
490
|
|
@@ -434,7 +497,7 @@
|
|
434
497
|
var data = $this.data('bs.tooltip')
|
435
498
|
var options = typeof option == 'object' && option
|
436
499
|
|
437
|
-
if (!data && option
|
500
|
+
if (!data && /destroy|hide/.test(option)) return
|
438
501
|
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
|
439
502
|
if (typeof option == 'string') data[option]()
|
440
503
|
})
|