Skip to content

Commit 697ba0e

Browse files
committed
add callback for class
1 parent 4fb4f71 commit 697ba0e

File tree

8 files changed

+212
-194
lines changed

8 files changed

+212
-194
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $scope.config =
4747
"collumns": [{ // required
4848
"title": "ID", // title of collumn
4949
"index": "id", // Property that will print in the column
50-
"class": "text-center", // optional, class od <th> and <td>
50+
"class": "text-center" || function(row){}, // optional, class od <th> and <td> is Possible used calback function(row)
5151
"style": { // optional
5252
"width": "60px" // It is possible to define some properties in html
5353
}

demo/demo.controller.js

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ app.controller('demoController', function($scope, $http) {
1111
search: {
1212
label: 'filter in: ',
1313
},
14-
pagination: { // optional
15-
labelSize: 'Registros por página: ', // optional, default "Page size: ""
16-
defaultSize: 10, // optional, default first item in avaliableSizes
17-
avaliableSizes: [10, 25, 50, 100, 500, 2000] // optional, default [10,25,50,100]
18-
// positionBottom: true // optional, default is position top
19-
},
14+
// pagination: { // optional
15+
// labelSize: 'Registros por página: ', // optional, default "Page size: ""
16+
// defaultSize: 10, // optional, default first item in avaliableSizes
17+
// avaliableSizes: [10, 25, 50, 100, 500, 2000] // optional, default [10,25,50,100]
18+
// // positionBottom: true // optional, default is position top
19+
// },
2020

2121
popoverRow: { // optional
2222
titleRender: function (row){ // optional, callback(currentRow) for render title in popover
@@ -29,26 +29,28 @@ app.controller('demoController', function($scope, $http) {
2929
}
3030
},
3131

32-
collumns: [{
33-
title: '',
34-
index: 'enable',
35-
class: 'text-center',
36-
sort: false,
37-
action: {
38-
type: 'checkbox',
39-
class: 'checkboxClass',
40-
checkInHeader: true,
41-
isDisabled: function(row){
42-
return row.id == 1;
43-
},
44-
onCheckHeader: function(checked) {
45-
console.log('checked: ' + checked);
46-
},
47-
onCheck: function(obj, checked) {
48-
console.log('checked: ' + checked + ', obj:' + obj.id);
49-
}
50-
}
51-
}, {
32+
collumns: [
33+
// {
34+
// title: '',
35+
// index: 'enable',
36+
// class: 'text-center',
37+
// sort: false,
38+
// action: {
39+
// type: 'checkbox',
40+
// class: 'checkboxClass',
41+
// checkInHeader: true,
42+
// isDisabled: function(row){
43+
// return row.id == 1;
44+
// },
45+
// onCheckHeader: function(checked) {
46+
// console.log('checked: ' + checked);
47+
// },
48+
// onCheck: function(obj, checked) {
49+
// console.log('checked: ' + checked + ', obj:' + obj.id);
50+
// }
51+
// }
52+
// },
53+
{
5254
title: 'ID',
5355
index: 'id',
5456
class: 'text-center'

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-06T11:36:46.924Z
4+
* Version: 1.0.68 - 2018-02-15T19:19:11.961Z
55
* License: MIT
66
*/
77

0 commit comments

Comments
 (0)