]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 7 Jan 2013 12:22:18 +0000 (12:22 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 7 Jan 2013 12:22:18 +0000 (12:22 +0000)
inc/config.inc.php
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/class.ws.html5.compiler.php

index 920c82c89538c5e1f2426a70516cfd2e0dc3c86a..a74dd106aa51d271ae0c614f4297f005837fa7ec 100644 (file)
@@ -15,6 +15,7 @@ define('MXMLC_PATH', '/usr/local/flex/bin/mxmlc');
 define('MXMLC_PATH_3', '/usr/local/flex_sdk_3.6/bin/mxmlc');\r
 define('AS3_SOURCES', '/home/as/sources/as/as3');\r
 define('AS3_FLUIDBOOK_SOURCES', '/home/as/sources/fluidbook');\r
+define('PHONEGAP_PLUGINS','/home/as/sources/phonegap-plugins');\r
 \r
 define('MONITOR_PERFS', true);\r
 \r
index 9f3ce1b50f61c37b3026a0ef9b435542e6c54c91..b2908402c61b1c44d0d0f189ecddf4da530450de 100644 (file)
@@ -89,8 +89,9 @@ class wsBookParametres extends wsParametres {
 \r
                $this->fields['fullscreen'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Activer le mode plein-écran'));\r
                $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);\r
+               $this->fields['tooltipTimer'] = array('type' => 'float', 'default' => 3, "editable" => true, 'label' => __("Temps maximum d'apparition des infos-bulles (en secondes)"));\r
                $this->forms['general'] = array('label' => __('Fonctionnalités générales'),\r
-                       'fieldsnames' => array('fullscreen', 'navOrder', 'pages', 'width', 'height'));\r
+                       'fieldsnames' => array('fullscreen', 'navOrder', 'tooltipTimer', 'pages', 'width', 'height'));\r
                //.\r
                //\r
                \r
@@ -278,9 +279,10 @@ class wsBookParametres extends wsParametres {
 \r
                $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');\r
                $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');\r
+               $this->fields['phonegapPlugins'] = array('type' => 'textarea', 'default' => 'ChildBrowser', 'editable' => true, 'label' => __('Plugins Phonegap'), 'grade' => 5);\r
 \r
                $this->forms['phonegap'] = array('label' => __('Applications mobile'),\r
-                       'fieldsnames' => array('phonegapId', 'phonegapVersion'));\r
+                       'fieldsnames' => array('phonegapId', 'phonegapVersion', 'phonegapPlugins'));\r
 \r
                $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'));\r
                $this->fields['secureURLRedirect'] = array('type' => 'text', 'default' => 'http://', 'editable' => true, 'label' => __('Redirection'), 'grade' => 5, 'hint' => __("Si l'authentification échoue, redirection vers cette adresse"));\r
index 74c744e8d19575e397d77cf94323537a2dfa6091..91a848ae2a26a45468402ea26323642ed95d90d2 100644 (file)
@@ -438,7 +438,6 @@ class wsHTML5Compiler {
                foreach ($sheets as $sheet) {
                        $style[] = '<link type="text/css" rel="stylesheet" media="screen" href="' . $sheet . '">';
                }
-               $style[] = '<link type="text/css" rel="stylesheet" media="print" href="style/print.css">';
                $style = implode("\n\t\t", $style);
 
                $pagesContents = '';
@@ -446,6 +445,37 @@ class wsHTML5Compiler {
                $script = '';
                if ($this->phonegap) {
                        $script .= '<script type="text/javascript" src="data/cordova.js"></script>' . "\n";
+
+                       if ($this->phonegap == 'ios') {
+                               copy($this->assets . '/js/libs/phonegap/plugins/ios/ExternalFileUtil.js', $this->vdir . '/data/ExternalFileUtil.js');
+                               $script .= '<script type="text/javascript" src="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 .= '<script type="text/javascript" src="' . $pluginDir . '/' . $file . '"></script>' . "\n";
+                                       }
+                               }
+                       }
                }
                $script .= '<script type="text/javascript" src="data/fluidbook.js"></script>' . "\n";
                $script .= '<script type="text/javascript" src="data/search.js"></script>' . "\n";
@@ -516,13 +546,13 @@ class wsHTML5Compiler {
        }
 
        protected function writePrint() {
-               $res = '';
-               /* $res .= '<div id="printpages">';
-                 for ($i = 1; $i <= $this->book->parametres->pages; $i++) {
-                 $res.='<div class="printpage"><img src="data/background/150/t' . $i . '.jpg" alt="" /></div>';
-                 }
-                 $res.='</div>'; */
-               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) {