Skip to content

Commit 74892e4

Browse files
committed
wip: Provide ready-made configuration snippets to help set up the app's configuration file #1140
1 parent 586bcec commit 74892e4

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

core/client/i18n/core_en.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DELETE": "Delete",
1313
"RESET": "Reset",
1414
"CLOSE": "Close",
15-
"SEARCH": "Search",
15+
"SEARCH": "Search...",
1616
"DONE": "Done",
1717
"APPLY": "Apply",
1818
"RETRY": "Retry",
@@ -690,7 +690,7 @@
690690
"SERIES_EXPORT_FILE": "Series.csv"
691691
},
692692
"KFilter": {
693-
"SEARCH_LABEL": "Search"
693+
"SEARCH_LABEL": "@:SEARCH"
694694
},
695695
"KTextArea": {
696696
"COLLAPSE": "Collapse"

core/client/i18n/core_fr.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DELETE": "Supprimer",
1313
"RESET": "Réinitialiser",
1414
"CLOSE": "Fermer",
15-
"SEARCH": "Rechercher",
15+
"SEARCH": "Rechercher...",
1616
"DONE": "Ok",
1717
"APPLY": "Appliquer",
1818
"RETRY": "Réessayer",
@@ -687,7 +687,7 @@
687687
"SERIES_EXPORT_FILE": "Series.csv"
688688
},
689689
"KFilter": {
690-
"SEARCH_LABEL": "Rechercher"
690+
"SEARCH_LABEL": "@:SEARCH"
691691
},
692692
"KTextArea": {
693693
"COLLAPSE": "Réduire"

extras/configs/helpers.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ module.exports = {
6767
component: 'action/KToggleStickyVisibility'
6868
}
6969
},
70-
visible: (element, rule) => {
71-
return Object.assign(element, { visible: rule })
70+
assign: (object, patch) => {
71+
return Object.assign(object, patch)
72+
},
73+
visible: (object, rule) => {
74+
return module.exports.assign(object, { visible: rule })
7275
}
7376
}

extras/configs/panes.top.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
const helpers = require('./helpers.js')
22

33
module.exports = {
4+
searchText: (options) => {
5+
// fields: fields to search on
6+
const fields = options?.fields || ['name', 'description']
7+
return {
8+
component: 'collection/KFilter',
9+
label: options?.label,
10+
fields
11+
}
12+
},
413
locateUser: (options) => {
514
// renderer: renderer to be used to display the action
615
const renderer = options?.renderer || 'button'

map/client/i18n/map_en.json

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"CLOSE": "Close",
3-
"SEARCH": "Search",
42
"LAYERS_LABEL": "My data",
53
"VIEWS_LABEL": "My views",
64
"PROJECTS_LABEL": "My projects",

map/client/i18n/map_fr.json

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"CLOSE": "Fermer",
3-
"SEARCH": "Rechercher",
42
"LAYERS_LABEL": "Mes données",
53
"VIEWS_LABEL": "Mes vues",
64
"PROJECTS_LABEL": "Mes projets",

0 commit comments

Comments
 (0)