self::checkDocumentVersionOfBook($book_id);
+ $dao = new wsDAOBook($core->con);
if ($book_id == 'new') {
- $dao = new wsDAOBook($core->con);
$book = $dao->creeEmpty($core->user->utilisateur_id, $core->user->lang);
http::redirect(SITE_PATH . 'editor/' . $book->book_id . '_' . $book->hash);
+ } else {
+ $book = $dao->selectById($book_id);
}
$res = '<html><head><style type="text/css">';
$res .= '#composerSwf{width:100%;height:100%;margin:0 auto;}
body{margin:0;padding:0;height:100%;overflow:hidden;background:#d2d3c7;}
html{height:100%}' . "\n";
+ if ($book->parametres->mobileNavigationType == 'mobilefirst') {
+ $res .= 'html.tall #composerSwf{width:100%;height:150%;margin:0 auto;}
+html.tall body{margin:0;padding:0;height:150%;overflow:auto;background:#d2d3c7;}
+html.tall{height:150%}' . "\n";
+ }
$res .= '</style>';
+ $res .= '<script>function setTall(tall){';
+ if ($book->parametres->mobileNavigationType == 'mobilefirst') {
+
+ $res .= 'var cl=document.getElementsByTagName("html").item(0).classList;
+ if(tall){
+ cl.add("tall");
+ }else{
+ cl.remove("tall");
+ }';
+ }
+ $res .= '}</script>';
$res .= '<title>' . __('Edition de la publication') . ' #' . $args[0] . '</title>';
$res .= '</head>';
$res .= '<body onload="this.focus();">';