]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 14 Oct 2013 13:13:48 +0000 (13:13 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 14 Oct 2013 13:13:48 +0000 (13:13 +0000)
fluidbook/compile/index.html
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/class.ws.html5.compiler.php
inc/ws/Util/html5/class.ws.html5.links.php
inc/ws/Util/packager/class.ws.packager.html.php

index cf1ec213427df0c8845e64317e45037e2bff027c..d6c0b76fc66bfe3a097d92fb1c00bde71fcdf81a 100644 (file)
@@ -12,6 +12,7 @@
                $robots\r
                $facebook\r
                $description\r
+               $keywords\r
                <title>$title</title>\r
                <link href="$spstyle.css?junk=$junk" rel="stylesheet" type="text/css">\r
                <style type="text/css" media="print">*{ visibility: hidden; display: none }</style>\r
@@ -19,7 +20,7 @@
                <script type="text/javascript">\r
                        FB_DEFAULT_LANG = '$lang';\r
                        var backgroundColor = "$bgcolor";\r
-                       if (isMobile()) {\r
+                       if (isMobile() || $alwaysHTML5) {\r
                                $redirectMobile\r
                        } else if (isBadMobile()) {\r
                                $redirectPDF\r
index 5a45c13259ad79cff4a3bd68d71b67bb91371a9f..46bea39690d4133b8b910f93440ba9280a02d579 100644 (file)
@@ -270,6 +270,7 @@ class wsBookParametres extends wsParametres {
                $this->forms['offline'] = array('label' => __('Version offline'),\r
                        'fieldsnames' => array('offlineTitle', 'offlineLink'));\r
 \r
+               $this->fields['alwaysHTML5'] = array('type' => 'boolean', 'default' => 'false', 'editable' => true, 'label' => __('Toujours utiliser la version HTML5'), 'grade' => 3);\r
                $this->fields['mobileVersion'] = array('type' => 'combo', 'default' => 'html5-images', 'editable' => true, 'label' => __('Version mobile'), 'grade' => 3,\r
                        'datas' => array(__('Rediriger vers le PDF') => 'pdf',\r
                                __('Version HTML5') => 'html5',\r
@@ -306,7 +307,7 @@ class wsBookParametres extends wsParametres {
                $this->fields['mobileNavScale'] = array('type' => 'integer', 'default' => '100', 'editable' => true, 'label' => __('Taille du menu (en %)'), 'grade' => 3);\r
 \r
                $this->forms['mobile'] = array('label' => __('Version mobile'),\r
-                       'fieldsnames' => array('mobileLVersion', 'mobileVersion', 'mobileNavigationType', '|', 'mobileNavScale', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace'));\r
+                       'fieldsnames' => array('alwaysHTML5','mobileLVersion', 'mobileVersion', 'mobileNavigationType', '|', 'mobileNavScale', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace'));\r
 \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
@@ -325,9 +326,10 @@ class wsBookParametres extends wsParametres {
                $this->fields['seoVersion'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Générer une version pour les moteurs de recherche'));\r
                $this->fields['seoRobots'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Autoriser le parcours par les moteurs de recherche'));\r
                $this->fields['seoDescription'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Meta tag Description'));\r
+               $this->fields['seoKeywords'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Meta tag Keywords'));\r
 \r
                $this->forms['seo'] = array('label' => __('Optimisation pour les moteurs de recherche'),\r
-                       'fieldsnames' => array('seoVersion', 'seoRobots', 'seoDescription'));\r
+                       'fieldsnames' => array('seoVersion', 'seoRobots', 'seoDescription', "seoKeywords"));\r
 \r
                $this->fields['home'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Accueil de l'interface multibrochure"), 'grade' => 5);\r
                $this->fields['multilang'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Langues'), 'hint' => __('Code langue') . ',' . __('Code pays') . ',' . __('URL'));\r
index 67c9a6aa80530703ca25bf0a654c1ded1c300fd2..04ad4fcc268332823c208645a4f1b5a85df5cd26 100644 (file)
@@ -14,8 +14,8 @@ class wsHTML5Compiler {
                        return new wsHTML5Compiler($book_id, 'stable', $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
                } else {
                        return new wsHTML5CompilerDev($book_id, 'dev', $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
-               }
-       }
+               } 
+       } 
 
        protected static $resolutions = array(150, 300);
        protected $maxRes = 300;
@@ -477,8 +477,8 @@ class wsHTML5Compiler {
                $cache = '';
                if ($this->appcache) {
                        $cache = ' manifest="cache.appcache"';
-               }
-
+               } 
+                       
                $script = '';
                if ($this->phonegap) {
                        //$script .= '<script type="text/javascript" charset="utf-8" src="data/cordova.js"></script>' . "\n";
index e7a862315931c3ae6a20decb9d96f4d85b1ad42a..ca9dfa691a233cb26ca26c4054d9b07895c4aa86 100644 (file)
@@ -59,6 +59,8 @@ class wsHTML5Link {
                                        return new haguenauManifLink($id, $init, $compiler);
                                } else if ($compiler->book->parametres->customLinkClass == 'FLFLink') {
                                        return new flfLink($id, $init, $compiler);
+                               } else if ($compiler->book->parametres->customLinkClass == 'InpesPopinLink') {
+                                       return new inpesPopinLink($id, $init, $compiler);
                                }
                        case 8:
                        case 9:
@@ -524,6 +526,7 @@ class htmlMultimediaLink extends wsHTML5Link {
 
        protected $_config = null;
        protected $_content = '';
+       protected $_url;
 
        public function getHTMLContent() {
                if ($this->_content == '') {
@@ -538,11 +541,12 @@ class htmlMultimediaLink extends wsHTML5Link {
 
                        $w = $this->width * $this->getCssScale();
                        $h = $this->height * $this->getCssScale();
+                       $this->_url = $d['fdir'] . '/' . $this->_config['html'];
 
                        $iw = $this->_config['width'];
                        $ih = $this->_config['height'];
 
-                       $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $d['fdir'] . '/' . $this->_config['html'] . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>';
+                       $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>';
                        $this->copyExternalDir($d['dir']);
                        $this->_content = $res;
                }
@@ -638,6 +642,62 @@ class wescoLink extends normalLink {
 
 }
 
+class inpesPopinLink extends htmlMultimediaLink {
+
+       public function getHTMLContent() {
+               $this->alternative = $this->to;
+               $c = parent::getHTMLContent();
+
+
+
+               $class = $this->getClasses();
+               if ($this->display_area) {
+                       $class[] = 'displayArea';
+               }
+               $c = '';
+               if (count($class)) {
+                       $c = ' class="' . implode(' ', $class) . '"';
+               }
+               $tooltip = '';
+               $t = $this->getTooltip();
+               if ($t !== false) {
+                       $tooltip = ' data-tooltip="' . $t . '"';
+               }
+               return '<a href="#" ' . $tooltip . $c . $this->getAdditionnalContent() . '></a>';
+       }
+
+       public function getCSSContainer() {
+               if (!($this instanceof contentLink) && $this->page % 2 == 1) {
+                       $this->page--;
+                       $this->left+=$this->compiler->width;
+               }
+
+               $css = '#l_' . $this->id . '{';
+               $css.='left:' . $this->left * $this->getCssScale() . 'px;top:' . $this->top * $this->getCssScale() . 'px;';
+               $css.='width:' . $this->width * $this->getCssScale() . 'px;height:' . $this->height * $this->getCssScale() . 'px;';
+               $css.=$this->getCSS();
+               $css.='}';
+               return $css;
+       }
+
+       public function getCSS() {
+               return "";
+       }
+
+       public function getClasses() {
+               $res = parent::getClasses();
+               $res[] = 'popin';
+               return $res;
+       }
+
+       public function getAdditionnalContent() {
+               $res = parent::getAdditionnalContent();
+               $res.=' data-src="' . $this->_url . '" data-width="900" data-height="650"';
+               return $res;
+       }
+
+}
+
 class flfLink extends wescoLink {
 
        public function getURL() {
index 290380ebb0ca37f15845fe87ff67fb70a780b310..c9c2eb4ad660eccbd4b5a2fae148e60e950d028f 100644 (file)
@@ -95,6 +95,10 @@ class wsPackagerHTML extends wsPackager {
                if ($this->book->parametres->seoDescription) {\r
                        $description = '<meta name="description" content="' . self::escape($this->book->parametres->seoDescription) . '">';\r
                }\r
+               $keywords = '';\r
+               if ($this->book->parametres->seoKeywords) {\r
+                       $keywords = '<meta name="keywords" content="' . self::escape($this->book->parametres->seoKeywords) . '">';\r
+               }\r
 \r
                // Stuffs to replace in html\r
                $toReplace = array('lang' => strtolower($this->book->lang),\r
@@ -108,7 +112,9 @@ class wsPackagerHTML extends wsPackager {
                        'robots' => $robots,\r
                        'favicon' => $favicon,\r
                        'flashversion' => $this->getMinFlashVersion(),\r
-                       'fv' => json_encode($this->getFlashvars()));\r
+                       'fv' => json_encode($this->getFlashvars()),\r
+                       'alwaysHTML5' => $this->book->parametres->alwaysHTML5,\r
+                       'keywords' => $keywords);\r
 \r
 \r
                $this->origHTML = file_get_contents($this->vdir . '/index.html');\r