From a3d399f4f30a026fe9cff7d890abbb3203b2b553 Mon Sep 17 00:00:00 2001 From: kappu Date: Thu, 18 May 2017 16:11:00 +0200 Subject: [PATCH] Configured docs --- docma-config.json | 1 + .../searchservicesconfig/ServicesList.jsx | 5 ++++ web/client/plugins/SearchServicesConfig.jsx | 27 ++++++++++--------- .../searchservicesconfig/ToggleButton.jsx | 2 +- web/client/translations/data.de-DE | 3 ++- web/client/translations/data.en-US | 5 ++-- web/client/translations/data.fr-FR | 3 ++- web/client/translations/data.it-IT | 5 ++-- 8 files changed, 31 insertions(+), 20 deletions(-) diff --git a/docma-config.json b/docma-config.json index c23f92ea05..e869ac5f3d 100644 --- a/docma-config.json +++ b/docma-config.json @@ -162,6 +162,7 @@ "web/client/plugins/ScaleBox.jsx", "web/client/plugins/ScrollTop.jsx", "web/client/plugins/Search.jsx", + "web/client/plugins/SearchServicesConfig.jsx", "web/client/plugins/ZoomIn.jsx", "web/client/plugins/ZoomOut.jsx" ] diff --git a/web/client/components/mapcontrols/searchservicesconfig/ServicesList.jsx b/web/client/components/mapcontrols/searchservicesconfig/ServicesList.jsx index 740e6118d7..43a19feea7 100644 --- a/web/client/components/mapcontrols/searchservicesconfig/ServicesList.jsx +++ b/web/client/components/mapcontrols/searchservicesconfig/ServicesList.jsx @@ -33,6 +33,11 @@ const ServicesList = React.createClass({ }; }, getOptions() { + if (this.props.services.length === 0) { + return (
+ +
); + } return this.props.services.map((s, idx) => { return (
diff --git a/web/client/plugins/SearchServicesConfig.jsx b/web/client/plugins/SearchServicesConfig.jsx index 2c2b5d78a4..20c79fe734 100644 --- a/web/client/plugins/SearchServicesConfig.jsx +++ b/web/client/plugins/SearchServicesConfig.jsx @@ -27,17 +27,18 @@ const ResultsProps = require('../components/mapcontrols/searchservicesconfig/Res const WFSOptionalProps = require('../components/mapcontrols/searchservicesconfig/WFSOptionalProps.jsx'); /** - * Text Search Config Plugin. Allow to add and edit additional - * text serch service used by text search plugin. User has to - * save the map to persist service changes. - * @class SearchServicesConfigPanel - * @memberof plugins - * @static - * - * @prop {string} cfg.id identifier of the Plugin - * @prop {object} cfg.panelStyle inline style for the panel - * @prop {string} cfg.panelClassName className for the panel - */ + * Text Search Services Editor Plugin. Allow to add and edit additional + * text serch service used by text search plugin. User has to + * save the map to persist service changes. + * + * @class SearchServicesConfig + * @memberof plugins + * @static + * + * @prop {string} cfg.id identifier of the Plugin + * @prop {object} cfg.panelStyle inline style for the panel + * @prop {string} cfg.panelClassName className for the panel + */ const SearchServicesConfigPanel = React.createClass({ propTypes: { id: React.PropTypes.string, @@ -120,7 +121,7 @@ const SearchServicesConfigPanel = React.createClass({ - ); @@ -151,7 +152,7 @@ const SearchServicesConfigPanel = React.createClass({ {titleText} { this.isDirty() ? ( , className: "btn btn-sm btn-warning services-config-editor-confirm-close"}} onConfirm={this.onClose} bsStyle="primary" text={()}/>) : } + text: , className: "btn btn-sm btn-warning services-config-editor-confirm-close"}} onConfirm={this.onClose} bsStyle="primary" text={()}/>) : () }
diff --git a/web/client/plugins/searchservicesconfig/ToggleButton.jsx b/web/client/plugins/searchservicesconfig/ToggleButton.jsx index b52ed3bb46..835892efe5 100644 --- a/web/client/plugins/searchservicesconfig/ToggleButton.jsx +++ b/web/client/plugins/searchservicesconfig/ToggleButton.jsx @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017, GeoSolutions Sas. * All rights reserved. * diff --git a/web/client/translations/data.de-DE b/web/client/translations/data.de-DE index 65e6c08d8f..67df946450 100644 --- a/web/client/translations/data.de-DE +++ b/web/client/translations/data.de-DE @@ -290,7 +290,8 @@ "s_wfs_props_label" : "WFS-Service-Requisiten", "s_wfs_opt_props_label" : "Optionale Requisiten", "s_result_props_label": "Ergebnisanzeigeeigenschaften", - "s_priority_info": "Wird verwendet, um Suchergebnisse zu sortieren, höhere Werte zuerst. Nominatim Ergebnisse haben Priorität = 5" + "s_priority_info": "Wird verwendet, um Suchergebnisse zu sortieren, höhere Werte zuerst. Nominatim Ergebnisse haben Priorität = 5", + "serviceslistempty": "Keine benutzerdefinierten Services definiert" }, "drawLocal": { "draw": { diff --git a/web/client/translations/data.en-US b/web/client/translations/data.en-US index 16cf107b73..0168faf0bf 100644 --- a/web/client/translations/data.en-US +++ b/web/client/translations/data.en-US @@ -274,7 +274,7 @@ "addbtn": "Add", "nextbtn": "Next", "prevbtn": "Back", - "savebtn": "Update", + "savebtn": "Save/Update", "cancelbtn": "Cancel", "confirmremove": "Delete?", "cancelconfirm": "Are you sure?", @@ -290,7 +290,8 @@ "s_wfs_props_label" : "WFS service props", "s_wfs_opt_props_label" : "Optional props", "s_result_props_label": "Result display properties", - "s_priority_info": "Used to sort search results, higher values first. Nominatim results have priority = 5" + "s_priority_info": "Used to sort search results, higher values first. Nominatim results have priority = 5", + "serviceslistempty": "No custom services defined" }, "drawLocal": { "draw": { diff --git a/web/client/translations/data.fr-FR b/web/client/translations/data.fr-FR index 5a6ff54847..f90842be52 100644 --- a/web/client/translations/data.fr-FR +++ b/web/client/translations/data.fr-FR @@ -291,7 +291,8 @@ "s_wfs_props_label" : "WFS accessoires du service", "s_wfs_opt_props_label" : "Supports optionnels", "s_result_props_label": "Propriétés d'affichage des résultats", - "s_priority_info": "Utilisé pour trier les résultats de recherche, des valeurs plus élevées en premier. Les résultats Nominatim ont priorité = 5" + "s_priority_info": "Utilisé pour trier les résultats de recherche, des valeurs plus élevées en premier. Les résultats Nominatim ont priorité = 5", + "serviceslistempty": "Aucun service personnalisé n'a été défini" }, "drawLocal": { "draw": { diff --git a/web/client/translations/data.it-IT b/web/client/translations/data.it-IT index 282d8f681f..9957e54999 100644 --- a/web/client/translations/data.it-IT +++ b/web/client/translations/data.it-IT @@ -277,7 +277,7 @@ "cancelconfirm": "Sei sicuro?", "nextbtn": "Avanti", "prevbtn": "Precedente", - "savebtn": "Aggiorna", + "savebtn": "Salva/Aggiorna", "s_name": "Name", "s_title": "Titolo", "s_description": "Descrizione", @@ -290,7 +290,8 @@ "s_wfs_props_label" : "Proprietà WFS service", "s_wfs_opt_props_label" : "Proprietà facoltative", "s_result_props_label": "Proprietà di visualizzazione dei risultati", - "s_priority_info": "Usato per oridnare risultati, valori più alti vengono visualizzati per primi. Nominatim ha priorità = 5" + "s_priority_info": "Usato per oridnare risultati, valori più alti vengono visualizzati per primi. Nominatim ha priorità = 5", + "serviceslistempty": "Nessun servizio definito" }, "drawLocal": { "draw": {