]> _ Git - cubeextranet.git/commitdiff
Fix IE offline html5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 3 Jun 2015 14:09:33 +0000 (14:09 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 3 Jun 2015 14:09:33 +0000 (14:09 +0000)
inc/ws/Util/html5/class.ws.html5.compiler.php
inc/ws/Util/html5/class.ws.html5.links.php

index 73de82c6a8815e2ae294cea1230f53a20ab76ea7..c338bca7709cce35ee1ac3b6dcbcfacdfdf009f5 100644 (file)
@@ -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);
 
index 929ccea85b51c55a870447de097728e997c7d621..240266b9cf79f064dfbc7657c673bb05a8222f35 100644 (file)
@@ -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 = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>';
-                       } else {
-                               $res = '';
+                               $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+                       }
+                       if (isset($externalIframe)) {
+                               $res = '<iframe width="' . $w . '" height="' . $h . '" src="' . $externalIframe . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
                        }
 
                        foreach ($this->_config['inject'] as $i) {