Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
DoliSCAN
client-cordova
Commits
be9d51a1
Commit
be9d51a1
authored
Oct 28, 2021
by
Eric Seigne
Browse files
full switch to main webservices (ik)
parent
8b41b92c
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
www/choix-liste.html
View file @
be9d51a1
...
...
@@ -17,10 +17,12 @@
$
(
'
#title
'
).
empty
();
$
(
'
#liste
'
).
empty
();
//function functionChooseVille(label, slug, uid, fieldVille, fieldVilleSlug, fieldVilleUID, single = false) {
$
(
'
#title
'
).
append
(
page
.
data
.
title
);
let
html
=
""
;
for
(
i
=
0
;
i
<
page
.
data
.
btnNb
;
i
++
)
{
html
+=
"
<ons-list-item tappable onclick='
"
+
page
.
data
.
callFunction
+
"
(
\"
"
+
fixedEncodeURIComponent
(
page
.
data
.
btn
[
i
].
label
)
+
"
\"
,
\"
"
+
page
.
data
.
btn
[
i
].
slug
+
"
\"
,
\"
"
+
page
.
data
.
btn
[
i
].
ville
+
"
\"
,
\"
"
+
page
.
data
.
btn
[
i
].
villeSlug
+
"
\"
)'>
"
+
page
.
data
.
btn
[
i
].
label
+
"
</ons-list-item>
"
;
html
+=
"
<ons-list-item tappable onclick='
"
+
page
.
data
.
callFunction
+
"
(
\"
"
+
fixedEncodeURIComponent
(
page
.
data
.
btn
[
i
].
label
)
+
"
\"
,
\"
"
+
page
.
data
.
btn
[
i
].
slug
+
"
\"
,
\"
"
+
page
.
data
.
btn
[
i
].
uid
+
"
\"
,
\"
"
+
page
.
data
.
btn
[
i
].
ville
+
"
\"
,
\"
"
+
page
.
data
.
btn
[
i
].
villeSlug
+
"
\
"
,
\"
"
+
page
.
data
.
btn
[
i
].
villeUID
+
"
\"
,false,
"
+
page
.
data
.
btn
[
i
].
callbackfunction
+
"
,
"
+
JSON
.
stringify
(
page
.
data
.
btn
[
i
].
callbackargs
)
+
"
)'>
"
+
page
.
data
.
btn
[
i
].
label
+
"
</ons-list-item>
"
;
}
$
(
'
#liste
'
).
append
(
html
);
});
...
...
www/frais-ik.html
View file @
be9d51a1
...
...
@@ -48,11 +48,12 @@
<div
id=
"interobjets"
></div>
<div
style=
"display: flex; align-items:baseline;"
>
<ons-input
required
modifier=
"underbar"
float
name=
"depart"
id=
"depart"
type=
"text"
placeholder=
"Ville de départ (ou code postal)"
onchange=
"$('#departSlug').val('');"
></ons-input>
<ons-button
modifier=
"material"
id=
"btnSearchDepart"
onclick=
"searchVille('leformIK','depart', 'departSlug');"
><i
class=
"zmdi zmdi-cloud-outline zmdib"
></i></ons-button>
<ons-input
required
modifier=
"underbar"
float
name=
"depart"
id=
"depart"
type=
"text"
placeholder=
"Ville de départ (ou code postal)"
onchange=
"$('#departSlug').val('');
$('#departUID').val('');
"
></ons-input>
<ons-button
modifier=
"material"
id=
"btnSearchDepart"
onclick=
"searchVille('leformIK','depart', 'departSlug'
,'departUID'
);"
><i
class=
"zmdi zmdi-cloud-outline zmdib"
></i></ons-button>
</div>
<ons-list
style=
"clear: both;"
>
<input
type=
"hidden"
id=
"departSlug"
name=
"departSlug"
value=
""
>
<input
type=
"hidden"
id=
"departUID"
name=
"departUID"
value=
""
>
<ons-list-item
class=
"listeVille"
id=
"listeDepart"
expandable
data-role=
"listview"
data-filter=
"true"
data-filter-reveal=
"true"
data-input=
"#departSlug"
>
<span
class=
"translate"
>
favorites
</span>
</ons-list-item>
...
...
@@ -124,12 +125,13 @@
html
+=
"
<div id=
\"
interobjets
\"
></div>
"
;
html
+=
"
<div style=
\"
display: flex; align-items:baseline;
\"
>
"
;
html
+=
"
<ons-input required modifier=
\"
underbar
\"
float name=
\"
etape
"
+
nbEtape
+
"
\"
id=
\"
etape
"
+
nbEtape
+
"
\"
type=
\"
text
\"
placeholder=
\"
Étape
"
+
nbEtape
+
"
(ou code postal)
\"
onchange=
\"
$('#etape
"
+
nbEtape
+
"
Slug').val('');$('#etape
"
+
nbEtape
+
"
Distance').val('');
\"
></ons-input>
"
;
html
+=
"
<ons-input required modifier=
\"
underbar
\"
float name=
\"
etape
"
+
nbEtape
+
"
\"
id=
\"
etape
"
+
nbEtape
+
"
\"
type=
\"
text
\"
placeholder=
\"
Étape
"
+
nbEtape
+
"
(ou code postal)
\"
onchange=
\"
$('#etape
"
+
nbEtape
+
"
Slug').val('');$('#etape
"
+
nbEtape
+
"
Distance').val('');
$('#etape
"
+
nbEtape
+
"
UID').val('');
\"
></ons-input>
"
;
html
+=
"
<ons-input required modifier=
\"
underbar
\"
float name=
\"
etape
"
+
nbEtape
+
"
Distance
\"
id=
\"
etape
"
+
nbEtape
+
"
Distance
\"
type=
\"
number
\"
min=
\"
0
\"
max=
\"
5000
\"
placeholder=
\"
Distance
\"
style=
\"
width:6em;
\"
></ons-input>
"
;
html
+=
"
<ons-button modifier=
\"
material
\"
id=
\"
btnCalculDistanceEtape
"
+
nbEtape
+
"
\"
onclick=
\"
distanceAutomatiqueEtape('leformIK','etape
"
+
nbEtape
+
"
',
"
+
nbEtape
+
"
);
\"
><i class=
\"
zmdi zmdi-cloud-outline zmdib
\"
></i></ons-button>
"
;
html
+=
"
</div>
"
;
html
+=
"
<ons-list style=
\"
clear: both;
\"
>
"
;
html
+=
"
<input type=
\"
hidden
\"
id=
\"
etape
"
+
nbEtape
+
"
Slug
\"
name=
\"
etape
"
+
nbEtape
+
"
Slug
\"
value=
\"\"
>
"
;
html
+=
"
<input type=
\"
hidden
\"
id=
\"
etape
"
+
nbEtape
+
"
Slug
\"
name=
\"
etape
"
+
nbEtape
+
"
Slug
\"
value=
\"\"
>
"
;
html
+=
"
<input type=
\"
hidden
\"
id=
\"
etape
"
+
nbEtape
+
"
UID
\"
name=
\"
etape
"
+
nbEtape
+
"
UID
\"
value=
\"\"
>
"
;
html
+=
"
<ons-list-item class=
\"
listeVille
\"
id=
\"
listeEtape
"
+
nbEtape
+
"
\"
expandable data-role=
\"
listview
\"
data-filter=
\"
true
\"
data-filter-reveal=
\"
true
\"
data-input=
\"
#etape
"
+
nbEtape
+
"
\"
>
"
;
html
+=
"
<span class=
\"
translate
\"
>favorites</span>
"
;
html
+=
"
</ons-list-item>
"
;
...
...
@@ -177,6 +179,7 @@
html
+=
"
</div>
"
;
html
+=
"
<ons-list style=
\"
clear: both;
\"
>
"
;
html
+=
"
<input type=
\"
hidden
\"
id=
\"
etape
"
+
nbEtape
+
"
Slug
\"
name=
\"
etape
"
+
nbEtape
+
"
Slug
\"
value=
\"\"
>
"
;
html
+=
"
<input type=
\"
hidden
\"
id=
\"
etape
"
+
nbEtape
+
"
UID
\"
name=
\"
etape
"
+
nbEtape
+
"
UID
\"
value=
\"\"
>
"
;
html
+=
"
<ons-list-item class=
\"
listeVille
\"
id=
\"
listeEtape
"
+
nbEtape
+
"
\"
expandable data-role=
\"
listview
\"
data-filter=
\"
true
\"
data-filter-reveal=
\"
true
\"
data-input=
\"
#etape
"
+
nbEtape
+
"
\"
>
"
;
html
+=
"
<span class=
\"
translate
\"
>favorites</span>
"
;
html
+=
"
</ons-list-item>
"
;
...
...
@@ -209,7 +212,7 @@
//On lance le calcul de distance du dernier morceau
$
(
"
#btnCalculDistanceEtape
"
+
nbEtape
-
1
).
ready
(
function
()
{
distanceAutomatiqueEtape
(
'
leformIK
'
,
'
etape
'
+
nbEtape
-
1
,
nbEtape
-
1
);
distanceAutomatiqueEtape
(
'
leformIK
'
,
'
etape
'
+
(
nbEtape
-
1
)
,
(
nbEtape
-
1
)
)
;
});
//On se déplace à la fin du formulaire
...
...
@@ -296,7 +299,8 @@
$
(
'
#listeDepart
'
).
hide
();
$
(
'
#depart
'
).
val
(
ville
);
// $('#arrivee').focus();
$
(
'
#departSlug
'
).
val
(
'
xxx
'
);
$
(
'
#departSlug
'
).
val
(
''
);
$
(
'
#departUID
'
).
val
(
''
);
document
.
querySelector
(
'
#listeDepart
'
).
hideExpansion
();
$
(
'
#listeDepart
'
).
show
();
}
...
...
@@ -304,7 +308,8 @@
function
selectEtape
(
nb
,
ville
)
{
$
(
'
#listeEtape
'
+
nb
).
hide
();
$
(
'
#etape
'
+
nb
).
val
(
ville
);
$
(
'
#etape
'
+
nb
+
'
Slug
'
).
val
(
'
xxx
'
);
$
(
'
#etape
'
+
nb
+
'
Slug
'
).
val
(
''
);
$
(
'
#etape
'
+
nb
+
'
UID
'
).
val
(
''
);
document
.
querySelector
(
'
#listeEtape
'
+
nb
).
hideExpansion
();
$
(
'
#listeEtape
'
+
nb
).
show
();
}
...
...
www/js/index.min.js
View file @
be9d51a1
This diff is collapsed.
Click to expand it.
www/js/src/config.js
View file @
be9d51a1
...
...
@@ -3,11 +3,11 @@
*/
// **********************************************************************
//Ne pas toucher, mis à jour automatiquement à partir du config.xml
var
globalAppVersion
=
"
1.9.
2
"
;
// mis à jour automatiquement à partir du fichier config.xml lors du build android
var
globalAppVersion
=
"
1.9.
3
"
;
// mis à jour automatiquement à partir du fichier config.xml lors du build android
// **********************************************************************
var
globalDevMode
=
tru
e
;
// on est en mode dev ou prod ? par defaut oui pour la page d'index
var
globalDevMode
=
fals
e
;
// on est en mode dev ou prod ? par defaut oui pour la page d'index
// note en mode dev la photo de la facturette n'est pas obligatoire
var
globalMyCamera
;
// l'appareil photo
var
globalpictureSource
;
// picture source
...
...
www/js/src/deprecated.js
View file @
be9d51a1
...
...
@@ -6,45 +6,300 @@
* au passage on essaye d'en faire une sauvegarde dans le repertoire de stockage
* permanent avec un nom explicite YYYYMMJJ-subject-filename.jpeg
*************************************** */
function
readFromFile
(
fileName
,
formdata
,
subject
)
{
// myDebug('readFromFile (1) : ' + fileName);
var
pathToFile
=
cordova
.
file
.
documentsDirectory
+
fileName
;
window
.
resolveLocalFileSystemURL
(
fileName
,
function
(
fileEntry
)
{
// myDebug("readFromFile (2): " + JSON.stringify(fileEntry));
fileEntry
.
file
(
function
(
file
)
{
var
reader
=
new
FileReader
();
var
fileSize
=
file
.
size
;
// myDebug("readFromFile (3) Size = " + file.size);
reader
.
onloadend
=
function
(
e
)
{
var
fileContent
=
new
Uint8Array
(
reader
.
result
);
// var fileContent = reader.result;
formdata
.
append
(
"
afile
"
,
fileContent
);
formdata
.
append
(
"
afilesize
"
,
fileSize
);
//formdata.append("bfile", blob, file.name);
// myDebug('Taille du fichier image : ' + fileSize);
// myDebug('Fichier image : ' + fileName);
// -------------------------------------------------
//On sauvegarde le Fichier sous un nom qui sera plus facile a gerer par la suite
var
today
=
new
Date
();
var
destFilename
=
today
.
getFullYear
().
toString
()
+
(
'
0
'
+
(
today
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
(
'
0
'
+
today
.
getDate
()).
slice
(
-
2
)
+
"
_
"
+
today
.
getHours
().
toString
()
+
today
.
getMinutes
().
toString
()
+
"
-
"
+
subject
+
"
-
"
+
basename
(
fileName
);
var
newFileUri
=
cordova
.
file
.
documentsDirectory
;
// myDebug('Sauvegarde de la photo dans (1): ' + newFileUri);
// myDebug('Sauvegarde de la photo dans (2): ' + destFilename);
moveFile
(
fileName
,
destFilename
);
// -------------------------------------------------
//myDebug('Contenu du fichier : ' + fileContent);
//Appel a la suite de l'upload ici pour ne pas être coincé par la lecture async. de l'image
endSendForm
(
formdata
,
destFilename
);
};
reader
.
readAsArrayBuffer
(
file
);
},
errorHandler
.
bind
(
null
,
fileName
));
},
errorHandler
.
bind
(
null
,
fileName
));
}
// function readFromFile(fileName, formdata, subject) {
// // myDebug('readFromFile (1) : ' + fileName);
// var pathToFile = cordova.file.documentsDirectory + fileName;
// window.resolveLocalFileSystemURL(fileName, function (fileEntry) {
// // myDebug("readFromFile (2): " + JSON.stringify(fileEntry));
// fileEntry.file(function (file) {
// var reader = new FileReader();
// var fileSize = file.size;
// // myDebug("readFromFile (3) Size = " + file.size);
// reader.onloadend = function (e) {
// var fileContent = new Uint8Array(reader.result);
// // var fileContent = reader.result;
// formdata.append("afile", fileContent);
// formdata.append("afilesize", fileSize);
// //formdata.append("bfile", blob, file.name);
// // myDebug('Taille du fichier image : ' + fileSize);
// // myDebug('Fichier image : ' + fileName);
// // -------------------------------------------------
// //On sauvegarde le Fichier sous un nom qui sera plus facile a gerer par la suite
// var today = new Date();
// var destFilename = today.getFullYear().toString() + ('0' + (today.getMonth() + 1)).slice(-2) + ('0' + today.getDate()).slice(-2) + "_"
// + today.getHours().toString() + today.getMinutes().toString() + "-" + subject + "-" + basename(fileName);
// var newFileUri = cordova.file.documentsDirectory;
// // myDebug('Sauvegarde de la photo dans (1): ' + newFileUri);
// // myDebug('Sauvegarde de la photo dans (2): ' + destFilename);
// moveFile(fileName, destFilename);
// // -------------------------------------------------
// //myDebug('Contenu du fichier : ' + fileContent);
// //Appel a la suite de l'upload ici pour ne pas être coincé par la lecture async. de l'image
// endSendForm(formdata, destFilename);
// };
// reader.readAsArrayBuffer(file);
// }, errorHandler.bind(null, fileName));
// }, errorHandler.bind(null, fileName));
// }
/**
* Autre idée pour une "popup" pour préciser la ville de depart lorsqu'on a des homonymes
*
* @param {[type]} result [result description]
*
* @return {[type]} [return description]
*/
// function popupChoixDepart(result) {
// myDebug('popupChoixDepart');
// return new Promise((resolve, reject) => {
// if (result.departsNb !== undefined) {
// if (result.departsNb == 1) {
// functionChooseDepart2(encodeHTMLEntities(result.depart) + " (" + result.departCP + ")", result.departSlug, result.id, true);
// }
// else {
// let btn = [];
// let btnNb = 0;
// for (btnNb = 0; btnNb < result.length; btnNb++) {
// btn.push({
// label: encodeHTMLEntities(result[btnNb].depart) + " (" + result[btnNb].departCP + ")",
// slug: result[btnNb].slug,
// uid: result[btnNb].id
// });
// }
// // btn.push({ label: 'Annuler', icon: 'md-close' });
// if (globalMyNavigator !== undefined) {
// resolve(
// globalMyNavigator.pushPage("choix-liste.html", {
// data: {
// title: "Précisez la ville de départ",
// callFunction: 'functionChooseDepart2',
// btn: btn,
// btnNb: btnNb,
// },
// animation: 'fade',
// })
// );
// }
// else {
// myDebug('ERROR myNavigator does not exists !');
// reject("ERROR myNavigator does not exists (2)");
// }
// }
// }
// else {
// //Si pas de choix de ville de départ il a peut-être un choix sur les arrivés ...
// myDebug('Pas de solution !');
// // resolve(popupChoixArrivee(result));
// reject("Pas de solution (2)");
// }
// });
// }
//Autre idée pour une popup pour préciser la ville d'arrivée lorsqu'on a des homonymes
// function popupChoixArrivee(result) {
// return new Promise((resolve, reject) => {
// if (result.arriveesNb !== undefined) {
// if (result.arriveesNb == 1) {
// functionChooseArrivee2(encodeHTMLEntities(result.arrivee) + " (" + result.arriveeCP + ")", result.arriveeSlug, true);
// }
// else {
// let btn = [];
// let btnNb = 0;
// for (btnNb = 0; btnNb < result.arriveesNb; btnNb++) {
// btn.push({
// label: encodeHTMLEntities(result.arrivee[btnNb]) + " (" + result.arriveeCP[btnNb] + ")",
// slug: result.arriveeSlug[btnNb]
// });
// }
// // btn.push({ label: 'Annuler', icon: 'md-close' });
// if (globalMyNavigator !== undefined) {
// resolve(
// globalMyNavigator.pushPage("choix-liste.html", {
// data: {
// title: "Précisez la ville d'arrivée",
// callFunction: 'functionChooseArrivee2',
// btn: btn,
// btnNb: btnNb,
// },
// animation: 'fade',
// })
// );
// }
// else {
// myDebug('ERROR myNavigator does not exists !');
// reject("ERROR myNavigator does not exists (3)");
// }
// }
// }
// });
// }
/**
* La popup pour choisir l'étape, considéré par le serveur comme la ville d'arrivée
*
* @param {[type]} result [result description]
*
* @return {[type]} [return description]
*/
// function popupChoixEtape(result, etape, nb) {
// myDebug('popupChoixEtape');
// return new Promise((resolve, reject) => {
// if (result.arriveesNb !== undefined) {
// if (result.arriveesNb == 1) {
// functionChooseArrivee2(encodeHTMLEntities(result.arrivee) + " (" + result.arriveeCP + ")", result.arriveeSlug, true);
// }
// else {
// let btn = [];
// let btnNb = 0;
// for (btnNb = 0; btnNb < result.arriveesNb; btnNb++) {
// btn.push({
// label: encodeHTMLEntities(result.arrivee[btnNb]) + " (" + result.arriveeCP[btnNb] + ")",
// slug: result.arriveeSlug[btnNb],
// ville: etape,
// villeSlug: etape + "Slug"
// });
// }
// // btn.push({ label: 'Annuler', icon: 'md-close' });
// if (globalMyNavigator === undefined) globalMyNavigator = document.getElementById('myNavigator');
// if (globalMyNavigator !== undefined) {
// resolve(
// globalMyNavigator.pushPage("choix-liste.html", {
// data: {
// title: "Précisez l'étape",
// callFunction: 'functionChooseEtape',
// btn: btn,
// btnNb: btnNb
// },
// })
// );
// }
// else {
// myDebug('ERROR myNavigator does not exists !');
// reject("ERROR myNavigator does not exists (4)");
// }
// }
// }
// else {
// //Si pas de choix de ville de départ il a peut-être un choix sur les arrivés ...
// myDebug('Pas de solution !');
// reject("pas de solution (4)");
// // resolve(popupChoixArrivee(result));
// }
// });
// }
//Actualisation du champ "distance" du formulaire
// function functionChooseEtape(label, slug, fieldname, fieldnameSlug, single = false) {
// myDebug("functionChooseEtape: " + label + " : " + slug + " : " + fieldname + ":" + fieldnameSlug + ":" + single + " start");
// if (slug !== undefined) {
// //Il faudrait donc aller chercher la val correspondante
// $('#' + fieldname).val(decodeURIComponent(label));
// $('#' + fieldnameSlug).val(slug);
// // $('#btnCalculDistance').attr('style', "border-radius: 5px; border:#00FF00 2px solid;");
// // $('#btnCalculDistanceArrivee').attr('style', "");
// if (globalMyNavigator !== undefined) {
// //Si on a une seule réponse et qu'on a fait un appel direct on ne pop pas la page
// if (!single) {
// let opt = { animation: 'fade' };
// globalMyNavigator.popPage(opt);
// }
// }
// // blinkElement("#btnCalculDistance", 3, 800);
// }
// else {
// myDebug("functionChooseArrivee2: slug is undef !")
// }
// }
//Actualisation du champ "distance" du formulaire
// function functionChooseArrivee2(label, slug, single = false) {
// myDebug("functionChooseArrivee2: " + label + " : " + slug + " : " + single + " start");
// if (slug !== undefined) {
// //Il faudrait donc aller chercher la val correspondante
// $('#arrivee').val(decodeURIComponent(label));
// $('#arriveeSlug').val(slug);
// $('#btnCalculDistance').attr('style', "border-radius: 5px; border:#00FF00 2px solid;");
// $('#btnCalculDistanceArrivee').attr('style', "");
// if (globalMyNavigator !== undefined) {
// //Si on a une seule réponse et qu'on a fait un appel direct on ne pop pas la page
// if (!single) {
// let opt = { animation: 'fade' };
// globalMyNavigator.popPage(opt);
// }
// }
// blinkElement("#btnCalculDistance", 3, 800);
// }
// else {
// myDebug("functionChooseArrivee2: slug is undef !")
// }
// }
//Actualisation du champ "distance" du formulaire
// function functionChooseDepart2(label, slug, uid, single = false) {
// if (slug !== undefined) {
// //Il faudrait donc aller chercher la val correspondante
// $('#depart').val(decodeURIComponent(label));
// $('#departSlug').val(slug);
// $('#departUID').val(uid);
// $('#btnCalculDistanceArrivee').attr('style', "border-radius: 5px; border:#00FF00 2px solid;");
// if (globalMyNavigator !== undefined) {
// //Si on a une seule réponse et qu'on a fait un appel direct on ne pop pas la page
// if (!single) {
// let opt = { animation: 'fade' };
// globalMyNavigator.popPage(opt);
// }
// }
// blinkElement("#btnCalculDistanceArrivee", 3, 800);
// // return true;
// }
// else {
// myDebug("functionChooseDepart2: slug is undef !")
// // return false;
// }
// //et maintenant on affiche la liste des arrivées possibles
// // popupChoixArrivee(res);
// }
//Actualisation du champ "distance" du formulaire
// function functionChooseArrivee(nb, res) {
// if (res.arrivee[nb] !== undefined) {
// //Il faudrait donc aller chercher la val correspondante
// $('#arrivee').val(res.arrivee[nb] + " (" + res.arriveeCP[nb] + ")");
// $('#arriveeSlug').val(res.arriveeSlug[nb]);
// $('#btnCalculDistance').attr('style', "border-radius: 5px; border:#00FF00 2px solid;");
// blinkElement("#btnCalculDistance", 3, 800);
// }
// }
//Actualisation du champ "distance" du formulaire
// function functionChooseDepart(nb, res) {
// if (res.depart[nb] !== undefined) {
// //Il faudrait donc aller chercher la val correspondante
// $('#depart').val(res.depart[nb] + " (" + res.departCP[nb] + ")");
// $('#departSlug').val(res.departSlug[nb]);
// $('#btnCalculDistance').attr('style', "border-radius: 5px; border:#00FF00 2px solid;");
// blinkElement("#btnCalculDistance", 3, 800);
// }
// //et maintenant on affiche la liste des arrivées possibles
// popupChoixArrivee(res);
// }
www/js/src/distances.js
View file @
be9d51a1
This diff is collapsed.
Click to expand it.
www/js/src/langs.js
View file @
be9d51a1
...
...
@@ -42,7 +42,7 @@ function onLangFileErrorLoaded() {
function
translateUI
()
{
//On cherche tous les objets a traduire dans l'html
$
(
'
.translate
'
).
each
(
function
(
i
,
obj
)
{
myDebug
(
"
langs : traduction de
"
+
$
(
obj
).
html
());
//
myDebug("langs : traduction de " + $(obj).html());
// alert("on traduit [" + i + "] et " + $(obj).html());
if
(
$
(
obj
).
html
())
{
let
t
=
trans
(
$
(
obj
).
html
());
...
...
@@ -58,11 +58,11 @@ function trans(str) {
function
onLangFileLoaded
(
text
)
{
myDebug
(
"
langs : onLangFileLoaded text
"
+
text
);
if
(
text
===
null
||
typeof
text
===
"
undefined
"
)
{
myDebug
(
"
langs : onLangFileLoaded null ou indef
"
);
myDebug
(
"
langs : onLangFileLoaded null ou indef
"
);
}
else
{
var
data
=
JSON
.
parse
(
text
);
myDebug
(
"
langs : onLangFileLoaded ok :
"
+
text
);
//
myDebug("langs : onLangFileLoaded ok : " + text);
translateStrings
=
i18n
.
create
({
values
:
data
});
...
...
www/js/src/ndf.js
View file @
be9d51a1
...
...
@@ -367,7 +367,7 @@ function completePageIKAfterGoto(dataIK) {
$
(
'
#etape1
'
).
val
(
decodeURIComponent
(
dataIK
.
arrivee
));
//Async call :-(
searchVille
(
'
leformIK
'
,
'
depart
'
,
'
departSlug
'
);
searchVille
(
'
leformIK
'
,
'
depart
'
,
'
departSlug
'
,
'
departUID
'
);
var
checksearchVille
=
setInterval
(
function
()
{
if
(
$
(
'
#departSlug
'
).
length
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment