[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm mydesk.tab

raeburn raeburn@source.lon-capa.org
Thu, 29 Oct 2009 16:15:57 -0000


raeburn		Thu Oct 29 16:15:57 2009 EDT

  Modified files:              
    /loncom/interface	mydesk.tab lonmenu.pm 
  Log:
  - Links should escape frame (needed for current implementation of CSTR). 
  
  
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.120 loncom/interface/mydesk.tab:1.121
--- loncom/interface/mydesk.tab:1.120	Tue Oct 27 13:51:27 2009
+++ loncom/interface/mydesk.tab	Thu Oct 29 16:15:57 2009
@@ -15,14 +15,14 @@
 #   - roles: show Roles instead of Courses
 #   - courses: show Courses instead of Roles
 # prim:link:icon:alt:text:condition
-prim:go('/adm/about.html'):/adm/lonIcons/minilogo.gif:LON-CAPA Logo:About:public
-prim:go('/adm/communicate'):::Message:nonewmsg
-prim:go('/adm/communicate'):::Message (new):newmsg
-prim:go('/adm/roles'):::Roles:roles
-prim:go('/adm/roles'):::Courses:courses
-prim:go('/adm/roles'):::Log In:onlypublic
+prim:gotop('/adm/about.html'):/adm/lonIcons/minilogo.gif:LON-CAPA Logo:About:public
+prim:gotop('/adm/communicate'):::Message:nonewmsg
+prim:gotop('/adm/communicate'):::Message (new):newmsg
+prim:gotop('/adm/roles'):::Roles:roles
+prim:gotop('/adm/roles'):::Courses:courses
+prim:gotop('/adm/roles'):::Log In:onlypublic
 prim::::Help:
-prim:go('/adm/logout'):::Logout:
+prim:gotop('/adm/logout'):::Logout:
 
 # secondary menu links
 # Apache::lonmenu::secondary_menu() generates a menu from these elements
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.296 loncom/interface/lonmenu.pm:1.297
--- loncom/interface/lonmenu.pm:1.296	Wed Oct 28 09:01:59 2009
+++ loncom/interface/lonmenu.pm	Thu Oct 29 16:15:57 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.296 2009/10/28 09:01:59 droeschl Exp $
+# $Id: lonmenu.pm,v 1.297 2009/10/29 16:15:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -150,7 +150,7 @@
     } else {             # textual Link
         $link = &mt($$menuitem[3]);
     }
-    return '<li><a href="'.$$menuitem[0].'">'.$link.'</a></li>';
+    return '<li><a href="'.$$menuitem[0].'" target="_top">'.$link.'</a></li>';
 }
 
 # primary_menu() evaluates @primary_menu and returns XHTML for the menu
@@ -1604,6 +1604,12 @@
    }
 }
 
+function gotop(url) {
+    if (url!='' && url!= null) {
+        top.location.href = url;
+    }
+}
+
 function gopost(url,postdata) {
    if (url!='') {
       this.document.server.action=url;