diff --git a/frontend/assets/application/conoscenze_ambientali/css/skin-mappa.css b/frontend/assets/application/conoscenze_ambientali/css/skin-mappa.css index e711b2ede..1d176a2f8 100644 --- a/frontend/assets/application/conoscenze_ambientali/css/skin-mappa.css +++ b/frontend/assets/application/conoscenze_ambientali/css/skin-mappa.css @@ -941,3 +941,6 @@ header.navbar h1 a span { .rc-tree-bottom_docu + span > span.rc-tree-title { cursor: pointer; } +.rc-tree-center_docu + span > span.rc-tree-title { + cursor: pointer; +} \ No newline at end of file diff --git a/frontend/assets/css/sira.css b/frontend/assets/css/sira.css index 4fc94e37d..5febca6d3 100644 --- a/frontend/assets/css/sira.css +++ b/frontend/assets/css/sira.css @@ -823,7 +823,7 @@ overflow-y: auto; .scheda-tree { z-index: 1025; width: 550px; - min-height: 400px; + min-height: 370px; position: fixed; overflow-x:hidden; box-shadow: 0 0 5px 1px rgba(94,94,94,1); diff --git a/frontend/assets/viaFaseProcedimentale.json b/frontend/assets/viaFaseProcedimentale.json index 34e08c5dd..8b9a53a10 100644 --- a/frontend/assets/viaFaseProcedimentale.json +++ b/frontend/assets/viaFaseProcedimentale.json @@ -27,7 +27,7 @@ "geometryType": "Polygon", "card": { "featurePath": "/wfs:FeatureCollection/wfs:member/decsiraogc_sivia:FaseProcedura", - "geometryPath": "decsiraogc_sivia:geometria/gml:Polygon/gml:exterior/gml:LinearRing/gml:posList/text()", + "geometryPath": "decsiraogc_sivia:geometria/gml:MultiSurface/gml:surfaceMember/gml:Polygon/gml:exterior/gml:LinearRing/gml:posList/text()", "pdfname": "Scheda_FaseProcedimentale_{{/wfs:FeatureCollection/wfs:member/decsiraogc_sivia:FaseProcedura/decsiraogc_sivia:idProgetto/text()}}.pdf", "template": "assets/cardTemplateFaseProcedimentale.jsxt", "service": { diff --git a/frontend/js/components/tree/TreeData.jsx b/frontend/js/components/tree/TreeData.jsx index b1e0bbd8f..507e000d3 100644 --- a/frontend/js/components/tree/TreeData.jsx +++ b/frontend/js/components/tree/TreeData.jsx @@ -55,14 +55,19 @@ class TreeData extends React.Component { } componentWillReceiveProps(newProps) { + /* if (this.props.featureId !== newProps.featureId) { this.loadDataForTree(newProps); } else { this.props.treeDataLoading(false); + }*/ + + if (this.props.treeData !== null && this.props.treeData !== undefined && this.props.loading) { + this.loadDataForTree(newProps); + this.props.treeDataLoading(false); } } - onSelect = (selectedKeys, info) => { let selectedData = this.searchKey(this.props.treeData[0], info.node.props.eventKey); if (selectedKeys && selectedData && selectedData.linkToDetail) { @@ -89,7 +94,7 @@ class TreeData extends React.Component { info }; this.props.setWaitingForConfig(waitingForConfig); - this.props.loadFeatureTypeConfig(null, {authkey: this.authParams && this.authParams.authkey ? this.authParams.authkey : ''}, featureType, false, false, null, false, null, false, (detailsConfig = {})=>{ + this.props.loadFeatureTypeConfig(null, { authkey: this.authParams && this.authParams.authkey ? this.authParams.authkey : '' }, featureType, false, false, null, false, null, false, (detailsConfig = {}) => { this.loadCardTemplate(detailsConfig, cqlFilter); }); } @@ -138,24 +143,10 @@ class TreeData extends React.Component { }; const treeNodes = this.props.treeData ? loop(this.props.treeData) : []; - const getKeys = (data) => { - return data.reduce(function(acc, o) { - let ret = acc; - if (o.key) { - ret.push(o.key); - } - if (o.children) { - ret = ret.concat(getKeys(o.children)); - } - return ret; - }, []); - }; - const expandedKeys = this.props.treeData ? getKeys(this.props.treeData) : []; - return ( {treeNodes} );