patternfly-sass 0.0.0.pre.semantically.pre.released
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CODE_OF_CONDUCT.md +4 -0
- data/LICENSE.txt +205 -0
- data/OPEN_SOURCE_LICENCES.txt +1366 -0
- data/QUICKSTART.md +210 -0
- data/README.md +438 -0
- data/dist/fonts/FontAwesome.otf +0 -0
- data/dist/fonts/OpenSans-Bold-webfont.eot +0 -0
- data/dist/fonts/OpenSans-Bold-webfont.svg +19028 -0
- data/dist/fonts/OpenSans-Bold-webfont.ttf +0 -0
- data/dist/fonts/OpenSans-Bold-webfont.woff +0 -0
- data/dist/fonts/OpenSans-Bold-webfont.woff2 +0 -0
- data/dist/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- data/dist/fonts/OpenSans-BoldItalic-webfont.svg +19036 -0
- data/dist/fonts/OpenSans-BoldItalic-webfont.ttf +0 -0
- data/dist/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- data/dist/fonts/OpenSans-BoldItalic-webfont.woff2 +0 -0
- data/dist/fonts/OpenSans-ExtraBold-webfont.eot +0 -0
- data/dist/fonts/OpenSans-ExtraBold-webfont.svg +19030 -0
- data/dist/fonts/OpenSans-ExtraBold-webfont.ttf +0 -0
- data/dist/fonts/OpenSans-ExtraBold-webfont.woff +0 -0
- data/dist/fonts/OpenSans-ExtraBold-webfont.woff2 +0 -0
- data/dist/fonts/OpenSans-ExtraBoldItalic-webfont.eot +0 -0
- data/dist/fonts/OpenSans-ExtraBoldItalic-webfont.svg +19036 -0
- data/dist/fonts/OpenSans-ExtraBoldItalic-webfont.ttf +0 -0
- data/dist/fonts/OpenSans-ExtraBoldItalic-webfont.woff +0 -0
- data/dist/fonts/OpenSans-ExtraBoldItalic-webfont.woff2 +0 -0
- data/dist/fonts/OpenSans-Italic-webfont.eot +0 -0
- data/dist/fonts/OpenSans-Italic-webfont.svg +19043 -0
- data/dist/fonts/OpenSans-Italic-webfont.ttf +0 -0
- data/dist/fonts/OpenSans-Italic-webfont.woff +0 -0
- data/dist/fonts/OpenSans-Italic-webfont.woff2 +0 -0
- data/dist/fonts/OpenSans-Light-webfont.eot +0 -0
- data/dist/fonts/OpenSans-Light-webfont.svg +19026 -0
- data/dist/fonts/OpenSans-Light-webfont.ttf +0 -0
- data/dist/fonts/OpenSans-Light-webfont.woff +0 -0
- data/dist/fonts/OpenSans-Light-webfont.woff2 +0 -0
- data/dist/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- data/dist/fonts/OpenSans-LightItalic-webfont.svg +19039 -0
- data/dist/fonts/OpenSans-LightItalic-webfont.ttf +0 -0
- data/dist/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- data/dist/fonts/OpenSans-LightItalic-webfont.woff2 +0 -0
- data/dist/fonts/OpenSans-Regular-webfont.eot +0 -0
- data/dist/fonts/OpenSans-Regular-webfont.svg +19030 -0
- data/dist/fonts/OpenSans-Regular-webfont.ttf +0 -0
- data/dist/fonts/OpenSans-Regular-webfont.woff +0 -0
- data/dist/fonts/OpenSans-Regular-webfont.woff2 +0 -0
- data/dist/fonts/OpenSans-Semibold-webfont.eot +0 -0
- data/dist/fonts/OpenSans-Semibold-webfont.svg +19030 -0
- data/dist/fonts/OpenSans-Semibold-webfont.ttf +0 -0
- data/dist/fonts/OpenSans-Semibold-webfont.woff +0 -0
- data/dist/fonts/OpenSans-Semibold-webfont.woff2 +0 -0
- data/dist/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
- data/dist/fonts/OpenSans-SemiboldItalic-webfont.svg +19043 -0
- data/dist/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- data/dist/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
- data/dist/fonts/OpenSans-SemiboldItalic-webfont.woff2 +0 -0
- data/dist/fonts/PatternFlyIcons-webfont.eot +0 -0
- data/dist/fonts/PatternFlyIcons-webfont.svg +140 -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/dist/fonts/fontawesome-webfont.ttf +0 -0
- data/dist/fonts/fontawesome-webfont.woff +0 -0
- data/dist/fonts/fontawesome-webfont.woff2 +0 -0
- data/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/dist/fonts/glyphicons-halflings-regular.svg +288 -0
- data/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/dist/img/Logo_Horizontal_Reversed.svg +49 -0
- data/dist/img/OpenShift-Logo-NoText.svg +51 -0
- data/dist/img/OpenShift-Logo-Text.svg +95 -0
- data/dist/img/OpenShift-logo.svg +69 -0
- data/dist/img/RH_Atomic-Logo-NoText.svg +53 -0
- data/dist/img/RH_Atomic-Logo-Text.svg +91 -0
- data/dist/img/RH_atomic.svg +88 -0
- data/dist/img/apple-touch-icon-precomposed-114.png +0 -0
- data/dist/img/apple-touch-icon-precomposed-144.png +0 -0
- data/dist/img/apple-touch-icon-precomposed-152.png +0 -0
- data/dist/img/apple-touch-icon-precomposed-180.png +0 -0
- data/dist/img/apple-touch-icon-precomposed-57.png +0 -0
- data/dist/img/apple-touch-icon-precomposed-72.png +0 -0
- data/dist/img/apple-touch-icon-precomposed-76.png +0 -0
- data/dist/img/bg-login-2.png +0 -0
- data/dist/img/bg-login.jpg +0 -0
- data/dist/img/bg-login.png +0 -0
- data/dist/img/bg-modal-about-pf.png +0 -0
- data/dist/img/bg-navbar-pf-alt.svg +9 -0
- data/dist/img/brand-alt.svg +88 -0
- data/dist/img/brand.svg +87 -0
- data/dist/img/dropbox-logo.svg +15 -0
- data/dist/img/facebook-logo.svg +12 -0
- data/dist/img/favicon.ico +0 -0
- data/dist/img/fedora-logo.png +0 -0
- data/dist/img/git-logo.svg +21 -0
- data/dist/img/github-logo.svg +17 -0
- data/dist/img/gmail.svg +23 -0
- data/dist/img/google-calendar.svg +26 -0
- data/dist/img/google-drive.svg +17 -0
- data/dist/img/google-logo.svg +19 -0
- data/dist/img/instagram-logo.png +0 -0
- data/dist/img/kubernetes-Logo.svg +60 -0
- data/dist/img/kubernetes.svg +8 -0
- data/dist/img/linkedin-logo.svg +13 -0
- data/dist/img/logo-alt.svg +18 -0
- data/dist/img/logo.svg +22 -0
- data/dist/img/open-id-logo.svg +19 -0
- data/dist/img/rcue-full.svg +221 -0
- data/dist/img/rcue.svg +92 -0
- data/dist/img/redhat_reverse.png +0 -0
- data/dist/img/skype-logo.svg +23 -0
- data/dist/img/spinner-inverse-lg.gif +0 -0
- data/dist/img/spinner-inverse-sm.gif +0 -0
- data/dist/img/spinner-inverse-xs.gif +0 -0
- data/dist/img/spinner-inverse.gif +0 -0
- data/dist/img/spinner-lg.gif +0 -0
- data/dist/img/spinner-sm.gif +0 -0
- data/dist/img/spinner-xs.gif +0 -0
- data/dist/img/spinner.gif +0 -0
- data/dist/img/stack-exchange-logo.svg +21 -0
- data/dist/img/twitter-logo.svg +19 -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 +109 -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 +82 -0
- data/dist/js/patternfly-functions-vertical-nav.js +610 -0
- data/dist/js/patternfly-functions.js +1307 -0
- data/dist/js/patternfly-functions.min.js +1 -0
- data/dist/js/patternfly-settings-base.d.ts +9 -0
- data/dist/js/patternfly-settings-base.js +16 -0
- data/dist/js/patternfly-settings-charts.d.ts +92 -0
- data/dist/js/patternfly-settings-charts.js +449 -0
- data/dist/js/patternfly-settings-colors.d.ts +88 -0
- data/dist/js/patternfly-settings-colors.js +91 -0
- data/dist/js/patternfly-settings.d.ts +3 -0
- data/dist/js/patternfly-settings.js +558 -0
- data/dist/js/patternfly-settings.min.js +1 -0
- data/dist/js/patternfly.dataTables.pfColVis.js +151 -0
- data/dist/js/patternfly.dataTables.pfEmpty.js +253 -0
- data/dist/js/patternfly.dataTables.pfEmpty.min.js +1 -0
- data/dist/js/patternfly.dataTables.pfFilter.js +429 -0
- data/dist/js/patternfly.dataTables.pfFilter.min.js +1 -0
- data/dist/js/patternfly.dataTables.pfPagination.js +401 -0
- data/dist/js/patternfly.dataTables.pfPagination.min.js +1 -0
- data/dist/js/patternfly.dataTables.pfResize.js +214 -0
- data/dist/js/patternfly.dataTables.pfResize.min.js +1 -0
- data/dist/js/patternfly.dataTables.pfSelect.js +281 -0
- data/dist/js/patternfly.dataTables.pfSelect.min.js +1 -0
- data/dist/js/patternfly.js +1866 -0
- data/dist/js/patternfly.min.js +2 -0
- data/dist/sass/_patternfly-compass.scss +3 -0
- data/dist/sass/_patternfly-sprockets.scss +3 -0
- data/dist/sass/_patternfly.scss +147 -0
- data/dist/sass/patternfly/_about-modal.scss +44 -0
- data/dist/sass/patternfly/_accordion.scss +18 -0
- data/dist/sass/patternfly/_alerts.scss +44 -0
- data/dist/sass/patternfly/_application-launcher.scss +213 -0
- data/dist/sass/patternfly/_badges.scss +11 -0
- data/dist/sass/patternfly/_blank-slate.scss +52 -0
- data/dist/sass/patternfly/_bootstrap-combobox.scss +35 -0
- data/dist/sass/patternfly/_bootstrap-datepicker.scss +132 -0
- data/dist/sass/patternfly/_bootstrap-mixin-overrides.scss +33 -0
- data/dist/sass/patternfly/_bootstrap-select.scss +108 -0
- data/dist/sass/patternfly/_bootstrap-slider.scss +66 -0
- data/dist/sass/patternfly/_bootstrap-switch.scss +19 -0
- data/dist/sass/patternfly/_bootstrap-touchspin.scss +31 -0
- data/dist/sass/patternfly/_bootstrap-treeview.scss +89 -0
- data/dist/sass/patternfly/_breadcrumbs.scss +20 -0
- data/dist/sass/patternfly/_buttons.scss +50 -0
- data/dist/sass/patternfly/_card-view.scss +105 -0
- data/dist/sass/patternfly/_cards.scss +238 -0
- data/dist/sass/patternfly/_charts.scss +388 -0
- data/dist/sass/patternfly/_close.scss +16 -0
- data/dist/sass/patternfly/_color-variables.scss +85 -0
- data/dist/sass/patternfly/_context-selector.scss +125 -0
- data/dist/sass/patternfly/_datatables.scss +186 -0
- data/dist/sass/patternfly/_date-and-time.scss +35 -0
- data/dist/sass/patternfly/_dropdowns.scss +235 -0
- data/dist/sass/patternfly/_experimental-features.scss +48 -0
- data/dist/sass/patternfly/_filter.scss +42 -0
- data/dist/sass/patternfly/_fonts.scss +124 -0
- data/dist/sass/patternfly/_footer.scss +19 -0
- data/dist/sass/patternfly/_forms.scss +192 -0
- data/dist/sass/patternfly/_icons.scss +371 -0
- data/dist/sass/patternfly/_infotip.scss +145 -0
- data/dist/sass/patternfly/_labels.scss +17 -0
- data/dist/sass/patternfly/_layouts.scss +140 -0
- data/dist/sass/patternfly/_links.scss +5 -0
- data/dist/sass/patternfly/_list-group.scss +23 -0
- data/dist/sass/patternfly/_list-pf.scss +178 -0
- data/dist/sass/patternfly/_list-view-dnd.scss +53 -0
- data/dist/sass/patternfly/_list-view.scss +390 -0
- data/dist/sass/patternfly/_login.scss +341 -0
- data/dist/sass/patternfly/_mixins.scss +81 -0
- data/dist/sass/patternfly/_modals.scss +49 -0
- data/dist/sass/patternfly/_nav-vertical-alt.scss +168 -0
- data/dist/sass/patternfly/_navbar-alt.scss +141 -0
- data/dist/sass/patternfly/_navbar-vertical.scss +168 -0
- data/dist/sass/patternfly/_navbar.scss +579 -0
- data/dist/sass/patternfly/_notifications-drawer.scss +250 -0
- data/dist/sass/patternfly/_pager.scss +68 -0
- data/dist/sass/patternfly/_pagination.scss +121 -0
- data/dist/sass/patternfly/_panels.scss +134 -0
- data/dist/sass/patternfly/_popovers.scss +52 -0
- data/dist/sass/patternfly/_progress-bars.scss +121 -0
- data/dist/sass/patternfly/_rcue-about-modal.scss +45 -0
- data/dist/sass/patternfly/_rcue-additions.scss +11 -0
- data/dist/sass/patternfly/_rcue-login.scss +75 -0
- data/dist/sass/patternfly/_rcue-variables.scss +57 -0
- data/dist/sass/patternfly/_rcue.scss +6 -0
- data/dist/sass/patternfly/_search.scss +64 -0
- data/dist/sass/patternfly/_sidebar.scss +176 -0
- data/dist/sass/patternfly/_skip-to-content.scss +12 -0
- data/dist/sass/patternfly/_spinner.scss +72 -0
- data/dist/sass/patternfly/_syntax-highlighting.scss +36 -0
- data/dist/sass/patternfly/_table-view.scss +188 -0
- data/dist/sass/patternfly/_tables.scss +90 -0
- data/dist/sass/patternfly/_tabs.scss +118 -0
- data/dist/sass/patternfly/_time-picker.scss +98 -0
- data/dist/sass/patternfly/_toast.scss +75 -0
- data/dist/sass/patternfly/_toolbar.scss +190 -0
- data/dist/sass/patternfly/_tooltip.scss +15 -0
- data/dist/sass/patternfly/_tree-list-view.scss +83 -0
- data/dist/sass/patternfly/_type.scss +29 -0
- data/dist/sass/patternfly/_variables.scss +595 -0
- data/dist/sass/patternfly/_vertical-nav.scss +944 -0
- data/dist/sass/patternfly/_wizard.scss +665 -0
- data/dist/sass/patternfly/dependencies/bootstrap-combobox/combobox.scss +57 -0
- data/dist/sass/patternfly/dependencies/bootstrap-datepicker/datepicker.scss +242 -0
- data/dist/sass/patternfly/dependencies/bootstrap-datepicker/datepicker3.scss +257 -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/dist/sass/patternfly/dependencies/bootstrap-switch/bootstrap-switch.scss +195 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/build.scss +3 -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/mixins.scss +40 -0
- data/dist/sass/patternfly/dependencies/bootstrap-switch/variables.scss +862 -0
- data/dist/sass/patternfly/dependencies/bootstrap-touchspin/_jquery.bootstrap-touchspin.scss +45 -0
- data/dist/sass/patternfly/dependencies/c3/_c3.scss +178 -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/dist/sass/rcue/_about-modal.scss +44 -0
- data/dist/sass/rcue/_accordion.scss +18 -0
- data/dist/sass/rcue/_alerts.scss +44 -0
- data/dist/sass/rcue/_badges.scss +11 -0
- data/dist/sass/rcue/_blank-slate.scss +52 -0
- data/dist/sass/rcue/_bootstrap-combobox.scss +35 -0
- data/dist/sass/rcue/_bootstrap-datepicker.scss +132 -0
- data/dist/sass/rcue/_bootstrap-mixin-overrides.scss +33 -0
- data/dist/sass/rcue/_bootstrap-select.scss +108 -0
- data/dist/sass/rcue/_bootstrap-slider.scss +66 -0
- data/dist/sass/rcue/_bootstrap-switch.scss +19 -0
- data/dist/sass/rcue/_bootstrap-touchspin.scss +31 -0
- data/dist/sass/rcue/_bootstrap-treeview.scss +89 -0
- data/dist/sass/rcue/_breadcrumbs.scss +20 -0
- data/dist/sass/rcue/_buttons.scss +50 -0
- data/dist/sass/rcue/_card-view.scss +105 -0
- data/dist/sass/rcue/_cards.scss +238 -0
- data/dist/sass/rcue/_charts.scss +388 -0
- data/dist/sass/rcue/_close.scss +16 -0
- data/dist/sass/rcue/_color-variables.scss +85 -0
- data/dist/sass/rcue/_context-selector.scss +125 -0
- data/dist/sass/rcue/_datatables.scss +186 -0
- data/dist/sass/rcue/_date-and-time.scss +35 -0
- data/dist/sass/rcue/_dropdowns.scss +235 -0
- data/dist/sass/rcue/_experimental-features.scss +48 -0
- data/dist/sass/rcue/_filter.scss +42 -0
- data/dist/sass/rcue/_fonts.scss +124 -0
- data/dist/sass/rcue/_footer.scss +19 -0
- data/dist/sass/rcue/_forms.scss +192 -0
- data/dist/sass/rcue/_icons.scss +371 -0
- data/dist/sass/rcue/_infotip.scss +145 -0
- data/dist/sass/rcue/_labels.scss +17 -0
- data/dist/sass/rcue/_layouts.scss +140 -0
- data/dist/sass/rcue/_links.scss +5 -0
- data/dist/sass/rcue/_list-group.scss +23 -0
- data/dist/sass/rcue/_list-pf.scss +178 -0
- data/dist/sass/rcue/_list-view-dnd.scss +53 -0
- data/dist/sass/rcue/_list-view.scss +390 -0
- data/dist/sass/rcue/_login.scss +341 -0
- data/dist/sass/rcue/_mixins.scss +81 -0
- data/dist/sass/rcue/_modals.scss +49 -0
- data/dist/sass/rcue/_nav-vertical-alt.scss +168 -0
- data/dist/sass/rcue/_navbar-alt.scss +141 -0
- data/dist/sass/rcue/_navbar-vertical.scss +168 -0
- data/dist/sass/rcue/_navbar.scss +579 -0
- data/dist/sass/rcue/_notifications-drawer.scss +250 -0
- data/dist/sass/rcue/_pager.scss +68 -0
- data/dist/sass/rcue/_pagination.scss +121 -0
- data/dist/sass/rcue/_panels.scss +134 -0
- data/dist/sass/rcue/_patternfly-additions.scss +76 -0
- data/dist/sass/rcue/_patternfly.scss +31 -0
- data/dist/sass/rcue/_popovers.scss +52 -0
- data/dist/sass/rcue/_progress-bars.scss +121 -0
- data/dist/sass/rcue/_rcue-about-modal.scss +45 -0
- data/dist/sass/rcue/_rcue-login.scss +75 -0
- data/dist/sass/rcue/_rcue-variables.scss +57 -0
- data/dist/sass/rcue/_search.scss +64 -0
- data/dist/sass/rcue/_sidebar.scss +176 -0
- data/dist/sass/rcue/_skip-to-content.scss +12 -0
- data/dist/sass/rcue/_spinner.scss +72 -0
- data/dist/sass/rcue/_syntax-highlighting.scss +36 -0
- data/dist/sass/rcue/_table-view.scss +188 -0
- data/dist/sass/rcue/_tables.scss +90 -0
- data/dist/sass/rcue/_tabs.scss +118 -0
- data/dist/sass/rcue/_time-picker.scss +98 -0
- data/dist/sass/rcue/_toast.scss +75 -0
- data/dist/sass/rcue/_toolbar.scss +190 -0
- data/dist/sass/rcue/_tooltip.scss +15 -0
- data/dist/sass/rcue/_tree-list-view.scss +83 -0
- data/dist/sass/rcue/_type.scss +29 -0
- data/dist/sass/rcue/_variables.scss +595 -0
- data/dist/sass/rcue/_vertical-nav.scss +944 -0
- data/dist/sass/rcue/_wizard.scss +665 -0
- data/lib/patternfly-sass/engine.rb +11 -0
- data/lib/patternfly-sass/version.rb +3 -0
- data/lib/patternfly-sass.rb +92 -0
- data/patternfly-sass.gemspec +31 -0
- metadata +445 -0
@@ -0,0 +1,1866 @@
|
|
1
|
+
(function (window) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var patternfly = {
|
5
|
+
version: "3.54.7"
|
6
|
+
};
|
7
|
+
|
8
|
+
// definition of breakpoint sizes for tablet and desktop modes
|
9
|
+
patternfly.pfBreakpoints = {
|
10
|
+
'tablet': 768,
|
11
|
+
'desktop': 1200
|
12
|
+
};
|
13
|
+
|
14
|
+
window.patternfly = patternfly;
|
15
|
+
|
16
|
+
})(typeof window !== 'undefined' ? window : global);
|
17
|
+
|
18
|
+
(function (window) {
|
19
|
+
'use strict';
|
20
|
+
|
21
|
+
// Ensure we are assigning these to the patternfly property of the window argument, and not the implicit global patternfly
|
22
|
+
var patternfly = window.patternfly;
|
23
|
+
|
24
|
+
// Util: PatternFly Palette colors
|
25
|
+
patternfly.pfPaletteColors = {
|
26
|
+
black: '#030303',
|
27
|
+
black100: '#fafafa',
|
28
|
+
black200: '#ededed',
|
29
|
+
black300: '#d1d1d1',
|
30
|
+
black400: '#bbbbbb',
|
31
|
+
black500: '#8b8d8f',
|
32
|
+
black600: '#72767b',
|
33
|
+
black700: '#4d5258',
|
34
|
+
black800: '#393f44',
|
35
|
+
black900: '#292e34',
|
36
|
+
blue: '#0088ce',
|
37
|
+
blue100: '#bee1f4',
|
38
|
+
blue200: '#7dc3e8',
|
39
|
+
blue300: '#39a5dc',
|
40
|
+
blue400: '#0088ce',
|
41
|
+
blue500: '#00659c',
|
42
|
+
blue600: '#004368',
|
43
|
+
blue700: '#002235',
|
44
|
+
gold: '#f0ab00',
|
45
|
+
gold100: '#fbeabc',
|
46
|
+
gold200: '#f9d67a',
|
47
|
+
gold300: '#f5c12e',
|
48
|
+
gold400: '#f0ab00',
|
49
|
+
gold500: '#b58100',
|
50
|
+
gold600: '#795600',
|
51
|
+
gold700: '#3d2c00',
|
52
|
+
orange: '#ec7a08',
|
53
|
+
orange100: '#fbdebf',
|
54
|
+
orange200: '#f7bd7f',
|
55
|
+
orange300: '#f39d3c',
|
56
|
+
orange400: '#ec7a08',
|
57
|
+
orange500: '#b35c00',
|
58
|
+
orange600: '#773d00',
|
59
|
+
orange700: '#3b1f00',
|
60
|
+
lightBlue: '#00b9e4',
|
61
|
+
lightBlue100: '#beedf9',
|
62
|
+
lightBlue200: '#7cdbf3',
|
63
|
+
lightBlue300: '#35caed',
|
64
|
+
lightBlue400: '#00b9e4',
|
65
|
+
lightBlue500: '#008bad',
|
66
|
+
lightBlue600: '#005c73',
|
67
|
+
lightBlue700: '#002d39',
|
68
|
+
green: '#3f9c35',
|
69
|
+
green100: '#cfe7cd',
|
70
|
+
green200: '#9ecf99',
|
71
|
+
green300: '#6ec664',
|
72
|
+
green400: '#3f9c35',
|
73
|
+
green500: '#2d7623',
|
74
|
+
green600: '#1e4f18',
|
75
|
+
green700: '#0f280d',
|
76
|
+
lightGreen: '#92d400',
|
77
|
+
lightGreen100: '#e4f5bc',
|
78
|
+
lightGreen200: '#c8eb79',
|
79
|
+
lightGreen300: '#ace12e',
|
80
|
+
lightGreen400: '#92d400',
|
81
|
+
lightGreen500: '#6ca100',
|
82
|
+
lightGreen600: '#486b00',
|
83
|
+
lightGreen700: '#253600',
|
84
|
+
cyan: '#007a87',
|
85
|
+
cyan100: '#bedee1',
|
86
|
+
cyan200: '#7dbdc3',
|
87
|
+
cyan300: '#3a9ca6',
|
88
|
+
cyan400: '#007a87',
|
89
|
+
cyan500: '#005c66',
|
90
|
+
cyan600: '#003d44',
|
91
|
+
cyan700: '#001f22',
|
92
|
+
purple: '#703fec',
|
93
|
+
purple100: '#c7bfff',
|
94
|
+
purple200: '#a18fff',
|
95
|
+
purple300: '#8461f7',
|
96
|
+
purple400: '#703fec',
|
97
|
+
purple500: '#582fc0',
|
98
|
+
purple600: '#40199a',
|
99
|
+
purple700: '#1f0066',
|
100
|
+
red: '#cc0000',
|
101
|
+
red100: '#cc0000',
|
102
|
+
red200: '#a30000',
|
103
|
+
red300: '#8b0000',
|
104
|
+
red400: '#470000',
|
105
|
+
red500: '#2c0000'
|
106
|
+
};
|
107
|
+
})(typeof window !== 'undefined' ? window : global);
|
108
|
+
|
109
|
+
|
110
|
+
(function (window) {
|
111
|
+
'use strict';
|
112
|
+
|
113
|
+
// Ensure we are assigning these to the patternfly property of the window argument, and not the implicit global patternfly
|
114
|
+
var patternfly = window.patternfly;
|
115
|
+
|
116
|
+
// Util: PatternFly C3 Chart Defaults
|
117
|
+
patternfly.pfSetDonutChartTitle = function (selector, primary, secondary) {
|
118
|
+
var donutChartRightTitle = window.d3.select(selector).select('text.c3-chart-arcs-title');
|
119
|
+
donutChartRightTitle.text("");
|
120
|
+
donutChartRightTitle.insert('tspan').text(primary).classed('donut-title-big-pf', true).attr('dy', 0).attr('x', 0);
|
121
|
+
donutChartRightTitle.insert('tspan').text(secondary).classed('donut-title-small-pf', true).attr('dy', 20).attr('x', 0);
|
122
|
+
};
|
123
|
+
|
124
|
+
patternfly.pfDonutTooltipContents = function (d, defaultTitleFormat, defaultValueFormat, color) {
|
125
|
+
return '<table class="c3-tooltip">' +
|
126
|
+
' <tr>' +
|
127
|
+
' <td><span style="background-color:' + color(d[0].id) + '"></span>' + '<strong>' + d[0].value + '</strong> ' + d[0].name + '</td>' +
|
128
|
+
' <td>' + (Math.round(d[0].ratio * 1000) / 10) + '%</td>' +
|
129
|
+
' </tr>' +
|
130
|
+
'</table>';
|
131
|
+
};
|
132
|
+
|
133
|
+
patternfly.pfGetUtilizationDonutTooltipContentsFn = function (units) {
|
134
|
+
return function (d) {
|
135
|
+
return '<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
|
136
|
+
(Math.round(d[0].ratio * 1000) / 10) + '%' + ' ' + units + ' ' + d[0].name +
|
137
|
+
'</span>';
|
138
|
+
};
|
139
|
+
};
|
140
|
+
|
141
|
+
patternfly.pfGetBarChartTooltipContentsFn = function (categories) {
|
142
|
+
return function (d) {
|
143
|
+
var name = categories ? categories[d[0].index] : d[0].index;
|
144
|
+
return '<table class="c3-tooltip">' +
|
145
|
+
' <tr>' +
|
146
|
+
' <td><strong>' + name + ':</td>' +
|
147
|
+
' <td>' + d[0].value + '</td>' +
|
148
|
+
' </tr>' +
|
149
|
+
'</table>';
|
150
|
+
};
|
151
|
+
};
|
152
|
+
|
153
|
+
patternfly.pfSingleLineChartTooltipContentsFn = function (categories) {
|
154
|
+
return function (d) {
|
155
|
+
var name = categories ? categories[d[0].index] : d[0].index;
|
156
|
+
return '<table class="c3-tooltip">' +
|
157
|
+
' <tr>' +
|
158
|
+
' <td><strong>' + name + ':</td>' +
|
159
|
+
' <td>' + d[0].value + '</td>' +
|
160
|
+
' </tr>' +
|
161
|
+
'</table>';
|
162
|
+
};
|
163
|
+
};
|
164
|
+
|
165
|
+
patternfly.pfPieTooltipContents = function (d, defaultTitleFormat, defaultValueFormat, color) {
|
166
|
+
return patternfly.pfDonutTooltipContents(d, defaultTitleFormat, defaultValueFormat, color);
|
167
|
+
};
|
168
|
+
|
169
|
+
patternfly.c3ChartDefaults = function () {
|
170
|
+
var
|
171
|
+
getDefaultColors = function () {
|
172
|
+
return {
|
173
|
+
pattern: [
|
174
|
+
patternfly.pfPaletteColors.blue,
|
175
|
+
patternfly.pfPaletteColors.blue300,
|
176
|
+
patternfly.pfPaletteColors.green,
|
177
|
+
patternfly.pfPaletteColors.orange,
|
178
|
+
patternfly.pfPaletteColors.red
|
179
|
+
]
|
180
|
+
};
|
181
|
+
},
|
182
|
+
getDefaultBarGrid = function () {
|
183
|
+
return {
|
184
|
+
y: {
|
185
|
+
show: true
|
186
|
+
}
|
187
|
+
};
|
188
|
+
},
|
189
|
+
getDefaultBarTooltip = function (categories) {
|
190
|
+
return {
|
191
|
+
contents: patternfly.pfGetBarChartTooltipContentsFn(categories)
|
192
|
+
};
|
193
|
+
},
|
194
|
+
getDefaultBarLegend = function () {
|
195
|
+
return {
|
196
|
+
show: false
|
197
|
+
};
|
198
|
+
},
|
199
|
+
getDefaultBarConfig = function (categories) {
|
200
|
+
return {
|
201
|
+
color: this.getDefaultColors(),
|
202
|
+
grid: this.getDefaultBarGrid(),
|
203
|
+
tooltip: this.getDefaultBarTooltip(categories),
|
204
|
+
legend: this.getDefaultBarLegend()
|
205
|
+
};
|
206
|
+
},
|
207
|
+
getDefaultGroupedBarGrid = function () {
|
208
|
+
return {
|
209
|
+
y: {
|
210
|
+
show: true
|
211
|
+
}
|
212
|
+
};
|
213
|
+
},
|
214
|
+
getDefaultGroupedBarLegend = function () {
|
215
|
+
return {
|
216
|
+
show: true,
|
217
|
+
position: 'bottom'
|
218
|
+
};
|
219
|
+
},
|
220
|
+
getDefaultGroupedBarConfig = function () {
|
221
|
+
return {
|
222
|
+
color: this.getDefaultColors(),
|
223
|
+
grid: this.getDefaultGroupedBarGrid(),
|
224
|
+
legend: this.getDefaultGroupedBarLegend()
|
225
|
+
};
|
226
|
+
},
|
227
|
+
getDefaultStackedBarGrid = function () {
|
228
|
+
return {
|
229
|
+
y: {
|
230
|
+
show: true
|
231
|
+
}
|
232
|
+
};
|
233
|
+
},
|
234
|
+
getDefaultStackedBarLegend = function () {
|
235
|
+
return {
|
236
|
+
show: true,
|
237
|
+
position: 'bottom'
|
238
|
+
};
|
239
|
+
},
|
240
|
+
getDefaultStackedBarConfig = function () {
|
241
|
+
return {
|
242
|
+
color: this.getDefaultColors(),
|
243
|
+
grid: this.getDefaultStackedBarGrid(),
|
244
|
+
legend: this.getDefaultStackedBarLegend()
|
245
|
+
};
|
246
|
+
},
|
247
|
+
getDefaultDonut = function (title) {
|
248
|
+
return {
|
249
|
+
title: title,
|
250
|
+
label: {
|
251
|
+
show: false
|
252
|
+
},
|
253
|
+
width: 11
|
254
|
+
};
|
255
|
+
},
|
256
|
+
getDefaultDonutSize = function () {
|
257
|
+
return {
|
258
|
+
height: 171 // produces a diameter of 150 and a centered chart when there is no legend
|
259
|
+
// Don't set a width here, the default is to center horizontally in the parent container
|
260
|
+
};
|
261
|
+
},
|
262
|
+
getDefaultDonutColors = function () {
|
263
|
+
return {
|
264
|
+
pattern: [
|
265
|
+
patternfly.pfPaletteColors.blue,
|
266
|
+
patternfly.pfPaletteColors.black300
|
267
|
+
]
|
268
|
+
};
|
269
|
+
},
|
270
|
+
getDefaultRelationshipDonutColors = function () {
|
271
|
+
return {
|
272
|
+
pattern: [
|
273
|
+
patternfly.pfPaletteColors.blue,
|
274
|
+
patternfly.pfPaletteColors.red100,
|
275
|
+
patternfly.pfPaletteColors.orange400,
|
276
|
+
patternfly.pfPaletteColors.green400,
|
277
|
+
patternfly.pfPaletteColors.cyan500,
|
278
|
+
patternfly.pfPaletteColors.gold200,
|
279
|
+
]
|
280
|
+
};
|
281
|
+
},
|
282
|
+
getDefaultDonutTooltip = function () {
|
283
|
+
return {
|
284
|
+
show: false
|
285
|
+
};
|
286
|
+
},
|
287
|
+
getDefaultDonutLegend = function () {
|
288
|
+
return {
|
289
|
+
show: false
|
290
|
+
};
|
291
|
+
},
|
292
|
+
getDefaultDonutConfig = function (title) {
|
293
|
+
return {
|
294
|
+
donut: this.getDefaultDonut(title),
|
295
|
+
size: this.getDefaultDonutSize(),
|
296
|
+
legend: this.getDefaultDonutLegend(),
|
297
|
+
color: this.getDefaultDonutColors(),
|
298
|
+
tooltip: this.getDefaultDonutTooltip()
|
299
|
+
};
|
300
|
+
},
|
301
|
+
getDefaultRelationshipDonutConfig = function (title) {
|
302
|
+
return {
|
303
|
+
donut: this.getDefaultDonut(title),
|
304
|
+
size: this.getDefaultDonutSize(),
|
305
|
+
legend: this.getDefaultDonutLegend(),
|
306
|
+
color: this.getDefaultRelationshipDonutColors(),
|
307
|
+
tooltip: this.getDefaultDonutTooltip()
|
308
|
+
};
|
309
|
+
},
|
310
|
+
getDefaultPie = function () {
|
311
|
+
return {
|
312
|
+
expand: true,
|
313
|
+
label: {
|
314
|
+
show: false
|
315
|
+
}
|
316
|
+
};
|
317
|
+
},
|
318
|
+
getDefaultPieSize = function () {
|
319
|
+
return {
|
320
|
+
height: 171 // produces a diameter of 150 and a centered chart when there is no legend
|
321
|
+
// Don't set a width here, default is to center horizontally in the parent container
|
322
|
+
};
|
323
|
+
},
|
324
|
+
getDefaultPieColors = function () {
|
325
|
+
return {
|
326
|
+
pattern: [
|
327
|
+
patternfly.pfPaletteColors.blue,
|
328
|
+
patternfly.pfPaletteColors.black300
|
329
|
+
]
|
330
|
+
};
|
331
|
+
},
|
332
|
+
getDefaultPieTooltip = function () {
|
333
|
+
return {
|
334
|
+
contents: patternfly.pfPieTooltipContents
|
335
|
+
};
|
336
|
+
},
|
337
|
+
getDefaultPieLegend = function () {
|
338
|
+
return {
|
339
|
+
show: false
|
340
|
+
};
|
341
|
+
},
|
342
|
+
getDefaultPieConfig = function () {
|
343
|
+
return {
|
344
|
+
pie: this.getDefaultPie(),
|
345
|
+
size: this.getDefaultPieSize(),
|
346
|
+
legend: this.getDefaultPieLegend(),
|
347
|
+
color: this.getDefaultPieColors(),
|
348
|
+
tooltip: this.getDefaultPieTooltip()
|
349
|
+
};
|
350
|
+
},
|
351
|
+
getDefaultSparklineArea = function () {
|
352
|
+
return {
|
353
|
+
zerobased: true
|
354
|
+
};
|
355
|
+
},
|
356
|
+
getDefaultSparklineSize = function () {
|
357
|
+
return {
|
358
|
+
height: 60
|
359
|
+
};
|
360
|
+
},
|
361
|
+
getDefaultSparklineAxis = function () {
|
362
|
+
return {
|
363
|
+
x: {
|
364
|
+
show: false
|
365
|
+
},
|
366
|
+
y: {
|
367
|
+
show: false
|
368
|
+
}
|
369
|
+
};
|
370
|
+
},
|
371
|
+
getDefaultSparklineLegend = function () {
|
372
|
+
return {
|
373
|
+
show: false
|
374
|
+
};
|
375
|
+
},
|
376
|
+
getDefaultSparklinePoint = function () {
|
377
|
+
return {
|
378
|
+
r: 1,
|
379
|
+
focus: {
|
380
|
+
expand: {
|
381
|
+
r: 4
|
382
|
+
}
|
383
|
+
}
|
384
|
+
};
|
385
|
+
},
|
386
|
+
getDefaultSparklineTooltip = function () {
|
387
|
+
return {
|
388
|
+
// because a sparkline should only contain a single data column,
|
389
|
+
// the tooltip will only work for a single data column
|
390
|
+
contents: function (d) {
|
391
|
+
return '<span class="c3-tooltip-sparkline">' + d[0].value + ' ' + d[0].name + '</span>';
|
392
|
+
}
|
393
|
+
};
|
394
|
+
},
|
395
|
+
getDefaultSparklineConfig = function () {
|
396
|
+
return {
|
397
|
+
area: getDefaultSparklineArea(),
|
398
|
+
size: getDefaultSparklineSize(),
|
399
|
+
axis: getDefaultSparklineAxis(),
|
400
|
+
color: getDefaultColors(),
|
401
|
+
legend: getDefaultSparklineLegend(),
|
402
|
+
point: getDefaultSparklinePoint(),
|
403
|
+
tooltip: getDefaultSparklineTooltip()
|
404
|
+
};
|
405
|
+
},
|
406
|
+
getDefaultLineAxis = function () {
|
407
|
+
return {
|
408
|
+
x: {
|
409
|
+
show: true
|
410
|
+
},
|
411
|
+
y: {
|
412
|
+
show: true
|
413
|
+
}
|
414
|
+
};
|
415
|
+
},
|
416
|
+
getDefaultLineGrid = function () {
|
417
|
+
return {
|
418
|
+
x: {
|
419
|
+
show: false
|
420
|
+
},
|
421
|
+
y: {
|
422
|
+
show: true
|
423
|
+
}
|
424
|
+
};
|
425
|
+
},
|
426
|
+
getDefaultLineLegend = function () {
|
427
|
+
return {
|
428
|
+
show: true
|
429
|
+
};
|
430
|
+
},
|
431
|
+
getDefaultLinePoint = function () {
|
432
|
+
return {
|
433
|
+
r: 3,
|
434
|
+
focus: {
|
435
|
+
expand: {
|
436
|
+
r: 5
|
437
|
+
}
|
438
|
+
}
|
439
|
+
};
|
440
|
+
},
|
441
|
+
getDefaultLineConfig = function () {
|
442
|
+
return {
|
443
|
+
axis: getDefaultLineAxis(),
|
444
|
+
grid: getDefaultLineGrid(),
|
445
|
+
color: getDefaultColors(),
|
446
|
+
legend: getDefaultLineLegend(),
|
447
|
+
point: getDefaultLinePoint()
|
448
|
+
};
|
449
|
+
},
|
450
|
+
getDefaultSingleLineTooltip = function () {
|
451
|
+
return {
|
452
|
+
contents: patternfly.pfGetBarChartTooltipContentsFn()
|
453
|
+
};
|
454
|
+
},
|
455
|
+
getDefaultSingleLineLegend = function () {
|
456
|
+
return {
|
457
|
+
show: false
|
458
|
+
};
|
459
|
+
},
|
460
|
+
getDefaultSingleLineConfig = function () {
|
461
|
+
return {
|
462
|
+
axis: getDefaultLineAxis(),
|
463
|
+
grid: getDefaultLineGrid(),
|
464
|
+
color: getDefaultColors(),
|
465
|
+
legend: getDefaultSingleLineLegend(),
|
466
|
+
point: getDefaultLinePoint(),
|
467
|
+
tooltip: getDefaultSingleLineTooltip()
|
468
|
+
};
|
469
|
+
},
|
470
|
+
getDefaultAreaAxis = function () {
|
471
|
+
return getDefaultLineAxis();
|
472
|
+
},
|
473
|
+
getDefaultAreaGrid = function () {
|
474
|
+
return getDefaultLineGrid();
|
475
|
+
},
|
476
|
+
getDefaultAreaLegend = function () {
|
477
|
+
return getDefaultLineLegend();
|
478
|
+
},
|
479
|
+
getDefaultAreaPoint = function () {
|
480
|
+
return getDefaultLinePoint();
|
481
|
+
},
|
482
|
+
getDefaultAreaConfig = function () {
|
483
|
+
return {
|
484
|
+
axis: getDefaultAreaAxis(),
|
485
|
+
grid: getDefaultAreaGrid(),
|
486
|
+
color: getDefaultColors(),
|
487
|
+
legend: getDefaultAreaLegend(),
|
488
|
+
point: getDefaultAreaPoint()
|
489
|
+
};
|
490
|
+
},
|
491
|
+
getDefaultSingleAreaTooltip = function () {
|
492
|
+
return {
|
493
|
+
contents: patternfly.pfGetBarChartTooltipContentsFn()
|
494
|
+
};
|
495
|
+
},
|
496
|
+
getDefaultSingleAreaLegend = function () {
|
497
|
+
return getDefaultSingleLineLegend();
|
498
|
+
},
|
499
|
+
getDefaultSingleAreaConfig = function () {
|
500
|
+
return {
|
501
|
+
axis: getDefaultAreaAxis(),
|
502
|
+
grid: getDefaultAreaGrid(),
|
503
|
+
color: getDefaultColors(),
|
504
|
+
legend: getDefaultSingleAreaLegend(),
|
505
|
+
point: getDefaultAreaPoint(),
|
506
|
+
tooltip: getDefaultSingleAreaTooltip()
|
507
|
+
};
|
508
|
+
};
|
509
|
+
return {
|
510
|
+
getDefaultColors: getDefaultColors,
|
511
|
+
getDefaultBarGrid: getDefaultBarGrid,
|
512
|
+
getDefaultBarTooltip: getDefaultBarTooltip,
|
513
|
+
getDefaultBarLegend: getDefaultBarLegend,
|
514
|
+
getDefaultBarConfig: getDefaultBarConfig,
|
515
|
+
getDefaultGroupedBarGrid: getDefaultGroupedBarGrid,
|
516
|
+
getDefaultGroupedBarLegend: getDefaultGroupedBarLegend,
|
517
|
+
getDefaultGroupedBarConfig: getDefaultGroupedBarConfig,
|
518
|
+
getDefaultStackedBarGrid: getDefaultStackedBarGrid,
|
519
|
+
getDefaultStackedBarLegend: getDefaultStackedBarLegend,
|
520
|
+
getDefaultStackedBarConfig: getDefaultStackedBarConfig,
|
521
|
+
getDefaultDonut: getDefaultDonut,
|
522
|
+
getDefaultDonutSize: getDefaultDonutSize,
|
523
|
+
getDefaultDonutColors: getDefaultDonutColors,
|
524
|
+
getDefaultDonutTooltip: getDefaultDonutTooltip,
|
525
|
+
getDefaultDonutLegend: getDefaultDonutLegend,
|
526
|
+
getDefaultDonutConfig: getDefaultDonutConfig,
|
527
|
+
getDefaultRelationshipDonutConfig: getDefaultRelationshipDonutConfig,
|
528
|
+
getDefaultPie: getDefaultPie,
|
529
|
+
getDefaultPieSize: getDefaultPieSize,
|
530
|
+
getDefaultPieColors: getDefaultPieColors,
|
531
|
+
getDefaultRelationshipDonutColors: getDefaultRelationshipDonutColors,
|
532
|
+
getDefaultPieTooltip: getDefaultPieTooltip,
|
533
|
+
getDefaultPieLegend: getDefaultPieLegend,
|
534
|
+
getDefaultPieConfig: getDefaultPieConfig,
|
535
|
+
getDefaultSparklineArea: getDefaultSparklineArea,
|
536
|
+
getDefaultSparklineSize: getDefaultSparklineSize,
|
537
|
+
getDefaultSparklineAxis: getDefaultSparklineAxis,
|
538
|
+
getDefaultSparklineLegend: getDefaultSparklineLegend,
|
539
|
+
getDefaultSparklinePoint: getDefaultSparklinePoint,
|
540
|
+
getDefaultSparklineTooltip: getDefaultSparklineTooltip,
|
541
|
+
getDefaultSparklineConfig: getDefaultSparklineConfig,
|
542
|
+
getDefaultLineAxis: getDefaultLineAxis,
|
543
|
+
getDefaultLineGrid: getDefaultLineGrid,
|
544
|
+
getDefaultLineLegend: getDefaultLineLegend,
|
545
|
+
getDefaultLinePoint: getDefaultLinePoint,
|
546
|
+
getDefaultLineConfig: getDefaultLineConfig,
|
547
|
+
getDefaultSingleLineTooltip: getDefaultSingleLineTooltip,
|
548
|
+
getDefaultSingleLineConfig: getDefaultSingleLineConfig,
|
549
|
+
getDefaultAreaAxis: getDefaultAreaAxis,
|
550
|
+
getDefaultAreaGrid: getDefaultAreaGrid,
|
551
|
+
getDefaultAreaLegend: getDefaultAreaLegend,
|
552
|
+
getDefaultAreaPoint: getDefaultAreaPoint,
|
553
|
+
getDefaultAreaConfig: getDefaultAreaConfig,
|
554
|
+
getDefaultSingleAreaTooltip: getDefaultSingleAreaTooltip,
|
555
|
+
getDefaultSingleAreaConfig: getDefaultSingleAreaConfig
|
556
|
+
};
|
557
|
+
};
|
558
|
+
})(typeof window !== 'undefined' ? window : global);
|
559
|
+
|
560
|
+
// Util: definition of breakpoint sizes for tablet and desktop modes
|
561
|
+
(function ($) {
|
562
|
+
'use strict';
|
563
|
+
if (patternfly !== undefined) {
|
564
|
+
$.pfBreakpoints = patternfly.pfBreakpoints;
|
565
|
+
}
|
566
|
+
}(jQuery));
|
567
|
+
// PatternFly pf-list
|
568
|
+
(function ($) {
|
569
|
+
'use strict';
|
570
|
+
|
571
|
+
$.fn.pfList = function () {
|
572
|
+
function init (list) {
|
573
|
+
// Ensure the state of the expansion elements is consistent
|
574
|
+
list.find('[data-list=expansion], .list-pf-item, .list-pf-expansion').each(function (index, element) {
|
575
|
+
var $expansion = $(element),
|
576
|
+
$collapse = $expansion.find('.collapse').first(),
|
577
|
+
expanded = $collapse.hasClass('in');
|
578
|
+
updateChevron($expansion, expanded);
|
579
|
+
if ($expansion.hasClass('list-pf-item')) {
|
580
|
+
updateActive($expansion, expanded);
|
581
|
+
}
|
582
|
+
});
|
583
|
+
list.find('.list-pf-container').each(function (index, element) {
|
584
|
+
var $element = $(element);
|
585
|
+
// The toggle element is the element with the data-list=toggle attribute
|
586
|
+
// or the entire .list-pf-container as a fallback
|
587
|
+
var $toggles = $element.find('[data-list=toggle]');
|
588
|
+
$toggles.length || ($toggles = $element);
|
589
|
+
$toggles.on('keydown', function (event) {
|
590
|
+
if (event.keyCode === 13 || event.keyCode === 32) {
|
591
|
+
toggleCollapse(this);
|
592
|
+
event.stopPropagation();
|
593
|
+
event.preventDefault();
|
594
|
+
}
|
595
|
+
});
|
596
|
+
$toggles.on('click', function (event) {
|
597
|
+
toggleCollapse(this);
|
598
|
+
event.stopPropagation();
|
599
|
+
event.preventDefault();
|
600
|
+
});
|
601
|
+
});
|
602
|
+
}
|
603
|
+
|
604
|
+
function toggleCollapse (toggle) {
|
605
|
+
var $toggle, $expansion, $collapse, expanded, $listItem;
|
606
|
+
$toggle = $(toggle);
|
607
|
+
// Find the parent expansion of the toggle
|
608
|
+
$expansion = $toggle.parentsUntil('.list-pf', '[data-list=expansion]').first();
|
609
|
+
$expansion.length || ($expansion = $toggle.closest('.list-pf-item, .list-pf-expansion'));
|
610
|
+
|
611
|
+
// toggle the "in" class of its first .collapse child
|
612
|
+
$collapse = $expansion.find('.collapse').first();
|
613
|
+
$collapse.toggleClass('in');
|
614
|
+
|
615
|
+
// update the state of the expansion element
|
616
|
+
updateChevron($expansion, $collapse.hasClass('in'));
|
617
|
+
$listItem = $expansion.closest('.list-pf-item');
|
618
|
+
updateActive($listItem, $listItem.find('.collapse').first().hasClass('in'));
|
619
|
+
}
|
620
|
+
|
621
|
+
function updateActive ($listItem, expanded) {
|
622
|
+
// Find the closest .list-pf-item of the expansion, and set its "active" class
|
623
|
+
if (expanded) {
|
624
|
+
$listItem.addClass('active');
|
625
|
+
} else {
|
626
|
+
$listItem.removeClass('active');
|
627
|
+
}
|
628
|
+
}
|
629
|
+
|
630
|
+
function updateChevron ($expansion, expanded) {
|
631
|
+
var $chevron = $expansion.find('.list-pf-chevron .fa').first();
|
632
|
+
if (expanded) {
|
633
|
+
$chevron.removeClass('fa-angle-right');
|
634
|
+
$chevron.addClass('fa-angle-down');
|
635
|
+
} else {
|
636
|
+
$chevron.addClass('fa-angle-right');
|
637
|
+
$chevron.removeClass('fa-angle-down');
|
638
|
+
}
|
639
|
+
}
|
640
|
+
|
641
|
+
init(this);
|
642
|
+
|
643
|
+
return this;
|
644
|
+
};
|
645
|
+
}(jQuery));
|
646
|
+
|
647
|
+
// Util: PatternFly Sidebar
|
648
|
+
// Set height of sidebar-pf to height of document minus height of navbar-pf if not mobile
|
649
|
+
(function ($) {
|
650
|
+
'use strict';
|
651
|
+
$.fn.sidebar = function () {
|
652
|
+
var documentHeight = 0,
|
653
|
+
navbarpfHeight = 0,
|
654
|
+
colHeight = 0;
|
655
|
+
|
656
|
+
if ($('.navbar-pf .navbar-toggle').is(':hidden')) {
|
657
|
+
documentHeight = $(document).height();
|
658
|
+
navbarpfHeight = $('.navbar-pf').outerHeight();
|
659
|
+
colHeight = documentHeight - navbarpfHeight;
|
660
|
+
}
|
661
|
+
$('.sidebar-pf').parent('.row').children('[class*="col-"]').css({"min-height" : colHeight});
|
662
|
+
};
|
663
|
+
|
664
|
+
$(document).ready(function () {
|
665
|
+
// Call sidebar() on ready if .sidebar-pf exists and .datatable does not exist
|
666
|
+
if ($('.sidebar-pf').length > 0 && $('.datatable').length === 0) {
|
667
|
+
$.fn.sidebar();
|
668
|
+
}
|
669
|
+
});
|
670
|
+
|
671
|
+
$(window).on('resize', function () {
|
672
|
+
// Call sidebar() on resize if .sidebar-pf exists
|
673
|
+
if ($('.sidebar-pf').length > 0) {
|
674
|
+
$.fn.sidebar();
|
675
|
+
}
|
676
|
+
});
|
677
|
+
}(jQuery));
|
678
|
+
|
679
|
+
// Util: PatternFly Popovers
|
680
|
+
// Add data-close="true" to insert close X icon
|
681
|
+
(function ($) {
|
682
|
+
'use strict';
|
683
|
+
|
684
|
+
$.fn.popovers = function () {
|
685
|
+
// Initialize
|
686
|
+
this.popover();
|
687
|
+
|
688
|
+
// Add close icons
|
689
|
+
this.filter('[data-close=true]').each(function (index, element) {
|
690
|
+
var $this = $(element),
|
691
|
+
title = $this.attr('data-original-title') + '<button type="button" class="close" aria-hidden="true"><span class="pficon pficon-close"></span></button>';
|
692
|
+
|
693
|
+
$this.attr('data-original-title', title);
|
694
|
+
});
|
695
|
+
|
696
|
+
// Bind Close Icon to Toggle Display
|
697
|
+
this.on('click', function (e) {
|
698
|
+
var $this = $(this),
|
699
|
+
$title = $this.next('.popover').find('.popover-title');
|
700
|
+
|
701
|
+
// Only if data-close is true add class "x" to title for right padding
|
702
|
+
$title.find('.close').parent('.popover-title').addClass('closable');
|
703
|
+
|
704
|
+
// Bind x icon to close popover
|
705
|
+
$title.find('.close').on('click', function () {
|
706
|
+
$this.popover('hide');
|
707
|
+
});
|
708
|
+
|
709
|
+
// Prevent href="#" page scroll to top
|
710
|
+
e.preventDefault();
|
711
|
+
});
|
712
|
+
|
713
|
+
return this;
|
714
|
+
};
|
715
|
+
}(jQuery));
|
716
|
+
|
717
|
+
// Util: DataTables Settings
|
718
|
+
(function ($) {
|
719
|
+
'use strict';
|
720
|
+
if ($.fn.dataTableExt) {
|
721
|
+
/* Set the defaults for DataTables initialisation */
|
722
|
+
$.extend(true, $.fn.dataTable.defaults, {
|
723
|
+
"bDestroy": true,
|
724
|
+
"bAutoWidth": false,
|
725
|
+
"iDisplayLength": 20,
|
726
|
+
"sDom":
|
727
|
+
"<'dataTables_header' f i r >" +
|
728
|
+
"<'table-responsive' t >" +
|
729
|
+
"<'dataTables_footer' p >",
|
730
|
+
"oLanguage": {
|
731
|
+
"sInfo": "Showing <b>_START_</b> to <b>_END_</b> of <b>_TOTAL_</b> Items",
|
732
|
+
"sInfoFiltered" : "(of <b>_MAX_</b>)",
|
733
|
+
"sInfoEmpty" : "Showing <b>0</b> Results",
|
734
|
+
"sZeroRecords":
|
735
|
+
"<p>Suggestions</p>" +
|
736
|
+
"<ul>" +
|
737
|
+
"<li>Check the javascript regular expression syntax of the search term.</li>" +
|
738
|
+
"<li>Check that the correct menu option is chosen (token ID vs. user ID).</li>" +
|
739
|
+
"<li>Use wildcards (* to match 0 or more characters, + to match 1 or more characters, ? to match 0 or 1 character).</li>" +
|
740
|
+
"<li>Clear the search field, then click Search to return to the 20 most recent records.</li>" +
|
741
|
+
"</ul>",
|
742
|
+
"sSearch": ""
|
743
|
+
},
|
744
|
+
"sPaginationType": "bootstrap_input",
|
745
|
+
"oSearch": {
|
746
|
+
"sSearch": "",
|
747
|
+
"bRegex": true,
|
748
|
+
"bSmart": false
|
749
|
+
}
|
750
|
+
});
|
751
|
+
|
752
|
+
/* Default class modification */
|
753
|
+
$.extend($.fn.dataTableExt.oStdClasses, {
|
754
|
+
"sWrapper": "dataTables_wrapper"
|
755
|
+
});
|
756
|
+
|
757
|
+
/* API method to get paging information */
|
758
|
+
$.fn.dataTableExt.oApi.fnPagingInfo = function (oSettings) {
|
759
|
+
return {
|
760
|
+
"iStart": oSettings._iDisplayStart,
|
761
|
+
"iEnd": oSettings.fnDisplayEnd(),
|
762
|
+
"iLength": oSettings._iDisplayLength,
|
763
|
+
"iTotal": oSettings.fnRecordsTotal(),
|
764
|
+
"iFilteredTotal": oSettings.fnRecordsDisplay(),
|
765
|
+
"iPage": oSettings._iDisplayLength === -1 ? 0 : Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength),
|
766
|
+
"iTotalPages": oSettings._iDisplayLength === -1 ? 0 : Math.ceil(oSettings.fnRecordsDisplay() / oSettings._iDisplayLength)
|
767
|
+
};
|
768
|
+
};
|
769
|
+
|
770
|
+
/* Combination of Bootstrap + Input Text style pagination control */
|
771
|
+
$.extend($.fn.dataTableExt.oPagination, {
|
772
|
+
"bootstrap_input": {
|
773
|
+
"fnInit": function (oSettings, nPaging, fnDraw) {
|
774
|
+
var fnClickHandler = function (e) {
|
775
|
+
e.preventDefault();
|
776
|
+
if (oSettings.oApi._fnPageChange(oSettings, e.data.action)) {
|
777
|
+
fnDraw(oSettings);
|
778
|
+
}
|
779
|
+
},
|
780
|
+
els,
|
781
|
+
nInput;
|
782
|
+
|
783
|
+
$(nPaging).append(
|
784
|
+
'<ul class="pagination">' +
|
785
|
+
' <li class="first disabled"><span class="i fa fa-angle-double-left"></span></li>' +
|
786
|
+
' <li class="prev disabled"><span class="i fa fa-angle-left"></span></li>' +
|
787
|
+
'</ul>' +
|
788
|
+
'<div class="pagination-input">' +
|
789
|
+
' <input type="text" class="paginate_input">' +
|
790
|
+
' <span class="paginate_of">of <b>3</b></span>' +
|
791
|
+
'</div>' +
|
792
|
+
'<ul class="pagination">' +
|
793
|
+
' <li class="next disabled"><span class="i fa fa-angle-right"></span></li>' +
|
794
|
+
' <li class="last disabled"><span class="i fa fa-angle-double-right"></span></li>' +
|
795
|
+
'</ul>'
|
796
|
+
);
|
797
|
+
|
798
|
+
els = $('li', nPaging);
|
799
|
+
$(els[0]).bind('click.DT', { action: "first" }, fnClickHandler);
|
800
|
+
$(els[1]).bind('click.DT', { action: "previous" }, fnClickHandler);
|
801
|
+
$(els[2]).bind('click.DT', { action: "next" }, fnClickHandler);
|
802
|
+
$(els[3]).bind('click.DT', { action: "last" }, fnClickHandler);
|
803
|
+
|
804
|
+
nInput = $('input', nPaging);
|
805
|
+
$(nInput).keyup(function (e) {
|
806
|
+
var iNewStart;
|
807
|
+
if (e.which === 38 || e.which === 39) {
|
808
|
+
this.value += 1;
|
809
|
+
} else if ((e.which === 37 || e.which === 40) && this.value > 1) {
|
810
|
+
this.value -= 1;
|
811
|
+
}
|
812
|
+
|
813
|
+
if (this.value === "" || !this.value.match(/[0-9]/)) {
|
814
|
+
/* Nothing entered or non-numeric character */
|
815
|
+
return;
|
816
|
+
}
|
817
|
+
|
818
|
+
iNewStart = oSettings._iDisplayLength * (this.value - 1);
|
819
|
+
if (iNewStart >= oSettings.fnRecordsDisplay()) {
|
820
|
+
/* Display overrun */
|
821
|
+
oSettings._iDisplayStart = (Math.ceil((oSettings.fnRecordsDisplay() - 1) /
|
822
|
+
oSettings._iDisplayLength) - 1) * oSettings._iDisplayLength;
|
823
|
+
fnDraw(oSettings);
|
824
|
+
return;
|
825
|
+
}
|
826
|
+
|
827
|
+
oSettings._iDisplayStart = iNewStart;
|
828
|
+
fnDraw(oSettings);
|
829
|
+
});
|
830
|
+
},
|
831
|
+
|
832
|
+
"fnUpdate": function (oSettings, fnDraw) {
|
833
|
+
var oPaging = oSettings.oInstance.fnPagingInfo(),
|
834
|
+
an = oSettings.aanFeatures.p,
|
835
|
+
ien = an.length,
|
836
|
+
iPages = Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength),
|
837
|
+
iCurrentPage = Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength) + 1,
|
838
|
+
i;
|
839
|
+
|
840
|
+
for (i = 0; i < ien; i += 1) {
|
841
|
+
$('.paginate_input', an[i]).val(iCurrentPage)
|
842
|
+
.siblings('.paginate_of').find('b').html(iPages);
|
843
|
+
|
844
|
+
// Add / remove disabled classes from the static elements
|
845
|
+
if (oPaging.iPage === 0) {
|
846
|
+
$('li.first', an[i]).addClass('disabled');
|
847
|
+
$('li.prev', an[i]).addClass('disabled');
|
848
|
+
} else {
|
849
|
+
$('li.first', an[i]).removeClass('disabled');
|
850
|
+
$('li.prev', an[i]).removeClass('disabled');
|
851
|
+
}
|
852
|
+
|
853
|
+
if (oPaging.iPage === oPaging.iTotalPages - 1 || oPaging.iTotalPages === 0) {
|
854
|
+
$('li.next', an[i]).addClass('disabled');
|
855
|
+
$('li.last', an[i]).addClass('disabled');
|
856
|
+
} else {
|
857
|
+
$('li.next', an[i]).removeClass('disabled');
|
858
|
+
$('li.last', an[i]).removeClass('disabled');
|
859
|
+
}
|
860
|
+
}
|
861
|
+
}
|
862
|
+
}
|
863
|
+
});
|
864
|
+
}
|
865
|
+
}(jQuery));
|
866
|
+
|
867
|
+
// Util: PatternFly Collapsible Left Hand Navigation
|
868
|
+
// Must have navbar-toggle in navbar-pf-alt for expand/collapse
|
869
|
+
(function ($) {
|
870
|
+
|
871
|
+
'use strict';
|
872
|
+
|
873
|
+
$.fn.navigation = function () {
|
874
|
+
|
875
|
+
var navElement = $('.layout-pf-alt-fixed .nav-pf-vertical-alt'),
|
876
|
+
bodyContentElement = $('.container-pf-alt-nav-pf-vertical-alt'),
|
877
|
+
toggleNavBarButton = $('.navbar-toggle'),
|
878
|
+
explicitCollapse = false,
|
879
|
+
checkNavState = function () {
|
880
|
+
var width = $(window).width();
|
881
|
+
|
882
|
+
//Always remove the hidden & peek class
|
883
|
+
navElement.removeClass('hidden show-mobile-nav collapsed');
|
884
|
+
|
885
|
+
//Set the body class back to the default
|
886
|
+
bodyContentElement.removeClass('collapsed-nav hidden-nav');
|
887
|
+
|
888
|
+
// Check to see if the nav needs to collapse
|
889
|
+
if (width < $.pfBreakpoints.desktop || explicitCollapse) {
|
890
|
+
navElement.addClass('collapsed');
|
891
|
+
bodyContentElement.addClass('collapsed-nav');
|
892
|
+
}
|
893
|
+
|
894
|
+
// Check to see if we need to move down to the mobile state
|
895
|
+
if (width < $.pfBreakpoints.tablet) {
|
896
|
+
//Set the nav to being hidden
|
897
|
+
navElement.addClass('hidden');
|
898
|
+
|
899
|
+
//Make sure this is expanded
|
900
|
+
navElement.removeClass('collapsed');
|
901
|
+
|
902
|
+
//Set the body class to the correct state
|
903
|
+
bodyContentElement.removeClass('collapsed-nav');
|
904
|
+
bodyContentElement.addClass('hidden-nav');
|
905
|
+
}
|
906
|
+
},
|
907
|
+
collapseMenu = function () {
|
908
|
+
//Make sure this is expanded
|
909
|
+
navElement.addClass('collapsed');
|
910
|
+
//Set the body class to the correct state
|
911
|
+
bodyContentElement.addClass('collapsed-nav');
|
912
|
+
|
913
|
+
explicitCollapse = true;
|
914
|
+
},
|
915
|
+
enableTransitions = function () {
|
916
|
+
// enable transitions only when toggleNavBarButton is clicked or window is resized
|
917
|
+
$('html').addClass('transitions');
|
918
|
+
},
|
919
|
+
expandMenu = function () {
|
920
|
+
//Make sure this is expanded
|
921
|
+
navElement.removeClass('collapsed');
|
922
|
+
//Set the body class to the correct state
|
923
|
+
bodyContentElement.removeClass('collapsed-nav');
|
924
|
+
|
925
|
+
explicitCollapse = false;
|
926
|
+
},
|
927
|
+
bindMenuBehavior = function () {
|
928
|
+
toggleNavBarButton.on('click', function (e) {
|
929
|
+
var inMobileState = bodyContentElement.hasClass('hidden-nav');
|
930
|
+
enableTransitions();
|
931
|
+
|
932
|
+
if (inMobileState && navElement.hasClass('show-mobile-nav')) {
|
933
|
+
//In mobile state just need to hide the nav
|
934
|
+
navElement.removeClass('show-mobile-nav');
|
935
|
+
} else if (inMobileState) {
|
936
|
+
navElement.addClass('show-mobile-nav');
|
937
|
+
} else if (navElement.hasClass('collapsed')) {
|
938
|
+
expandMenu();
|
939
|
+
} else {
|
940
|
+
collapseMenu();
|
941
|
+
}
|
942
|
+
});
|
943
|
+
},
|
944
|
+
setTooltips = function () {
|
945
|
+
$('.nav-pf-vertical-alt [data-toggle="tooltip"]').tooltip({'container': 'body', 'delay': { 'show': '500', 'hide': '200' }});
|
946
|
+
|
947
|
+
$(".nav-pf-vertical-alt").on("show.bs.tooltip", function (e) {
|
948
|
+
return $(this).hasClass("collapsed");
|
949
|
+
});
|
950
|
+
|
951
|
+
},
|
952
|
+
init = function () {
|
953
|
+
//Set correct state on load
|
954
|
+
checkNavState();
|
955
|
+
|
956
|
+
// Bind Top level hamburger menu with menu behavior;
|
957
|
+
bindMenuBehavior();
|
958
|
+
|
959
|
+
//Set tooltips
|
960
|
+
setTooltips();
|
961
|
+
};
|
962
|
+
|
963
|
+
//Listen for the window resize event and collapse/hide as needed
|
964
|
+
$(window).on('resize', function () {
|
965
|
+
checkNavState();
|
966
|
+
enableTransitions();
|
967
|
+
});
|
968
|
+
|
969
|
+
init();
|
970
|
+
|
971
|
+
};
|
972
|
+
|
973
|
+
$(document).ready(function () {
|
974
|
+
if ($('.nav-pf-vertical-alt').length > 0) {
|
975
|
+
$.fn.navigation();
|
976
|
+
}
|
977
|
+
});
|
978
|
+
|
979
|
+
}(jQuery));
|
980
|
+
|
981
|
+
// Count and Display Remaining Characters
|
982
|
+
(function ($) {
|
983
|
+
|
984
|
+
'use strict';
|
985
|
+
|
986
|
+
$.fn.countRemainingChars = function (options) {
|
987
|
+
|
988
|
+
var settings = $.extend({
|
989
|
+
// These are the defaults.
|
990
|
+
charsMaxLimit: 100,
|
991
|
+
charsWarnRemaining: 5,
|
992
|
+
blockInputAtMaxLimit: false
|
993
|
+
}, options),
|
994
|
+
$taFld = this,
|
995
|
+
$countFld = $('#' + settings.countFld).text(settings.charsMaxLimit),
|
996
|
+
charsRemainingFn = function (charsLength) {
|
997
|
+
var charsRemaining = settings.charsMaxLimit - charsLength;
|
998
|
+
$countFld.text(charsRemaining);
|
999
|
+
$countFld.toggleClass('chars-warn-remaining-pf', charsRemaining <= settings.charsWarnRemaining);
|
1000
|
+
if (charsRemaining < 0) {
|
1001
|
+
$taFld.trigger("overCharsMaxLimitEvent", $taFld.attr('id'));
|
1002
|
+
} else {
|
1003
|
+
$taFld.trigger("underCharsMaxLimitEvent", $taFld.attr('id'));
|
1004
|
+
}
|
1005
|
+
};
|
1006
|
+
|
1007
|
+
this.on('paste', function (event) {
|
1008
|
+
setTimeout(function () {
|
1009
|
+
var charsLength = $taFld.val().length, maxTxt;
|
1010
|
+
|
1011
|
+
if (settings.blockInputAtMaxLimit && charsLength > settings.charsMaxLimit) {
|
1012
|
+
maxTxt = $taFld.val();
|
1013
|
+
maxTxt = maxTxt.substring(0, settings.charsMaxLimit);
|
1014
|
+
$taFld.val(maxTxt);
|
1015
|
+
charsLength = $taFld.val().length;
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
charsRemainingFn(charsLength);
|
1019
|
+
}, 100);
|
1020
|
+
});
|
1021
|
+
|
1022
|
+
this.keyup(function (event) {
|
1023
|
+
charsRemainingFn($taFld.val().length);
|
1024
|
+
});
|
1025
|
+
|
1026
|
+
this.keydown(function (event) {
|
1027
|
+
var charsLength = $taFld.val().length;
|
1028
|
+
|
1029
|
+
if (settings.blockInputAtMaxLimit && charsLength >= settings.charsMaxLimit) {
|
1030
|
+
// Except backspace
|
1031
|
+
if (event.keyCode !== 8) {
|
1032
|
+
event.preventDefault();
|
1033
|
+
}
|
1034
|
+
}
|
1035
|
+
});
|
1036
|
+
|
1037
|
+
return this;
|
1038
|
+
};
|
1039
|
+
}(jQuery));
|
1040
|
+
|
1041
|
+
// Util: PatternFly Palette colors
|
1042
|
+
(function ($) {
|
1043
|
+
'use strict';
|
1044
|
+
|
1045
|
+
if (patternfly !== undefined) {
|
1046
|
+
$.pfPaletteColors = patternfly.pfPaletteColors;
|
1047
|
+
}
|
1048
|
+
}(jQuery));
|
1049
|
+
|
1050
|
+
// Util: PatternFly C3 Chart Defaults
|
1051
|
+
(function ($) {
|
1052
|
+
'use strict';
|
1053
|
+
if (patternfly !== undefined) {
|
1054
|
+
$.fn.pfSetDonutChartTitle = patternfly.pfSetDonutChartTitle;
|
1055
|
+
$.fn.pfDonutTooltipContents = patternfly.pfDonutTooltipContents;
|
1056
|
+
$.fn.pfGetUtilizationDonutTooltipContentsFn = patternfly.pfGetUtilizationDonutTooltipContentsFn;
|
1057
|
+
$.fn.pfGetBarChartTooltipContentsFn = patternfly.pfGetBarChartTooltipContentsFn;
|
1058
|
+
$.fn.pfSingleLineChartTooltipContentsFn = patternfly.pfSingleLineChartTooltipContentsFn;
|
1059
|
+
$.fn.pfPieTooltipContents = patternfly.pfPieTooltipContents;
|
1060
|
+
$.fn.c3ChartDefaults = patternfly.c3ChartDefaults;
|
1061
|
+
}
|
1062
|
+
}(jQuery));
|
1063
|
+
|
1064
|
+
// Util: PatternFly Collapse with fixed heights
|
1065
|
+
// Update the max-height of collapse elements based on the parent container's height.
|
1066
|
+
(function ($) {
|
1067
|
+
'use strict';
|
1068
|
+
|
1069
|
+
$.fn.initCollapseHeights = function (scrollSelector) {
|
1070
|
+
var parentElement = this, setCollapseHeights, targetScrollSelector = scrollSelector;
|
1071
|
+
|
1072
|
+
setCollapseHeights = function () {
|
1073
|
+
var height, openPanel, contentHeight, bodyHeight, overflowY = 'hidden';
|
1074
|
+
|
1075
|
+
height = parentElement.height();
|
1076
|
+
|
1077
|
+
// Close any open panel
|
1078
|
+
openPanel = parentElement.find('.collapse.in');
|
1079
|
+
if (openPanel && openPanel.length > 0) {
|
1080
|
+
openPanel.removeClass('in');
|
1081
|
+
}
|
1082
|
+
|
1083
|
+
// Determine the necessary height for the closed content
|
1084
|
+
contentHeight = 0;
|
1085
|
+
parentElement.children().each($.proxy(function (i, element) {
|
1086
|
+
var $element = $(element);
|
1087
|
+
contentHeight += $element.outerHeight(true);
|
1088
|
+
}, parentElement)).end();
|
1089
|
+
|
1090
|
+
// Determine the height remaining for opened collapse panels
|
1091
|
+
bodyHeight = height - contentHeight;
|
1092
|
+
|
1093
|
+
// Make sure we have enough height to be able to scroll the contents if necessary
|
1094
|
+
if (bodyHeight < 25) {
|
1095
|
+
bodyHeight = 25;
|
1096
|
+
|
1097
|
+
// Allow the parent to scroll so the child elements are accessible
|
1098
|
+
overflowY = 'auto';
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
// Reopen the initially opened panel
|
1102
|
+
if (openPanel && openPanel.length > 0) {
|
1103
|
+
openPanel.addClass("in");
|
1104
|
+
}
|
1105
|
+
|
1106
|
+
setTimeout(function () {
|
1107
|
+
// Set the max-height for the collapse panels
|
1108
|
+
parentElement.find('[data-toggle="collapse"]').each($.proxy(function (i, element) {
|
1109
|
+
var $element, selector, $target, scrollElement, innerHeight = 0;
|
1110
|
+
$element = $(element);
|
1111
|
+
|
1112
|
+
// Determine the selector to find the target
|
1113
|
+
selector = $element.attr('data-target');
|
1114
|
+
if (!selector) {
|
1115
|
+
selector = $element.attr('href');
|
1116
|
+
}
|
1117
|
+
|
1118
|
+
// Determine the scroll element (either the target or the child of the target based on the given selector)
|
1119
|
+
$target = $(selector);
|
1120
|
+
scrollElement = $target;
|
1121
|
+
if (targetScrollSelector) {
|
1122
|
+
scrollElement = $target.find(targetScrollSelector);
|
1123
|
+
if (scrollElement.length === 1) {
|
1124
|
+
innerHeight = 0;
|
1125
|
+
$target.children().each($.proxy(function (j, sibling) {
|
1126
|
+
var $sibling = $(sibling);
|
1127
|
+
if (sibling !== scrollElement[0]) {
|
1128
|
+
innerHeight += $sibling.outerHeight(true);
|
1129
|
+
}
|
1130
|
+
}, $target)).end();
|
1131
|
+
bodyHeight -= innerHeight;
|
1132
|
+
} else {
|
1133
|
+
scrollElement = $target;
|
1134
|
+
}
|
1135
|
+
}
|
1136
|
+
// Set the max-height and vertical scroll of the scroll element
|
1137
|
+
scrollElement.css({'max-height': (bodyHeight - innerHeight) + 'px', 'overflow-y': 'auto'});
|
1138
|
+
}, parentElement)).end();
|
1139
|
+
|
1140
|
+
parentElement.css({'overflow-y': overflowY});
|
1141
|
+
}, 100);
|
1142
|
+
};
|
1143
|
+
|
1144
|
+
setCollapseHeights();
|
1145
|
+
|
1146
|
+
// Update on window resizing
|
1147
|
+
$(window).on('resize', setCollapseHeights);
|
1148
|
+
|
1149
|
+
};
|
1150
|
+
|
1151
|
+
$.fn.initFixedAccordion = function () {
|
1152
|
+
var fixedAccordion = this, initOpen;
|
1153
|
+
|
1154
|
+
fixedAccordion.on('show.bs.collapse','.collapse', function (event) {
|
1155
|
+
$(event.target.parentNode).addClass('panel-open');
|
1156
|
+
});
|
1157
|
+
|
1158
|
+
fixedAccordion.on('hide.bs.collapse','.collapse', function (event) {
|
1159
|
+
$(event.target.parentNode).removeClass('panel-open');
|
1160
|
+
});
|
1161
|
+
|
1162
|
+
fixedAccordion.find('.panel').each(function (index, item) {
|
1163
|
+
$(item).removeClass('panel-open');
|
1164
|
+
});
|
1165
|
+
|
1166
|
+
initOpen = $(fixedAccordion.find('.collapse.in'))[0];
|
1167
|
+
if (initOpen) {
|
1168
|
+
$(initOpen.parentNode).addClass('panel-open');
|
1169
|
+
}
|
1170
|
+
};
|
1171
|
+
|
1172
|
+
}(jQuery));
|
1173
|
+
|
1174
|
+
// Util: PatternFly TreeGrid Tables
|
1175
|
+
(function ($) {
|
1176
|
+
'use strict';
|
1177
|
+
|
1178
|
+
function getParent (rows, node) {
|
1179
|
+
var parent = node.attr('data-parent');
|
1180
|
+
|
1181
|
+
if (typeof parent === "string") {
|
1182
|
+
if (isNaN(parent)) {
|
1183
|
+
parent = $(parent);
|
1184
|
+
if (parent.length > 1) {
|
1185
|
+
parent = rows.closest(parent);
|
1186
|
+
}
|
1187
|
+
} else {
|
1188
|
+
parent = $(rows[parseInt(parent, 10)]);
|
1189
|
+
}
|
1190
|
+
return parent;
|
1191
|
+
}
|
1192
|
+
return undefined;
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
function renderItem (item, parent) {
|
1196
|
+
if (parent) {
|
1197
|
+
parent.find('.treegrid-node > span.expand-icon')
|
1198
|
+
.toggleClass('fa-angle-right', parent.hasClass('collapsed'))
|
1199
|
+
.toggleClass('fa-angle-down', !parent.hasClass('collapsed'));
|
1200
|
+
item.toggleClass('hidden', parent.hasClass('collapsed'));
|
1201
|
+
if (parent.hasClass('collapsed')) {
|
1202
|
+
item.addClass('collapsed');
|
1203
|
+
}
|
1204
|
+
}
|
1205
|
+
}
|
1206
|
+
|
1207
|
+
function reStripe (tree) {
|
1208
|
+
tree.find('tbody > tr').removeClass('odd');
|
1209
|
+
tree.find('tbody > tr:not(.hidden):odd').addClass('odd');
|
1210
|
+
}
|
1211
|
+
|
1212
|
+
$.fn.treegrid = function (options) {
|
1213
|
+
var i, rows, _this;
|
1214
|
+
rows = this.find('tbody > tr');
|
1215
|
+
_this = this;
|
1216
|
+
$.each(rows, function () {
|
1217
|
+
var node, parent;
|
1218
|
+
node = $(this);
|
1219
|
+
parent = getParent(rows, node);
|
1220
|
+
// Append expand icon dummies
|
1221
|
+
node.children('.treegrid-node').prepend('<span class="icon expand-icon fa"/>');
|
1222
|
+
|
1223
|
+
// Set up an event listener for the node
|
1224
|
+
node.children('.treegrid-node').on('click', function (e) {
|
1225
|
+
var icon = node.find('span.expand-icon');
|
1226
|
+
|
1227
|
+
if (options && typeof options.callback === 'function') {
|
1228
|
+
options.callback(e);
|
1229
|
+
}
|
1230
|
+
|
1231
|
+
if (icon.hasClass('fa-angle-right')) {
|
1232
|
+
node.removeClass('collapsed');
|
1233
|
+
}
|
1234
|
+
if (icon.hasClass('fa-angle-down')) {
|
1235
|
+
node.addClass('collapsed');
|
1236
|
+
}
|
1237
|
+
$.each(rows.slice(rows.index(node) + 1), function () {
|
1238
|
+
renderItem($(this), getParent(rows, $(this)));
|
1239
|
+
});
|
1240
|
+
reStripe(_this);
|
1241
|
+
});
|
1242
|
+
|
1243
|
+
if (parent) {
|
1244
|
+
// Calculate indentation depth
|
1245
|
+
i = parent.find('.treegrid-node > span.indent').length + 1;
|
1246
|
+
for (; i > 0; i -= 1) {
|
1247
|
+
node.children('.treegrid-node').prepend('<span class="indent"/>');
|
1248
|
+
}
|
1249
|
+
// Render expand/collapse icons
|
1250
|
+
renderItem(node, parent);
|
1251
|
+
}
|
1252
|
+
});
|
1253
|
+
reStripe(_this);
|
1254
|
+
};
|
1255
|
+
}(jQuery));
|
1256
|
+
|
1257
|
+
// Util: PatternFly Vertical Navigation
|
1258
|
+
// Must have navbar-toggle in navbar-pf-vertical for expand/collapse
|
1259
|
+
(function ($) {
|
1260
|
+
'use strict';
|
1261
|
+
|
1262
|
+
$.fn.setupVerticalNavigation = function (handleItemSelections, ignoreDrawer, userOptions) {
|
1263
|
+
|
1264
|
+
var options = $.extend({
|
1265
|
+
hoverDelay: 500,
|
1266
|
+
hideDelay: 700,
|
1267
|
+
rememberOpenState: true,
|
1268
|
+
storage: 'localStorage',
|
1269
|
+
}, userOptions || {}),
|
1270
|
+
|
1271
|
+
navElement = $('.nav-pf-vertical'),
|
1272
|
+
bodyContentElement = $('.container-pf-nav-pf-vertical'),
|
1273
|
+
toggleNavBarButton = $('.navbar-toggle'),
|
1274
|
+
handleResize = true,
|
1275
|
+
explicitCollapse = false,
|
1276
|
+
subDesktop = false,
|
1277
|
+
storageLocation = options.storage === 'sessionStorage' ? 'sessionStorage' : 'localStorage',
|
1278
|
+
|
1279
|
+
inMobileState = function () {
|
1280
|
+
return bodyContentElement.hasClass('hidden-nav');
|
1281
|
+
},
|
1282
|
+
|
1283
|
+
forceResize = function (delay) {
|
1284
|
+
setTimeout(function () {
|
1285
|
+
$(window).trigger('resize');
|
1286
|
+
}, delay);
|
1287
|
+
},
|
1288
|
+
|
1289
|
+
showSecondaryMenu = function () {
|
1290
|
+
if (inMobileState() || !subDesktop) {
|
1291
|
+
navElement.addClass('secondary-visible-pf');
|
1292
|
+
bodyContentElement.addClass('secondary-visible-pf');
|
1293
|
+
}
|
1294
|
+
|
1295
|
+
// Dispatch a resize event when showing the secondary menu in non-subdesktop state to
|
1296
|
+
// allow content to adjust to the secondary menu sizing
|
1297
|
+
if (!subDesktop) {
|
1298
|
+
forceResize(100);
|
1299
|
+
}
|
1300
|
+
},
|
1301
|
+
|
1302
|
+
hideSecondaryMenu = function () {
|
1303
|
+
navElement.removeClass('secondary-visible-pf');
|
1304
|
+
bodyContentElement.removeClass('secondary-visible-pf');
|
1305
|
+
|
1306
|
+
if (navElement.find('.secondary-nav-item-pf.is-hover').length <= 1) {
|
1307
|
+
navElement.removeClass('hover-secondary-nav-pf');
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
navElement.find('.mobile-nav-item-pf').each(function (index, item) {
|
1311
|
+
$(item).removeClass('mobile-nav-item-pf');
|
1312
|
+
});
|
1313
|
+
|
1314
|
+
navElement.find('.is-hover').each(function (index, item) {
|
1315
|
+
$(item).removeClass('is-hover');
|
1316
|
+
});
|
1317
|
+
},
|
1318
|
+
|
1319
|
+
hideTertiaryMenu = function () {
|
1320
|
+
navElement.removeClass('tertiary-visible-pf');
|
1321
|
+
bodyContentElement.removeClass('tertiary-visible-pf');
|
1322
|
+
|
1323
|
+
if (navElement.find('.tertiary-nav-item-pf.is-hover').length <= 1) {
|
1324
|
+
navElement.removeClass('hover-tertiary-nav-pf');
|
1325
|
+
}
|
1326
|
+
|
1327
|
+
navElement.find('.mobile-nav-item-pf').each(function (index, item) {
|
1328
|
+
$(item).removeClass('mobile-nav-item-pf');
|
1329
|
+
});
|
1330
|
+
|
1331
|
+
navElement.find('.is-hover').each(function (index, item) {
|
1332
|
+
$(item).removeClass('is-hover');
|
1333
|
+
});
|
1334
|
+
},
|
1335
|
+
|
1336
|
+
setActiveItem = function (item) {
|
1337
|
+
// remove all .active
|
1338
|
+
$('.nav-pf-vertical .list-group-item.active').removeClass('active');
|
1339
|
+
|
1340
|
+
// add .active to item and its parents
|
1341
|
+
item.addClass('active').parents('.list-group-item').addClass('active');
|
1342
|
+
},
|
1343
|
+
|
1344
|
+
updateSecondaryMenuDisplayAfterSelection = function () {
|
1345
|
+
if (inMobileState()) {
|
1346
|
+
navElement.removeClass('show-mobile-nav');
|
1347
|
+
hideSecondaryMenu();
|
1348
|
+
navElement.find('.mobile-nav-item-pf').each(function (index, item) {
|
1349
|
+
$(item).removeClass('mobile-nav-item-pf');
|
1350
|
+
});
|
1351
|
+
} else {
|
1352
|
+
showSecondaryMenu();
|
1353
|
+
}
|
1354
|
+
},
|
1355
|
+
|
1356
|
+
updateSecondaryCollapsedState = function (setCollapsed, collapsedItem) {
|
1357
|
+
if (setCollapsed) {
|
1358
|
+
collapsedItem.addClass('collapsed');
|
1359
|
+
navElement.addClass('collapsed-secondary-nav-pf');
|
1360
|
+
bodyContentElement.addClass('collapsed-secondary-nav-pf');
|
1361
|
+
} else {
|
1362
|
+
if (collapsedItem) {
|
1363
|
+
collapsedItem.removeClass('collapsed');
|
1364
|
+
} else {
|
1365
|
+
// Remove any collapsed secondary menus
|
1366
|
+
navElement.find('[data-toggle="collapse-secondary-nav"]').each(function (index, element) {
|
1367
|
+
var $e = $(element);
|
1368
|
+
$e.removeClass('collapsed');
|
1369
|
+
});
|
1370
|
+
}
|
1371
|
+
navElement.removeClass('collapsed-secondary-nav-pf');
|
1372
|
+
bodyContentElement.removeClass('collapsed-secondary-nav-pf');
|
1373
|
+
}
|
1374
|
+
},
|
1375
|
+
|
1376
|
+
updateTertiaryCollapsedState = function (setCollapsed, collapsedItem) {
|
1377
|
+
if (setCollapsed) {
|
1378
|
+
collapsedItem.addClass('collapsed');
|
1379
|
+
navElement.addClass('collapsed-tertiary-nav-pf');
|
1380
|
+
bodyContentElement.addClass('collapsed-tertiary-nav-pf');
|
1381
|
+
updateSecondaryCollapsedState(false);
|
1382
|
+
} else {
|
1383
|
+
if (collapsedItem) {
|
1384
|
+
collapsedItem.removeClass('collapsed');
|
1385
|
+
} else {
|
1386
|
+
// Remove any collapsed tertiary menus
|
1387
|
+
navElement.find('[data-toggle="collapse-tertiary-nav"]').each(function (index, element) {
|
1388
|
+
var $e = $(element);
|
1389
|
+
$e.removeClass('collapsed');
|
1390
|
+
});
|
1391
|
+
}
|
1392
|
+
navElement.removeClass('collapsed-tertiary-nav-pf');
|
1393
|
+
bodyContentElement.removeClass('collapsed-tertiary-nav-pf');
|
1394
|
+
}
|
1395
|
+
},
|
1396
|
+
|
1397
|
+
updateMobileMenu = function (selected, secondaryItem) {
|
1398
|
+
$(document).find('.list-group-item.mobile-nav-item-pf').each(function (index, item) {
|
1399
|
+
$(item).removeClass('mobile-nav-item-pf');
|
1400
|
+
});
|
1401
|
+
$(document).find('.list-group-item.mobile-secondary-item-pf').each(function (index, item) {
|
1402
|
+
$(item).removeClass('mobile-secondary-item-pf');
|
1403
|
+
});
|
1404
|
+
if (selected) {
|
1405
|
+
selected.addClass('mobile-nav-item-pf');
|
1406
|
+
if (secondaryItem) {
|
1407
|
+
secondaryItem.addClass('mobile-secondary-item-pf');
|
1408
|
+
navElement.removeClass('show-mobile-secondary');
|
1409
|
+
navElement.addClass('show-mobile-tertiary');
|
1410
|
+
} else {
|
1411
|
+
navElement.addClass('show-mobile-secondary');
|
1412
|
+
navElement.removeClass('show-mobile-tertiary');
|
1413
|
+
}
|
1414
|
+
} else {
|
1415
|
+
navElement.removeClass('show-mobile-secondary');
|
1416
|
+
navElement.removeClass('show-mobile-tertiary');
|
1417
|
+
}
|
1418
|
+
},
|
1419
|
+
|
1420
|
+
enterMobileState = function () {
|
1421
|
+
if (!navElement.hasClass('hidden')) {
|
1422
|
+
//Set the nav to being hidden
|
1423
|
+
navElement.addClass('hidden');
|
1424
|
+
navElement.removeClass('collapsed');
|
1425
|
+
|
1426
|
+
//Set the body class to the correct state
|
1427
|
+
bodyContentElement.removeClass('collapsed-nav');
|
1428
|
+
bodyContentElement.addClass('hidden-nav');
|
1429
|
+
|
1430
|
+
// Reset the collapsed states
|
1431
|
+
updateSecondaryCollapsedState(false);
|
1432
|
+
updateTertiaryCollapsedState(false);
|
1433
|
+
|
1434
|
+
explicitCollapse = false;
|
1435
|
+
}
|
1436
|
+
},
|
1437
|
+
|
1438
|
+
exitMobileState = function () {
|
1439
|
+
// Always remove the hidden & peek class
|
1440
|
+
navElement.removeClass('hidden show-mobile-nav');
|
1441
|
+
|
1442
|
+
// Set the body class back to the default
|
1443
|
+
bodyContentElement.removeClass('hidden-nav');
|
1444
|
+
},
|
1445
|
+
|
1446
|
+
checkNavState = function () {
|
1447
|
+
var width = $(window).width(), makeSecondaryVisible;
|
1448
|
+
if (!handleResize) {
|
1449
|
+
return;
|
1450
|
+
}
|
1451
|
+
// Check to see if we need to enter/exit the mobile state
|
1452
|
+
if (width < $.pfBreakpoints.tablet && !explicitCollapse) {
|
1453
|
+
enterMobileState();
|
1454
|
+
} else if (navElement.hasClass('hidden')) {
|
1455
|
+
exitMobileState();
|
1456
|
+
}
|
1457
|
+
|
1458
|
+
// Check to see if we need to enter/exit the sub desktop state
|
1459
|
+
if (width < $.pfBreakpoints.desktop) {
|
1460
|
+
if (!subDesktop) {
|
1461
|
+
// Collapse the navigation bars when entering sub desktop mode
|
1462
|
+
navElement.addClass('collapsed');
|
1463
|
+
bodyContentElement.addClass('collapsed-nav');
|
1464
|
+
}
|
1465
|
+
if (width >= $.pfBreakpoints.tablet) {
|
1466
|
+
hideSecondaryMenu();
|
1467
|
+
}
|
1468
|
+
subDesktop = true;
|
1469
|
+
} else {
|
1470
|
+
makeSecondaryVisible = subDesktop && (navElement.find('.secondary-nav-item-pf.active').length > 0);
|
1471
|
+
subDesktop = false;
|
1472
|
+
if (makeSecondaryVisible) {
|
1473
|
+
|
1474
|
+
showSecondaryMenu();
|
1475
|
+
}
|
1476
|
+
}
|
1477
|
+
|
1478
|
+
if (explicitCollapse) {
|
1479
|
+
navElement.addClass('collapsed');
|
1480
|
+
bodyContentElement.addClass('collapsed-nav');
|
1481
|
+
} else {
|
1482
|
+
navElement.removeClass('collapsed');
|
1483
|
+
bodyContentElement.removeClass('collapsed-nav');
|
1484
|
+
}
|
1485
|
+
},
|
1486
|
+
|
1487
|
+
collapseMenu = function () {
|
1488
|
+
//Make sure this is expanded
|
1489
|
+
navElement.addClass('collapsed');
|
1490
|
+
//Set the body class to the correct state
|
1491
|
+
bodyContentElement.addClass('collapsed-nav');
|
1492
|
+
|
1493
|
+
if (subDesktop) {
|
1494
|
+
hideSecondaryMenu();
|
1495
|
+
}
|
1496
|
+
|
1497
|
+
explicitCollapse = true;
|
1498
|
+
},
|
1499
|
+
|
1500
|
+
enableTransitions = function () {
|
1501
|
+
// enable transitions only when toggleNavBarButton is clicked or window is resized
|
1502
|
+
$('html').addClass('transitions');
|
1503
|
+
},
|
1504
|
+
|
1505
|
+
expandMenu = function () {
|
1506
|
+
//Make sure this is expanded
|
1507
|
+
navElement.removeClass('collapsed');
|
1508
|
+
//Set the body class to the correct state
|
1509
|
+
bodyContentElement.removeClass('collapsed-nav');
|
1510
|
+
|
1511
|
+
explicitCollapse = false;
|
1512
|
+
|
1513
|
+
// Dispatch a resize event when showing the expanding then menu to
|
1514
|
+
// allow content to adjust to the menu sizing
|
1515
|
+
if (!subDesktop) {
|
1516
|
+
forceResize(100);
|
1517
|
+
}
|
1518
|
+
},
|
1519
|
+
|
1520
|
+
bindMenuBehavior = function () {
|
1521
|
+
toggleNavBarButton.on('click', function (e) {
|
1522
|
+
var $drawer;
|
1523
|
+
|
1524
|
+
enableTransitions();
|
1525
|
+
|
1526
|
+
if (inMobileState()) {
|
1527
|
+
// Toggle the mobile nav
|
1528
|
+
if (navElement.hasClass('show-mobile-nav')) {
|
1529
|
+
navElement.removeClass('show-mobile-nav');
|
1530
|
+
} else {
|
1531
|
+
// Always start at the primary menu
|
1532
|
+
updateMobileMenu();
|
1533
|
+
navElement.addClass('show-mobile-nav');
|
1534
|
+
|
1535
|
+
// If the notification drawer is shown, hide it
|
1536
|
+
if (!ignoreDrawer) {
|
1537
|
+
$drawer = $('.drawer-pf');
|
1538
|
+
if ($drawer.length) {
|
1539
|
+
$('.drawer-pf-trigger').removeClass('open');
|
1540
|
+
$drawer.addClass('hide');
|
1541
|
+
}
|
1542
|
+
}
|
1543
|
+
}
|
1544
|
+
} else if (navElement.hasClass('collapsed')) {
|
1545
|
+
if (options.rememberOpenState) {
|
1546
|
+
window[storageLocation].setItem('patternfly-navigation-primary', 'expanded');
|
1547
|
+
}
|
1548
|
+
expandMenu();
|
1549
|
+
} else {
|
1550
|
+
if (options.rememberOpenState) {
|
1551
|
+
window[storageLocation].setItem('patternfly-navigation-primary', 'collapsed');
|
1552
|
+
}
|
1553
|
+
collapseMenu();
|
1554
|
+
}
|
1555
|
+
});
|
1556
|
+
},
|
1557
|
+
|
1558
|
+
forceHideSecondaryMenu = function () {
|
1559
|
+
navElement.addClass('force-hide-secondary-nav-pf');
|
1560
|
+
setTimeout(function () {
|
1561
|
+
navElement.removeClass('force-hide-secondary-nav-pf');
|
1562
|
+
}, 500);
|
1563
|
+
},
|
1564
|
+
|
1565
|
+
bindMenuItemsBehavior = function (handleSelection) {
|
1566
|
+
$(document).find('.nav-pf-vertical .list-group-item').each(function (index, item) {
|
1567
|
+
var onClickFn,
|
1568
|
+
$item = $(item),
|
1569
|
+
$nav = $item.closest('[class*="nav-pf-"]');
|
1570
|
+
|
1571
|
+
if ($nav.hasClass('nav-pf-vertical')) {
|
1572
|
+
// 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
|
1573
|
+
onClickFn = function (event) {
|
1574
|
+
var $this = $(this), $secondaryItem, $tertiaryItem, $activeItem;
|
1575
|
+
|
1576
|
+
if (!$this.hasClass('secondary-nav-item-pf')) {
|
1577
|
+
hideSecondaryMenu();
|
1578
|
+
if (inMobileState()) {
|
1579
|
+
updateMobileMenu();
|
1580
|
+
navElement.removeClass('show-mobile-nav');
|
1581
|
+
}
|
1582
|
+
if (handleSelection) {
|
1583
|
+
setActiveItem($this);
|
1584
|
+
// Don't process the click on the item
|
1585
|
+
event.stopImmediatePropagation();
|
1586
|
+
}
|
1587
|
+
} else if (inMobileState()) {
|
1588
|
+
updateMobileMenu($this);
|
1589
|
+
} else if (handleSelection) {
|
1590
|
+
$activeItem = $secondaryItem = $item.find('.nav-pf-secondary-nav > .list-group > .list-group-item').eq(0);
|
1591
|
+
|
1592
|
+
if ($secondaryItem.hasClass('tertiary-nav-item-pf')) {
|
1593
|
+
$activeItem = $secondaryItem.find('.nav-pf-tertiary-nav > .list-group > .list-group-item').eq(0);
|
1594
|
+
}
|
1595
|
+
|
1596
|
+
setActiveItem($activeItem);
|
1597
|
+
event.stopImmediatePropagation();
|
1598
|
+
}
|
1599
|
+
};
|
1600
|
+
|
1601
|
+
} else if ($nav.hasClass('nav-pf-secondary-nav')) {
|
1602
|
+
// 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
|
1603
|
+
onClickFn = function (event) {
|
1604
|
+
var $this = $(this), $tertiaryItem, $primaryItem;
|
1605
|
+
if (!$this.hasClass('tertiary-nav-item-pf')) {
|
1606
|
+
if (inMobileState()) {
|
1607
|
+
updateMobileMenu();
|
1608
|
+
navElement.removeClass('show-mobile-nav');
|
1609
|
+
}
|
1610
|
+
updateSecondaryMenuDisplayAfterSelection();
|
1611
|
+
if (handleSelection) {
|
1612
|
+
setActiveItem($item);
|
1613
|
+
hideSecondaryMenu();
|
1614
|
+
event.stopImmediatePropagation();
|
1615
|
+
}
|
1616
|
+
} else if (inMobileState()) {
|
1617
|
+
$primaryItem = $item.parents('.list-group-item');
|
1618
|
+
updateMobileMenu($this, $primaryItem);
|
1619
|
+
event.stopImmediatePropagation();
|
1620
|
+
} else if (handleSelection) {
|
1621
|
+
$tertiaryItem = $item.find('.nav-pf-tertiary-nav > .list-group > .list-group-item').eq(0);
|
1622
|
+
setActiveItem($tertiaryItem);
|
1623
|
+
event.stopImmediatePropagation();
|
1624
|
+
}
|
1625
|
+
};
|
1626
|
+
|
1627
|
+
} else if ($nav.hasClass('nav-pf-tertiary-nav')) {
|
1628
|
+
// Set tertiary nav active item on click
|
1629
|
+
onClickFn = function (event) {
|
1630
|
+
if (inMobileState()) {
|
1631
|
+
updateMobileMenu();
|
1632
|
+
navElement.removeClass('show-mobile-nav');
|
1633
|
+
}
|
1634
|
+
updateSecondaryMenuDisplayAfterSelection();
|
1635
|
+
if (handleSelection) {
|
1636
|
+
setActiveItem($item);
|
1637
|
+
hideTertiaryMenu();
|
1638
|
+
hideSecondaryMenu();
|
1639
|
+
event.stopImmediatePropagation();
|
1640
|
+
}
|
1641
|
+
};
|
1642
|
+
}
|
1643
|
+
|
1644
|
+
// register event handler
|
1645
|
+
$item.on('click.pf.secondarynav.data-api', onClickFn);
|
1646
|
+
});
|
1647
|
+
|
1648
|
+
$(document).find('.secondary-nav-item-pf').each(function (index, secondaryItem) {
|
1649
|
+
var $secondaryItem = $(secondaryItem);
|
1650
|
+
|
1651
|
+
// Collapse the secondary nav bar when the toggle is clicked
|
1652
|
+
$secondaryItem.on('click.pf.secondarynav.data-api', '[data-toggle="collapse-secondary-nav"]', function (e) {
|
1653
|
+
var $this = $(this);
|
1654
|
+
if (inMobileState()) {
|
1655
|
+
updateMobileMenu();
|
1656
|
+
e.stopImmediatePropagation();
|
1657
|
+
} else {
|
1658
|
+
if ($this.hasClass('collapsed')) {
|
1659
|
+
if (options.rememberOpenState) {
|
1660
|
+
window[storageLocation].setItem('patternfly-navigation-secondary', 'expanded');
|
1661
|
+
window[storageLocation].setItem('patternfly-navigation-tertiary', 'expanded');
|
1662
|
+
}
|
1663
|
+
updateSecondaryCollapsedState(false, $this);
|
1664
|
+
forceHideSecondaryMenu();
|
1665
|
+
} else {
|
1666
|
+
if (options.rememberOpenState) {
|
1667
|
+
window[storageLocation].setItem('patternfly-navigation-secondary', 'collapsed');
|
1668
|
+
}
|
1669
|
+
updateSecondaryCollapsedState(true, $this);
|
1670
|
+
}
|
1671
|
+
}
|
1672
|
+
navElement.removeClass('hover-secondary-nav-pf');
|
1673
|
+
if (handleSelection) {
|
1674
|
+
// Don't process the click on the parent item
|
1675
|
+
e.stopImmediatePropagation();
|
1676
|
+
}
|
1677
|
+
});
|
1678
|
+
|
1679
|
+
$secondaryItem.find('.tertiary-nav-item-pf').each(function (index, primaryItem) {
|
1680
|
+
var $primaryItem = $(primaryItem);
|
1681
|
+
// Collapse the tertiary nav bar when the toggle is clicked
|
1682
|
+
$primaryItem.on('click.pf.tertiarynav.data-api', '[data-toggle="collapse-tertiary-nav"]', function (e) {
|
1683
|
+
var $this = $(this);
|
1684
|
+
if (inMobileState()) {
|
1685
|
+
updateMobileMenu($secondaryItem);
|
1686
|
+
e.stopImmediatePropagation();
|
1687
|
+
} else {
|
1688
|
+
if ($this.hasClass('collapsed')) {
|
1689
|
+
if (options.rememberOpenState) {
|
1690
|
+
window[storageLocation].setItem('patternfly-navigation-secondary', 'expanded');
|
1691
|
+
window[storageLocation].setItem('patternfly-navigation-tertiary', 'expanded');
|
1692
|
+
}
|
1693
|
+
updateTertiaryCollapsedState(false, $this);
|
1694
|
+
forceHideSecondaryMenu();
|
1695
|
+
} else {
|
1696
|
+
if (options.rememberOpenState) {
|
1697
|
+
window[storageLocation].setItem('patternfly-navigation-tertiary', 'collapsed');
|
1698
|
+
}
|
1699
|
+
updateTertiaryCollapsedState(true, $this);
|
1700
|
+
}
|
1701
|
+
}
|
1702
|
+
navElement.removeClass('hover-secondary-nav-pf');
|
1703
|
+
navElement.removeClass('hover-tertiary-nav-pf');
|
1704
|
+
if (handleSelection) {
|
1705
|
+
// Don't process the click on the parent item
|
1706
|
+
e.stopImmediatePropagation();
|
1707
|
+
}
|
1708
|
+
});
|
1709
|
+
});
|
1710
|
+
});
|
1711
|
+
|
1712
|
+
// Show secondary nav bar on hover of secondary nav items
|
1713
|
+
$(document).on('mouseenter.pf.tertiarynav.data-api', '.secondary-nav-item-pf', function (e) {
|
1714
|
+
var $this = $(this);
|
1715
|
+
if (!inMobileState()) {
|
1716
|
+
if ($this[0].navUnHoverTimeout !== undefined) {
|
1717
|
+
clearTimeout($this[0].navUnHoverTimeout);
|
1718
|
+
$this[0].navUnHoverTimeout = undefined;
|
1719
|
+
} else if ($this[0].navHoverTimeout === undefined) {
|
1720
|
+
$this[0].navHoverTimeout = setTimeout(function () {
|
1721
|
+
navElement.addClass('hover-secondary-nav-pf');
|
1722
|
+
$this.addClass('is-hover');
|
1723
|
+
$this[0].navHoverTimeout = undefined;
|
1724
|
+
}, options.hoverDelay);
|
1725
|
+
}
|
1726
|
+
}
|
1727
|
+
});
|
1728
|
+
|
1729
|
+
$(document).on('mouseleave.pf.tertiarynav.data-api', '.secondary-nav-item-pf', function (e) {
|
1730
|
+
var $this = $(this);
|
1731
|
+
if ($this[0].navHoverTimeout !== undefined) {
|
1732
|
+
clearTimeout($this[0].navHoverTimeout);
|
1733
|
+
$this[0].navHoverTimeout = undefined;
|
1734
|
+
} else if ($this[0].navUnHoverTimeout === undefined &&
|
1735
|
+
navElement.find('.secondary-nav-item-pf.is-hover').length > 0) {
|
1736
|
+
$this[0].navUnHoverTimeout = setTimeout(function () {
|
1737
|
+
if (navElement.find('.secondary-nav-item-pf.is-hover').length <= 1) {
|
1738
|
+
navElement.removeClass('hover-secondary-nav-pf');
|
1739
|
+
}
|
1740
|
+
$this.removeClass('is-hover');
|
1741
|
+
$this[0].navUnHoverTimeout = undefined;
|
1742
|
+
}, options.hideDelay);
|
1743
|
+
}
|
1744
|
+
});
|
1745
|
+
|
1746
|
+
// Show tertiary nav bar on hover of secondary nav items
|
1747
|
+
$(document).on('mouseover.pf.tertiarynav.data-api', '.tertiary-nav-item-pf', function (e) {
|
1748
|
+
var $this = $(this);
|
1749
|
+
if (!inMobileState()) {
|
1750
|
+
if ($this[0].navUnHoverTimeout !== undefined) {
|
1751
|
+
clearTimeout($this[0].navUnHoverTimeout);
|
1752
|
+
$this[0].navUnHoverTimeout = undefined;
|
1753
|
+
} else if ($this[0].navHoverTimeout === undefined) {
|
1754
|
+
$this[0].navHoverTimeout = setTimeout(function () {
|
1755
|
+
navElement.addClass('hover-tertiary-nav-pf');
|
1756
|
+
$this.addClass('is-hover');
|
1757
|
+
$this[0].navHoverTimeout = undefined;
|
1758
|
+
}, options.hoverDelay);
|
1759
|
+
}
|
1760
|
+
}
|
1761
|
+
});
|
1762
|
+
$(document).on('mouseout.pf.tertiarynav.data-api', '.tertiary-nav-item-pf', function (e) {
|
1763
|
+
var $this = $(this);
|
1764
|
+
if ($this[0].navHoverTimeout !== undefined) {
|
1765
|
+
clearTimeout($this[0].navHoverTimeout);
|
1766
|
+
$this[0].navHoverTimeout = undefined;
|
1767
|
+
} else if ($this[0].navUnHoverTimeout === undefined) {
|
1768
|
+
$this[0].navUnHoverTimeout = setTimeout(function () {
|
1769
|
+
if (navElement.find('.tertiary-nav-item-pf.is-hover').length <= 1) {
|
1770
|
+
navElement.removeClass('hover-tertiary-nav-pf');
|
1771
|
+
}
|
1772
|
+
$this.removeClass('is-hover');
|
1773
|
+
$this[0].navUnHoverTimeout = undefined;
|
1774
|
+
}, options.hideDelay);
|
1775
|
+
}
|
1776
|
+
});
|
1777
|
+
},
|
1778
|
+
|
1779
|
+
loadFromLocalStorage = function () {
|
1780
|
+
if (inMobileState()) {
|
1781
|
+
return;
|
1782
|
+
}
|
1783
|
+
|
1784
|
+
if (window[storageLocation].getItem('patternfly-navigation-primary') === 'collapsed') {
|
1785
|
+
collapseMenu();
|
1786
|
+
}
|
1787
|
+
|
1788
|
+
if ($('.nav-pf-vertical.nav-pf-vertical-collapsible-menus').length > 0) {
|
1789
|
+
if (window[storageLocation].getItem('patternfly-navigation-secondary') === 'collapsed') {
|
1790
|
+
updateSecondaryCollapsedState(true, $('.secondary-nav-item-pf.active [data-toggle=collapse-secondary-nav]'));
|
1791
|
+
}
|
1792
|
+
|
1793
|
+
if (window[storageLocation].getItem('patternfly-navigation-tertiary') === 'collapsed') {
|
1794
|
+
updateTertiaryCollapsedState(true, $('.tertiary-nav-item-pf.active [data-toggle=collapse-tertiary-nav]'));
|
1795
|
+
}
|
1796
|
+
}
|
1797
|
+
},
|
1798
|
+
|
1799
|
+
setTooltips = function () {
|
1800
|
+
var tooltipOptions = {
|
1801
|
+
container: 'body',
|
1802
|
+
placement: 'bottom',
|
1803
|
+
delay: { 'show': '500', 'hide': '200' },
|
1804
|
+
template: '<div class="nav-pf-vertical-tooltip tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
1805
|
+
};
|
1806
|
+
$('.nav-pf-vertical [data-toggle="tooltip"]').tooltip(tooltipOptions);
|
1807
|
+
|
1808
|
+
$('.nav-pf-vertical').on("show.bs.tooltip", function (e) {
|
1809
|
+
return $(this).hasClass("collapsed");
|
1810
|
+
});
|
1811
|
+
},
|
1812
|
+
|
1813
|
+
init = function (handleItemSelections) {
|
1814
|
+
// Hide the nav menus during initialization
|
1815
|
+
navElement.addClass('hide-nav-pf');
|
1816
|
+
bodyContentElement.addClass('hide-nav-pf');
|
1817
|
+
|
1818
|
+
//Set correct state on load
|
1819
|
+
checkNavState();
|
1820
|
+
|
1821
|
+
// Bind Top level hamburger menu with menu behavior;
|
1822
|
+
bindMenuBehavior();
|
1823
|
+
|
1824
|
+
// Bind menu items
|
1825
|
+
bindMenuItemsBehavior(handleItemSelections);
|
1826
|
+
|
1827
|
+
//Set tooltips
|
1828
|
+
setTooltips();
|
1829
|
+
|
1830
|
+
if (options.rememberOpenState) {
|
1831
|
+
loadFromLocalStorage();
|
1832
|
+
}
|
1833
|
+
|
1834
|
+
// Show the nav menus
|
1835
|
+
navElement.removeClass('hide-nav-pf');
|
1836
|
+
bodyContentElement.removeClass('hide-nav-pf');
|
1837
|
+
forceResize(250);
|
1838
|
+
},
|
1839
|
+
|
1840
|
+
self = {
|
1841
|
+
hideMenu: function () {
|
1842
|
+
handleResize = false;
|
1843
|
+
enterMobileState();
|
1844
|
+
},
|
1845
|
+
showMenu: function () {
|
1846
|
+
handleResize = true;
|
1847
|
+
exitMobileState();
|
1848
|
+
},
|
1849
|
+
isVisible: function () {
|
1850
|
+
return handleResize;
|
1851
|
+
}
|
1852
|
+
};
|
1853
|
+
|
1854
|
+
if (!$.fn.setupVerticalNavigation.self) {
|
1855
|
+
$.fn.setupVerticalNavigation.self = self;
|
1856
|
+
//Listen for the window resize event and collapse/hide as needed
|
1857
|
+
$(window).on('resize', function () {
|
1858
|
+
checkNavState();
|
1859
|
+
enableTransitions();
|
1860
|
+
});
|
1861
|
+
|
1862
|
+
init(handleItemSelections);
|
1863
|
+
}
|
1864
|
+
return $.fn.setupVerticalNavigation.self;
|
1865
|
+
};
|
1866
|
+
}(jQuery));
|