From: Vincent Vanwaelscappel Date: Fri, 20 Jun 2014 13:11:20 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6015776f57caa83ad9cab2b4b66d56b8d6f9c37c;p=fluidbook-html5.git --- diff --git a/js/libs/gal/gal.js b/js/libs/gal/gal.js index 2f965ac2..2bb040c2 100644 --- a/js/libs/gal/gal.js +++ b/js/libs/gal/gal.js @@ -106,15 +106,19 @@ var key = bundle[index]; // Get the full url to the asset. var url = encodeURI(that.manifest.assetRoot + key); - // Fetch full url and store it locally. - that.adapter.saveAsset(key, url, function() { + + var cb = function() { fireCallback_(that.progress, bundleName, { current: index + 1, total: bundle.length }); // Iterate to the next file. loop(index + 1); - }); + }; + + // Fetch full url and store it locally. + + that.adapter.saveAsset(key, url, cb, cb); })(0); }