--- rat/client/Attic/code.html 2001/06/26 20:42:18 1.37 +++ rat/client/Attic/code.html 2001/07/04 18:19:53 1.40 @@ -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,06/28,06/29,07/04 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,50 @@ function delres (obj1,recon) { function drawcell (rtype,ctype,what,cm,obj1,ej,ek,ne) { var bgcolor; + var url=''; + var urlparts=new Array; + var mime; + var ext; + var objref; + var objnum; + 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=''; + objnum=(obj1.split('&'))[1]; + if (objcont[objnum]!=undefined) { + urlparts=objcont[objnum].split(':'); + url=urlparts[1]; + ext=urlparts[2]; + urlparts=url.split('.'); + mime=urlparts[urlparts.length-1]; + if (mime==undefined) { mime=''; } + } parent.mapout.document.write - (''); + if ((mime!='') && (ext!='true')) { + parent.mapout.document.write + ('
'+ + ''); + } else { + parent.mapout.document.write + ('
'); + } + parent.mapout.document.write + ('
'); } else { if (what=='c:') { parent.mapout.document.write @@ -958,14 +990,61 @@ function drawcell (rtype,ctype,what,cm,o +' src="condition.gif">'); } else { if (what=='rs:') { + mime=''; + objnum=(obj1.split('&'))[1]; + if (objcont[objnum]!=undefined) { + urlparts=objcont[objnum].split(':'); + url=urlparts[1]; + ext=urlparts[2]; + urlparts=url.split('.'); + mime=urlparts[urlparts.length-1]; + if (mime==undefined) { mime=''; } + } parent.mapout.document.write - (''); + if ((mime!='') && (ext!='true')) { + parent.mapout.document.write + ('
'+ + ''); + } else { + parent.mapout.document.write + ('
'); + } + parent.mapout.document.write + ('
'); + } else { if (what=='rf:') { + mime=''; + objnum=(obj1.split('&'))[1]; + if (objcont[objnum]!=undefined) { + urlparts=objcont[objnum].split(':'); + url=urlparts[1]; + ext=urlparts[2]; + urlparts=url.split('.'); + mime=urlparts[urlparts.length-1]; + if (mime==undefined) { mime=''; } + } parent.mapout.document.write - (''); + if ((mime!='') && (ext!='true')) { + parent.mapout.document.write + ('
'+ + ''); + } else { + parent.mapout.document.write + ('
'); + } + parent.mapout.document.write + ('
'); } else { parent.mapout.document.write (''); + url=data2[1]; + ext=data2[2]; + urlparts=url.split('.'); + mime=urlparts[urlparts.length-1]; + if (mime==undefined) { mime=''; } + if (ext=='true') { 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'); @@ -1626,7 +1720,7 @@ function handler(infostr) { } inf.document.writeln( 'opener.infoclear();opener.editmode=0;opener.draw(' - +');">Change to above values  ' + +');">Save Changes  ' +' Reset
' +''); @@ -1669,7 +1763,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
' - +'
' - +'Change to above values  ' + +'Save Changes  ' +' Reset' +'
'); if ((data2[3]!='start') && (data2[3]!='finish')) { @@ -1748,7 +1838,7 @@ function handler(infostr) { } inf.document.writeln( '
Done'); + +'opener.infoclear();">Cancel'); inf.document.writeln('
'); inf.document.close(); inf.focus(); @@ -1818,7 +1908,7 @@ function empty(rid,k) { inf.document.writeln( '
Done'); + +'opener.infoclear();">Cancel'); inf.document.writeln(''); inf.document.close(); inf.focus(); @@ -1946,6 +2036,9 @@ function tabledraw() { var ck; var cck; var condid; + var url=''; + var mime=''; + var urlparts=new Array; var sortstr=sortobjs(); insrestab(1,-1,-1,''); if ((sortstr!='') && (sortstr!=undefined)) { @@ -1964,8 +2057,20 @@ function tabledraw() { } data1=objcont[i].split(':'); ck=rescolor(data1[2],data1[3]); - 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( + '

'); data2=obj[i].split('&'); parent.mapout.document.write(''); + if (data1[3]=='start') { parent.mapout.document.writeln(''); } @@ -1983,14 +2089,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
' - +'
' - +'Change to above values  ' + +'Save Changes  ' +' Reset
'); if ((data1[3]!='start') && (data1[3]!='finish')) { @@ -2168,11 +2271,22 @@ function simpletabledraw() { } data1=objcont[i].split(':'); ck=rescolor(data1[2],data1[3]); - parent.mapout.document.write('
'+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(''); } @@ -2638,6 +2752,6 @@ function leave() { RedoGroup SearchGroup Import -Store +Save Map
Start