Changeset 18168

Show
Ignore:
Timestamp:
09.12.2008 18:21:01 (11 years ago)
Author:
ak19
Message:

Veronica has updated the Book.swf and document.dm files so that the Realistic Book will display on Windows again.

Location:
gsdl/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/macros/document.dm

    r14776 r18168  
    200200 
    201201 <script type="text/javascript"> 
    202  //get the height and width of the window 
    203  var myWidth2 = 0, myHeight = 0; 
    204  if (typeof(window.innerWidth) == 'number')  
    205  \{ 
    206     //Non-IE 
    207     myWidth2 = window.innerWidth; 
    208     myHeight = window.innerHeight; 
    209  \}  
    210  else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))  
    211  \{ 
    212     //IE 6+ in 'standards compliant mode' 
    213     myWidth2 = document.documentElement.clientWidth; 
    214     myHeight = document.documentElement.clientHeight; 
    215  \}  
    216  else if(document.body && (document.body.clientWidth || document.body.clientHeight))  
    217  \{ 
    218     //IE 4 compatible 
    219     myWidth2 = document.body.clientWidth; 
    220     myHeight = document.body.clientHeight; 
    221  \} 
    222   
    223202 var myWidth = "100%"; 
    224203 myHeight = 800; 
     
    228207 doc_url = doc_url.replace(/(&|\\?)book=[a-z]+/gi,''); 
    229208 doc_url += '&book=flashxml';  
    230   
     209   
     210 var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;//get windows or not 
     211 //Only for Windows computers because Greenstone webserver doesn't allow us to pass parameters to Flash. 
     212 //These methods is called by the Flash program to get all the necessary parameters for the book 
     213 //However, it will only work for IE 5.0 and later, Firefox 1.0 and later, Mozilla 1.7.5 and later 
     214 //Netscape 8.0 and later, Safari 1.3 and later 
     215 function getDocURL() \{ return doc_url; \} 
     216 function getImgCover() \{ return img_cover; \} 
     217 function getStageW() \{ return -1; \} 
     218 function getStageH() \{ return -1; \} 
     219 
     220 
    231221 var flash_plug_html = ""; 
    232222 flash_plug_html += '<OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \\n'; 
    233223 flash_plug_html += '  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \\n'; 
    234224 flash_plug_html += '  height="'; 
    235  flash_plug_html += myHeight + '" id="Book" swLiveConnect="true" \\n'; 
     225 flash_plug_html += myHeight + '" id="Book" swLiveConnect="true" align="middle"\\n'; 
    236226 flash_plug_html += '  width="'; 
    237227 flash_plug_html += myWidth + '">\\n'; 
    238  
     228  
    239229 flash_plug_html += '    <PARAM name="allowScriptAccess" value="always" />\\n'; 
    240230 flash_plug_html += '    <PARAM name="movie" value="_httpimg_/Book.swf'; 
    241  flash_plug_html += '?src_image=' + escape(img_cover); 
    242  flash_plug_html += '&doc_url=' + escape(doc_url); 
     231 if (isWin == false)  
     232 \{ 
     233    flash_plug_html += '?src_image=' + escape(img_cover); 
     234    flash_plug_html += '&amp;doc_url=' + escape(doc_url); 
     235 \} 
    243236 flash_plug_html += '" />\\n'; 
    244237 flash_plug_html += '    <PARAM name="quality" value="high" />\\n'; 
     
    250243 flash_plug_html += '      pluginspage="http://www.macromedia.com/go/getflashplayer" \\n'; 
    251244 flash_plug_html += '      quality="high" \\n'; 
    252  flash_plug_html += '      src="_httpimg_/Book.swf'; 
    253  flash_plug_html += '?src_image=' + escape(img_cover); 
    254  flash_plug_html += '&amp;doc_url=' + escape(doc_url); 
    255  flash_plug_html += '"\\n';  
     245 flash_plug_html += '      src=\\'_httpimg_/Book.swf'; 
     246 if (isWin == false)  
     247 \{ 
     248    flash_plug_html += '?src_image=' + escape(img_cover); 
     249    flash_plug_html += '&amp;doc_url=' + escape(doc_url); 
     250 \} 
     251 flash_plug_html += '\\'\\n';  
    256252 flash_plug_html += '      type="application/x-shockwave-flash" width="'; 
    257253 flash_plug_html += myWidth + '" />\\n';