--- rat/client/Attic/code.html 2001/06/26 20:42:18 1.37 +++ rat/client/Attic/code.html 2001/06/27 19:19:06 1.38 @@ -15,7 +15,7 @@ March/April 01 Scott Harrison 04/20 Gerd Kortemeyer 04/30 Scott Harrison 05/31 Scott Harrison -06/11,06/25 Gerd Kortemeyer +06/11,06/25,06/27 Gerd Kortemeyer --> @@ -93,6 +93,8 @@ var parm; var parmflag=-1; // 1 means currently open // 0 means closed (but has been open) // -1 means never yet opened/defined + +var iconpath='/adm/lonIcons/'; function testfunction() { inf.document.forms.resinfo.elements.t.value="ABC"; @@ -937,20 +939,38 @@ function delres (obj1,recon) { function drawcell (rtype,ctype,what,cm,obj1,ej,ek,ne) { var bgcolor; + var url=''; + var urlparts=new Array; + var mimetype; + var objref; + if ((what=='') && (ne==0)) { cm="#DDDDDD"; } if (ctype!=0) { parent.mapout.document.write(''); if ((what!='') && (what!=undefined)) { if ((obj1!='') && (obj1!=undefined)) { - obj1="'"+obj1+"'"; + objref="'"+obj1+"'"; parent.mapout.document.write - (''); + (''); } if (what=='r:') { + mime=''; + if (objcont[obj1]!=undefined) { + urlparts=objcont[obj1].split(':'); + url=urlparts[1]; + urlparts=url.split('.',$url); + mime=urlparts[urlparts.length-1]; + if (mime==undefined) { mime=''; } + } parent.mapout.document.write - (''); + if (mime!='') { + parent.mapout.document.write + ('
'); + } } else { if (what=='c:') { parent.mapout.document.write @@ -1340,6 +1360,9 @@ function infcheck() { // --------------------------------------------------- Prints out resource info function info(infostr) { + var mime=''; + var urlparts=new Array; + var url=''; if ((editmode!=1) && (infostr!=lastinfo)) { notclear=1; infcheck(); @@ -1370,7 +1393,16 @@ function info(infostr) { } else { if (data1[0]=='r') { data2=objcont[data1[1]].split(':'); - inf.document.write(''); + url=data2[1]; + urlparts=url.split('.'); + mime=urlparts[urlparts.length-1]; + if (mime==undefined) { mime=''; } + if (mime!='') { + inf.document.write + ('
'); + } + inf.document.write(''); if (data2[2]=='true') { inf.document.write('External '); } if (data2[3]=='start') { inf.document.writeln('Start'); @@ -1669,7 +1701,6 @@ function handler(infostr) { '
'); - if ((data2[3]!='start') && (data2[3]!='finish')) { inf.document.write('' +'' - +''); + if ((data2[3]!='start') && (data2[3]!='finish')) { + inf.document.write(''); - } else { - inf.document.write( - ''); - } + } inf.document.writeln( '
Title:' +'
URL:' +'
External:' +'Browse ' +'Search
' + +'.srchcheck(\'interactive\')">Search
' +' Optional
' - +'
'); + url=data1[1]; + urlparts=url.split('.'); + mime=urlparts[urlparts.length-1]; + if (mime==undefined) { mime=''; } + if (mime!='') { + parent.mapout.document.write + ('

'); + } + parent.mapout.document.write( + ''); data2=obj[i].split('&'); parent.mapout.document.write(''); + if (data1[3]=='start') { parent.mapout.document.writeln(''); } @@ -1983,14 +2025,15 @@ function tabledraw() { ''); - if ((data1[3]!='start') && (data1[3]!='finish')) { parent.mapout.document.write( '' +'' - +''); + if ((data1[3]!='start') && (data1[3]!='finish')) { + parent.mapout.document.write( + ''); - } else { - parent.mapout.document.write( - ''); - } + } parent.mapout.document.write( '
Start
Title:
URL:
External:
Optional
' - +'
'+k+''); + parent.mapout.document.write('
'); + url=data1[1]; + urlparts=url.split('.'); + mime=urlparts[urlparts.length-1]; + if (mime==undefined) { mime=''; } + if (mime!='') { + parent.mapout.document.write + ('

'); + } + parent.mapout.document.write(''+k+'

'); data2=obj[i].split('&'); parent.mapout.document.write(''); + if (data1[3]=='start') { parent.mapout.document.writeln(''); }
Start