From: vincent@cubedesigners.com Date: Mon, 9 Sep 2013 12:02:52 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=372447a8451ea9141bc6ffdad735ab103a74aeb5;p=cubeextranet.git --- diff --git a/fluidbook/compile/_js/fluidbook.js b/fluidbook/compile/_js/fluidbook.js index c9897fcbe..dadd95db7 100644 --- a/fluidbook/compile/_js/fluidbook.js +++ b/fluidbook/compile/_js/fluidbook.js @@ -183,10 +183,15 @@ function redirectPDF() { } function redirectMobile() { + var page = ''; var get = parseGet(); var html = 'index.html'; if (get['widget'] != undefined && get['widget'] == '1') { html = 'widget.html'; + page = '?'; + if (get['backgroud'] != undefined) { + page += "background=" + get['background']; + } } var pageNr = 0; if (get.page != undefined) { @@ -200,7 +205,7 @@ function redirectMobile() { } } - var page = ''; + if (pageNr > 0) { page = '#/page/' + pageNr; } diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index ff6b8f669..242fb8ea2 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -879,7 +879,9 @@ class wsAjax extends cubeAjax { fb($_POST); $dest = array('dir' => null, 'file' => null); - $dest = array_merge($dest, $_POST['destination']); + if (isset($_POST['destination']) && is_array($_POST['destination'])) { + $dest = array_merge($dest, $_POST['destination']); + } $exporter = new wsExporter(); $exporter->export($_POST['book_id'], $x, $_POST['action'], $_POST['version'], $dest['dir'], $dest['file']); diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 2b2ed28b8..618db597c 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -578,7 +578,8 @@ class wsHTML5Compiler { // Write widget html if ($this->widget) { $whtml = file_get_contents($this->assets . '/widget.html'); - $script = ''; + $script = ''; + $script .= ''; $style = ''; $vars = array('titre', 'style', 'script'); @@ -745,7 +746,8 @@ class wsHTML5Compiler { } protected function writeJs() { - file_put_contents($this->vdir . '/data/datas.js', $this->writeConfig()); + $config = $this->writeConfig(); + file_put_contents($this->vdir . '/data/datas.js', $config); $finals = array('fluidbook' => $this->jsFiles); if ($this->widget) { $finals['widget'] = $this->widgetJsFiles; @@ -954,7 +956,7 @@ class wsHTML5Compiler { $c->execute(); $convert = new cubeCommandLine('composite'); - $cmd.= '-compose Multiply '; + $cmd = '-compose Multiply '; $cmd.=$tmp . ' ' . $orig . ' '; $cmd.=$this->vdir . '/cover.jpg'; $convert->setManualArg($cmd);