Commit be4313c9 authored by Eric Seigne's avatar Eric Seigne
Browse files

version 1.6.8

parent e71586f0
# 1.6.8
- corrige un bug d'accès en écriture en // à IndexedDB sur certains smartphone
# 1.6.6
- mise à jour du compte utilisateur
......@@ -14,7 +17,7 @@
# 1.6.2
- possibilité d'adaptation de l'interface pour les revendeurs partenaires
- migration de SQLite vers IndexDB pour simplifier l'adoption dans f-droid et limiter les
- migration de SQLite vers IndexedDB pour simplifier l'adoption dans f-droid et limiter les
dépendances externes -> phase transitoire, sqlite est encore présent le temps de faire
la migration des données
......
<?xml version='1.0' encoding='utf-8'?>
<widget id="fr.caprel.doliscan" version="1.6.7" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="fr.caprel.doliscan" version="1.6.8" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>doliscan</name>
<description>DoliSCAN is a tiny app for french people looking for a free and self hosting "notes de frais/expenses report" solution.</description>
<author email="eric.seigne@cap-rel.fr" href="https://cap-rel.fr">Eric Seigne</author>
......@@ -146,5 +146,5 @@
</feature>
</platform>
<plugin name="cordova-plugin-calendar" />
<preference name="OverrideUserAgent" value="Mozilla/5.0 OpenNDF/1.6.7 Android" />
<preference name="OverrideUserAgent" value="Mozilla/5.0 OpenNDF/1.6.8 Android" />
</widget>
......@@ -144,6 +144,32 @@
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
"integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ=="
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
},
"dependencies": {
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
}
}
},
"array-find-index": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
......@@ -416,6 +442,17 @@
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"chardet": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
......@@ -773,44 +810,28 @@
"which": "^2.0.2"
},
"dependencies": {
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"cordova-common": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-4.0.2.tgz",
"integrity": "sha512-od7aNShyuBajzPY83mUEO8tERwwWdFklXETHiXP5Ft87CWeo/tSuwNPFztyTy8XYc74yXdogXKPTJeUHuVzB8Q==",
"dev": true,
"requires": {
"isexe": "^2.0.0"
"@netflix/nerror": "^1.1.3",
"ansi": "^0.3.1",
"bplist-parser": "^0.2.0",
"cross-spawn": "^7.0.1",
"elementtree": "^0.1.7",
"endent": "^1.4.1",
"fast-glob": "^3.2.2",
"fs-extra": "^9.0.0",
"glob": "^7.1.6",
"plist": "^3.0.1",
"q": "^1.5.1",
"read-chunk": "^3.2.0",
"strip-bom": "^4.0.0",
"underscore": "^1.9.2"
}
}
}
},
"cordova-app-hello-world": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hello-world-5.0.0.tgz",
"integrity": "sha512-5My01wsYoeYwS0f/t5Ck52xPm0+2zYJ0SlvxG9vUsndDGtgiP6t/G8upPgWcyDRRz7Rs/50yZuOntmHqmJxccQ=="
},
"cordova-common": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-4.0.2.tgz",
"integrity": "sha512-od7aNShyuBajzPY83mUEO8tERwwWdFklXETHiXP5Ft87CWeo/tSuwNPFztyTy8XYc74yXdogXKPTJeUHuVzB8Q==",
"dev": true,
"requires": {
"@netflix/nerror": "^1.1.3",
"ansi": "^0.3.1",
"bplist-parser": "^0.2.0",
"cross-spawn": "^7.0.1",
"elementtree": "^0.1.7",
"endent": "^1.4.1",
"fast-glob": "^3.2.2",
"fs-extra": "^9.0.0",
"glob": "^7.1.6",
"plist": "^3.0.1",
"q": "^1.5.1",
"read-chunk": "^3.2.0",
"strip-bom": "^4.0.0",
"underscore": "^1.9.2"
},
"dependencies": {
},
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
......@@ -822,6 +843,18 @@
"which": "^2.0.1"
}
},
"fs-extra": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
"dev": true,
"requires": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
......@@ -836,6 +869,16 @@
"path-is-absolute": "^1.0.0"
}
},
"jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.6",
"universalify": "^2.0.0"
}
},
"path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
......@@ -857,6 +900,18 @@
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true
},
"strip-bom": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
"integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
"dev": true
},
"universalify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
"dev": true
},
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
......@@ -868,6 +923,76 @@
}
}
},
"cordova-app-hello-world": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hello-world-5.0.0.tgz",
"integrity": "sha512-5My01wsYoeYwS0f/t5Ck52xPm0+2zYJ0SlvxG9vUsndDGtgiP6t/G8upPgWcyDRRz7Rs/50yZuOntmHqmJxccQ=="
},
"cordova-browser": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cordova-browser/-/cordova-browser-6.0.0.tgz",
"integrity": "sha512-G61S7fhnVVJC98lvkGeKCVpfFtoW0a1P1Sg9TK+n03g3yupDMIM7XuecWuJ3KEMRhED4+CEc2hauruAff7oXrw==",
"dev": true,
"requires": {
"cordova-common": "^3.1.0",
"cordova-serve": "^3.0.0",
"nopt": "^4.0.1",
"shelljs": "^0.5.3"
},
"dependencies": {
"cordova-serve": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cordova-serve/-/cordova-serve-3.0.0.tgz",
"integrity": "sha512-h479g/5a0PXn//yiFuMrD5MDEbB+mtihNkWcE6uD/aCh/6z0FRZ9sWH3NfZbHDB+Bp1yGLYsjbH8LZBL8KOQ0w==",
"dev": true,
"requires": {
"chalk": "^2.4.1",
"compression": "^1.6.0",
"express": "^4.13.3",
"opn": "^5.3.0",
"which": "^1.3.0"
}
},
"shelljs": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz",
"integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=",
"dev": true
}
}
},
"cordova-common": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-3.2.1.tgz",
"integrity": "sha512-xg0EnjnA6EipxXG8cupdlYQYeDA6+ghbN+Pjq88xN1LInwP6Bo7IyGBdSV5QnfjOvzShF9BBwSxBAv0FOO0C2Q==",
"dev": true,
"requires": {
"ansi": "^0.3.1",
"bplist-parser": "^0.1.0",
"cross-spawn": "^6.0.5",
"elementtree": "0.1.7",
"endent": "^1.1.1",
"fs-extra": "^8.0.0",
"glob": "^7.1.2",
"minimatch": "^3.0.0",
"plist": "^3.0.1",
"q": "^1.4.1",
"strip-bom": "^3.0.0",
"underscore": "^1.8.3",
"which": "^1.3.0"
},
"dependencies": {
"bplist-parser": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz",
"integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=",
"dev": true,
"requires": {
"big-integer": "^1.6.7"
}
}
}
},
"cordova-create": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cordova-create/-/cordova-create-3.0.0.tgz",
......@@ -1933,15 +2058,14 @@
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"fs-extra": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz",
"integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==",
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
"dev": true,
"requires": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^1.0.0"
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
}
},
"fs.realpath": {
......@@ -2503,21 +2627,12 @@
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"dev": true,
"requires": {
"graceful-fs": "^4.1.6",
"universalify": "^2.0.0"
},
"dependencies": {
"universalify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
"dev": true
}
"graceful-fs": "^4.1.6"
}
},
"jsprim": {
......@@ -2829,6 +2944,23 @@
"is-wsl": "^2.1.1"
}
},
"opn": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz",
"integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==",
"dev": true,
"requires": {
"is-wsl": "^1.1.0"
},
"dependencies": {
"is-wsl": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
"integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
"dev": true
}
}
},
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
......@@ -3497,9 +3629,9 @@
"integrity": "sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg=="
},
"strip-bom": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
"integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
"dev": true
},
"strip-eof": {
......@@ -3517,6 +3649,23 @@
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
},
"dependencies": {
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
}
}
},
"systeminformation": {
"version": "4.27.9",
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-4.27.9.tgz",
......@@ -3620,9 +3769,9 @@
}
},
"universalify": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz",
"integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==",
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"dev": true
},
"unpipe": {
......
......@@ -43,12 +43,14 @@
"cordova-plugin-screen-orientation": {}
},
"platforms": [
"browser",
"android"
]
},
"devDependencies": {
"@globules-io/cordova-plugin-ios-xhr": "git+https://github.com/globules-io/cordova-plugin-ios-xhr.git",
"cordova-android": "^9.0.0",
"cordova-browser": "^6.0.0",
"cordova-plugin-aes256-encryption": "^2.0.1",
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-calendar": "^5.1.5",
......@@ -60,4 +62,4 @@
"es6-promise-plugin": "^4.2.2",
"phonegap-plugin-barcodescanner": "^8.1.0"
}
}
\ No newline at end of file
}
......@@ -118,7 +118,9 @@
removeCustomFiles();
globalCurrentPage = "index.html";
globalMyNavigator = document.getElementById('myNavigator');
myDebug(' lancement, globalMyNavigator apres = ' + globalMyNavigator);
$('#loadingStep').text('Etape 1');
// -----------------------------
......@@ -148,7 +150,6 @@
onsRightMenu.close();
$('#loadingStep').text('Etape 2');
// var modal = document.querySelector('ons-modal');
// modal.show();
// setTimeout(function () {
......@@ -183,7 +184,7 @@
//On nettoie l'historique au lancement de l'appli
cleanHistorique();
if (globalIndexDB == null && databaseEngine == 'IndexDB') {
if (globalIndexedDB == null && databaseEngine == 'IndexedDB') {
$('#loadingStep').text('Etape 3a');
// myDebug("SQL : On essaye d'ouvrir la base de données ...");
var openRequest = window.indexedDB.open(databaseName, databaseVersion);
......@@ -193,16 +194,18 @@
};
openRequest.onsuccess = function (event) {
// Database is open and initialized - we're good to proceed.
globalIndexDB = openRequest.result;
myDebug(" global db type indexDB open ok");
globalIndexedDB = openRequest.result;
myDebug(" global db type IndexedDB open ok");
$('#loadingStep').text('Etape 4a');
var transaction = globalIndexDB.transaction(['config'], "readwrite");
var transaction = globalIndexedDB.transaction(['config'], "readwrite");
transaction.oncomplete = function (event) {
$('#loadingStep').text('Etape 4e');
myDebug("global db transaction.oncomplete ok");
}
transaction.onerror = function (event) {
$('#loadingStep').text('Etape 4f');
myDebug("global db transaction.onerror : " + event.error);
};
......@@ -213,7 +216,7 @@
var cursor = event.target.result;
if (cursor) {
$('#loadingStep').text('Etape 6a');
// myDebug("Lecture IndexDB " + cursor.key + " is " + cursor.value.data);
// myDebug("Lecture IndexedDB " + cursor.key + " is " + cursor.value.data);
let k = cursor.key;
let v = cursor.value.data;
//Mise a jour uniquement si non vide
......@@ -226,7 +229,7 @@
}
cursor.continue();
// myDebug("IndexDB : read OK");
// myDebug("IndexedDB : read OK");
$('#loadingStep').text('Etape 7a');
}
else {
......@@ -236,7 +239,7 @@
}
};
objectStore.openCursor().onerror = function (event) {
myDebug(" IndexDB Error " + error.message);
myDebug(" IndexedDB Error " + error.message);
$('#loadingStep').text('Etape 7b');
switchLoginOrMenu();
}
......
This diff is collapsed.
......@@ -9,11 +9,6 @@ var globaldestinationType; // sets the format of returned value
var globalNetworkResponse = Date.now(); // Date a laquelle on a reçu une réponse du serveur
var globalCurrentPage = ""; // Page courante pour gérer le retour précédent
var globalCurrentTitle = ""; // Titre de la page courante
var globalDB = null; // Le connecteur vers la base de données SQLite
var globalIndexDB = null; // Le connecteur vers la base de données IndexDB
var databaseEngine = 'IndexDB';
var databaseName = 'doliscanDB';
var databaseVersion = 4;
var globalTenMinuts = 60 * 10 * 1000; // 10 minutes pour l'implementation du keepalive (avant de basculer en full API je pense)
var globalCompatibleWithAPIVersion = 4; // On incrémentera la version de l'API compatible quand on modifie des choses importantes sur le serveur
var globalDoliScanDomain = ""; // Pour basculer sur un serveur auto-hebergé
......@@ -22,7 +17,7 @@ var globalSyncInProgress = false; // Pour savoir si on est en phase de syn
var globalPictureFileName = ""; // Le nom du fichier sans résolution (depuis ios wkbidule app:// ... on garde dans cette variable le path basique pour resumable & sync)
// **********************************************************************
//Ne pas toucher, mis à jour automatiquement à partir du config.xml
var globalAppVersion = "1.6.7"; // mis à jour automatiquement à partir du fichier config.xml lors du build android
var globalAppVersion = "1.6.8"; // mis à jour automatiquement à partir du fichier config.xml lors du build android
// **********************************************************************
var dataLDF = "";
var dataIK = "";
......
/*
* (c) Éric Seigne <eric.seigne@cap-rel.fr> - 2019 - GNU AGPLv3
*/
var globalDB = null; // Le connecteur vers la base de données SQLite
var databaseEngine = 'IndexedDB';
var databaseName = 'doliscanDB';
var databaseVersion = 6;
var globalIndexedDB = null; // Le connecteur vers la base de données IndexedDB
......@@ -90,7 +90,6 @@ function popupChoixVille(result, ville, villeSlug) {
}
// btn.push({ label: 'Annuler', icon: 'md-close' });
if (globalMyNavigator === undefined) globalMyNavigator = document.getElementById('myNavigator');
if (globalMyNavigator !== undefined) {
resolve(
globalMyNavigator.pushPage("choix-liste.html", {
......@@ -126,7 +125,6 @@ function functionChooseVille(label, slug, ville, villeSlug, single = false) {
$('#' + ville).val(decodeURIComponent(label));
$('#' + villeSlug).val(slug);
// $('#btnCalculDistanceArrivee').attr('style', "border-radius: 5px; border:#00FF00 2px solid;");
if (globalMyNavigator === undefined) globalMyNavigator = document.getElementById('myNavigator');
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) {
......@@ -255,7 +253,6 @@ function popupChoixDepart(result) {
}
// btn.push({ label: 'Annuler', icon: 'md-close' });
if (globalMyNavigator === undefined) globalMyNavigator = document.getElementById('myNavigator');
if (globalMyNavigator !== undefined) {
resolve(
globalMyNavigator.pushPage("choix-liste.html", {
......@@ -302,7 +299,6 @@ function popupChoixArrivee(result) {
}
// btn.push({ label: 'Annuler', icon: 'md-close' });
if (globalMyNavigator === undefined) globalMyNavigator = document.getElementById('myNavigator');
if (globalMyNavigator !== undefined) {
resolve(
globalMyNavigator.pushPage("choix-liste.html", {
......@@ -389,7 +385,6 @@ function functionChooseArrivee2(label, slug, single = false) {
$('#arriveeSlug').val(slug);
$('#btnCalculDistance').attr('style', "border-radius: 5px; border:#00FF00 2px solid;");
$('#btnCalculDistanceArrivee').attr('style', "");
if (globalMyNavigator === undefined) globalMyNavigator = document.getElementById('myNavigator');
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) {
......@@ -411,7 +406,6 @@ function functionChooseDepart2(label, slug, single = false) {
$('#depart').val(decodeURIComponent(label));
$('#departSlug').val(slug);
$('#btnCalculDistanceArrivee').attr('style', "border-radius: 5px; border:#00FF00 2px solid;");
if (globalMyNavigator === undefined) globalMyNavigator = document.getElementById('myNavigator');
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) {
......
......@@ -106,10 +106,10 @@ function feedToSync(formField) {
let htmlFTS = "";
// myDebug("feedToSync pour " + formField);
$(formField).empty();
if (globalIndexDB !== null && databaseEngine == 'IndexDB') {
if (globalIndexedDB !== null && databaseEngine == 'IndexedDB') {
// myDebug("ldfsToSync : select * from ldfsToSync");
let objectStore = globalIndexDB.transaction("ldfsToSync").objectStore("ldfsToSync");
let objectStore = globalIndexedDB.transaction("ldfsToSync").objectStore("ldfsToSync", "readwrite");
objectStore.openCursor().onsuccess = function (event) {
var cursor = event.target.result;
......
......@@ -206,7 +206,7 @@ function endSendForm(formdata, filename) {
//On sauvegarde dans la base pour pouvoir faire une synchro plus tard si jamais ca a foiré
//Bien entendu on ne fait pas ça si on est en cours de synchronisation :)
if (globalIndexDB !== null && databaseEngine == 'IndexDB' && globalSyncInProgress == false) {
if (globalIndexedDB !== null && databaseEngine == 'IndexedDB' && globalSyncInProgress == false) {
let url = localGetData("api_server") + "/api/LdeFrais";
localStoreLDFtoSync(url, formDataInJSON, filename).then((value) => {
globalLastInsertId = value;
......@@ -486,7 +486,7 @@ function newResumable(ajaxURL, result, filename) {
//Si on a pas de nom de fichier c'est qu'on est peut-être sur des IK donc on short-return
if (typeof filename === undefined || filename == "") {
if (globalIndexDB !== null && databaseEngine == 'IndexDB') {
if (globalIndexedDB !== null && databaseEngine == 'IndexedDB') {
myDebug("globalLastInsertId : " + globalLastInsertId);
if (globalLastInsertId > 0) {
localDeleteLDFtoSync(globalLastInsertId);
......@@ -544,7 +544,7 @@ function newResumable(ajaxURL, result, filename) {
myDebug("resumable : fileSuccess ");
globalProgressBar.finish();
if (globalIndexDB !== null && databaseEngine == 'IndexDB') {
if (globalIndexedDB !== null && databaseEngine == 'IndexedDB') {
myDebug("globalLastInsertId : " + globalLastInsertId);
if (globalLastInsertId > 0) {
localDeleteLDFtoSync(globalLastInsertId);
......
......@@ -238,7 +238,7 @@ function loginJson() {
},