Commit 86d45455 authored by Eric Seigne's avatar Eric Seigne
Browse files

version 1.0.12

parent e68f141f
<?xml version='1.0' encoding='utf-8'?>
<widget id="fr.caprel.doliscan" version="1.0.11" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="fr.caprel.doliscan" version="1.0.12" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>doliscan</name>
<description>
A simple app for french people looking for a free and self hosting "notes de frais/expenses report" solution.
......@@ -50,7 +50,7 @@
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryAddUsageDescription">
<string>Please pick a pictures of your invoice / receipt</string>
</edit-config>
<preference name="OverrideUserAgent" value="Mozilla/5.0 OpenNDF/1.0.11 Android" />
<preference name="OverrideUserAgent" value="Mozilla/5.0 OpenNDF/1.0.12 Android" />
<plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.4" />
</widget>
......@@ -2,7 +2,7 @@
* (c) Éric Seigne <eric.seigne@cap-rel.fr> - 2019-2020 - GNU AGPLv3
* full source code in src/ subfolder, this file is minifyed
*/
var globalDevMode=false;var globalMyCamera;var globalpictureSource;var globaldestinationType;var globalNetworkResponse=Date.now();var globalCurrentPage="";var globalCurrentTitle="";var globalDB=null;var globalTenMinuts=60*10*1000;var globalCompatibleWithAPIVersion=4;var globalDoliScanDomain="";var globalLastInsertId="";var globalSyncInProgress=false;var globalAppVersion="1.0.11";var dataLDF="";var globalSrvKeys=['email','api_token','firstname','name','adresse','cp','ville','pays','send_copy_to','compta_email','compta_ik','compta_peage','compta_hotel','compta_train','compta_carburant','compta_taxi','compta_restauration','compta_divers','compta_compteperso','compta_tvadeductible','official_app_version','mode_simple'];function readFromFile(fileName,formdata,subject){var pathToFile=window.cordova.file.dataDirectory+fileName;window.resolveLocalFileSystemURL(fileName,function(fileEntry){fileEntry.file(function(file){var reader=new FileReader();var fileSize=file.size;reader.onloadend=function(e){var fileContent=new Uint8Array(reader.result);formdata.append("afile",fileContent);formdata.append("afilesize",fileSize);var today=new Date();var destFilename=today.getFullYear().toString()+('0'+(today.getMonth()+1)).slice(-2)+('0'+today.getDate()).slice(-2)+"_"
var globalDevMode=false;var globalMyCamera;var globalpictureSource;var globaldestinationType;var globalNetworkResponse=Date.now();var globalCurrentPage="";var globalCurrentTitle="";var globalDB=null;var globalTenMinuts=60*10*1000;var globalCompatibleWithAPIVersion=4;var globalDoliScanDomain="";var globalLastInsertId="";var globalSyncInProgress=false;var globalAppVersion="1.0.12";var dataLDF="";var globalSrvKeys=['email','api_token','firstname','name','adresse','cp','ville','pays','send_copy_to','compta_email','compta_ik','compta_peage','compta_hotel','compta_train','compta_carburant','compta_taxi','compta_restauration','compta_divers','compta_compteperso','compta_tvadeductible','official_app_version','mode_simple'];function readFromFile(fileName,formdata,subject){var pathToFile=window.cordova.file.dataDirectory+fileName;window.resolveLocalFileSystemURL(fileName,function(fileEntry){fileEntry.file(function(file){var reader=new FileReader();var fileSize=file.size;reader.onloadend=function(e){var fileContent=new Uint8Array(reader.result);formdata.append("afile",fileContent);formdata.append("afilesize",fileSize);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=window.cordova.file.dataDirectory;moveFile(fileName,destFilename);endSendForm(formdata,destFilename);};reader.readAsArrayBuffer(file);},errorHandler.bind(null,fileName));},errorHandler.bind(null,fileName));}
function distanceAutomatique(depart,arrivee){showWait();$.ajaxSetup({timeout:40000,});$.ajax({type:"GET",timeout:5000,url:"https://geo.doliscan.fr/api/geo/"+depart+"/"+arrivee,beforeSend:function(xhr){xhr.setRequestHeader('Authorization','Bearer '+localGetData("api_token"));},success:function(result){if(result!='undefined'){hideWait();updateDistanceFromServer(result);}
else{hideWait();ons.notification.alert("Saisie manuelle nécessaire, cette distance n'est pas connue sur nos serveurs",{title:"Erreur"});}},error:function(result){hideWait();ons.notification.alert("Saisie manuelle nécessaire, cette distance n'est pas connue sur nos serveurs",{title:"Erreur"});}});}
......
......@@ -17,7 +17,7 @@ var globalLastInsertId = ""; // Avant d'envoyer les données au serve
var globalSyncInProgress = false; // Pour savoir si on est en phase de synchronisation ou pas (gestion différente du "formulaire" d'upload)
// **********************************************************************
//Ne pas toucher, mis à jour automatiquement à partir du config.xml
var globalAppVersion = "1.0.11"; // mis à jour automatiquement à partir du fichier config.xml lors du build android
var globalAppVersion = "1.0.12"; // mis à jour automatiquement à partir du fichier config.xml lors du build android
// **********************************************************************
var dataLDF = "";
......
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