v2.3B: In editor/filemanager/browser/default/frmresourceslist.html add the following on line 79 (sourceforge will probably mess up my post, but try to figure it out):
// Add the thumbnail cell. oCell = oRow.insertCell(-1) ; if (sIcon == 'gif' || sIcon == 'jpg') { oCell.innerHTML = ' ' + sLink + '<img src="' + fileUrl + '" height="40" border="0"></a>' ; } else { // No gif or jpg, don't show image , show big icon oCell.innerHTML = ' ' + sLink + '<img alt="" src="images/icons/32/' + sIcon + '.gif" width="32" height="32" border="0"></a>' ; }
Anyone know how to get the Config object from this function? In order to view thumbs, I need to get Config ['BaseHref'] because my images are located from the root of my app.
I was all set to try trekmp's code, but I can't find where to insert it in version 2.3. It looks like it's meant for 2.2 (because I can find the function to be modified on line 79 there). Will it really work in 2.3?
RE: Image preview
Amazing!
RE: Image preview
In editor/filemanager/browser/default/frmresourceslist.html
add the following on line 79 (sourceforge will probably mess up my post, but try to figure it out):
// Add the thumbnail cell.
oCell = oRow.insertCell(-1) ;
if (sIcon == 'gif' || sIcon == 'jpg') {
oCell.innerHTML = ' ' + sLink + '<img src="' + fileUrl + '" height="40" border="0"></a>' ;
} else { // No gif or jpg, don't show image , show big icon
oCell.innerHTML = ' ' + sLink + '<img alt="" src="images/icons/32/' + sIcon + '.gif" width="32" height="32" border="0"></a>' ;
}
RE: Image preview
No oRow is defined there.
RE: Image preview
RE: Image preview
if (sIcon == 'gif' || sIcon == 'jpg') {
return '<tr>' +
'<td width="16">' +
'<img src="' + fileUrl + '" width="50" border="0">' +
'</td><td> ' +
'<td width="16">' +
sLink +
'<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' +
'</td><td> ' +
sLink +
fileName +
'</a>' +
'</td><td align="right" nowrap> ' +
fileSize +
' KB' +
'</td></tr>' ;
} else { // No gif or jpg, don't show image , show space
return '<tr>' +
'<td width="16">' +
' ' +
'</td><td> ' +
'<td width="16">' +
sLink +
'<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' +
'</td><td> ' +
sLink +
fileName +
'</a>' +
'</td><td align="right" nowrap> ' +
fileSize +
' KB' +
'</td></tr>' ;
}
RE: Image preview
RE: Image preview
http://www.h2odevelopments.co.uk
RE: Image preview -- wrong version?
RE: Image preview
RE: Image preview
xml request error: Not Found (404)
I've got exactly the same config settings as the 2.2 version, any suggestions
RE: Image preview
oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize )
{
// Build the link to view the folder.
var sLink = '<a href="#" onclick="OpenFile(\'' + fileUrl.replace( /'/g, '\\\'') + '\');return false;">' ;
// Get the file icon.
var sIcon = oIcons.GetIcon( fileName ) ;
var sThumb = ' ' + sLink + '<img border="0" width="32" height="32" src="';
if (sIcon == 'gif' || sIcon == 'jpg') {
sThumb += fileUrl + '"></a>';
}
else {
sThumb += 'images/icons/32/' + sIcon + '.gif"></a>';
}
return '<tr>' +
'<td width="16">' +
// Add the thumbnail cell.
sThumb +
//'<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' +
'</td><td> ' +
sLink +
fileName +
'</a>' +
'</td><td align="right" nowrap> ' +
fileSize +
' KB' +
'</td></tr>' ;
// Add the thumbnail cell.
oCell = oRow.insertCell(-1) ;
if (sIcon == 'gif' || sIcon == 'jpg') {
oCell.innerHTML = ' ' + sLink + '<img src="' + fileUrl + '" height="40" border="0"></a>' ;
} else { // No gif or jpg, don't show image , show big icon
oCell.innerHTML = ' ' + sLink + '<img alt="" src="images/icons/32/' + sIcon + '.gif" width="32" height="32" border="0"></a>' ;
}
}
RE: Image preview
// Add the thumbnail cell.
oCell = oRow.insertCell(-1) ;
if (sIcon == 'gif' || sIcon == 'jpg') {
oCell.innerHTML = ' ' + sLink + '<img src="' + fileUrl + '" height="40" border="0"></a>' ;
} else { // No gif or jpg, don't show image , show big icon
oCell.innerHTML = ' ' + sLink + '<img alt="" src="images/icons/32/' + sIcon + '.gif" width="32" height="32" border="0"></a>' ;
}
RE: Image preview
http://www.h2odevelopments.co.uk