diff --git a/src/module_vmap/module/forms/vmap_business_object/vmap_business_object_vmap_business_object.json b/src/module_vmap/module/forms/vmap_business_object/vmap_business_object_vmap_business_object.json index 8cb2ecdec963ced0325b07610c491658275c9c5c..4aad624d7f22806c38cbc5a7b8efe476ce58856c 100644 --- a/src/module_vmap/module/forms/vmap_business_object/vmap_business_object_vmap_business_object.json +++ b/src/module_vmap/module/forms/vmap_business_object/vmap_business_object_vmap_business_object.json @@ -536,9 +536,17 @@ }, "disabled": false, "required": true, - "nb_cols": 12, + "nb_cols": 3, "default_value": true - }, { + }, + { + "type": "text", + "name": "location_placeholder", + "label": "FORM_LOCATION_PLACEHOLDER_VMAP_BUSINESS_OBJECT", + "nb_cols": 3, + "id": "bo_location_placeholder" + }, + { "type": "radio", "options": { "choices": [ diff --git a/src/module_vmap/module/javascript/app/vmap/mapmanager/mapmanager.js b/src/module_vmap/module/javascript/app/vmap/mapmanager/mapmanager.js index e3373e5ecdddf34f2da578fbcc5916f4284c67b0..19118736763025e374066fb7bbc34cc4f9032595 100644 --- a/src/module_vmap/module/javascript/app/vmap/mapmanager/mapmanager.js +++ b/src/module_vmap/module/javascript/app/vmap/mapmanager/mapmanager.js @@ -1489,7 +1489,8 @@ nsVmap.nsMapManager.MapManager.prototype.getBusinessObjectsFromLayers = function 'bo_max_edition_scale': aBos[ii]['max_edition_scale'], 'bo_enable_location': aBos[ii]['enable_location'], 'bo_enable_selection': aBos[ii]['enable_selection'], - 'bo_index': goog.isDefAndNotNull(aBos[ii]['index']) ? aBos[ii]['index'] : 1000000 + 'bo_index': goog.isDefAndNotNull(aBos[ii]['index']) ? aBos[ii]['index'] : 1000000, + 'location_placeholder': aBos[ii]['location_placeholder'] }; } } diff --git a/src/module_vmap/module/lang/lang-en.json b/src/module_vmap/module/lang/lang-en.json index 22870579e4c6a05d7fee7d8247e3199325d51741..8c8e25357f3f4812e9d092ea4824989cad50b7ff 100644 --- a/src/module_vmap/module/lang/lang-en.json +++ b/src/module_vmap/module/lang/lang-en.json @@ -190,6 +190,7 @@ "FORM_LOCATABLE_VMAP_BUSINESS_OBJECT": "Enable locate", "FORM_LOCATABLE_VMAP_BUSINESS_OBJECT_TOOLTIP": "Display the object on the locate tool", "LIST_DELETE_CONFIRM_VMAP_BUSINESS_OBJECT": "Delete the selected items and associations with layers?", + "FORM_LOCATION_PLACEHOLDER_VMAP_BUSINESS_OBJECT": "Location title", "": "", "FORM_TITLE_VMAP_MODULE_MODULE": "Module {{::label}}", "FORM_LABEL_VMAP_MODULE_MODULE": "Label", diff --git a/src/module_vmap/module/lang/lang-fr.json b/src/module_vmap/module/lang/lang-fr.json index c8fbb96d7d8d74812d0fe9c5e7fabd27320f4e91..78fa12119d1202c93e26198713759afffaf8f14d 100644 --- a/src/module_vmap/module/lang/lang-fr.json +++ b/src/module_vmap/module/lang/lang-fr.json @@ -190,6 +190,7 @@ "FORM_LOCATABLE_VMAP_BUSINESS_OBJECT": "Objet localisable", "FORM_LOCATABLE_VMAP_BUSINESS_OBJECT_TOOLTIP": "Affiche l'objet dans la liste de l'outil de localisation (ne garantit pas la sécurité de la donnée)", "LIST_DELETE_CONFIRM_VMAP_BUSINESS_OBJECT": "Supprimer les objets métiers sélectionnés et les associations avec les calques ?", + "FORM_LOCATION_PLACEHOLDER_VMAP_BUSINESS_OBJECT": "Titre de la localisation", "": "", "FORM_TITLE_VMAP_MODULE_MODULE": "Module {{::label}}", "FORM_LABEL_VMAP_MODULE_MODULE": "Libellé", diff --git a/src/module_vmap/module/template/tools/location.html b/src/module_vmap/module/template/tools/location.html index 62e46ed34e6b7d9853846d9d0845101216ac75a9..59d1b1faed4848c8ed64c87adc9b30dccf43eb7a 100644 --- a/src/module_vmap/module/template/tools/location.html +++ b/src/module_vmap/module/template/tools/location.html @@ -4,7 +4,7 @@ <!--Recherche--> <input id="location-search-input" type="text" - placeholder="Localiser.." + placeholder="{{ctrl.oBusinessObjects[ctrl.sSelectedLocationService].bo_enable_location && ctrl.oBusinessObjects[ctrl.sSelectedLocationService].location_placeholder != '' ? ctrl.oBusinessObjects[ctrl.sSelectedLocationService].location_placeholder : 'Localiser...'}}" ng-model="ctrl.locationSearch" ng-click="ctrl.searchLocation()"> <!--Sélecteur--> diff --git a/src/module_vmap/web_service/sql/sqlQueries.xml b/src/module_vmap/web_service/sql/sqlQueries.xml index d3109edecc1cc39dc4fecbfb44c362087fb92139..10d6a568c8019ed4322ccca9dac574ced8ad2ae4 100644 --- a/src/module_vmap/web_service/sql/sqlQueries.xml +++ b/src/module_vmap/web_service/sql/sqlQueries.xml @@ -1164,6 +1164,8 @@ ALTER TABLE s_vmap.business_object ADD COLUMN enable_selection boolean; ALTER TABLE s_vmap.business_object ADD COLUMN enable_location boolean; UPDATE s_vmap.business_object SET enable_selection=true, enable_location=true; + -- Frédéric 18/01/2019 Placeholder dans la localisation + ALTER TABLE s_vmap.business_object ADD COLUMN location_placeholder character varying(100); ]]> </code> </query> diff --git a/src/module_vmap/web_service/ws/BusinessObject.class.inc b/src/module_vmap/web_service/ws/BusinessObject.class.inc index ba6c8a045c1f09fc523b786231592909c5fb546f..2a990d6d616181648cdf2a9dcd6f9abb36d4e781 100644 --- a/src/module_vmap/web_service/ws/BusinessObject.class.inc +++ b/src/module_vmap/web_service/ws/BusinessObject.class.inc @@ -31,7 +31,7 @@ class BusinessObject extends Vmap { */ function __construct($aPath, $aValues, $properties, $bShortcut = false, $oConnection = false) { parent::__construct($aPath, $aValues, $properties, $bShortcut, $oConnection); - $this->aSelectedFields = Array("business_object_id", "title", "formtitle", "summarytitle", "id_field", "database", "schema", "table", "sql_summary", "sql_list", "sorted_by", "geom_column", "search_field", "result_field", "search_use_strict", "event_id", "index", "add_form_size", "edit_form_size", "display_form_size", "selection_buffer", "user_rights", "max_edition_scale", "min_edition_scale", "enable_selection", "enable_location"); + $this->aSelectedFields = Array("business_object_id", "title", "formtitle", "summarytitle", "id_field", "database", "schema", "table", "sql_summary", "sql_list", "sorted_by", "geom_column", "search_field", "result_field", "search_use_strict", "event_id", "index", "add_form_size", "edit_form_size", "display_form_size", "selection_buffer", "user_rights", "max_edition_scale", "min_edition_scale", "enable_selection", "enable_location", "location_placeholder"); } /** diff --git a/src/module_vmap/web_service/ws/BusinessObjects.class.inc b/src/module_vmap/web_service/ws/BusinessObjects.class.inc index 6479b6aa94a034329e6ad8d56a68076a75fc29f5..a90bc69b890d9b7c617ff219a4cc2bb996525eb8 100755 --- a/src/module_vmap/web_service/ws/BusinessObjects.class.inc +++ b/src/module_vmap/web_service/ws/BusinessObjects.class.inc @@ -42,7 +42,7 @@ class BusinessObjects extends Vmap { */ function __construct($aPath, $aValues, $properties, $bShortcut = false, $oConnection = false) { parent::__construct($aPath, $aValues, $properties, $bShortcut, $oConnection); - $this->aSelectedFields = Array("business_object_id", "title", "formtitle", "summarytitle", "id_field", "database", "schema", "table", "sql_summary", "sql_list", "sorted_by", "geom_column", "search_field", "result_field", "search_use_strict", "event_id", "index", "add_form_size", "edit_form_size", "display_form_size", "selection_buffer", "user_rights", "max_edition_scale", "min_edition_scale", "enable_selection", "enable_location"); + $this->aSelectedFields = Array("business_object_id", "title", "formtitle", "summarytitle", "id_field", "database", "schema", "table", "sql_summary", "sql_list", "sorted_by", "geom_column", "search_field", "result_field", "search_use_strict", "event_id", "index", "add_form_size", "edit_form_size", "display_form_size", "selection_buffer", "user_rights", "max_edition_scale", "min_edition_scale", "enable_selection", "enable_location", "location_placeholder"); } /**