Skip to content

Commit e0f4ae6

Browse files
Merge branch 'master-local' into master-dist
2 parents 1cfdcb1 + 161017f commit e0f4ae6

File tree

64 files changed

+253
-106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+253
-106
lines changed

dist/angular-patternfly.js

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9178,13 +9178,14 @@ angular.module('patternfly.charts').component('pfUtilizationTrendChart', {
91789178
format: '@?',
91799179
dateOptions: '<?',
91809180
isOpen: '<?',
9181-
popupPlacement: '@?'
9181+
popupPlacement: '@?',
9182+
onDateChange: '&'
91829183
},
91839184
templateUrl: 'datepicker/datepicker.html',
91849185
controller: function () {
91859186
'use strict';
91869187

9187-
var ctrl = this;
9188+
var ctrl = this, prevDate;
91889189

91899190
ctrl.defaultDateOptions = {
91909191
showWeeks : false,
@@ -9205,9 +9206,19 @@ angular.module('patternfly.charts').component('pfUtilizationTrendChart', {
92059206
};
92069207

92079208
ctrl.$onChanges = function (changes) {
9209+
prevDate = angular.copy(ctrl.date);
92089210
_.defaults(ctrl.isOpen, ctrl.defaultIsOpen);
92099211
};
92109212

9213+
ctrl.$doCheck = function () {
9214+
// do a deep compare on data
9215+
if (!angular.equals(ctrl.date, prevDate)) {
9216+
prevDate = angular.copy(ctrl.date);
9217+
if (ctrl.onDateChange) {
9218+
ctrl.onDateChange({newDate: ctrl.date});
9219+
}
9220+
}
9221+
};
92119222
}
92129223
});
92139224
;/**
@@ -9217,6 +9228,7 @@ angular.module('patternfly.charts').component('pfUtilizationTrendChart', {
92179228
*
92189229
* @param {date} date Must be a Javascript Date - to be displayed in the input. Can be left empty.
92199230
* @param {string} format Optional date format for displayed dates ('MM/dd/yyyy' by default).
9231+
* @param {function} on-date-change Optional user defined function which is called when the date is changed by the picker.<br/>
92209232
* @param {boolean} isOpen Optional boolean for determining whether or not to have the datepicker default to open (false by default).
92219233
* @param {string} popupPlacement Optional configuration string used to position the popup datepicker relative to the input element. See {@link https://angular-ui.github.io/bootstrap/#datepickerPopup Angular UI Datepicker Popup}.
92229234
* @param {object} dateOptions Optional uib-datepicker configuration object. See {@link https://angular-ui.github.io/bootstrap/#datepicker Angular UI Datepicker}.
@@ -9228,33 +9240,56 @@ angular.module('patternfly.charts').component('pfUtilizationTrendChart', {
92289240
<example module="patternfly.datepicker">
92299241

92309242
<file name="index.html">
9231-
<div ng-controller="DemoBootstrapDatepicker">
9232-
<pf-bootstrap-datepicker
9233-
date="date">
9234-
</pf-bootstrap-datepicker>
9235-
<pf-bootstrap-datepicker
9236-
date=""
9243+
<div ng-controller="DemoBootstrapDatepicker" class="row example-container">
9244+
<div class="form-group">
9245+
<label class="col-sm-2 control-label" for="date-one">Date One:</label>
9246+
<pf-bootstrap-datepicker
9247+
id="date-one"
9248+
date="dateOne"
9249+
on-date-change="firstDateChanged(newDate)">
9250+
</pf-bootstrap-datepicker>
9251+
<label class="col-sm-2 control-label" for="date-one">Date Two:</label>
9252+
<pf-bootstrap-datepicker
9253+
id="date-two"
9254+
date="dateTwo"
92379255
format="{{format1}}"
92389256
is-open="isOpen"
92399257
popup-placement="{{popupPlacement}}"
9240-
date-options="dateOptions">
9241-
</pf-bootstrap-datepicker>
9258+
date-options="dateOptions"
9259+
on-date-change="secondDateChanged(newDate)">
9260+
</pf-bootstrap-datepicker>
9261+
</div>
9262+
<div class="col-md-12">
9263+
<label style="font-weight:normal;vertical-align:center;">Events: </label>
9264+
</div>
9265+
<div class="col-md-12">
9266+
<textarea rows="10" class="col-md-12">{{eventText}}</textarea>
9267+
</div>
92429268
</div>
92439269
</file>
92449270

92459271
<file name="script.js">
92469272
angular.module('patternfly.datepicker').controller('DemoBootstrapDatepicker', function( $scope ) {
9273+
$scope.eventText = '';
92479274

92489275
// first datepicker
9249-
$scope.date = new Date("Jan 1, 2000");
9276+
$scope.dateOne = new Date("Jan 1, 2000");
9277+
$scope.firstDateChanged = function(date) {
9278+
$scope.eventText = 'Date One Updated to: ' + date + '\r\n' + $scope.eventText;
9279+
};
92509280

92519281
// second datepicker
9282+
$scope.dateTwo = new Date("Feb 1, 2000");
92529283
$scope.format1 = "MM/dd/yy";
92539284
$scope.dateOptions = {
92549285
showWeeks : true
92559286
};
92569287
$scope.isOpen = true;
92579288
$scope.popupPlacement = "bottom-left";
9289+
9290+
$scope.secondDateChanged = function(date) {
9291+
$scope.eventText = 'Date Two Updated to: ' + date + '\r\n' + $scope.eventText;
9292+
};
92589293
});
92599294
</file>
92609295

dist/angular-patternfly.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/docs/grunt-scripts/angular-patternfly.js

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9178,13 +9178,14 @@ angular.module('patternfly.charts').component('pfUtilizationTrendChart', {
91789178
format: '@?',
91799179
dateOptions: '<?',
91809180
isOpen: '<?',
9181-
popupPlacement: '@?'
9181+
popupPlacement: '@?',
9182+
onDateChange: '&'
91829183
},
91839184
templateUrl: 'datepicker/datepicker.html',
91849185
controller: function () {
91859186
'use strict';
91869187

9187-
var ctrl = this;
9188+
var ctrl = this, prevDate;
91889189

91899190
ctrl.defaultDateOptions = {
91909191
showWeeks : false,
@@ -9205,9 +9206,19 @@ angular.module('patternfly.charts').component('pfUtilizationTrendChart', {
92059206
};
92069207

92079208
ctrl.$onChanges = function (changes) {
9209+
prevDate = angular.copy(ctrl.date);
92089210
_.defaults(ctrl.isOpen, ctrl.defaultIsOpen);
92099211
};
92109212

9213+
ctrl.$doCheck = function () {
9214+
// do a deep compare on data
9215+
if (!angular.equals(ctrl.date, prevDate)) {
9216+
prevDate = angular.copy(ctrl.date);
9217+
if (ctrl.onDateChange) {
9218+
ctrl.onDateChange({newDate: ctrl.date});
9219+
}
9220+
}
9221+
};
92119222
}
92129223
});
92139224
;/**
@@ -9217,6 +9228,7 @@ angular.module('patternfly.charts').component('pfUtilizationTrendChart', {
92179228
*
92189229
* @param {date} date Must be a Javascript Date - to be displayed in the input. Can be left empty.
92199230
* @param {string} format Optional date format for displayed dates ('MM/dd/yyyy' by default).
9231+
* @param {function} on-date-change Optional user defined function which is called when the date is changed by the picker.<br/>
92209232
* @param {boolean} isOpen Optional boolean for determining whether or not to have the datepicker default to open (false by default).
92219233
* @param {string} popupPlacement Optional configuration string used to position the popup datepicker relative to the input element. See {@link https://angular-ui.github.io/bootstrap/#datepickerPopup Angular UI Datepicker Popup}.
92229234
* @param {object} dateOptions Optional uib-datepicker configuration object. See {@link https://angular-ui.github.io/bootstrap/#datepicker Angular UI Datepicker}.
@@ -9228,33 +9240,56 @@ angular.module('patternfly.charts').component('pfUtilizationTrendChart', {
92289240
<example module="patternfly.datepicker">
92299241

92309242
<file name="index.html">
9231-
<div ng-controller="DemoBootstrapDatepicker">
9232-
<pf-bootstrap-datepicker
9233-
date="date">
9234-
</pf-bootstrap-datepicker>
9235-
<pf-bootstrap-datepicker
9236-
date=""
9243+
<div ng-controller="DemoBootstrapDatepicker" class="row example-container">
9244+
<div class="form-group">
9245+
<label class="col-sm-2 control-label" for="date-one">Date One:</label>
9246+
<pf-bootstrap-datepicker
9247+
id="date-one"
9248+
date="dateOne"
9249+
on-date-change="firstDateChanged(newDate)">
9250+
</pf-bootstrap-datepicker>
9251+
<label class="col-sm-2 control-label" for="date-one">Date Two:</label>
9252+
<pf-bootstrap-datepicker
9253+
id="date-two"
9254+
date="dateTwo"
92379255
format="{{format1}}"
92389256
is-open="isOpen"
92399257
popup-placement="{{popupPlacement}}"
9240-
date-options="dateOptions">
9241-
</pf-bootstrap-datepicker>
9258+
date-options="dateOptions"
9259+
on-date-change="secondDateChanged(newDate)">
9260+
</pf-bootstrap-datepicker>
9261+
</div>
9262+
<div class="col-md-12">
9263+
<label style="font-weight:normal;vertical-align:center;">Events: </label>
9264+
</div>
9265+
<div class="col-md-12">
9266+
<textarea rows="10" class="col-md-12">{{eventText}}</textarea>
9267+
</div>
92429268
</div>
92439269
</file>
92449270

92459271
<file name="script.js">
92469272
angular.module('patternfly.datepicker').controller('DemoBootstrapDatepicker', function( $scope ) {
9273+
$scope.eventText = '';
92479274

92489275
// first datepicker
9249-
$scope.date = new Date("Jan 1, 2000");
9276+
$scope.dateOne = new Date("Jan 1, 2000");
9277+
$scope.firstDateChanged = function(date) {
9278+
$scope.eventText = 'Date One Updated to: ' + date + '\r\n' + $scope.eventText;
9279+
};
92509280

92519281
// second datepicker
9282+
$scope.dateTwo = new Date("Feb 1, 2000");
92529283
$scope.format1 = "MM/dd/yy";
92539284
$scope.dateOptions = {
92549285
showWeeks : true
92559286
};
92569287
$scope.isOpen = true;
92579288
$scope.popupPlacement = "bottom-left";
9289+
9290+
$scope.secondDateChanged = function(date) {
9291+
$scope.eventText = 'Date Two Updated to: ' + date + '\r\n' + $scope.eventText;
9292+
};
92589293
});
92599294
</file>
92609295

dist/docs/js/docs-setup.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/docs/partials/api/patternfly.autofocus.pfFocused.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/autofocus/autofocus.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/9094b8c/src/autofocus/autofocus.js#L39" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfFocused</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/autofocus/autofocus.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6596116/src/autofocus/autofocus.js#L39" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfFocused</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly</code>
33
</span>
44
</div>

dist/docs/partials/api/patternfly.canvas.component.pfCanvas.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/canvas-view/examples/canvas.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/9094b8c/src/canvas-view/examples/canvas.js#L335" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCanvas</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/canvas-view/examples/canvas.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6596116/src/canvas-view/examples/canvas.js#L335" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCanvas</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly.canvas</code>
33
</span>
44
</div>

dist/docs/partials/api/patternfly.canvas.component.pfCanvasEditor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/canvas-view/examples/canvasEditor.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/9094b8c/src/canvas-view/examples/canvasEditor.js#L344" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCanvasEditor</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/canvas-view/examples/canvasEditor.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6596116/src/canvas-view/examples/canvasEditor.js#L344" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCanvasEditor</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly.canvas</code>
33
</span>
44
</div>

dist/docs/partials/api/patternfly.card.component.pfAggregateStatusCard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/aggregate-status/aggregate-status-card.component.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/9094b8c/src/card/aggregate-status/aggregate-status-card.component.js#L205" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfAggregateStatusCard</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/aggregate-status/aggregate-status-card.component.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6596116/src/card/aggregate-status/aggregate-status-card.component.js#L205" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfAggregateStatusCard</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly.card</code>
33
</span>
44
</div>

dist/docs/partials/api/patternfly.card.component.pfCard - Timeframe Filters.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/examples/card-timeframe.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/9094b8c/src/card/examples/card-timeframe.js#L96" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCard - Timeframe Filters</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/examples/card-timeframe.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6596116/src/card/examples/card-timeframe.js#L96" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCard - Timeframe Filters</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly.card</code>
33
</span>
44
</div>

dist/docs/partials/api/patternfly.card.component.pfCard - Trends.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/examples/card-trend.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/9094b8c/src/card/examples/card-trend.js#L167" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCard - Trends</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/examples/card-trend.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6596116/src/card/examples/card-trend.js#L167" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCard - Trends</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly.card</code>
33
</span>
44
</div>

0 commit comments

Comments
 (0)