--- rat/client/Attic/code.html 2001/06/11 21:21:55 1.35 +++ 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 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(''); } @@ -1977,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(''); } @@ -2411,6 +2465,13 @@ function finishload() { if (data2[0]=='obj') { obj[data2[1]]=data2[2]; } if (data2[0]=='objcont') { objcont[data2[1]]=data2[2]; } if (data2[0]=='objlinks') { objlinks[data2[1]]=data2[2]; } + if (data2[0]=='objparms') { + if (objparms[data2[1]]==undefined) { + objparms[data2[1]]=data2[2]; + } else { + objparms[data2[1]]+=':'+data2[2]; + } + } if (data2[0]=='rowcont') { rowcont[data2[1]]=data2[2]; } if (data2[0]=='row') { row[data2[1]]=1*data2[2]; } if (data2[0]=='col') { col[data2[1]]=1*data2[2]; } @@ -2628,8 +2689,3 @@ function leave() { Store - - - - -
Start