Projet

Général

Profil

0001-Ajax-ready-status-0-Readme-instruction-for-plugin-in.patch

Ghislain Loaec, 19 octobre 2016 13:52

Télécharger (2,76 ko)

Voir les différences:

Subject: [PATCH] Ajax ready status 0 + Readme instruction for plugin
 installation

 README.md       | 2 ++
 config.xml      | 4 ++--
 www/js/index.js | 4 +++-
 3 files changed, 7 insertions(+), 3 deletions(-)
README.md
22 22

  
23 23
Install cordovas plugins:
24 24

  
25
    phonegap plugin add cordova-plugin-compat # automatic
25 26
    phonegap plugin add cordova-plugin-file
26 27
    phonegap plugin add cordova-plugin-file-transfer
27 28
    phonegap plugin add cordova-plugin-zip
......
31 32

  
32 33
If plugin registry server seems to be down :'( use git instead ;)
33 34

  
35
    phonegap plugin add https://github.com/apache/cordova-plugin-compat.git
34 36
    phonegap plugin add https://github.com/apache/cordova-plugin-file.git
35 37
    phonegap plugin add https://github.com/apache/cordova-plugin-file-transfer.git
36 38
    phonegap plugin add https://github.com/MobileChromeApps/cordova-plugin-zip.git
config.xml
35 35
    <preference name="StatusBarBackgroundColor" value="#000000" />
36 36
    <preference name="StatusBarStyle" value="blackopaque" />
37 37
    <feature name="http://api.phonegap.com/1.0/file" />
38
    <gap:plugin name="org.apache.cordova.file" version="1.3.1" />
39
    <gap:plugin name="org.apache.cordova.file-transfer" version="0.4.6" />
38
    <gap:plugin name="org.apache.cordova.file" version="3.0.0" />
39
    <gap:plugin name="org.apache.cordova.file-transfer" version="1.3.0" />
40 40
    <gap:plugin name="org.chromium.zip" version="2.1.0" />
41 41
    <gap:plugin name="org.apache.cordova.inappbrowser" version="0.5.2" />
42 42
    <!--plugin name="fi.avaus.cordova.file" />
www/js/index.js
30 30
var ON_PULL = 'checkForUpdate'; // || 'update'
31 31
var CHECK_FOR_CONNECTION_INTERVAL = 3000;
32 32

  
33

  
33 34
// Application
34 35
var app = {
35 36

  
......
122 123
        var request = new XMLHttpRequest();
123 124
        request.open('GET', './index.json');
124 125
        request.onload = function() {
125
            if (request.status != 200) {
126
            alert(request.status);
127
            if (request.status != 200 && request.status != 0 /* iOS */) {
126 128
                /* this should never happen */
127 129
                app.utils.setLoadingMsg("Initialisation de l'application : erreur de chargement");
128 130
            } else {
129
-