]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 18 Jul 2014 17:00:59 +0000 (17:00 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 18 Jul 2014 17:00:59 +0000 (17:00 +0000)
js/main.js

index 5e6ce2f0d5ddbd1079a9a80d5b86cf239df31e5b..558a3a95ba0af6cd1df5d525ab37a1ac329d7925 100644 (file)
@@ -28,21 +28,21 @@ try {
                if (Modernizr.applicationcache) {
                        applicationCache.addEventListener('updateready', cacheUpdated, false);
                        applicationCache.addEventListener('downloading', function(e) {
-                               console.log('cache downloading');
+                               fb('cache downloading');
                        }, false);
                        applicationCache.addEventListener('cached', function(e) {
-                               console.log('cache completed');
+                               fb('cache completed');
                                fluidbook.video.initCache();
                        }, false);
                        applicationCache.addEventListener('noupdate', function(e) {
-                               console.log('cache nothing to update');
+                               fb('cache nothing to update');
                                fluidbook.video.initCache();
                        }, false);
                        applicationCache.addEventListener('checking', function(e) {
-                               console.log('cache check');
+                               fb('cache check');
                        }, false);
                        applicationCache.addEventListener('error', function(e) {
-                               console.log('cache error');
+                               fb('cache error');
                        }, false);
                }
 
@@ -72,7 +72,7 @@ try {
                                cordovaPath
                                , cordovaLoaded);
                if (window.cordova) {
-                       console.log('cordova already loaded');
+                       fb('cordova already loaded');
                        cordovaLoaded();
                }
        }
@@ -109,7 +109,7 @@ try {
                        return;
                }
 
-               console.log('device ready !');
+               fb('device ready !');
 
                DEVICE_READY = true;
 
@@ -135,7 +135,7 @@ try {
                try {
                        collection = json_parse(window.localStorage.getItem('collection'));
                } catch (err) {
-                       console.error('error parsing collection');
+                       fb('error parsing collection');
                }
 
                if (collection.res != undefined && collection.res) {
@@ -147,16 +147,13 @@ try {
                }
 
                if (!OFFLINEAPP) {
-                       console.log('set manifest from manifest pub');
+                       fb('set manifest from manifest pub');
                        manifest = collection.manifestPub[DATAS.id];
                }
 
-               console.log(manifest.bundles[0].name);
-               console.log(manifest.bundles[0].contents[0]);
-               console.log(manifest.bundles.length);
 
                if (navigator.onLine && !OFFLINEAPP) {
-                       console.log('init online');
+                       fb('init online');
 
                        var readyToLoad = false;
                        var finishedLoading = false;
@@ -176,20 +173,20 @@ try {
 
                        gal.check('extras', function(info) {
                                if (info.success) {
-                                       console.log('set offline flag');
+                                       fb('set offline flag');
                                        FINISHLOADING = true;
                                        window.localStorage.setItem('offline.' + DATAS.id, '1');
                                }
                        });
 
                        $(window).on('GALBundleLoaded', function(e, info) {
-                               console.log('Loaded :: ' + info.bundleName);
+                               fb('Loaded :: ' + info.bundleName);
 
                                if (info.bundleName == 'content_4') {
                                        fluidbook.changeAddress();
                                }
                                if (info.bundleName == 'extras') {
-                                       console.log('set offline flag');
+                                       fb('set offline flag');
                                        FINISHLOADING = true;
                                        window.localStorage.setItem('offline.' + DATAS.id, '1');
                                }