From: vincent@cubedesigners.com Date: Mon, 25 Jun 2018 17:48:10 +0000 (+0000) Subject: wip #2113 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=57fb8ebf20abc3210313d245411a80b07ec1dbe1;p=cubeextranet.git wip #2113 --- diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index b374331e9..1ae437bfd 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -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 = ''; + $ld = ''; + if (isset($this->_config['lowDef'])) { + $ld = ' data-ld="' . str_replace('index.html', $this->_config['lowDef'], $this->_url) . '" '; + } + + $res = ''; } if ($this->_externalIframe !== false) { $s = $this->in_popup ? 1 : $this->getCssScale(); diff --git a/inc/ws/Util/packager/class.ws.packager.win.exe.html.php b/inc/ws/Util/packager/class.ws.packager.win.exe.html.php index a165c27cc..144481a3e 100644 --- a/inc/ws/Util/packager/class.ws.packager.win.exe.html.php +++ b/inc/ws/Util/packager/class.ws.packager.win.exe.html.php @@ -48,7 +48,7 @@ class wsPackagerWinEXEHTML extends wsPackager $cl->setArg('title', $this->appName); $cl->setArg('output-dir', $this->buildPath); $cl->setArg('nw-version', $this->nwversion); - $cl->setArg('sdk-build'); + //$cl->setArg('sdk-build'); $cl->setArg('main', 'index.html'); $cl->setArg('name', $this->exeName); $cl->setArg('mac-icon', $this->vdir . 'icon.icns');