--- rat/lonratedt.pm	2007/01/16 21:10:55	1.87
+++ rat/lonratedt.pm	2008/10/13 11:54:54	1.90
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Edit Handler for RAT Maps
 #
-# $Id: lonratedt.pm,v 1.87 2007/01/16 21:10:55 albertel Exp $
+# $Id: lonratedt.pm,v 1.90 2008/10/13 11:54:54 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -274,7 +274,7 @@ function idxopen(mode) {
    var options="scrollbars=1,resizable=1,menubar=0,location=1,toolbar=1";
    idxmode=mode;
    idxflag=1;
-   idx=open('$resurl/?launch=1&mode=$mode&catalogmode='+mode,'idxout',options);
+   idx=open('$resurl/?inhibitmenu=yes&launch=1&mode=$mode&catalogmode='+mode,'idxout',options);
    idx.focus();
 }
 
@@ -282,7 +282,7 @@ function idxopen(mode) {
 function groupopen(url,recover,bookmarks) {
    var options="scrollbars=1,resizable=1,menubar=0";
    idxflag=1;
-   idx=open("/adm/groupsort?mode=$mode&recover="+recover+"&readfile="+url+"&bookmarks="+bookmarks,"idxout",options);
+   idx=open("/adm/groupsort?inhibitmenu=yes&mode=$mode&recover="+recover+"&readfile="+url+"&bookmarks="+bookmarks,"idxout",options);
    idx.focus();
 }
 
@@ -291,7 +291,7 @@ function srchopen(mode) {
    var options="scrollbars=1,resizable=1,menubar=0";
    srchmode=mode;
    srchflag=1;
-   srch=open("/adm/searchcat?launch=1&mode=$mode&catalogmode="+mode,"srchout",options);
+   srch=open("/adm/searchcat?inhibitmenu=yes&launch=1&mode=$mode&catalogmode="+mode,"srchout",options);
    srch.focus();
 }
 // ----------------------------------------------------- launch indexer browser
@@ -326,6 +326,7 @@ function idxcheck(mode) {
         if (editbrowser == null) {
             url += 'launch=1&';
         }
+        url += 'inhibitmenu=yes&';
         url += 'catalogmode=interactive&';
         url += 'mode=edit&';
         url += 'form=' + formname + '&';
@@ -359,7 +360,7 @@ sub smpedt {
        unless ($fatal) {
 	   $targetmsg='<b>'.&mt('Saved.').'</b><br />';
        } else {
-	   $targetmsg='<b>'.&mt('An error occured while saving.').'</b><br />';
+	   $targetmsg='<b>'.&mt('An error occurred while saving.').'</b><br />';
        }
    }
    if ($env{'form.revert'}) {
@@ -774,21 +775,29 @@ sub viewmap {
 	      &Apache::loncommon::help_open_menu('','',6,'RAT').
 	      &buttons($adv));
     if ($errtext) {
-	$r->print($errtext.'<hr />');
+	$r->print('<div class="LC_error">'
+                 .$errtext
+                 .'</div>'
+                 .'<hr />'
+        );
     }
     my $idx=0;
     $r->print('<h1>'.$url.'</h1>');
     if ($adv) {
-	$r->print('<p><b><font color="red">'.&mt('Map contents are not shown in order.').'</font></b></p><br />');
+	$r->print('<p class="LC_warning">'
+                 .&mt('Map contents are not shown in order.')
+                 .'</p><br />'
+        );
     }
-    $r->print( '<table border="0" cellspacing="2" cellpadding="4">'.
-               '<tr bgcolor="#DDDDDD"><th>'.&mt('Type').'</th>'.
-               '<th>'.&mt('Title in map').'</th>'.
-               '<th>'.&mt('Filename of resource').'</th>'.
-               '<th>'.&mt('Link to published resource').'</th>'.
-               '<th>'.&mt('Link to resource in Construction Space').'</th>'.
-               '</tr>');
-    my @backgroundColors = ("#FFFFFF", "#F6F6F6");
+    $r->print(&Apache::loncommon::start_data_table()
+             .&Apache::loncommon::start_data_table_header_row()
+             .'<th>'.&mt('Type').'</th>'
+             .'<th>'.&mt('Title in map').'</th>'
+             .'<th>'.&mt('Filename of resource').'</th>'
+             .'<th>'.&mt('Link to published resource').'</th>'
+             .'<th>'.&mt('Link to resource in Construction Space').'</th>'
+             .&Apache::loncommon::end_data_table_header_row()
+    );
     foreach (&LONCAPA::map::attemptread(&Apache::lonnet::filelocation('',$url))) {
 	if (defined($_)) {
             $idx++;
@@ -806,23 +815,34 @@ sub viewmap {
             }
             my $cstrurl = $resurl;
             $cstrurl =~ s#^/res/[^/]+/([^/]+)/#/priv/$1/#;
-            my $bgcol = $idx%2; 
-            $r->print('<tr bgcolor='.$backgroundColors[$bgcol].'><td>'.
-                      '<img src="'.&Apache::loncommon::icon($resfilepath).
-                      '" /></td><td>'.&HTML::Entities::encode(&LONCAPA::map::qtescape($title)).
-                      '</td><td>'.$filename.'</td><td>');
+            $r->print(&Apache::loncommon::start_data_table_row()
+                     .'<td>'
+                     .'<img src="'.&Apache::loncommon::icon($resfilepath).'" />'
+                     .'</td>'
+                     .'<td>'
+                     .&HTML::Entities::encode(&LONCAPA::map::qtescape($title))
+                     .'</td>'
+                     .'<td>'.$filename.'</td>'
+                     .'<td>'
+            );
             if ($url) {
 		$r->print('<a href="'.$resurl.'">'.&mt('Resource space').'</a>');
+            } else {
+                $r->print('&nbsp;');
             }
             $r->print('</td><td>');
             if ($url) {
                $r->print('<a href="'.$cstrurl.'">'.
                          &mt('Construction space').'</a>');
+            } else {
+                $r->print('&nbsp;');
             }
-            $r->print('</td></tr>'."\n");
+            $r->print('</td>'
+                     .&Apache::loncommon::end_data_table_row()
+            );
         }
     }
-    $r->print('</table>');
+    $r->print(&Apache::loncommon::end_data_table());
     $r->print(&Apache::loncommon::end_page());
 }