1 | Right got version 2.3 to work with an extra feature to show the full size image if you want it: |
---|
2 | |
---|
3 | Edit the file: editor/filemanager/browser/default/frmresourceslist.html |
---|
4 | |
---|
5 | First off paste the following code at the top, just within the |
---|
6 | <script type="text/javascript"> |
---|
7 | |
---|
8 | ###START PASTE### |
---|
9 | function h2oDisplayNormal(h2oObj,h2oID) { |
---|
10 | var h2oImgStart='<img src="'; |
---|
11 | var h2oImgEnd='" border="0" />'; |
---|
12 | var h2oMyOutput=document.getElementById("h2o_"+h2oID); |
---|
13 | h2oMyOutput.style.display="block"; |
---|
14 | h2oMyOutput.innerHTML=h2oImgStart+h2oObj+h2oImgEnd; |
---|
15 | } |
---|
16 | function h2oDisplayNone(h2oObj) { |
---|
17 | var h2oMyOutput=document.getElementById("h2o_"+h2oObj); |
---|
18 | h2oMyOutput.style.display="none"; |
---|
19 | h2oMyOutput.innerHTML=""; |
---|
20 | } |
---|
21 | ### END PASTE ### |
---|
22 | |
---|
23 | Then locate this line: |
---|
24 | |
---|
25 | oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize ) |
---|
26 | |
---|
27 | Comment out: |
---|
28 | |
---|
29 | /*return '<tr>' + |
---|
30 | '<td width="16">' + |
---|
31 | sLink + |
---|
32 | '<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' + |
---|
33 | '</td><td> ' + |
---|
34 | sLink + |
---|
35 | fileName + |
---|
36 | '</a>' + |
---|
37 | '</td><td align="right" nowrap> ' + |
---|
38 | fileSize + |
---|
39 | ' KB' + |
---|
40 | '</td></tr>' ;*/ |
---|
41 | |
---|
42 | Then paste the following: |
---|
43 | /*================================================== |
---|
44 | Modification to display thumb nails |
---|
45 | Modifed date: 20/07/2006 |
---|
46 | Modified by: http://www.h2odevelopments.co.uk |
---|
47 | ==================================================*/ |
---|
48 | var imgH="52"; |
---|
49 | var imgW="52"; |
---|
50 | var h2oOutput=""; |
---|
51 | h2oOutput='<tr><td width="16">'+sLink+'<img alt="'+sIcon+'" src="images/icons/'+sIcon+'.gif" width="16" height="16" border="0"/></a></td>'; |
---|
52 | h2oOutput+='<td nowarp colspan="2"> '+sLink; |
---|
53 | if(sIcon=="gif" || sIcon=="jpg" || sIcon=="png") { |
---|
54 | |
---|
55 | h2oOutput+=' ' + sLink + '<img src="'+fileUrl+'" alt="'+fileName+'" height="'+imgH+'" width="'+imgW+'" border="0"'; |
---|
56 | |
---|
57 | //=== Start of remove if you don't want to display full image on rollover |
---|
58 | var h2oFunc='h2oDisplayNormal(this.src,''+fileName+'')'; |
---|
59 | h2oOutput+=' onmouseover="'+h2oFunc+'"'; |
---|
60 | h2oOutput+=' onmouseout="h2oDisplayNone(''+fileName+'')"'; |
---|
61 | //=== End of remove if you don't want to display full image on rollover |
---|
62 | |
---|
63 | h2oOutput+=' /></a> ('+fileName+')'; |
---|
64 | h2oOutput+='<div id="h2o_'+fileName+'" style="display: none; border: 1px solid #ccc;padding: 2px;"></div>'; |
---|
65 | |
---|
66 | } else { |
---|
67 | h2oOutput+= ' ' + sLink + fileName + '</a>'; |
---|
68 | } |
---|
69 | h2oOutput+='</td><td align="right" nowrap> ' +fileSize+' KB</td></tr>'; |
---|
70 | return h2oOutput; |
---|
71 | /*================================================== |
---|
72 | End of modifications |
---|
73 | ==================================================*/ |
---|