From: vincent@cubedesigners.com Date: Thu, 13 Apr 2017 12:51:15 +0000 (+0000) Subject: #1343 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=2f3d1315b7882f97d40a9e935d671e57a2bb12a3;p=cubeextranet.git #1343 @2 --- diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index b758b543d..8fe652b87 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -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 '
';
 		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');
 		}
diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php
index 2026f118c..86db50ccf 100644
--- a/inc/ws/Metier/class.ws.book.parametres.php
+++ b/inc/ws/Metier/class.ws.book.parametres.php
@@ -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,
diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php
index ead2b1353..ac828ad34 100644
--- a/inc/ws/Util/html5/class.ws.html5.compiler.php
+++ b/inc/ws/Util/html5/class.ws.html5.compiler.php
@@ -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';
 		}