]> _ Git - cubeextranet.git/commitdiff
wip #3112 @3
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 8 Oct 2019 18:25:51 +0000 (18:25 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 8 Oct 2019 18:25:51 +0000 (18:25 +0000)
inc/ws/Controlleur/class.ws.url.php

index 09bd52dc5a3dff2e87c7f26dfc57d6a61261f2fc..81ab50061f6785f0c77182bb50cb796bed137065 100644 (file)
@@ -919,17 +919,35 @@ class wsUrl
 
         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();">';