]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 27 Dec 2011 16:05:25 +0000 (16:05 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 27 Dec 2011 16:05:25 +0000 (16:05 +0000)
12 files changed:
fluidbook/compile/index.html
fluidbook/compile/script.nsi
fluidbook/tools/fwstk/nbproject/private/config.properties
fluidbook/tools/fwstk/nbproject/private/configs/Extract_texts.properties
fluidbook/tools/fwstk/nbproject/private/private.xml
fluidbook/tools/fwstk/src/cube/util/Array.java
inc/ws/Controlleur/class.ws.flash.php
inc/ws/DAO/class.ws.dao.book.php
inc/ws/Metier/class.ws.theme.parametres.php
inc/ws/Util/packager/class.ws.packager.html.php
inc/ws/Util/packager/class.ws.packager.php
inc/ws/Util/packager/class.ws.packager.win.inst.php

index 210f8a3e06cca393b29b50756979fc49e3565b54..8a576baccf5c883a2de2e5c290b40ba24b803b84 100644 (file)
@@ -7,6 +7,7 @@
 <meta http-equiv="Expires" content="0" />\r
 <meta http-equiv="Expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />\r
 <meta http-equiv="Pragma" content="no-cache" />\r
+$favicon\r
 $robots\r
 $facebook\r
 <title>$title</title>\r
index a3b1835fcc092e9da0ad5128a422c8bb218c2d9f..ad0a7caec984d6773f0211d8cb58684df3db7418 100644 (file)
@@ -17,7 +17,7 @@ RequestExecutionLevel user
 ; Style\r
 XPStyle on\r
 \r
-Icon "$htmldir/fluidbook.ico"\r
+Icon "$favicon"\r
 \r
 ; not released\r
 ;TargetMinimalOS 5.0\r
index 5aa2fea7bf417086c81ccabfe06cb2d78e4134e3..9d6df0f95eac7e0bed4af6b3fca67bc21f4bef06 100644 (file)
@@ -1 +1 @@
-config=Extract_Links\r
+config=Extract_texts\r
index 97e5bd462a0a15a6fbe6630809280f18738a180a..1d3c1d34ee60f162462b862b797d02265d5a8ae5 100644 (file)
@@ -1 +1 @@
-application.args=--input H:\\Documents\\fwstk\\layout\\document.pdf --extractTexts H:\\Documents\\fwstk\\layout\\p%d.txt\r
+application.args=--input H:\\Documents\\fwstk\\texts\\document.pdf --extractTexts H:\\Documents\\fwstk\\texts\\%s%d.txt\r
index 1ee292a27eb0138a49e80b020b67b84a8cc40aaf..cc2c0e57c4f9286a6ee78a9b3557c26caca57415 100644 (file)
@@ -1,7 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <project-private xmlns="http://www.netbeans.org/ns/project-private/1">\r
     <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>\r
-    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">\r
-        <file>file:/H:/Works/cubeExtranet/fluidbook/tools/fwstk/src/com/fluidbook/fwstk/Main.java</file>\r
-    </open-files>\r
 </project-private>\r
index 7f076e572d9551457622d262d8cdf96c17fd059c..93ac35330a486b474de5767e74eb2f649a52ba83 100644 (file)
@@ -18,7 +18,7 @@ public class Array {
                        }\r
                        if (e.length == 1) {\r
                                res.put(e0, true);\r
-                       } else if (e0 > e1) {\r
+                       } else if (e0 >= e1) {\r
                                for (int j = e1; j <= e0; j++) {\r
                                        res.put(j, true);\r
                                }\r
index 650239b3dc44d457b0e5c2b9a265891059071fd5..592ce51c0010598ac81e034749df896a17ad5008 100644 (file)
@@ -1,6 +1,7 @@
 <?php\r
 \r
 class wsFlash extends cubeFlashGateway {\r
+\r
        const CNAME = __CLASS__;\r
 \r
        public static function in($args) {\r
@@ -148,13 +149,35 @@ class wsFlash extends cubeFlashGateway {
                                continue;\r
                        }\r
                        $fname = cubeFiles::tidyName($infos['name']);\r
-                       $dest = '/' . $this->args['theme_id'] . '/' . $fname;\r
+                       $dir = WS_THEMES . '/' . $this->args['theme_id'] . '/';\r
+                       $dest = $dir . $fname;\r
+\r
 \r
                        if (!file_exists(WS_THEMES . '/' . $this->args['theme_id'])) {\r
                                mkdir(WS_THEMES . '/' . $this->args['theme_id'], 0755, true);\r
                        }\r
 \r
-                       move_uploaded_file($infos['tmp_name'], WS_THEMES . $dest);\r
+                       move_uploaded_file($infos['tmp_name'], $dest);\r
+\r
+                       if (isset($this->args['type']) && $this->args['type'] == 'ico') {\r
+                               $icotool = new cubeCommandLine('icotool');\r
+                               $icotool->setArg('c');\r
+                               $icotool->setArg('o', $dir . '/fluidbook.ico');\r
+\r
+                               $sizes = array(256, 128, 64, 32, 16);\r
+                               \r
+                               foreach ($sizes as $s) {\r
+                                       $r = $dir . '/ico-' . $s . '.png';\r
+                                       $it = new cubeImageTools();\r
+                                       $it->loadImage($dest);\r
+                                       $it->resize($s, $s, 'crop', true,'C','M','transparent');\r
+                                       $it->output('png', $r);\r
+                                       $icotool->setArg(null, $r);\r
+                               }\r
+\r
+                               $icotool->execute();\r
+                       }\r
+\r
                        $this->xml->addChild('file', $fname);\r
                        return;\r
                }\r
@@ -259,7 +282,7 @@ class wsFlash extends cubeFlashGateway {
                                $info['method'] = 1;\r
                                $info['objects'] = 1800;\r
                                $info['quality'] = 85;\r
-                               $info['version']='stable';\r
+                               $info['version'] = 'stable';\r
                        } else {\r
                                $dim = getimagesize($file);\r
                        }\r
@@ -438,9 +461,9 @@ class wsFlash extends cubeFlashGateway {
 \r
        public function getLinks() {\r
                global $core;\r
-               \r
+\r
                set_time_limit(0);\r
-               \r
+\r
                $dao = new wsDAOBook($core->con);\r
                $book = $dao->selectById($this->args['book_id']);\r
 \r
index 0d77dd91f286e85d5595d1bf57d021350efcd0b4..009d34e34abf9c323779a73bb271662d9766da30 100644 (file)
@@ -708,6 +708,7 @@ class wsDAOBook extends commonDAO {
 \r
                $filesToCopy['data/fd.swf'] = $compilerDir . '/FluidbookDatas.swf';\r
                $filesToCopy['data/fdl.swf'] = $compilerDir . '/FluidbookDatasLight.swf';\r
+\r
                // Copy of files\r
                // Check if dest dir exists\r
                if (!file_exists($finalDir . 'data')) {\r
@@ -944,6 +945,9 @@ class wsDAOBook extends commonDAO {
                if ($theme->parametres->afterSearch != '') {\r
                        $flex->addBitmap($themeRoot . $theme->parametres->afterSearch, 'aftersearch');\r
                }\r
+               if ($theme->parametres->favicon != '') {\r
+                       $filesToCopy['data/fluidbook.ico'] = $themeRoot . 'fluidbook.ico';\r
+               }\r
 \r
                // Icons assets\r
                $iconsRoot = WS_ICONS . '/' . $theme->parametres->iconSet . '/';\r
@@ -1048,8 +1052,6 @@ class wsDAOBook extends commonDAO {
                        $swfcombine->setArg(null, $tempswf[$i]);\r
                }\r
                $swfcombine->execute();\r
-               fb($swfcombine->commande);\r
-               fb($swfcombine->output);\r
 \r
                foreach ($tempimage as $t) {\r
                        unlink($t);\r
@@ -1143,11 +1145,8 @@ class wsDAOBook extends commonDAO {
 \r
                if ($original) {\r
                        copy(WS_DOCS . '/' . $firstDoc . '/crop.pdf', $finalPDF);\r
-                       fb('Original');\r
                        return;\r
                }\r
-               fb('Composite');\r
-               exit;\r
 \r
                $args = '';\r
                foreach ($pdfList as $doc => $index) {\r
index 31072046e8d97a1363e6d19b761f554a13b7efc8..d7d9059695e4cc0beb070cca291e002d391dcbd5 100644 (file)
@@ -57,7 +57,7 @@ class wsThemeParametres extends wsParametres {
                        'grade' => 5);\r
 \r
                $this->forms['search'] = array('label' => __('Personnalisation de la recherche'),\r
-                       'fieldsnames' => array('couleurS', 'searchFieldColor', 'searchShadeAlpha', 'searchFieldWidth', '|', 'highlightColor','|','searchIndexNoResultColor'));\r
+                       'fieldsnames' => array('couleurS', 'searchFieldColor', 'searchShadeAlpha', 'searchFieldWidth', '|', 'highlightColor', '|', 'searchIndexNoResultColor'));\r
                /* Icones */\r
                $this->fields['iconSet'] = array('type' => 'icones', 'default' => 1, 'editable' => true,\r
                        'label' => __("Jeu d'icônes"));\r
@@ -95,10 +95,12 @@ class wsThemeParametres extends wsParametres {
                        'label' => __('Overlay placé sous les vidéos en popup'));\r
                $this->fields['pageEdgeColor'] = array('type' => 'couleur', 'default' => 'dddddd', 'editable' => true,\r
                        'label' => __('Couleur de la bordure'));\r
+               $this->fields['pageEdgeThickness'] = array('type' => 'integer', 'default' => 100, 'editable' => true,\r
+                       'label' => __('Epaisseur de la bordure'));\r
 \r
                $this->forms['book'] = array('label' => __('Personnalisation du fluidbook'),\r
                        'fieldsnames' => array('pageReflection', 'shadeAlpha',\r
-                               '|', 'usePageEdges', 'pageEdgeColor',\r
+                               '|', 'usePageEdges', 'pageEdgeColor', 'pageEdgeThickness',\r
                                '|', 'bookShadeColor',\r
                                '|', 'displayPageNumber', 'colorPageNumber',\r
                                '|', 'linksColor', 'videoBackgroundColor', 'popupVideoOverlay'));\r
@@ -171,13 +173,24 @@ class wsThemeParametres extends wsParametres {
                $this->forms['menubar'] = array('label' => __('Personnalisation de la barre de menu'),\r
                        'fieldsnames' => array('menuHeight', '|', 'menuColor', '|', 'menuImage', '|', 'shadeOnMenu', '|', 'invertMenuPosition', '|', 'topBar', 'topBarAlign', '|', 'afterSearch'));\r
                /* Menu bar logo */\r
+\r
+               $imageFilter = new stdClass();\r
+               $imageFilter->name = __('Image PNG') . ' (*.png)';\r
+               $imageFilter->extensions = '*.png';\r
+\r
                $this->fields['logo'] = array('type' => 'file', 'default' => 'menu_clientLogo.png', 'editable' => true,\r
-                       'label' => __('Image'),\r
+                       'label' => __('Logo'),\r
                        'path' => $themeRoot,\r
                        'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
+               $this->fields['favicon'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
+                       'label' => __('Icone (pour favicon et CD-ROM)'),\r
+                       'path' => $themeRoot,\r
+                       'fileFilter' => $imageFilter,\r
+                       'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&amp;type=ico',\r
+                       'hint' => __('Image PNG de 256x256'));\r
 \r
                $this->forms['logo'] = array('label' => __('Personnalisation du logo'),\r
-                       'fieldsnames' => array('logo'));\r
+                       'fieldsnames' => array('logo', 'favicon'));\r
                /* Loader */\r
                $this->fields['logoLoader'] = array('type' => 'file', 'default' => 'logoLoader.png', 'editable' => true,\r
                        'label' => __('Logo affiché au chargement'),\r
index 475cbe1345f91c596cdda75fae1af6e50efa779a..7243acf4e8ace27fad6527e4ae62b60cd1d2a84b 100644 (file)
@@ -46,6 +46,13 @@ class wsPackagerHTML extends wsPackager {
                        $facebook .= '<meta property="og:image" content="http://workshop.fluidbook.com/services/facebook_thumbnail?id=' . $this->book->book_id . '" />';\r
                }\r
 \r
+               $favicon = '';\r
+               \r
+               fb($this->theme->parametres->favicon);\r
+               if ($this->theme->parametres->favicon != '') {\r
+                       $favicon = '<link rel="shortcut icon" href="data/fluidbook.ico" />';\r
+               }\r
+\r
                if ($this->book->parametres->mobileVersion == 'pdf') {\r
                        $redirectMobile = 'window.location="data/document.pdf";';\r
                } else {\r
@@ -65,17 +72,19 @@ class wsPackagerHTML extends wsPackager {
 \r
                $robots = '';\r
                if (!$seoRobot) {\r
-                       $robots='<meta name="robots" content="noindex, nofollow" />';\r
+                       $robots = '<meta name="robots" content="noindex, nofollow" />';\r
                }\r
 \r
                // Stuffs to replace in html\r
                $toReplace = array('lang' => strtolower($this->book->lang),\r
                        'title' => self::escape($this->book->parametres->title),\r
-                       'ga' => $ga, 'facebook' => $facebook,\r
+                       'ga' => $ga,\r
+                       'facebook' => $facebook,\r
                        'bgcolor' => $this->theme->parametres->loadingBackColor,\r
                        'redirectMobile' => $redirectMobile,\r
                        'junk' => TIME,\r
-                       'robots' => $robots);\r
+                       'robots' => $robots,\r
+                       'favicon' => $favicon);\r
 \r
                $this->origHTML = file_get_contents($this->vdir . '/index.html');\r
                $this->origHTML = $this->replaceHTML($toReplace);\r
index 3a6cc62a8044cf979c6104d3e159535b341e6b30..47c387a326ca3e9ad798e3e2e7469d46ba556ea4 100644 (file)
@@ -13,9 +13,9 @@ class wsPackager {
        protected $daoBook;\r
        protected $zip;\r
 \r
-       public static function package($book_id, $version,$zip=true) {\r
+       public static function package($book_id, $version, $zip = true) {\r
                global $packager;\r
-               \r
+\r
                cubePHP::neverStop();\r
                if ($version == 'html') {\r
                        $packager = new wsPackagerHTML($book_id);\r
@@ -87,7 +87,7 @@ class wsPackager {
                        }\r
 \r
                        $s = WS_COMPILE_ASSETS . '/' . $source;\r
-                       if (is_file($s)) {\r
+                       if (is_file($s) && !file_exists($this->vdir . $dest)) {\r
                                copy($s, $this->vdir . $dest);\r
                        } else if (is_dir($s)) {\r
                                $cp = new cubeCommandLine('cp');\r
index f14e557cdd9bbc828ad72643c7a12f49944352a8..a08fff41f5addac5d99f7545d5abebe66d71ab54 100644 (file)
@@ -37,15 +37,21 @@ class wsPackagerWinINST extends wsPackagerWinEXE {
                $nsi = str_replace('$lang', utf8_decode($lang->nsis), $nsi);\r
                $nsi = str_replace('$nsisdir', '/usr/local/nsis/nsis-2.46/share/nsis', $nsi);\r
                $nsi = str_replace('$output', $this->getPathBase('exe'), $nsi);\r
+               $favicon = WS_COMPILE_ASSETS . '/fluidbook.ico';\r
+               if ($this->theme->parametres->favicon != '') {\r
+                       $favicon = $this->vdir . '/data/fluidbook.ico';\r
+               }\r
+               $nsi = str_replace('$favicon', $favicon, $nsi);\r
 \r
                $this->nsi = $nsi;\r
        }\r
 \r
        public function makePackage($zip) {\r
                $this->preparePackage();\r
-               $url = 'http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi);\r
+               $url = 'http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi) . '&junk=' . TIME;\r
 \r
-               file_get_contents('http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi) . '&junk=' . TIME);\r
+               file_get_contents($url);\r
+               fb($url);\r
                return $this->getURLBase('exe');\r
        }\r
 \r