]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 11 Apr 2011 13:20:27 +0000 (13:20 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 11 Apr 2011 13:20:27 +0000 (13:20 +0000)
fluidbook/compile/_js/fluidbook.js
inc/ws/Controlleur/class.ws.url.php

index 07730329339119619f2021f8189fd4e451167f58..dd619994bf7cf24082963fda08e68838c27a08b3 100644 (file)
@@ -1,3 +1,12 @@
+function getWmode(){\r
+       var ua=navigator.userAgent;\r
+       if(ua.search(/mac/i)>-1 && ua.search(/opera/i)>-1){\r
+               return 'normal';\r
+       }else{\r
+               return 'direct';\r
+       }\r
+}\r
+\r
 function getLocation(){\r
        return window.location.toString();\r
 }\r
index 61986ff867b08b2a194eed00afdeaafc60a33826..6d1b984a772071559c9f644c42660a1a8070f1c9 100644 (file)
@@ -388,22 +388,26 @@ html{height:100%}' . "\n";
        {\r
                $args = cubePage::getArgs($args);\r
 \r
+               $wmode = isset($args[1])?$args[1]:'';\r
+\r
                $e = explode('_', $args[0]);\r
                if (count($e) == 2 || $e[2] < TIME-10) {\r
                        $e[2] = TIME;\r
-                       http::redirect(SITE_PATH . 'viewer/' . implode('_', $e) . '/');\r
+                       http::redirect(SITE_PATH . 'viewer/' . implode('_', $e) . '/' . $wmode);\r
                        exit;\r
                }\r
 \r
                $book_id = $e[0];\r
 \r
+               $wmode = $wmode != ''?$wmode:'default';\r
+\r
                self::checkDocumentVersionOfBook($book_id);\r
                wsSecureSWF::checkProtectedSWF();\r
 \r
-               echo self::commonViewer($book_id, $e[1]);\r
+               echo self::commonViewer($book_id, $e[1], false, $wmode);\r
        }\r
 \r
-       public static function commonViewer($book_id, $hash, $standalone = false)\r
+       public static function commonViewer($book_id, $hash, $standalone = false, $wmode = 'default')\r
        {\r
                if (!defined('MINIMIZE_JS')) {\r
                        define('MINIMIZE_JS', false);\r
@@ -422,6 +426,8 @@ html{height:100%}' . "\n";
                global $meta;\r
                global $jsvar;\r
 \r
+               cubePage::swfobject(2);\r
+\r
                $dao = new wsDAOBook($core->con);\r
 \r
                $book = $dao->selectById($book_id);\r
@@ -463,7 +469,13 @@ html{height:100%}' . "\n";
 \r
                $res .= '</head>';\r
                $res .= '<body style="background-color:#' . $theme->parametres->loadingBackColor . '" onload="this.focus();">';\r
-               $res .= cubeMedia::flash2('index.swf', '100%', '100%', $fv, 'fluidbook', '', 10, '#' . $theme->parametres->loadingBackColor, $alt, 'true', 'noscale', 'gpu', array('allowScriptAccess' => 'always'));\r
+               $res .= '<div id="fluidbook"><div style="width:734px;margin:100px auto;"><a href="http://get.adobe.com/flashplayer/" target="_blank"><img src="http://static.workshop.fluidbook.com/fluidbook/compile/getflash.gif" alt="" width="734" height="409"/></a></div></div>';\r
+               $res .= '<script type="text/javascript">';\r
+               $res .= 'swfobject.embedSWF("index.swf", "fluidbook", "100%", "100%", "10.0.0",';\r
+               $res .= '"", [],';\r
+               $res .= '{"allowScriptAccess":"always","quality":"high","scale":"noscale","wmode":getWmode(),"allowFullScreen":"true"},{"bgcolor":"#000000"}';\r
+               $res .= ');';\r
+               $res .= '</script>';\r
                $js = array($webcompile . 'fluidbook.js');\r
                $jsvar = array();\r
 \r