]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 1 Oct 2013 11:22:47 +0000 (11:22 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 1 Oct 2013 11:22:47 +0000 (11:22 +0000)
js/libs/fluidbook/fluidbook.l10n.js
js/libs/fluidbook/fluidbook.nav.js
js/main.js

index 811c3674b1d15ebbf253c02511c8a3585e8c9b8f..d86b7d43115984ba28343c44c0969ae3e19fccf3 100644 (file)
@@ -36,7 +36,9 @@ FluidbookL10N.prototype = {
                var forceLocales = window.sessionStorage.getItem('locales');
                console.log('force Locales ' + forceLocales);
                var force = false;
-               if (forceLocales) {
+               if (forceLocales === null) {
+                       force = false;
+               } else {
                        force = true;
                        forceLocales = JSON.parse(forceLocales);
                }
@@ -64,7 +66,11 @@ FluidbookL10N.prototype = {
 
                        var url = l[2];
                        if (force) {
-                               url = '../' + forceLocales[l[0]] + '/index.html';
+                               try {
+                                       url = '../' + forceLocales[l[0]] + '/index.html';
+                               } catch (err) {
+                                       url = '';
+                               }
                        }
 
                        var o = {lang: l[0], flag: l[1], url: l[2], langName: l[3], countryName: l[4]};
index 446fe6fc66dab98a76f63c698e909033b6be0aaf..96c95c3e45393316c8b9ab92ef5ec6530b586ace 100644 (file)
@@ -126,8 +126,8 @@ FluidbookNav.prototype = {
                                        });
                                }
                        } else if (icon == 'lang') {
-                               if (this.fluidbook.l10n.multilangEnabled || forceLocales) {
-                                       this.addMultilangLink(forceLocales);
+                               if (this.fluidbook.l10n.multilangEnabled) {
+                                       this.addMultilangLink();
                                }
                        } else if (icon == 'archives') {
                                if (this.fluidbook.datas.archivesLink != '') {
index 6c32b80e26a0a2a601adb9057db19718c5f3f910..e55417562ccabe90ef3b027aa963ceea5b7ef12e 100644 (file)
@@ -91,7 +91,6 @@ function onDeviceReady() {
                });
 
                gal.onLoaded(function(info) {
-                       console.log('loaded ' + info.bundleName);
                        $(window).trigger('GALBundleLoaded', [info]);
                });
 
@@ -177,6 +176,7 @@ function init() {
        fluidbook.loadPlugins();
        fluidbook.loader.preloadPages();
 
+
        desktopScale = 1;
        desktopScaleAmount = 1.5;