[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface lonmenu.pm

raeburn raeburn@source.lon-capa.org
Thu, 02 Dec 2010 16:44:09 -0000


raeburn		Thu Dec  2 16:44:09 2010 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	lonmenu.pm 
  Log:
  - Customization for GCI_3
    - Backport just two changes from 1.316.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.309.2.20 loncom/interface/lonmenu.pm:1.309.2.21
--- loncom/interface/lonmenu.pm:1.309.2.20	Thu Dec  2 13:07:08 2010
+++ loncom/interface/lonmenu.pm	Thu Dec  2 16:44:09 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.309.2.20 2010/12/02 13:07:08 raeburn Exp $
+# $Id: lonmenu.pm,v 1.309.2.21 2010/12/02 16:44:09 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -151,10 +151,10 @@
     } else {             # textual Link
         $link = &mt($$menuitem[3]);
     }
-    if($$menuitem[4] eq 'newmsg'){   #special style for New Messages
-        return '<li><a href="'.$$menuitem[0].'"><span class="LC_new_message">'.$link.'</span></a></li>';
-    }
-    return '<li><a href="'.$$menuitem[0].'">'.$link.'</a></li>';
+    return '<li><a' 
+           # highlighting for new messages
+           . ( $$menuitem[4] eq 'newmsg' ? ' class="LC_new_message"' : '') 
+           . qq| href="$$menuitem[0]" target="_top">$link</a></li>|;
 }
 
 # primary_menu() evaluates @primary_menu and returns XHTML for the menu
@@ -217,9 +217,7 @@
                 $menu .= '<li>'.&Apache::loncommon::top_nav_help('Help').'</li>';
             }
         } else {
-            my @items = @{$menuitem};
-            $items[0] = 'javascript:'.$menuitem->[0].';';
-            $menu .= &prep_menuitem(\@items);
+            $menu .= &prep_menuitem($menuitem);
         }
     }
 
@@ -1986,12 +1984,6 @@
    }
 }
 
-function gotop(url) {
-    if (url!='' && url!= null) {
-        top.location.href = url;
-    }
-}
-
 function gopost(url,postdata) {
    if (url!='') {
       this.document.server.action=url;