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
@@ -0,0 +1,113 @@
|
|
1
|
+
// Util: PatternFly Collapsible Left Hand Navigation
|
2
|
+
// Must have navbar-toggle in navbar-pf-alt for expand/collapse
|
3
|
+
(function ($) {
|
4
|
+
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
$.fn.navigation = function () {
|
8
|
+
|
9
|
+
var navElement = $('.layout-pf-alt-fixed .nav-pf-vertical-alt'),
|
10
|
+
bodyContentElement = $('.container-pf-alt-nav-pf-vertical-alt'),
|
11
|
+
toggleNavBarButton = $('.navbar-toggle'),
|
12
|
+
explicitCollapse = false,
|
13
|
+
checkNavState = function () {
|
14
|
+
var width = $(window).width();
|
15
|
+
|
16
|
+
//Always remove the hidden & peek class
|
17
|
+
navElement.removeClass('hidden show-mobile-nav collapsed');
|
18
|
+
|
19
|
+
//Set the body class back to the default
|
20
|
+
bodyContentElement.removeClass('collapsed-nav hidden-nav');
|
21
|
+
|
22
|
+
// Check to see if the nav needs to collapse
|
23
|
+
if (width < $.pfBreakpoints.desktop || explicitCollapse) {
|
24
|
+
navElement.addClass('collapsed');
|
25
|
+
bodyContentElement.addClass('collapsed-nav');
|
26
|
+
}
|
27
|
+
|
28
|
+
// Check to see if we need to move down to the mobile state
|
29
|
+
if (width < $.pfBreakpoints.tablet) {
|
30
|
+
//Set the nav to being hidden
|
31
|
+
navElement.addClass('hidden');
|
32
|
+
|
33
|
+
//Make sure this is expanded
|
34
|
+
navElement.removeClass('collapsed');
|
35
|
+
|
36
|
+
//Set the body class to the correct state
|
37
|
+
bodyContentElement.removeClass('collapsed-nav');
|
38
|
+
bodyContentElement.addClass('hidden-nav');
|
39
|
+
}
|
40
|
+
},
|
41
|
+
collapseMenu = function () {
|
42
|
+
//Make sure this is expanded
|
43
|
+
navElement.addClass('collapsed');
|
44
|
+
//Set the body class to the correct state
|
45
|
+
bodyContentElement.addClass('collapsed-nav');
|
46
|
+
|
47
|
+
explicitCollapse = true;
|
48
|
+
},
|
49
|
+
enableTransitions = function () {
|
50
|
+
// enable transitions only when toggleNavBarButton is clicked or window is resized
|
51
|
+
$('html').addClass('transitions');
|
52
|
+
},
|
53
|
+
expandMenu = function () {
|
54
|
+
//Make sure this is expanded
|
55
|
+
navElement.removeClass('collapsed');
|
56
|
+
//Set the body class to the correct state
|
57
|
+
bodyContentElement.removeClass('collapsed-nav');
|
58
|
+
|
59
|
+
explicitCollapse = false;
|
60
|
+
},
|
61
|
+
bindMenuBehavior = function () {
|
62
|
+
toggleNavBarButton.on('click', function (e) {
|
63
|
+
var inMobileState = bodyContentElement.hasClass('hidden-nav');
|
64
|
+
enableTransitions();
|
65
|
+
|
66
|
+
if (inMobileState && navElement.hasClass('show-mobile-nav')) {
|
67
|
+
//In mobile state just need to hide the nav
|
68
|
+
navElement.removeClass('show-mobile-nav');
|
69
|
+
} else if (inMobileState) {
|
70
|
+
navElement.addClass('show-mobile-nav');
|
71
|
+
} else if (navElement.hasClass('collapsed')) {
|
72
|
+
expandMenu();
|
73
|
+
} else {
|
74
|
+
collapseMenu();
|
75
|
+
}
|
76
|
+
});
|
77
|
+
},
|
78
|
+
setTooltips = function () {
|
79
|
+
$('.nav-pf-vertical-alt [data-toggle="tooltip"]').tooltip({'container': 'body', 'delay': { 'show': '500', 'hide': '200' }});
|
80
|
+
|
81
|
+
$(".nav-pf-vertical-alt").on("show.bs.tooltip", function (e) {
|
82
|
+
return $(this).hasClass("collapsed");
|
83
|
+
});
|
84
|
+
|
85
|
+
},
|
86
|
+
init = function () {
|
87
|
+
//Set correct state on load
|
88
|
+
checkNavState();
|
89
|
+
|
90
|
+
// Bind Top level hamburger menu with menu behavior;
|
91
|
+
bindMenuBehavior();
|
92
|
+
|
93
|
+
//Set tooltips
|
94
|
+
setTooltips();
|
95
|
+
};
|
96
|
+
|
97
|
+
//Listen for the window resize event and collapse/hide as needed
|
98
|
+
$(window).on('resize', function () {
|
99
|
+
checkNavState();
|
100
|
+
enableTransitions();
|
101
|
+
});
|
102
|
+
|
103
|
+
init();
|
104
|
+
|
105
|
+
};
|
106
|
+
|
107
|
+
$(document).ready(function () {
|
108
|
+
if ($('.nav-pf-vertical-alt').length > 0) {
|
109
|
+
$.fn.navigation();
|
110
|
+
}
|
111
|
+
});
|
112
|
+
|
113
|
+
}(jQuery));
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// Util: PatternFly Popovers
|
2
|
+
// Add data-close="true" to insert close X icon
|
3
|
+
(function ($) {
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
$.fn.popovers = function () {
|
7
|
+
// Initialize
|
8
|
+
this.popover();
|
9
|
+
|
10
|
+
// Add close icons
|
11
|
+
this.filter('[data-close=true]').each(function (index, element) {
|
12
|
+
var $this = $(element),
|
13
|
+
title = $this.attr('data-original-title') + '<button type="button" class="close" aria-hidden="true"><span class="pficon pficon-close"></span></button>';
|
14
|
+
|
15
|
+
$this.attr('data-original-title', title);
|
16
|
+
});
|
17
|
+
|
18
|
+
// Bind Close Icon to Toggle Display
|
19
|
+
this.on('click', function (e) {
|
20
|
+
var $this = $(this),
|
21
|
+
$title = $this.next('.popover').find('.popover-title');
|
22
|
+
|
23
|
+
// Only if data-close is true add class "x" to title for right padding
|
24
|
+
$title.find('.close').parent('.popover-title').addClass('closable');
|
25
|
+
|
26
|
+
// Bind x icon to close popover
|
27
|
+
$title.find('.close').on('click', function () {
|
28
|
+
$this.popover('hide');
|
29
|
+
});
|
30
|
+
|
31
|
+
// Prevent href="#" page scroll to top
|
32
|
+
e.preventDefault();
|
33
|
+
});
|
34
|
+
|
35
|
+
return this;
|
36
|
+
};
|
37
|
+
}(jQuery));
|
@@ -0,0 +1,31 @@
|
|
1
|
+
// Util: PatternFly Sidebar
|
2
|
+
// Set height of sidebar-pf to height of document minus height of navbar-pf if not mobile
|
3
|
+
(function ($) {
|
4
|
+
'use strict';
|
5
|
+
$.fn.sidebar = function () {
|
6
|
+
var documentHeight = 0,
|
7
|
+
navbarpfHeight = 0,
|
8
|
+
colHeight = 0;
|
9
|
+
|
10
|
+
if ($('.navbar-pf .navbar-toggle').is(':hidden')) {
|
11
|
+
documentHeight = $(document).height();
|
12
|
+
navbarpfHeight = $('.navbar-pf').outerHeight();
|
13
|
+
colHeight = documentHeight - navbarpfHeight;
|
14
|
+
}
|
15
|
+
$('.sidebar-pf').parent('.row').children('[class*="col-"]').css({"min-height" : colHeight});
|
16
|
+
};
|
17
|
+
|
18
|
+
$(document).ready(function () {
|
19
|
+
// Call sidebar() on ready if .sidebar-pf exists and .datatable does not exist
|
20
|
+
if ($('.sidebar-pf').length > 0 && $('.datatable').length === 0) {
|
21
|
+
$.fn.sidebar();
|
22
|
+
}
|
23
|
+
});
|
24
|
+
|
25
|
+
$(window).resize(function () {
|
26
|
+
// Call sidebar() on resize if .sidebar-pf exists
|
27
|
+
if ($('.sidebar-pf').length > 0) {
|
28
|
+
$.fn.sidebar();
|
29
|
+
}
|
30
|
+
});
|
31
|
+
}(jQuery));
|
@@ -0,0 +1,79 @@
|
|
1
|
+
// Util: PatternFly TreeGrid Tables
|
2
|
+
(function ($) {
|
3
|
+
'use strict';
|
4
|
+
|
5
|
+
function getParent (rows, node) {
|
6
|
+
var parent = node.attr('data-parent');
|
7
|
+
|
8
|
+
if (typeof parent === "string") {
|
9
|
+
if (isNaN(parent)) {
|
10
|
+
parent = rows.closest(parent);
|
11
|
+
} else {
|
12
|
+
parent = $(rows[parseInt(parent, 10)]);
|
13
|
+
}
|
14
|
+
return parent;
|
15
|
+
}
|
16
|
+
return undefined;
|
17
|
+
}
|
18
|
+
|
19
|
+
function renderItem (item, parent) {
|
20
|
+
if (parent) {
|
21
|
+
parent.find('.treegrid-node > span.expand-icon')
|
22
|
+
.toggleClass('fa-angle-right', parent.hasClass('collapsed'))
|
23
|
+
.toggleClass('fa-angle-down', !parent.hasClass('collapsed'));
|
24
|
+
item.toggleClass('hidden', parent.hasClass('collapsed'));
|
25
|
+
if (parent.hasClass('collapsed')) {
|
26
|
+
item.addClass('collapsed');
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
function reStripe (tree) {
|
32
|
+
tree.find('tbody > tr').removeClass('odd');
|
33
|
+
tree.find('tbody > tr:not(.hidden):odd').addClass('odd');
|
34
|
+
}
|
35
|
+
|
36
|
+
$.fn.treegrid = function (options) {
|
37
|
+
var i, rows, _this;
|
38
|
+
rows = this.find('tbody > tr');
|
39
|
+
_this = this;
|
40
|
+
$.each(rows, function () {
|
41
|
+
var node, parent;
|
42
|
+
node = $(this);
|
43
|
+
parent = getParent(rows, node);
|
44
|
+
// Append expand icon dummies
|
45
|
+
node.children('.treegrid-node').prepend('<span class="icon expand-icon fa"/>');
|
46
|
+
|
47
|
+
// Set up an event listener for the node
|
48
|
+
node.children('.treegrid-node').on('click', function (e) {
|
49
|
+
var icon = node.find('span.expand-icon');
|
50
|
+
|
51
|
+
if (options && typeof options.callback === 'function') {
|
52
|
+
options.callback(e);
|
53
|
+
}
|
54
|
+
|
55
|
+
if (icon.hasClass('fa-angle-right')) {
|
56
|
+
node.removeClass('collapsed');
|
57
|
+
}
|
58
|
+
if (icon.hasClass('fa-angle-down')) {
|
59
|
+
node.addClass('collapsed');
|
60
|
+
}
|
61
|
+
$.each(rows.slice(rows.index(node) + 1), function () {
|
62
|
+
renderItem($(this), getParent(rows, $(this)));
|
63
|
+
});
|
64
|
+
reStripe(_this);
|
65
|
+
});
|
66
|
+
|
67
|
+
if (parent) {
|
68
|
+
// Calculate indentation depth
|
69
|
+
i = parent.find('.treegrid-node > span.indent').length + 1;
|
70
|
+
for (; i > 0; i -= 1) {
|
71
|
+
node.children('.treegrid-node').prepend('<span class="indent"/>');
|
72
|
+
}
|
73
|
+
// Render expand/collapse icons
|
74
|
+
renderItem(node, parent);
|
75
|
+
}
|
76
|
+
});
|
77
|
+
reStripe(_this);
|
78
|
+
};
|
79
|
+
}(jQuery));
|
@@ -0,0 +1,590 @@
|
|
1
|
+
// Util: PatternFly Vertical Navigation
|
2
|
+
// Must have navbar-toggle in navbar-pf-vertical for expand/collapse
|
3
|
+
(function ($) {
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
$.fn.setupVerticalNavigation = function (handleItemSelections, ignoreDrawer) {
|
7
|
+
|
8
|
+
var navElement = $('.nav-pf-vertical'),
|
9
|
+
bodyContentElement = $('.container-pf-nav-pf-vertical'),
|
10
|
+
toggleNavBarButton = $('.navbar-toggle'),
|
11
|
+
handleResize = true,
|
12
|
+
explicitCollapse = false,
|
13
|
+
subDesktop = false,
|
14
|
+
hoverDelay = 500,
|
15
|
+
hideDelay = hoverDelay + 200,
|
16
|
+
|
17
|
+
inMobileState = function () {
|
18
|
+
return bodyContentElement.hasClass('hidden-nav');
|
19
|
+
},
|
20
|
+
|
21
|
+
forceResize = function (delay) {
|
22
|
+
setTimeout(function () {
|
23
|
+
$(window).trigger('resize');
|
24
|
+
}, delay);
|
25
|
+
},
|
26
|
+
|
27
|
+
showSecondaryMenu = function () {
|
28
|
+
if (inMobileState() || !subDesktop) {
|
29
|
+
navElement.addClass('secondary-visible-pf');
|
30
|
+
bodyContentElement.addClass('secondary-visible-pf');
|
31
|
+
}
|
32
|
+
|
33
|
+
// Dispatch a resize event when showing the secondary menu in non-subdesktop state to
|
34
|
+
// allow content to adjust to the secondary menu sizing
|
35
|
+
if (!subDesktop) {
|
36
|
+
forceResize(100);
|
37
|
+
}
|
38
|
+
},
|
39
|
+
|
40
|
+
hideSecondaryMenu = function () {
|
41
|
+
navElement.removeClass('secondary-visible-pf');
|
42
|
+
bodyContentElement.removeClass('secondary-visible-pf');
|
43
|
+
|
44
|
+
if (navElement.find('.secondary-nav-item-pf.is-hover').length <= 1) {
|
45
|
+
navElement.removeClass('hover-secondary-nav-pf');
|
46
|
+
}
|
47
|
+
|
48
|
+
navElement.find('.mobile-nav-item-pf').each(function (index, item) {
|
49
|
+
$(item).removeClass('mobile-nav-item-pf');
|
50
|
+
});
|
51
|
+
|
52
|
+
navElement.find('.is-hover').each(function (index, item) {
|
53
|
+
$(item).removeClass('is-hover');
|
54
|
+
});
|
55
|
+
},
|
56
|
+
|
57
|
+
hideTertiaryMenu = function () {
|
58
|
+
navElement.removeClass('tertiary-visible-pf');
|
59
|
+
bodyContentElement.removeClass('tertiary-visible-pf');
|
60
|
+
|
61
|
+
if (navElement.find('.tertiary-nav-item-pf.is-hover').length <= 1) {
|
62
|
+
navElement.removeClass('hover-tertiary-nav-pf');
|
63
|
+
}
|
64
|
+
|
65
|
+
navElement.find('.mobile-nav-item-pf').each(function (index, item) {
|
66
|
+
$(item).removeClass('mobile-nav-item-pf');
|
67
|
+
});
|
68
|
+
|
69
|
+
navElement.find('.is-hover').each(function (index, item) {
|
70
|
+
$(item).removeClass('is-hover');
|
71
|
+
});
|
72
|
+
},
|
73
|
+
|
74
|
+
setActiveItem = function (item) {
|
75
|
+
// remove all .active
|
76
|
+
$('.nav-pf-vertical .list-group-item.active').removeClass('active');
|
77
|
+
|
78
|
+
// add .active to item and its parents
|
79
|
+
item.addClass('active').parents('.list-group-item').addClass('active');
|
80
|
+
},
|
81
|
+
|
82
|
+
updateSecondaryMenuDisplayAfterSelection = function () {
|
83
|
+
if (inMobileState()) {
|
84
|
+
navElement.removeClass('show-mobile-nav');
|
85
|
+
hideSecondaryMenu();
|
86
|
+
navElement.find('.mobile-nav-item-pf').each(function (index, item) {
|
87
|
+
$(item).removeClass('mobile-nav-item-pf');
|
88
|
+
});
|
89
|
+
} else {
|
90
|
+
showSecondaryMenu();
|
91
|
+
}
|
92
|
+
},
|
93
|
+
|
94
|
+
updateSecondaryCollapsedState = function (setCollapsed, collapsedItem) {
|
95
|
+
if (setCollapsed) {
|
96
|
+
collapsedItem.addClass('collapsed');
|
97
|
+
navElement.addClass('collapsed-secondary-nav-pf');
|
98
|
+
bodyContentElement.addClass('collapsed-secondary-nav-pf');
|
99
|
+
} else {
|
100
|
+
if (collapsedItem) {
|
101
|
+
collapsedItem.removeClass('collapsed');
|
102
|
+
} else {
|
103
|
+
// Remove any collapsed secondary menus
|
104
|
+
navElement.find('[data-toggle="collapse-secondary-nav"]').each(function (index, element) {
|
105
|
+
var $e = $(element);
|
106
|
+
$e.removeClass('collapsed');
|
107
|
+
});
|
108
|
+
}
|
109
|
+
navElement.removeClass('collapsed-secondary-nav-pf');
|
110
|
+
bodyContentElement.removeClass('collapsed-secondary-nav-pf');
|
111
|
+
}
|
112
|
+
},
|
113
|
+
|
114
|
+
updateTertiaryCollapsedState = function (setCollapsed, collapsedItem) {
|
115
|
+
if (setCollapsed) {
|
116
|
+
collapsedItem.addClass('collapsed');
|
117
|
+
navElement.addClass('collapsed-tertiary-nav-pf');
|
118
|
+
bodyContentElement.addClass('collapsed-tertiary-nav-pf');
|
119
|
+
updateSecondaryCollapsedState(false);
|
120
|
+
} else {
|
121
|
+
if (collapsedItem) {
|
122
|
+
collapsedItem.removeClass('collapsed');
|
123
|
+
} else {
|
124
|
+
// Remove any collapsed tertiary menus
|
125
|
+
navElement.find('[data-toggle="collapse-tertiary-nav"]').each(function (index, element) {
|
126
|
+
var $e = $(element);
|
127
|
+
$e.removeClass('collapsed');
|
128
|
+
});
|
129
|
+
}
|
130
|
+
navElement.removeClass('collapsed-tertiary-nav-pf');
|
131
|
+
bodyContentElement.removeClass('collapsed-tertiary-nav-pf');
|
132
|
+
}
|
133
|
+
},
|
134
|
+
|
135
|
+
updateMobileMenu = function (selected, secondaryItem) {
|
136
|
+
$(document).find('.list-group-item.mobile-nav-item-pf').each(function (index, item) {
|
137
|
+
$(item).removeClass('mobile-nav-item-pf');
|
138
|
+
});
|
139
|
+
$(document).find('.list-group-item.mobile-secondary-item-pf').each(function (index, item) {
|
140
|
+
$(item).removeClass('mobile-secondary-item-pf');
|
141
|
+
});
|
142
|
+
if (selected) {
|
143
|
+
selected.addClass('mobile-nav-item-pf');
|
144
|
+
if (secondaryItem) {
|
145
|
+
secondaryItem.addClass('mobile-secondary-item-pf');
|
146
|
+
navElement.removeClass('show-mobile-secondary');
|
147
|
+
navElement.addClass('show-mobile-tertiary');
|
148
|
+
} else {
|
149
|
+
navElement.addClass('show-mobile-secondary');
|
150
|
+
navElement.removeClass('show-mobile-tertiary');
|
151
|
+
}
|
152
|
+
} else {
|
153
|
+
navElement.removeClass('show-mobile-secondary');
|
154
|
+
navElement.removeClass('show-mobile-tertiary');
|
155
|
+
}
|
156
|
+
},
|
157
|
+
|
158
|
+
enterMobileState = function () {
|
159
|
+
if (!navElement.hasClass('hidden')) {
|
160
|
+
//Set the nav to being hidden
|
161
|
+
navElement.addClass('hidden');
|
162
|
+
navElement.removeClass('collapsed');
|
163
|
+
|
164
|
+
//Set the body class to the correct state
|
165
|
+
bodyContentElement.removeClass('collapsed-nav');
|
166
|
+
bodyContentElement.addClass('hidden-nav');
|
167
|
+
|
168
|
+
// Reset the collapsed states
|
169
|
+
updateSecondaryCollapsedState(false);
|
170
|
+
updateTertiaryCollapsedState(false);
|
171
|
+
|
172
|
+
explicitCollapse = false;
|
173
|
+
}
|
174
|
+
},
|
175
|
+
|
176
|
+
exitMobileState = function () {
|
177
|
+
// Always remove the hidden & peek class
|
178
|
+
navElement.removeClass('hidden show-mobile-nav');
|
179
|
+
|
180
|
+
// Set the body class back to the default
|
181
|
+
bodyContentElement.removeClass('hidden-nav');
|
182
|
+
},
|
183
|
+
|
184
|
+
checkNavState = function () {
|
185
|
+
var width = $(window).width(), makeSecondaryVisible;
|
186
|
+
if (!handleResize) {
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
// Check to see if we need to enter/exit the mobile state
|
190
|
+
if (width < $.pfBreakpoints.tablet && !explicitCollapse) {
|
191
|
+
enterMobileState();
|
192
|
+
} else if (navElement.hasClass('hidden')) {
|
193
|
+
exitMobileState();
|
194
|
+
}
|
195
|
+
|
196
|
+
// Check to see if we need to enter/exit the sub desktop state
|
197
|
+
if (width < $.pfBreakpoints.desktop) {
|
198
|
+
if (!subDesktop) {
|
199
|
+
// Collapse the navigation bars when entering sub desktop mode
|
200
|
+
navElement.addClass('collapsed');
|
201
|
+
bodyContentElement.addClass('collapsed-nav');
|
202
|
+
}
|
203
|
+
if (width >= $.pfBreakpoints.tablet) {
|
204
|
+
hideSecondaryMenu();
|
205
|
+
}
|
206
|
+
subDesktop = true;
|
207
|
+
} else {
|
208
|
+
makeSecondaryVisible = subDesktop && (navElement.find('.secondary-nav-item-pf.active').length > 0);
|
209
|
+
subDesktop = false;
|
210
|
+
if (makeSecondaryVisible) {
|
211
|
+
|
212
|
+
showSecondaryMenu();
|
213
|
+
}
|
214
|
+
}
|
215
|
+
|
216
|
+
if (explicitCollapse) {
|
217
|
+
navElement.addClass('collapsed');
|
218
|
+
bodyContentElement.addClass('collapsed-nav');
|
219
|
+
} else {
|
220
|
+
navElement.removeClass('collapsed');
|
221
|
+
bodyContentElement.removeClass('collapsed-nav');
|
222
|
+
}
|
223
|
+
},
|
224
|
+
|
225
|
+
collapseMenu = function () {
|
226
|
+
//Make sure this is expanded
|
227
|
+
navElement.addClass('collapsed');
|
228
|
+
//Set the body class to the correct state
|
229
|
+
bodyContentElement.addClass('collapsed-nav');
|
230
|
+
|
231
|
+
if (subDesktop) {
|
232
|
+
hideSecondaryMenu();
|
233
|
+
}
|
234
|
+
|
235
|
+
explicitCollapse = true;
|
236
|
+
},
|
237
|
+
|
238
|
+
enableTransitions = function () {
|
239
|
+
// enable transitions only when toggleNavBarButton is clicked or window is resized
|
240
|
+
$('html').addClass('transitions');
|
241
|
+
},
|
242
|
+
|
243
|
+
expandMenu = function () {
|
244
|
+
//Make sure this is expanded
|
245
|
+
navElement.removeClass('collapsed');
|
246
|
+
//Set the body class to the correct state
|
247
|
+
bodyContentElement.removeClass('collapsed-nav');
|
248
|
+
|
249
|
+
explicitCollapse = false;
|
250
|
+
|
251
|
+
// Dispatch a resize event when showing the expanding then menu to
|
252
|
+
// allow content to adjust to the menu sizing
|
253
|
+
if (!subDesktop) {
|
254
|
+
forceResize(100);
|
255
|
+
}
|
256
|
+
},
|
257
|
+
|
258
|
+
bindMenuBehavior = function () {
|
259
|
+
toggleNavBarButton.on('click', function (e) {
|
260
|
+
var $drawer;
|
261
|
+
|
262
|
+
enableTransitions();
|
263
|
+
|
264
|
+
if (inMobileState()) {
|
265
|
+
// Toggle the mobile nav
|
266
|
+
if (navElement.hasClass('show-mobile-nav')) {
|
267
|
+
navElement.removeClass('show-mobile-nav');
|
268
|
+
} else {
|
269
|
+
// Always start at the primary menu
|
270
|
+
updateMobileMenu();
|
271
|
+
navElement.addClass('show-mobile-nav');
|
272
|
+
|
273
|
+
// If the notification drawer is shown, hide it
|
274
|
+
if (!ignoreDrawer) {
|
275
|
+
$drawer = $('.drawer-pf');
|
276
|
+
if ($drawer.length) {
|
277
|
+
$('.drawer-pf-trigger').removeClass('open');
|
278
|
+
$drawer.addClass('hide');
|
279
|
+
}
|
280
|
+
}
|
281
|
+
}
|
282
|
+
} else if (navElement.hasClass('collapsed')) {
|
283
|
+
window.localStorage.setItem('patternfly-navigation-primary', 'expanded');
|
284
|
+
expandMenu();
|
285
|
+
} else {
|
286
|
+
window.localStorage.setItem('patternfly-navigation-primary', 'collapsed');
|
287
|
+
collapseMenu();
|
288
|
+
}
|
289
|
+
});
|
290
|
+
},
|
291
|
+
|
292
|
+
forceHideSecondaryMenu = function () {
|
293
|
+
navElement.addClass('force-hide-secondary-nav-pf');
|
294
|
+
setTimeout(function () {
|
295
|
+
navElement.removeClass('force-hide-secondary-nav-pf');
|
296
|
+
}, 500);
|
297
|
+
},
|
298
|
+
|
299
|
+
bindMenuItemsBehavior = function (handleSelection) {
|
300
|
+
$(document).find('.nav-pf-vertical .list-group-item').each(function (index, item) {
|
301
|
+
var onClickFn,
|
302
|
+
$item = $(item),
|
303
|
+
$nav = $item.closest('[class*="nav-pf-"]');
|
304
|
+
|
305
|
+
if ($nav.hasClass('nav-pf-vertical')) {
|
306
|
+
// Set main nav active item on click or show secondary nav if it has a secondary nav bar and we are in the mobile state
|
307
|
+
onClickFn = function (event) {
|
308
|
+
var $this = $(this), $secondaryItem, $tertiaryItem, $activeItem;
|
309
|
+
|
310
|
+
if (!$this.hasClass('secondary-nav-item-pf')) {
|
311
|
+
hideSecondaryMenu();
|
312
|
+
if (inMobileState()) {
|
313
|
+
updateMobileMenu();
|
314
|
+
navElement.removeClass('show-mobile-nav');
|
315
|
+
}
|
316
|
+
if (handleSelection) {
|
317
|
+
setActiveItem($this);
|
318
|
+
// Don't process the click on the item
|
319
|
+
event.stopImmediatePropagation();
|
320
|
+
}
|
321
|
+
} else if (inMobileState()) {
|
322
|
+
updateMobileMenu($this);
|
323
|
+
} else if (handleSelection) {
|
324
|
+
$activeItem = $secondaryItem = $item.find('.nav-pf-secondary-nav > .list-group > .list-group-item').eq(0);
|
325
|
+
|
326
|
+
if ($secondaryItem.hasClass('tertiary-nav-item-pf')) {
|
327
|
+
$activeItem = $secondaryItem.find('.nav-pf-tertiary-nav > .list-group > .list-group-item').eq(0);
|
328
|
+
}
|
329
|
+
|
330
|
+
setActiveItem($activeItem);
|
331
|
+
event.stopImmediatePropagation();
|
332
|
+
}
|
333
|
+
};
|
334
|
+
|
335
|
+
} else if ($nav.hasClass('nav-pf-secondary-nav')) {
|
336
|
+
// Set secondary nav active item on click or show tertiary nav if it has a tertiary nav bar and we are in the mobile state
|
337
|
+
onClickFn = function (event) {
|
338
|
+
var $this = $(this), $tertiaryItem, $primaryItem;
|
339
|
+
if (!$this.hasClass('tertiary-nav-item-pf')) {
|
340
|
+
if (inMobileState()) {
|
341
|
+
updateMobileMenu();
|
342
|
+
navElement.removeClass('show-mobile-nav');
|
343
|
+
}
|
344
|
+
updateSecondaryMenuDisplayAfterSelection();
|
345
|
+
if (handleSelection) {
|
346
|
+
setActiveItem($item);
|
347
|
+
hideSecondaryMenu();
|
348
|
+
event.stopImmediatePropagation();
|
349
|
+
}
|
350
|
+
} else if (inMobileState()) {
|
351
|
+
$primaryItem = $item.parents('.list-group-item');
|
352
|
+
updateMobileMenu($this, $primaryItem);
|
353
|
+
event.stopImmediatePropagation();
|
354
|
+
} else if (handleSelection) {
|
355
|
+
$tertiaryItem = $item.find('.nav-pf-tertiary-nav > .list-group > .list-group-item').eq(0);
|
356
|
+
setActiveItem($tertiaryItem);
|
357
|
+
event.stopImmediatePropagation();
|
358
|
+
}
|
359
|
+
};
|
360
|
+
|
361
|
+
} else if ($nav.hasClass('nav-pf-tertiary-nav')) {
|
362
|
+
// Set tertiary nav active item on click
|
363
|
+
onClickFn = function (event) {
|
364
|
+
if (inMobileState()) {
|
365
|
+
updateMobileMenu();
|
366
|
+
navElement.removeClass('show-mobile-nav');
|
367
|
+
}
|
368
|
+
updateSecondaryMenuDisplayAfterSelection();
|
369
|
+
if (handleSelection) {
|
370
|
+
setActiveItem($item);
|
371
|
+
hideTertiaryMenu();
|
372
|
+
hideSecondaryMenu();
|
373
|
+
event.stopImmediatePropagation();
|
374
|
+
}
|
375
|
+
};
|
376
|
+
}
|
377
|
+
|
378
|
+
// register event handler
|
379
|
+
$item.on('click.pf.secondarynav.data-api', onClickFn);
|
380
|
+
});
|
381
|
+
|
382
|
+
$(document).find('.secondary-nav-item-pf').each(function (index, secondaryItem) {
|
383
|
+
var $secondaryItem = $(secondaryItem);
|
384
|
+
|
385
|
+
// Collapse the secondary nav bar when the toggle is clicked
|
386
|
+
$secondaryItem.on('click.pf.secondarynav.data-api', '[data-toggle="collapse-secondary-nav"]', function (e) {
|
387
|
+
var $this = $(this);
|
388
|
+
if (inMobileState()) {
|
389
|
+
updateMobileMenu();
|
390
|
+
e.stopImmediatePropagation();
|
391
|
+
} else {
|
392
|
+
if ($this.hasClass('collapsed')) {
|
393
|
+
window.localStorage.setItem('patternfly-navigation-secondary', 'expanded');
|
394
|
+
window.localStorage.setItem('patternfly-navigation-tertiary', 'expanded');
|
395
|
+
updateSecondaryCollapsedState(false, $this);
|
396
|
+
forceHideSecondaryMenu();
|
397
|
+
} else {
|
398
|
+
window.localStorage.setItem('patternfly-navigation-secondary', 'collapsed');
|
399
|
+
updateSecondaryCollapsedState(true, $this);
|
400
|
+
}
|
401
|
+
}
|
402
|
+
navElement.removeClass('hover-secondary-nav-pf');
|
403
|
+
if (handleSelection) {
|
404
|
+
// Don't process the click on the parent item
|
405
|
+
e.stopImmediatePropagation();
|
406
|
+
}
|
407
|
+
});
|
408
|
+
|
409
|
+
$secondaryItem.find('.tertiary-nav-item-pf').each(function (index, primaryItem) {
|
410
|
+
var $primaryItem = $(primaryItem);
|
411
|
+
// Collapse the tertiary nav bar when the toggle is clicked
|
412
|
+
$primaryItem.on('click.pf.tertiarynav.data-api', '[data-toggle="collapse-tertiary-nav"]', function (e) {
|
413
|
+
var $this = $(this);
|
414
|
+
if (inMobileState()) {
|
415
|
+
updateMobileMenu($secondaryItem);
|
416
|
+
e.stopImmediatePropagation();
|
417
|
+
} else {
|
418
|
+
if ($this.hasClass('collapsed')) {
|
419
|
+
window.localStorage.setItem('patternfly-navigation-secondary', 'expanded');
|
420
|
+
window.localStorage.setItem('patternfly-navigation-tertiary', 'expanded');
|
421
|
+
updateTertiaryCollapsedState(false, $this);
|
422
|
+
forceHideSecondaryMenu();
|
423
|
+
} else {
|
424
|
+
window.localStorage.setItem('patternfly-navigation-tertiary', 'collapsed');
|
425
|
+
updateTertiaryCollapsedState(true, $this);
|
426
|
+
}
|
427
|
+
}
|
428
|
+
navElement.removeClass('hover-secondary-nav-pf');
|
429
|
+
navElement.removeClass('hover-tertiary-nav-pf');
|
430
|
+
if (handleSelection) {
|
431
|
+
// Don't process the click on the parent item
|
432
|
+
e.stopImmediatePropagation();
|
433
|
+
}
|
434
|
+
});
|
435
|
+
});
|
436
|
+
});
|
437
|
+
|
438
|
+
// Show secondary nav bar on hover of secondary nav items
|
439
|
+
$(document).on('mouseenter.pf.tertiarynav.data-api', '.secondary-nav-item-pf', function (e) {
|
440
|
+
var $this = $(this);
|
441
|
+
if (!inMobileState()) {
|
442
|
+
if ($this[0].navUnHoverTimeout !== undefined) {
|
443
|
+
clearTimeout($this[0].navUnHoverTimeout);
|
444
|
+
$this[0].navUnHoverTimeout = undefined;
|
445
|
+
} else if ($this[0].navHoverTimeout === undefined) {
|
446
|
+
$this[0].navHoverTimeout = setTimeout(function () {
|
447
|
+
navElement.addClass('hover-secondary-nav-pf');
|
448
|
+
$this.addClass('is-hover');
|
449
|
+
$this[0].navHoverTimeout = undefined;
|
450
|
+
}, hoverDelay);
|
451
|
+
}
|
452
|
+
}
|
453
|
+
});
|
454
|
+
|
455
|
+
$(document).on('mouseleave.pf.tertiarynav.data-api', '.secondary-nav-item-pf', function (e) {
|
456
|
+
var $this = $(this);
|
457
|
+
if ($this[0].navHoverTimeout !== undefined) {
|
458
|
+
clearTimeout($this[0].navHoverTimeout);
|
459
|
+
$this[0].navHoverTimeout = undefined;
|
460
|
+
} else if ($this[0].navUnHoverTimeout === undefined &&
|
461
|
+
navElement.find('.secondary-nav-item-pf.is-hover').length > 0) {
|
462
|
+
$this[0].navUnHoverTimeout = setTimeout(function () {
|
463
|
+
if (navElement.find('.secondary-nav-item-pf.is-hover').length <= 1) {
|
464
|
+
navElement.removeClass('hover-secondary-nav-pf');
|
465
|
+
}
|
466
|
+
$this.removeClass('is-hover');
|
467
|
+
$this[0].navUnHoverTimeout = undefined;
|
468
|
+
}, hideDelay);
|
469
|
+
}
|
470
|
+
});
|
471
|
+
|
472
|
+
// Show tertiary nav bar on hover of secondary nav items
|
473
|
+
$(document).on('mouseover.pf.tertiarynav.data-api', '.tertiary-nav-item-pf', function (e) {
|
474
|
+
var $this = $(this);
|
475
|
+
if (!inMobileState()) {
|
476
|
+
if ($this[0].navUnHoverTimeout !== undefined) {
|
477
|
+
clearTimeout($this[0].navUnHoverTimeout);
|
478
|
+
$this[0].navUnHoverTimeout = undefined;
|
479
|
+
} else if ($this[0].navHoverTimeout === undefined) {
|
480
|
+
$this[0].navHoverTimeout = setTimeout(function () {
|
481
|
+
navElement.addClass('hover-tertiary-nav-pf');
|
482
|
+
$this.addClass('is-hover');
|
483
|
+
$this[0].navHoverTimeout = undefined;
|
484
|
+
}, hoverDelay);
|
485
|
+
}
|
486
|
+
}
|
487
|
+
});
|
488
|
+
$(document).on('mouseout.pf.tertiarynav.data-api', '.tertiary-nav-item-pf', function (e) {
|
489
|
+
var $this = $(this);
|
490
|
+
if ($this[0].navHoverTimeout !== undefined) {
|
491
|
+
clearTimeout($this[0].navHoverTimeout);
|
492
|
+
$this[0].navHoverTimeout = undefined;
|
493
|
+
} else if ($this[0].navUnHoverTimeout === undefined) {
|
494
|
+
$this[0].navUnHoverTimeout = setTimeout(function () {
|
495
|
+
if (navElement.find('.tertiary-nav-item-pf.is-hover').length <= 1) {
|
496
|
+
navElement.removeClass('hover-tertiary-nav-pf');
|
497
|
+
}
|
498
|
+
$this.removeClass('is-hover');
|
499
|
+
$this[0].navUnHoverTimeout = undefined;
|
500
|
+
}, hideDelay);
|
501
|
+
}
|
502
|
+
});
|
503
|
+
},
|
504
|
+
|
505
|
+
loadFromLocalStorage = function () {
|
506
|
+
if (inMobileState()) {
|
507
|
+
return;
|
508
|
+
}
|
509
|
+
|
510
|
+
if (window.localStorage.getItem('patternfly-navigation-primary') === 'collapsed') {
|
511
|
+
collapseMenu();
|
512
|
+
}
|
513
|
+
|
514
|
+
if ($('.nav-pf-vertical.nav-pf-vertical-collapsible-menus').length > 0) {
|
515
|
+
if (window.localStorage.getItem('patternfly-navigation-secondary') === 'collapsed') {
|
516
|
+
updateSecondaryCollapsedState(true, $('.secondary-nav-item-pf.active [data-toggle=collapse-secondary-nav]'));
|
517
|
+
}
|
518
|
+
|
519
|
+
if (window.localStorage.getItem('patternfly-navigation-tertiary') === 'collapsed') {
|
520
|
+
updateTertiaryCollapsedState(true, $('.tertiary-nav-item-pf.active [data-toggle=collapse-tertiary-nav]'));
|
521
|
+
}
|
522
|
+
}
|
523
|
+
},
|
524
|
+
|
525
|
+
setTooltips = function () {
|
526
|
+
var tooltipOptions = {
|
527
|
+
container: 'body',
|
528
|
+
placement: 'bottom',
|
529
|
+
delay: { 'show': '500', 'hide': '200' },
|
530
|
+
template: '<div class="nav-pf-vertical-tooltip tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
531
|
+
};
|
532
|
+
$('.nav-pf-vertical [data-toggle="tooltip"]').tooltip(tooltipOptions);
|
533
|
+
|
534
|
+
$('.nav-pf-vertical').on("show.bs.tooltip", function (e) {
|
535
|
+
return $(this).hasClass("collapsed");
|
536
|
+
});
|
537
|
+
},
|
538
|
+
|
539
|
+
init = function (handleItemSelections) {
|
540
|
+
// Hide the nav menus during initialization
|
541
|
+
navElement.addClass('hide-nav-pf');
|
542
|
+
bodyContentElement.addClass('hide-nav-pf');
|
543
|
+
|
544
|
+
//Set correct state on load
|
545
|
+
checkNavState();
|
546
|
+
|
547
|
+
// Bind Top level hamburger menu with menu behavior;
|
548
|
+
bindMenuBehavior();
|
549
|
+
|
550
|
+
// Bind menu items
|
551
|
+
bindMenuItemsBehavior(handleItemSelections);
|
552
|
+
|
553
|
+
//Set tooltips
|
554
|
+
setTooltips();
|
555
|
+
|
556
|
+
loadFromLocalStorage();
|
557
|
+
|
558
|
+
// Show the nav menus
|
559
|
+
navElement.removeClass('hide-nav-pf');
|
560
|
+
bodyContentElement.removeClass('hide-nav-pf');
|
561
|
+
forceResize(250);
|
562
|
+
},
|
563
|
+
|
564
|
+
self = {
|
565
|
+
hideMenu: function () {
|
566
|
+
handleResize = false;
|
567
|
+
enterMobileState();
|
568
|
+
},
|
569
|
+
showMenu: function () {
|
570
|
+
handleResize = true;
|
571
|
+
exitMobileState();
|
572
|
+
},
|
573
|
+
isVisible: function () {
|
574
|
+
return handleResize;
|
575
|
+
}
|
576
|
+
};
|
577
|
+
|
578
|
+
if (!$.fn.setupVerticalNavigation.self) {
|
579
|
+
$.fn.setupVerticalNavigation.self = self;
|
580
|
+
//Listen for the window resize event and collapse/hide as needed
|
581
|
+
$(window).on('resize', function () {
|
582
|
+
checkNavState();
|
583
|
+
enableTransitions();
|
584
|
+
});
|
585
|
+
|
586
|
+
init(handleItemSelections);
|
587
|
+
}
|
588
|
+
return $.fn.setupVerticalNavigation.self;
|
589
|
+
};
|
590
|
+
}(jQuery));
|