diff --git a/docs/api/methods/js_kanban_setconfig_method.md b/docs/api/methods/js_kanban_setconfig_method.md index cd89505..1fa7083 100644 --- a/docs/api/methods/js_kanban_setconfig_method.md +++ b/docs/api/methods/js_kanban_setconfig_method.md @@ -26,7 +26,7 @@ Using this method, you can configure the Kanban widget as well as load data to i ### Example -~~~jsx {10-18,20-23} +~~~jsx {10-20,22-23} // create Kanban const board = new kanban.Kanban("#root", { columns, @@ -36,18 +36,18 @@ const board = new kanban.Kanban("#root", { // create Toolbar const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); -// set new configuration parameters of Kanban +// specify new configuration parameters of Kanban board.setConfig({ - editorAutoSave: false, columnKey: "stage", rowKey: "type", cardShape, editorShape, - /*other parameters*/ -}); - -// update configuration parameters of Toolbar -toolbar.setConfig({ - api: board.api + editor: { + autoSave: false + }, + /* other parameters */ }); + +// specify new configuration parameters of Toolbar +toolbar.setConfig({ items: ["search", "spacer", "sort"] }); ~~~ diff --git a/docs/api/methods/js_kanban_setedit_method.md b/docs/api/methods/js_kanban_setedit_method.md index f1e0c18..0ce8a99 100644 --- a/docs/api/methods/js_kanban_setedit_method.md +++ b/docs/api/methods/js_kanban_setedit_method.md @@ -18,7 +18,7 @@ setEdit({ cardId: string | number } | null): void; ### Parameters -The method can take a *null* value or an object with the fallowing parameter: +The method can take a *null* value or an object with the following parameter: - `cardId` - (required) the ID of the card to be edited @@ -26,7 +26,6 @@ The method can take a *null* value or an object with the fallowing parameter: To close an editor, call the **setEdit()** method with the ***null*** value ::: - ### Example ~~~jsx {7} @@ -39,4 +38,4 @@ const board = new kanban.Kanban("#root", { board.setEdit({ cardId: 1 }); ~~~ -**Change log:** The method was added in v1.2 \ No newline at end of file +**Change log:** The method was added in v1.2 diff --git a/docs/api/methods/js_kanban_setlocale_method.md b/docs/api/methods/js_kanban_setlocale_method.md index 57765ad..159cc53 100644 --- a/docs/api/methods/js_kanban_setlocale_method.md +++ b/docs/api/methods/js_kanban_setlocale_method.md @@ -22,7 +22,7 @@ setLocale(null | locale?: object): void; - `locale` - (optional) the object of data of the new locale to be applied :::info -Using this method, you can apply a new locale to Kanban. To reset Kanban to the default locale, call the method without arguments (or with a *null* value) +Use the `setLocale()` method to apply a new locale to Kanban only. To reset Kanban to the default locale, call the `setLocale()` method without arguments (or with a *null* value). Use the [`toolbar.setLocale()`](api/methods/toolbar_setlocale_method.md) method to apply a new locale to Toolbar only. ::: ### Example @@ -39,6 +39,6 @@ board.setLocale(de); board.setLocale(); // or board.setLocale(null); ~~~ -**Chande log:** The method was updated in v1.2 +**Change log:** The method was updated in v1.2 **Related articles:** [Localization](guides/localization.md) diff --git a/docs/api/methods/toolbar_setlocale_method.md b/docs/api/methods/toolbar_setlocale_method.md index ae1a49e..c4013b8 100644 --- a/docs/api/methods/toolbar_setlocale_method.md +++ b/docs/api/methods/toolbar_setlocale_method.md @@ -13,16 +13,16 @@ description: You can learn about the setLocale method of Toolbar in the document ### Usage ~~~jsx {} -setLocale(locale?: object, api?: object): void; +setLocale(null | locale?: object): void; ~~~ ### Parameters -- `locale` - (optional) an object of the locale to be applied to the Toolbar of Kanban -- `api` - (optional) an object with the internal API of Kanban +- `null` - (optional) resets Toolbar to the default locale (*English*) +- `locale` - (optional) the object of new locale data to be applied to the Toolbar :::info -The **Toolbar** of Kanban is a separate component. Before changing its locale, be sure that you have already applied the [`setLocale()`](api/methods/toolbar_setlocale_method.md) method to the **Kanban** component +The **Toolbar** of Kanban is a separate component. Use the `toolbar.setLocale()` method to apply a new locale to Toolbar only. To reset Toolbar to the default locale, call the `toolbar.setLocale()` method without arguments (or with a *null* value). Use the [`kanban.setLocale()`](api/methods/js_kanban_setlocale_method.md) method to apply a new locale to Kanban only. ::: ### Example @@ -35,9 +35,9 @@ const toolbar = new kanban.Toolbar("#toolbar", { api: board.api }); // apply the "de" locale to Kanban board.setLocale(de); // apply the "de" locale to the Toolbar -toolbar.setLocale(de, board.api); +toolbar.setLocale(de); ~~~ -**Chande log:** The **api** parameter was added in v1.5.7 +**Change log:** The **api** parameter was deprecated in v1.6 **Related articles:** [Localization](guides/localization.md) diff --git a/docs/guides/localization.md b/docs/guides/localization.md index f00ed44..c529034 100644 --- a/docs/guides/localization.md +++ b/docs/guides/localization.md @@ -32,6 +32,7 @@ const en = { "Add new row": "Add new row", "Add new column": "Add new column", "Add new card": "Add new card", + "Add new card...": "Add new card...", "Edit card": "Edit card", Edit: "Edit", @@ -76,7 +77,7 @@ const en = { "Would you like to delete this comment?": "Would you like to delete this comment?", "Would you like to delete this card?": - "Would you like to delete this card?", + "Would you like to delete this card?" }, calendar: { // translations and settings of the calendar monthFull: [ diff --git a/docs/news/whats_new.md b/docs/news/whats_new.md index e1dc8b6..970344c 100644 --- a/docs/news/whats_new.md +++ b/docs/news/whats_new.md @@ -54,6 +54,9 @@ Released on November 13, 2024 - The method doesn't change themes (use the new [`setTheme()`](../../api/methods/js_kanban_settheme_method) method instead) - The method doesn't destroy Kanban datastore. You don't need to recreate event listeners and reattach Toolbar to Kanban + - The [`setLocale()`](../../api/methods/js_kanban_setlocale_method) method doesn't destroy Kanban datastore. You don't need to recreate event listeners and reattach Toolbar to Kanban + - The `api` parameter of the Toolbar [`setLocale()`](../../api/methods/toolbar_setlocale_method) method was deprecated + ### Fixes - A comment in progress of editing can be removed and text area for new comments disappears