From 5084daf698da7f074287f532d780871ed2c981a8 Mon Sep 17 00:00:00 2001 From: RYUcze <125459293+RYUcze@users.noreply.github.com> Date: Tue, 22 Aug 2023 09:45:32 +0200 Subject: [PATCH] Typo fixes in docs (#1088) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed typos in columns.md * Fixed typos in actions.md * Update data-source.md * Fixed typos in export.md * Fixed typos, missing/redundant words in filters.md * Update columns.md * Fixed typos group-action.md * Fixed typo inline-edit.md * Fixed missin comma localization.md * Fixed typos row.md * Add support for `nette/utils` version `4.0.0` (#1086) * Update .docs/export.md Co-authored-by: Radim Vaculík --------- Co-authored-by: Dominik Harmim Co-authored-by: Radim Vaculík --- .docs/actions.md | 40 ++++++++++----------- .docs/columns.md | 82 +++++++++++++++++++++---------------------- .docs/data-source.md | 12 +++---- .docs/export.md | 14 ++++---- .docs/filters.md | 50 +++++++++++++------------- .docs/group-action.md | 24 ++++++------- .docs/inline-edit.md | 14 ++++---- .docs/localization.md | 2 +- .docs/row.md | 18 +++++----- 9 files changed, 128 insertions(+), 128 deletions(-) diff --git a/.docs/actions.md b/.docs/actions.md index 13be7fa38..241bc17f0 100644 --- a/.docs/actions.md +++ b/.docs/actions.md @@ -1,24 +1,24 @@ Table of contents - [Actions](#actions) - - [Api](#api) - - [Parameters](#parameters) - - [Icon](#icon) - - [Class](#class) - - [Title](#title) - - [Confirmation](#confirmation) - - [Ajax](#ajax) - - [Redrawing the data](#redrawing-the-data) - - [Redrawing one row](#redrawing-one-row) - - [Sortable](#sortable) - - [Sorting handler](#sorting-handler) - - [MultiAction](#multiaction) - - [Item detail](#item-detail) - - [Item detail form](#item-detail-form) - - [Item detail template variables](#item-detail-template-variables) - - [Item detail render condition](#item-detail-render-condition) - - [ActionCallback](#actioncallback) - - [Toolbar button](#toolbar-button) + - [Api](#api) + - [Parameters](#parameters) + - [Icon](#icon) + - [Class](#class) + - [Title](#title) + - [Confirmation](#confirmation) + - [Ajax](#ajax) + - [Redrawing the data](#redrawing-the-data) + - [Redrawing one row](#redrawing-one-row) + - [Sortable](#sortable) + - [Sorting handler](#sorting-handler) + - [MultiAction](#multiaction) + - [Item detail](#item-detail) + - [Item detail form](#item-detail-form) + - [Item detail template variables](#item-detail-template-variables) + - [Item detail render condition](#item-detail-render-condition) + - [ActionCallback](#actioncallback) + - [Toolbar button](#toolbar-button) # Actions @@ -242,7 +242,7 @@ The name of the handler used for sorting can be changed: $grid->setSortableHandler('foo!'); ``` -Also when you are using datagrid in component, you have to alter the name a bit: +Also, when you are using datagrid in component, you have to alter the name a bit: ```php $grid->setSortableHandler('myComponent:sort!'); @@ -261,7 +261,7 @@ $grid->addMultiAction('multi_action', 'MultiAction') ->addAction('blah2', 'Blahblah2', 'blah!', ['name']); ``` -Sure you can alter multiaction class, icons, etc. Same you can change icon, class, etc of nested actions: +Sure you can alter multiaction class, icons, etc. Same you can change icon, class, etc. of nested actions: ```php $grid->getAction('multi_blah') diff --git a/.docs/columns.md b/.docs/columns.md index 3b2bbe1ee..fe40b157d 100644 --- a/.docs/columns.md +++ b/.docs/columns.md @@ -1,35 +1,35 @@ Table of contents - [Columns](#columns) - - [Api](#api) - - [Parameters](#parameters) - - [Templates](#templates) - - [Renderers](#renderers) - - [Replacement](#replacement) - - [Escaping values](#escaping-values) - - [Sorting](#sorting) - - [Resetting pagination after sorting](#resetting-pagination-after-sorting) - - [Default sort](#default-sort) - - [Resetting default sort](#resetting-default-sort) - - [Multiple columns sort](#multiple-columns-sort) - - [Default per page](#default-per-page) - - [Custom sorting Callback](#custom-sorting-callback) - - [Align](#align) - - [Removing column](#removing-column) - - [Column Text](#column-text) - - [Column Number](#column-number) - - [Column DateTime](#column-datetime) - - [Column Link](#column-link) - - [Open in new tab](#open-in-new-tab) - - [Column Status](#column-status) - - [Hideable columns](#hideable-columns) - - [Default hide](#default-hide) - - [Columns Summary](#columns-summary) - - [Aggregation Function](#aggregation-function) - - [Single column](#single-column) - - [Multiple columns](#multiple-columns) - - [Column \(th>, td>\) attributes](#column-th-td-attributes) - - [Column callback](#column-callback) + - [Api](#api) + - [Parameters](#parameters) + - [Templates](#templates) + - [Renderers](#renderers) + - [Replacement](#replacement) + - [Escaping values](#escaping-values) + - [Sorting](#sorting) + - [Resetting pagination after sorting](#resetting-pagination-after-sorting) + - [Default sort](#default-sort) + - [Resetting default sort](#resetting-default-sort) + - [Multiple columns sort](#multiple-columns-sort) + - [Default per page](#default-per-page) + - [Custom sorting Callback](#custom-sorting-callback) + - [Align](#align) + - [Removing column](#removing-column) + - [Column Text](#column-text) + - [Column Number](#column-number) + - [Column DateTime](#column-datetime) + - [Column Link](#column-link) + - [Open in new tab](#open-in-new-tab) + - [Column Status](#column-status) + - [Hideable columns](#hideable-columns) + - [Default hide](#default-hide) + - [Columns Summary](#columns-summary) + - [Aggregation Function](#aggregation-function) + - [Single column](#single-column) + - [Multiple columns](#multiple-columns) + - [Column \(th>, td>\) attributes](#column-th-td-attributes) + - [Column callback](#column-callback) # Columns @@ -39,7 +39,7 @@ There are several column classes and they all have some common behaviour and pro ### Parameters -Lets add a simple text column like we've done before: +Let's add a simple text column like we've done before: ```php $grid->addColumnText('name', 'Name'); @@ -55,7 +55,7 @@ $grid->addColumnText('name3', 'Name', 'name'); ### Templates -Column may have it's own template. I will add one more parameter (optional) to the method `::setTemplate()`, just for fun: +Columns may have it's own template. I will add one more parameter (optional) to the method `::setTemplate()`, just for fun: ```php $grid->addColumnText('name', 'Name') @@ -76,7 +76,7 @@ $grid->addColumnText('name', 'Name') }); ``` -But hey, what if i want to replace **just some** rows? No problem, the second optional argument tells me (callback again) whether the datagrid should use your renderer or not. Example: +But hey, what if I want to replace **just some** rows? No problem, the second optional argument tells me (callback again) whether the datagrid should use your renderer or not. Example: ```php $grid->addColumnText('name', 'Name') @@ -117,7 +117,7 @@ $grid->addColumnText('name', 'Name') ->setSortable(); ``` -When using doctrine as data source, you can output data the object way using dot-notaion and property accessor. But when you are using collumn of related table for sorting, you probably want to use alias for sorting: +When using doctrine as data source, you can output data the object way using dot-notation and property accessor. But when you are using column of related table for sorting, you probably want to use alias for sorting: ```php $grid->addColumnText('role', 'User role', 'role.name') @@ -150,7 +150,7 @@ $grid->setDefaultSort(['id' => 'DESC'], FALSE); ### Multiple columns sort -Sorting by multiple columns is disabled by default. But can be enaled: +Sorting by multiple columns is disabled by default. But can be enabled: ```php $grid->setMultiSortEnabled($enabled = TRUE); // Pass FALSE to disable @@ -266,7 +266,7 @@ $grid->addColumnLink('name', 'Name', 'edit') ![Status 1](https://github.com/contributte/datagrid/blob/master/.docs/assets/status1.gif?raw=true) ![Status 1](https://github.com/contributte/datagrid/blob/master/.docs/assets/status2.gif?raw=true) -Once your item keep some "status" flag, it is appropriate to show user the status in highlighted form. Also there could be a dropdown with available statuses: +Once your item keep some "status" flag, it is appropriate to show user the status in highlighted form. Also, there could be a dropdown with available statuses: ```php $grid->addColumnStatus('status', 'Status') @@ -347,7 +347,7 @@ $grid->getColumn('status')->getOption(2) ![Columns Hiding](https://github.com/contributte/datagrid/blob/master/.docs/assets/hideable_columns.gif?raw=true) -In example datargid above, you can hide columns and then reveal them again. This feature is disabled by default. You can enable it like this: +In example datagrid above, you can hide columns and then reveal them again. This feature is disabled by default. You can enable it like this: ```php $grid->setColumnsHideable(); @@ -370,7 +370,7 @@ If default hide is used, new button is shown in that settings (gear) dropdown - ## Columns Summary -Datagrid implements a feature that allows you to display **sum** of column of displayed items at the bootom of the grid. Try it out: +Datagrid implements a feature that allows you to display **sum** of column of displayed items at the bottom of the grid. Try it out: ```php $grid->addColumnNumber('in', 'Income') @@ -426,7 +426,7 @@ As mentioned above, there is one aggregation function prepared: `Contributte\Dat ### Multiple columns -In case you want to make the aggreagation directly using SQL by your domain, you will probably use interface `IMultipleAggregationFunction` (instead of `ISingleColumnAggregationFunction`): +In case you want to make the aggregation directly using SQL by your domain, you will probably use interface `IMultipleAggregationFunction` (instead of `ISingleColumnAggregationFunction`): ```php $grid->setMultipleAggregationFunction( @@ -476,7 +476,7 @@ $grid->setMultipleAggregationFunction( ); ``` -This aggregatin is used along with `Dibi` in the demo. +This aggregating is used along with `Dibi` in the demo. ## Column (th>, td>) attributes @@ -499,7 +499,7 @@ $grid->addColumnText('name', 'Name') ## Column callback -When you need to modify columns just before rendering (meybe remove some status options or completely change renderer for partucular items), you can create column callback, that will be called with `$column` and `$item` in parameter: +When you need to modify columns just before rendering (maybe remove some status options or completely change renderer for particular items), you can create column callback, that will be called with `$column` and `$item` in parameter: ```php $grid->addColumnLink('link', 'Link', 'this#demo', 'name', ['id', 'surname' => 'name']); @@ -531,7 +531,7 @@ $grid->addColumnCallback('link', function($column, $item) { }); ``` -That is the code of the demove shown above. As you can see, item with id == 1 does have a empty link column and only 2 options in `ColumnStatus`. +That is the code of the demo shown above. As you can see, item with id == 1 does have an empty link column and only 2 options in `ColumnStatus`. ```php diff --git a/.docs/data-source.md b/.docs/data-source.md index 83f18db69..7887299b1 100644 --- a/.docs/data-source.md +++ b/.docs/data-source.md @@ -1,10 +1,10 @@ Table of contents - [Data sources](#data-sources) - - [ORM Relations](#orm-relations) - - [ApiDataSource](#apidatasource) - - [NextrasDataSource](#nextrasdatasource) - - [NetteDatabaseTableDataSource](#nettedatabasetabledatasource) + - [ORM Relations](#orm-relations) + - [ApiDataSource](#apidatasource) + - [NextrasDataSource](#nextrasdatasource) + - [NetteDatabaseTableDataSource](#nettedatabasetabledatasource) # Data sources @@ -44,7 +44,7 @@ Once you have set a data source, you can add columns to the datagrid. ## ORM Relations -When you are using for example Doctrine as a data source, you can easily access another related entites for rendering in column. Let's say you have an entity `User` and each instance can have a property `$name` and `$grandma`. `$grandma` is also an instance of `User` class. Displaying people and their grandmas is very simple then - just use this dot notation: +When you are using for example Doctrine as a data source, you can easily access another related entities for rendering in column. Let's say you have an entity `User` and each instance can have a property `$name` and `$grandma`. `$grandma` is also an instance of `User` class. Displaying people and their grandmas is very simple then - just use this dot notation: ```php $grid->addColumnText('name', 'Name', 'name'); @@ -67,7 +67,7 @@ The idea is simply to forward filtering/sorting/limit/... to remote api. Feel fr ## NextrasDataSource -There is one specific behaviour when using Netras ORM. When custom filter conditions are used, user has to work not with given `Collection` instance, but with `Collection::getQueryBuilder()`. That snippet of code will not work correctly, because `DbalCollection` calls clone on each of it's methods: +There is one specific behaviour when using Nextras ORM. When custom filter conditions are used, user has to work not with given `Collection` instance, but with `Collection::getQueryBuilder()`. That snippet of code will not work correctly, because `DbalCollection` calls clone on each of it's methods: ```php $grid->getFilter('name') diff --git a/.docs/export.md b/.docs/export.md index db2c05587..ccdc97226 100644 --- a/.docs/export.md +++ b/.docs/export.md @@ -1,11 +1,11 @@ Table of contents - [Exports](#exports) - - [ExportCallback](#exportcallback) - - [CSV export](#csv-export) - - [\(Not\) Using templates in CSV export](#not-using-templates-in-csv-export) - - [Export columns](#export-columns) - - [Export encoding, delimiter](#export-encoding-delimiter) + - [ExportCallback](#exportcallback) + - [CSV export](#csv-export) + - [\(Not\) Using templates in CSV export](#not-using-templates-in-csv-export) + - [Export columns](#export-columns) + - [Export encoding, delimiter](#export-encoding-delimiter) # Exports @@ -38,11 +38,11 @@ $grid->addExportCsv('Csv export (filtered)', 'examples.csv') ### (Not) Using templates in CSV export -ExportCsv ignores column template, because i don't like the idea Latte (tempalting engine for HTML) exporting data for CSV format. Using custom renderer sounds better to me in that case. +ExportCsv ignores column template, because i don't like the idea Latte (templating engine for HTML) exporting data for CSV format. Using custom renderer sounds better to me in that case. ## Export columns -When you exporting the data, you can have different columns in export and in the datagrid. Or differently rendered. So there is another method `Contributte\Datagrid\Export\Export::setColumns()`. You can create instances of another columns and pass them in array to this method. These will be rendered in export: +When you're exporting the data, you can have different columns in export and in the datagrid. Or differently rendered. So there is another method `Contributte\Datagrid\Export\Export::setColumns()`. You can create instances of another columns and pass them in array to this method. These will be rendered in export: ```php $column_name = new Contributte\Datagrid\Column\ColumnText($grid, 'name', 'name', 'Name'); diff --git a/.docs/filters.md b/.docs/filters.md index 14ff02c06..c14061ffb 100644 --- a/.docs/filters.md +++ b/.docs/filters.md @@ -1,27 +1,27 @@ Table of contents - [Filters](#filters) - - [Api](#api) - - [Placeholder](#placeholder) - - [Custom where condition](#custom-where-condition) - - [Templates:](#templates) - - [Filter blocks](#filter-blocks) - - [Filter type blocks](#filter-type-blocks) - - [Removing filter](#removing-filter) - - [FilterText](#filtertext) - - [FilterSelect](#filterselect) - - [FilterMultiSelect](#filtermultiselect) - - [FilterDate](#filterdate) - - [FilterRange](#filterrange) - - [FilterDateRange](#filterdaterange) - - [Default filter values](#default-filter-values) - - [Resetting filter to default values](#resetting-filter-to-default-values) - - [Filters rendering](#filters-rendering) - - [Outer filters rendering](#outer-filters-rendering) - - [Session - remeber state](#session---remeber-state) - - [Session - filters / filter values changed](#session---filters--filter-values-changed) - - [URL refreshing - history API](#url-refreshing---history-api) - - [Auto submit](#auto-submit) + - [Api](#api) + - [Placeholder](#placeholder) + - [Custom where condition](#custom-where-condition) + - [Templates:](#templates) + - [Filter blocks](#filter-blocks) + - [Filter type blocks](#filter-type-blocks) + - [Removing filter](#removing-filter) + - [FilterText](#filtertext) + - [FilterSelect](#filterselect) + - [FilterMultiSelect](#filtermultiselect) + - [FilterDate](#filterdate) + - [FilterRange](#filterrange) + - [FilterDateRange](#filterdaterange) + - [Default filter values](#default-filter-values) + - [Resetting filter to default values](#resetting-filter-to-default-values) + - [Filters rendering](#filters-rendering) + - [Outer filters rendering](#outer-filters-rendering) + - [Session - remeber state](#session---remeber-state) + - [Session - filters / filter values changed](#session---filters--filter-values-changed) + - [URL refreshing - history API](#url-refreshing---history-api) + - [Auto submit](#auto-submit) # Filters @@ -218,7 +218,7 @@ $grid->addFilterDateRange('date_created', 'User registered:'); ## Default filter values -Datagrid filters can have contain default filter values. Once user changes the filter, default values are not longer applied to the filter. Example usage: +Datagrid filters can have default filter values. Once user changes the filter, default values are no longer applied to the filter. Example usage: ```php $grid->setDefaultFilter(['status' => 1, 'name' => 'Joe']); @@ -270,13 +270,13 @@ $grid->setOuterFilterRendering(); // - that is true. Or $grid->setOuterFilterRen ## Session - remeber state -Grid refreshes its state on several levels. One could be session. It is by defaut turned on, but can be disabled: +Grid refreshes its state on several levels. One could be session. It is by default turned on, but can be disabled: ```php $grid->setRememberState(false); // Or turned on again: $grid->setRememberState(true); ``` -If you want to keep hideable columns in session even when rememebr state is turned off, use second argument: +If you want to keep hideable columns in session even when remember state is turned off, use second argument: ```php $grid->setRememberState(false, true); @@ -284,7 +284,7 @@ $grid->setRememberState(false, true); ## Session - filters / filter values changed -When you set some filters and user do some filtering, values are stored in session. After that, when filters are changed (maybe some select options are removed, etc), datagrid would throw an exception, because it can not find particular filters / filter values that are still stored in session. You can supress those exception: +When you set some filters and user do some filtering, values are stored in session. After that, when filters are changed (maybe some select options are removed, etc.), datagrid would throw an exception, because it can not find particular filters / filter values that are still stored in session. You can suppress those exception: ```php $grid->setStrictSessionFilterValues(false); diff --git a/.docs/group-action.md b/.docs/group-action.md index 7cb599770..ff26feb7b 100644 --- a/.docs/group-action.md +++ b/.docs/group-action.md @@ -1,14 +1,14 @@ Table of contents - [Group action](#group-action) - - [Api](#api) - - [Zero level](#zero-level) - - [One level](#one-level) - - [Two level](#two-level) - - [Text input](#text-input) - - [Textarea](#textarea) - - [Attributes, classes](#attributes-classes) - - [Happy inputs](#happy-inputs) + - [Api](#api) + - [Zero level](#zero-level) + - [One level](#one-level) + - [Two level](#two-level) + - [Text input](#text-input) + - [Textarea](#textarea) + - [Attributes, classes](#attributes-classes) + - [Happy inputs](#happy-inputs) # Group action @@ -32,10 +32,10 @@ $grid->addGroupButtonAction('Say hello')->onClick[] = [$this, 'sayHello']; ```php $grid->addGroupAction('Delete examples')->onSelect[] = [$this, 'deleteExamples']; -$grid->addGroupAction('Something alse')->onSelect[] = [$this, 'doSomethingElse']; +$grid->addGroupAction('Something else')->onSelect[] = [$this, 'doSomethingElse']; ``` -This will create one select box (['Delete examples', 'Something alse']) and submit button. If you submit that form, your handler will be called. It will be called via ajax. +This will create one select box (['Delete examples', 'Something else']) and submit button. If you submit that form, your handler will be called. It will be called via ajax. This is how your handler can look like: @@ -64,7 +64,7 @@ $grid->addGroupAction('Change order status', [ 2 => 'Ready', 3 => 'Processing', 4 => 'Sent', - 5 => 'Storno' + 5 => 'Canceled' ])->onSelect[] = [$this, 'groupChangeStatus']; $grid->addGroupAction('Send', [ @@ -97,7 +97,7 @@ public function groupChangeStatus(array $ids, $status): void ### Text input -Group action can also containe a text input instad of select (As show in example above - option called "**Add note**"). Example code: +Group action can also contain a text input instead of select (As show in example above - option called "**Add note**"). Example code: ```php $grid->addGroupTextAction('Add note') diff --git a/.docs/inline-edit.md b/.docs/inline-edit.md index 5d20c0ea9..7b384559a 100644 --- a/.docs/inline-edit.md +++ b/.docs/inline-edit.md @@ -1,12 +1,12 @@ Table of contents - [Inline editing](#inline-editing) - - [Small inline editing](#small-inline-editing) - - [Different input types and element attributes](#different-input-types-and-element-attributes) - - [Render different content then is edited](#render-different-content-then-is-edited) - - [Big inline editing](#big-inline-editing) - - [What happens after editing](#what-happens-after-editing) - - [Show non editing Columns](#show-non-editing-columns) + - [Small inline editing](#small-inline-editing) + - [Different input types and element attributes](#different-input-types-and-element-attributes) + - [Render different content then is edited](#render-different-content-then-is-edited) + - [Big inline editing](#big-inline-editing) + - [What happens after editing](#what-happens-after-editing) + - [Show non editing Columns](#show-non-editing-columns) # Inline editting @@ -118,7 +118,7 @@ $grid->getInlineEdit()->onSubmit[] = function($id, Nette\Utils\ArrayHash $values ### What happens after editing -By default, after submitting inline edit, the row is redrawed and the green animated background is triggered. Bud if you want to do something else, you can, just create new listener to event `InlineEdit::onCustomRedraw()`: +By default, after submitting inline edit, the row is redrawn and the green animated background is triggered. Bud if you want to do something else, you can, just create new listener to event `InlineEdit::onCustomRedraw()`: ```php /** diff --git a/.docs/localization.md b/.docs/localization.md index fa9939f6f..e6f7ecaf5 100644 --- a/.docs/localization.md +++ b/.docs/localization.md @@ -5,7 +5,7 @@ Table of contents # Localization -As you can see in the example below, a `SimpleTranslator` class comes with datagrid (the example was translated to czech). You can use it as shown (you will do that probably in some factory for all datagrids in your application). Of course you can use your own translator - it just has to implement `Nette\Localization\Translator`. +As you can see in the example below, a `SimpleTranslator` class comes with datagrid (the example was translated to czech). You can use it as shown (you will do that probably in some factory for all datagrids in your application). Of course, you can use your own translator - it just has to implement `Nette\Localization\Translator`. ```php public function createComponentLocalizationGrid($name): Contributte\Datagrid\Datagrid diff --git a/.docs/row.md b/.docs/row.md index 88a27db21..21393e574 100644 --- a/.docs/row.md +++ b/.docs/row.md @@ -1,12 +1,12 @@ Table of contents - [Row](#row) - - [Row conditions](#row-conditions) - - [Allow Group Action](#allow-group-action) - - [Allow Inline Edit](#allow-inline-edit) - - [Allow Actions](#allow-actions) - - [Allow Action of MultiAction](#allow-action-of-multiaction) - - [Row callback](#row-callback) + - [Row conditions](#row-conditions) + - [Allow Group Action](#allow-group-action) + - [Allow Inline Edit](#allow-inline-edit) + - [Allow Actions](#allow-actions) + - [Allow Action of MultiAction](#allow-action-of-multiaction) + - [Row callback](#row-callback) # Row @@ -14,7 +14,7 @@ Table of contents ### Allow Group Action -Now all rows have to provide group action or editing. Or some other of your actions. You can forbid group acitons rendering for some items like this: +Now all rows have to provide group action or editing. Or some other of your actions. You can forbid group actions rendering for some items like this: ```php $grid->allowRowsGroupAction(function(Row $item): bool { @@ -24,7 +24,7 @@ $grid->allowRowsGroupAction(function(Row $item): bool { ### Allow Inline Edit -Also inline editing cound be disabled for some rows: +Also, inline editing can be disabled for some rows: ```php $grid->allowRowsInlineEdit(function(Row $item): bool { @@ -34,7 +34,7 @@ $grid->allowRowsInlineEdit(function(Row $item): bool { ### Allow Actions -It works simalary when you want to allow actions for just some of your items: +It works similarly, when you want to allow actions for just some of your items: ```php $grid->allowRowsAction('delete', function(Row $item): bool {