]> _ Git - fluidbook-html5.git/commitdiff
wip #2657 @4
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 1 Apr 2019 16:54:16 +0000 (18:54 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 1 Apr 2019 16:54:16 +0000 (18:54 +0200)
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.mobilefirst.js
js/libs/fluidbook/fluidbook.sound.js
js/libs/fluidbook/menu/fluidbook.index.js

index 38b6330a0a5bd47be9eae27f41d9a21080075c94..3e265164043b44ad6c0fe37b510d1e73e4ed362d 100644 (file)
@@ -24,7 +24,7 @@ Fluidbook.prototype = {
         this.canNavigate = false;
 
         this.initSettings(datas);
-        this.singleMode = (this.datas.mobileNavigationType === 'portrait');
+        this.singleMode = (this.datas.mobileNavigationType === 'portrait' || this.datas.mobileNavigationType === 'mobilefirst');
 
         this.junk = datas.cacheDate;
         this.networkControl = new FluidbookNetworkControl(this);
index 89223adf2a6c508c0f712ca4931f6ef4ff8eddf8..b564bb63f3778cc254a3d926d5cc122cfd89962e 100644 (file)
@@ -3,7 +3,7 @@ function FluidbookMobileFirst(fluidbook) {
     this.enabled = this.fluidbook.datas.mobileNavigationType === 'mobilefirst';
     if (this.enabled) {
         this.init();
-    }else{
+    } else {
         $("html").addClass('no-mobilefirst');
     }
 }
@@ -11,5 +11,6 @@ function FluidbookMobileFirst(fluidbook) {
 FluidbookMobileFirst.prototype = {
     init: function () {
         $("html").addClass('mobilefirst');
+        this.fluidbook.datas.soundTheme = '';
     },
 }
\ No newline at end of file
index 94c8a16de665f39a3abe4d10a8d2e82eeb69ec92..f2a47e153566559fc9659fa7dd664f601bfdee2f 100644 (file)
@@ -1,7 +1,7 @@
 function FluidbookSound(fluidbook) {
     this.fluidbook = fluidbook;
 
-    if (this.fluidbook.datas.soundTheme == '' || !Modernizr.audio || this.fluidbook.support.iOS || this.fluidbook.support.android) {
+    if (this.fluidbook.datas.soundTheme === '' || !Modernizr.audio || this.fluidbook.support.iOS || this.fluidbook.support.android) {
         this.enabled = false;
         this.on = false;
         return;
index 2768cbe146ef35ffb87637cec3c9f6d710886640..92edd851ff1e3b2c9f77464f9e73a48c4fc02039 100644 (file)
@@ -23,7 +23,7 @@ FluidbookIndex.prototype = {
     },
 
     getNormalView: function () {
-        if (this.normalHTML == '') {
+        if (this.normalHTML === '') {
             this.normalHTML += '<div class="content"><div id="indexView">';
 
             if (this.fluidbook.datas.indexMessage !== '') {
@@ -52,7 +52,7 @@ FluidbookIndex.prototype = {
                 } else {
                     c = '';
 
-                    if (this.fluidbook.l10n.dir == 'ltr') {
+                    if (this.fluidbook.l10n.dir === 'ltr') {
                         s1 = 'left';
                         s2 = 'right'
                     } else {