From 1341439aaeeecbd6643a5af036f7fcc63b7bb985 Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 11 Dec 2018 17:54:35 +0100 Subject: [PATCH] =?UTF-8?q?Corrections=20des=20anomalies=20trouv=C3=A9es?= =?UTF-8?q?=20par=20@Jusbatier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Link to #436 --- .../js/printBordereauParcellaire.js | 21 +++++++------------ .../configuration/CadastrappPlaceHolder.java | 2 +- .../service/ImageParcelleController.java | 1 + .../pdf/BordereauParcellaireController.java | 3 ++- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/addons/cadastrapp/js/printBordereauParcellaire.js b/addons/cadastrapp/js/printBordereauParcellaire.js index e61464a0..7ebaaa4d 100644 --- a/addons/cadastrapp/js/printBordereauParcellaire.js +++ b/addons/cadastrapp/js/printBordereauParcellaire.js @@ -58,7 +58,11 @@ GEOR.Addons.Cadastre.onClickPrintBordereauParcellaireWindow = function(parcelleI */ GEOR.Addons.Cadastre.initPrintBordereauParcellaireWindow = function(parcelleId) { - var itemsInPanel = []; + var itemsInPanel = [{ + xtype: 'hidden', + name: 'parcelle', + value: parcelleId + }]; // Show only personaldata information if user have the goog Cnil level if (GEOR.Addons.Cadastre.isCNIL1() || GEOR.Addons.Cadastre.isCNIL2()){ @@ -66,11 +70,7 @@ GEOR.Addons.Cadastre.initPrintBordereauParcellaireWindow = function(parcelleId) title: OpenLayers.i18n('cadastrapp.bordereauparcellaire.data'), autoHeight: true, hide: true, - items: [ { - xtype: 'hidden', - name: 'parcelle', - value: parcelleId - }, { + items: [{ xtype: 'radio', boxLabel: OpenLayers.i18n('cadastrapp.bordereauparcellaire.data.without'), checked: true, @@ -125,12 +125,7 @@ GEOR.Addons.Cadastre.initPrintBordereauParcellaireWindow = function(parcelleId) typeAhead: true, forceSelection: true, triggerAction: 'all', - editable: false, - }); - - // Load first value - comboBaseMap.store.on('load', function(ds,records,o){ - comboBaseMap.setValue(records[0].data.value); + editable: false }); storeBaseMap.loadData(GEOR.Addons.Cadastre.pdfbasemaptitles); @@ -185,7 +180,7 @@ GEOR.Addons.Cadastre.initPrintBordereauParcellaireWindow = function(parcelleId) // PARAMS var params = GEOR.Addons.Cadastre.printBordereauParcellaireWindow.items.items[0].getForm().getValues(); if(Ext.getCmp("cadbasemapindex")){ - params.basemapindex = Ext.getCmp("cadbasemapindex").getValue(); + params.basemapindex = Ext.getCmp("cadbasemapindex").getValue() == '' ? "0" : Ext.getCmp("cadbasemapindex").getValue(); } // Add style information // remove # to avoid URL problems on server side (XSL template doesnot manage url-encode) diff --git a/cadastrapp/src/main/java/org/georchestra/cadastrapp/configuration/CadastrappPlaceHolder.java b/cadastrapp/src/main/java/org/georchestra/cadastrapp/configuration/CadastrappPlaceHolder.java index a4c08fae..7389e625 100644 --- a/cadastrapp/src/main/java/org/georchestra/cadastrapp/configuration/CadastrappPlaceHolder.java +++ b/cadastrapp/src/main/java/org/georchestra/cadastrapp/configuration/CadastrappPlaceHolder.java @@ -49,7 +49,7 @@ public static String getProperty(String name) { /** * Get Map of values where key like given regex * - * @param regexkey + * @param regexKey regex use to get all keys * @return all value where key like regexKey, null if no key matches */ public static List getPropertiesLike(String regexKey){ diff --git a/cadastrapp/src/main/java/org/georchestra/cadastrapp/service/ImageParcelleController.java b/cadastrapp/src/main/java/org/georchestra/cadastrapp/service/ImageParcelleController.java index a1e6d587..1ff94b18 100644 --- a/cadastrapp/src/main/java/org/georchestra/cadastrapp/service/ImageParcelleController.java +++ b/cadastrapp/src/main/java/org/georchestra/cadastrapp/service/ImageParcelleController.java @@ -97,6 +97,7 @@ public class ImageParcelleController extends CadController { * @param styleFillOpacity From 0 to 1 * @param styleStrokeColor hexacode without # * @param styleStrokeWidth stroke width + * @param baseMapIndex corresponding of the wanted index in cadastrapp.properties * @return Response with noContent in case of error, png otherwise */ @GET diff --git a/cadastrapp/src/main/java/org/georchestra/cadastrapp/service/pdf/BordereauParcellaireController.java b/cadastrapp/src/main/java/org/georchestra/cadastrapp/service/pdf/BordereauParcellaireController.java index 739bb6a7..68dfdff1 100644 --- a/cadastrapp/src/main/java/org/georchestra/cadastrapp/service/pdf/BordereauParcellaireController.java +++ b/cadastrapp/src/main/java/org/georchestra/cadastrapp/service/pdf/BordereauParcellaireController.java @@ -70,7 +70,8 @@ public class BordereauParcellaireController extends CadController { * @param styleFillOpacity style plot opacity * @param styleStrokeColor style stroke color * @param styleStrokeWidth style stroke width - * @return + * @param baseMapIndex corresponding of the wanted index in cadastrapp.properties + * @return BP pdf */ @GET @Path("/createBordereauParcellaire")