Commit 0eb35830 authored by Eric Seigne's avatar Eric Seigne
Browse files

feedAproposCustom

parent 2c66b341
......@@ -20,10 +20,15 @@
</ons-col>
</ons-row>
<ons-row>
<ons-col>
<div id='feedAproposCustom'></div>
</ons-col>
</ons-row>
<ons-row>
<ons-col>
<p>Cette application est née en 2018 d'une volontée d'auto-héberger une solution de gestion de notes de frais.</p>
<p>Pour plus de détails, consultez le site internet <a href="https://doliscan.fr">https://doliscan.fr</a></p>
<p>CAP-REL/DoliSCAN<br />https://cap-rel.fr<br />https://doliscan.fr</p>
</ons-col>
......
......@@ -173,6 +173,38 @@ function feedToSync(formField) {
return htmlFTS;
}
//Ajout du message custom envoyé par le serveur sur la boite à propos
function feedAproposCustom() {
let htmlInfos = "";
myDebug("feedAproposCustom");
$("#feedAproposCustom").empty();
myDebug("feedAproposCustom empty ok -> feed with html now");
let aproposFileName = cordova.file.cacheDirectory + 'apropos.html';
// myDebug("loadCustomCSS : " + cssFileName);
window.resolveLocalFileSystemURL(aproposFileName, function (fileEntry) {
// myDebug("loadCustomCSS (2): " + JSON.stringify(fileEntry));
fileEntry.file(function (file) {
var reader = new FileReader();
var fileSize = file.size;
// myDebug("loadCustomCSS (3) Size = " + file.size);
reader.onloadend = function (e) {
var fileContent = reader.result;
// myDebug("loadCustomCSS : append to header " + fileContent);
$("#feedAproposCustom").append(fileContent);
};
reader.readAsText(file);
}, errorHandlerCustomFile.bind(null, "Error on FileEntry " + cssFileName));
}, errorHandlerCustomFile.bind(null, "Error on resolveLocalFileSystemURL " + cssFileName));
return;
}
//Ajoute quelques informations
function feedDoliscanInfos() {
let htmlInfos = "";
......
......@@ -487,6 +487,7 @@ document.addEventListener('init', function (event) {
if (lapage == 'ONSApropos') {
// setPageTitle("À propos");
feedDoliscanInfos();
feedAproposCustom();
return;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment