From c55718c3a1325b87ade499fffab549117d07e0c2 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 9 Nov 2012 08:56:14 +0000 Subject: [PATCH] --- inc/ws/Metier/class.ws.book.parametres.php | 4 +++- inc/ws/Util/html5/class.ws.html5.compiler.php | 5 +++-- inc/ws/Util/packager/class.ws.packager.html.php | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index f333abff5..fe0496b45 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -253,13 +253,15 @@ class wsBookParametres extends wsParametres { $this->fields['mobileTransitionDuration'] = array('type' => 'float', 'default' => '1.0', 'editable' => true, 'label' => __('Durée de la transition')); $this->fields['mobileIconVector'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Utiliser les icônes vectorielles')); + $this->fields['mobileServerConfig'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Inclure les fichiers de configuration serveur'), 'grade' => 5); $this->fields['mobilePlugins'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Plugin'), 'grade' => 5); $this->fields['mobileVideosPath'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Chemin vers les vidéos'), 'grade' => 5); + $this->forms['mobile'] = array('label' => __('Version mobile'), - 'fieldsnames' => array('mobileLVersion', 'mobileVersion', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'mobileIconVector', 'mobilePlugins', '|', 'mobileVideosPath')); + 'fieldsnames' => array('mobileLVersion', 'mobileVersion', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath')); $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 8bcbd734c..2574ec83b 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -666,9 +666,10 @@ class wsHTML5Compiler { foreach ($this->additionalConfig as $k => $v) { $this->config->$k = $v; } - if($this->phonegap){ - $this->config->twitter=$this->config->facebook=false; + if ($this->phonegap) { + $this->config->twitter = $this->config->facebook = false; } + $this->config->standalone = $this->phonegap; return 'var DATAS=' . json_encode($this->config) . ';' . "\n"; } diff --git a/inc/ws/Util/packager/class.ws.packager.html.php b/inc/ws/Util/packager/class.ws.packager.html.php index 0554ac599..4a2771928 100644 --- a/inc/ws/Util/packager/class.ws.packager.html.php +++ b/inc/ws/Util/packager/class.ws.packager.html.php @@ -197,7 +197,9 @@ class wsPackagerHTML extends wsPackager { $cp->setArg(null, $dest); $cp->execute(); - $filesToAdd = array('.htaccess', 'web.config'); + if ($this->book->parametres->mobileServerConfig) { + $filesToAdd = array('.htaccess', 'web.config'); + } foreach ($filesToAdd as $f) { $this->copy(WS_COMPILE_ASSETS . '/_html5/' . $f, $dest . '/' . $f); } -- 2.39.5