From: vincent@cubedesigners.com Date: Tue, 29 Jun 2010 17:11:17 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=3501336d7f4e0db9db19d68872cb2ae339228435;p=cubeextranet.git --- diff --git a/inc/extranet/Controlleur/_common.php b/inc/extranet/Controlleur/_common.php index 59eb149de..04d56d838 100644 --- a/inc/extranet/Controlleur/_common.php +++ b/inc/extranet/Controlleur/_common.php @@ -7,10 +7,5 @@ $__autoload['extranetUrl'] = dirname(__FILE__) . '/class.extranet.url.php'; $__autoload['extranetDroits'] = dirname(__FILE__) . '/class.extranet.droits.php'; $__autoload['extranetFiltre'] = dirname(__FILE__) . '/class.extranet.filtre.php'; $__autoload['extranetPageChiffres'] = dirname(__FILE__) . '/class.extranet.page.chiffres.php'; -// Workshop -$__autoload['wsFlash'] = dirname(__FILE__) . '/class.ws.flash.php'; -$__autoload['wsUrl'] = dirname(__FILE__) . '/class.ws.url.php'; -$__autoload['wsDroits'] = dirname(__FILE__) . '/class.ws.droits.php'; -$__autoload['wsConversionSession'] = dirname(__FILE__) . '/class.ws.conversion.session.php'; ?> \ No newline at end of file diff --git a/inc/extranet/Controlleur/class.extranet.core.php b/inc/extranet/Controlleur/class.extranet.core.php index 4ed8c29dc..b5bbf7618 100644 --- a/inc/extranet/Controlleur/class.extranet.core.php +++ b/inc/extranet/Controlleur/class.extranet.core.php @@ -345,6 +345,7 @@ class extranetCore extends cubeCore { $db->books->extras('text', 0, false); $db->books->traductions('text', 0, false); $db->books->date('integer', 0, false); + $db->books->numerotation('text',0,false); // Clés $db->books->primary('pk_books', 'book_id'); $db->books->index('index_books_nom', 'BTREE', 'nom'); diff --git a/inc/extranet/Controlleur/class.extranet.url.php b/inc/extranet/Controlleur/class.extranet.url.php index 20b78c526..797c71eca 100644 --- a/inc/extranet/Controlleur/class.extranet.url.php +++ b/inc/extranet/Controlleur/class.extranet.url.php @@ -1132,7 +1132,7 @@ class extranetUrl { $res .= ''; $res .= ''; $res .= ''; - $res .= ''; + $res .= ''; $res .= '
' . __('De') . '' . $core->user->prenom . ' ' . $core->user->nom . ' <' . $core->user->email . '>
' . __('Sujet') . '' . form::field(array('email[sujet]'), 80, 128, htmlspecialchars($devis->email['sujet'], ENT_QUOTES)) . '
' . __('Corps') . '' . form::textarea(array('email[corps]'),80, 20, $devis->email['corps']) . '
' . __('Corps') . '' . form::textarea(array('email[corps]'), 80, 20, $devis->email['corps']) . '
'; $res .= ''; $res .= '
' . $core->typo->BoutonOK('Enregistrer et prévisualiser') . '
'; @@ -1766,6 +1766,13 @@ class extranetUrl { foreach($projets as $projet) { $suggestions[] = $projet->projet_id . ' - ' . $projet->nom . ' (' . $projet->client . ')'; } + } elseif ($args[1] == 'book') { + $dao = new wsDAOBook($core->con); + $dao->setSearch($q, true); + $books = $dao->getListe('date','DESC',15); + foreach($books as $book) { + $suggestions[] = $book->book_id . ' - ' . $book->nom; + } } cubeSearch::searchSuggestion($args[2], $suggestions); exit; diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index 7d012cde4..019746d48 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -32,6 +32,11 @@ class wsAjax extends cubeAjax { $x->addContent('listeBooks', wsUrl::listeBooks()); } + public static function newBookForm($args, &$x) + { + extranetAjax::form('newBook', __("Créer une nouvelle publication à partir d'une existante"), wsUrl::chooseExistingBook(), __('Créer une nouvelle publication'), 3); + } + public static function filtreBooks($args, &$x) { if (isset($args[1]) && $args[1] == 'efface') { @@ -43,6 +48,20 @@ class wsAjax extends cubeAjax { $x->addContent('listeBooks', wsUrl::listeBooks()); } } + + public static function newBook($args, &$x) + { + global $core; + $dao = new wsDAOBook($core->con); + if ($_POST['book'] != '') { + $book = $dao->duplicate($_POST['book'], $core->user->utilisateur_id); + } else { + $book = $dao->creeEmpty($core->user->utilisateur_id, $core->user->lang); + } + $x->addClosePopup(); + $x->addContent('listeBooks', wsUrl::listeBooks()); + $x->addTruePopup(SITE_PATH . 'editbook/' . $book->book_id); + } } ?> \ No newline at end of file diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index 5ad56eb58..058116499 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -25,7 +25,7 @@ class wsFlash extends cubeFlashGateway { $data['proprietaire'] = $core->user->utilisateur_id; $data['pages'] = 0; $data['file'] = cubeFiles::tidyName($infos['name']); - $li = new wsDocumentLocalInfos(); + $li = new wsDocumentLocalInfos($this); $li->fileName = $this->args['fileName']; $li->fileSize = $this->args['fileSize']; $li->creationDate = $this->args['creationDate']; @@ -84,6 +84,7 @@ class wsFlash extends cubeFlashGateway { { global $core; $dao = new wsDAOBook($core->con); + $book=$dao->selectById($this->args['book_id']); $pages = $dao->getPagesOfBook($this->args['book_id']); $p = $this->xml->addChild('pages'); $docs = array(); @@ -100,6 +101,7 @@ class wsFlash extends cubeFlashGateway { } $docs = array_unique($docs); $p->addAttribute('documents', implode(',', $docs)); + $this->xml->addChild('numerotation',json_encode($book->numerotation)); } public function processConversionSession() diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 98ef30a46..38476e8e9 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -7,7 +7,7 @@ class wsUrl { $settings = $core->user->getSettings('books'); $shortcuts = array(); - $shortcuts[] = '' . $core->typo->Ajouter(__('Créer une nouvelle publication')) . ''; + $shortcuts[] = '' . $core->typo->Ajouter(__('Créer une nouvelle publication')) . ''; $filtres = array(); $filtres[] = new extranetFiltre(__('Status'), 'status_book', $settings['filtres']); @@ -27,6 +27,8 @@ class wsUrl { { global $core; cubePage::truePopup(); + cubePage::autocomplete(); + extranetDroits::min(1); $settings = is_null($settings)?$core->user->getSettings('books'):$settings; $change = is_null($dashboard)?'Books':'Dashboard/' . $dashboard; @@ -79,76 +81,42 @@ class wsUrl { public static function editbook($args) { global $core; + $args = cubePage::getArgs($args); $book_id = $args[0]; if ($book_id == 'new') { $dao = new wsDAOBook($core->con); - $book = $dao->creeEmpty($core->user->utilisateur_id,$core->user->lang); + $book = $dao->creeEmpty($core->user->utilisateur_id, $core->user->lang); http::redirect(SITE_PATH . 'editbook/' . $book->book_id); } - /*$step = isset($args[2])?$args[2]:1; - - $shortcuts = array(); - - $steps = array(); - $steps['composition'] = __('Composition'); - $steps['themeSelector'] = __('Personnalisation'); - $steps['settings'] = __('Paramètres'); - $steps['links'] = __('Edition des liens'); - $steps['preview'] = __('Aperçu'); - - $i = 1; - foreach($steps as $s => $n) { - $template = 'Step'; - if ($s == $step) { - $class = 'step active'; - $ae = $as = ''; - } else { - $class = 'step'; - $as = ''; - $ae = ''; - } - - if ($i == count($steps)) { - $template = 'Last' . $template; - } - $shortcuts[] = $as . $core->typo->$template($i . '. ' . $n, $class, -1) . $ae; - $i++; - }*/ - - /*$res = extranetPage::barre(null , null, null, null); - $res .= extranetPage::tMain(null, true); - $res .= extranetPage::bh();*/ $res = ''; - $res .= '' . __('Edition de la publication') . ' #' . $args[0].''; + $res .= '' . __('Edition de la publication') . ' #' . $args[0] . ''; $res .= ''; $res .= ''; $res .= self::editComposition($args); $res .= ''; $res .= ''; - /* - $res .= extranetPage::bf(); - $res .= extranetPage::bMain();*/ echo $res; } public static function editComposition($args) { $fv = array(session_name() => session_id(), - 'book_id' => $args[0], - 'finishedText' => __('Transfert terminé'), - 'loadingFileText' => __('Chargement du fichier'), - 'totalText' => __('Total'), - 'browseText' => __('Parcourir') . ' ...', - 'titreUpload' => __('Sélectionnez un ou plusieurs document PDF sur votre ordinateur'), - 'titreComposition' => __('Organisez le(s) document(s) pour composer votre fluidbook')); - $res = cubeMedia::flash(WEBROOT . '/swf/composer.swf?junk=' . TIME, '100%', '100%', $fv, 'composerSwf', 'swfPanel', 9, '#d2d3c7', '', 'false', 'noscale', 'normal', array(), false, true, true); + 'book_id' => $args[0]); + $res = cubeMedia::flash(WEBROOT . '/swf/composer.swf?junk=' . TIME, '100%', '100%', $fv, 'composerSwf', 'swfPanel', 10, '#d2d3c7', '', 'false', 'noscale', 'normal', array(), false, true, true); + return $res; + } + + public static function chooseExistingBook() + { + $res = '

' . __("Si votre nouvelle publication a des paramètres en commun avec une publication existante, veuillez rechercher cette publication afin d'attribuer par défaut à votre nouvelle publication les paramètres de l'existante") . '

'; + $res .= '' . __('Rechercher une publication') . ' : ' . form::field('book_nom', 64, 1024) . form::hidden('book', '') . ''; return $res; } } diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 3225d6a55..4e891f317 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -17,39 +17,13 @@ class wsDAOBook extends extranetDAO { $book->date_status = $r->date_status; $book->date = $r->date; $book->pages = array(); - if ($r->chapters == '') { - $book->chapters = array(); - } else { - $book->chapters = json_decode($r->chapters, false); - } - + $book->chapters = $r->chapters; + $book->links = $r->links; + $book->rulers = $r->rulers; + $book->traductions = $r->traductions; + $book->parametres = $r->parametres; $book->extras = $r->extras; - - if ($r->links == '') { - $book->links = $this->getLinksFromCSV($r->book_id); - } else { - $book->links = json_decode($r->links, false); - } - - if ($r->rulers == '') { - $book->rulers = array(); - } else { - $book->rulers = json_decode($r->rulers, false); - } - - if ($r->traductions == '') { - $book->traductions = array(); - } else { - $book->traductions = json_decode($r->traductions); - } - - $p = unserialize($r->parametres); - if (!$p || $p->isEmpty()) { - $p = new wsBookParametres($book); - } else { - $p->setParent($book); - } - $book->parametres = $p; + $book->numerotation = $r->numerotation; return $book; } @@ -130,6 +104,25 @@ class wsDAOBook extends extranetDAO { return $this->selectById($book_id); } + public function duplicate($book_id, $createur) + { + $r = $this->con->select('SELECT * FROM books_vue WHERE book_id=\'' . $this->con->escape($book_id) . '\''); + $c = $this->con->openCursor('books'); + $c->proprietaire = $createur; + $c->date = TIME; + $c->hash = md5(rand(0, 1234567893)); + $c->compteur_visites = 20; + $c->status = -1; + $c->date_status = TIME; + $c->lang = $r->lang; + $c->parametres = $r->parametres; + $c->nom = $r->nom; + $c->theme = $r->theme; + $book_id = $c->book_id = $this->getNextId(); + $c->insert(); + return $this->selectById($book_id); + } + public function creeEmpty($createur, $lang) { $c = $this->con->openCursor('books'); @@ -199,8 +192,11 @@ class wsDAOBook extends extranetDAO { public function insertDocument($book_id, $after_page, $document_id) { + // Obtiens le book + $book = $this->selectById($book_id); + $num = $book->numerotation; // Obtiens le nombre de pages - $r = $this->con->select('SELECT pages FROM documents WHERE document_id=\'' . $this->con->escape($document_id) . '\''); + $r = $this->con->select('SELECT pages,numberSections FROM documents WHERE document_id=\'' . $this->con->escape($document_id) . '\''); // Décale les pages vers le bas if ($after_page > 0) { $this->decalePages($book_id, $after_page, $r->pages); @@ -214,6 +210,15 @@ class wsDAOBook extends extranetDAO { $c->book_page = $after_page + $i; $c->insert(); } + // Mets à jour la liste des numéros des pages + $before = array_slice($num, 0, $after_page); + $after = array_slice($num, $after_page, count($num) - $after_page); + $between = explode(',', $r->numberSections); + $num = array_merge($before, $between, $after); + // Mets à jour la numerotation de la publication + $c = $this->con->openCursor('books'); + $c->numerotation = json_encode($num); + $c->update('WHERE book_id=\'' . $this->con->escape($book_id) . '\''); } protected function decalePages($book_id, $after_page, $decalage) @@ -297,14 +302,13 @@ class wsDAOBook extends extranetDAO { $book = $this->selectById($book_id); $parametres = $book->parametres; $new = json_decode($settings, false); - fb($new); foreach($new as $k => $v) { $parametres->$k = $v; } $c = $this->con->openCursor('books'); + $c->nom = $parametres->title; $c->parametres = serialize($parametres); $c->update('WHERE book_id=\'' . $this->con->escape($book_id) . '\''); - fb($parametres); } public function getLinksFromCSV($book_id) @@ -347,6 +351,11 @@ class wsDAOBook extends extranetDAO { } return $res; } + + public function getNumerotationFromDocs() + { + $pages = $this->getPagesOfBook($book_id); + } } ?> \ No newline at end of file diff --git a/inc/ws/DAO/class.ws.dao.document.php b/inc/ws/DAO/class.ws.dao.document.php index 6f84c0693..4c3145b1f 100644 --- a/inc/ws/DAO/class.ws.dao.document.php +++ b/inc/ws/DAO/class.ws.dao.document.php @@ -1,7 +1,7 @@ con->openCursor('documents'); foreach(self::$normal as $k) { - $c->$k = $data[$k]; + if (isset($data[$k])) { + $c->$k = $data[$k]; + } } foreach(self::$complex as $k) { - $c->$k = serialize($data[$k]); + if (isset($data[$k])) { + $c->$k = serialize($data[$k]); + } } if ($data['document_id'] == 'new') { @@ -90,21 +94,6 @@ class wsDAODocument extends extranetDAO { public function updateFromObject($document) { - /* protected $document_id; - protected $file; - protected $proprietaire; - protected $pages; - protected $trim; - protected $date; - protected $localInfos; - protected $generalInfos; - protected $bookmarks; - protected $numberSections; - protected $links; - - -*/ - $data = array(); foreach(self::$normal as $k) { $data[$k] = $document->$k; diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index cfb22b9df..663a4360d 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -13,7 +13,21 @@ class wsBookParametres extends wsParametres { } $this->fields['title'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Titre de la publication"), 'extra' => false, 'grade' => 1); $this->forms['important'] = array('label' => __('Description de la publication'), - 'fieldsnames' => array('title', 'email_title', 'email_body', 'url_link')); + 'fieldsnames' => array('title', 'url_link')); + // . + // . + $this->fields['fonctions_friend'] = __('Fonction Envoyer à un ami et partage'); + $this->fields['friend'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Envoyer à un ami'), 'extra' => false, 'grade' => 1); + $this->fields['email_title'] = array('type' => 'text', 'default' => __('%name% vous invite à découvrir %title%'), 'editable' => true, 'label' => __("Titre de l'email \"Envoyer à un ami\""), 'extra' => false, 'grade' => 1); + $this->fields['email_body'] = array('type' => 'textarea', 'default' => __('Veuillez cliquer sur le lien suivant : %link%'), 'editable' => true, 'label' => __("Corps de l'email \"Envoyer à un ami\""), 'extra' => false, 'grade' => 1); + $this->fields['email_editable'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Permettre au lecteur de modifier le corps de l'email"), 'extra' => false, 'grade' => 1); + $this->fields['askAcknowledge'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Demander au destinataire un accusé de réception"), 'extra' => true, 'grade' => 4); + $this->fields['attachPDFInEmail'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Joindre le fichier PDF de la page en cours à l'email"), 'extra' => true, 'grade' => 4); + $this->fields['attachmentName'] = array('type' => 'text', 'default' => '', 'editable' => false, 'label' => __('Nom de la pièce jointe'), 'extra' => true, 'grade' => 4); + $this->fields['addThis'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Identifiant addThis"), 'extra' => false, 'grade' => 4); + $this->fields['addThisOptions'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __("Paramètres addThis"), 'extra' => false, 'grade' => 4); + $this->forms['share'] = array('label' => __('Fonctions de partage'), + 'fieldsnames' => array('friend','email_title', 'email_body', 'email_editable', 'askAcknowledge', 'attachPDFInEmail', 'attachmentName', 'addThis', 'addThisOptions')); // . $this->fields['pages'] = array('type' => 'integer', 'default' => '', 'editable' => false, 'label' => __('Nombre de pages'), 'extra' => false, 'grade' => 0); $this->fields['width'] = array('type' => 'float', 'default' => '', 'editable' => false, 'label' => __('Largeur'), 'extra' => false, 'grade' => 0); @@ -35,7 +49,7 @@ class wsBookParametres extends wsParametres { 'fieldsnames' => array('preload', 'reading_dir')); // . $this->fields['pdf'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Export PDF'), 'extra' => false, 'grade' => 1); - $this->fields['optimizepdf'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Optimiser le PDF'), 'extra' => false, 'grade' => 4); + $this->fields['optimizepdf'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Optimiser le PDF'), 'extra' => false, 'grade' => 4, 'hint' => "Permet de réduire la taille du document PDF"); $this->fields['pdfComplex'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Export PDF avancé'), 'extra' => false, 'grade' => 3); $this->forms['pdf'] = array('label' => __('Fonction Export PDF'), 'fieldsnames' => array('pdf', 'optimizepdf', 'pdfComplex')); @@ -46,19 +60,6 @@ class wsBookParametres extends wsParametres { $this->forms['zoom'] = array('label' => __('Zoom'), 'fieldsnames' => array('zoom', 'zoomw', 'fixedZoom')); // . - $this->fields['fonctions_friend'] = __('Fonction Envoyer à un ami et partage'); - $this->fields['friend'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Envoyer à un ami'), 'extra' => false, 'grade' => 1); - $this->fields['email_title'] = array('type' => 'text', 'default' => __('%name% vous invite à découvrir %title%'), 'editable' => true, 'label' => __("Titre de l'email \"Envoyer à un ami\""), 'extra' => false, 'grade' => 1); - $this->fields['email_body'] = array('type' => 'textarea', 'default' => __('Veuillez cliquer sur le lien suivant : %link%'), 'editable' => true, 'label' => __("Corps de l'email \"Envoyer à un ami\""), 'extra' => false, 'grade' => 1); - $this->fields['email_editable'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Permettre au lecteur de modifier le corps de l'email"), 'extra' => false, 'grade' => 1); - $this->fields['askAcknowledge'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Demander au destinataire un accusé de réception"), 'extra' => true, 'grade' => 4); - $this->fields['attachPDFInEmail'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Joindre le fichier PDF de la page en cours à l'email"), 'extra' => true, 'grade' => 4); - $this->fields['attachmentName'] = array('type' => 'text', 'default' => '', 'editable' => false, 'label' => __('Nom de la pièce jointe'), 'extra' => true, 'grade' => 4); - $this->fields['addThis'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Identifiant addThis"), 'extra' => false, 'grade' => 4); - $this->fields['addThisOptions'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __("Paramètres addThis"), 'extra' => false, 'grade' => 4); - $this->forms['share'] = array('label' => __('Fonctions de partage'), - 'fieldsnames' => array('friend', 'email_editable', 'askAcknowledge', 'attachPDFInEmail', 'attachmentName', 'addThis', 'addThisOptions')); - // . $this->fields['fonctions_stats'] = __('Fonction Statistiques'); $this->fields['stats'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Activer les statistiques'), 'extra' => false, 'grade' => 1); $this->fields['statsWeborama'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Statistiques Weborama'), 'size' => 10, 'extra' => true, 'grade' => 1); diff --git a/inc/ws/Metier/class.ws.book.php b/inc/ws/Metier/class.ws.book.php index 45620231a..e028b805d 100644 --- a/inc/ws/Metier/class.ws.book.php +++ b/inc/ws/Metier/class.ws.book.php @@ -30,6 +30,46 @@ class wsBook extends cubeMetier { protected $rulers; protected $extras; protected $traductions; + protected $numerotation; + + public function __get($varname) + { + if (!property_exists($this, $varname)) { + $msg = 'You are getting an attribute (' . get_class($this) . '::' . $varname . ') which not exists'; + trigger_error($msg, E_USER_ERROR); + throw new Exception($msg); + } + + $classic = array('chapters', 'links', 'rulers', 'traductions', 'numerotation'); + + if (in_array($varname, $classic)) { + if (is_array($this->$varname)) { + return $this->$varname; + } + if ($this->$varname == '') { + $this->$varname = array(); + } else { + $this->$varname = json_decode($this->$varname, false); + } + return $this->$varname; + } + if ($varname == 'parametres') { + if ($this->parametres instanceof wsBookParametres) { + return $this->parametres; + } + + $p = unserialize($this->parametres); + if (!$p || $p->isEmpty()) { + $p = new wsBookParametres($this); + } else { + $p->setParent($this); + } + $this->parametres = $p; + return $this->parametres; + } + + return $this->$varname; + } } ?> \ No newline at end of file diff --git a/inc/ws/Metier/class.ws.theme.parametres.php b/inc/ws/Metier/class.ws.theme.parametres.php index 946069273..b6d51ac85 100644 --- a/inc/ws/Metier/class.ws.theme.parametres.php +++ b/inc/ws/Metier/class.ws.theme.parametres.php @@ -70,7 +70,7 @@ class wsThemeParametres extends wsParametres { __('Haut') => wsTheme::TOP, __("Bas") => wsTheme::BOTTOM), 'default' => wsTheme::MIDDLE, 'editable' => true, 'label' => __('Alignement Vertical'), 'grade' => 3); - $this->fields['menuColor'] = array('type' => 'couleur', 'default' => 'ffffff', 'editable' => true, + $this->fields['menuColor'] = array('type' => 'couleurAlpha', 'default' => 'ffffffff', 'editable' => true, 'label' => __("Couleur du fond"), 'extra' => false, 'grade' => 3); $this->fields['shadeOnMenu'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Ombre portée sous la barre du menu'), 'extra' => true, 'grade' => 4); diff --git a/js/extranet.js b/js/extranet.js index 23070c859..0623ad719 100644 --- a/js/extranet.js +++ b/js/extranet.js @@ -22,6 +22,15 @@ function load_extranet(){ }); } + if($("#book_nom").length){ + $("#book_nom").autocomplete(SITE_PATH+'autocomplete/book',{ + cacheLength : 0, + maxItemsToShow : 15, + onFindValue : findBook, + onItemSelect : findBook + }); + } + if($(".dashboard").length>=1 && $("#dash").length>=1){ $("#dash").sortable('destroy'); if(FIRST_LOAD){ @@ -206,6 +215,15 @@ function findProjet(li){ }); } +function findBook(li){ + var book=li.selectValue.split(' - '); + if(book.length<=1){ + return; + } + var book_id=parseInt(book[0]); + $("#book").val(book_id); +} + function refreshFiles(){ $.ajax({ url : SITE_PATH+'ajax/refreshFichiers', diff --git a/swf/_src/wsComposer.fla b/swf/_src/wsComposer.fla index c9174632c..4066fae43 100644 Binary files a/swf/_src/wsComposer.fla and b/swf/_src/wsComposer.fla differ diff --git a/swf/_src/wsComposerComponents.fla b/swf/_src/wsComposerComponents.fla index 665c7045c..e3e54cd74 100644 Binary files a/swf/_src/wsComposerComponents.fla and b/swf/_src/wsComposerComponents.fla differ diff --git a/swf/_src/wsComposerComponents.swc b/swf/_src/wsComposerComponents.swc index 0c6198d7a..8b4e58a1e 100644 Binary files a/swf/_src/wsComposerComponents.swc and b/swf/_src/wsComposerComponents.swc differ