Boost logo

Boost-Commit :

From: matias_at_[hidden]
Date: 2007-06-28 22:17:41


Author: matias
Date: 2007-06-28 22:17:40 EDT (Thu, 28 Jun 2007)
New Revision: 7302
URL: http://svn.boost.org/trac/boost/changeset/7302

Log:
safari fix

Text files modified:
   sandbox/boost_docs/trunk/doc/javascript/main.js | 31 ++++++++++++++++++++++++++++++-
   1 files changed, 30 insertions(+), 1 deletions(-)

Modified: sandbox/boost_docs/trunk/doc/javascript/main.js
==============================================================================
--- sandbox/boost_docs/trunk/doc/javascript/main.js (original)
+++ sandbox/boost_docs/trunk/doc/javascript/main.js 2007-06-28 22:17:40 EDT (Thu, 28 Jun 2007)
@@ -66,6 +66,11 @@
 
 }
 
+function safari_browser()
+{
+ return ( navigator.vendor.indexOf('Apple') != -1 );
+}
+
 function include_components( aUsedComponents, sUserBaseUrl )
 {
     insert_needed_includes( boostscript.namespace, aUsedComponents,
@@ -78,7 +83,15 @@
     {
         find_needed_includes( aUsedComponents[i] );
     }
- dom_insertion_included_scripts( sBaseUrl );
+
+ if( safari_browser() )
+ {
+ write_insertion_included_scripts( sBaseUrl );
+ }
+ else
+ {
+ dom_insertion_included_scripts( sBaseUrl );
+ }
 }
 
 function find_needed_includes( oComp )
@@ -108,6 +121,22 @@
     }
 }
 
+function write_insertion_included_scripts( sBaseUrl )
+{
+ var namespace = boostscript.namespace;
+ var sScriptsHtml = '';
+ for(var i = 0, len = namespace.length; i < len ; i++ )
+ {
+ if( namespace[i].used )
+ {
+ sScriptsHtml += '<script type="text/javascript" scr="' +
+ format_url( namespace[i].path, sBaseUrl ) +
+ '"></script>\n';
+ }
+ }
+ document.write( sScriptsHtml );
+}
+
 function format_base_url(sBaseUrl)
 {
     return ( sBaseUrl != '' && sBaseUrl.charAt(sBaseUrl.length-1)!='/' ) ?


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk