From 3a8120ec96e6bc588efba7ca9940cd706b4ae8d2 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 14 Dec 2010 10:37:33 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.ajax.php | 2 +- inc/ws/Controlleur/class.ws.flash.php | 4 ++-- inc/ws/Metier/class.ws.theme.parametres.php | 17 ++++++++++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index fc0cd4f4e..df7139e9a 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -65,7 +65,7 @@ class wsAjax extends cubeAjax { } $x->addClosePopup(); $x->addContent('listeBooks', wsUrl::listeBooks()); - $x->addTruePopup(SITE_PATH . 'editbook/' . $book->book_id); + $x->addTruePopup(SITE_PATH . 'editor/' . $book->book_id); } public static function changeBookProprietaire($args, &$x) diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index 84cee528e..c0c997fad 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -46,8 +46,8 @@ class wsFlash extends cubeFlashGateway { continue; } $fname = cubeFiles::tidyName($infos['name']); - $dest = '/themes/' . $this->args['theme_id'] . '/' . $fname; - move_uploaded_file($infos['tmp_name'], ROOT . $dest); + $dest = '/' . $this->args['theme_id'] . '/' . $fname; + move_uploaded_file($infos['tmp_name'], WS_THEMES . $dest); $this->xml->addChild('file', $fname); return; } diff --git a/inc/ws/Metier/class.ws.theme.parametres.php b/inc/ws/Metier/class.ws.theme.parametres.php index 53a394788..19991a388 100644 --- a/inc/ws/Metier/class.ws.theme.parametres.php +++ b/inc/ws/Metier/class.ws.theme.parametres.php @@ -10,6 +10,9 @@ class wsThemeParametres extends wsParametres { if (is_null($this->parent)) { return; } + + $themeRoot = 'fluidbook/themes/' . $this->parent->theme_id; + parent::initFields(); /* Navigation */ $this->fields['couleurA'] = array('type' => 'couleurAlpha', 'default' => '', 'editable' => true, @@ -62,9 +65,9 @@ class wsThemeParametres extends wsParametres { $this->fields['linksColor'] = array('type' => 'couleur', 'default' => '$couleurA', 'editable' => true, 'label' => __('Couleur des liens'), 'extra' => true, 'grade' => 4); $this->fields['extraXSpace'] = array('type' => 'integer', 'default' => '0', 'editable' => true, - 'label' => __('Marge supplémentaire horizontale'), 'extra' => false, 'grade' => 1,'min'=>0,'max'=>200); + 'label' => __('Marge supplémentaire horizontale'), 'extra' => false, 'grade' => 1, 'min' => 0, 'max' => 200); $this->fields['extraYSpace'] = array('type' => 'integer', 'default' => '0', 'editable' => true, - 'label' => __('Marge supplémentaire verticale'), 'extra' => false, 'grade' => 1,'min'=>0,'max'=>200); + 'label' => __('Marge supplémentaire verticale'), 'extra' => false, 'grade' => 1, 'min' => 0, 'max' => 200); $this->fields['pageEdgeColor'] = array('type' => 'couleur', 'default' => 'dddddd', 'editable' => true, 'label' => __('Couleur de la bordure'), 'extra' => true, 'grade' => 4); /* Credits */ @@ -77,7 +80,7 @@ class wsThemeParametres extends wsParametres { 'label' => __('Utiliser une image de fond'), 'extra' => true, 'grade' => 4); $this->fields['backgroundImage'] = array('type' => 'file', 'default' => 'backgroundImg.jpg', 'editable' => true, 'label' => __('Image de fond'), 'extra' => false, 'grade' => 3, - 'path' => 'themes/' . $this->parent->theme_id, + 'path' => $themeRoot, 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id); $this->fields['repeat'] = array('type' => 'combo', 'datas' => array(__('Etirer') => wsTheme::STRETCH, @@ -104,19 +107,19 @@ class wsThemeParametres extends wsParametres { 'label' => __('Utiliser une image de fond'), 'extra' => true, 'grade' => 4); $this->fields['menuImage'] = array('type' => 'file', 'default' => 'menu_back.png', 'editable' => true, 'label' => __('Image de fond'), 'extra' => false, 'grade' => 3, - 'path' => 'themes/' . $this->parent->theme_id, + 'path' => $themeRoot, 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id); $this->fields['invertMenuPosition'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Intervertir le menu et le logo"), 'extra' => true, 'grade' => 4); /* Menu bar logo */ $this->fields['logo'] = array('type' => 'file', 'default' => 'menu_clientLogo.png', 'editable' => true, 'label' => __('Image'), 'extra' => false, 'grade' => 3, - 'path' => 'themes/' . $this->parent->theme_id, + 'path' => $themeRoot, 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id); /* Loader */ $this->fields['logoLoader'] = array('type' => 'file', 'default' => 'logoLoader.png', 'editable' => true, 'label' => __('Logo affiché au chargement'), 'extra' => false, 'grade' => 3, - 'path' => 'themes/' . $this->parent->theme_id, + 'path' => $themeRoot, 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id); $this->fields['couleurL'] = array('type' => 'couleur', 'default' => '', 'editable' => true, 'label' => __("Couleur du fond"), 'extra' => false, 'grade' => 3); @@ -136,7 +139,7 @@ class wsThemeParametres extends wsParametres { $this->forms['bouton'] = array('label' => __('Personnalisation des boutons'), 'fieldsnames' => array('couleurA', 'arrowsColor')); $this->forms['icones'] = array('label' => __('Personnalisation des icônes'), - 'fieldsnames' => array('iconSet', 'iconShadeColor','|','iconsTMargin','iconsHMargin', '|', 'colorizeIcons', 'couleurI')); + 'fieldsnames' => array('iconSet', 'iconShadeColor', '|', 'iconsTMargin', 'iconsHMargin', '|', 'colorizeIcons', 'couleurI')); $this->forms['pagesbar'] = array('label' => __('Personnalisation de la barre des pages'), 'fieldsnames' => array('pagesBar', 'pageBarThumbBack')); $this->forms['book'] = array('label' => __('Personnalisation du fluidbook'), -- 2.39.5