-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Core): Implementation for #2483. Adds a showGridFooter option th…
…at will create a grid footer with the Total Items and Shown Items displayed. Also shows Selected Items if using Selection feature. BREAKING CHANGE: showFooter option renamed to showColumnFooter; footerRowHeight option renamed to columnFooterHeight
- Loading branch information
Showing
21 changed files
with
295 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<span ng-if="grid.selection.selectedCount !== 0 && grid.options.enableFooterTotalSelected">({{"search.selectedItems" | t}} {{grid.selection.selectedCount}})</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('ui.grid').directive('uiGridGridFooter', ['$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', function ($templateCache, $compile, uiGridConstants, gridUtil, $timeout) { | ||
var defaultTemplate = 'ui-grid/ui-grid-grid-footer'; | ||
|
||
return { | ||
restrict: 'EA', | ||
replace: true, | ||
// priority: 1000, | ||
require: '^uiGrid', | ||
scope: true, | ||
compile: function ($elm, $attrs) { | ||
return { | ||
pre: function ($scope, $elm, $attrs, uiGridCtrl) { | ||
|
||
$scope.grid = uiGridCtrl.grid; | ||
$scope.getExternalScopes = uiGridCtrl.getExternalScopes; | ||
|
||
var footerTemplate = ($scope.grid.options.gridFooterTemplate) ? $scope.grid.options.gridFooterTemplate : defaultTemplate; | ||
gridUtil.getTemplate(footerTemplate) | ||
.then(function (contents) { | ||
var template = angular.element(contents); | ||
|
||
var newElm = $compile(template)($scope); | ||
$elm.append(newElm); | ||
}); | ||
}, | ||
|
||
post: function ($scope, $elm, $attrs, controllers) { | ||
|
||
} | ||
}; | ||
} | ||
}; | ||
}]); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.