From: vincent@cubedesigners.com Date: Wed, 10 Oct 2012 16:22:14 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6869dd61985e658c0ce0c923e904609cc6f2a598;p=cubeextranet.git --- diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 6dbb1cd85..922c029e5 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -67,6 +67,7 @@ class wsHTML5Compiler { 'js/libs/jquery/jquery.transit.js', 'js/widget.js' ); + public $pluginCSS = array(); protected $cssX = array(); protected $cssY = array(); protected $cssWidths = array(); @@ -244,23 +245,36 @@ class wsHTML5Compiler { $main = array_pop($this->jsFiles); + $plugins = array(); + foreach ($e as $plugin) { $plugin = trim($plugin); if ($plugin == '') { continue; } - $d = '/plugins/' . str_replace('.', '/', $plugin); - $dir = $this->assets . $d; + $d = 'plugins/' . str_replace('.', '/', $plugin); + $dir = $this->assets . '/' . $d; if (!file_exists($dir)) { continue; } + $plugins[] = $plugin; + if (file_exists($dir . '/plugin.js')) { - $this->jsFiles[] = $d . '/plugin.js'; + $f = $d . '/plugin.js'; + $this->jsFiles[] = $f; + $this->copy($dir . '/plugin.js', $this->vdir . '/' . $f); + } + if (file_exists($dir . '/plugin.css')) { + $f = $d . '/plugin.css'; + $this->pluginCSS[] = $f; + $this->copy($dir . '/plugin.css', $this->vdir . '/' . $f); } } + $this->config->plugins = $plugins; + array_push($this->jsFiles, $main); } @@ -381,6 +395,9 @@ class wsHTML5Compiler { for ($i = 0; $i < $numCSS; $i++) { $sheets[] = 'data/style/style_' . $i . '.css'; } + $sheets = array_merge($sheets, $this->pluginCSS); + + $style = array(); foreach ($sheets as $sheet) { $style[] = ''; @@ -654,6 +671,10 @@ class wsHTML5Compiler { return; } + if (!file_exists(dirname($t))) { + mkdir(dirname($t), 0777, true); + } + copy($s, $t); }