Skip to content

Commit 0ff6d08

Browse files
Merge branch 'master-local' into master-dist
2 parents f906906 + ffca51b commit 0ff6d08

File tree

77 files changed

+1264
-233
lines changed

Some content is hidden

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

77 files changed

+1264
-233
lines changed

Gruntfile.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,11 @@ module.exports = function (grunt) {
453453
cwd: 'src/',
454454
src: ['pagination/**/*.html'],
455455
dest: 'templates/pagination.js'
456+
},
457+
'patternfly.datepicker' : {
458+
cwd: 'src/',
459+
src: ['datepicker/**/*.html'],
460+
dest: 'templates/datepicker.js'
456461
}
457462
},
458463
// ng-annotate tries to make the code safe for minification automatically

dist/angular-patternfly.js

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ angular.module('patternfly.card', ['ui.bootstrap']);
2323
*/
2424
angular.module('patternfly.charts', ['patternfly.utils', 'ui.bootstrap', 'ngSanitize']);
2525

26+
;/**
27+
* @name patternfly datepicker
28+
*
29+
* @description
30+
* Datepicker module for patternfly.
31+
*
32+
*/
33+
angular.module('patternfly.datepicker', ['ui.bootstrap']);
34+
2635
;/**
2736
* @name patternfly card
2837
*
@@ -86,6 +95,7 @@ angular.module('patternfly.pagination', ['ui.bootstrap'])
8695
angular.module('patternfly', [
8796
'patternfly.autofocus',
8897
'patternfly.card',
98+
'patternfly.datepicker',
8999
'patternfly.filters',
90100
'patternfly.form',
91101
'patternfly.modals',
@@ -7407,6 +7417,94 @@ angular.module('patternfly.charts').component('pfUtilizationTrendChart', {
74077417
};
74087418
}]
74097419
});
7420+
;angular.module('patternfly.datepicker').component('pfBootstrapDatepicker', {
7421+
bindings: {
7422+
date: '<',
7423+
format: '@?',
7424+
dateOptions: '<?',
7425+
isOpen: '<?',
7426+
popupPlacement: '@?'
7427+
},
7428+
templateUrl: 'datepicker/datepicker.html',
7429+
controller: function () {
7430+
'use strict';
7431+
7432+
var ctrl = this;
7433+
7434+
ctrl.defaultDateOptions = {
7435+
showWeeks : false,
7436+
formatDay : "d"
7437+
};
7438+
ctrl.defaultIsOpen = false;
7439+
7440+
ctrl.$onInit = function () {
7441+
ctrl.format = "MM/dd/yyyy";
7442+
ctrl.showButtonBar = true;
7443+
ctrl.popupPlacement = "auto bottom-left";
7444+
7445+
if (angular.isUndefined(ctrl.dateOptions)) {
7446+
ctrl.dateOptions = {};
7447+
}
7448+
_.defaults(ctrl.dateOptions, ctrl.defaultDateOptions);
7449+
_.defaults(ctrl.isOpen, ctrl.defaultIsOpen);
7450+
};
7451+
7452+
ctrl.$onChanges = function (changes) {
7453+
_.defaults(ctrl.isOpen, ctrl.defaultIsOpen);
7454+
};
7455+
7456+
}
7457+
});
7458+
;/**
7459+
* @ngdoc directive
7460+
* @name patternfly.datepicker.componenet:pfBootstrapDatepicker
7461+
* @element pf-bootstrap-datepicker
7462+
*
7463+
* @param {date} date Must be a Javascript Date - to be displayed in the input. Can be left empty.
7464+
* @param {string} format Optional date format for displayed dates ('MM/dd/yyyy' by default).
7465+
* @param {boolean} isOpen Optional boolean for determining whether or not to have the datepicker default to open (false by default).
7466+
* @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}.
7467+
* @param {object} dateOptions Optional uib-datepicker configuration object. See {@link https://angular-ui.github.io/bootstrap/#datepicker Angular UI Datepicker}.
7468+
*
7469+
* @description
7470+
* A wrapper for the Angular UI {@link http://angular-ui.github.io/bootstrap/#!#datepickerPopup datepicker}.
7471+
*
7472+
* @example
7473+
<example module="patternfly.datepicker">
7474+
7475+
<file name="index.html">
7476+
<div ng-controller="DemoBootstrapDatepicker">
7477+
<pf-bootstrap-datepicker
7478+
date="date">
7479+
</pf-bootstrap-datepicker>
7480+
<pf-bootstrap-datepicker
7481+
date=""
7482+
format="{{format1}}"
7483+
is-open="isOpen"
7484+
popup-placement="{{popupPlacement}}"
7485+
date-options="dateOptions">
7486+
</pf-bootstrap-datepicker>
7487+
</div>
7488+
</file>
7489+
7490+
<file name="script.js">
7491+
angular.module('patternfly.datepicker').controller('DemoBootstrapDatepicker', function( $scope ) {
7492+
7493+
// first datepicker
7494+
$scope.date = new Date("Jan 1, 2000");
7495+
7496+
// second datepicker
7497+
$scope.format1 = "MM/dd/yy";
7498+
$scope.dateOptions = {
7499+
showWeeks : true
7500+
};
7501+
$scope.isOpen = true;
7502+
$scope.popupPlacement = "bottom-left";
7503+
});
7504+
</file>
7505+
7506+
</example>
7507+
*/
74107508
;/**
74117509
* @ngdoc directive
74127510
* @name patternfly.filters.component:pfFilterPanel
@@ -18734,6 +18832,14 @@ angular.module('patternfly.wizard').component('pfWizardSubstep', {
1873418832
"<div class=utilization-trend-chart-pf ng-class=\"{'data-unavailable-pf': $ctrl.chartData.dataAvailable === false}\"><h3>{{$ctrl.config.title}}</h3><div class=current-values><h1 class=\"available-count pull-left\">{{$ctrl.currentValue}}</h1><div class=\"available-text pull-left\"><div><span>{{$ctrl.currentText}}</span></div><div><span>of {{$ctrl.chartData.total}} {{$ctrl.config.units}}</span></div></div></div><div class=donut-chart-pf><pf-donut-pct-chart ng-if=\"$ctrl.chartData.dataAvailable !== false\" config=$ctrl.donutConfig data=$ctrl.chartData center-label=$ctrl.centerLabel></pf-donut-pct-chart><pf-empty-chart ng-if=\"$ctrl.chartData.dataAvailable === false\" chart-height=231></pf-empty-chart></div><div ng-if=\"$ctrl.chartData.dataAvailable !== false\" class=sparkline-chart><pf-sparkline-chart config=$ctrl.sparklineConfig chart-data=$ctrl.chartData chart-height=$ctrl.sparklineChartHeight show-x-axis=$ctrl.showSparklineXAxis show-y-axis=$ctrl.showSparklineYAxis></pf-sparkline-chart></div><span class=\"pull-left legend-text\">{{$ctrl.legendLeftText}}</span> <span class=\"pull-right legend-text\">{{$ctrl.legendRightText}}</span></div>"
1873518833
);
1873618834

18835+
}]);
18836+
;angular.module('patternfly.datepicker').run(['$templateCache', function($templateCache) {
18837+
'use strict';
18838+
18839+
$templateCache.put('datepicker/datepicker.html',
18840+
"<p class=input-group><input class=\"form-control datepicker\" ng-model=$ctrl.date uib-datepicker-popup={{$ctrl.format}} datepicker-options=$ctrl.dateOptions is-open=$ctrl.isOpen ng-required=true close-text=Close show-button-bar=$ctrl.showButtonBar popup-placement=\"{{$ctrl.popupPlacement}}\"> <span class=input-group-btn><button type=button class=\"btn btn-default datepicker\" ng-click=\"$ctrl.isOpen = !$ctrl.isOpen\"><i class=\"glyphicon glyphicon-calendar\"></i></button></span></p>"
18841+
);
18842+
1873718843
}]);
1873818844
;angular.module('patternfly.filters').run(['$templateCache', function($templateCache) {
1873918845
'use strict';

dist/angular-patternfly.min.js

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

dist/docs/css/angular-patternfly.css

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,3 +1178,94 @@ table.dataTable tbody td {
11781178
.content-view-pf-pagination .form-group .per-page-label {
11791179
padding-left: 10px;
11801180
}
1181+
.uib-datepicker-popup {
1182+
padding: 4px;
1183+
}
1184+
.uib-datepicker-popup *:focus {
1185+
outline: none;
1186+
}
1187+
.uib-datepicker-popup button {
1188+
background: #fff;
1189+
border: none;
1190+
box-shadow: none;
1191+
}
1192+
.uib-datepicker-popup th {
1193+
height: 30px;
1194+
}
1195+
.uib-datepicker-popup .uib-title {
1196+
font-size: 14px;
1197+
font-weight: 500;
1198+
padding: 5px;
1199+
}
1200+
.uib-datepicker-popup .uib-title strong {
1201+
font-weight: normal;
1202+
}
1203+
.uib-datepicker-popup .uib-left {
1204+
height: 30px;
1205+
}
1206+
.uib-datepicker-popup .uib-left .glyphicon {
1207+
display: none;
1208+
}
1209+
.uib-datepicker-popup .uib-left::before {
1210+
content: "\00AB";
1211+
}
1212+
.uib-datepicker-popup .uib-right {
1213+
height: 30px;
1214+
}
1215+
.uib-datepicker-popup .uib-right .glyphicon {
1216+
display: none;
1217+
}
1218+
.uib-datepicker-popup .uib-right::before {
1219+
content: "\00BB";
1220+
}
1221+
.uib-datepicker-popup .uib-day button.btn.btn-default {
1222+
height: 30px;
1223+
width: 30px;
1224+
}
1225+
.uib-datepicker-popup .uib-day button.btn.btn-default:hover {
1226+
background: #def3ff;
1227+
}
1228+
.uib-datepicker-popup .uib-day button.btn.btn-default.active {
1229+
background: #0088ce;
1230+
border-color: #004368;
1231+
color: #fff;
1232+
box-shadow: none;
1233+
padding: 0;
1234+
}
1235+
.uib-datepicker-popup .uib-day button.btn.btn-default.active .text-info {
1236+
color: #fff;
1237+
}
1238+
.uib-datepicker-popup .uib-day button.btn.btn-default:not(.active) .text-info {
1239+
color: #393f44;
1240+
background: #f9d67a;
1241+
height: 30px;
1242+
width: 30px;
1243+
padding: 7px;
1244+
display: inline-block;
1245+
margin: -1px -7px -2px -7px;
1246+
}
1247+
.uib-datepicker-popup .uib-day button.btn.btn-default:not(.active) .text-info:hover {
1248+
background: #def3ff;
1249+
}
1250+
.uib-datepicker-popup .uib-button-bar {
1251+
padding: 0;
1252+
}
1253+
.uib-datepicker-popup .uib-button-bar .btn-group {
1254+
width: 100%;
1255+
}
1256+
.uib-datepicker-popup .uib-button-bar .btn-group .uib-clear {
1257+
display: none;
1258+
}
1259+
.uib-datepicker-popup .uib-button-bar .btn-group .uib-datepicker-current {
1260+
color: #030303;
1261+
width: 100%;
1262+
font-size: 14px;
1263+
font-weight: 500;
1264+
height: 30px;
1265+
}
1266+
.uib-datepicker-popup .uib-button-bar .btn-group .uib-datepicker-current:hover {
1267+
background: #def3ff;
1268+
}
1269+
.uib-datepicker-popup .uib-button-bar .uib-close {
1270+
display: none;
1271+
}

dist/docs/css/ng-docs.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,4 +375,7 @@ ul.events > li > h3 {
375375
background-color: #cc0000;
376376
}
377377

378+
.type-hint-date {
379+
background:#582fc0;
380+
}
378381

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

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ angular.module('patternfly.card', ['ui.bootstrap']);
2323
*/
2424
angular.module('patternfly.charts', ['patternfly.utils', 'ui.bootstrap', 'ngSanitize']);
2525

