Ignore:
Timestamp:
2007-03-12T16:27:18+13:00 (15 years ago)
Author:
kjdon
Message:

document.dm added flash plugin for veronica's turning the pages thing, pref.dm added a switch in preferences to display docs using this plugin

File:
1 edited

Legend:

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

    r13534 r13971  
    189189_collagecaption_
    190190</center>
    191 
    192 }
    193 
     191}
     192
     193
     194_flashbook_ {
     195 <div id="bookdiv">
     196 </div>
     197
     198 <script type="text/javascript">
     199 //get the height and width of the window
     200 var myWidth = 0, myHeight = 0;
     201 if (typeof(window.innerWidth) == 'number')
     202 \{
     203    //Non-IE
     204    myWidth = window.innerWidth;
     205    myHeight = window.innerHeight;
     206 \}
     207 else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
     208 \{
     209    //IE 6+ in 'standards compliant mode'
     210    myWidth = document.documentElement.clientWidth;
     211    myHeight = document.documentElement.clientHeight;
     212 \}
     213 else if(document.body && (document.body.clientWidth || document.body.clientHeight))
     214 \{
     215    //IE 4 compatible
     216    myWidth = document.body.clientWidth;
     217    myHeight = document.body.clientHeight;
     218 \}
     219 
     220 var img_cover = '_httpcollimg_/_thisOID_/cover.jpg';
     221 var doc_url = document.URL;
     222 doc_url = doc_url.replace(/(&|\\?)book=[a-z]+/gi,'');
     223 doc_url += '&book=flashxml';
     224
     225 var flash_plug_html = "";
     226 flash_plug_html += '<OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \\n';
     227 flash_plug_html += '  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \\n';
     228 flash_plug_html += '  height="';
     229 flash_plug_html += myHeight + '" id="Book" swLiveConnect="true" \\n';
     230 flash_plug_html += '  width="';
     231 flash_plug_html += myWidth + '">\\n';
     232
     233 flash_plug_html += '    <PARAM name="allowScriptAccess" value="always" />\\n';
     234 flash_plug_html += '    <PARAM name="movie" value="_httpimg_/Book.swf';
     235 flash_plug_html += '?src_image=' + escape(img_cover);
     236 flash_plug_html += '&doc_url=' + escape(doc_url);
     237 flash_plug_html += '" />\\n';
     238 flash_plug_html += '    <PARAM name="quality" value="high" />\\n';
     239 flash_plug_html += '    <PARAM name="bgcolor" value="#FFFFFF" />\\n';
     240 flash_plug_html += '    <EMBED align="middle" \\n';
     241 flash_plug_html += '      allowScriptAccess="always" swLiveConnect="true" \\n';
     242 flash_plug_html += '      bgcolor="#FFFFFF" height="';
     243 flash_plug_html += myHeight + '" name="Book" \\n';
     244 flash_plug_html += '      pluginspage="http://www.macromedia.com/go/getflashplayer" \\n';
     245 flash_plug_html += '      quality="high" \\n';
     246 flash_plug_html += '      src="_httpimg_/Book.swf';
     247 flash_plug_html += '?src_image=' + escape(img_cover);
     248 flash_plug_html += '&amp;doc_url=' + escape(doc_url);
     249 flash_plug_html += '"\\n';
     250 flash_plug_html += '      type="application/x-shockwave-flash" width="';
     251 flash_plug_html += myWidth + '" />\\n';
     252 flash_plug_html += '</OBJECT>\\n';
     253
     254 var flash_div = document.getElementById("bookdiv");
     255 flash_div.innerHTML = flash_plug_html;
     256 </script>
     257}
    194258
    195259#######################################################################
Note: See TracChangeset for help on using the changeset viewer.