From 1afd48589e6886c5b1c71dcf0566fc16adce3f1f Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 2 Jan 2014 16:13:28 +0000 Subject: [PATCH] --- inc/ws/Util/html5/class.ws.html5.compiler.php | 13 ++++++++++++- inc/ws/Util/html5/class.ws.html5.links.php | 10 +++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index c879cdf04..450f5ea26 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -478,6 +478,14 @@ class wsHTML5Compiler { $cache = ' manifest="cache.appcache"'; } + $iscript = ''; + if (count($this->htmlmultimedia)) { + $iscript.='' . "\n"; + } + + $script = ''; $script .= '' . "\n"; $script .= '' . "\n"; @@ -485,6 +493,8 @@ class wsHTML5Compiler { foreach ($this->pluginJs as $p) { $script .= '' . "\n"; } + $script.=$iscript; + $description = ''; if ($this->book->parametres->seoDescription) { @@ -520,6 +530,7 @@ class wsHTML5Compiler { } $scripts[] = ''; + $scripts[] = $iscript; $script = implode("\n\t\t", $scripts); $scripts = array(); @@ -1331,4 +1342,4 @@ class wsHTML5Compiler { class wsHTML5CompilerDev extends wsHTML5Compiler { -} \ No newline at end of file +} diff --git a/inc/ws/Util/html5/class.ws.html5.links.php b/inc/ws/Util/html5/class.ws.html5.links.php index ab78307c1..82893c0b5 100644 --- a/inc/ws/Util/html5/class.ws.html5.links.php +++ b/inc/ws/Util/html5/class.ws.html5.links.php @@ -558,7 +558,7 @@ class htmlMultimediaLink extends wsHTML5Link { } foreach ($this->_config['inject'] as $i) { - $i = str_replace('$id', '"#' . $this->id . '"', $i); + $i = str_replace('$id', '"#l_' . $this->id . '"', $i); $this->compiler->htmlmultimedia[] = $i; } @@ -567,7 +567,7 @@ class htmlMultimediaLink extends wsHTML5Link { } foreach ($this->_config['injectjs'] as $i) { - + $this->compiler->pluginJs[] = $d['fdir'] . '/' . $i; } $this->copyExternalDir($d['dir']); @@ -606,6 +606,10 @@ class htmlMultimediaLink extends wsHTML5Link { $res = wsHTML5Compiler::writeCSSUA('transform', 'scale(' . $sx . ',' . $sy . ')'); $res.= wsHTML5Compiler::writeCSSUA('transform-origin', '0% 0%'); + + if (!$this->_config['html']) { + return ''; + } return $res; } @@ -615,7 +619,7 @@ class htmlMultimediaLink extends wsHTML5Link { if (file_exists($d . '/index.html')) { $r = array('html' => 'index.html', 'inject' => array(), 'injectcss' => array(), 'injectjs' => array()); } else { - $r = array('html' => false, 'inject' => file_get_contents($d . '/init.js'), 'injectcss' => 'multimedia.css', 'injectjs' => 'multimedia.js'); + $r = array('html' => false, 'inject' => array(file_get_contents($d . '/init.js')), 'injectcss' => array('multimedia.css'), 'injectjs' => array('multimedia.js')); } return array_merge($res, $r); } -- 2.39.5