From aceda0c375ae8c51aa95cc2f3ce0c624d8adfa4f Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 30 May 2013 06:53:37 +0000 Subject: [PATCH] --- inc/ws/Metier/class.ws.book.parametres.php | 8 +++++--- inc/ws/Util/html5/class.ws.html5.compiler.php | 19 +++++++++++++++---- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index a5a170943..67f585fc5 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -97,7 +97,7 @@ class wsBookParametres extends wsParametres { $this->fields['preload'] = array('type' => 'integer', 'default' => 16, 'editable' => true, 'label' => __('Nombre de pages à précharger'), 'grade' => 3); $this->fields['fullscreen'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Activer le mode plein-écran')); - $this->fields['navOrder'] = array('type' => 'textarea', 'default' => 'index, chapters, print, friend, bookmark, pdf, archives, basket, fullscreen, sound, 3d, help', 'editable' => true, 'label' => __('Ordre des icônes dans la nav'), 'grade' => 5); + $this->fields['navOrder'] = array('type' => 'textarea', 'default' => 'index, chapters, print, friend, bookmark, pdf, archives, basket, fullscreen, sound, 3d, help', 'editable' => true, 'label' => __('Ordre des icônes dans la nav'), 'grade' => 3); $this->fields['tooltipTimer'] = array('type' => 'float', 'default' => 3, "editable" => true, 'label' => __("Temps maximum d'apparition des infos-bulles (en secondes)")); $this->forms['general'] = array('label' => __('Fonctionnalités générales'), 'fieldsnames' => array('fullscreen', 'navOrder', 'tooltipTimer', 'preload', 'pages', 'width', 'height')); @@ -229,7 +229,7 @@ class wsBookParametres extends wsParametres { 'fieldsnames' => array('permanentLinks', 'linkBlinkTime', 'customLinkClass', 'ignoreLinksTypes', 'linkTooltipManager', 'linkCornerSize', '|', 'linkTracker', 'linkTrackerRegexp', '|', 'linkMultimediaPerformanceMode', 'linkMultimediaQuality', '|', 'videoReset', 'videoBigPlay')); //. $this->fields['externalArchives'] = array('type' => 'freefile', 'default' => '', 'editable' => true, - 'label' => __('Archives'), 'grade' => 3, 'fileFilter' => $swfFilter); + 'label' => __('Archives'), 'grade' => 3, 'fileFilter' => $imageFilter); $this->fields['archivesLink'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Lien'), 'grade' => 5); $this->fields['archivesLabel'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Label'), 'grade' => 5); @@ -265,6 +265,8 @@ class wsBookParametres extends wsParametres { __("Version HTML5 en images") => 'html5-images') ); + $this->fields['navOrderH'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Ordre des icônes dans la nav') . ' (' . __('Si différente') . ')', 'grade' => 3); + $this->fields['mobileLVersion'] = array('type' => 'combo', 'default' => 'stable', 'editable' => true, 'label' => __('Version logicielle'), 'grade' => 5, 'datas' => array(__('Stable') => 'stable', __('En cours de développement') => 'dev') @@ -286,7 +288,7 @@ class wsBookParametres extends wsParametres { $this->fields['mobileExtraXSpace'] = array('type' => 'integer', 'default' => '0', 'editable' => true, 'label' => __('Marge supplémentaire horizontale'), 'grade' => 3); $this->forms['mobile'] = array('label' => __('Version mobile'), - 'fieldsnames' => array('mobileLVersion', 'mobileVersion', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace')); + 'fieldsnames' => array('mobileLVersion', 'mobileVersion', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace')); $this->fields['phonegapId'] = array('type' => 'text', 'default' => 'com.fluidbook.phonegap.$id', 'editable' => true, 'label' => __("Identifiant de l'identifiant"), 'grade' => 5, 'hint' => __('De la forme') . ' com.fluidbook.phonegap.xxxxx'); $this->fields['phonegapVersion'] = array('type' => 'text', 'default' => '1.0.0', 'editable' => true, 'label' => __("Version de l'application"), 'grade' => 5, 'hint' => __('De la forme') . ' 1.2.3'); diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 647725dd1..8b650c254 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -349,7 +349,7 @@ class wsHTML5Compiler { $lines[] = 'index.html* index.html'; $lines[] = ''; $lines[] = 'CACHE:'; - $assets = array('images', 'style', 'swf', 'data/style', 'data/images', 'data/fluidbook.js','data/datas.js'); + $assets = array('images', 'style', 'swf', 'data/style', 'data/images', 'data/fluidbook.js', 'data/datas.js'); $pages = $this->book->parametres->pages + 1; @@ -466,7 +466,7 @@ class wsHTML5Compiler { $plugins = explode("\n", $this->book->parametres->phonegapPlugins); foreach ($plugins as $p) { $p = trim($p); - if($p=='ChildBrowser'){ + if ($p == 'ChildBrowser') { continue; } $pluginDir = 'data/phonegap/' . $p; @@ -692,7 +692,7 @@ class wsHTML5Compiler { protected function writeJs() { file_put_contents($this->vdir . '/data/datas.js', $this->writeConfig()); $finals = array('fluidbook' => $this->jsFiles, 'widget' => $this->widgetJsFiles); - + foreach ($finals as $jsfinal => $files) { $mintime = 0; @@ -735,7 +735,7 @@ class wsHTML5Compiler { file_put_contents($this->vdir . '/data/' . $jsfinal . '.js', $js); } - + if ($this->phonegap) { $this->copy($this->assets . '/js/libs/phonegap/cordova-' . $this->phonegap . '.js', $this->vdir . '/data/cordova.js'); } @@ -770,6 +770,17 @@ class wsHTML5Compiler { if ($this->phonegap && ($this->book->parametres->offlineLink == '' || $this->book->parametres->offlineLink == 'http://')) { $this->config->share = false; } + $o = trim($this->config->navOrderH) != '' ? $this->config->navOrderH : $this->config->navOrder; + $navOrder = array(); + $oo = explode(',', $o); + foreach ($oo as $ooo) { + $ooo = trim($ooo); + if ($ooo == '') { + continue; + } + $navOrder[] = $ooo; + } + $this->config->navOrder = $navOrder; $this->config->standalone = $this->standalone; return 'var DATAS=' . json_encode($this->config) . ';' . "\n"; -- 2.39.5