@@ -45,11 +45,11 @@ To pass them as widget options:
45
45
'name',
46
46
'email'
47
47
],
48
- 'withColumnFilter' => true
48
+ 'withColumnFilter' => true,
49
49
]) ?>
50
50
```
51
51
52
- ## Specifies header label
52
+ ## Specifies header label and css class for cell
53
53
54
54
``` php
55
55
<?= \nullref\datatable\DataTable::widget([
@@ -58,6 +58,7 @@ To pass them as widget options:
58
58
[
59
59
'data' => 'active',
60
60
'title' => 'Is active',
61
+ 'sClass' => 'active-cell-css-class',
61
62
],
62
63
],
63
64
]) ?>
@@ -72,7 +73,7 @@ To pass them as widget options:
72
73
[
73
74
'class' => 'nullref\datatable\LinkColumn',
74
75
'url' => ['/model/delete'],
75
- 'options ' => ['data-confirm' => 'Are you sure you want to delete this item?', 'data-method' => 'post'],
76
+ 'linkOptions ' => ['data-confirm' => 'Are you sure you want to delete this item?', 'data-method' => 'post'],
76
77
'label' => 'Delete',
77
78
],
78
79
],
@@ -84,7 +85,7 @@ Properties of `LinkColumn`:
84
85
- ` label ` - text placed in ` a ` tag;
85
86
- ` title ` - header title of column;
86
87
- ` url ` - will be passed to ` Url::to() ` ;
87
- - ` options ` - HTML options of the ` a ` tag;
88
+ - ` linkOptions ` - HTML options of the ` a ` tag;
88
89
- ` queryParams ` - array of params added to ` url ` , ` ['id'] ` by default;
89
90
- ` render ` - custom render js function. E.g:
90
91
``` php
@@ -121,11 +122,11 @@ You ca add column filtering functionality by setting option `withColumnFilter` t
121
122
[
122
123
'data' => 'active',
123
124
'title' => \Yii::t('app', 'Is active'),
124
- 'filter' => [ 'true' => 'Yes', 'false' => 'No' ]
125
+ 'filter' => ['true' => 'Yes', 'false' => 'No'],
125
126
],
126
127
[
127
128
'data' => 'last_connection',
128
- 'filter' => false
129
+ 'filter' => false,
129
130
],
130
131
],
131
132
]) ?>
@@ -167,8 +168,8 @@ Cell rendering or filter can be customized using `\nullref\datatable\DataTableCo
167
168
``` php
168
169
'assetManager' => [
169
170
'bundles' => [
170
- 'nullref\datatable\DataTableAsset' => [
171
- 'styling' => \nullref\datatable\DataTableAsset::STYLING_BOOTSTRAP,
171
+ 'nullref\datatable\assets\ DataTableAsset' => [
172
+ 'styling' => \nullref\datatable\assets\ DataTableAsset::STYLING_BOOTSTRAP,
172
173
]
173
174
],
174
175
],
@@ -187,15 +188,15 @@ Bootstrap tables require the class 'table', so you'll need to add the 'table' cl
187
188
'columns' => [
188
189
'id',
189
190
'name',
190
- 'email'
191
+ 'email',
191
192
],
192
193
]) ?>
193
194
```
194
195
195
196
## Custom assets
196
- It's posible to use custom styles and scripts:
197
+ It's possible to use custom styles and scripts:
197
198
``` php
198
- 'nullref\datatable\DataTableAsset' => [
199
+ 'nullref\datatable\assets\ DataTableAsset' => [
199
200
'sourcePath' => '@webroot/js/plugin/datatables/',
200
201
'js' => [
201
202
'jquery.dataTables-1.10-cust.js',
0 commit comments