From 83223938b2439e3034e8c0e0c0b834670cc955db Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 3 Jan 2015 11:25:08 +1100 Subject: [PATCH] Minor --- modules/backend/ServiceProvider.php | 2 +- modules/backend/lang/en/lang.php | 1 + modules/backend/widgets/table/README.md | 2 +- modules/backend/widgets/table/assets/js/table.js | 16 ++++++++-------- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/backend/ServiceProvider.php b/modules/backend/ServiceProvider.php index fd18a0d4d..6b1df8b3f 100644 --- a/modules/backend/ServiceProvider.php +++ b/modules/backend/ServiceProvider.php @@ -56,7 +56,7 @@ class ServiceProvider extends ModuleServiceProvider $manager->registerFormWidget('Backend\FormWidgets\DataGrid', [ 'label' => 'Data Grid', 'code' => 'datagrid' - ]); // @drepcated + ]); // @deprecated if year >= 2015 $manager->registerFormWidget('Backend\FormWidgets\DataTable', [ 'label' => 'Data Table', 'code' => 'datatable' diff --git a/modules/backend/lang/en/lang.php b/modules/backend/lang/en/lang.php index d7b6348e0..2917833d3 100644 --- a/modules/backend/lang/en/lang.php +++ b/modules/backend/lang/en/lang.php @@ -215,6 +215,7 @@ return [ '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_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.", 'mass_assignment_failed' => "Mass assignment failed for Model attribute ':attribute'.", ], diff --git a/modules/backend/widgets/table/README.md b/modules/backend/widgets/table/README.md index ec461406c..2a5b808d9 100644 --- a/modules/backend/widgets/table/README.md +++ b/modules/backend/widgets/table/README.md @@ -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`). - `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. -- `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**. - `deleting` - determines whether users can delete records. Default value is **true**. - `toolbar` - determines whether the toolbar is visible. The default value is **true**. diff --git a/modules/backend/widgets/table/assets/js/table.js b/modules/backend/widgets/table/assets/js/table.js index a6d8e95f8..f835a2d79 100644 --- a/modules/backend/widgets/table/assets/js/table.js +++ b/modules/backend/widgets/table/assets/js/table.js @@ -278,9 +278,9 @@ if (this.options.columns[i].width) header.setAttribute('style', 'width: '+this.options.columns[i].width) - header.textContent !== undefined ? - header.textContent = this.options.columns[i].title : - header.innerText = this.options.columns[i].title + header.textContent !== undefined + ? header.textContent = this.options.columns[i].title + : header.innerText = this.options.columns[i].title row.appendChild(header) } @@ -395,7 +395,7 @@ Table.prototype.scrollCellIntoView = function() { if (!this.options.height || !this.activeCell) return - + $(this.dataTableContainer.parentNode).data('oc.scrollbar').gotoElement(this.activeCell) } @@ -605,7 +605,7 @@ Table.prototype.getToolbar = function() { return this.tableContainer.querySelector('div.toolbar') - } + } // EVENT HANDLERS // ============================ @@ -675,13 +675,13 @@ cmd = target.getAttribute('data-cmd') switch (cmd) { - case 'record-add-below': + case 'record-add-below': this.addRecord('below') break - case 'record-add-above': + case 'record-add-above': this.addRecord('above') break - case 'record-delete': + case 'record-delete': this.deleteRecord() break }