[LON-CAPA-cvs] cvs: rat / lonratedt.pm

www lon-capa-cvs@mail.lon-capa.org
Thu, 09 May 2002 21:59:33 -0000


www		Thu May  9 17:59:33 2002 EDT

  Modified files:              
    /rat	lonratedt.pm 
  Log:
  Steps towards Simple RAT
  
  
Index: rat/lonratedt.pm
diff -u rat/lonratedt.pm:1.5 rat/lonratedt.pm:1.6
--- rat/lonratedt.pm:1.5	Thu Nov 29 14:23:49 2001
+++ rat/lonratedt.pm	Thu May  9 17:59:33 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Edit Handler for RAT Maps
 #
-# $Id: lonratedt.pm,v 1.5 2001/11/29 19:23:49 www Exp $
+# $Id: lonratedt.pm,v 1.6 2002/05/09 21:59:33 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -61,11 +61,98 @@
    my ($r,$fn)=@_;
    $r->print(<<ENDSMPHEAD);
 <html>
+<head>
+<script>
+var srch;
+var srchflag=-1; // 1 means currently open
+                 // 0 means closed (but has been open)
+                 // -1 means never yet opened/defined
+var srchmode='';
+
+var idx;
+var idxflag=-1; // 1 means currently open
+                 // 0 means closed (but has been open)
+                 // -1 means never yet opened/defined
+var idxmode='';
+
+// ------------------------------------------------------ Clears indexer window
+function idxclear() {
+  idx.document.clear();
+}
+
+// ------------------------------------------------------- Clears search window
+function srchclear() {
+  srch.document.clear();
+}
+
+// ------------------------------------------------------ Closes indexer window
+function idxclose() {
+  if (idx && !idx.closed) {
+    idxflag=0;
+    idx.close();
+  }
+}
+
+// ------------------------------------------------------- Closes search window
+function srchclose() {
+  if (srch && !srch.closed) {
+    srchflag=0;
+    srch.close();
+  }
+}
+
+// -------------------------------------------------------- Open indexer window
+function idxopen(mode) {
+   var options="scrollbars=1,resizable=1,menubar=0";
+   idxmode=mode;
+   idxflag=1;
+   idx=open("/res/?launch=1&mode=simple&catalogmode="+mode,"idxout",options);
+   idx.focus();
+}
+
+// --------------------------------------------------------- Open search window
+function srchopen(mode) {
+   var options="scrollbars=1,resizable=1,menubar=0";
+   srchmode=mode;
+   srchflag=1;
+   srch=open("/adm/searchcat?launch=1&mode=simple&catalogmode="+mode,"srchout",options);
+   srch.focus();
+}
+// ----------------------------------------------------- launch indexer browser
+function groupsearch() {
+   srchcheck('groupsearch');
+}
+
+function groupimport() {
+   idxcheck('groupimport');
+}
+// ------------------------------------------------------- Do srch status check
+function srchcheck(mode) {
+   if (!srch || srch.closed || srchmode!=mode) {
+      srchopen(mode);
+   }
+   srch.focus();
+}
+
+// -------------------------------------------------------- Do idx status check
+function idxcheck(mode) {
+   if (!idx || idx.closed || idxmode!=mode) {
+      idxopen(mode);
+   }
+   idx.focus();
+}
+</script>
+</head>                 
 <body bgcolor='#FFFFFF'>
 <form method=post>
 <input type=submit name=forceadv 
-value="Advanced Map Editing - Resource Assembly Tool"><hr>
+value="Advanced Map Editing - Graphical Resource Assembly Tool"><hr>
+This is the future site of the great simple RAT
+<a href="javascript:groupsearch()">Group Search</a>
+<a href="javascript:groupimport()">Group Import</a>
+
 ENDSMPHEAD
+
     $r->print(
       '<input type=submit name=forcesmp value="Store"></form></body></html>');
 }