]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Jun 2014 14:41:28 +0000 (14:41 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Jun 2014 14:41:28 +0000 (14:41 +0000)
js/main.js

index 252bec150d56d6f1d320e588163fd5389311c57c..33d26f20481653e7fd12e1c014ef77ab6756e26c 100644 (file)
@@ -79,14 +79,13 @@ try {
        function cordovaLoaded() {
                setTimeout(function() {
                        onDeviceReady();
-               }, 5000);
+               }, 2500);
        }
 
        function onDeviceOffline() {
                if (OFFLINEAPP) {
                        return;
                }
-
                if (FINISHLOADING) {
                        return;
                }
@@ -109,23 +108,24 @@ try {
                        return;
                }
 
+               fb('device ready');
+
                DEVICE_READY = true;
 
                document.addEventListener("offline", onDeviceOffline, false);
 
-
                var manifest = window.localStorage.getItem('manifest.' + DATAS.id);
                var fsprefix = window.sessionStorage.getItem('galfsprefix');
 
                PLATFORM = DATAS.phonegap;
 
-               if (DATAS.phonegap == 'ios') {
+               if (PLATFORM == 'ios') {
                        window.ExternalFileUtil = {
                                openWith: function(path, uti, success, fail, offset) {
                                        return cordova.exec(success, fail, "ExternalFileUtil", "openWith", [path, uti, offset.left, offset.top]);
                                }
                        };
-               } else if (DATAS.phonegap == 'android') {
+               } else if (PLATFORM == 'android') {
 
                }
 
@@ -133,7 +133,7 @@ try {
                try {
                        collection = json_parse(window.localStorage.getItem('collection'));
                } catch (err) {
-
+                       fb('error parsing collection');
                }
 
                if (collection.res != undefined && collection.res) {
@@ -176,7 +176,7 @@ try {
                                        FINISHLOADING = true;
                                        window.localStorage.setItem('offline.' + DATAS.id, '1');
                                }
-                       })
+                       });
 
                        $(window).on('GALBundleLoaded', function(e, info) {
                                if (info.bundleName == 'content_4') {