cover.html (2362B)
1 <!-- 2 /** 3 * Template to create a simple CD Cover 4 * @filename cover.html 5 * @$LastChangedDate: 2006-02-24 23:01:00 +0100 (Fri, 24 Feb 2006) $ 6 * @author Fabio Serra <faser@faser.net> 7 * @copyright Fabio Serra (The Initial Developer of the Original Code) 8 * @license Mozilla Public License Version 1.1 9 * 10 */ 11 --> 12 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 13 <html> 14 <head> 15 <title></title> 16 <link href="../../skin/cover_print.css" rel="stylesheet" type="text/css" media="print"> 17 <link href="../../skin/cover_screen.css" rel="stylesheet" type="text/css" media="screen"> 18 <script language="JavaScript" type="application/x-javascript"> 19 function makeCover() { 20 var op = window.opener; 21 var XMDManager = op.myDocOpened.getCurrentDocument(); 22 var index = op.myDisplayController.getSelectedRowIndex(); 23 var primaryKey = op.myDisplayController.getRowPrimaryKey(index); 24 25 cBuilder = new CoverBuilder(window.document,XMDManager); 26 cBuilder.populateTemplate(primaryKey); 27 } 28 29 function maximize() { 30 cBuilder.maximize(); 31 var elBtn = document.getElementById('btnResize'); 32 elBtn.setAttribute("onclick","resize()"); 33 } 34 35 function resize() { 36 cBuilder.setImgOriginalSize(); 37 var elBtn = document.getElementById('btnResize'); 38 elBtn.setAttribute("onclick","maximize()"); 39 } 40 41 function reload() { 42 43 if(cBuilder.img.src != "") { 44 cBuilder.loadImage(cBuilder.img.src); 45 } else { 46 alert("Image is missing"); 47 } 48 } 49 50 function writeFront() { 51 cBuilder.writeFront(); 52 } 53 </script> 54 <script src="../js/CoverBuilder.js" type="application/x-javascript"/> 55 </head> 56 <body onload="makeCover()"> 57 <table id="cover" class="cover" align="center"> 58 <tr> 59 <td align="center" valign="middle" class="front" id="front" width="50%"> 60 <img src="" name="img_cover" id="img_cover" border="0"> 61 </td> 62 <td id="back" valign="top" width="50%"> 63 <div id="title" class="title"></div> 64 <div id="artist" class="artist"></div> 65 <div id="track_list" class="track_list"></div> 66 </td> 67 </tr> 68 </table> 69 <div id="no_print"> 70 <div align="center"> 71 <input type="button" class="button" value="Resize Image" onclick="maximize()" id="btnResize"> 72 <input type="button" class="button" value="Load Image" onclick="reload()"> 73 <input type="button" class="button" value="Write Front" onclick="writeFront()"> 74 <input type="button" class="button" value="Print Cover" onclick="window.print()"> 75 </div> 76 </div> 77 </body> 78 </html>