]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 12 May 2011 14:40:23 +0000 (14:40 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 12 May 2011 14:40:23 +0000 (14:40 +0000)
inc/ws/Controlleur/class.ws.flash.php
inc/ws/DAO/class.ws.dao.book.php
swf/_src/composerLibrary.swc
swf/_src/wsComposerLibrary.fla

index c4e574d881629ffe5660d9c41e6f64c8c3b251de..665a2399e533b9209d0a0767382839842f352065 100644 (file)
@@ -432,21 +432,22 @@ class wsFlash extends cubeFlashGateway {
 \r
                $daoTheme = new wsDAOTheme($this->con);\r
                $theme = $daoTheme->getThemeOfBook($this->args['book_id'], true);\r
-               $themeRoot = WS_THEMES . '/' . $theme->theme_id . '/';\r
-               if ($theme->parametres->backgroundImage != '' && in_array($theme->parametres->repeat, array(2, 3))) {\r
-                       $dim = getimagesize($themeRoot . $theme->parametres->backgroundImage);\r
-                       $b = $this->xml->addChild('background');\r
-                       $b->addChild('width', $dim[0]);\r
-                       $b->addChild('height', $dim[1]);\r
-                       $b->addChild('url', 'http://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/themes/' . $theme->theme_id . '/' . $theme->parametres->backgroundImage);\r
+\r
+               $specials = array('backgroundImage' => 'background', 'topBar' => 'topbar', 'afterSearch' => 'aftersearch');\r
+\r
+               foreach ($specials as $tparam => $sname) {\r
+                       $this->_addSpecialInfos($theme, $tparam, $sname);\r
                }\r
+       }\r
 \r
-               if ($theme->parametres->topBar != '') {\r
-                       $dim = getimagesize($themeRoot . $theme->parametres->topBar);\r
-                       $b = $this->xml->addChild('topbar');\r
+       protected function _addSpecialInfos($theme, $param, $specialName) {\r
+               if ($theme->parametres->$param != '') {\r
+                       $themeRoot = WS_THEMES . '/' . $theme->theme_id . '/';\r
+                       $dim = getimagesize($themeRoot . $theme->parametres->$param);\r
+                       $b = $this->xml->addChild($specialName);\r
                        $b->addChild('width', $dim[0]);\r
                        $b->addChild('height', $dim[1]);\r
-                       $b->addChild('url', 'http://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/themes/' . $theme->theme_id . '/' . $theme->parametres->topBar);\r
+                       $b->addChild('url', 'http://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/themes/' . $theme->theme_id . '/' . $theme->parametres->$param);\r
                }\r
        }\r
 \r
index 31d2506fad5629528d230e4d205995d92b716e12..14b2c84b5577752ed6c93c8327176e7f08ccc4da 100644 (file)
@@ -692,6 +692,11 @@ class wsDAOBook extends commonDAO {
                if ($theme->parametres->logo != '') {\r
                        $flex->addBitmap($themeRoot . $theme->parametres->logo, 'logo');\r
                }\r
+\r
+               if ($theme->parametres->afterSearch != '') {\r
+                       $flex->addBitmap($themeRoot . $theme->parametres->afterSearch, 'aftersearch');\r
+               }\r
+\r
                // Icons assets\r
                $iconsRoot = WS_ICONS . '/' . $theme->parametres->iconSet . '/';\r
                foreach (wsIcone::$files as $file) {\r
index 60608aef010066e159e2ad2c4a298a4c47865eb4..c765aae5fd7f4ebcc062a515e80e1ab776f02e95 100644 (file)
Binary files a/swf/_src/composerLibrary.swc and b/swf/_src/composerLibrary.swc differ
index 16ff721aff32edc325dbb0953cfc35ac0510800f..b96667d9557efbb4d05611ac65d5a10778d1e6e8 100644 (file)
Binary files a/swf/_src/wsComposerLibrary.fla and b/swf/_src/wsComposerLibrary.fla differ