Skip to content

Commit 1c29306

Browse files
Merge branch 'master-local' into master-dist
2 parents f0c1483 + d65ac4c commit 1c29306

File tree

61 files changed

+118
-101
lines changed

Some content is hidden

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

61 files changed

+118
-101
lines changed

dist/angular-patternfly.js

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12757,7 +12757,9 @@ angular.module('patternfly.pagination').component('pfPagination', {
1275712757
angular.module('patternfly.tableview.demo').controller('TableCtrl', ['$scope', '$timeout', 'itemsService',
1275812758
function ($scope, $timeout, itemsService) {
1275912759
$scope.dtOptions = {
12760-
order: [[2, "asc"]],
12760+
// order column(s) should NOT account for 1st checkbox column, table component will adjust col. numbers accordingly
12761+
// Sort by City, then Name
12762+
order: [[3, "asc"], [1, "desc"]],
1276112763
};
1276212764

1276312765
$scope.columns = [
@@ -13602,7 +13604,7 @@ angular.module('patternfly.pagination').component('pfPagination', {
1360213604
templateUrl: 'table/tableview/table-view.html',
1360313605
controller: ["DTOptionsBuilder", "DTColumnDefBuilder", "$element", "pfUtils", "$log", "$filter", "$timeout", "$sce", function (DTOptionsBuilder, DTColumnDefBuilder, $element, pfUtils, $log, $filter, $timeout, $sce) {
1360413606
'use strict';
13605-
var ctrl = this, prevDtOptions, prevItems, prevPageConfig;
13607+
var ctrl = this, prevDtOptions, prevItems, prevPageConfig, prevShowCheckboxes;
1360613608

1360713609
// Once datatables is out of active development I'll remove log statements
1360813610
ctrl.debug = false;
@@ -13613,7 +13615,7 @@ angular.module('patternfly.pagination').component('pfPagination', {
1361313615
ctrl.defaultDtOptions = {
1361413616
autoWidth: false,
1361513617
destroy: true,
13616-
order: [[1, "asc"]],
13618+
order: [[0, "asc"]], //default to 1st (col 0) for sorting, updateConfigOptions() will adjust based on showCheckboxes
1361713619
dom: "t",
1361813620
paging: false,
1361913621
select: {
@@ -13705,20 +13707,23 @@ angular.module('patternfly.pagination').component('pfPagination', {
1370513707
ctrl.dtOptions.displayLength = Number(ctrl.dtOptions.displayLength);
1370613708
}
1370713709

13710+
_.defaults(ctrl.dtOptions, ctrl.defaultDtOptions);
13711+
_.defaults(ctrl.config, ctrl.defaultConfig);
13712+
13713+
if (ctrl.config.showCheckboxes !== prevShowCheckboxes) {
13714+
// adjust column numbers based on whether or not there is a checkbox column
13715+
// multi-col order may be used. Ex: [[ 0, 'asc' ], [ 1, 'desc' ]]
13716+
_.each(ctrl.dtOptions.order, function (col) {
13717+
col[0] = ctrl.config.showCheckboxes ? col[0] + 1 : col[0] - 1;
13718+
col[0] = col[0] < 0 ? 0 : col[0]; //no negative col numbers
13719+
});
13720+
}
13721+
1370813722
// Need to deep watch changes in dtOptions and items
1370913723
prevDtOptions = angular.copy(ctrl.dtOptions);
1371013724
prevItems = angular.copy(ctrl.items);
1371113725
prevPageConfig = angular.copy(ctrl.pageConfig);
13712-
13713-
// Setting bound variables to new variables loses it's one way binding
13714-
// ctrl.dtOptions = pfUtils.merge(ctrl.defaultDtOptions, ctrl.dtOptions);
13715-
// ctrl.config = pfUtils.merge(ctrl.defaultConfig, ctrl.config);
13716-
13717-
// Instead, use _.defaults to update the existing variable
13718-
_.defaults(ctrl.dtOptions, ctrl.defaultDtOptions);
13719-
_.defaults(ctrl.config, ctrl.defaultConfig);
13720-
// may need to use _.defaultsDeep, but not currently available in
13721-
// lodash-amd a-pf is using
13726+
prevShowCheckboxes = angular.copy(ctrl.config.showCheckboxes);
1372213727

1372313728
if (!validSelectionMatchProp()) {
1372413729
angular.forEach(ctrl.columns, function (col) {

dist/angular-patternfly.min.js

Lines changed: 4 additions & 4 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: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12757,7 +12757,9 @@ angular.module('patternfly.pagination').component('pfPagination', {
1275712757
angular.module('patternfly.tableview.demo').controller('TableCtrl', ['$scope', '$timeout', 'itemsService',
1275812758
function ($scope, $timeout, itemsService) {
1275912759
$scope.dtOptions = {
12760-
order: [[2, "asc"]],
12760+
// order column(s) should NOT account for 1st checkbox column, table component will adjust col. numbers accordingly
12761+
// Sort by City, then Name
12762+
order: [[3, "asc"], [1, "desc"]],
1276112763
};
1276212764

1276312765
$scope.columns = [
@@ -13602,7 +13604,7 @@ angular.module('patternfly.pagination').component('pfPagination', {
1360213604
templateUrl: 'table/tableview/table-view.html',
1360313605
controller: ["DTOptionsBuilder", "DTColumnDefBuilder", "$element", "pfUtils", "$log", "$filter", "$timeout", "$sce", function (DTOptionsBuilder, DTColumnDefBuilder, $element, pfUtils, $log, $filter, $timeout, $sce) {
1360413606
'use strict';
13605-
var ctrl = this, prevDtOptions, prevItems, prevPageConfig;
13607+
var ctrl = this, prevDtOptions, prevItems, prevPageConfig, prevShowCheckboxes;
1360613608

1360713609
// Once datatables is out of active development I'll remove log statements
1360813610
ctrl.debug = false;
@@ -13613,7 +13615,7 @@ angular.module('patternfly.pagination').component('pfPagination', {
1361313615
ctrl.defaultDtOptions = {
1361413616
autoWidth: false,
1361513617
destroy: true,
13616-
order: [[1, "asc"]],
13618+
order: [[0, "asc"]], //default to 1st (col 0) for sorting, updateConfigOptions() will adjust based on showCheckboxes
1361713619
dom: "t",
1361813620
paging: false,
1361913621
select: {
@@ -13705,20 +13707,23 @@ angular.module('patternfly.pagination').component('pfPagination', {
1370513707
ctrl.dtOptions.displayLength = Number(ctrl.dtOptions.displayLength);
1370613708
}
1370713709

13710+
_.defaults(ctrl.dtOptions, ctrl.defaultDtOptions);
13711+
_.defaults(ctrl.config, ctrl.defaultConfig);
13712+
13713+
if (ctrl.config.showCheckboxes !== prevShowCheckboxes) {
13714+
// adjust column numbers based on whether or not there is a checkbox column
13715+
// multi-col order may be used. Ex: [[ 0, 'asc' ], [ 1, 'desc' ]]
13716+
_.each(ctrl.dtOptions.order, function (col) {
13717+
col[0] = ctrl.config.showCheckboxes ? col[0] + 1 : col[0] - 1;
13718+
col[0] = col[0] < 0 ? 0 : col[0]; //no negative col numbers
13719+
});
13720+
}
13721+
1370813722
// Need to deep watch changes in dtOptions and items
1370913723
prevDtOptions = angular.copy(ctrl.dtOptions);
1371013724
prevItems = angular.copy(ctrl.items);
1371113725
prevPageConfig = angular.copy(ctrl.pageConfig);
13712-
13713-
// Setting bound variables to new variables loses it's one way binding
13714-
// ctrl.dtOptions = pfUtils.merge(ctrl.defaultDtOptions, ctrl.dtOptions);
13715-
// ctrl.config = pfUtils.merge(ctrl.defaultConfig, ctrl.config);
13716-
13717-
// Instead, use _.defaults to update the existing variable
13718-
_.defaults(ctrl.dtOptions, ctrl.defaultDtOptions);
13719-
_.defaults(ctrl.config, ctrl.defaultConfig);
13720-
// may need to use _.defaultsDeep, but not currently available in
13721-
// lodash-amd a-pf is using
13726+
prevShowCheckboxes = angular.copy(ctrl.config.showCheckboxes);
1372213727

1372313728
if (!validSelectionMatchProp()) {
1372413729
angular.forEach(ctrl.columns, function (col) {

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/3b1bbdc/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/c10f16d/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/3b1bbdc/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/c10f16d/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/3b1bbdc/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/c10f16d/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/3b1bbdc/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/c10f16d/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/3b1bbdc/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/c10f16d/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/3b1bbdc/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/c10f16d/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)