patternfly-sass 3.23.2 → 3.31.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +4 -0
- data/QUICKSTART.md +165 -0
- data/README.md +354 -112
- data/dist/fonts/FontAwesome.otf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Bold-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Bold-webfont.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Bold-webfont.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Bold-webfont.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Bold-webfont.woff2 +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-BoldItalic-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-BoldItalic-webfont.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-BoldItalic-webfont.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-BoldItalic-webfont.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-BoldItalic-webfont.woff2 +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBold-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBold-webfont.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBold-webfont.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBold-webfont.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBold-webfont.woff2 +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBoldItalic-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBoldItalic-webfont.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBoldItalic-webfont.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBoldItalic-webfont.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBoldItalic-webfont.woff2 +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Italic-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Italic-webfont.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Italic-webfont.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Italic-webfont.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Italic-webfont.woff2 +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Light-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Light-webfont.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Light-webfont.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Light-webfont.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Light-webfont.woff2 +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-LightItalic-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-LightItalic-webfont.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-LightItalic-webfont.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-LightItalic-webfont.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-LightItalic-webfont.woff2 +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Regular-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Regular-webfont.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Regular-webfont.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Regular-webfont.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Regular-webfont.woff2 +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Semibold-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Semibold-webfont.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Semibold-webfont.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Semibold-webfont.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Semibold-webfont.woff2 +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-SemiboldItalic-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-SemiboldItalic-webfont.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-SemiboldItalic-webfont.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/OpenSans-SemiboldItalic-webfont.woff2 +0 -0
- data/dist/fonts/PatternFlyIcons-webfont.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/PatternFlyIcons-webfont.svg +28 -0
- data/dist/fonts/PatternFlyIcons-webfont.ttf +0 -0
- data/dist/fonts/PatternFlyIcons-webfont.woff +0 -0
- data/dist/fonts/fontawesome-webfont.eot +0 -0
- data/dist/fonts/fontawesome-webfont.svg +2671 -0
- data/{assets/fonts/patternfly → dist/fonts}/fontawesome-webfont.ttf +0 -0
- data/dist/fonts/fontawesome-webfont.woff +0 -0
- data/dist/fonts/fontawesome-webfont.woff2 +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/glyphicons-halflings-regular.eot +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/glyphicons-halflings-regular.svg +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/glyphicons-halflings-regular.ttf +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/glyphicons-halflings-regular.woff +0 -0
- data/{assets/fonts/patternfly → dist/fonts}/glyphicons-halflings-regular.woff2 +0 -0
- data/{assets/images/patternfly → dist/img}/OpenShift-Logo-NoText.svg +0 -0
- data/{assets/images/patternfly → dist/img}/OpenShift-Logo-Text.svg +0 -0
- data/{assets/images/patternfly → dist/img}/OpenShift-logo.svg +0 -0
- data/{assets/images/patternfly → dist/img}/RH_Atomic-Logo-NoText.svg +0 -0
- data/{assets/images/patternfly → dist/img}/RH_Atomic-Logo-Text.svg +0 -0
- data/{assets/images/patternfly → dist/img}/RH_atomic.svg +0 -0
- data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-114.png +0 -0
- data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-144.png +0 -0
- data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-152.png +0 -0
- data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-180.png +0 -0
- data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-57.png +0 -0
- data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-72.png +0 -0
- data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-76.png +0 -0
- data/{assets/images/patternfly → dist/img}/bg-login.jpg +0 -0
- data/{assets/images/patternfly → dist/img}/bg-modal-about-pf.png +0 -0
- data/{assets/images/patternfly → dist/img}/bg-navbar-pf-alt.svg +0 -0
- data/{assets/images/patternfly → dist/img}/brand-alt.svg +0 -0
- data/{assets/images/patternfly → dist/img}/brand.svg +0 -0
- data/{assets/images/patternfly → dist/img}/favicon.ico +0 -0
- data/{assets/images/patternfly → dist/img}/kubernetes-Logo.svg +0 -0
- data/{assets/images/patternfly → dist/img}/kubernetes.svg +0 -0
- data/{assets/images/patternfly → dist/img}/logo-alt.svg +0 -0
- data/{assets/images/patternfly → dist/img}/logo.svg +0 -0
- data/{assets/images/patternfly → dist/img}/spinner-inverse-lg.gif +0 -0
- data/{assets/images/patternfly → dist/img}/spinner-inverse-sm.gif +0 -0
- data/{assets/images/patternfly → dist/img}/spinner-inverse-xs.gif +0 -0
- data/{assets/images/patternfly → dist/img}/spinner-inverse.gif +0 -0
- data/{assets/images/patternfly → dist/img}/spinner-lg.gif +0 -0
- data/{assets/images/patternfly → dist/img}/spinner-sm.gif +0 -0
- data/{assets/images/patternfly → dist/img}/spinner-xs.gif +0 -0
- data/{assets/images/patternfly → dist/img}/spinner.gif +0 -0
- data/dist/js/patternfly-functions-base.js +7 -0
- data/dist/js/patternfly-functions-charts.js +13 -0
- data/dist/js/patternfly-functions-colors.js +8 -0
- data/dist/js/patternfly-functions-count-chars.js +59 -0
- data/dist/js/patternfly-functions-data-tables.js +149 -0
- data/dist/js/patternfly-functions-fixed-heights.js +87 -0
- data/dist/js/patternfly-functions-list.js +79 -0
- data/dist/js/patternfly-functions-navigation.js +113 -0
- data/dist/js/patternfly-functions-popovers.js +37 -0
- data/dist/js/patternfly-functions-sidebar.js +31 -0
- data/dist/js/patternfly-functions-tree-grid.js +79 -0
- data/dist/js/patternfly-functions-vertical-nav.js +590 -0
- data/{assets/javascripts → dist/js}/patternfly-functions.js +133 -95
- data/dist/js/patternfly-functions.min.js +1 -0
- data/dist/js/patternfly-settings-base.js +16 -0
- data/dist/js/patternfly-settings-charts.js +423 -0
- data/dist/js/patternfly-settings-colors.js +88 -0
- data/{assets/javascripts → dist/js}/patternfly-settings.js +22 -13
- data/dist/js/patternfly-settings.min.js +1 -0
- data/{assets/javascripts → dist/js}/patternfly.dataTables.pfColVis.js +0 -0
- data/{assets/javascripts → dist/js}/patternfly.dataTables.pfEmpty.js +1 -1
- data/{assets/javascripts → dist/js}/patternfly.dataTables.pfEmpty.min.js +1 -1
- data/{assets/javascripts → dist/js}/patternfly.dataTables.pfFilter.js +0 -0
- data/dist/js/patternfly.dataTables.pfFilter.min.js +1 -0
- data/{assets/javascripts → dist/js}/patternfly.dataTables.pfPagination.js +1 -1
- data/dist/js/patternfly.dataTables.pfPagination.min.js +1 -0
- data/{assets/javascripts → dist/js}/patternfly.dataTables.pfResize.js +0 -0
- data/{assets/javascripts → dist/js}/patternfly.dataTables.pfResize.min.js +1 -1
- data/{assets/javascripts → dist/js}/patternfly.dataTables.pfSelect.js +0 -0
- data/{assets/javascripts → dist/js}/patternfly.dataTables.pfSelect.min.js +1 -1
- data/{assets/javascripts → dist/js}/patternfly.js +153 -106
- data/dist/js/patternfly.min.js +2 -0
- data/{assets/stylesheets → dist/sass}/_patternfly-compass.scss +1 -1
- data/{assets/stylesheets → dist/sass}/_patternfly-sprockets.scss +1 -1
- data/dist/sass/_patternfly.scss +145 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_about-modal.scss +2 -2
- data/{assets/stylesheets → dist/sass}/patternfly/_alerts.scss +0 -0
- data/dist/sass/patternfly/_application-launcher.scss +213 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_badges.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_blank-slate.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-combobox.scss +1 -1
- data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-datepicker.scss +13 -5
- data/dist/sass/patternfly/_bootstrap-mixin-overrides.scss +33 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-select.scss +15 -7
- data/dist/sass/patternfly/_bootstrap-slider.scss +66 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-switch.scss +1 -1
- data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-touchspin.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-treeview.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_breadcrumbs.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_buttons.scss +2 -2
- data/{assets/stylesheets → dist/sass}/patternfly/_card-view.scss +1 -1
- data/{assets/stylesheets → dist/sass}/patternfly/_cards.scss +2 -2
- data/{assets/stylesheets → dist/sass}/patternfly/_charts.scss +28 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_close.scss +1 -0
- data/dist/sass/patternfly/_color-variables.scss +85 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_datatables.scss +5 -5
- data/{assets/stylesheets → dist/sass}/patternfly/_dropdowns.scss +9 -4
- data/dist/sass/patternfly/_experimental-features.scss +48 -0
- data/dist/sass/patternfly/_fonts.scss +124 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_footer.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_forms.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_icons.scss +91 -7
- data/{assets/stylesheets → dist/sass}/patternfly/_infotip.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_labels.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_layouts.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_links.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_list-group.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_list-pf.scss +6 -3
- data/{assets/stylesheets → dist/sass}/patternfly/_list-view-dnd.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_list-view.scss +12 -12
- data/{assets/stylesheets → dist/sass}/patternfly/_login.scss +3 -7
- data/dist/sass/patternfly/_mixins.scss +81 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_modals.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_nav-vertical-alt.scss +1 -1
- data/{assets/stylesheets → dist/sass}/patternfly/_navbar-alt.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_navbar-vertical.scss +9 -2
- data/{assets/stylesheets → dist/sass}/patternfly/_navbar.scss +26 -2
- data/{assets/stylesheets → dist/sass}/patternfly/_notifications-drawer.scss +102 -15
- data/{assets/stylesheets → dist/sass}/patternfly/_pager.scss +1 -1
- data/{assets/stylesheets → dist/sass}/patternfly/_pagination.scss +2 -2
- data/{assets/stylesheets → dist/sass}/patternfly/_panels.scss +21 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_popovers.scss +1 -1
- data/{assets/stylesheets → dist/sass}/patternfly/_progress-bars.scss +1 -1
- data/{assets/stylesheets → dist/sass}/patternfly/_search.scss +1 -1
- data/{assets/stylesheets → dist/sass}/patternfly/_sidebar.scss +0 -0
- data/dist/sass/patternfly/_skip-to-content.scss +12 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_spinner.scss +16 -16
- data/{assets/stylesheets → dist/sass}/patternfly/_syntax-highlighting.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_table-view.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_tables.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_tabs.scss +1 -1
- data/{assets/stylesheets → dist/sass}/patternfly/_time-picker.scss +1 -3
- data/{assets/stylesheets → dist/sass}/patternfly/_toast.scss +7 -6
- data/{assets/stylesheets → dist/sass}/patternfly/_toolbar.scss +1 -1
- data/{assets/stylesheets → dist/sass}/patternfly/_tooltip.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_type.scss +0 -0
- data/{assets/stylesheets → dist/sass}/patternfly/_variables.scss +75 -9
- data/{assets/stylesheets → dist/sass}/patternfly/_vertical-nav.scss +41 -42
- data/{assets/stylesheets → dist/sass}/patternfly/_wizard.scss +175 -123
- data/dist/sass/patternfly/dependencies/bootstrap-combobox/combobox.scss +57 -0
- data/dist/sass/patternfly/dependencies/bootstrap-datepicker/datepicker.scss +235 -0
- data/dist/sass/patternfly/dependencies/bootstrap-datepicker/datepicker3.scss +251 -0
- data/dist/sass/patternfly/dependencies/bootstrap-select/bootstrap-select.scss +389 -0
- data/dist/sass/patternfly/dependencies/bootstrap-select/variables.scss +9 -0
- data/dist/sass/patternfly/dependencies/bootstrap-slider/_mixins.scss +25 -0
- data/dist/sass/patternfly/dependencies/bootstrap-slider/_rules.scss +246 -0
- data/dist/sass/patternfly/dependencies/bootstrap-slider/_variables.scss +28 -0
- data/dist/sass/patternfly/dependencies/bootstrap-slider/bootstrap-slider.scss +42 -0
- data/{assets/stylesheets/patternfly/lib → dist/sass/patternfly/dependencies/bootstrap-switch}/bootstrap-switch.scss +12 -10
- data/dist/sass/patternfly/dependencies/bootstrap-switch/build.scss +3 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins.scss +40 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/alerts.scss +14 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/background-variant.scss +9 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/border-radius.scss +18 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/buttons.scss +68 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/center-block.scss +7 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/clearfix.scss +22 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/forms.scss +85 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/gradients.scss +59 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/grid-framework.scss +98 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/grid.scss +122 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/hide-text.scss +21 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/image.scss +33 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/labels.scss +12 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/list-group.scss +29 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/nav-divider.scss +10 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/nav-vertical-align.scss +9 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/opacity.scss +8 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/pagination.scss +23 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/panels.scss +24 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/progress-bar.scss +10 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/reset-filter.scss +8 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/reset-text.scss +18 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/resize.scss +6 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/responsive-visibility.scss +15 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/size.scss +10 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/tab-focus.scss +9 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/table-row.scss +28 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/text-emphasis.scss +9 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/text-overflow.scss +8 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/vendor-prefixes.scss +227 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/variables.scss +862 -0
- data/{assets/stylesheets/patternfly/lib/bootstrap-touchspin.scss → dist/sass/patternfly/dependencies/bootstrap-touchspin/_jquery.bootstrap-touchspin.scss} +1 -1
- data/{assets/stylesheets/patternfly/lib/c3.scss → dist/sass/patternfly/dependencies/c3/_c3.scss} +7 -0
- data/dist/sass/patternfly/dependencies/eonasdan-bootstrap-datetimepicker/_bootstrap-datetimepicker.scss +344 -0
- data/dist/sass/patternfly/dependencies/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker-build.scss +16 -0
- data/lib/patternfly-sass.rb +4 -4
- data/lib/patternfly-sass/engine.rb +2 -2
- data/lib/patternfly-sass/version.rb +1 -2
- data/patternfly-sass.gemspec +16 -17
- metadata +249 -498
- data/.gitignore +0 -41
- data/.rspec +0 -3
- data/.rubocop.yml +0 -56
- data/.travis.yml +0 -51
- data/Gemfile +0 -3
- data/Rakefile +0 -130
- data/assets/fonts/patternfly/PatternFlyIcons-webfont.eot +0 -0
- data/assets/fonts/patternfly/PatternFlyIcons-webfont.ttf +0 -0
- data/assets/fonts/patternfly/PatternFlyIcons-webfont.woff +0 -0
- data/assets/fonts/patternfly/fontawesome-webfont.eot +0 -0
- data/assets/fonts/patternfly/fontawesome-webfont.svg +0 -685
- data/assets/fonts/patternfly/fontawesome-webfont.woff +0 -0
- data/assets/fonts/patternfly/fontawesome-webfont.woff2 +0 -0
- data/assets/javascripts/patternfly-functions.min.js +0 -1
- data/assets/javascripts/patternfly-settings.min.js +0 -1
- data/assets/javascripts/patternfly.dataTables.pfFilter.min.js +0 -1
- data/assets/javascripts/patternfly.dataTables.pfPagination.min.js +0 -1
- data/assets/javascripts/patternfly.min.js +0 -2
- data/assets/stylesheets/_patternfly.scss +0 -108
- data/assets/stylesheets/patternfly/_color-variables.scss +0 -84
- data/assets/stylesheets/patternfly/_fonts.scss +0 -124
- data/assets/stylesheets/patternfly/_mixin_overrides.scss +0 -65
- data/assets/stylesheets/patternfly/_mixins.scss +0 -120
- data/assets/stylesheets/patternfly/lib/bootstrap-datepicker.scss +0 -678
- data/assets/stylesheets/patternfly/lib/bootstrap-datetimepicker.scss +0 -374
- data/assets/stylesheets/patternfly/lib/bootstrap-select.scss +0 -282
- data/assets/stylesheets/patternfly/lib/patternfly-bootstrap-combobox.scss +0 -44
- data/bower.json +0 -53
- data/package.json +0 -70
- data/spec/compare_spec.rb +0 -60
- data/spec/html/about-modal.html +0 -77
- data/spec/html/accordions.html +0 -336
- data/spec/html/alerts.html +0 -106
- data/spec/html/area-charts.html +0 -103
- data/spec/html/badges.html +0 -73
- data/spec/html/bar-charts.html +0 -350
- data/spec/html/basic.html +0 -796
- data/spec/html/blank-slate.html +0 -81
- data/spec/html/bootstrap-combobox.html +0 -344
- data/spec/html/bootstrap-datepicker.html +0 -148
- data/spec/html/bootstrap-select.html +0 -213
- data/spec/html/bootstrap-switch.html +0 -267
- data/spec/html/bootstrap-switch.js +0 -61
- data/spec/html/bootstrap-touchspin.html +0 -210
- data/spec/html/bootstrap-treeview-2.html +0 -296
- data/spec/html/bootstrap-treeview.html +0 -383
- data/spec/html/breadcrumbs.html +0 -52
- data/spec/html/buttons.html +0 -556
- data/spec/html/card-view-card-variations.html +0 -201
- data/spec/html/card-view-multi-select.html +0 -698
- data/spec/html/card-view-single-select.html +0 -432
- data/spec/html/cards.html +0 -899
- data/spec/html/code.html +0 -83
- data/spec/html/dashboard.html +0 -353
- data/spec/html/dist/css/patternfly-additions.css +0 -7202
- data/spec/html/dist/css/patternfly-additions.css.map +0 -1
- data/spec/html/dist/css/patternfly-additions.min.css +0 -5
- data/spec/html/dist/css/patternfly-additions.min.css.map +0 -1
- data/spec/html/dist/css/patternfly.css +0 -10355
- data/spec/html/dist/css/patternfly.css.map +0 -1
- data/spec/html/dist/css/patternfly.min.css +0 -8
- data/spec/html/dist/css/patternfly.min.css.map +0 -1
- data/spec/html/donut-charts.html +0 -235
- data/spec/html/dropdowns.html +0 -138
- data/spec/html/form.html +0 -281
- data/spec/html/forms.html +0 -875
- data/spec/html/horizontal-navigation.html +0 -765
- data/spec/html/icons.html +0 -447
- data/spec/html/img/dashboard-3.png +0 -0
- data/spec/html/index.html +0 -284
- data/spec/html/infotip.html +0 -89
- data/spec/html/labels.html +0 -108
- data/spec/html/line-charts.html +0 -178
- data/spec/html/list-group.html +0 -111
- data/spec/html/list-pf.html +0 -529
- data/spec/html/list-view-compound-expansion.html +0 -1720
- data/spec/html/list-view-rows.html +0 -597
- data/spec/html/list-view-simple-expansion.html +0 -1003
- data/spec/html/list-view.html +0 -614
- data/spec/html/login.html +0 -92
- data/spec/html/modals.html +0 -83
- data/spec/html/navbar.html +0 -4680
- data/spec/html/notification-drawer-horizontal-nav.html +0 -1503
- data/spec/html/notification-drawer-vertical-nav.html +0 -1631
- data/spec/html/pagination-card-view.html +0 -560
- data/spec/html/pagination-list-view.html +0 -1204
- data/spec/html/pagination-table-view.html +0 -813
- data/spec/html/pagination.html +0 -320
- data/spec/html/panels.html +0 -113
- data/spec/html/pie-charts.html +0 -180
- data/spec/html/popovers.html +0 -115
- data/spec/html/progress-bars.html +0 -335
- data/spec/html/search.html +0 -171
- data/spec/html/spinner.html +0 -77
- data/spec/html/tab.html +0 -842
- data/spec/html/table-view-columns.html +0 -495
- data/spec/html/table-view-navbar.html +0 -814
- data/spec/html/table-view.html +0 -688
- data/spec/html/tables.html +0 -540
- data/spec/html/tabs.html +0 -279
- data/spec/html/tests.css +0 -16
- data/spec/html/time-picker.html +0 -75
- data/spec/html/toast.html +0 -87
- data/spec/html/toolbar.html +0 -268
- data/spec/html/tooltip.html +0 -71
- data/spec/html/typography-2.css +0 -10
- data/spec/html/typography-2.html +0 -313
- data/spec/html/typography.html +0 -212
- data/spec/html/utilization-bar-charts.html +0 -69
- data/spec/html/vertical-navigation-primary-only.html +0 -844
- data/spec/html/vertical-navigation-with-badges.html +0 -1184
- data/spec/html/vertical-navigation-with-secondary.html +0 -911
- data/spec/html/vertical-navigation-with-tertiary-no-icons.html +0 -1085
- data/spec/html/vertical-navigation-with-tertiary-pins.html +0 -1085
- data/spec/html/wizard.html +0 -756
- data/spec/main.html +0 -16
- data/spec/spec_helper.rb +0 -9
- data/tasks/converter.rb +0 -353
Binary file
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Util: PatternFly C3 Chart Defaults
|
2
|
+
(function ($) {
|
3
|
+
'use strict';
|
4
|
+
if (patternfly !== undefined) {
|
5
|
+
$.fn.pfSetDonutChartTitle = patternfly.pfSetDonutChartTitle;
|
6
|
+
$.fn.pfDonutTooltipContents = patternfly.pfDonutTooltipContents;
|
7
|
+
$.fn.pfGetUtilizationDonutTooltipContentsFn = patternfly.pfGetUtilizationDonutTooltipContentsFn;
|
8
|
+
$.fn.pfGetBarChartTooltipContentsFn = patternfly.pfGetBarChartTooltipContentsFn;
|
9
|
+
$.fn.pfSingleLineChartTooltipContentsFn = patternfly.pfSingleLineChartTooltipContentsFn;
|
10
|
+
$.fn.pfPieTooltipContents = patternfly.pfPieTooltipContents;
|
11
|
+
$.fn.c3ChartDefaults = patternfly.c3ChartDefaults;
|
12
|
+
}
|
13
|
+
}(jQuery));
|
@@ -0,0 +1,59 @@
|
|
1
|
+
// Count and Display Remaining Characters
|
2
|
+
(function ($) {
|
3
|
+
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
$.fn.countRemainingChars = function (options) {
|
7
|
+
|
8
|
+
var settings = $.extend({
|
9
|
+
// These are the defaults.
|
10
|
+
charsMaxLimit: 100,
|
11
|
+
charsWarnRemaining: 5,
|
12
|
+
blockInputAtMaxLimit: false
|
13
|
+
}, options),
|
14
|
+
$taFld = this,
|
15
|
+
$countFld = $('#' + settings.countFld).text(settings.charsMaxLimit),
|
16
|
+
charsRemainingFn = function (charsLength) {
|
17
|
+
var charsRemaining = settings.charsMaxLimit - charsLength;
|
18
|
+
$countFld.text(charsRemaining);
|
19
|
+
$countFld.toggleClass('chars-warn-remaining-pf', charsRemaining <= settings.charsWarnRemaining);
|
20
|
+
if (charsRemaining < 0) {
|
21
|
+
$taFld.trigger("overCharsMaxLimitEvent", $taFld.attr('id'));
|
22
|
+
} else {
|
23
|
+
$taFld.trigger("underCharsMaxLimitEvent", $taFld.attr('id'));
|
24
|
+
}
|
25
|
+
};
|
26
|
+
|
27
|
+
this.on('paste', function (event) {
|
28
|
+
setTimeout(function () {
|
29
|
+
var charsLength = $taFld.val().length, maxTxt;
|
30
|
+
|
31
|
+
if (settings.blockInputAtMaxLimit && charsLength > settings.charsMaxLimit) {
|
32
|
+
maxTxt = $taFld.val();
|
33
|
+
maxTxt = maxTxt.substring(0, settings.charsMaxLimit);
|
34
|
+
$taFld.val(maxTxt);
|
35
|
+
charsLength = $taFld.val().length;
|
36
|
+
}
|
37
|
+
|
38
|
+
charsRemainingFn(charsLength);
|
39
|
+
}, 100);
|
40
|
+
});
|
41
|
+
|
42
|
+
this.keyup(function (event) {
|
43
|
+
charsRemainingFn($taFld.val().length);
|
44
|
+
});
|
45
|
+
|
46
|
+
this.keydown(function (event) {
|
47
|
+
var charsLength = $taFld.val().length;
|
48
|
+
|
49
|
+
if (settings.blockInputAtMaxLimit && charsLength >= settings.charsMaxLimit) {
|
50
|
+
// Except backspace
|
51
|
+
if (event.keyCode !== 8) {
|
52
|
+
event.preventDefault();
|
53
|
+
}
|
54
|
+
}
|
55
|
+
});
|
56
|
+
|
57
|
+
return this;
|
58
|
+
};
|
59
|
+
}(jQuery));
|
@@ -0,0 +1,149 @@
|
|
1
|
+
// Util: DataTables Settings
|
2
|
+
(function ($) {
|
3
|
+
'use strict';
|
4
|
+
if ($.fn.dataTableExt) {
|
5
|
+
/* Set the defaults for DataTables initialisation */
|
6
|
+
$.extend(true, $.fn.dataTable.defaults, {
|
7
|
+
"bDestroy": true,
|
8
|
+
"bAutoWidth": false,
|
9
|
+
"iDisplayLength": 20,
|
10
|
+
"sDom":
|
11
|
+
"<'dataTables_header' f i r >" +
|
12
|
+
"<'table-responsive' t >" +
|
13
|
+
"<'dataTables_footer' p >",
|
14
|
+
"oLanguage": {
|
15
|
+
"sInfo": "Showing <b>_START_</b> to <b>_END_</b> of <b>_TOTAL_</b> Items",
|
16
|
+
"sInfoFiltered" : "(of <b>_MAX_</b>)",
|
17
|
+
"sInfoEmpty" : "Showing <b>0</b> Results",
|
18
|
+
"sZeroRecords":
|
19
|
+
"<p>Suggestions</p>" +
|
20
|
+
"<ul>" +
|
21
|
+
"<li>Check the javascript regular expression syntax of the search term.</li>" +
|
22
|
+
"<li>Check that the correct menu option is chosen (token ID vs. user ID).</li>" +
|
23
|
+
"<li>Use wildcards (* to match 0 or more characters, + to match 1 or more characters, ? to match 0 or 1 character).</li>" +
|
24
|
+
"<li>Clear the search field, then click Search to return to the 20 most recent records.</li>" +
|
25
|
+
"</ul>",
|
26
|
+
"sSearch": ""
|
27
|
+
},
|
28
|
+
"sPaginationType": "bootstrap_input",
|
29
|
+
"oSearch": {
|
30
|
+
"sSearch": "",
|
31
|
+
"bRegex": true,
|
32
|
+
"bSmart": false
|
33
|
+
}
|
34
|
+
});
|
35
|
+
|
36
|
+
/* Default class modification */
|
37
|
+
$.extend($.fn.dataTableExt.oStdClasses, {
|
38
|
+
"sWrapper": "dataTables_wrapper"
|
39
|
+
});
|
40
|
+
|
41
|
+
/* API method to get paging information */
|
42
|
+
$.fn.dataTableExt.oApi.fnPagingInfo = function (oSettings) {
|
43
|
+
return {
|
44
|
+
"iStart": oSettings._iDisplayStart,
|
45
|
+
"iEnd": oSettings.fnDisplayEnd(),
|
46
|
+
"iLength": oSettings._iDisplayLength,
|
47
|
+
"iTotal": oSettings.fnRecordsTotal(),
|
48
|
+
"iFilteredTotal": oSettings.fnRecordsDisplay(),
|
49
|
+
"iPage": oSettings._iDisplayLength === -1 ? 0 : Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength),
|
50
|
+
"iTotalPages": oSettings._iDisplayLength === -1 ? 0 : Math.ceil(oSettings.fnRecordsDisplay() / oSettings._iDisplayLength)
|
51
|
+
};
|
52
|
+
};
|
53
|
+
|
54
|
+
/* Combination of Bootstrap + Input Text style pagination control */
|
55
|
+
$.extend($.fn.dataTableExt.oPagination, {
|
56
|
+
"bootstrap_input": {
|
57
|
+
"fnInit": function (oSettings, nPaging, fnDraw) {
|
58
|
+
var fnClickHandler = function (e) {
|
59
|
+
e.preventDefault();
|
60
|
+
if (oSettings.oApi._fnPageChange(oSettings, e.data.action)) {
|
61
|
+
fnDraw(oSettings);
|
62
|
+
}
|
63
|
+
},
|
64
|
+
els,
|
65
|
+
nInput;
|
66
|
+
|
67
|
+
$(nPaging).append(
|
68
|
+
'<ul class="pagination">' +
|
69
|
+
' <li class="first disabled"><span class="i fa fa-angle-double-left"></span></li>' +
|
70
|
+
' <li class="prev disabled"><span class="i fa fa-angle-left"></span></li>' +
|
71
|
+
'</ul>' +
|
72
|
+
'<div class="pagination-input">' +
|
73
|
+
' <input type="text" class="paginate_input">' +
|
74
|
+
' <span class="paginate_of">of <b>3</b></span>' +
|
75
|
+
'</div>' +
|
76
|
+
'<ul class="pagination">' +
|
77
|
+
' <li class="next disabled"><span class="i fa fa-angle-right"></span></li>' +
|
78
|
+
' <li class="last disabled"><span class="i fa fa-angle-double-right"></span></li>' +
|
79
|
+
'</ul>'
|
80
|
+
);
|
81
|
+
|
82
|
+
els = $('li', nPaging);
|
83
|
+
$(els[0]).bind('click.DT', { action: "first" }, fnClickHandler);
|
84
|
+
$(els[1]).bind('click.DT', { action: "previous" }, fnClickHandler);
|
85
|
+
$(els[2]).bind('click.DT', { action: "next" }, fnClickHandler);
|
86
|
+
$(els[3]).bind('click.DT', { action: "last" }, fnClickHandler);
|
87
|
+
|
88
|
+
nInput = $('input', nPaging);
|
89
|
+
$(nInput).keyup(function (e) {
|
90
|
+
var iNewStart;
|
91
|
+
if (e.which === 38 || e.which === 39) {
|
92
|
+
this.value += 1;
|
93
|
+
} else if ((e.which === 37 || e.which === 40) && this.value > 1) {
|
94
|
+
this.value -= 1;
|
95
|
+
}
|
96
|
+
|
97
|
+
if (this.value === "" || !this.value.match(/[0-9]/)) {
|
98
|
+
/* Nothing entered or non-numeric character */
|
99
|
+
return;
|
100
|
+
}
|
101
|
+
|
102
|
+
iNewStart = oSettings._iDisplayLength * (this.value - 1);
|
103
|
+
if (iNewStart >= oSettings.fnRecordsDisplay()) {
|
104
|
+
/* Display overrun */
|
105
|
+
oSettings._iDisplayStart = (Math.ceil((oSettings.fnRecordsDisplay() - 1) /
|
106
|
+
oSettings._iDisplayLength) - 1) * oSettings._iDisplayLength;
|
107
|
+
fnDraw(oSettings);
|
108
|
+
return;
|
109
|
+
}
|
110
|
+
|
111
|
+
oSettings._iDisplayStart = iNewStart;
|
112
|
+
fnDraw(oSettings);
|
113
|
+
});
|
114
|
+
},
|
115
|
+
|
116
|
+
"fnUpdate": function (oSettings, fnDraw) {
|
117
|
+
var oPaging = oSettings.oInstance.fnPagingInfo(),
|
118
|
+
an = oSettings.aanFeatures.p,
|
119
|
+
ien = an.length,
|
120
|
+
iPages = Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength),
|
121
|
+
iCurrentPage = Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength) + 1,
|
122
|
+
i;
|
123
|
+
|
124
|
+
for (i = 0; i < ien; i += 1) {
|
125
|
+
$('.paginate_input', an[i]).val(iCurrentPage)
|
126
|
+
.siblings('.paginate_of').find('b').html(iPages);
|
127
|
+
|
128
|
+
// Add / remove disabled classes from the static elements
|
129
|
+
if (oPaging.iPage === 0) {
|
130
|
+
$('li.first', an[i]).addClass('disabled');
|
131
|
+
$('li.prev', an[i]).addClass('disabled');
|
132
|
+
} else {
|
133
|
+
$('li.first', an[i]).removeClass('disabled');
|
134
|
+
$('li.prev', an[i]).removeClass('disabled');
|
135
|
+
}
|
136
|
+
|
137
|
+
if (oPaging.iPage === oPaging.iTotalPages - 1 || oPaging.iTotalPages === 0) {
|
138
|
+
$('li.next', an[i]).addClass('disabled');
|
139
|
+
$('li.last', an[i]).addClass('disabled');
|
140
|
+
} else {
|
141
|
+
$('li.next', an[i]).removeClass('disabled');
|
142
|
+
$('li.last', an[i]).removeClass('disabled');
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
});
|
148
|
+
}
|
149
|
+
}(jQuery));
|
@@ -0,0 +1,87 @@
|
|
1
|
+
// Util: PatternFly Collapse with fixed heights
|
2
|
+
// Update the max-height of collapse elements based on the parent container's height.
|
3
|
+
(function ($) {
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
$.fn.initCollapseHeights = function (scrollSelector) {
|
7
|
+
var parentElement = this, setCollapseHeights, targetScrollSelector = scrollSelector;
|
8
|
+
|
9
|
+
setCollapseHeights = function () {
|
10
|
+
var height, openPanel, contentHeight, bodyHeight, overflowY = 'hidden';
|
11
|
+
|
12
|
+
height = parentElement.height();
|
13
|
+
|
14
|
+
// Close any open panel
|
15
|
+
openPanel = parentElement.find('.collapse.in');
|
16
|
+
if (openPanel && openPanel.length > 0) {
|
17
|
+
openPanel.removeClass('in');
|
18
|
+
}
|
19
|
+
|
20
|
+
// Determine the necessary height for the closed content
|
21
|
+
contentHeight = 0;
|
22
|
+
parentElement.children().each($.proxy(function (i, element) {
|
23
|
+
var $element = $(element);
|
24
|
+
contentHeight += $element.outerHeight(true);
|
25
|
+
}, parentElement)).end();
|
26
|
+
|
27
|
+
// Determine the height remaining for opened collapse panels
|
28
|
+
bodyHeight = height - contentHeight;
|
29
|
+
|
30
|
+
// Make sure we have enough height to be able to scroll the contents if necessary
|
31
|
+
if (bodyHeight < 25) {
|
32
|
+
bodyHeight = 25;
|
33
|
+
|
34
|
+
// Allow the parent to scroll so the child elements are accessible
|
35
|
+
overflowY = 'auto';
|
36
|
+
}
|
37
|
+
|
38
|
+
// Reopen the initially opened panel
|
39
|
+
if (openPanel && openPanel.length > 0) {
|
40
|
+
openPanel.addClass("in");
|
41
|
+
}
|
42
|
+
|
43
|
+
setTimeout(function () {
|
44
|
+
// Set the max-height for the collapse panels
|
45
|
+
parentElement.find('[data-toggle="collapse"]').each($.proxy(function (i, element) {
|
46
|
+
var $element, selector, $target, scrollElement, innerHeight = 0;
|
47
|
+
$element = $(element);
|
48
|
+
|
49
|
+
// Determine the selector to find the target
|
50
|
+
selector = $element.attr('data-target');
|
51
|
+
if (!selector) {
|
52
|
+
selector = $element.attr('href');
|
53
|
+
}
|
54
|
+
|
55
|
+
// Determine the scroll element (either the target or the child of the target based on the given selector)
|
56
|
+
$target = $(selector);
|
57
|
+
scrollElement = $target;
|
58
|
+
if (targetScrollSelector) {
|
59
|
+
scrollElement = $target.find(targetScrollSelector);
|
60
|
+
if (scrollElement.length === 1) {
|
61
|
+
innerHeight = 0;
|
62
|
+
$target.children().each($.proxy(function (j, sibling) {
|
63
|
+
var $sibling = $(sibling);
|
64
|
+
if (sibling !== scrollElement[0]) {
|
65
|
+
innerHeight += $sibling.outerHeight(true);
|
66
|
+
}
|
67
|
+
}, $target)).end();
|
68
|
+
bodyHeight -= innerHeight;
|
69
|
+
} else {
|
70
|
+
scrollElement = $target;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
// Set the max-height and vertical scroll of the scroll element
|
74
|
+
scrollElement.css({'max-height': (bodyHeight - innerHeight) + 'px', 'overflow-y': 'auto'});
|
75
|
+
}, parentElement)).end();
|
76
|
+
|
77
|
+
parentElement.css({'overflow-y': overflowY});
|
78
|
+
}, 100);
|
79
|
+
};
|
80
|
+
|
81
|
+
setCollapseHeights();
|
82
|
+
|
83
|
+
// Update on window resizing
|
84
|
+
$(window).resize(setCollapseHeights);
|
85
|
+
|
86
|
+
};
|
87
|
+
}(jQuery));
|
@@ -0,0 +1,79 @@
|
|
1
|
+
// PatternFly pf-list
|
2
|
+
(function ($) {
|
3
|
+
'use strict';
|
4
|
+
|
5
|
+
$.fn.pfList = function () {
|
6
|
+
function init (list) {
|
7
|
+
// Ensure the state of the expansion elements is consistent
|
8
|
+
list.find('[data-list=expansion], .list-pf-item, .list-pf-expansion').each(function (index, element) {
|
9
|
+
var $expansion = $(element),
|
10
|
+
$collapse = $expansion.find('.collapse').first(),
|
11
|
+
expanded = $collapse.hasClass('in');
|
12
|
+
updateChevron($expansion, expanded);
|
13
|
+
if ($expansion.hasClass('list-pf-item')) {
|
14
|
+
updateActive($expansion, expanded);
|
15
|
+
}
|
16
|
+
});
|
17
|
+
list.find('.list-pf-container').each(function (index, element) {
|
18
|
+
var $element = $(element);
|
19
|
+
// The toggle element is the element with the data-list=toggle attribute
|
20
|
+
// or the entire .list-pf-container as a fallback
|
21
|
+
var $toggles = $element.find('[data-list=toggle]');
|
22
|
+
$toggles.length || ($toggles = $element);
|
23
|
+
$toggles.on('keydown', function (event) {
|
24
|
+
if (event.keyCode === 13 || event.keyCode === 32) {
|
25
|
+
toggleCollapse(this);
|
26
|
+
event.stopPropagation();
|
27
|
+
event.preventDefault();
|
28
|
+
}
|
29
|
+
});
|
30
|
+
$toggles.on('click', function (event) {
|
31
|
+
toggleCollapse(this);
|
32
|
+
event.stopPropagation();
|
33
|
+
event.preventDefault();
|
34
|
+
});
|
35
|
+
});
|
36
|
+
}
|
37
|
+
|
38
|
+
function toggleCollapse (toggle) {
|
39
|
+
var $toggle, $expansion, $collapse, expanded, $listItem;
|
40
|
+
$toggle = $(toggle);
|
41
|
+
// Find the parent expansion of the toggle
|
42
|
+
$expansion = $toggle.parentsUntil('.list-pf', '[data-list=expansion]').first();
|
43
|
+
$expansion.length || ($expansion = $toggle.closest('.list-pf-item, .list-pf-expansion'));
|
44
|
+
|
45
|
+
// toggle the "in" class of its first .collapse child
|
46
|
+
$collapse = $expansion.find('.collapse').first();
|
47
|
+
$collapse.toggleClass('in');
|
48
|
+
|
49
|
+
// update the state of the expansion element
|
50
|
+
updateChevron($expansion, $collapse.hasClass('in'));
|
51
|
+
$listItem = $expansion.closest('.list-pf-item');
|
52
|
+
updateActive($listItem, $listItem.find('.collapse').first().hasClass('in'));
|
53
|
+
}
|
54
|
+
|
55
|
+
function updateActive ($listItem, expanded) {
|
56
|
+
// Find the closest .list-pf-item of the expansion, and set its "active" class
|
57
|
+
if (expanded) {
|
58
|
+
$listItem.addClass('active');
|
59
|
+
} else {
|
60
|
+
$listItem.removeClass('active');
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
function updateChevron ($expansion, expanded) {
|
65
|
+
var $chevron = $expansion.find('.list-pf-chevron .fa').first();
|
66
|
+
if (expanded) {
|
67
|
+
$chevron.removeClass('fa-angle-right');
|
68
|
+
$chevron.addClass('fa-angle-down');
|
69
|
+
} else {
|
70
|
+
$chevron.addClass('fa-angle-right');
|
71
|
+
$chevron.removeClass('fa-angle-down');
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
init(this);
|
76
|
+
|
77
|
+
return this;
|
78
|
+
};
|
79
|
+
}(jQuery));
|