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

raeburn raeburn@source.lon-capa.org
Fri, 07 Jan 2011 21:32:53 -0000


raeburn		Fri Jan  7 21:32:53 2011 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/interface	lonmenu.pm 
  Log:
  - Backport 1.325 (part) and 1.316 (a very small part thereof).
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.315.2.6 loncom/interface/lonmenu.pm:1.315.2.7
--- loncom/interface/lonmenu.pm:1.315.2.6	Thu Dec 30 21:36:50 2010
+++ loncom/interface/lonmenu.pm	Fri Jan  7 21:32:52 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.315.2.6 2010/12/30 21:36:50 raeburn Exp $
+# $Id: lonmenu.pm,v 1.315.2.7 2011/01/07 21:32:52 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -205,10 +205,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
@@ -1663,12 +1663,6 @@
    }
 }
 
-function gotop(url) {
-    if (url!='' && url!= null) {
-        top.location.href = url;
-    }
-}
-
 function need_switchserver(url) {
     if (url!='' && url!= null) {
         if (confirm("$confirm_switch")) {