From 2fc57c632390099e6f4b6a3f0884bb0bf652a76d Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 23 Apr 2012 13:02:23 +0000 Subject: [PATCH] --- inc/ws/Util/html5/class.ws.html5.compiler.php | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 919460624..eb5271f44 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -36,6 +36,12 @@ class wsHTML5Compiler { 'js/libs/jquery/jquery.hashchange.js', 'js/tester.js' ); + protected static $widgetJsFiles = array( + 'js/libs/cube/fb.js', + 'js/libs/modernizr.js', + 'js/libs/jquery/jquery.js', + 'js/widget.js' + ); protected $cssX = array(); protected $cssY = array(); protected $cssWidths = array(); @@ -343,6 +349,22 @@ class wsHTML5Compiler { file_put_contents($this->vdir . '/index.html', $html); file_put_contents($this->vdir . '/indexu.html', $uhtml); file_put_contents($this->vdir . '/indext.html', $uhtml); + + // Write widget html + $whtml = file_get_contents(WS_COMPILE_ASSETS . '/_html5/widget.html'); + $scripts = array(); + foreach (self::$widgetJsFiles as $js) { + $scripts[] = ''; + } + $scripts[] = ''; + $script = implode("\n\t\t", $scripts); + + $style = ''; + $vars = array('titre', 'style', 'script'); + foreach ($vars as $v) { + $whtml = str_replace('', $$v, $whtml); + } + file_put_contents($this->vdir . '/widget.html', $whtml); } protected function writeLangs() { @@ -391,8 +413,6 @@ class wsHTML5Compiler { } protected function writeJs() { - - $mintime = 0; $minimized = WS_COMPILE_ASSETS . '/_html5/js/min.js'; if (file_exists($minimized)) { -- 2.39.5