Skip to content

Commit cfdeac8

Browse files
committed
add label sum
1 parent 2e97bb3 commit cfdeac8

File tree

8 files changed

+13
-9
lines changed

8 files changed

+13
-9
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ $scope.config =
4141
"classTable": "table table-bordered table-striped", // optional, default: "table table-bordered table-striped" --->
4242
"messageLoading": "Loading...",                     // optional, default: "loading..."
4343
"messageEmpty" : "No results", 
44+
"sumLabel" : "Total: ", // optional, default: "Total: "
4445
"sort": true, // optional, default: false
4546
"defaultSort": "id,asc", // optional, default is first "collumn.index", asc
4647
@@ -635,7 +636,7 @@ $scope.config =
635636
labelSize: 'Registros por página: ', // optional, default "Page size: ""
636637
defaultSize: 10, // optional, default first item in avaliableSizes
637638
avaliableSizes: [10, 25, 50, 100, 500], // optional, default [10,25,50,100]
638-
positionBottom: true // optional, default is position top
639+
positionBottom: true // optional, default is true, position over top
639640
},
640641
...
641642
}

demo/demo.controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ app.controller('demoController', function($scope, $http) {
55
classTable: 'table table-bordered table-striped',
66
messageLoading: 'Loading...',
77
messageEmpty: 'No results',
8+
// sumLabel: 'Total de registros:',
89
sort: true,
910
defaultSort: 'id,asc',
1011

dist/directive.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* angular-rs-datagrid
33
*
4-
* Version: 1.0.68 - 2018-02-15T20:04:41.877Z
4+
* Version: 1.0.68 - 2018-02-16T12:00:41.090Z
55
* License: MIT
66
*/
77

dist/directive.js

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

dist/directive.min.css

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/directive.min.js

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

src/directive-template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h3 class="popover-title" ng-if="config.popoverRow.titleRender" ng-bind-html="ge
4444
<!-- -->
4545
<br style="clear: both;" />
4646
<!-- table -->
47-
<span class="pull-right">Total: {{hasPagination ? collection.totalElements : collection.content.length}} </span>
47+
<span class="pull-right">{{sumLabel}} {{hasPagination ? collection.totalElements : collection.content.length}} </span>
4848
<table ng-class="config.classTaable || 'table table-bordered table-striped'">
4949
<thead>
5050
<tr>

src/directive.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ angular.module('rs.datagrid', ['ui.utils.masks', 'ui.select'])
1717
scope.buttons = scope.config.buttons;
1818
scope.hasPagination = false;
1919
scope.messageLoading = scope.config.messageLoading || 'loading...';
20+
scope.sumLabel = scope.config.sumLabel ? scope.config.sumLabel : 'Total:';
2021
scope.hasSearch = false;
2122
scope.currentPage = 0;
2223
scope.avaliablesPages = [];

0 commit comments

Comments
 (0)