Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
Converted from upstream version 2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Feb 2, 2016
1 parent e4a9ec3 commit e6d2e05
Show file tree
Hide file tree
Showing 32 changed files with 1,726 additions and 161 deletions.
Binary file modified assets/fonts/patternfly/PatternFlyIcons-webfont.eot
Binary file not shown.
19 changes: 17 additions & 2 deletions assets/fonts/patternfly/PatternFlyIcons-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fonts/patternfly/PatternFlyIcons-webfont.ttf
Binary file not shown.
Binary file modified assets/fonts/patternfly/PatternFlyIcons-webfont.woff
Binary file not shown.
70 changes: 70 additions & 0 deletions assets/javascripts/patternfly.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,3 +530,73 @@
};
};
}(jQuery));

// Util: PatternFly Collapse with fixed heights
// Update the max-height of collapse elements based on the parent container's height.
(function ($) {
'use strict';

$.fn.initCollapseHeights = function () {
var parentElement = this, setCollapseHeights;

setCollapseHeights = function () {
var height, openPanel, contentHeight, bodyHeight, overflowY = 'hidden';

height = parentElement.height();

// Close any open panel
openPanel = parentElement.find('.collapse.in');
if (openPanel && openPanel.length > 0) {
openPanel.removeClass('in');
}

// Determine the necessary height for the closed content
contentHeight = 0;
parentElement.children().each($.proxy(function (i, element) {
var $element = $(element);
contentHeight += $element.outerHeight(true);
}, parentElement)).end();

// Determine the height remaining for opened collapse panels
bodyHeight = height - contentHeight;

// Make sure we have enough height to be able to scroll the contents if necessary
if (bodyHeight < 25) {
bodyHeight = 25;

// Allow the parent to scroll so the child elements are accessible
overflowY = 'auto';
}

// Set the max-height for the collapse panels
parentElement.find('[data-toggle="collapse"]').each($.proxy(function (i, element) {
var $element, selector, $target;
$element = $(element);

// Determine the selector to find the target
selector = $element.attr('data-target');
if (!selector) {
selector = $element.attr('href');
}

// Get the target and set the max-height
$target = $(selector);
$target.css({'max-height': bodyHeight + 'px', 'overflow-y': 'auto'});
}, parentElement)).end();

// Reopen the initially opened panel
if (openPanel && openPanel.length > 0) {
openPanel.addClass("in");
}

parentElement.css({'overflow-y': overflowY});
};

setCollapseHeights();

// Update on window resizing
$(window).resize(setCollapseHeights);

};
}(jQuery));

2 changes: 1 addition & 1 deletion assets/javascripts/patternfly.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/stylesheets/_patternfly.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
@import "patternfly/icons";
@import "patternfly/infotip";
@import "patternfly/layouts";
@import "patternfly/list-view";
@import "patternfly/login";
@import "patternfly/navbar";
@import "patternfly/navbar-alt";
Expand Down
62 changes: 62 additions & 0 deletions assets/stylesheets/patternfly/_dropdowns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,65 @@
display: block;
}
}

