From: vincent@cubedesigners.com Date: Mon, 7 Jan 2013 12:22:18 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ddc6fee903176da47be19a4e54f64502e7cd47de;p=cubeextranet.git --- diff --git a/inc/config.inc.php b/inc/config.inc.php index 920c82c89..a74dd106a 100644 --- a/inc/config.inc.php +++ b/inc/config.inc.php @@ -15,6 +15,7 @@ define('MXMLC_PATH', '/usr/local/flex/bin/mxmlc'); define('MXMLC_PATH_3', '/usr/local/flex_sdk_3.6/bin/mxmlc'); define('AS3_SOURCES', '/home/as/sources/as/as3'); define('AS3_FLUIDBOOK_SOURCES', '/home/as/sources/fluidbook'); +define('PHONEGAP_PLUGINS','/home/as/sources/phonegap-plugins'); define('MONITOR_PERFS', true); diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 9f3ce1b50..b2908402c 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -89,8 +89,9 @@ class wsBookParametres extends wsParametres { $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['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', 'pages', 'width', 'height')); + 'fieldsnames' => array('fullscreen', 'navOrder', 'tooltipTimer', 'pages', 'width', 'height')); //. // @@ -278,9 +279,10 @@ class wsBookParametres extends wsParametres { $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'); + $this->fields['phonegapPlugins'] = array('type' => 'textarea', 'default' => 'ChildBrowser', 'editable' => true, 'label' => __('Plugins Phonegap'), 'grade' => 5); $this->forms['phonegap'] = array('label' => __('Applications mobile'), - 'fieldsnames' => array('phonegapId', 'phonegapVersion')); + 'fieldsnames' => array('phonegapId', 'phonegapVersion', 'phonegapPlugins')); $this->fields['secureURL'] = array('type' => 'text', 'default' => 'http://', 'editable' => true, 'label' => __('URL de sécurisation'), 'grade' => 5, 'hint' => __('URL intérrogé pour vérifier si le visiteur à les droits pour consulter la publication')); $this->fields['secureURLRedirect'] = array('type' => 'text', 'default' => 'http://', 'editable' => true, 'label' => __('Redirection'), 'grade' => 5, 'hint' => __("Si l'authentification échoue, redirection vers cette adresse")); diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 74c744e8d..91a848ae2 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -438,7 +438,6 @@ class wsHTML5Compiler { foreach ($sheets as $sheet) { $style[] = ''; } - $style[] = ''; $style = implode("\n\t\t", $style); $pagesContents = ''; @@ -446,6 +445,37 @@ class wsHTML5Compiler { $script = ''; if ($this->phonegap) { $script .= '' . "\n"; + + if ($this->phonegap == 'ios') { + copy($this->assets . '/js/libs/phonegap/plugins/ios/ExternalFileUtil.js', $this->vdir . '/data/ExternalFileUtil.js'); + $script .= '' . "\n"; + } + + $plugins = explode("\n", $this->book->parametres->phonegapPlugins); + foreach ($plugins as $p) { + $p = trim($p); + $pluginDir = 'data/phonegap/' . $p; + $d = $this->vdir . '/' . $pluginDir; + mkdir($d, 0777, true); + + if ($this->phonegap == 'ios') { + $os = 'iOS'; + } else if ($this->phonegap == 'android') { + $os = 'Android'; + } + + $orig = PHONEGAP_PLUGINS . '/' . $os . '/' . $p; + $dr = opendir($orig); + while ($file = readdir($dr)) { + if ($file == '.' || $file == '..') { + continue; + } + if (files::getExtension($file) == 'js') { + copy($orig . '/' . $file, $d . '/' . $file); + $script .= '' . "\n"; + } + } + } } $script .= '' . "\n"; $script .= '' . "\n"; @@ -516,13 +546,13 @@ class wsHTML5Compiler { } protected function writePrint() { - $res = ''; - /* $res .= '
'; - for ($i = 1; $i <= $this->book->parametres->pages; $i++) { - $res.='
'; - } - $res.='
'; */ - return $res; + + if (!$this->book->parametres->print) { + return; + } + + copy(WS_BOOKS . '/final/' . $this->book->book_id . '/data/' . $this->book->parametres->pdfName, $this->vdir . '/data/' . $this->book->parametres->pdfName); + return ''; } protected function writeLangs() { @@ -710,7 +740,7 @@ class wsHTML5Compiler { $icons = array('nav-bookmark' => $couleurI, 'nav-friend' => $couleurI, 'nav-help' => $couleurI, 'nav-index' => $couleurI, 'nav-sommaire' => $couleurI, 'next' => $arrowsColor, 'previous' => $arrowsColor, 'search' => $couleurI, 'nav-facebook' => $couleurI, 'nav-twitter' => $couleurI, 'help-fingers' => $couleurI, 'help-mouse' => $couleurI, 'nav-home' => $couleurI, 'nav-archives' => $couleurI, 'nav-map' => $couleurI, - 'nav-tag' => $couleurI); + 'nav-tag' => $couleurI, 'nav-print' => $couleurI); $this->config->iconsDimensions = array(); foreach ($icons as $icon => $color) {