From 18ee4e67ddf7e5293d889714a5e75553fce04ed9 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 3 Jun 2015 14:09:33 +0000 Subject: [PATCH] Fix IE offline html5 --- inc/ws/Util/html5/class.ws.html5.compiler.php | 1 - inc/ws/Util/html5/class.ws.html5.links.php | 17 +++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 73de82c6a..c338bca77 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -212,7 +212,6 @@ class wsHTML5Compiler { $this->width = round($size[0], 3); $this->height = round($size[1], 3); - $imagesize = getimagesize(WS_DOCS . '/' . $this->pages[1]['document_id'] . '/html/h150-' . $this->pages[1]['document_page'] . '.jpg'); $this->pdf2htmlRatio = round(($imagesize[0] * 0.48) / $this->width, 3); diff --git a/inc/ws/Util/html5/class.ws.html5.links.php b/inc/ws/Util/html5/class.ws.html5.links.php index 929ccea85..240266b9c 100644 --- a/inc/ws/Util/html5/class.ws.html5.links.php +++ b/inc/ws/Util/html5/class.ws.html5.links.php @@ -118,7 +118,7 @@ class wsHTML5Link { $ext = mb_strtolower(files::getExtension($init['alternative'])); - if (in_array($ext, array('oam', 'zip', 'html'))) { + if (in_array($ext, array('oam', 'zip', 'html')) || substr($init['alternative'], 0, 4) == 'http') { if ($init['inline']) { return new htmlMultimediaLink($id, $init, $compiler); } else { @@ -593,8 +593,7 @@ class htmlMultimediaLink extends wsHTML5Link { public function getHTMLContent() { if ($this->_content == '') { $ext = files::getExtension($this->alternative); - fb($this->alternative); - fb($ext); + if ($ext == 'oam') { $d = $this->unzipFile($this->alternative, true); $this->_config = $this->getConfigOAM($d['dir']); @@ -616,11 +615,16 @@ class htmlMultimediaLink extends wsHTML5Link { $this->_config = $this->getConfigHTML($d['dir'], $this->alternative); $this->copyExternalFile($d['dir'] . '/' . $this->alternative); } + if (substr($this->alternative, 0, 4) == 'http') { + $this->_url = $externalIframe = $this->alternative; + $this->_config = array('html' => false, 'width' => $this->width * $this->getCssScale(), 'height' => $this->height * $this->getCssScale()); + } fb($this->_config); $w = $this->width * $this->getCssScale(); $h = $this->height * $this->getCssScale(); + $res = ''; if ($this->_config['html']) { $this->_url = $d['fdir'] . '/' . $this->_config['html']; if ($this->extra) { @@ -630,9 +634,10 @@ class htmlMultimediaLink extends wsHTML5Link { $iw = $this->_config['width']; $ih = $this->_config['height']; - $res = ''; - } else { - $res = ''; + $res = ''; + } + if (isset($externalIframe)) { + $res = ''; } foreach ($this->_config['inject'] as $i) { -- 2.39.5