Skip to content

Commit

Permalink
Configured docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kappu committed May 18, 2017
1 parent 50829b2 commit a3d399f
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 20 deletions.
1 change: 1 addition & 0 deletions docma-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const ServicesList = React.createClass({
};
},
getOptions() {
if (this.props.services.length === 0) {
return (<div className="search-serivce-name">
<Message msgId="search.serviceslistempty"/>
</div>);
}
return this.props.services.map((s, idx) => {
return (
<div className="search-service-item" key={idx}>
Expand Down
27 changes: 14 additions & 13 deletions web/client/plugins/SearchServicesConfig.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -120,7 +121,7 @@ const SearchServicesConfigPanel = React.createClass({
<Button onClick={this.prev} bsStyle="primary">
<Message msgId="search.prevbtn" />
</Button>
<Button disabled={!this.canProceed()} onClick={this.update} bsStyle="primary">
<Button disabled={!this.canProceed()} onClick={this.update} bsStyle="success">
<Message msgId="search.savebtn" />
</Button>
</span>);
Expand Down Expand Up @@ -151,7 +152,7 @@ const SearchServicesConfigPanel = React.createClass({
<span>{titleText}</span>
{ this.isDirty() ? (
<ConfirmButton className="close" confirming={{
text: <Message msgId="search.cancelconfirm" />, className: "btn btn-sm btn-warning services-config-editor-confirm-close"}} onConfirm={this.onClose} bsStyle="primary" text={(<Glyphicon glyph={closeGlyph}/>)}/>) : <button onClick={this.onClose} className="close">{closeGlyph ? <Glyphicon glyph={closeGlyph}/> : <span>×</span>}</button>}
text: <Message msgId="search.cancelconfirm" />, className: "btn btn-sm btn-warning services-config-editor-confirm-close"}} onConfirm={this.onClose} bsStyle="primary" text={(<Glyphicon glyph={closeGlyph}/>)}/>) : (<button onClick={this.onClose} className="close">{closeGlyph ? <Glyphicon glyph={closeGlyph}/> : <span>×</span>}</button>)
}
</span>
<div role="body" className="services-config-editor">
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/searchservicesconfig/ToggleButton.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2017, GeoSolutions Sas.
* All rights reserved.
*
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.de-DE
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 3 additions & 2 deletions web/client/translations/data.en-US
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
"addbtn": "Add",
"nextbtn": "Next",
"prevbtn": "Back",
"savebtn": "Update",
"savebtn": "Save/Update",
"cancelbtn": "Cancel",
"confirmremove": "Delete?",
"cancelconfirm": "Are you sure?",
Expand All @@ -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": {
Expand Down
3 changes: 2 additions & 1 deletion web/client/translations/data.fr-FR
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 3 additions & 2 deletions web/client/translations/data.it-IT
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down

0 comments on commit a3d399f

Please sign in to comment.