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..7dea0252d242dfedad6b2d5a00b345d4129d7bb7 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,18 @@ }, "disabled": false, "required": true, - "nb_cols": 12, + "nb_cols": 2, "default_value": true - }, { + }, + { + "type": "text", + "name": "location_placeholder", + "label": "FORM_LOCATION_PLACEHOLDER_VMAP_BUSINESS_OBJECT", + "nb_cols": 4, + "id": "bo_location_placeholder", + "default_value": "Localiser..." + }, + { "type": "radio", "options": { "choices": [ @@ -1029,9 +1038,17 @@ }, "disabled": false, "required": true, - "nb_cols": 12, + "nb_cols": 2, "default_value": true - }, { + }, + { + "type": "text", + "name": "location_placeholder", + "label": "FORM_LOCATION_PLACEHOLDER_VMAP_BUSINESS_OBJECT", + "nb_cols": 4, + "id": "bo_location_placeholder" + }, + { "type": "radio", "options": { "choices": [ @@ -1305,6 +1322,16 @@ } ] }, + { + "fields": [ + { + "type": "label", + "name": "location_placeholder", + "label": "FORM_LOCATION_PLACEHOLDER_VMAP_BUSINESS_OBJECT", + "nb_cols": 12 + } + ] + }, { "fields": [ { 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..1886712e70f395502e6800569c25f8e411591008 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 placeholder", "": "", "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..0ac88683c207408ea5834ee26934aef5eb313e2d 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": "Balise du champ 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..4a1e026efafc58a3a828aa29a84425e347e3d53d 100644 --- a/src/module_vmap/web_service/sql/sqlQueries.xml +++ b/src/module_vmap/web_service/sql/sqlQueries.xml @@ -1164,6 +1164,10 @@ 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); + -- Armand 23/01/2019 Placeholder dans la localisation + UPDATE s_vmap.business_object set location_placeholder='Localiser...'; ]]> </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"); } /**