]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 19 Sep 2013 09:00:34 +0000 (09:00 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 19 Sep 2013 09:00:34 +0000 (09:00 +0000)
js/main.js

index 02f8ecd3673eac889eabe8b79cc966bbe7c676e3..942b5d507c0aa42f5cd70f52dceb61a0cb373591 100644 (file)
@@ -36,10 +36,6 @@ $(function() {
                }, false);
        }
 
-       
-
-
-
        if (DATAS.phonegap) {
                loadPhonegap();
        } else {
@@ -87,6 +83,7 @@ function onDeviceReady() {
 
        if (navigator.onLine && manifest) {
                gal = new GameAssetLoader(JSON.parse(manifest), fsprefix);
+
                gal.init(function() {
                        startAfterLoading = true;
                        init();
@@ -95,14 +92,16 @@ function onDeviceReady() {
                gal.onLoaded(function(info) {
                        $(window).trigger('GALBundleLoaded', [info]);
                });
+               
+               gal.check('content_4',function(){
+                       fluidbook.changeAddress();
+               });
+               
+               gal.check('extras',function(){
+                       window.localStorage.setItem('offline.' + DATAS.id, '1');
+               })
 
                $(window).on('GALBundleLoaded', function(e, info) {
-                       if (info.bundleName === 'content_4') {
-                               fluidbook.changeAddress();
-                       }
-                       if (info.bundleName === 'extras') {
-                               window.localStorage.setItem('offline.' + DATAS.id, '1');
-                       }
                        fluidbook.loader.retryErrorImages();
                });
        } else {