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) {
}
}
-
- 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) {
function ready() {
document.body.style.backgroundColor = '#' + getBackgroundColor();
+ redirect();
}
function getBackgroundColor() {
<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>
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;}
$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,