Minor
This commit is contained in:
parent
a6259ff915
commit
83223938b2
|
|
@ -56,7 +56,7 @@ class ServiceProvider extends ModuleServiceProvider
|
||||||
$manager->registerFormWidget('Backend\FormWidgets\DataGrid', [
|
$manager->registerFormWidget('Backend\FormWidgets\DataGrid', [
|
||||||
'label' => 'Data Grid',
|
'label' => 'Data Grid',
|
||||||
'code' => 'datagrid'
|
'code' => 'datagrid'
|
||||||
]); // @drepcated
|
]); // @deprecated if year >= 2015
|
||||||
$manager->registerFormWidget('Backend\FormWidgets\DataTable', [
|
$manager->registerFormWidget('Backend\FormWidgets\DataTable', [
|
||||||
'label' => 'Data Table',
|
'label' => 'Data Table',
|
||||||
'code' => 'datatable'
|
'code' => 'datatable'
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,7 @@ return [
|
||||||
'not_found' => "Model ':class' with an ID of :id could not be found",
|
'not_found' => "Model ':class' with an ID of :id could not be found",
|
||||||
'missing_id' => "There is no ID specified for looking up the model record.",
|
'missing_id' => "There is no ID specified for looking up the model record.",
|
||||||
'missing_relation' => "Model ':class' does not contain a definition for ':relation'.",
|
'missing_relation' => "Model ':class' does not contain a definition for ':relation'.",
|
||||||
|
'missing_method' => "Model ':class' does not contain a method ':method'.",
|
||||||
'invalid_class' => "Model :model used in :class is not valid, it must inherit the \Model class.",
|
'invalid_class' => "Model :model used in :class is not valid, it must inherit the \Model class.",
|
||||||
'mass_assignment_failed' => "Mass assignment failed for Model attribute ':attribute'.",
|
'mass_assignment_failed' => "Mass assignment failed for Model attribute ':attribute'.",
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ The options below are listed in the JavaScript notation. Corresponding data attr
|
||||||
- `rowSorting` - enables the drag & drop row sorting. The sorting cannot be used with the pagination (`recordsPerPage` is not `null` or `false`).
|
- `rowSorting` - enables the drag & drop row sorting. The sorting cannot be used with the pagination (`recordsPerPage` is not `null` or `false`).
|
||||||
- `keyColumn` - specifies the name of the key column. The default value is **id**.
|
- `keyColumn` - specifies the name of the key column. The default value is **id**.
|
||||||
- `postback` - post the client-memory data source data to the server automatically when the parent form gets submitted. The default value is `true`. The option is used only with client-memory data sources. When enabled, the data source data is available in the widget's server-side data source: `$table->getDataSource()->getRecords();` The data postback occurs only of the request handler name matches the `handler` option value.
|
- `postback` - post the client-memory data source data to the server automatically when the parent form gets submitted. The default value is `true`. The option is used only with client-memory data sources. When enabled, the data source data is available in the widget's server-side data source: `$table->getDataSource()->getRecords();` The data postback occurs only of the request handler name matches the `handler` option value.
|
||||||
- `handler` - AJAX data handler name for the automatic data postback. The data will be posted only when the AJAX requests posts data to this handler. The default value is **onSave**.
|
- `handler` - AJAX data handler name for the automatic data postback. The data will be posted only when the AJAX request posts data matching this handler name. The default value is **onSave**.
|
||||||
- `adding` - determines whether users can add new records. Default value is **true**.
|
- `adding` - determines whether users can add new records. Default value is **true**.
|
||||||
- `deleting` - determines whether users can delete records. Default value is **true**.
|
- `deleting` - determines whether users can delete records. Default value is **true**.
|
||||||
- `toolbar` - determines whether the toolbar is visible. The default value is **true**.
|
- `toolbar` - determines whether the toolbar is visible. The default value is **true**.
|
||||||
|
|
|
||||||
|
|
@ -278,9 +278,9 @@
|
||||||
if (this.options.columns[i].width)
|
if (this.options.columns[i].width)
|
||||||
header.setAttribute('style', 'width: '+this.options.columns[i].width)
|
header.setAttribute('style', 'width: '+this.options.columns[i].width)
|
||||||
|
|
||||||
header.textContent !== undefined ?
|
header.textContent !== undefined
|
||||||
header.textContent = this.options.columns[i].title :
|
? header.textContent = this.options.columns[i].title
|
||||||
header.innerText = this.options.columns[i].title
|
: header.innerText = this.options.columns[i].title
|
||||||
|
|
||||||
row.appendChild(header)
|
row.appendChild(header)
|
||||||
}
|
}
|
||||||
|
|
@ -395,7 +395,7 @@
|
||||||
Table.prototype.scrollCellIntoView = function() {
|
Table.prototype.scrollCellIntoView = function() {
|
||||||
if (!this.options.height || !this.activeCell)
|
if (!this.options.height || !this.activeCell)
|
||||||
return
|
return
|
||||||
|
|
||||||
$(this.dataTableContainer.parentNode).data('oc.scrollbar').gotoElement(this.activeCell)
|
$(this.dataTableContainer.parentNode).data('oc.scrollbar').gotoElement(this.activeCell)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -605,7 +605,7 @@
|
||||||
|
|
||||||
Table.prototype.getToolbar = function() {
|
Table.prototype.getToolbar = function() {
|
||||||
return this.tableContainer.querySelector('div.toolbar')
|
return this.tableContainer.querySelector('div.toolbar')
|
||||||
}
|
}
|
||||||
|
|
||||||
// EVENT HANDLERS
|
// EVENT HANDLERS
|
||||||
// ============================
|
// ============================
|
||||||
|
|
@ -675,13 +675,13 @@
|
||||||
cmd = target.getAttribute('data-cmd')
|
cmd = target.getAttribute('data-cmd')
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case 'record-add-below':
|
case 'record-add-below':
|
||||||
this.addRecord('below')
|
this.addRecord('below')
|
||||||
break
|
break
|
||||||
case 'record-add-above':
|
case 'record-add-above':
|
||||||
this.addRecord('above')
|
this.addRecord('above')
|
||||||
break
|
break
|
||||||
case 'record-delete':
|
case 'record-delete':
|
||||||
this.deleteRecord()
|
this.deleteRecord()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue