From 493788d55e495dc59b6fd489038ca82d10ee2d24 Mon Sep 17 00:00:00 2001
From: Anthony Borghi <anthony.borghi@veremes.com>
Date: Fri, 16 Nov 2018 15:00:05 +0100
Subject: [PATCH] Squashed 'src/vitis/' changes from 355b5f8b..9862a97c
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

9862a97c Remove gitignore
1e0dea62 Merge branch 'next_version' into 'master'
40e7d46e pull subtree
68214db2 Update crontab.txt - Changement nom balise
771a5655 Merge branch 'Sebastien-master-patch-58096' into 'master'
940a5919 Merge branch 'cherry-pick-4398b26d' into 'next_version'
622dea61 Merge branch 'bug/4-formreader-champs-date-non-pris-en-compte-si-on-met-la-date-du-jour-en-insertion' into 'master'
4398b26d Merge branch 'bug/4-formreader-champs-date-non-pris-en-compte-si-on-met-la-date-du-jour-en-insertion' into 'master'
d17933b9 Edit datetime picker event
b3b6ec06 Merge branch '1-js-sous-formulaire' into 'master'
41a15530 Load BO Javascript on subforms
4f3da349 Merge branch 'master' into 'next_version'
e3923b17 Merge branch 'feature/impressions_144dpi' into 'master'
38bafafa Increase the WMS symbols size to match resolution
431529f6 Merge branch 'master' into 'next_version'
35163699 Merge branch 'hotfix/swagger_doc' into 'master'
275422b6 Make swagger work for dev installs
064924ec Mise à jour du fichier de version pour fonctionnait avec la version 11.0 de PostgreSQL
ee4da38b Add gitignore
f53e707d Merge branch 'master' of gitlab.veremes.net:Development/vitis_apps/sources/vitis
6c984bed Add client/vas dependencies
12a22d70 pull subtree
47cd4913 Squashed 'src/module_vm4ms/' changes from 4d95a3d..af1a2e3
7b55e678 Utilisation de dirname($_SERVER['SCRIPT_FILENAME']) au dlieu de __DIR__
24ea0f3d pull subtree
f4326e8a Squashed 'src/module_vm4ms/' changes from 4d95a3da..af1a2e36
c0b73f09 Squashed 'src/module_vm4ms/' changes from 373ef426..4d95a3da
906a7169 Modify client symlinks
1dccb17e Modify vas symlinks
07db5ec5 Update Readme
0bb9b2fa pull subtree
14758714 Squashed 'src/module_cadastreV2/' changes from e678ee10..8158b9a2
a9b2699c pull subtree
c499cef3 Squashed 'src/module_anc/' changes from b55c5e85..4321adc4
d82d485e pull subtree
1ad8c842 Squashed 'src/module_vm4ms/' changes from 4f506db7..373ef426
6702c1fb pull subtree
94998ed6 Squashed 'src/module_vmap/' changes from cf75b106..e7dabee0
3a2b6fe9 pull subtree
97c993d5 Squashed 'src/vitis/' changes from 01d199ce..7a1818a4
213795da Resolve require problems
c23b6587 Rights on write folders
4ac589ad Change __DIR__ by dirname($_SERVER['SCRIPT_FILENAME'])
bc0e0830 Change __DIR__ by dirname($_SERVER['SCRIPT_FILENAME'])
b51e622f Change __DIR__ by dirname($_SERVER['SCRIPT_FILENAME'])
3bd1ab17 Change __DIR__ by dirname($_SERVER['SCRIPT_FILENAME'])
53d54531 Change __DIR__ by dirname($_SERVER['SCRIPT_FILENAME'])
2d9fd6a5 Get rights to vas/server
0602efdb Compilation grunt
75c89c8b Try on push subtrees
246ebd0f Add pull.sh
2e026c10 Add pull.sh
37d37d03 Add grunt to the install
5b9cffc3 Update readme
7a1818a4 add subtree
6c1b3e3c Reset sources
a195a4d9 Init from SVN
4ad29c4b add subtree
1ac46cd9 Squashed 'src/closure/' content from commit 622066d
635a2f96 add subtree
7593c383 Squashed 'src/vitis/' content from commit 01d199c
b487cd6f Update from SVN
266e19a6 Initial commit
3f86c344 Ignore properties files
02a3be3e gitignore
578f9827 Ingore properties files
d1327b32 add subtree
59431f9c Squashed 'src/module_cadastre/' content from commit ee26cf16
950e5a10 Squashed 'src/module_cadastreV2/' content from commit e678ee10
c2e686cb add subtree
92d769cc Squashed 'src/module_anc/' content from commit b55c5e85
63a0562b add subtree
829e4cf3 Squashed 'src/module_vm4ms/' content from commit 4f506db7
3630a462 add subtree
8792eb7c Squashed 'src/module_vmap/' content from commit cf75b10
4fe41d6b add subtree
974b9dd8 add subtree
92032b6a Squashed 'src/closure/' content from commit 622066d
646709a4 Squashed 'src/vitis/' content from commit 01d199c
416c2c24 add subtree
06cc1a2d ignore properties files
192389a6 Get files from SVN
86c2affb Initial commit
01d199ce Update from SVN
5674ba26 fixed untracked files
ce1c22a0 add subtree
d9a06a32 reset
59214f97 Update .gitignore
53a26943 Update utils/init_symlinks.sh
cdd6388c Utilisation d'une install existante
5c00d023 Permettre de relancer le script sans symlinks dupliqués
a7a04697 Permettre de relancer le script sans problèmes de duplication des symlinks
767c55e8 Update utils/init_symlinks.sh
122955df Lancer init_symlinks avant de pull les subtrees
92f4957e Update utils/init_symlinks.sh
6c3d32ea Integrate message
df3fda74 Automatically pull the subtrees
32c06af7 pull from module
d25cf488 Squashed 'src/module_cadastre/' changes from a761108..da0e188
f15eca23 pull from module
8b47e8e6 Squashed 'src/module_cadastreV2/' changes from 812b365..3bf002c
db8f5acf pull from module
93888f30 Squashed 'src/module_anc/' changes from 8f732f9..ab8db90
7607f789 pull from module
5fec7981 Squashed 'src/module_vm4ms/' changes from 1964e93..9b7aed8
80672c1c pull from module
79710cea Squashed 'src/module_vmap/' changes from 81346f0..4b3d61a
404c71d8 pull from module
e0812b1e Squashed 'src/vitis/' changes from fec164b..8c49823
72ec9143 Update utils/pull_subtrees.sh
35a719c1 Update utils/pull_subtrees.sh
7fe1bd22 Update utils/pull_subtrees.sh
82e31e54 Update utils/pull_subtrees.sh
b398658c Update utils/pull_subtrees.sh
5f906507 Update utils/pull_subtrees.sh
d0adeedb Vérification sudo
9897f9da Utilisation de dependency.xml pour les dépendances
6151e6bf Update dependency.xml
d7223421 Modification titre
9ce399c2 Modification du titre
4c4eb489 Add 'src/module_cadastre/' from commit 'a7611084f351207cc02d36ddd089dd74e64059e8'
7589aa71 Add 'src/module_cadastreV2/' from commit '812b365ac7f5854814f9b7abe089e96d522b1a37'
052186c3 Add 'src/module_anc/' from commit '8f732f9f4f9ba00a01faa6c38e465a49187e173f'
691caa91 Add 'src/module_vm4ms/' from commit '1964e93a80658175d7219d374f415915d437ebca'
7d07b86d Add 'src/module_vmap/' from commit '81346f032a6b96cecc25a44744ce0bf95d144230'
c6679343 Add 'src/closure/' from commit '622066dbf7c0adf29022d25dade0d2c6c872c5c9'
ce0a64c5 Add 'src/vitis/' from commit 'fec164babe252325a825dbc530ca1e6556f2f8c7'
672dc991 Reset sources
73ff28a7 Utilisation de dependency.xml pour le versionnement des dependances
9b030f28 Utilisation de dependency.xml pour la version des deps
71fe1986 Add 'src/module_cadastre/' from commit 'a7611084f351207cc02d36ddd089dd74e64059e8'
77cff122 Add 'src/module_cadastreV2/' from commit '812b365ac7f5854814f9b7abe089e96d522b1a37'
59eca12d Add 'src/module_anc/' from commit '8f732f9f4f9ba00a01faa6c38e465a49187e173f'
00c149c7 Add 'src/module_vm4ms/' from commit '1964e93a80658175d7219d374f415915d437ebca'
0fca2368 Add 'src/module_vmap/' from commit '81346f032a6b96cecc25a44744ce0bf95d144230'
59a21e52 Add 'src/closure/' from commit '622066dbf7c0adf29022d25dade0d2c6c872c5c9'
0513a606 Add 'src/vitis/' from commit 'fec164babe252325a825dbc530ca1e6556f2f8c7'
440395b0 Reset sources
60dda2e5 Utilisation de dependency.xml pour la gestion des dependances
de649f18 Add 'src/closure/' from commit '622066dbf7c0adf29022d25dade0d2c6c872c5c9'
5222a00a Add 'src/vitis/' from commit 'fec164babe252325a825dbc530ca1e6556f2f8c7'
5db1f50e Reset sources
e212d87d Utilisation de dependency.xml pour la gestion des dépendances
77799b0a Add 'src/closure/' from commit '622066dbf7c0adf29022d25dade0d2c6c872c5c9'
c79261bc Add 'src/vitis/' from commit 'fec164babe252325a825dbc530ca1e6556f2f8c7'
1cc750a8 Reset sources
d0276a43 Utilisation de dependency.xml pour la gestion des dependances
7d623d03 Add 'src/closure/' from commit '622066dbf7c0adf29022d25dade0d2c6c872c5c9'
2d74de73 Add 'src/vitis/' from commit 'fec164babe252325a825dbc530ca1e6556f2f8c7'
5449da82 Utilisation de dependency.xml pour la gestion des dependances
fb928b78 Reset sources
4bdd0b7d Utilisation de dependency.xml pour la gestion des subtrees
f7f3dadf Add closure conf
3bd7dc98 Add closure conf
7366a26b Add closure conf
93a0649f Add 'src/closure/' from commit '622066dbf7c0adf29022d25dade0d2c6c872c5c9'
c531c58c Add closure conf
622066db add files from SVN
c2a8d7d3 Ajout de README.md
81346f03 Update vMap title
93afdd18 Update vMap title
dd365f5b Update Vitis title
b4e746f6 Update readme.md
fd1a9a8f Automaticaly copy git hooks
15a03d30 Updat Readme.md
48744f3a Update Readme.md
9622b230 Update README.md
871ab4f7 Update Readme
a9c26d6a Update README.md
64fde26d Update readme.md
95e4dfee Update README.md
be34a510 Update Readme.md
73aec2ac Update README.md
6e2a768a update Readme
533177d5 Merge branch 'master' of vm09.veremes.net:Development/vitis_apps/applications/vMap
5343b694 Update README.md
55144f68 Merge branch 'master' of vm09.veremes.net:Development/vitis_apps/applications/vMap
9a2ce1fc Update README.md
09375e73 Update README.md
020ce1d1 Merge branch 'master' of vm09.veremes.net:Development/vitis_apps/applications/vMap
148bbb79 Merge branch 'master' of vm09.veremes.net:Development/vitis_apps/applications/vMap
5624d8b8 Pull and push hooks
52bad93e Update README.md
dbffe34c Copy custop hooks on installing
5f740160 Update README.md
d55a4872 Pull and push hooks
c7d34b24 Update README.md
24e41af8 test update
0b32a44f Update README.md
6e72ab3b Update README.md
1469c690 Update README.md
7ff8c64b Add install.sh
6d6bb7c4 Add install.sh
7738cbff Add 'src/module_cadastreV2/' from commit '812b365ac7f5854814f9b7abe089e96d522b1a37'
39962b3f Add 'src/module_cadastre/' from commit 'a7611084f351207cc02d36ddd089dd74e64059e8'
9e079d31 Add 'src/module_anc/' from commit '8f732f9f4f9ba00a01faa6c38e465a49187e173f'
098b185c Add 'src/module_vm4ms/' from commit '1964e93a80658175d7219d374f415915d437ebca'
70e89758 Add 'src/module_vmap/' from commit '9808f2796734a0839254f2d78dd820e216dfa31c'
8ca58245 Add 'src/vitis/' from commit '2c2bec2bc91cd9cdbab40c5c7e068f9868a53f93'
a1d2171b remove dependencies
2ffe7163 Merge branch 'version_1' into 'master'
9808f279 Edit titles
cbb00e54 Edit titles
ef1fa8e5 Remove creation on .gitignore from init_symlinks
38ba6809 Amélioration messages shell
3838b4c4 Suppression de la dep app_vmap
ff811df3 Edit Readme.md
41552069 Merge commit '9fd449ca9fe825a7819ae0137da7c155881283a9' into version_1
73ee0416 Merge commit 'e7013570c198c83b7a52a7c1f59c8aacf43bf041' into version_1
2fa7b365 make pull_subtrees executable
dcdf5427 rename utils scripts
fc4b53bd Add script to pull and push subtrees
9fd449ca Rename vMap title
8ba52179 Rename vMap title
df7de9ab Rename vitis title
41cbe0f4 reset gitignore
2239253d reset gitignore
18e7c839 Add 'src/module_cadastreV2/' from commit '812b365ac7f5854814f9b7abe089e96d522b1a37'
98e78c0c Add 'src/module_cadastre/' from commit 'a7611084f351207cc02d36ddd089dd74e64059e8'
2d1e279b Add 'src/module_anc/' from commit '8f732f9f4f9ba00a01faa6c38e465a49187e173f'
c2bf5403 Add 'src/module_vm4ms/' from commit '1964e93a80658175d7219d374f415915d437ebca'
1baf900a Add 'src/module_vmap/' from commit 'b7d5d7bc0bec652799caeff229148b054efe23ab'
75862146 Add 'src/app_vmap/' from commit '130d2a058c69dd9a6aebb14ebe52ccc7e2cad5ef'
a68b68c9 Add 'src/vitis/' from commit 'bcaa41e5e4eb2a40c59aa0f99f10add1ff2f1d11'
5af452f8 Move shell scripts
13b9cebd Move shell scripts
0b4326c6 Reset deps
a062f9f0 Reset deps
1dab44ca Add symlinks to gitignore
07c6c2e4 gitignore
3fb87b3a add dependencies
3e811f91 add symlinks to gitignore
e848ea8c add symlinks to gitignore
bbd5526b Creating init_vmap_symlinks.sh
817df15f Add 'deps/module_cadastreV2/' from commit '812b365ac7f5854814f9b7abe089e96d522b1a37'
34bcdf16 Add 'deps/module_cadastre/' from commit 'a7611084f351207cc02d36ddd089dd74e64059e8'
99b617d2 Add 'deps/module_anc/' from commit '8f732f9f4f9ba00a01faa6c38e465a49187e173f'
21345563 Add 'deps/module_vm4ms/' from commit '1964e93a80658175d7219d374f415915d437ebca'
a847d327 Add 'deps/module_vmap/' from commit 'b7d5d7bc0bec652799caeff229148b054efe23ab'
c3ee4af8 Add 'deps/app_vmap/' from commit '130d2a058c69dd9a6aebb14ebe52ccc7e2cad5ef'
a90c77c1 Add 'deps/vitis/' from commit 'bcaa41e5e4eb2a40c59aa0f99f10add1ff2f1d11'
572ad9d0 tests
46710ed0 Creating init_vmap_subtrees.sh
aa840d19 Add 'repos/module_cadastreV2/' from commit '812b365ac7f5854814f9b7abe089e96d522b1a37'
c11c8793 Add 'repos/module_cadastre/' from commit 'a7611084f351207cc02d36ddd089dd74e64059e8'
1ac8b86e Add 'repos/module_anc/' from commit '8f732f9f4f9ba00a01faa6c38e465a49187e173f'
ae675e02 Add 'repos/module_vm4ms/' from commit '1964e93a80658175d7219d374f415915d437ebca'
b5ef4148 Add 'repos/module_vmap/' from commit 'b7d5d7bc0bec652799caeff229148b054efe23ab'
b333c144 Add 'repos/app_vmap/' from commit '130d2a058c69dd9a6aebb14ebe52ccc7e2cad5ef'
2363b164 Add 'repos/vitis/' from commit 'bcaa41e5e4eb2a40c59aa0f99f10add1ff2f1d11'
042aa0c1 Creating init_vitis
af6cee51 revert
e14a7a33 Change index title
e26aafea Merge commit 'fb2e2c6d0289369bec53b1b48d503b5e7bcbdc93'
874e6ef1 Add update script
78768a91 Add update script
b7d5d7bc Mise à jour titre
fb2e2c6d Mise à jour titre
cfd4fb05 Add init_vmap.sh
7917c765 Add 'vmap/vas/sql/cadastreV2/' from commit '33e450da5b4f99e3e5bfbc7f2e8ecb43232770a7'
fdd9b3a0 Add 'vmap/vas/rest/ws/cadastreV2/' from commit '4f833ebc047fe8c9fdb22170dc60192fe8150eb0'
4f3407c0 Add 'vmap/vas/rest/conf/cadastreV2/' from commit '5f14ce4c85b7a0d8a986d895abd2c28003cd7043'
a371f3f4 Add 'vmap/vas/rest/ws/cadastre/' from commit '40766c0744b334aa5e042a032f9d80bbe46c9678'
29fba9ee Add 'vmap/vas/rest/conf/cadastre/' from commit '2a0bf9870bd886014cd5d3af61b57234c0b109f5'
92400fa3 Add 'vmap/vas/sql/anc/' from commit '627a911579c951b47e95d6cd77fa81513b25517b'
a04bf01d Add 'vmap/vas/rest/ws/anc/' from commit 'd2fdf3ca2bf16131fe3d659780e97f2cc3a25fef'
ea7a3cec Add 'vmap/vas/rest/conf/anc/' from commit 'aae628ed0a5d6a0449153edc287a6d392bb18d0c'
64a2cac7 Add 'vmap/client/modules/anc/' from commit '3a4bd963c057f42ccfbf98c94c8239ad4aaed327'
9807de57 Add 'vmap/vas/sql/vm4ms/' from commit '36eaf20a3d9e8be46130be3a3f88c469d2f6c1e1'
7e510b3b Add 'vmap/vas/rest/ws/vm4ms/' from commit '3062a55117c3d6dc99b81137eb496363d0a72bbc'
0e1e3e3d Add 'vmap/vas/rest/conf/vm4ms/' from commit '888c2e558c7f460cc88c86b044a616cfd1812734'
6a47c5ac Add 'vmap/client/modules/vm4ms/' from commit '19e9a5a224016b8daf84ab7ec9945d9f59fa4af5'
d7433f0b Add 'vmap/vas/sql/vmap/' from commit '34d982caa3c2feb96dfb0535025dbceabcc303f2'
98532183 Add 'vmap/vas/rest/ws/vmap/' from commit 'ed196105ef260cdb7df82bfa280d91e7c82deacc'
8deebc14 Add 'vmap/vas/rest/conf/vmap/' from commit '4045e8b4562965dcb2adbe13ce068942a808c699'
7ac7bba7 Add init_vmap.sh
fa7787d5 Add init_vmap.sh
f7e19860 Add init_vmap.sh
66353d81 Add init_vmap.sh
3e103de3 Add 'vmap/client/modules/vmap/' from commit 'adad985e12db139f57bd5971993b3ec7cf40b179'
4b006774 Add init_vmap.sh
49a55188 Add 'vmap/client/conf/' from commit '130d2a058c69dd9a6aebb14ebe52ccc7e2cad5ef'
08151921 working dependencies
3448d57f Add 'vmap/conf/' from commit '130d2a058c69dd9a6aebb14ebe52ccc7e2cad5ef'
efac8988 Add 'vmap/' from commit '8cd2ae16781332203514d230e251fc1f60a7cd8f'
3f7a9897 rm subtree
80f4cada Add '.vim/bundle/tpope-vim-surround/' from commit '8cd2ae16781332203514d230e251fc1f60a7cd8f'
a7611084 add files from SVN
40766c07 add files from SVN
2a0bf987 add files from SVN
b765e167 Ajout de README.md
812b365a add files from SVN
33e450da add files from SVN
4f833ebc add files from SVN
5f14ce4c add files from SVN
58e7f3bc Ajout de README.md
130d2a05 add conf files
47892bd3 Ajout de README.md
4cceb35f Update README.md
1964e93a add files from SVN
36eaf20a add files from SVN
3062a551 add files from SVN
888c2e55 add files from SVN
19e9a5a2 add files from SVN
b5d0f5aa Ajout de README.md
9426236c Changement date
adad985e Changement date
7c9b5db3 changement date
28bc6249 changement date
34d982ca Migrating files from SVN
ed196105 Migrating files from SVN
4045e8b4 Migrating files from SVN
2fed36ff Migrating files from SVN
4bfbbc52 Migrating files from SVN
8f732f9f Migrating files from SVN
627a9115 Migrating files from SVN
d2fdf3ca Migrating files from SVN
aae628ed Migrating files from SVN
3a4bd963 Migrating files from SVN
8479039c Ajout de README.md
387343e6 Ajout de README.md
2b3f8b19 Ajout de README.md

git-subtree-dir: src/vitis
git-subtree-split: 9862a97c1f97af47278e75b927a91d2603c53b47
---
 _install/dependencies/pycron/crontab.txt      |  15 +-
 .../externs/formReader/formReaderDrtv.js      |  12 +-
 .../externs/formReader/formReaderSrvc.js      |  30 +-
 vas/doc/index.phtml                           |  12 +-
 vas/doc/swagger.php                           |   5 +-
 vas/rest/index.phtml                          |   4 +-
 vas/rest/ws/vitis/Properties.class.inc        |  26 +-
 vas/rest/ws/vitis/Versions.class.inc          | 404 +++++++++---------
 vas/util/printserver/client/map/map.js        |  34 +-
 9 files changed, 300 insertions(+), 242 deletions(-)

diff --git a/_install/dependencies/pycron/crontab.txt b/_install/dependencies/pycron/crontab.txt
index 7f7bab4c..dff3a495 100755
--- a/_install/dependencies/pycron/crontab.txt
+++ b/_install/dependencies/pycron/crontab.txt
@@ -1,6 +1,9 @@
-#<gtf_subscription [ServerName] [vasDir]>
-0 23 * * * "[engineDir]/php/php" "[engineDir]/subscription.php" 1
-0 23 * * mon "[engineDir]/php/php" "[engineDir]/subscription.php" 2
-0 23 1 * * "[engineDir]/php/php" "[engineDir]/subscription.php" 3
-*/5 * * * * "[engineDir]/php/php" "[engineDir]/subscription.php" 4
-#</gtf_subscription [ServerName] [vasDir]>
\ No newline at end of file
+#<gtf_subscription [SERVER_NAME] [ENGINE_DIR]>
+0 23 * * * "[PHP_PATH]" "[ENGINE_DIR]/subscription.php" 1
+0 23 * * mon "[PHP_PATH]" "[ENGINE_DIR]/subscription.php" 2
+0 23 1 * * "[PHP_PATH]" "[ENGINE_DIR]/subscription.php" 3
+*/5 * * * * "[PHP_PATH]" "[ENGINE_DIR]/subscription.php" 4
+#</gtf_subscription [ServerName] [ENGINE_DIR]>
+#<gtf_message [SERVER_NAME] [MESSAGE_DIR]>
+*/1 * * * * "[PHP_PATH]" "[MESSAGE_DIR]/processMessages.php" 4
+#</gtf_message [SERVER_NAME] [MESSAGE_DIR]>
\ No newline at end of file
diff --git a/client/javascript/externs/formReader/formReaderDrtv.js b/client/javascript/externs/formReader/formReaderDrtv.js
index 283bbc43..48e7a37a 100644
--- a/client/javascript/externs/formReader/formReaderDrtv.js
+++ b/client/javascript/externs/formReader/formReaderDrtv.js
@@ -176,6 +176,8 @@ formReader.formReaderDirective = function ($q, formReaderService, propertiesSrvc
                                 }
                         });
                     });
+                } else {
+                    console.error('Error: form not valid');
                 }
             };
 
@@ -711,6 +713,9 @@ formReader.appFormFieldSpecificParamsDrtv = function ($timeout, $translate, prop
                     $(element)["datetimepicker"](oOptions);
 
                     // Si sélection d'une date : mise à jour du modèle (NE PAS SUPPRIMER!).
+                    $(element).on("dp.hide", function (e) {
+                        scope["oFormValues"][scope["sFormDefinitionName"]][element[0].name] = element[0].value;
+                    });
                     $(element).on("dp.change", function (e) {
                         scope["oFormValues"][scope["sFormDefinitionName"]][element[0].name] = element[0].value;
                     });
@@ -2151,8 +2156,8 @@ formReader.appSubformGridDrtv = function ($timeout, $translate, propertiesSrvc,
 
                                     // Récupère lélément en sélectionné
                                     formReaderService['getWebServiceData'](oFormWebService).then(function (aResult) {
-
                                         var oSubformDefinition = aResult[0]['bo_json_form'];
+                                        var sSubformJSDefinition = aResult[0]['bo_json_form_js'];
                                         var oSubformValues = {};
                                         var sModalId = 'formreader_' + scope['sFormUniqueName'] + '_grid_subform_modal';
 
@@ -2219,7 +2224,7 @@ formReader.appSubformGridDrtv = function ($timeout, $translate, propertiesSrvc,
                                             }
                                         });
 
-                                        formReaderService['showModalSubform'](sModalId, oSubformScope, oSubformDefinition, sSubformDefinitionName, oSubformValues);
+                                        formReaderService['showModalSubform'](sModalId, oSubformScope, oSubformDefinition, sSubformDefinitionName, oSubformValues, sSubformJSDefinition);
                                     });
                                 };
 
@@ -2247,6 +2252,7 @@ formReader.appSubformGridDrtv = function ($timeout, $translate, propertiesSrvc,
                         };
                         var sModalId = 'formreader_' + scope['sFormUniqueName'] + '_grid_subform_modal';
                         var oSubformDefinition = oBusinessObject['json_form'][0];
+                        var sSubformJSDefinition = oBusinessObject['json_form_js'];
                         var sSubformDefinitionName = 'insert';
 
                         // Grise le champ contenant la valeur du parent
@@ -2288,7 +2294,7 @@ formReader.appSubformGridDrtv = function ($timeout, $translate, propertiesSrvc,
                                 });
                             });
                         };
-                        formReaderService['showModalSubform'](sModalId, oSubformScope, oSubformDefinition, sSubformDefinitionName, oSubformValues);
+                        formReaderService['showModalSubform'](sModalId, oSubformScope, oSubformDefinition, sSubformDefinitionName, oSubformValues, sSubformJSDefinition);
                     };
 
                     /**
diff --git a/client/javascript/externs/formReader/formReaderSrvc.js b/client/javascript/externs/formReader/formReaderSrvc.js
index 6ca6ef29..613652f9 100644
--- a/client/javascript/externs/formReader/formReaderSrvc.js
+++ b/client/javascript/externs/formReader/formReaderSrvc.js
@@ -1230,15 +1230,15 @@ formReader.formReaderService = function ($translate, $rootScope, $q, $log, $time
          * @param {object} oSubformDefinition
          * @param {object} oSubformDefinitionName
          * @param {object} oSubformValues
+         * @param {string|null} sSubformJSDefinition
          */
-        "showModalSubform": function (sModalId, oSubformScope, oSubformDefinition, oSubformDefinitionName, oSubformValues) {
+        "showModalSubform": function (sModalId, oSubformScope, oSubformDefinition, oSubformDefinitionName, oSubformValues, sSubformJSDefinition) {
             $log.log("showModalSubform");
 
             var sToken = this['sToken'];
             var oProperties = this['oProperties'];
 
-            if (goog.isDefAndNotNull(oSubformScope['loadSubForm'])) {
-
+            var loadForm = function(){
                 oSubformScope['loadSubForm']({
                     'sFormDefinitionName': oSubformDefinitionName,
                     'oFormDefinition': oSubformDefinition,
@@ -1246,6 +1246,30 @@ formReader.formReaderService = function ($translate, $rootScope, $q, $log, $time
                     'oProperties': oProperties,
                     'sToken': sToken
                 });
+            }
+
+            if (goog.isDefAndNotNull(oSubformScope['loadSubForm'])) {
+
+                if (goog.isDefAndNotNull(sSubformJSDefinition)) {
+                    var sUrl = sSubformJSDefinition;
+                    oVmap.log("initHtmlForm : javascript assoc. to : " + sUrl);
+                    loadExternalJs([sUrl], {
+                        "callback": function () {
+                            loadForm();
+                            try {
+                                if (goog.isDef(constructor_form)) {
+                                    constructor_form(oSubformScope, sUrl);
+                                }
+                            } catch (e) {
+                                oVmap.log("constructor_form does not exist");
+                            }
+                        },
+                        "async": true,
+                        "scriptInBody": true
+                    });
+                } else {
+                    loadForm();
+                }
 
                 $('#' + sModalId).modal('show');
             }
diff --git a/vas/doc/index.phtml b/vas/doc/index.phtml
index 086cb768..d4fedf02 100755
--- a/vas/doc/index.phtml
+++ b/vas/doc/index.phtml
@@ -1,6 +1,9 @@
 <?php
 session_start();
-require_once '../rest/conf/properties.inc';
+
+$_SERVER['VAS_PATH'] = pathinfo(dirname($_SERVER['SCRIPT_FILENAME']))['dirname'];
+
+require_once $_SERVER['VAS_PATH'] . '/rest/conf/properties.inc';
 
 function returnOverview($sFolder, $parent) {
     $aModules = array();
@@ -17,10 +20,12 @@ function returnOverview($sFolder, $parent) {
             }
         }
     }
+
     return $aModules;
 }
 
-$aOverview = returnOverview(__DIR__ . "/../rest/ws", "");
+$aOverview = returnOverview($_SERVER['VAS_PATH'] . "/rest/ws", "");
+error_log('$aOverview: '. print_r($aOverview, true));
 ?>
 
 <!DOCTYPE html>
@@ -59,7 +64,7 @@ $aOverview = returnOverview(__DIR__ . "/../rest/ws", "");
                     sToken = json.PrivateToken.token;
                 }   else {
                     sToken = code[0].outerText.split('<token>')[1].split('</token>')[0];
-                }  
+                }
                 if (sToken != "") {
                 $("input[name='token']").each(function () {
                     $(this).attr("value", sToken);
@@ -154,4 +159,3 @@ foreach ($aOverview as $key => $value) {
         </div>
     </body>
 </html>
-
diff --git a/vas/doc/swagger.php b/vas/doc/swagger.php
index 3437171a..aca8acff 100755
--- a/vas/doc/swagger.php
+++ b/vas/doc/swagger.php
@@ -1,8 +1,9 @@
 <?php
+$_SERVER['VAS_PATH'] = pathinfo(dirname($_SERVER['SCRIPT_FILENAME']))['dirname'];
 header('Content-Type: application/json');
-require_once "../rest/conf/properties.inc";
+require_once $_SERVER['VAS_PATH'] . "/rest/conf/properties.inc";
 require("vendor/autoload.php");
-$swagger = \Swagger\scan('../rest/ws/'.$_REQUEST['service']);
+$swagger = \Swagger\scan($_SERVER['VAS_PATH'] . '/rest/ws/'.$_REQUEST['service']);
 $aServer = explode("://", $properties["web_server_name"]);
 $swagger = str_replace("[service_alias]", $properties["services_alias"], $swagger);
 $swagger = str_replace("[protocol]", $aServer[0], $swagger);
diff --git a/vas/rest/index.phtml b/vas/rest/index.phtml
index 86af3b21..d4b4cffa 100755
--- a/vas/rest/index.phtml
+++ b/vas/rest/index.phtml
@@ -1,5 +1,7 @@
 <?php
 
+$_SERVER['VAS_PATH'] = pathinfo(dirname($_SERVER['SCRIPT_FILENAME']))['dirname'];
+
 require_once("class/vitis_lib/VitisError.class.inc");
 require_once("class/vmlib/cryptUtil.inc");
 require_once("conf/properties.inc");
@@ -199,4 +201,4 @@ function customErrorHandler ($errno, $errstr, $errfile, $errline, $context){
 }
 
 include ("index.vhtml");
-?>
\ No newline at end of file
+?>
diff --git a/vas/rest/ws/vitis/Properties.class.inc b/vas/rest/ws/vitis/Properties.class.inc
index d363c986..c7f65b41 100755
--- a/vas/rest/ws/vitis/Properties.class.inc
+++ b/vas/rest/ws/vitis/Properties.class.inc
@@ -14,7 +14,7 @@ require_once(__DIR__ . '/../../class/vmlib/BdDataAccess.inc');
  * 	\brief This file contains the Properties php class
  *
  * This class defines the rest api for properties
- * 
+ *
  */
 class Properties extends Vitis {
     /**
@@ -53,7 +53,7 @@ class Properties extends Vitis {
     }
 
     /**
-     * @SWG\Get(path="/properties", 
+     * @SWG\Get(path="/properties",
      *   tags={"Properties"},
      *   summary="Get properties",
      *   description="Request to get properties",
@@ -75,7 +75,7 @@ class Properties extends Vitis {
      */
 
     /**
-     * 
+     *
      * @return properties
      */
     function GET() {
@@ -85,19 +85,19 @@ class Properties extends Vitis {
         } else {
             $this->aFields = $this->aProperties;
         }
-        require_once __DIR__ . "/../../conf/version.inc";
+        require_once dirname($_SERVER['SCRIPT_FILENAME']) . "/conf/version.inc";
 
         if (VM_STATUS != "STABLE") {
             $this->aFields['VM_STATUS'] = "UNSTABLE";
         } else {
             $this->aFields['VM_STATUS'] = "STABLE";
-            if ($pointeur = opendir(__DIR__ . "/../../conf/")) {
+            if ($pointeur = opendir(dirname($_SERVER['SCRIPT_FILENAME']) . "/conf/")) {
                 while (($fichier = readdir($pointeur)) !== false) {
 
                     if (($fichier != '.') && ($fichier != '..')) {
 
-                        if (is_dir(__DIR__ . "/../../conf/" . $fichier)) {
-                            $sTexte = file_get_contents(__DIR__ . "/../../conf/" . $fichier . "/version.inc");
+                        if (is_dir(dirname($_SERVER['SCRIPT_FILENAME']) . "/conf/" . $fichier)) {
+                            $sTexte = file_get_contents(dirname($_SERVER['SCRIPT_FILENAME']) . "/conf/" . $fichier . "/version.inc");
 
                             if (strpos($sTexte, "define (\"VM_STATUS\", \"STABLE\");") == false) {
                                 $this->aFields['VM_STATUS'] = "UNSTABLE";
@@ -216,7 +216,7 @@ class Properties extends Vitis {
      *         description="Poprerties Response",
      *         @SWG\Schema(ref="#/definitions/properties")
      *     ),
-     * 
+     *
      *  )
      */
 
@@ -299,7 +299,7 @@ class Properties extends Vitis {
             // Message de retour
             $aMessage = array('status' => REQUEST_SUCCESS);
 
-            // Ouverture de php	
+            // Ouverture de php
             $sPropertiesFile = PHP_START . PHP_EOL;
 
             // Texte à ajouter avant le tableau des properties
@@ -343,14 +343,14 @@ class Properties extends Vitis {
                 $sPropertiesFile .= PROPERTIES_FOOTER . PHP_EOL;
             }
 
-            // Fermeture de php	
+            // Fermeture de php
             $sPropertiesFile .= PHP_END;
 
             // Sauve le fichier (LOCK_EX = accés exclusif au fichier)
             if ($this->aValues['module_name'] == 'vitis')
-                $sPathProperties = __DIR__ . '/../../conf/properties.inc';
+                $sPathProperties = dirname($_SERVER['SCRIPT_FILENAME']) . '/conf/properties.inc';
             else
-                $sPathProperties = __DIR__ . '/../../conf/' . $this->aValues['module_name'] . '/properties.inc';
+                $sPathProperties = dirname($_SERVER['SCRIPT_FILENAME']) . '/conf/' . $this->aValues['module_name'] . '/properties.inc';
             //
             if (file_put_contents($sPathProperties, $sPropertiesFile, LOCK_EX) === false)
                 $aReturn = array('status' => 0, 'message' => "FORM_ERROR_FILE_WRITING_CONFIGURATION");
@@ -424,4 +424,4 @@ class Properties extends Vitis {
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/vas/rest/ws/vitis/Versions.class.inc b/vas/rest/ws/vitis/Versions.class.inc
index 62b9cfcc..3a20a659 100755
--- a/vas/rest/ws/vitis/Versions.class.inc
+++ b/vas/rest/ws/vitis/Versions.class.inc
@@ -1,204 +1,202 @@
-<?php
-
-require_once 'Vitis.class.inc';
-require_once __DIR__ . '/../../class/vitis_lib/Connection.class.inc';
-require_once __DIR__ . '/../../class/vmlib/BdDataAccess.inc';
-
-/**
- * \file versions.class.inc
- * \class Versions
- *
- * \author Yoann Perollet <yoann.perollet@veremes.com>.
- *
- * 	\brief This file contains the Versions php class
- *
- * This class defines the rest api for versions
- * 
- */
-class Versions extends Vitis {
-    /**
-     * @SWG\Definition(
-     *   definition="/versions",
-     *   allOf={
-     *     @SWG\Schema(ref="#/definitions/versions")
-     *   }
-     * )
-     * @SWG\Tag(
-     *   name="Versions",
-     *   description="Operations about versions"
-     * )
-     */
-
-    /**
-     * construct
-     * @param type $aPath url of the request
-     * @param type $aValues parameters of the request
-     * @param type $versions ptroperties
-     */
-    function __construct($aPath, $aValues, $properties) {
-        $this->aValues = $aValues;
-        $this->aPath = $aPath;
-        $this->aProperties = $properties;
-        if (!empty($this->aValues['token'])) {
-            $this->oConnection = new Connection($this->aValues, $this->aProperties);
-        }
-    }
-
-    /**
-     * @SWG\Get(path="/versions",
-     *   tags={"Versions"},
-     *   summary="Get versions",
-     *   description="Request to get versions",
-     *   operationId="GET",
-     *   produces={"application/xml", "application/json", "application/x-vm-json"},
-     *   @SWG\Parameter(
-     *     name="token",
-     *     in="query",
-     *     description="user token",
-     *     required=false,
-     *     type="string"
-     *   ),
-     *  @SWG\Response(
-     *         response=200,
-     *         description="Poprerties Response",
-     *         @SWG\Schema(ref="#/definitions/versions")
-     *     )
-     *  )
-     */
-
-    /**
-     * 
-     * @return versions
-     */
-    function GET() {
-        if ($this->oConnection->oError == null) {
-            $this->getVersion();
-            if (!empty($this->aValues['token']) && in_array("vitis_admin", $this->oConnection->aPrivileges)) {
-
-                //$this->aFields = $this->aVersions;
-                $this->aFields['php_version'] = phpversion();
-
-                //*** PDO
-                $bPdo = false;
-                if (extension_loaded('pdo'))
-                    $bPdo = true;
-                else
-                    $bVeremap = false;
-                $this->aFields['pdo_extension_loaded'] = $bPdo;
-
-                //*** PDO Postgresql
-                $bPdoPgsql = false;
-                if (extension_loaded('pdo_pgsql'))
-                    $bPdoPgsql = true;
-                else
-                    $bVeremap = false;
-                $this->aFields['pdo_pgsql_extension_loaded'] = $bPdoPgsql;
-
-                //*** Curl
-                $bCurl = false;
-                if (extension_loaded('curl'))
-                    $bCurl = true;
-                else
-                    $bVeremap = false;
-                $this->aFields['curl_extension_loaded'] = $bCurl;
-
-                //*** Xsl
-                $bXsl = false;
-                if (extension_loaded('xsl'))
-                    $bXsl = true;
-                $this->aFields['xsl_extension_loaded'] = $bXsl;
-
-                //*** Ldap
-                $bLdap = false;
-                if (extension_loaded('ldap'))
-                    $bLdap = true;
-                $this->aFields['ldap_extension_loaded'] = $bLdap;
-
-                // OS.
-                $this->aFields['os_version'] = php_uname();
-
-                // Info disque.
-                $this->aFields['disk_free_space'] = round(disk_free_space("/") / 1073741824) . ' Go';
-                $this->aFields['disk_total_space'] = round(disk_total_space("/") / 1073741824) . ' Go';
-
-                //
-                $this->aFields['server_software'] = $_SERVER['SERVER_SOFTWARE'];
-                $this->aFields['server_addr'] = $_SERVER['SERVER_ADDR'];
-                $this->aFields['server_name'] = $_SERVER['SERVER_NAME'];
-                $this->aFields['server_port'] = $_SERVER['SERVER_PORT'];
-
-                //** Postgresql et Postgis
-                $bPostgresql = false;
-                $bPostgis = false;
-                if (!$this->oConnection->oBd->erreurRencontree) {
-                    $bPostgresql = true;
-                    $sSql = "SHOW server_version";
-                    $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, array());
-                    $oPgVersion = $this->oConnection->oBd->objetSuivant($oPDOresult);
-                    $sPostgresql = $oPgVersion->server_version;
-                    $this->aFields['postgresql_version'] = $sPostgresql;
-                    $this->oConnection->oBd->fermeResultat();
-
-                    $aVersion = explode(".", $sPostgresql);
-                    $bExtension = false;
-                    if ($aVersion[0] >= 9) {
-                        if ($aVersion[1] >= 1) {
-                            $bExtension = true;
-                        }
-                    }
-                    if ($bExtension == true) {
-                        $sSql = "SELECT default_version FROM pg_catalog.pg_available_extensions where name = 'postgis';";
-                        $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, array());
-                        if ($aPostgis = $this->oConnection->oBd->ligneSuivante($oPDOresult)) {
-                            $bPostgis = true;
-                            $sPostgis = $aPostgis['default_version'];
-                        } else {
-                            $bPostgis = false;
-                        }
-                    } else {
-                        $sSql = "SELECT datname FROM pg_catalog.pg_database where datname = 'template_postgis_20';";
-                        $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, array());
-                        if ($aPostgis = $this->oConnection->oBd->ligneSuivante($oPDOresult)) {
-                            $bPostgis = true;
-                            $sPostgis = '2.0';
-                        } else {
-                            $bPostgis = false;
-                        }
-                    }
-                    $this->aFields['postgis_version'] = $sPostgis;
-                    $this->oConnection->oBd->fermeResultat();
-                    $sSql = 'SELECT distinct module_id from [sSchemaFramework].vm_mode';
-                    $aParams['sSchemaFramework'] = array('value' => $this->aProperties['schema_framework'], 'type' => 'schema_name');
-                    $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, $aParams);
-                    while ($aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult)) {
-                        $aModules[] = $aLigne['module_id'];
-                    }
-                    $iRecordset = $this->oConnection->oBd->fermeResultat();
-                }
-                $this->aFields['postgresql'] = $bPostgresql;
-                $this->aFields['postgis'] = $bPostgis;
-
-                // Recherche de mise à jour
-                // 
-                if (!empty($this->aValues['app'])) {
-                    $sUrl = "http://update.veremes.net/vai/" . $this->aValues['app'] . ".json";
-                    $json = file_get_contents($sUrl);
-                    $data = json_decode($json, TRUE);
-                    $this->aFields['appVersion'] = $data['version'];
-                }
-            }
-            $aXmlRacineAttribute['status'] = 1;
-            $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);
-        } else {
-            http_response_code(403);
-            $aXmlRacineAttribute['status'] = 0;
-            $this->aFields['errorMessage'] = "ERROR : invalid token";
-            $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);
-        }
-
-        return $sMessage;
-    }
-
-}
-
+<?php
+
+require_once 'Vitis.class.inc';
+require_once __DIR__ . '/../../class/vitis_lib/Connection.class.inc';
+require_once __DIR__ . '/../../class/vmlib/BdDataAccess.inc';
+
+/**
+ * \file versions.class.inc
+ * \class Versions
+ *
+ * \author Yoann Perollet <yoann.perollet@veremes.com>.
+ *
+ * 	\brief This file contains the Versions php class
+ *
+ * This class defines the rest api for versions
+ * 
+ */
+class Versions extends Vitis {
+    /**
+     * @SWG\Definition(
+     *   definition="/versions",
+     *   allOf={
+     *     @SWG\Schema(ref="#/definitions/versions")
+     *   }
+     * )
+     * @SWG\Tag(
+     *   name="Versions",
+     *   description="Operations about versions"
+     * )
+     */
+
+    /**
+     * construct
+     * @param type $aPath url of the request
+     * @param type $aValues parameters of the request
+     * @param type $versions ptroperties
+     */
+    function __construct($aPath, $aValues, $properties) {
+        $this->aValues = $aValues;
+        $this->aPath = $aPath;
+        $this->aProperties = $properties;
+        if (!empty($this->aValues['token'])) {
+            $this->oConnection = new Connection($this->aValues, $this->aProperties);
+        }
+    }
+
+    /**
+     * @SWG\Get(path="/versions",
+     *   tags={"Versions"},
+     *   summary="Get versions",
+     *   description="Request to get versions",
+     *   operationId="GET",
+     *   produces={"application/xml", "application/json", "application/x-vm-json"},
+     *   @SWG\Parameter(
+     *     name="token",
+     *     in="query",
+     *     description="user token",
+     *     required=false,
+     *     type="string"
+     *   ),
+     *  @SWG\Response(
+     *         response=200,
+     *         description="Poprerties Response",
+     *         @SWG\Schema(ref="#/definitions/versions")
+     *     )
+     *  )
+     */
+
+    /**
+     * 
+     * @return versions
+     */
+    function GET() {
+        if ($this->oConnection->oError == null) {
+            $this->getVersion();
+            if (!empty($this->aValues['token']) && in_array("vitis_admin", $this->oConnection->aPrivileges)) {
+
+                //$this->aFields = $this->aVersions;
+                $this->aFields['php_version'] = phpversion();
+
+                //*** PDO
+                $bPdo = false;
+                if (extension_loaded('pdo'))
+                    $bPdo = true;
+                else
+                    $bVeremap = false;
+                $this->aFields['pdo_extension_loaded'] = $bPdo;
+
+                //*** PDO Postgresql
+                $bPdoPgsql = false;
+                if (extension_loaded('pdo_pgsql'))
+                    $bPdoPgsql = true;
+                else
+                    $bVeremap = false;
+                $this->aFields['pdo_pgsql_extension_loaded'] = $bPdoPgsql;
+
+                //*** Curl
+                $bCurl = false;
+                if (extension_loaded('curl'))
+                    $bCurl = true;
+                else
+                    $bVeremap = false;
+                $this->aFields['curl_extension_loaded'] = $bCurl;
+
+                //*** Xsl
+                $bXsl = false;
+                if (extension_loaded('xsl'))
+                    $bXsl = true;
+                $this->aFields['xsl_extension_loaded'] = $bXsl;
+
+                //*** Ldap
+                $bLdap = false;
+                if (extension_loaded('ldap'))
+                    $bLdap = true;
+                $this->aFields['ldap_extension_loaded'] = $bLdap;
+
+                // OS.
+                $this->aFields['os_version'] = php_uname();
+
+                // Info disque.
+                $this->aFields['disk_free_space'] = round(disk_free_space("/") / 1073741824) . ' Go';
+                $this->aFields['disk_total_space'] = round(disk_total_space("/") / 1073741824) . ' Go';
+
+                //
+                $this->aFields['server_software'] = $_SERVER['SERVER_SOFTWARE'];
+                $this->aFields['server_addr'] = $_SERVER['SERVER_ADDR'];
+                $this->aFields['server_name'] = $_SERVER['SERVER_NAME'];
+                $this->aFields['server_port'] = $_SERVER['SERVER_PORT'];
+
+                //** Postgresql et Postgis
+                $bPostgresql = false;
+                $bPostgis = false;
+                if (!$this->oConnection->oBd->erreurRencontree) {
+                    $bPostgresql = true;
+                    $sSql = "SHOW server_version";
+                    $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, array());
+                    $oPgVersion = $this->oConnection->oBd->objetSuivant($oPDOresult);
+                    $sPostgresql = $oPgVersion->server_version;
+                    $this->aFields['postgresql_version'] = $sPostgresql;
+                    $this->oConnection->oBd->fermeResultat();
+
+                    $aVersion = explode(".", $sPostgresql);
+                    $bExtension = false;
+                    if ($aVersion[0] . $aVersion[1] >= 91) {
+                        $bExtension = true;
+                    }
+                    if ($bExtension == true) {
+                        $sSql = "SELECT default_version FROM pg_catalog.pg_available_extensions where name = 'postgis';";
+                        $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, array());
+                        if ($aPostgis = $this->oConnection->oBd->ligneSuivante($oPDOresult)) {
+                            $bPostgis = true;
+                            $sPostgis = $aPostgis['default_version'];
+                        } else {
+                            $bPostgis = false;
+                        }
+                    } else {
+                        $sSql = "SELECT datname FROM pg_catalog.pg_database where datname = 'template_postgis_20';";
+                        $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, array());
+                        if ($aPostgis = $this->oConnection->oBd->ligneSuivante($oPDOresult)) {
+                            $bPostgis = true;
+                            $sPostgis = '2.0';
+                        } else {
+                            $bPostgis = false;
+                        }
+                    }
+                    $this->aFields['postgis_version'] = $sPostgis;
+                    $this->oConnection->oBd->fermeResultat();
+                    $sSql = 'SELECT distinct module_id from [sSchemaFramework].vm_mode';
+                    $aParams['sSchemaFramework'] = array('value' => $this->aProperties['schema_framework'], 'type' => 'schema_name');
+                    $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, $aParams);
+                    while ($aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult)) {
+                        $aModules[] = $aLigne['module_id'];
+                    }
+                    $iRecordset = $this->oConnection->oBd->fermeResultat();
+                }
+                $this->aFields['postgresql'] = $bPostgresql;
+                $this->aFields['postgis'] = $bPostgis;
+
+                // Recherche de mise à jour
+                // 
+                if (!empty($this->aValues['app'])) {
+                    $sUrl = "http://update.veremes.net/vai/" . $this->aValues['app'] . ".json";
+                    $json = file_get_contents($sUrl);
+                    $data = json_decode($json, TRUE);
+                    $this->aFields['appVersion'] = $data['version'];
+                }
+            }
+            $aXmlRacineAttribute['status'] = 1;
+            $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);
+        } else {
+            http_response_code(403);
+            $aXmlRacineAttribute['status'] = 0;
+            $this->aFields['errorMessage'] = "ERROR : invalid token";
+            $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);
+        }
+
+        return $sMessage;
+    }
+
+}
+
 ?>
\ No newline at end of file
diff --git a/vas/util/printserver/client/map/map.js b/vas/util/printserver/client/map/map.js
index 2a870d9a..d6dcd882 100755
--- a/vas/util/printserver/client/map/map.js
+++ b/vas/util/printserver/client/map/map.js
@@ -7,7 +7,7 @@
 PrintMap = function (opt_options) {
 
     var this_ = this;
-    
+
     this.mapSize = [document.getElementById('map').offsetWidth, document.getElementById('map').offsetHeight];
 
     this.tileSize = (isDef(window.oProperties.print.tile_size) && window.oProperties.print.features_zoom >= 0) ? window.oProperties.print.tile_size : 2048;
@@ -29,7 +29,7 @@ PrintMap = function (opt_options) {
     this.mapJsonParser = new MapJSON({
         'properties': window.oProperties
     });
-        
+
     this.view = this.mapJsonParser.getViewFromDef(this.mapDefinition, {
         'size': this.mapSize,
         'tileSize': [this.tileSize, this.tileSize]
@@ -39,13 +39,13 @@ PrintMap = function (opt_options) {
 
     this.extent = this.getExtent(opt_options);
 
-    this.tileGrid = this.getTileGridFromDefinition(this.tileSize);    
-    
+    this.tileGrid = this.getTileGridFromDefinition(this.tileSize);
+
     this.layers = this.mapJsonParser.getLayersFromDef(this.mapDefinition, {
         'size': this.mapSize,
         'tileSize': [this.tileSize, this.tileSize]
     });
-    
+
     this.map = this.setMap(this.layers, this.view);
 
     this.featuresOverlay = this.setFeaturesOverlay(this.map);
@@ -63,6 +63,9 @@ PrintMap = function (opt_options) {
     // Supprime tous les controls par défaut
     this.removeMapControls();
 
+    // Taille des icones en fonction de la résolution demandée
+    this.setMapSymbolsResolution(this.map, this.resolutionCoeff)
+
     // Si aucune étendue a été donnée et que seul un point a été donné, alors zoom sur this.defaultScale
     if (!isDef(opt_options.extent) && !isDef(this.features)) {
         if (this.features.length === 1 && this.features[0].getGeometry().getType() === 'Point') {
@@ -310,7 +313,7 @@ PrintMap.prototype.getFeaturesFromEWKT = function (aEWKTFeatures) {
 };
 
 /**
- * Return true if EWKTGeom is an EWKT geometry 
+ * Return true if EWKTGeom is an EWKT geometry
  * @param {string} EWKTGeom
  * @returns {boolean}
  */
@@ -367,4 +370,21 @@ PrintMap.prototype.getGeomFromEWKT = function (EWKTGeom, proj) {
         return null;
     }
 
-};
\ No newline at end of file
+};
+
+/**
+ * For WMS layers set MAP.RESOLUTION and MAP.DEFRESOLUTION to rise the symbols size
+ *
+ * @param  {object} olMap
+ * @param  {integer} resolutionCoeff
+ */
+PrintMap.prototype.setMapSymbolsResolution = function (olMap, resolutionCoeff) {
+
+    var newRes = resolutionCoeff * 72;
+    var aLayers = olMap.getLayers().getArray();
+    for (var i = 0; i < aLayers.length; i++) {
+        if (aLayers[i].get('type') === 'imagewms' || aLayers[i].get('type') === 'tilewms') {
+            aLayers[i].getSource().updateParams({'MAP.RESOLUTION': newRes, 'MAP.DEFRESOLUTION': 72});
+        }
+    }
+}
-- 
GitLab