version 1.50, 2002/03/06 20:30:07
|
version 1.58, 2002/05/25 20:32:10
|
Line 118 var idxflag=-1; // 1 means currently ope
|
Line 118 var idxflag=-1; // 1 means currently ope
|
// -1 means never yet opened/defined |
// -1 means never yet opened/defined |
var idxmode=''; |
var idxmode=''; |
|
|
|
var copydx; |
|
var copydxflag=-1; // 1 means currently open |
|
// 0 means closed (but has been open) |
|
// -1 means never yet opened/defined |
|
var copydxmode=''; |
|
|
var parm; |
var parm; |
var parmflag=-1; // 1 means currently open |
var parmflag=-1; // 1 means currently open |
// 0 means closed (but has been open) |
// 0 means closed (but has been open) |
// -1 means never yet opened/defined |
// -1 means never yet opened/defined |
|
|
var iconpath='/adm/lonIcons/'; |
var iconpath='/adm/lonIcons/'; |
|
var raticons='/adm/rat/'; |
|
|
function testfunction() { |
function testfunction() { |
inf.document.forms.resinfo.elements.t.value="ABC"; |
inf.document.forms.resinfo.elements.t.value="ABC"; |
Line 970 function drawcell (rtype,ctype,what,cm,o
|
Line 977 function drawcell (rtype,ctype,what,cm,o
|
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
+' src="resource.gif">'); |
+' src="'+raticons+'resource.gif">'); |
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="left.gif"></a><a target="preview" href="'+ |
('<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 src="'+iconpath+ |
'meta.gif"><a target="preview" href="'+url+ |
'meta.gif"><a target="preview" href="'+url+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'<img border=0 src="right.gif">'); |
'<img border=0 src="'+raticons+'right.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="middle.gif">'); |
('<br><img border=0 src="'+raticons+'middle.gif">'); |
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="bottom.gif">'); |
('<br><img border=0 src="'+raticons+'bottom.gif">'); |
} else { |
} else { |
if (what=='c:') { |
if (what=='c:') { |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
+' src="condition.gif">'); |
+' src="'+raticons+'condition.gif">'); |
} else { |
} else { |
if (what=='rs:') { |
if (what=='rs:') { |
mime=''; |
mime=''; |
Line 1003 function drawcell (rtype,ctype,what,cm,o
|
Line 1010 function drawcell (rtype,ctype,what,cm,o
|
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
+' src="start.gif">'); |
+' src="'+raticons+'start.gif">'); |
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="left.gif"></a><a target="preview" href="'+ |
('<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 src="'+iconpath+ |
'meta.gif"><a target="preview" href="'+url+ |
'meta.gif"><a target="preview" href="'+url+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'<img border=0 src="right.gif">'); |
'<img border=0 src="'+raticons+'right.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="middle.gif">'); |
('<br><img border=0 src="'+raticons+'middle.gif">'); |
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="bottom.gif">'); |
('<br><img border=0 src="'+raticons+'bottom.gif">'); |
|
|
} else { |
} else { |
if (what=='rf:') { |
if (what=='rf:') { |
Line 1032 function drawcell (rtype,ctype,what,cm,o
|
Line 1039 function drawcell (rtype,ctype,what,cm,o
|
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
+' src="finish.gif">'); |
+' src="'+raticons+'finish.gif">'); |
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="left.gif"></a><a target="preview" href="'+ |
('<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 src="'+iconpath+ |
'meta.gif"><a target="preview" href="'+url+ |
'meta.gif"><a target="preview" href="'+url+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'<img border=0 src="right.gif">'); |
'<img border=0 src="'+raticons+'right.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="middle.gif">'); |
('<br><img border=0 src="'+raticons+'middle.gif">'); |
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="bottom.gif">'); |
('<br><img border=0 src="'+raticons+'bottom.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
+' src="'+rtype+'.'+ctype+'.'+what+'.gif">'); |
+' src="'+raticons+rtype+'.'+ctype+'.'+what+'.gif">'); |
} |
} |
} |
} |
} |
} |
Line 1070 function drawcell (rtype,ctype,what,cm,o
|
Line 1077 function drawcell (rtype,ctype,what,cm,o
|
parent.mapout.document.write |
parent.mapout.document.write |
( |
( |
'<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
'<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
+' src="'+rtype+'.'+ctype+'.empty.gif"></a>'); |
+' src="'+raticons+rtype+'.'+ctype+'.empty.gif"></a>'); |
} |
} |
parent.mapout.document.write('</td>'); |
parent.mapout.document.write('</td>'); |
} |
} |
Line 1421 function info(infostr) {
|
Line 1428 function info(infostr) {
|
inf.document.clear(); |
inf.document.clear(); |
inf.document.writeln( |
inf.document.writeln( |
'<html><body bgcolor="#FFFFFF">'+ |
'<html><body bgcolor="#FFFFFF">'+ |
'<table><tr><td width=32><img src="info.gif"></td><td bgcolor="#AAFFAA">'); |
'<table><tr><td width=32><img src="'+raticons+'info.gif"></td><td bgcolor="#AAFFAA">'); |
data1=infostr.split('&'); |
data1=infostr.split('&'); |
if (data1[0]=='c') { |
if (data1[0]=='c') { |
inf.document.write('<b>Condition ('); |
inf.document.write('<b>Condition ('); |
Line 1509 function escape(instring) {
|
Line 1516 function escape(instring) {
|
for (k=0;k<instring.length;k++) { |
for (k=0;k<instring.length;k++) { |
thischar=instring.charAt(k); |
thischar=instring.charAt(k); |
if (thischar==':') { thischar=':'; } |
if (thischar==':') { thischar=':'; } |
if (thischar=='"') { thischar='"'; } |
if (thischar=='"') { thischar='"'; }// " |
if (thischar=="'") { thischar='''; } |
if (thischar=="'") { thischar='''; } |
if (thischar==',') { thischar=','; } |
if (thischar==',') { thischar=','; } |
outstring+=thischar; |
outstring+=thischar; |
} |
} |
return outstring; |
return outstring; |
} |
} |
// There must be a way to get rid of the odd number of "s |
|
|
|
// -------------------------------------------------- Insert resource into link |
// -------------------------------------------------- Insert resource into link |
function insertreslink(infostr) { |
function insertreslink(infostr) { |
Line 1576 function idxclear() {
|
Line 1582 function idxclear() {
|
idx.document.clear(); |
idx.document.clear(); |
} |
} |
|
|
|
// --------------------------------------------------------- Clears copy window |
|
function copydxclear() { |
|
copydx.document.clear(); |
|
} |
// ------------------------------------------------------- Clears search window |
// ------------------------------------------------------- Clears search window |
function srchclear() { |
function srchclear() { |
srch.document.clear(); |
srch.document.clear(); |
Line 1594 function idxclose() {
|
Line 1604 function idxclose() {
|
} |
} |
} |
} |
|
|
|
// --------------------------------------------------------- Closes copy window |
|
function copydxclose() { |
|
if (copydx && !copydx.closed) { |
|
copydxflag=0; |
|
copydx.close(); |
|
} |
|
} |
|
|
// ------------------------------------------------------- Closes search window |
// ------------------------------------------------------- Closes search window |
function srchclose() { |
function srchclose() { |
if (srch && !srch.closed) { |
if (srch && !srch.closed) { |
Line 1618 function idxopen(mode) {
|
Line 1636 function idxopen(mode) {
|
idx=open("/res/?launch=1&mode=rat&catalogmode="+mode,"idxout",options); |
idx=open("/res/?launch=1&mode=rat&catalogmode="+mode,"idxout",options); |
idx.focus(); |
idx.focus(); |
} |
} |
|
// ------------------------------------------------- Open browser to select map |
|
var editbrowser; |
|
function openbrowser(formname,elementname,only,omit) { |
|
var url = '/res/?'; |
|
if (editbrowser == null) { |
|
url += 'launch=1&'; |
|
} |
|
url += 'catalogmode=interactive&'; |
|
url += 'mode=edit&'; |
|
url += 'form=' + formname + '&'; |
|
if (only != null) { |
|
url += 'only=' + only + '&'; |
|
} |
|
if (omit != null) { |
|
url += 'omit=' + omit + '&'; |
|
} |
|
url += 'element=' + elementname + ''; |
|
var title = 'Browser'; |
|
var options = 'scrollbars=1,resizable=1,menubar=0'; |
|
options += ',width=700,height=600'; |
|
editbrowser = copydx.open(url,title,options,'1'); |
|
editbrowser.focus(); |
|
} |
|
// ----------------------------------------------------------- Open copy window |
|
function copydxopen(mode) { |
|
var options="scrollbars=1,resizable=1,menubar=0"; |
|
copydxmode=mode; |
|
copydxflag=1; |
|
copydx=open("",'copydxout',options); |
|
copydx.document.clear(''); |
|
copydx.document.writeln( |
|
'<html><body bgcolor="#FFFFFF"><h1>Group Copy from Map</h1>'+ |
|
'<form name="mapload"><input type=text size=40 name=importmap>'+ |
|
'<input type=button onClick="javascript:opener.openbrowser'+ |
|
"('mapload','importmap','sequence,page','')"+ |
|
'" value="Browse"><input type=button value="Load Map" '+ |
|
'onClick="window.location=document.mapload.importmap.value+'+ |
|
"'?launch=1&forceselect=1'"+'"></form>'); |
|
|
|
copydx.document.writeln('</body></html>'); |
|
copydx.focus(); |
|
} |
|
|
// --------------------------------------------------------- Open search window |
// --------------------------------------------------------- Open search window |
function srchopen(mode) { |
function srchopen(mode) { |
Line 1649 function idxcheck(mode) {
|
Line 1709 function idxcheck(mode) {
|
idx.focus(); |
idx.focus(); |
} |
} |
|
|
|
// -------------------------------------------------------- Do idx status check |
|
function copydxcheck(mode) { |
|
if (!copydx || copydx.closed || copydxmode!=mode) { |
|
copydxopen(mode); |
|
} |
|
copydx.focus(); |
|
} |
|
|
// ---------------------------------------------------- Handles "click to edit" |
// ---------------------------------------------------- Handles "click to edit" |
function handler(infostr) { |
function handler(infostr) { |
var k; |
var k; |
Line 1658 function handler(infostr) {
|
Line 1726 function handler(infostr) {
|
inf.document.clear(); |
inf.document.clear(); |
inf.document.writeln( |
inf.document.writeln( |
'<html><body bgcolor="#FFFFFF">'+ |
'<html><body bgcolor="#FFFFFF">'+ |
'<table><tr><td width=32><img src="edit.gif"></td><td bgcolor="#AAFFAA">'); |
'<table><tr><td width=32><img src="'+raticons+'edit.gif"></td><td bgcolor="#AAFFAA">'); |
data1=infostr.split('&'); |
data1=infostr.split('&'); |
if (data1[0]=='c') { |
if (data1[0]=='c') { |
inf.document.writeln('<b>Condition</b><hr>'); |
inf.document.writeln('<b>Condition</b><hr>'); |
Line 1830 function empty(rid,k) {
|
Line 1898 function empty(rid,k) {
|
inf.document.clear(); |
inf.document.clear(); |
inf.document.writeln( |
inf.document.writeln( |
'<html><body bgcolor="#FFFFFF">'+ |
'<html><body bgcolor="#FFFFFF">'+ |
'<table><tr><td width=32><img src="edit.gif"></td><td bgcolor="#AAFFAA">'+ |
'<table><tr><td width=32><img src="'+raticons+'edit.gif"></td><td bgcolor="#AAFFAA">'+ |
'<b>Empty Field</b><hr>'); |
'<b>Empty Field</b><hr>'); |
|
|
inf.document.writeln('<br><a href="javascript:opener.newresource('+ |
inf.document.writeln('<br><a href="javascript:opener.newresource('+ |
Line 1967 function graphreset() {
|
Line 2035 function graphreset() {
|
|
|
objcont[0]=''; |
objcont[0]=''; |
objlinks[0]=''; |
objlinks[0]=''; |
if (((typeof(objcont[1])=="undefined")&&(typeof(objcont[2])=="undefined")) || |
|
((objcont[1]=='')&&(objcont[2]==''))) { |
|
objcont[1]='Start::false:start:res' |
|
objcont[2]='Finish::false:finish:res'; |
|
} |
|
graphdef='no'; |
graphdef='no'; |
|
|
} |
} |
Line 1985 function rescompare(a,b) {
|
Line 2049 function rescompare(a,b) {
|
for (k=1;k<data1.length;k++) { |
for (k=1;k<data1.length;k++) { |
if (data1[k]==data2[0]) { rvalue--; } |
if (data1[k]==data2[0]) { rvalue--; } |
} |
} |
for (k=1;k<data3.length;k++) { |
for (k=1;k<data2.length;k++) { |
if (data2[k]==data1[0]) { rvalue++; } |
if (data2[k]==data1[0]) { rvalue++; } |
} |
} |
if (rvalue==0) { rvalue=data2.length-data1.length; } |
if (rvalue==0) { rvalue=data2.length-data1.length; } |
Line 2519 function finishload() {
|
Line 2583 function finishload() {
|
for (k=1;k<=maxrow;k++) { |
for (k=1;k<=maxrow;k++) { |
if (typeof(rowcont[k])=="undefined") { rowcont[k]=''; } |
if (typeof(rowcont[k])=="undefined") { rowcont[k]=''; } |
} |
} |
|
} else { |
|
var hasstart=0; |
|
var hasfinish=0; |
|
for (k=0;k<objcont.length;k++) { |
|
if (typeof(objcont[k])!="undefined") { |
|
var objfunctype=(objcont[k].split(':'))[3]; |
|
if (objfunctype=='start') { hasstart=1; } |
|
if (objfunctype=='finish') { hasfinish=1; } |
|
} |
|
} |
|
if (!hasstart) { |
|
if ((typeof(objcont[1])=="undefined") || (objcont[1]=='')) { |
|
objcont[1]='Start::false:start:res'; |
|
} |
|
} |
|
if (!hasfinish) { |
|
if ((typeof(objcont[2])=="undefined") || (objcont[2]=='')) { |
|
objcont[2]='Finish::false:finish:res'; |
|
} |
|
} |
} |
} |
} |
} |
|
|
Line 2631 function groupimport() {
|
Line 2715 function groupimport() {
|
idxcheck('groupimport'); |
idxcheck('groupimport'); |
} |
} |
|
|
|
function groupcopy() { |
|
copydxcheck('groupsec'); |
|
} |
|
|
// -------------------------------------------------------------- Store changes |
// -------------------------------------------------------------- Store changes |
function storechange() { |
function storechange() { |
var k; |
var k; |
Line 2687 function leave() {
|
Line 2775 function leave() {
|
srchclose(); |
srchclose(); |
} |
} |
if (idx && !idx.closed) { |
if (idx && !idx.closed) { |
srchclose(); |
idxclose(); |
|
} |
|
if (copydx && !copydx.closed) { |
|
copydxclose(); |
} |
} |
} |
} |
|
|
Line 2707 function leave() {
|
Line 2798 function leave() {
|
<td bgcolor="#ffffcc"><a href="javascript:redo();"><b>R</b>edo</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:redo();"><b>R</b>edo</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:groupsearch();"><b>G</b>roup search</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:groupsearch();"><b>G</b>roup search</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:groupimport();"><b>G</b>roup import</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:groupimport();"><b>G</b>roup import</a> </td> |
<td bgcolor="#ffcccc"><a href="javascript:storechange();"><b>S</b>ave map</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:groupcopy();"><b>G</b>roup copy</a> </td> |
|
<td bgcolor="#ffffcc"><a href="javascript:graphdef='no';save();storechange();"><b>S</b>ave map</a> </td> |
|
<td bgcolor="#ccffcc"><a href="javascript:storechange();"><b>S</b>ave map and layout</a> </td> |
</tr></table> |
</tr></table> |
</td></tr></table> |
</td></tr></table> |
<script> |
<script> |