]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 14 Oct 2014 12:01:35 +0000 (12:01 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 14 Oct 2014 12:01:35 +0000 (12:01 +0000)
fluidbook/compile/_js/fluidbook.js
fluidbook/compile/index.html
fluidbook/compile/style.css
inc/ws/Util/class.ws.exporter.php

index 1a6d93f6fabaf8888b8ecaf5d131a7b86d47c122..1ad41eb2ec0feb37b473e08be95b000cdbb335fe 100644 (file)
@@ -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() {
index 402cd2bbd971cf982dfa7c41c73692cb5fd854d3..63481e207a24067e975d29f8308e89ae338d2cc0 100644 (file)
                <script type="text/javascript">
                        FB_DEFAULT_LANG = '$lang';
                        var backgroundColor = "$bgcolor";
-                       if (isMobile() || $alwaysHTML5) {
-                               $redirectMobile
-                       } else if (isBadMobile()) {
-                               $redirectPDF
-                       } else {
-                               swfobject.embedSWF("$pathToIndex?junk=$junk", "fluidbook", "100%", "100%", "$flashversion", "", getFlashvars($junk, $fv), {"allowScriptAccess": "always", "quality": "high", "scale": "noscale", "wmode": getWmode(), "allowFullScreen": "true", 'allowFullScreenInteractive': 'true'}, {"bgcolor": "#" + getBackgroundColor()});
+                       function redirect() {
+                               if (isMobile() || $alwaysHTML5) {
+                                       $redirectMobile
+                               } else if (isBadMobile()) {
+                                       $redirectPDF
+                               } else {
+                                       document.getElementById('fluidbook').style.opacity = 1;
+                                       swfobject.embedSWF("$pathToIndex?junk=$junk", "fluidbook", "100%", "100%", "$flashversion", "", getFlashvars($junk, $fv), {"allowScriptAccess": "always", "quality": "high", "scale": "noscale", "wmode": getWmode(), "allowFullScreen": "true", 'allowFullScreenInteractive': 'true'}, {"bgcolor": "#" + getBackgroundColor()});
+                               }
                        }
                </script>
                $ga
                $redirectScript
        </head>
        <body onload="ready();">
-               <div id="fluidbook">
+               <div id="fluidbook" style="opacity:0;">
                        <div style="padding:20px;text-align:center;"><a class="getflash" href="http://get.adobe.com/flashplayer/" target="_blank" style="background-image:url('$pathToGetflash');"></a></div>
                        <div style="padding:20px;">$alt</div>
                </div>
index 55f6bd6c5842c29e83153fd4ecd03a4f43042e57..33bded1d66cf0c8270b407c51a4d7f56fd3a4efb 100644 (file)
@@ -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;}
index 284df505dfe1ed215129927448d8bb88c9d52041..7a1e860145033f65a8376c0a410288181c1f65c3 100644 (file)
@@ -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,