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

index 2bb040c2b078d713733a145e9e9817d1c147ac4f..311ef4ab59480504a73a9af7a10e89e871fdf8f7 100644 (file)
 
                                                // Fetch full url and store it locally.
 
-                                               that.adapter.saveAsset(key, url, cb, cb);
+                                               that.adapter.saveAsset(key, url, cb, function() {
+
+                                               });
 
                                        })(0);
                                }
                return this.adapter.root.toURL();
        };
 
+       GAL.prototype.getRootNativeURL = function() {
+               try {
+                       return this.adapter.root.toNativeURL();
+               } catch (err) {
+                       return this.getRootURL();
+               }
+       };
+
        GAL.prototype.initAdapter = function(callback) {
                if (null == this.adapter) {
                        this.initAdapter_(callback);
index 342abbb72aa5300e64b3b8d8e06d6223e2a17557..eda9baf9f0ea7a901cdbe9b07ebbe48cf4e77c57 100644 (file)
@@ -46,7 +46,7 @@ try {
                        }, false);
                }
 
-               if (DATAS.phonegap) {
+               if (DATAS && DATAS.phonegap) {
                        loadPhonegap();
                } else {
                        init();
@@ -127,7 +127,6 @@ try {
                }
 
                var collection;
-               console.error(window.localStorage.getItem('collection'));
                try {
                        collection = json_parse(window.localStorage.getItem('collection'));
                } catch (err) {
@@ -147,6 +146,8 @@ try {
                }
 
                if (navigator.onLine && manifest && !OFFLINEAPP) {
+                       fb('init online');
+
                        var readyToLoad = false;
                        var finishedLoading = false;
                        gal = new GameAssetLoader(json_parse(manifest, 'manifest'), fsprefix);