From 099bfdf18b24f21947c37f1b1fcfbb19633f6af6 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 14 Oct 2014 12:01:35 +0000 Subject: [PATCH] --- fluidbook/compile/_js/fluidbook.js | 12 +++++++----- fluidbook/compile/index.html | 17 ++++++++++------- fluidbook/compile/style.css | 2 +- inc/ws/Util/class.ws.exporter.php | 3 +++ 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/fluidbook/compile/_js/fluidbook.js b/fluidbook/compile/_js/fluidbook.js index 1a6d93f6f..1ad41eb2e 100644 --- a/fluidbook/compile/_js/fluidbook.js +++ b/fluidbook/compile/_js/fluidbook.js @@ -196,9 +196,8 @@ function redirectPDF() { function redirectMobile() { var page = ''; var get = parseGet(); - console.log(get); var html = 'index.html'; - if (get['widget'] != undefined && get['widget'] == '1') { + if (get['widget'] !== undefined && get['widget'] == '1') { html = 'widget.html'; page = '?widget=1&'; if (get['background'] != undefined) { @@ -217,12 +216,14 @@ function redirectMobile() { } } - - if (page == '' && pageNr > 0) { + if (page === '') { page = '#/page/' + pageNr; } - window.location = 'm/' + html + page; + setTimeout(function () { + window.location = 'm/' + html + page; + }, 10); + } function fb(e) { @@ -269,6 +270,7 @@ function wheel(event) { function ready() { document.body.style.backgroundColor = '#' + getBackgroundColor(); + redirect(); } function getBackgroundColor() { diff --git a/fluidbook/compile/index.html b/fluidbook/compile/index.html index 402cd2bbd..63481e207 100644 --- a/fluidbook/compile/index.html +++ b/fluidbook/compile/index.html @@ -21,19 +21,22 @@ $ga $redirectScript -
+
$alt
diff --git a/fluidbook/compile/style.css b/fluidbook/compile/style.css index 55f6bd6c5..33bded1d6 100644 --- a/fluidbook/compile/style.css +++ b/fluidbook/compile/style.css @@ -1,5 +1,5 @@ html{height:100%;overflow:hidden;} -#fluidbook{height:100%} +#fluidbook{height:100%;} body{height:100%;margin:0;padding:0;font-family:Arial, Helvetica, sans-serif;color:#666;font-size:11px;} .center{margin:10px auto;text-align:center;} blockquote{width:75%;margin:auto;padding-top:150px;} diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index 284df505d..7a1e86014 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -73,6 +73,9 @@ class wsExporter { $phonegap->setPreference('auto-hide-splash-screen', false); $phonegap->setPreference('ios-statusbarstyle', CubeIT_Mobile_Phonegap::BARSTYLE_TRANSLUCENT); $phonegap->setPreference('iosPersistentFileLocation', 'Library'); + if ($collection->settings['orientation'] != 'portrait') { + $phonegap->setPreference('EnableViewportScale', true); + } $phonegap->addFeatures(array( CubeIT_Mobile_Phonegap::FEATURE_CONNECTION, CubeIT_Mobile_Phonegap::FEATURE_DEVICE, -- 2.39.5