From: vincent@cubedesigners.com Date: Tue, 6 Nov 2012 14:58:46 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=750210f432032acd0d68ae18a19efca2043f6506;p=cubeextranet.git --- diff --git a/images/extranet/devis.png b/images/extranet/devis.png index f4cc9152b..46b093c1e 100644 Binary files a/images/extranet/devis.png and b/images/extranet/devis.png differ diff --git a/images/extranet/devis2page1.png b/images/extranet/devis2page1.png index 8097cb28d..59a49f409 100644 Binary files a/images/extranet/devis2page1.png and b/images/extranet/devis2page1.png differ diff --git a/images/extranet/devis2page2.png b/images/extranet/devis2page2.png index 1a744681e..c34ab000d 100644 Binary files a/images/extranet/devis2page2.png and b/images/extranet/devis2page2.png differ diff --git a/images/extranet/facture-brouillon.png b/images/extranet/facture-brouillon.png index aa3d8b5c2..c4ed1faed 100644 Binary files a/images/extranet/facture-brouillon.png and b/images/extranet/facture-brouillon.png differ diff --git a/images/extranet/facture.png b/images/extranet/facture.png index 4a255f08c..a94e7f2e3 100644 Binary files a/images/extranet/facture.png and b/images/extranet/facture.png differ diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 6ffd20ff1..532a226a7 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -209,7 +209,10 @@ class wsHTML5Compiler { } public function compile() { - $dirsToCreate = array('data/images', 'data/contents', 'data/background', 'data/thumbnails', 'data/style', 'swf'); + $dirsToCreate = array('data/images', 'data/contents', 'data/background', 'data/thumbnails', 'data/style'); + if (in_array('flv', $this->getVideosFormats())) { + $dirsToCreate[] = 'swf'; + } foreach ($dirsToCreate as $dir) { $d = $this->vdir . '/' . $dir; @@ -228,7 +231,9 @@ class wsHTML5Compiler { `cp -r $from $to`; // Copy swf - copy($this->assets . '/swf/video.swf', $this->vdir . '/swf/video.swf'); + if (file_exists($this->vdir . '/swf')) { + copy($this->assets . '/swf/video.swf', $this->vdir . '/swf/video.swf'); + } $this->loadPlugins(); $this->writeImages(); @@ -280,9 +285,25 @@ class wsHTML5Compiler { array_push($this->jsFiles, $main); } + protected function getVideosFormats($poster = true) { + if ($this->phoenag == 'ios') { + $res = array('mp4'); + } else if ($this->phonegap == 'android') { + $res = array('ogv', 'webm'); + } + if (!$this->phonegap) { + $res[] = 'flv'; + } + if ($poster) { + $res[] = 'jpg'; + } + } + protected function writeCache() { - $videosExtensions = array('flv', 'ogv', 'webm', 'mp4'); - $videos = array('flv' => array(), 'ogv' => array(), 'webm' => array(), 'mp4' => array()); + $videosExtensions = $this->getVideosFormats(false); + foreach ($videosExtensions as $e) { + $videos[$e] = array(); + } $cacheFile = $this->vdir . '/cache.appcache'; @@ -770,7 +791,7 @@ class wsHTML5Compiler { $res[] = $shade; // Background - $body = '#main,#view.index{'; + $body = '#main,.mview.index{'; $body.='background-color:#' . $this->theme->parametres->backgroundColor . ';'; switch ($this->theme->parametres->repeat) { case wsTheme::REPEAT: @@ -868,9 +889,9 @@ class wsHTML5Compiler { // Menus # View - $res[] = '.portrait #view{width:' . $w . ';min-height:' . $h . '}'; - $res[] = '.landscape #view{width:' . $w2 . ';min-height:' . $h . '}'; - $res[] = '#view{background-color:' . self::colorToCSS($this->theme->parametres->couleurB, 1) . ';color:' . self::colorToCSS($this->theme->parametres->subTextColor) . ';}'; + $res[] = '.portrait .mview{width:' . $w . ';min-height:' . $h . '}'; + $res[] = '.landscape .mview{width:' . $w2 . ';min-height:' . $h . '}'; + $res[] = '.mview{background-color:' . self::colorToCSS($this->theme->parametres->couleurB, 1) . ';color:' . self::colorToCSS($this->theme->parametres->subTextColor) . ';}'; # Index $ratio = $this->width / $this->height; $thumbh = round(100 / $ratio); @@ -908,7 +929,7 @@ class wsHTML5Compiler { public function copyLinkFile($source, $dest, $video = false) { $origDir = WS_BOOKS . '/working/' . $this->book_id . '/'; - $types = array('flv', 'mp4', 'ogv', 'webm', 'jpg'); + $types = $this->getVideosFormats(); if ($video) { wsTools::encodeWebVideos($origDir . $source, null, true); $e = explode('.', $source); diff --git a/inc/ws/Util/packager/class.ws.packager.phonegap.php b/inc/ws/Util/packager/class.ws.packager.phonegap.php index 0fc3e0280..2d310b928 100644 --- a/inc/ws/Util/packager/class.ws.packager.phonegap.php +++ b/inc/ws/Util/packager/class.ws.packager.phonegap.php @@ -12,7 +12,7 @@ class wsPackagerPhonegap extends wsPackager { protected function preparePackage() { parent::preparePackage(); - $compiler = wsHTML5Compiler::factory($this->book_id, null, true, $this->vdir); + $compiler = wsHTML5Compiler::factory($this->book_id, null, 'ios', $this->vdir); $compiler->compile(); unlink($this->vdir . '/indext.html'); @@ -27,7 +27,7 @@ class wsPackagerPhonegap extends wsPackager { } protected function makeResources() { - $splashs = array('320x480' => 'Default~iphone', '640x960' => 'Default@2x~iphone', '1024x768' => 'Default-Landscape~ipad', '768x1024' => 'Default-Portrait~ipad', '2048x1496' => 'Default-Landscape@2x~ipad', '1536x2008' => 'Default-Portrait@2x~ipad', '640x1136' => 'Default-568h@2x'); + $splashs = array('320x480' => 'Default~iphone', '640x960' => 'Default@2x~iphone', '1024x748' => 'Default-Landscape~ipad', '768x1004' => 'Default-Portrait~ipad', '2048x1496' => 'Default-Landscape@2x~ipad', '1536x2008' => 'Default-Portrait@2x~ipad', '640x1136' => 'Default-568h@2x~iphone'); $icons = array(57 => 'icon', 72 => 'icon-72', 114 => 'icon@2x', 144 => 'icon-72@2x'); if (!file_exists($this->resources . '/splash')) {