26+
;/**
27+
* @name patternfly datepicker
28+
*
29+
* @description
30+
* Datepicker module for patternfly.
31+
*
32+
*/
33+
angular.module('patternfly.datepicker', ['ui.bootstrap']);
34+
2635
;/**
2736
* @name patternfly card
2837
*
@@ -86,6 +95,7 @@ angular.module('patternfly.pagination', ['ui.bootstrap'])
8695
angular.module('patternfly', [
8796
'patternfly.autofocus',
8897
'patternfly.card',
98+
'patternfly.datepicker',
8999
'patternfly.filters',
90100
'patternfly.form',
91101
'patternfly.modals',
@@ -7407,6 +7417,94 @@ angular.module('patternfly.charts').component('pfUtilizationTrendChart', {
74077417
};
74087418
}]
74097419
});
7420+
;angular.module('patternfly.datepicker').component('pfBootstrapDatepicker', {
7421+
bindings: {
7422+
date: '<',
7423+
format: '@?',
7424+
dateOptions: '<?',
7425+
isOpen: '<?',
7426+
popupPlacement: '@?'
7427+
},
7428+
templateUrl: 'datepicker/datepicker.html',
7429+
controller: function () {
7430+
'use strict';
7431+
7432+
var ctrl = this;
7433+
7434+
ctrl.defaultDateOptions = {
7435+
showWeeks : false,
7436+
formatDay : "d"
7437+
};
7438+
ctrl.defaultIsOpen = false;
7439+
7440+
ctrl.$onInit = function () {
7441+
ctrl.format = "MM/dd/yyyy";
7442+
ctrl.showButtonBar = true;
7443+
ctrl.popupPlacement = "auto bottom-left";
7444+
7445+
if (angular.isUndefined(ctrl.dateOptions)) {
7446+
ctrl.dateOptions = {};
7447+
}
7448+
_.defaults(ctrl.dateOptions, ctrl.defaultDateOptions);
7449+
_.defaults(ctrl.isOpen, ctrl.defaultIsOpen);
7450+
};
7451+
7452+
ctrl.$onChanges = function (changes) {
7453+
_.defaults(ctrl.isOpen, ctrl.defaultIsOpen);
7454+
};
7455+
7456+
}
7457+
});
7458+
;/**
7459+
* @ngdoc directive
7460+
* @name patternfly.datepicker.componenet:pfBootstrapDatepicker
7461+
* @element pf-bootstrap-datepicker
7462+
*
7463+
* @param {date} date Must be a Javascript Date - to be displayed in the input. Can be left empty.
7464+
* @param {string} format Optional date format for displayed dates ('MM/dd/yyyy' by default).
7465+
* @param {boolean} isOpen Optional boolean for determining whether or not to have the datepicker default to open (false by default).
7466+
* @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}.
7467+
* @param {object} dateOptions Optional uib-datepicker configuration object. See {@link https://angular-ui.github.io/bootstrap/#datepicker Angular UI Datepicker}.
7468+
*
7469+
* @description
7470+
* A wrapper for the Angular UI {@link http://angular-ui.github.io/bootstrap/#!#datepickerPopup datepicker}.
7471+
*
7472+
* @example
7473+
<example module="patternfly.datepicker">
7474+
7475+
<file name="index.html">
7476+
<div ng-controller="DemoBootstrapDatepicker">
7477+
<pf-bootstrap-datepicker
7478+
date="date">
7479+
</pf-bootstrap-datepicker>
7480+
<pf-bootstrap-datepicker
7481+
date=""
7482+
format="{{format1}}"
7483+
is-open="isOpen"
7484+
popup-placement="{{popupPlacement}}"
7485+
date-options="dateOptions">
7486+
</pf-bootstrap-datepicker>
7487+
</div>
7488+
</file>
7489+
7490+
<file name="script.js">
7491+
angular.module('patternfly.datepicker').controller('DemoBootstrapDatepicker', function( $scope ) {
7492+
7493+
// first datepicker
7494+
$scope.date = new Date("Jan 1, 2000");
7495+
7496+
// second datepicker
7497+
$scope.format1 = "MM/dd/yy";
7498+
$scope.dateOptions = {
7499+
showWeeks : true
7500+
};
7501+
$scope.isOpen = true;
7502+
$scope.popupPlacement = "bottom-left";
7503+
});
7504+
</file>
7505+
7506+
</example>
7507+
*/
74107508
;/**
74117509
* @ngdoc directive
74127510
* @name patternfly.filters.component:pfFilterPanel
@@ -18734,6 +18832,14 @@ angular.module('patternfly.wizard').component('pfWizardSubstep', {
1873418832
"<div class=utilization-trend-chart-pf ng-class=\"{'data-unavailable-pf': $ctrl.chartData.dataAvailable === false}\"><h3>{{$ctrl.config.title}}</h3><div class=current-values><h1 class=\"available-count pull-left\">{{$ctrl.currentValue}}</h1><div class=\"available-text pull-left\"><div><span>{{$ctrl.currentText}}</span></div><div><span>of {{$ctrl.chartData.total}} {{$ctrl.config.units}}</span></div></div></div><div class=donut-chart-pf><pf-donut-pct-chart ng-if=\"$ctrl.chartData.dataAvailable !== false\" config=$ctrl.donutConfig data=$ctrl.chartData center-label=$ctrl.centerLabel></pf-donut-pct-chart><pf-empty-chart ng-if=\"$ctrl.chartData.dataAvailable === false\" chart-height=231></pf-empty-chart></div><div ng-if=\"$ctrl.chartData.dataAvailable !== false\" class=sparkline-chart><pf-sparkline-chart config=$ctrl.sparklineConfig chart-data=$ctrl.chartData chart-height=$ctrl.sparklineChartHeight show-x-axis=$ctrl.showSparklineXAxis show-y-axis=$ctrl.showSparklineYAxis></pf-sparkline-chart></div><span class=\"pull-left legend-text\">{{$ctrl.legendLeftText}}</span> <span class=\"pull-right legend-text\">{{$ctrl.legendRightText}}</span></div>"
1873518833
);
1873618834

18835+
}]);
18836+
;angular.module('patternfly.datepicker').run(['$templateCache', function($templateCache) {
18837+
'use strict';
18838+
18839+
$templateCache.put('datepicker/datepicker.html',
18840+
"<p class=input-group><input class=\"form-control datepicker\" ng-model=$ctrl.date uib-datepicker-popup={{$ctrl.format}} datepicker-options=$ctrl.dateOptions is-open=$ctrl.isOpen ng-required=true close-text=Close show-button-bar=$ctrl.showButtonBar popup-placement=\"{{$ctrl.popupPlacement}}\"> <span class=input-group-btn><button type=button class=\"btn btn-default datepicker\" ng-click=\"$ctrl.isOpen = !$ctrl.isOpen\"><i class=\"glyphicon glyphicon-calendar\"></i></button></span></p>"
18841+
);
18842+
1873718843
}]);
1873818844
;angular.module('patternfly.filters').run(['$templateCache', function($templateCache) {
1873918845
'use strict';

dist/docs/js/docs-setup.js

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

0 commit comments

Comments
 (0)