]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Sep 2013 13:46:02 +0000 (13:46 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Sep 2013 13:46:02 +0000 (13:46 +0000)
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.l10n.js
js/libs/fluidbook/fluidbook.nav.js
js/main.js

index 8acd9b2d3d1824796411d769094325154e25c004..75cef2603a4c54fdb21a50338a9dbf78e68b1b23 100644 (file)
@@ -100,6 +100,11 @@ Fluidbook.prototype = {
                }\r
                var $this = this;\r
                setTimeout(function() {\r
+                       try {\r
+                               navigator.splashscreen.hide();\r
+                       } catch (err) {\r
+\r
+                       }\r
                        $this._hideSplash();\r
                }, 3000);\r
        },\r
@@ -110,6 +115,7 @@ Fluidbook.prototype = {
                $("#splash").css('opacity', 0).one(this.support.getTransitionEndEvent(true), function() {\r
                        $(this).remove();\r
                });\r
+\r
        },\r
        ready: function() {\r
                if (this.isReady) {\r
@@ -732,6 +738,7 @@ Fluidbook.prototype = {
                        video: 'extras'};\r
                if (this.gal != null && preload[view] != undefined) {\r
                        this.gal.downloadAndCall(preload[view], function() {\r
+\r
                                $this.__openView(view, param1, param2, callback);\r
                        });\r
                } else {\r
index baf500691896a9e587b4688e103ae72f967cb7f1..811c3674b1d15ebbf253c02511c8a3585e8c9b8f 100644 (file)
@@ -33,10 +33,18 @@ FluidbookL10N.prototype = {
                return this.fluidbook.datas.defaultLang;
        },
        initMultilang: function() {
+               var forceLocales = window.sessionStorage.getItem('locales');
+               console.log('force Locales ' + forceLocales);
+               var force = false;
+               if (forceLocales) {
+                       force = true;
+                       forceLocales = JSON.parse(forceLocales);
+               }
+
                if (this.fluidbook.datas.multilang == '') {
                        return;
                }
-               if (this.fluidbook.datas.multiApp) {
+               if (this.fluidbook.datas.multiApp && !force) {
                        return;
                }
 
@@ -53,6 +61,12 @@ FluidbookL10N.prototype = {
                        if (l[0] == '') {
                                return;
                        }
+
+                       var url = l[2];
+                       if (force) {
+                               url = '../' + forceLocales[l[0]] + '/index.html';
+                       }
+
                        var o = {lang: l[0], flag: l[1], url: l[2], langName: l[3], countryName: l[4]};
 
                        $this.multilang[$this.multilang.length] = o;
index 7b9208f0f7e13443da4ce95803d49b239ff6e855..446fe6fc66dab98a76f63c698e909033b6be0aaf 100644 (file)
@@ -66,9 +66,13 @@ FluidbookNav.prototype = {
                 */
                var $this = this;
                // index, chapters, print, friend, bookmark, pdf, archives, basket, fullscreen, sound, 3d, help
+
+               var skipHome = (window.sessionStorage.getItem('home') == '0');
+
                for (var e in this.fluidbook.datas.navOrder) {
                        var icon = this.fluidbook.datas.navOrder[e];
-                       if (icon == 'home') {
+                       if (icon == 'home' && !skipHome) {
+
                                var homeURL = this.fluidbook.datas.home;
                                if (this.fluidbook.datas.home == '%apphome%') {
                                        homeURL = decodeURIComponent();
@@ -76,7 +80,6 @@ FluidbookNav.prototype = {
                                if (homeURL != '') {
                                        this.addLink('nav-home', window.sessionStorage.getItem('apphome'), 'home', 'home');
                                }
-
                        } else if (icon == 'index') {
                                this.addLink('nav-index', '#/index', 'index', 'overview');
                        } else if (icon == 'chapters') {
@@ -123,8 +126,8 @@ FluidbookNav.prototype = {
                                        });
                                }
                        } else if (icon == 'lang') {
-                               if (this.fluidbook.l10n.multilangEnabled) {
-                                       this.addMultilangLink();
+                               if (this.fluidbook.l10n.multilangEnabled || forceLocales) {
+                                       this.addMultilangLink(forceLocales);
                                }
                        } else if (icon == 'archives') {
                                if (this.fluidbook.datas.archivesLink != '') {
index cc56f7976d4364ca64c018276b4461eb6deb2880..3333bd9aa8d00bfee381b3b8950fec8f3f66e6a0 100644 (file)
@@ -81,6 +81,9 @@ function onDeviceReady() {
 
        }
 
+       console.log('cordova ready');
+       navigator.splashscreen.hide();
+
        if (navigator.onLine && manifest) {
                var readyToLoad = false;
                var finishedLoading = false;
@@ -169,6 +172,8 @@ function init() {
        fluidbook.loadPlugins();
        fluidbook.loader.preloadPages();
 
+
+
        desktopScale = 1;
        desktopScaleAmount = 1.5;