]> _ Git - cubeextranet.git/commitdiff
wip #2113
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 25 Jun 2018 17:48:10 +0000 (17:48 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 25 Jun 2018 17:48:10 +0000 (17:48 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php
inc/ws/Util/packager/class.ws.packager.win.exe.html.php

index b374331e9cd544dd978edaadb67fa8c3dac5472a..1ae437bfdad841c2be553eab3ecc2e936854edd4 100644 (file)
@@ -317,7 +317,7 @@ class wsHTML5Link
        {
                $datas = parse_url($loc);
 
-               if (isset($datas['scheme']) && !is_null($datas['scheme']) || strpos($loc,'#')===0) {
+               if (isset($datas['scheme']) && !is_null($datas['scheme']) || strpos($loc, '#') === 0) {
                        return $loc;
                } else {
                        if ($css) {
@@ -1000,7 +1000,11 @@ class htmlMultimediaLink extends wsHTML5Link
                        } elseif ($ext == 'zip') {
                                $d = $this->unzipFile($this->alternative, false);
                                $this->_config = $this->getConfigZIP($d['dir']);
+                               $html = file_get_contents($d['dir'] . '/index.html');
+                               $html = str_replace('var pRatio = window.devicePixelRatio || 1,', 'var pRatio = 0.5,', $html);
                                $this->copyExternalDir($d['dir'], $d['fdir']);
+                               $this->_config['lowDef'] = 'index_ld.html';
+                               $this->compiler->vdir->file_put_contents($d['fdir'] . '/' . $this->_config['lowDef'], $html);
                        } elseif ($ext == 'html') {
                                $fdir = 'data/links';
                                $dir = $fdir;
@@ -1016,11 +1020,11 @@ class htmlMultimediaLink extends wsHTML5Link
                                $this->_config = array('html' => false, 'width' => $this->width, 'height' => $this->height);
                        }
 
-                       if($this->_config['width']==0){
-                               $this->_config['width']=$this->width;
+                       if ($this->_config['width'] == 0) {
+                               $this->_config['width'] = $this->width;
                        }
-                       if($this->_config['height']==0){
-                               $this->_config['height']=$this->height;
+                       if ($this->_config['height'] == 0) {
+                               $this->_config['height'] = $this->height;
                        }
 
                        $res = '';
@@ -1033,7 +1037,12 @@ class htmlMultimediaLink extends wsHTML5Link
                                $iw = $this->_config['width'];
                                $ih = $this->_config['height'];
 
-                               $res = '<iframe data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+                               $ld = '';
+                               if (isset($this->_config['lowDef'])) {
+                                       $ld = ' data-ld="' . str_replace('index.html', $this->_config['lowDef'], $this->_url) . '" ';
+                               }
+
+                               $res = '<iframe ' . $ld . ' data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
                        }
                        if ($this->_externalIframe !== false) {
                                $s = $this->in_popup ? 1 : $this->getCssScale();
index a165c27ccc05bf33b28d4c3381cc922e57d2967a..144481a3e65a56e474fed8e35b7132f7e59055c0 100644 (file)
@@ -48,7 +48,7 @@ class wsPackagerWinEXEHTML extends wsPackager
                $cl->setArg('title', $this->appName);\r
                $cl->setArg('output-dir', $this->buildPath);\r
                $cl->setArg('nw-version', $this->nwversion);\r
-               $cl->setArg('sdk-build');\r
+               //$cl->setArg('sdk-build');\r
                $cl->setArg('main', 'index.html');\r
                $cl->setArg('name', $this->exeName);\r
                $cl->setArg('mac-icon', $this->vdir . 'icon.icns');\r