]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 5 Mar 2012 14:19:40 +0000 (14:19 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 5 Mar 2012 14:19:40 +0000 (14:19 +0000)
fluidbook/compile/_js/fluidbook.js
inc/ws/Controlleur/class.ws.url.php

index a5ab3431e91d54b90b6eb66a2f063212ea569382..4e723d7d5d791d8e8b5cd8ec0d6bd43fa0ebd8d7 100644 (file)
@@ -17,17 +17,28 @@ function getFlashvars(junk,fv){
                res=fv;\r
        }\r
        \r
+       res=parseGet(res);\r
+\r
+       res['junk']=junk;\r
+       return res;\r
+}\r
+\r
+function parseGet(res){\r
+       if(res==undefined){\r
+               res={};\r
+       }\r
        var couples=window.location.search.substr(1).split('&');\r
        var couple=new Array();\r
        for (var i=0;i<couples.length;i++){\r
                couple=couples[i].split('=');\r
                res[couple[0]]=couple[1];\r
        }\r
-       res['junk']=junk;\r
        return res;\r
 }\r
+\r
 function getLang(){\r
-       var get=parseGet();\r
+       var get={};\r
+       get=parseGet(get);\r
        if(get.lang==undefined || get.lang==null || get.lang==''){\r
                return FB_DEFAULT_LANG;\r
        }\r
@@ -130,26 +141,26 @@ function wheel(event){
        if (event.wheelDelta) { /* IE/Opera. */\r
                delta = event.wheelDelta/120;\r
                /** In Opera 9, delta differs in sign as compared to IE.\r
-                 */\r
+        */\r
                if (window.opera)\r
                        delta = -delta;\r
        } else if (event.detail) { /** Mozilla case. */\r
                /** In Mozilla, sign of delta is different than in IE.\r
-                 * Also, delta is multiple of 3.\r
-                 */\r
+        * Also, delta is multiple of 3.\r
+        */\r
                delta = -event.detail/3;\r
        }\r
        /** If delta is nonzero, handle it.\r
        * Basically, delta is now positive if wheel was scrolled up,\r
        * and negative, if wheel was scrolled down.\r
        */\r
+ * Basically, delta is now positive if wheel was scrolled up,\r
+ * and negative, if wheel was scrolled down.\r
+ */\r
        if (delta){\r
                handleWheel(delta);\r
        }\r
        /** Prevent default actions caused by mouse wheel.\r
        * That might be ugly, but we handle scrolls somehow\r
        * anyway, so don't bother here..\r
        */\r
+ * That might be ugly, but we handle scrolls somehow\r
+ * anyway, so don't bother here..\r
+ */\r
        if (event.preventDefault){\r
                event.preventDefault();\r
        }\r
@@ -157,8 +168,8 @@ function wheel(event){
 }\r
 \r
 /** Initialization code.\r
- * If you use your own event management code, change it as required.\r
- */\r
+* If you use your own event management code, change it as required.\r
+*/\r
 if (window.addEventListener){\r
        /** DOMMouseScroll is for mozilla. */\r
        window.addEventListener('DOMMouseScroll', wheel, false);\r
index c2527a1177c7aa569f243dce099acd4ed09179ae..d31f459c7b863156665e4658f8b1c91d90520283 100644 (file)
@@ -129,7 +129,11 @@ class wsUrl {
                                if ($droits->admin) {\r
                                        $res .= '<td class="bouton"><a href="#" class="openContextMenu" rel="' . $context_view_id . '" rev="' . $book->book_id . 'ยง' . $book->hash . '">' . $btVoir . '</a></td>';\r
                                } else {\r
-                                       $res .= '<td class="bouton"><a class="popupFSBar" rel="toolbar=yes" rev="viewer_' . $book->book_id . '" href="' . SITE_PATH . 'viewer/' . $book->book_id . '_' . $book->hash . '/">' . $btVoir . '</a></td>';\r
+                                       $viewURL = SITE_PATH . 'viewer/' . $book->book_id . '_' . $book->hash;\r
+                                       if ($book->parametres->version == 1) {\r
+                                               $viewURL = SITE_PATH . 'viewer1/' . $book->book_id . '_' . $book->hash;\r
+                                       }\r
+                                       $res .= '<td class="bouton"><a class="popupFSBar" rel="toolbar=yes" rev="viewer_' . $book->book_id . '" href="' . $viewURL . '/">' . $btVoir . '</a></td>';\r
                                }\r
                                $res .= '<td class="bouton"><a class="popupFSBar" rel="toolbar=yes" rev="editor_' . $book->book_id . '" href="' . SITE_PATH . 'editor/' . $book->book_id . '_' . $book->hash . '">' . $btEdit . '</a></td>';\r
                        } else {\r