Changeset 18168
- Timestamp:
- 2008-12-09T18:21:01+13:00 (15 years ago)
- Location:
- gsdl/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/macros/document.dm
r14776 r18168 200 200 201 201 <script type="text/javascript"> 202 //get the height and width of the window203 var myWidth2 = 0, myHeight = 0;204 if (typeof(window.innerWidth) == 'number')205 \{206 //Non-IE207 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 compatible219 myWidth2 = document.body.clientWidth;220 myHeight = document.body.clientHeight;221 \}222 223 202 var myWidth = "100%"; 224 203 myHeight = 800; … … 228 207 doc_url = doc_url.replace(/(&|\\?)book=[a-z]+/gi,''); 229 208 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 231 221 var flash_plug_html = ""; 232 222 flash_plug_html += '<OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \\n'; 233 223 flash_plug_html += ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \\n'; 234 224 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'; 236 226 flash_plug_html += ' width="'; 237 227 flash_plug_html += myWidth + '">\\n'; 238 228 239 229 flash_plug_html += ' <PARAM name="allowScriptAccess" value="always" />\\n'; 240 230 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 += '&doc_url=' + escape(doc_url); 235 \} 243 236 flash_plug_html += '" />\\n'; 244 237 flash_plug_html += ' <PARAM name="quality" value="high" />\\n'; … … 250 243 flash_plug_html += ' pluginspage="http://www.macromedia.com/go/getflashplayer" \\n'; 251 244 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 += '&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 += '&doc_url=' + escape(doc_url); 250 \} 251 flash_plug_html += '\\'\\n'; 256 252 flash_plug_html += ' type="application/x-shockwave-flash" width="'; 257 253 flash_plug_html += myWidth + '" />\\n';
Note:
See TracChangeset
for help on using the changeset viewer.