$__autoload['extranetDroits'] = dirname(__FILE__) . '/class.extranet.droits.php';\r
$__autoload['extranetFiltre'] = dirname(__FILE__) . '/class.extranet.filtre.php';\r
$__autoload['extranetPageChiffres'] = dirname(__FILE__) . '/class.extranet.page.chiffres.php';\r
-// Workshop\r
-$__autoload['wsFlash'] = dirname(__FILE__) . '/class.ws.flash.php';\r
-$__autoload['wsUrl'] = dirname(__FILE__) . '/class.ws.url.php';\r
-$__autoload['wsDroits'] = dirname(__FILE__) . '/class.ws.droits.php';\r
-$__autoload['wsConversionSession'] = dirname(__FILE__) . '/class.ws.conversion.session.php';\r
\r
?>
\ No newline at end of file
$db->books->extras('text', 0, false);\r
$db->books->traductions('text', 0, false);\r
$db->books->date('integer', 0, false);\r
+ $db->books->numerotation('text',0,false);\r
// Clés\r
$db->books->primary('pk_books', 'book_id');\r
$db->books->index('index_books_nom', 'BTREE', 'nom');\r
$res .= '<table>';\r
$res .= '<tr><td>' . __('De') . '</td><td>' . $core->user->prenom . ' ' . $core->user->nom . ' <' . $core->user->email . '></td></tr>';\r
$res .= '<tr><td>' . __('Sujet') . '</td><td>' . form::field(array('email[sujet]'), 80, 128, htmlspecialchars($devis->email['sujet'], ENT_QUOTES)) . '</td></tr>';\r
- $res .= '<tr><td>' . __('Corps') . '</td><td>' . form::textarea(array('email[corps]'),80, 20, $devis->email['corps']) . '</td></tr>';\r
+ $res .= '<tr><td>' . __('Corps') . '</td><td>' . form::textarea(array('email[corps]'), 80, 20, $devis->email['corps']) . '</td></tr>';\r
$res .= '</table>';\r
$res .= '</div>';\r
$res .= '<div class="right"><a href="#" class="submit">' . $core->typo->BoutonOK('Enregistrer et prévisualiser') . '</a></div>';\r
foreach($projets as $projet) {\r
$suggestions[] = $projet->projet_id . ' - ' . $projet->nom . ' (' . $projet->client . ')';\r
}\r
+ } elseif ($args[1] == 'book') {\r
+ $dao = new wsDAOBook($core->con);\r
+ $dao->setSearch($q, true);\r
+ $books = $dao->getListe('date','DESC',15);\r
+ foreach($books as $book) {\r
+ $suggestions[] = $book->book_id . ' - ' . $book->nom;\r
+ }\r
}\r
cubeSearch::searchSuggestion($args[2], $suggestions);\r
exit;\r
$x->addContent('listeBooks', wsUrl::listeBooks());\r
}\r
\r
+ public static function newBookForm($args, &$x)\r
+ {\r
+ extranetAjax::form('newBook', __("Créer une nouvelle publication à partir d'une existante"), wsUrl::chooseExistingBook(), __('Créer une nouvelle publication'), 3);\r
+ }\r
+\r
public static function filtreBooks($args, &$x)\r
{\r
if (isset($args[1]) && $args[1] == 'efface') {\r
$x->addContent('listeBooks', wsUrl::listeBooks());\r
}\r
}\r
+\r
+ public static function newBook($args, &$x)\r
+ {\r
+ global $core;\r
+ $dao = new wsDAOBook($core->con);\r
+ if ($_POST['book'] != '') {\r
+ $book = $dao->duplicate($_POST['book'], $core->user->utilisateur_id);\r
+ } else {\r
+ $book = $dao->creeEmpty($core->user->utilisateur_id, $core->user->lang);\r
+ }\r
+ $x->addClosePopup();\r
+ $x->addContent('listeBooks', wsUrl::listeBooks());\r
+ $x->addTruePopup(SITE_PATH . 'editbook/' . $book->book_id);\r
+ }\r
}\r
\r
?>
\ No newline at end of file
$data['proprietaire'] = $core->user->utilisateur_id;\r
$data['pages'] = 0;\r
$data['file'] = cubeFiles::tidyName($infos['name']);\r
- $li = new wsDocumentLocalInfos();\r
+ $li = new wsDocumentLocalInfos($this);\r
$li->fileName = $this->args['fileName'];\r
$li->fileSize = $this->args['fileSize'];\r
$li->creationDate = $this->args['creationDate'];\r
{\r
global $core;\r
$dao = new wsDAOBook($core->con);\r
+ $book=$dao->selectById($this->args['book_id']);\r
$pages = $dao->getPagesOfBook($this->args['book_id']);\r
$p = $this->xml->addChild('pages');\r
$docs = array();\r
}\r
$docs = array_unique($docs);\r
$p->addAttribute('documents', implode(',', $docs));\r
+ $this->xml->addChild('numerotation',json_encode($book->numerotation));\r
}\r
\r
public function processConversionSession()\r
$settings = $core->user->getSettings('books');\r
\r
$shortcuts = array();\r
- $shortcuts[] = '<a class="popupFS" href="' . SITE_PATH . 'editbook/new">' . $core->typo->Ajouter(__('Créer une nouvelle publication')) . '</a>';\r
+ $shortcuts[] = '<a class="popup" rel="newBookForm">' . $core->typo->Ajouter(__('Créer une nouvelle publication')) . '</a>';\r
\r
$filtres = array();\r
$filtres[] = new extranetFiltre(__('Status'), 'status_book', $settings['filtres']);\r
{\r
global $core;\r
cubePage::truePopup();\r
+ cubePage::autocomplete();\r
+\r
extranetDroits::min(1);\r
$settings = is_null($settings)?$core->user->getSettings('books'):$settings;\r
$change = is_null($dashboard)?'Books':'Dashboard/' . $dashboard;\r
public static function editbook($args)\r
{\r
global $core;\r
+\r
$args = cubePage::getArgs($args);\r
$book_id = $args[0];\r
\r
if ($book_id == 'new') {\r
$dao = new wsDAOBook($core->con);\r
- $book = $dao->creeEmpty($core->user->utilisateur_id,$core->user->lang);\r
+ $book = $dao->creeEmpty($core->user->utilisateur_id, $core->user->lang);\r
http::redirect(SITE_PATH . 'editbook/' . $book->book_id);\r
}\r
\r
- /*$step = isset($args[2])?$args[2]:1;\r
-\r
- $shortcuts = array();\r
-\r
- $steps = array();\r
- $steps['composition'] = __('Composition');\r
- $steps['themeSelector'] = __('Personnalisation');\r
- $steps['settings'] = __('Paramètres');\r
- $steps['links'] = __('Edition des liens');\r
- $steps['preview'] = __('Aperçu');\r
-\r
- $i = 1;\r
- foreach($steps as $s => $n) {\r
- $template = 'Step';\r
- if ($s == $step) {\r
- $class = 'step active';\r
- $ae = $as = '';\r
- } else {\r
- $class = 'step';\r
- $as = '<a href="' . SITE_PATH . 'editbook/' . $book_id . '/#/' . $s . '">';\r
- $ae = '</a>';\r
- }\r
-\r
- if ($i == count($steps)) {\r
- $template = 'Last' . $template;\r
- }\r
- $shortcuts[] = $as . $core->typo->$template($i . '. ' . $n, $class, -1) . $ae;\r
- $i++;\r
- }*/\r
-\r
- /*$res = extranetPage::barre(null , null, null, null);\r
- $res .= extranetPage::tMain(null, true);\r
- $res .= extranetPage::bh();*/\r
$res = '<html><head><style type="text/css">';\r
$res .= '#composerSwf{width:100%;height:100%;margin:0 auto;}\r
body{margin:0;padding:0;height:100%;overflow:hidden;background:#d2d3c7;}\r
html{height:100%}' . "\n";\r
$res .= '</style>';\r
- $res .= '<title>' . __('Edition de la publication') . ' #' . $args[0].'</title>';\r
+ $res .= '<title>' . __('Edition de la publication') . ' #' . $args[0] . '</title>';\r
$res .= '</head>';\r
$res .= '<body>';\r
$res .= self::editComposition($args);\r
$res .= '</body>';\r
$res .= '</html>';\r
- /*\r
- $res .= extranetPage::bf();\r
- $res .= extranetPage::bMain();*/\r
echo $res;\r
}\r
\r
public static function editComposition($args)\r
{\r
$fv = array(session_name() => session_id(),\r
- 'book_id' => $args[0],\r
- 'finishedText' => __('Transfert terminé'),\r
- 'loadingFileText' => __('Chargement du fichier'),\r
- 'totalText' => __('Total'),\r
- 'browseText' => __('Parcourir') . ' ...',\r
- 'titreUpload' => __('Sélectionnez un ou plusieurs document PDF sur votre ordinateur'),\r
- 'titreComposition' => __('Organisez le(s) document(s) pour composer votre fluidbook'));\r
- $res = cubeMedia::flash(WEBROOT . '/swf/composer.swf?junk=' . TIME, '100%', '100%', $fv, 'composerSwf', 'swfPanel', 9, '#d2d3c7', '', 'false', 'noscale', 'normal', array(), false, true, true);\r
+ 'book_id' => $args[0]);\r
+ $res = cubeMedia::flash(WEBROOT . '/swf/composer.swf?junk=' . TIME, '100%', '100%', $fv, 'composerSwf', 'swfPanel', 10, '#d2d3c7', '', 'false', 'noscale', 'normal', array(), false, true, true);\r
+ return $res;\r
+ }\r
+\r
+ public static function chooseExistingBook()\r
+ {\r
+ $res = '<tr><td colspan="2"><p style="width:600px;text-align:justify;"><em>' . __("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") . '</em></p></td></tr>';\r
+ $res .= '<tr><td>' . __('Rechercher une publication') . ' : </td><td>' . form::field('book_nom', 64, 1024) . form::hidden('book', '') . '</td></tr>';\r
return $res;\r
}\r
}\r
$book->date_status = $r->date_status;\r
$book->date = $r->date;\r
$book->pages = array();\r
- if ($r->chapters == '') {\r
- $book->chapters = array();\r
- } else {\r
- $book->chapters = json_decode($r->chapters, false);\r
- }\r
-\r
+ $book->chapters = $r->chapters;\r
+ $book->links = $r->links;\r
+ $book->rulers = $r->rulers;\r
+ $book->traductions = $r->traductions;\r
+ $book->parametres = $r->parametres;\r
$book->extras = $r->extras;\r
-\r
- if ($r->links == '') {\r
- $book->links = $this->getLinksFromCSV($r->book_id);\r
- } else {\r
- $book->links = json_decode($r->links, false);\r
- }\r
-\r
- if ($r->rulers == '') {\r
- $book->rulers = array();\r
- } else {\r
- $book->rulers = json_decode($r->rulers, false);\r
- }\r
-\r
- if ($r->traductions == '') {\r
- $book->traductions = array();\r
- } else {\r
- $book->traductions = json_decode($r->traductions);\r
- }\r
-\r
- $p = unserialize($r->parametres);\r
- if (!$p || $p->isEmpty()) {\r
- $p = new wsBookParametres($book);\r
- } else {\r
- $p->setParent($book);\r
- }\r
- $book->parametres = $p;\r
+ $book->numerotation = $r->numerotation;\r
return $book;\r
}\r
\r
return $this->selectById($book_id);\r
}\r
\r
+ public function duplicate($book_id, $createur)\r
+ {\r
+ $r = $this->con->select('SELECT * FROM books_vue WHERE book_id=\'' . $this->con->escape($book_id) . '\'');\r
+ $c = $this->con->openCursor('books');\r
+ $c->proprietaire = $createur;\r
+ $c->date = TIME;\r
+ $c->hash = md5(rand(0, 1234567893));\r
+ $c->compteur_visites = 20;\r
+ $c->status = -1;\r
+ $c->date_status = TIME;\r
+ $c->lang = $r->lang;\r
+ $c->parametres = $r->parametres;\r
+ $c->nom = $r->nom;\r
+ $c->theme = $r->theme;\r
+ $book_id = $c->book_id = $this->getNextId();\r
+ $c->insert();\r
+ return $this->selectById($book_id);\r
+ }\r
+\r
public function creeEmpty($createur, $lang)\r
{\r
$c = $this->con->openCursor('books');\r
\r
public function insertDocument($book_id, $after_page, $document_id)\r
{\r
+ // Obtiens le book\r
+ $book = $this->selectById($book_id);\r
+ $num = $book->numerotation;\r
// Obtiens le nombre de pages\r
- $r = $this->con->select('SELECT pages FROM documents WHERE document_id=\'' . $this->con->escape($document_id) . '\'');\r
+ $r = $this->con->select('SELECT pages,numberSections FROM documents WHERE document_id=\'' . $this->con->escape($document_id) . '\'');\r
// Décale les pages vers le bas\r
if ($after_page > 0) {\r
$this->decalePages($book_id, $after_page, $r->pages);\r
$c->book_page = $after_page + $i;\r
$c->insert();\r
}\r
+ // Mets à jour la liste des numéros des pages\r
+ $before = array_slice($num, 0, $after_page);\r
+ $after = array_slice($num, $after_page, count($num) - $after_page);\r
+ $between = explode(',', $r->numberSections);\r
+ $num = array_merge($before, $between, $after);\r
+ // Mets à jour la numerotation de la publication\r
+ $c = $this->con->openCursor('books');\r
+ $c->numerotation = json_encode($num);\r
+ $c->update('WHERE book_id=\'' . $this->con->escape($book_id) . '\'');\r
}\r
\r
protected function decalePages($book_id, $after_page, $decalage)\r
$book = $this->selectById($book_id);\r
$parametres = $book->parametres;\r
$new = json_decode($settings, false);\r
- fb($new);\r
foreach($new as $k => $v) {\r
$parametres->$k = $v;\r
}\r
$c = $this->con->openCursor('books');\r
+ $c->nom = $parametres->title;\r
$c->parametres = serialize($parametres);\r
$c->update('WHERE book_id=\'' . $this->con->escape($book_id) . '\'');\r
- fb($parametres);\r
}\r
\r
public function getLinksFromCSV($book_id)\r
}\r
return $res;\r
}\r
+\r
+ public function getNumerotationFromDocs()\r
+ {\r
+ $pages = $this->getPagesOfBook($book_id);\r
+ }\r
}\r
\r
?>
\ No newline at end of file
<?php\r
class wsDAODocument extends extranetDAO {\r
- public static $normal = array('document_id', 'file', 'proprietaire', 'pages', 'date');\r
- public static $complex = array('localInfos', 'bookmarks', 'generalInfos', 'numberSections', 'trim');\r
+ public static $normal = array('document_id', 'file', 'proprietaire', 'pages', 'date', 'numberSections');\r
+ public static $complex = array('localInfos', 'bookmarks', 'generalInfos', 'trim');\r
\r
public function singleton($r)\r
{\r
$c = $this->con->openCursor('documents');\r
\r
foreach(self::$normal as $k) {\r
- $c->$k = $data[$k];\r
+ if (isset($data[$k])) {\r
+ $c->$k = $data[$k];\r
+ }\r
}\r
foreach(self::$complex as $k) {\r
- $c->$k = serialize($data[$k]);\r
+ if (isset($data[$k])) {\r
+ $c->$k = serialize($data[$k]);\r
+ }\r
}\r
\r
if ($data['document_id'] == 'new') {\r
\r
public function updateFromObject($document)\r
{\r
- /* protected $document_id;\r
- protected $file;\r
- protected $proprietaire;\r
- protected $pages;\r
- protected $trim;\r
- protected $date;\r
- protected $localInfos;\r
- protected $generalInfos;\r
- protected $bookmarks;\r
- protected $numberSections;\r
- protected $links;\r
-\r
-\r
-*/\r
-\r
$data = array();\r
foreach(self::$normal as $k) {\r
$data[$k] = $document->$k;\r
}\r
$this->fields['title'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Titre de la publication"), 'extra' => false, 'grade' => 1);\r
$this->forms['important'] = array('label' => __('Description de la publication'),\r
- 'fieldsnames' => array('title', 'email_title', 'email_body', 'url_link'));\r
+ 'fieldsnames' => array('title', 'url_link'));\r
+ // .\r
+ // .\r
+ $this->fields['fonctions_friend'] = __('Fonction Envoyer à un ami et partage');\r
+ $this->fields['friend'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Envoyer à un ami'), 'extra' => false, 'grade' => 1);\r
+ $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);\r
+ $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);\r
+ $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);\r
+ $this->fields['askAcknowledge'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Demander au destinataire un accusé de réception"), 'extra' => true, 'grade' => 4);\r
+ $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);\r
+ $this->fields['attachmentName'] = array('type' => 'text', 'default' => '', 'editable' => false, 'label' => __('Nom de la pièce jointe'), 'extra' => true, 'grade' => 4);\r
+ $this->fields['addThis'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Identifiant addThis"), 'extra' => false, 'grade' => 4);\r
+ $this->fields['addThisOptions'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __("Paramètres addThis"), 'extra' => false, 'grade' => 4);\r
+ $this->forms['share'] = array('label' => __('Fonctions de partage'),\r
+ 'fieldsnames' => array('friend','email_title', 'email_body', 'email_editable', 'askAcknowledge', 'attachPDFInEmail', 'attachmentName', 'addThis', 'addThisOptions'));\r
// .\r
$this->fields['pages'] = array('type' => 'integer', 'default' => '', 'editable' => false, 'label' => __('Nombre de pages'), 'extra' => false, 'grade' => 0);\r
$this->fields['width'] = array('type' => 'float', 'default' => '', 'editable' => false, 'label' => __('Largeur'), 'extra' => false, 'grade' => 0);\r
'fieldsnames' => array('preload', 'reading_dir'));\r
// .\r
$this->fields['pdf'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Export PDF'), 'extra' => false, 'grade' => 1);\r
- $this->fields['optimizepdf'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Optimiser le PDF'), 'extra' => false, 'grade' => 4);\r
+ $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");\r
$this->fields['pdfComplex'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Export PDF avancé'), 'extra' => false, 'grade' => 3);\r
$this->forms['pdf'] = array('label' => __('Fonction Export PDF'),\r
'fieldsnames' => array('pdf', 'optimizepdf', 'pdfComplex'));\r
$this->forms['zoom'] = array('label' => __('Zoom'),\r
'fieldsnames' => array('zoom', 'zoomw', 'fixedZoom'));\r
// .\r
- $this->fields['fonctions_friend'] = __('Fonction Envoyer à un ami et partage');\r
- $this->fields['friend'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Envoyer à un ami'), 'extra' => false, 'grade' => 1);\r
- $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);\r
- $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);\r
- $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);\r
- $this->fields['askAcknowledge'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Demander au destinataire un accusé de réception"), 'extra' => true, 'grade' => 4);\r
- $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);\r
- $this->fields['attachmentName'] = array('type' => 'text', 'default' => '', 'editable' => false, 'label' => __('Nom de la pièce jointe'), 'extra' => true, 'grade' => 4);\r
- $this->fields['addThis'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Identifiant addThis"), 'extra' => false, 'grade' => 4);\r
- $this->fields['addThisOptions'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __("Paramètres addThis"), 'extra' => false, 'grade' => 4);\r
- $this->forms['share'] = array('label' => __('Fonctions de partage'),\r
- 'fieldsnames' => array('friend', 'email_editable', 'askAcknowledge', 'attachPDFInEmail', 'attachmentName', 'addThis', 'addThisOptions'));\r
- // .\r
$this->fields['fonctions_stats'] = __('Fonction Statistiques');\r
$this->fields['stats'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Activer les statistiques'), 'extra' => false, 'grade' => 1);\r
$this->fields['statsWeborama'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Statistiques Weborama'), 'size' => 10, 'extra' => true, 'grade' => 1);\r
protected $rulers;\r
protected $extras;\r
protected $traductions;\r
+ protected $numerotation;\r
+\r
+ public function __get($varname)\r
+ {\r
+ if (!property_exists($this, $varname)) {\r
+ $msg = 'You are getting an attribute (' . get_class($this) . '::' . $varname . ') which not exists';\r
+ trigger_error($msg, E_USER_ERROR);\r
+ throw new Exception($msg);\r
+ }\r
+\r
+ $classic = array('chapters', 'links', 'rulers', 'traductions', 'numerotation');\r
+\r
+ if (in_array($varname, $classic)) {\r
+ if (is_array($this->$varname)) {\r
+ return $this->$varname;\r
+ }\r
+ if ($this->$varname == '') {\r
+ $this->$varname = array();\r
+ } else {\r
+ $this->$varname = json_decode($this->$varname, false);\r
+ }\r
+ return $this->$varname;\r
+ }\r
+ if ($varname == 'parametres') {\r
+ if ($this->parametres instanceof wsBookParametres) {\r
+ return $this->parametres;\r
+ }\r
+\r
+ $p = unserialize($this->parametres);\r
+ if (!$p || $p->isEmpty()) {\r
+ $p = new wsBookParametres($this);\r
+ } else {\r
+ $p->setParent($this);\r
+ }\r
+ $this->parametres = $p;\r
+ return $this->parametres;\r
+ }\r
+\r
+ return $this->$varname;\r
+ }\r
}\r
\r
?>
\ No newline at end of file
__('Haut') => wsTheme::TOP,\r
__("Bas") => wsTheme::BOTTOM),\r
'default' => wsTheme::MIDDLE, 'editable' => true, 'label' => __('Alignement Vertical'), 'grade' => 3);\r
- $this->fields['menuColor'] = array('type' => 'couleur', 'default' => 'ffffff', 'editable' => true,\r
+ $this->fields['menuColor'] = array('type' => 'couleurAlpha', 'default' => 'ffffffff', 'editable' => true,\r
'label' => __("Couleur du fond"), 'extra' => false, 'grade' => 3);\r
$this->fields['shadeOnMenu'] = array('type' => 'boolean', 'default' => true, 'editable' => true,\r
'label' => __('Ombre portée sous la barre du menu'), 'extra' => true, 'grade' => 4);\r
});\r
}\r
\r
+ if($("#book_nom").length){\r
+ $("#book_nom").autocomplete(SITE_PATH+'autocomplete/book',{\r
+ cacheLength : 0,\r
+ maxItemsToShow : 15,\r
+ onFindValue : findBook,\r
+ onItemSelect : findBook\r
+ });\r
+ }\r
+\r
if($(".dashboard").length>=1 && $("#dash").length>=1){\r
$("#dash").sortable('destroy');\r
if(FIRST_LOAD){\r
});\r
}\r
\r
+function findBook(li){\r
+ var book=li.selectValue.split(' - ');\r
+ if(book.length<=1){\r
+ return;\r
+ }\r
+ var book_id=parseInt(book[0]);\r
+ $("#book").val(book_id);\r
+}\r
+\r
function refreshFiles(){\r
$.ajax({\r
url : SITE_PATH+'ajax/refreshFichiers',\r