[pLog-svn] r1525 - plog/trunk/js/htmlarea
mark at devel.plogworld.net
mark at devel.plogworld.net
Wed Mar 16 10:14:01 GMT 2005
Author: mark
Date: 2005-03-16 10:14:01 +0000 (Wed, 16 Mar 2005)
New Revision: 1525
Modified:
plog/trunk/js/htmlarea/htmlarea-plog-resourcelist.js
Log:
Add insert med-size resource function to htmlarea-plog-resourcelist.js
Modified: plog/trunk/js/htmlarea/htmlarea-plog-resourcelist.js
===================================================================
--- plog/trunk/js/htmlarea/htmlarea-plog-resourcelist.js 2005-03-16 09:55:20 UTC (rev 1524)
+++ plog/trunk/js/htmlarea/htmlarea-plog-resourcelist.js 2005-03-16 10:14:01 UTC (rev 1525)
@@ -1,9 +1,12 @@
function _generateBaseLink( dest, blogId, type, resourceName, resourceDesc, preview )
{
if( type == 2 ) {
- if( preview ) {
+ if( preview == 1 ) {
htmlCode = plogBaseUrl+'/resserver.php?blogId='+blogId+'&resource='+encodeURIComponent(resourceName)+'&mode=preview';
- }
+ }
+ else if( preview == 2) {
+ htmlCode = plogBaseUrl+'/resserver.php?blogId='+blogId+'&resource='+encodeURIComponent(resourceName)+'&mode=medium';
+ }
else {
htmlCode = plogBaseUrl+'/resserver.php?blogId='+blogId+'&resource='+encodeURIComponent(resourceName);
}
@@ -23,11 +26,16 @@
// if the resource is an image, check the second parameter to see wether we'd like
// to show the preview with a link to the real size image or the real image
// inlined with the text
- if( preview ) {
+ if( preview == 1 ) {
htmlCode = '<a href="'+plogBaseUrl+'/resserver.php?blogId='+blogId+'&resource='+encodeURIComponent(resourceName)+'">';
htmlCode += '<img style="margin: 5px;" border="0" alt="'+resourceDesc+'" src="'+plogBaseUrl+'/resserver.php?blogId='+blogId+'&resource='+encodeURIComponent(resourceName)+'&mode=preview" />';
htmlCode += '</a>';
- }
+ }
+ else if ( preview == 2 ) {
+ htmlCode = '<a href="'+plogBaseUrl+'/resserver.php?blogId='+blogId+'&resource='+encodeURIComponent(resourceName)+'">';
+ htmlCode += '<img style="margin: 5px;" border="0" alt="'+resourceDesc+'" src="'+plogBaseUrl+'/resserver.php?blogId='+blogId+'&resource='+encodeURIComponent(resourceName)+'&mode=medium" />';
+ htmlCode += '</a>';
+ }
else {
htmlCode = '<img style="margin: 5px;" alt="'+resourceDesc+'" src="'+plogBaseUrl+'/resserver.php?blogId='+blogId+'&resource='+encodeURIComponent(resourceName)+'" />';
}
More information about the pLog-svn
mailing list