]> _ Git - cubeextranet.git/commitdiff
#1343 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 13 Apr 2017 12:51:15 +0000 (12:51 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 13 Apr 2017 12:51:15 +0000 (12:51 +0000)
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/class.ws.html5.compiler.php

index b758b543d4881ea355cd74b91b5f50e245cff0ba..8fe652b8788af6ec06eb90330263fe71d78b9e75 100644 (file)
@@ -858,7 +858,9 @@ class wsMaintenance {
        }
 
        public static function updateHTML5Sources($args = array(), $externals = true) {
-               $branchesDir = WS_COMPILE_ASSETS . '/player/branches/';
+               $playerDir = WS_COMPILE_ASSETS . '/player/';
+               $branchesDir = $playerDir . 'branches/';
+               $localDir = $playerDir . 'local/';
                $git = new CubeIT_CommandLine_Git($branchesDir . 'fluidbook-html5');
                echo '<pre>';
                echo $git->executeCmd('pull --all');
@@ -888,6 +890,9 @@ class wsMaintenance {
                                $git = new CubeIT_CommandLine_Git($branchesDir);
                                echo $git->executeCmd('clone -b ' . $b . ' --single-branch git@git.cubedesigners.com:fluidbook-html5.git ' . $b);
                        }
+                       if (!file_exists($localDir . $b)) {
+                               mkdir($localDir . $b, 0777, true);
+                       }
                        $git = new CubeIT_CommandLine_Git($branchesDir . $b);
                        echo $git->executeCmd('pull');
                }
index 2026f118cea12c51f99c05dd9c4ae840325939fc..86db50ccfaee0d457e7225d5555858a9b05463ca 100644 (file)
@@ -322,11 +322,12 @@ class wsBookParametres extends wsParametres {
                $this->fields['navOrderH'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Ordre des icônes dans la nav') . ' (' . __('Si différente') . ')', 'grade' => 3);
 
 
-               $branches = array(__('Stable') => 'stable',
-                                 __('En cours de développement') => 'dev');
+               $branches = array('master : git (stable)' => 'stable',
+                                 'master : local (dev)' => 'dev');
                $gitbranches = json_decode(file_get_contents(WS_CACHE . '/activebranches'));
                foreach ($gitbranches as $b) {
-                       $branches['Branch ' . $b] = 'branch:' . $b;
+                       $branches[$b . ' : git'] = $b . '|git';
+                       $branches[$b . ' : local'] = $b . '|local';
                }
 
                $this->fields['mobileLVersion'] = array('type' => 'combo', 'default' => 'stable', 'editable' => true,
index ead2b1353b0f385b2613f076644654bcd96c5b46..ac828ad34e33b06c30181aab1682b79706aef6fb 100644 (file)
@@ -45,6 +45,7 @@ class wsHTML5Compiler {
                'js/libs/gsap/jquery.gsap.js',
                'js/libs/gal/gal.js',
                'js/libs/gal/gal.filesystem.js',
+               'js/libs/interact.js',
                'js/libs/fluidbook/forms/fluidbook.form.bulle.js',
                'js/libs/fluidbook/fluidbook.utils.js',
                'js/libs/fluidbook/fluidbook.links.js',
@@ -56,6 +57,7 @@ class wsHTML5Compiler {
                'js/libs/fluidbook/fluidbook.l10n.js',
                'js/libs/fluidbook/fluidbook.nav.js',
                'js/libs/fluidbook/fluidbook.touch.js',
+               'js/libs/fluidbook/fluidbook.interact.js',
                'js/libs/fluidbook/fluidbook.loader.js',
                'js/libs/fluidbook/fluidbook.search.js',
                'js/libs/fluidbook/fluidbook.help.js',
@@ -174,11 +176,15 @@ class wsHTML5Compiler {
                $this->version = $version;
 
                if ($version == 'stable') {
-                       $this->assets = WS_COMPILE_ASSETS . '/_html5prod';
-                       wsMaintenance::updateHTML5Sources(array(), false);
+                       $this->assets = WS_COMPILE_ASSETS . '/player/branches/master';
+               } else if ($version == 'dev') {
+                       $this->assets = WS_COMPILE_ASSETS . '/player/local/master';
                } else {
-                       $this->assets = WS_COMPILE_ASSETS . '/_html5';
+                       list($branch, $location) = explode('|', $version);
+                       $this->assets = WS_COMPILE_ASSETS . '/player/' . ($location == 'git' ? 'branches' : $location) . '/' . $branch;
                }
+
+
                $this->phonegap = $phonegap;
                $this->standalone = $standalone || $this->phonegap;
                $this->appcache = $appcache;
@@ -715,7 +721,6 @@ class wsHTML5Compiler {
                global $core;
 
                if ($this->book->parametres->customLinkClass == 'WescoSalesLink') {
-                       $this->specialJsFiles[] = 'js/libs/interact.js';
                        $this->specialJsFiles[] = 'js/libs/fluidbook/special/wescosales.js';
                        $this->specialCSS[] = 'style/special/wescosales.css';
                }