// Kebab dropmenu
.dropdown-kebab-pf {
.btn-link {
color: $gray-darker;
font-size: ($font-size-base + 4);
line-height: 1;
padding: 4px 0;
&:active,
&:focus,
&:hover {
color: $link-color;
}
}
.dropdown-menu {
left: -15px;
margin-top: 11px;
&.dropdown-menu-right {
left: auto;
right: -15px;
&:after,
&:before {
left: auto;
right: 6px;
}
}
&:after,
&:before {
border-bottom-color: $dropdown-border;
border-bottom-style: solid;
border-bottom-width: 10px;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
content: "";
display: inline-block;
left: 6px;
position: absolute;
top: -11px;
}
&:after {
border-bottom-color: $dropdown-bg;
top: -10px;
}
}
&.dropup .dropdown-menu {
margin-bottom: 11px;
margin-top: 0;
&:after,
&:before {
border-bottom: none;
border-top-color: $dropdown-border;
border-top-style: solid;
border-top-width: 10px;
bottom: -11px;
top: auto;
}
&:after {
border-top-color: $dropdown-bg;
bottom: -10px;
}
}
}
45 changes: 45 additions & 0 deletions assets/stylesheets/patternfly/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,30 @@
.#{$icon-prefix}-close:before {
content: $pficon-var-close;
}
.#{$icon-prefix}-cloud-security:before {
content: $pficon-var-cloud-security;
}
.#{$icon-prefix}-cloud-tenant:before {
content: $pficon-var-cloud-tenant;
}
.#{$icon-prefix}-cluster:before {
content: $pficon-var-cluster;
}
.#{$icon-prefix}-container-node:before {
content: $pficon-var-container-node;
}
.#{$icon-prefix}-cpu:before {
content: $pficon-var-cpu;
}
.#{$icon-prefix}-delete:before {
content: $pficon-var-delete;
}
.#{$icon-prefix}-edit:before {
content: $pficon-var-edit;
}
.#{$icon-prefix}-enterprise:before {
content: $pficon-var-enterprise;
}
.#{$icon-prefix}-error-circle-o:before {
color: $brand-danger;
content: $pficon-var-error-circle-o;
Expand All @@ -64,6 +76,9 @@
.#{$icon-prefix}-messages:before { // class name deprecated
content: $pficon-var-flag;
}
.#{$icon-prefix}-flavor:before {
content: $pficon-var-flavor;
}
.#{$icon-prefix}-folder-close:before {
content: $pficon-var-folder-close;
}
Expand Down Expand Up @@ -91,6 +106,12 @@
.#{$icon-prefix}-kubernetes:before {
content: $pficon-var-kubernetes;
}
.#{$icon-prefix}-memory:before {
content: $pficon-var-memory;
}
.#{$icon-prefix}-network:before {
content: $pficon-var-network;
}
.#{$icon-prefix}-ok:before {
color: $brand-success;
content: $pficon-var-ok;
Expand All @@ -108,12 +129,21 @@
.#{$icon-prefix}-restart:before {
content: $pficon-var-restart;
}
.#{$icon-prefix}-regions:before {
content: $pficon-var-regions;
}
.#{$icon-prefix}-registry:before {
content: $pficon-var-registry;
}
.#{$icon-prefix}-replicator:before {
content: $pficon-var-replicator;
}
.#{$icon-prefix}-repository:before {
content: $pficon-var-repository;
}
.#{$icon-prefix}-resource-pool:before {
content: $pficon-var-resource-pool;
}
.#{$icon-prefix}-route:before {
content: $pficon-var-route;
}
Expand All @@ -126,12 +156,18 @@
.#{$icon-prefix}-screen:before {
content: $pficon-var-screen;
}
.#{$icon-prefix}-server:before {
content: $pficon-var-server;
}
.#{$icon-prefix}-service:before {
content: $pficon-var-service;
}
.#{$icon-prefix}-settings:before {
content: $pficon-var-settings;
}
.#{$icon-prefix}-storage-domain:before {
content: $pficon-var-storage-domain;
}
.#{$icon-prefix}-thumb-tack-o:before {
content: $pficon-var-thumb-tack-o;
}
Expand All @@ -150,7 +186,16 @@
.#{$icon-prefix}-users:before {
content: $pficon-var-users;
}
.#{$icon-prefix}-virtual-machine:before {
content: $pficon-var-virtual-machine;
}
.#{$icon-prefix}-volume:before {
content: $pficon-var-volume;
}
.#{$icon-prefix}-warning-triangle-o:before {
color: $brand-warning;
content: $pficon-var-warning-triangle-o;
}
.#{$icon-prefix}-zone:before {
content: $pficon-var-zone;
}
2 changes: 1 addition & 1 deletion assets/stylesheets/patternfly/_list-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
}

.list-group-item-heading {
font-weight: 700;
font-weight: 600;
}
Loading

0 comments on commit e6d2e05

Please sign in to comment.