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

raeburn raeburn at source.lon-capa.org
Thu May 26 11:41:38 EDT 2022


raeburn		Thu May 26 15:41:38 2022 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - Bug 6907
    Stop deep-linked items escaping iframe context if deep-linked, and deeplink
    parameter inludes "Embedded " flag.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.516 loncom/interface/lonmenu.pm:1.517
--- loncom/interface/lonmenu.pm:1.516	Tue May 24 16:23:03 2022
+++ loncom/interface/lonmenu.pm	Thu May 26 15:41:38 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.516 2022/05/24 16:23:03 raeburn Exp $
+# $Id: lonmenu.pm,v 1.517 2022/05/26 15:41:38 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -234,7 +234,7 @@
     if ($ltitarget eq 'iframe') {
         $target ='';
     } elsif ($deeplinktarget eq '_self') {
-        $target = $deeplinktarget;
+        $target = ' target="'.$deeplinktarget.'"';
     }
     return ($listclass?'<li class="'.$listclass.'">':'<li>').'<a'
            # highlighting for new messages
@@ -2368,7 +2368,8 @@
        currentSymb= null;
        var lcHostname = setLCHost();
        var ltitarget = '$ltitarget';
-       if (ltitarget == 'iframe') {
+       var deeplinktarget = '$deeplinktarget';
+       if ((ltitarget == 'iframe') || (deeplinktarget == '_self')) {
            document.location.href=lcHostname+url;
        } else {
            top.location.href=lcHostname+url;




More information about the LON-CAPA-cvs mailing list