[LON-CAPA-cvs] cvs: rat /client ratcode.js

droeschl droeschl@source.lon-capa.org
Mon, 23 Mar 2009 22:25:19 -0000


droeschl		Mon Mar 23 22:25:19 2009 EDT

  Modified files:              
    /rat/client	ratcode.js 
  Log:
  Set a fixed width of 20 for resource icons. That fixes a rendering issue that emerged from changing the mime type icons.
  
  
Index: rat/client/ratcode.js
diff -u rat/client/ratcode.js:1.7 rat/client/ratcode.js:1.8
--- rat/client/ratcode.js:1.7	Thu Jul 12 19:54:40 2007
+++ rat/client/ratcode.js	Mon Mar 23 22:25:19 2009
@@ -1,7 +1,7 @@
 <!--
 The LearningOnline Network
 Resource Assembly Tool
-// $Id: ratcode.js,v 1.7 2007/07/12 19:54:40 albertel Exp $
+// $Id: ratcode.js,v 1.8 2009/03/23 22:25:19 droeschl Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -1004,9 +1004,9 @@
         if ((mime!='') && (ext!='true')) {
            parent.mapout.document.write
            ('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+
-           url+'.meta"><img border=0 src="'+iconpath+
+           url+'.meta"><img border=0 width=20 src="'+iconpath+
            'meta.gif"><a target="preview" href="'+url+
-           '"><img border=0 src="'+iconpath+mime+'.gif">'+
+           '"><img border=0 width=20 src="'+iconpath+mime+'.gif">'+
            '<img border=0 src="'+raticons+'right.gif">');
         } else {
            parent.mapout.document.write
@@ -1044,9 +1044,9 @@
         if ((mime!='') && (ext!='true')) {
            parent.mapout.document.write
            ('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+
-           url+'.meta"><img border=0 src="'+iconpath+
+           url+'.meta"><img border=0 width=20 src="'+iconpath+
            'meta.gif"><a target="preview" href="'+url+
-           '"><img border=0 src="'+iconpath+mime+'.gif">'+
+           '"><img border=0 width=20 src="'+iconpath+mime+'.gif">'+
            '<img border=0 src="'+raticons+'right.gif">');
         } else {
            parent.mapout.document.write
@@ -1080,9 +1080,9 @@
         if ((mime!='') && (ext!='true')) {
            parent.mapout.document.write
            ('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+
-           url+'.meta"><img border=0 src="'+iconpath+
+           url+'.meta"><img border=0 width=20 src="'+iconpath+
            'meta.gif"><a target="preview" href="'+url+
-           '"><img border=0 src="'+iconpath+mime+'.gif">'+
+           '"><img border=0 width=20 src="'+iconpath+mime+'.gif">'+
            '<img border=0 src="'+raticons+'right.gif">');
         } else {
            parent.mapout.document.write
@@ -1504,7 +1504,7 @@
         if (mime!='') {
            inf.document.write
            ('<br><a target="preview" align="right" href="'+url+
-           '"><img border=0 src="'+iconpath+mime+'.gif"></a>&nbsp;&nbsp;');
+           '"><img border=0 width=20 src="'+iconpath+mime+'.gif"></a>&nbsp;&nbsp;');
         }
        inf.document.write('<b>');
         if (data2[2]=='true') { inf.document.write('External '); }
@@ -2158,9 +2158,9 @@
         if ((mime!='') && (ext!='true')) {
            parent.mapout.document.write
            ('<a target="preview" align="right" href="'+url+'.meta'+
-           '"><img src="'+iconpath+'meta.gif"></a><p>'+
+           '"><img width=20 src="'+iconpath+'meta.gif"></a><p>'+
            '<a target="preview" align="right"href="'+url+
-           '"><img src="'+iconpath+mime+'.gif"></a><p>');
+           '"><img width=20 src="'+iconpath+mime+'.gif"></a><p>');
         }
          parent.mapout.document.write(
          '<b><a href="javascript:if (parent.code.linkmode!=0) { '
@@ -2376,9 +2376,9 @@
         if ((mime!='') && (ext!='true')) {
            parent.mapout.document.write
            ('<a target="preview" align="right" href="'+url+'.meta'+
-           '"><img src="'+iconpath+'meta.gif"></a><p>'+
+           '"><img width=20 src="'+iconpath+'meta.gif"></a><p>'+
            '<a target="preview" align="right"href="'+url+
-           '"><img src="'+iconpath+mime+'.gif"></a><p>');
+           '"><img width=20 src="'+iconpath+mime+'.gif"></a><p>');
         }        
       parent.mapout.document.write('<b>'+k+'</b></td><td bgcolor="'+ck+'">');
       data2=obj[i].split('&');