Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #1641 - Added cache param in Display layer properties #1784

Merged
merged 3 commits into from
May 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docma-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@
"label": "Reference",
"items": [
{ "label": "Framework", "href": "api/framework"},

{ "separator": true },
{ "label": "JavaScript API", "href": "api/jsapi" },
{ "separator": true },
{ "label": "Plugins", "href": "api/plugins" }

]
},
{
Expand Down Expand Up @@ -105,7 +103,7 @@
},
"src": [
{
"framework" : [
"framework": [
"web/client/components/index.jsdoc",
"web/client/components/buttons/FullScreenButton.jsx",
"web/client/components/buttons/GlobeViewSwitcherButton.jsx",
Expand Down
14 changes: 10 additions & 4 deletions web/client/components/TOC/fragments/settings/Display.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
const React = require('react');

const Slider = require('react-nouislider');
const {Label} = require('react-bootstrap');
const {Label, Checkbox} = require('react-bootstrap');
const {DropdownList} = require('react-widgets');
const Message = require('../../../I18N/Message');
require('react-widgets/lib/less/react-widgets.less');
Expand Down Expand Up @@ -45,9 +45,15 @@ module.exports = React.createClass({
<Label key="opacity-percent" >{Math.round(this.props.settings.options.opacity * 100) + "%"}</Label>
</div>
{this.props.element.type === "wms" ?
[(<div key="transparent-check"><input type="checkbox" key="transparent" checked={this.props.element && (this.props.element.transparent === undefined ? true : this.props.element.transparent)}
onChange={(event) => {this.props.onChange("transparent", event.target.checked); }}/>
<label key="transparent-label" className="control-label">Transparent</label></div>)] : null}
[(<div key="transparent-check">
<Checkbox key="transparent" checked={this.props.element && (this.props.element.transparent === undefined ? true : this.props.element.transparent)} onChange={(event) => {this.props.onChange("transparent", event.target.checked); }}>
<Message msgId="layerProperties.transparent"/></Checkbox>
<Checkbox key="cache" value="tiled" key="tiled"
onChange={(e) => this.props.onChange("tiled", e.target.checked)}
checked={this.props.element && this.props.element.tiled !== undefined ? this.props.element.tiled : true} >
<Message msgId="layerProperties.cached"/>
</Checkbox>
</div>)] : null}
</div>);
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('test Layer Properties Display module component', () => {
expect(comp).toExist();
const inputs = ReactTestUtils.scryRenderedDOMComponentsWithTag( comp, "input" );
expect(inputs).toExist();
expect(inputs.length).toBe(1);
expect(inputs.length).toBe(2);
inputs[0].click();
expect(spy.calls.length).toBe(1);
});
Expand Down
6 changes: 6 additions & 0 deletions web/client/translations/data.de-DE
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"general": "Generell",
"display": "Darstellung",
"style": "Stil",
"transparent": "Transparent",
"cached": "Verwenden Sie Cache-Optionen",
"styleCustom": "Stil \"{value}\" nutzen",
"styleListLoadError": "Es gab einen Fehler beim Laden der Liste von Stilen",
"stylesRefreshList": "Aktualisiere die Liste von Stilen",
Expand All @@ -40,6 +42,10 @@
"featureTypeError": "Layerattribute können nicht geladen werden",
"elevation": "Höhe"
},
"globeswitcher": {
"tooltipDeactivate": "Beenden Sie den 3D-Modus",
"tooltipActivate": "Geben Sie den 3D-Modus ein"
},
"background": "Hintergrund",
"language": "Sprache",
"mousePositionCoordinates": "Koordinatenanzeige",
Expand Down
6 changes: 6 additions & 0 deletions web/client/translations/data.en-US
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"general": "General",
"display": "Display",
"style": "Style",
"transparent": "Transparent",
"cached": "Use cache options",
"styleCustom": "Use style named \"{value}\"",
"styleListLoadError": "There was an error loading the styles list",
"stylesRefreshList": "Refresh Styles List",
Expand All @@ -40,6 +42,10 @@
"featureTypeError": "Cannot load layer attributes",
"elevation": "Elevation"
},
"globeswitcher": {
"tooltipDeactivate": "Exit 3D Mode",
"tooltipActivate": "Enter 3D Mode"
},
"background": "Background",
"language": "Language",
"mousePositionCoordinates": "Coordinates indicator",
Expand Down
6 changes: 6 additions & 0 deletions web/client/translations/data.fr-FR
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"general": "Général",
"display": "Affichage",
"style": "Style",
"transparent": "Transparent",
"cached": "Utiliser les options de cache",
"styleCustom": "Utilisez un style nommé \"{value} \"",
"styleListLoadError": "Une erreur s'est produite lors du chargement de la liste de styles",
"stylesRefreshList": "Actualiser la liste des styles",
Expand All @@ -40,6 +42,10 @@
"featureTypeError": "Impossible de charger les attributs de calque",
"elevation": "élévation"
},
"globeswitcher": {
"tooltipDeactivate": "Sortie en mode 3D",
"tooltipActivate": "Entrez le mode 3D"
},
"enable": "Activer",
"background": "Fond de plan",
"language": "langue",
Expand Down
6 changes: 6 additions & 0 deletions web/client/translations/data.it-IT
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"general": "Generale",
"display": "Visualizzazione",
"style": "Stile",
"transparent": "Trasparenza",
"cached": "Usa la cache",
"styleCustom": "Usa stile con nome \"{value}\"",
"styleListLoadError": "Si è verificato un errore durante il caricamento della lista degli stili",
"stylesRefreshList": "Aggiorna lista degli stili",
Expand All @@ -40,6 +42,10 @@
"featureTypeError": "Impossibile caricare gli attributi del layer",
"elevation": "Elevazione"
},
"globeswitcher": {
"tooltipDeactivate": "Disattiva la modalità 3D",
"tooltipActivate": "Attiva la modalità 3D"
},
"background": "Sfondo",
"language": "Lingua",
"mousePositionCoordinates": "Indicatore di coordinate",
Expand Down
1 change: 1 addition & 0 deletions web/client/utils/LayersUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ var LayersUtils = {
capabilitiesURL: layer.capabilitiesURL,
title: layer.title,
transparent: layer.transparent,
tiled: layer.tiled,
type: layer.type,
url: layer.url,
bbox: layer.bbox,
Expand Down
2 changes: 1 addition & 1 deletion web/client/utils/PluginsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const parseExpression = (state = {}, context = {}, value) => {
/*eslint-enable */
/**
* Parses a expression string "{some javascript}" and evaluate it.
* The expression will be evalueted getting as parameters the state and the context and the request.
* The expression will be evaluated getting as parameters the state and the context and the request.
* @memberof utils.PluginsUtils
* @param {object} state the state context
* @param {object} context the context element
Expand Down