Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-patternfly",
"version": "3.3.3",
"version": "3.3.4",
"authors": [
"Red Hat"
],
Expand Down Expand Up @@ -39,7 +39,7 @@
"angular-sanitize": "1.3.0 - 1.5.*",
"angular-bootstrap": "0.13.x",
"lodash": "3.x",
"patternfly": "~3.3.3"
"patternfly": "~3.3.4"
},
"devDependencies": {
"angular-mocks": "1.3.0 - 1.5.*"
Expand Down
5 changes: 5 additions & 0 deletions dist/docs/css/angular-patternfly.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
padding: 0 20px 0;
}

.card-pf-icon-image {
height: 18px;
margin: 0 5px 5px;
}

.empty-chart-content {
text-align: center;
}
Expand Down
2 changes: 0 additions & 2 deletions dist/docs/css/patternfly-additions.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 52 additions & 20 deletions dist/docs/grunt-scripts/angular-animate.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* @license AngularJS v1.5.3
* @license AngularJS v1.5.5
* (c) 2010-2016 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
(function(window, angular) {'use strict';

/* jshint ignore:start */
var noop = angular.noop;
Expand Down Expand Up @@ -2317,7 +2317,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
}

// IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259.
var contains = Node.prototype.contains || function(arg) {
var contains = window.Node.prototype.contains || function(arg) {
// jshint bitwise: false
return this === arg || !!(this.compareDocumentPosition(arg) & 16);
// jshint bitwise: true
Expand All @@ -2342,6 +2342,23 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
return matches;
}

function filterFromRegistry(list, matchContainer, matchCallback) {
var containerNode = extractElementNode(matchContainer);
return list.filter(function(entry) {
var isMatch = entry.node === containerNode &&
(!matchCallback || entry.callback === matchCallback);
return !isMatch;
});
}

function cleanupEventListeners(phase, element) {
if (phase === 'close' && !element[0].parentNode) {
// If the element is not attached to a parentNode, it has been removed by
// the domOperation, and we can safely remove the event callbacks
$animate.off(element);
}
}

var $animate = {
on: function(event, container, callback) {
var node = extractElementNode(container);
Expand All @@ -2353,26 +2370,33 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {

// Remove the callback when the element is removed from the DOM
jqLite(container).on('$destroy', function() {
$animate.off(event, container, callback);
var animationDetails = activeAnimationsLookup.get(node);

if (!animationDetails) {
// If there's an animation ongoing, the callback calling code will remove
// the event listeners. If we'd remove here, the callbacks would be removed
// before the animation ends
$animate.off(event, container, callback);
}
});
},

off: function(event, container, callback) {
if (arguments.length === 1 && !angular.isString(arguments[0])) {
container = arguments[0];
for (var eventType in callbackRegistry) {
callbackRegistry[eventType] = filterFromRegistry(callbackRegistry[eventType], container);
}

return;
}

var entries = callbackRegistry[event];
if (!entries) return;

callbackRegistry[event] = arguments.length === 1
? null
: filterFromRegistry(entries, container, callback);

function filterFromRegistry(list, matchContainer, matchCallback) {
var containerNode = extractElementNode(matchContainer);
return list.filter(function(entry) {
var isMatch = entry.node === containerNode &&
(!matchCallback || entry.callback === matchCallback);
return !isMatch;
});
}
},

pin: function(element, parentElement) {
Expand Down Expand Up @@ -2486,12 +2510,14 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {

var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;

var documentHidden = $document[0].hidden;

// this is a hard disable of all animations for the application or on
// the element itself, therefore there is no need to continue further
// past this point if not enabled
// Animations are also disabled if the document is currently hidden (page is not visible
// to the user), because browsers slow down or do not flush calls to requestAnimationFrame
var skipAnimations = !animationsEnabled || $document[0].hidden || disabledElementsLookup.get(node);
var skipAnimations = !animationsEnabled || documentHidden || disabledElementsLookup.get(node);
var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {};
var hasExistingAnimation = !!existingAnimation.state;

Expand All @@ -2502,7 +2528,10 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
}

if (skipAnimations) {
// Callbacks should fire even if the document is hidden (regression fix for issue #14120)
if (documentHidden) notifyProgress(runner, event, 'start');
close();
if (documentHidden) notifyProgress(runner, event, 'close');
return runner;
}

Expand Down Expand Up @@ -2652,6 +2681,11 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
markElementAnimationState(element, RUNNING_STATE);
var realRunner = $$animation(element, event, animationDetails.options);

// this will update the runner's flow-control events based on
// the `realRunner` object.
runner.setHost(realRunner);
notifyProgress(runner, event, 'start', {});

realRunner.done(function(status) {
close(!status);
var animationDetails = activeAnimationsLookup.get(node);
Expand All @@ -2660,11 +2694,6 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
}
notifyProgress(runner, event, 'close', {});
});

// this will update the runner's flow-control events based on
// the `realRunner` object.
runner.setHost(realRunner);
notifyProgress(runner, event, 'start', {});
});

return runner;
Expand All @@ -2681,7 +2710,10 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
forEach(callbacks, function(callback) {
callback(element, phase, data);
});
cleanupEventListeners(phase, element);
});
} else {
cleanupEventListeners(phase, element);
}
});
runner.progress(event, phase, data);
Expand Down Expand Up @@ -3486,7 +3518,7 @@ var ngAnimateSwapDirective = ['$animate', '$rootScope', function($animate, $root
* <div ng-show="bool" class="fade">
* Show and hide me
* </div>
* <button ng-click="bool=true">Toggle</button>
* <button ng-click="bool=!bool">Toggle</button>
*
* <style>
* .fade.ng-hide {
Expand Down
37 changes: 28 additions & 9 deletions dist/docs/grunt-scripts/angular-patternfly.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,11 @@ angular.module('patternfly.autofocus', []).directive('pfFocused', ["$timeout", f
* <li>.count - the number count of the main statuses
* <li>.href - the href to navigate to if one clicks on the title or count
* <li>.iconClass - an icon to display to the left of the count
* <li>.iconImage - an image to display to the left of the count
* <li>.notifications - an array of status icons & counts
* <ul style='list-style-type: none'>
* <li>.iconClass - an icon to display to the right of the notification count
* <li>.iconImage - an image to display to the left of the notification count
* <li>.count - the number count of the notification status
* <li>.href - href to navigate to if one clicks on the notification status icon or count
* </ul>
Expand All @@ -170,6 +172,7 @@ angular.module('patternfly.autofocus', []).directive('pfFocused', ["$timeout", f
* <li><strong>.notification</strong> - an <em>object</em> of containing a single notification icon & count
* <ul style='list-style-type: none'>
* <li>.iconClass - an icon to display to the right of the notification count
* <li>.iconImage - an image to display to the left of the notification count
* <li>.count - the number count of the notification status
* <li>.href - href to navigate to if one clicks on the notification status icon or count
* </ul>
Expand Down Expand Up @@ -237,12 +240,12 @@ angular.module('patternfly.autofocus', []).directive('pfFocused', ["$timeout", f
"count":3,
"notifications":[
{
"iconClass":"pficon pficon-openshift",
"iconImage":"img/kubernetes.svg",
"count":1,
"href":"#"
},
{
"iconClass":"pficon pficon-kubernetes",
"iconImage":"img/OpenShift-logo.svg",
"count":2,
"href":"#"
}
Expand Down Expand Up @@ -772,10 +775,12 @@ angular.module('patternfly.card').directive('pfCard', function () {
var chart;
//generate c3 chart data
var chartData = scope.config;
chartData.bindto = '#' + attrs.id;
chart = c3.generate(chartData);
if (scope.getChartCallback) {
scope.getChartCallback(chart);
if (chartData) {
chartData.bindto = '#' + attrs.id;
chart = c3.generate(chartData);
if (scope.getChartCallback) {
scope.getChartCallback(chart);
}
}
});
}, true);
Expand Down Expand Up @@ -1647,6 +1652,19 @@ angular.module('patternfly.charts').directive('pfHeatmap', ["$compile", "$window
</div>
</div>
</div>
<div class="col-md-12">
<div class="row">
<div class="col-md-6">
<form role="form"">
<div class="form-group">
<label class="checkbox-inline">
<input type="checkbox" ng-model="data.dataAvailable">Data Available</input>
</label>
</div>
</form>
</div>
</div>
</div>
</div>
</file>

Expand All @@ -1667,6 +1685,7 @@ angular.module('patternfly.charts').directive('pfHeatmap', ["$compile", "$window
}

$scope.data = {
dataAvailable: true,
xData: dates,
yData0: ['Created', 12, 10,10, 62, 17, 10, 15, 13, 17, 10, 12, 10, 10, 12, 17, 16, 15, 13, 17, 10],
yData1: ['Deleted', 10, 17, 76,14, 10, 10, 10, 10, 10, 10, 10, 17, 17, 14, 10, 10, 10, 10, 10, 10]
Expand Down Expand Up @@ -3991,7 +4010,7 @@ angular.module('patternfly.select', []).directive('pfSelect', ["$timeout", funct
* <li>.title - (String) The title to display for the sort field
* <li>.sortType - (String) The sort type, 'alpha' or 'numeric'
* </ul>
* <li>.sortId - (Object) Id of the current sort field
* <li>.currentField - (Object) Currently selected field
* <li>.isAscending - (boolean) Current sort direction is ascending. True for ascending, False for descending
* <li>.onSortChange - ( function(sortId, sortDirection ) Function to call when the current sort params change
* </ul>
Expand Down Expand Up @@ -5870,7 +5889,7 @@ angular.module('patternfly.views').directive('pfListView', ["$timeout", "$window
'use strict';

$templateCache.put('card/aggregate-status/aggregate-status-card.html',
"<div ng-if=!isMiniLayout class=\"card-pf card-pf-aggregate-status\" ng-class=\"{'card-pf-accented': shouldShowTopBorder, 'card-pf-aggregate-status-alt': isAltLayout}\"><h2 class=card-pf-title><a href={{status.href}} ng-if=status.href><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></a> <span ng-if=!status.href><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></span></h2><div class=card-pf-body><p class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification ng-repeat=\"notification in status.notifications\"><a href={{notification.href}} ng-if=notification.href><span class={{notification.iconClass}}></span>{{ notification.count }}</a> <span ng-if=!notification.href><span class={{notification.iconClass}}></span>{{ notification.count }}</span></span></p></div></div><div ng-if=isMiniLayout class=\"card-pf card-pf-aggregate-status card-pf-aggregate-status-mini\" ng-class=\"{'card-pf-accented': shouldShowTopBorder}\"><h2 class=card-pf-title><span ng-if=status.iconClass class={{status.iconClass}}></span> <a ng-if=status.href href={{status.href}}><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</a> <span ng-if=!status.href><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</span></h2><div class=card-pf-body><p ng-if=\"status.notification.iconClass || status.notification.count\" class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification><a ng-if=status.notification.href href={{status.notification.href}}><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></a> <span ng-if=!status.notification.href><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></span></span></p></div></div>"
"<div ng-if=!isMiniLayout class=\"card-pf card-pf-aggregate-status\" ng-class=\"{'card-pf-accented': shouldShowTopBorder, 'card-pf-aggregate-status-alt': isAltLayout}\"><h2 class=card-pf-title><a href={{status.href}} ng-if=status.href><image ng-if=status.iconImage ng-src={{status.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></a> <span ng-if=!status.href><image ng-if=status.iconImage ng-src={{status.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></span></h2><div class=card-pf-body><p class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification ng-repeat=\"notification in status.notifications\"><a href={{notification.href}} ng-if=notification.href><image ng-if=notification.iconImage ng-src={{notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{notification.iconClass}}></span>{{ notification.count }}</a> <span ng-if=!notification.href><image ng-if=notification.iconImage ng-src={{notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{notification.iconClass}}></span>{{ notification.count }}</span></span></p></div></div><div ng-if=isMiniLayout class=\"card-pf card-pf-aggregate-status card-pf-aggregate-status-mini\" ng-class=\"{'card-pf-accented': shouldShowTopBorder}\"><h2 class=card-pf-title><image ng-if=status.iconImage ng-src={{status.iconImage}} alt=\"\" class=card-pf-icon-image></image><span ng-if=status.iconClass class={{status.iconClass}}></span> <a ng-if=status.href href={{status.href}}><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</a> <span ng-if=!status.href><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</span></h2><div class=card-pf-body><p ng-if=\"status.notification.iconImage || status.notification.iconClass || status.notification.count\" class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification><a ng-if=status.notification.href href={{status.notification.href}}><image ng-if=status.notification.iconImage ng-src={{status.notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></a> <span ng-if=!status.notification.href><image ng-if=status.notification.iconImage ng-src={{status.notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></span></span></p></div></div>"
);


Expand Down Expand Up @@ -5908,7 +5927,7 @@ angular.module('patternfly.views').directive('pfListView', ["$timeout", "$window


$templateCache.put('charts/line/line-chart.html',
"<span><div pf-c3-chart id={{lineChartId}} config=chartConfig></div></span>"
"<span><div pf-c3-chart id={{lineChartId}} ng-if=\"chartData.dataAvailable !== false\" config=chartConfig></div><div pf-empty-chart ng-if=\"chartData.dataAvailable === false\" chart-height=chartConfig.size.height></div></span>"
);


Expand Down
8 changes: 4 additions & 4 deletions dist/docs/grunt-scripts/angular-sanitize.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* @license AngularJS v1.5.3
* @license AngularJS v1.5.5
* (c) 2010-2016 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
(function(window, angular) {'use strict';

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Any commits to this file should be reviewed with security in mind. *
Expand Down Expand Up @@ -349,7 +349,7 @@ function htmlParser(html, handler) {
mXSSAttempts--;

// strip custom-namespaced attributes on IE<=11
if (document.documentMode <= 11) {
if (window.document.documentMode) {
stripCustomNsAttrs(inertBodyElement);
}
html = inertBodyElement.innerHTML; //trigger mXSS
Expand Down Expand Up @@ -489,7 +489,7 @@ function htmlSanitizeWriter(buf, uriValidator) {
* @param node Root element to process
*/
function stripCustomNsAttrs(node) {
if (node.nodeType === Node.ELEMENT_NODE) {
if (node.nodeType === window.Node.ELEMENT_NODE) {
var attrs = node.attributes;
for (var i = 0, l = attrs.length; i < l; i++) {
var attrNode = attrs[i];
Expand Down
Loading