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

raeburn raeburn at source.lon-capa.org
Sat Aug 13 17:14:50 EDT 2016


raeburn		Sat Aug 13 21:14:50 2016 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmenu.pm 
  Log:
  - For 2.11
    - Backport 1.447
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.56 loncom/interface/lonmenu.pm:1.369.2.57
--- loncom/interface/lonmenu.pm:1.369.2.56	Wed Aug 10 04:10:03 2016
+++ loncom/interface/lonmenu.pm	Sat Aug 13 21:14:50 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.369.2.56 2016/08/10 04:10:03 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.57 2016/08/13 21:14:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -124,9 +124,14 @@
 (no hover psuedo class) via LC_hoverable class for <li> tag for top-
 level item, which employs jQuery to handle behavior on mouseover.
 
-Inputs: 4 - (a) link and (b) target for anchor href in top level item,
+Inputs: 6 - (a) link and (b) target for anchor href in top level item,
             (c) title for text wrapped by anchor tag in top level item.
             (d) reference to array of arrays of sub-menu items.
+            (e) boolean to indicate whether to call &mt() to translate
+                name of menu item,
+            (f) optional class for <li> element in primary menu, for which
+                sub menu is being generated.
+
 
 =item innerregister()
 
@@ -525,7 +530,7 @@
 }
 
 sub create_submenu {
-    my ($link,$target,$title,$submenu,$translate) = @_;
+    my ($link,$target,$title,$submenu,$translate,$addclass) = @_;
     return unless (ref($submenu) eq 'ARRAY');
     my $disptarget;
     if ($target ne '') {
@@ -541,7 +546,7 @@
     } else {
         $name = &mt($title);
     }
-    my $menu = '<li class="LC_hoverable">'.
+    my $menu = '<li class="LC_hoverable '.$addclass.'">'.
                '<a href="'.$link.'"'.$disptarget.'>'.
                '<span class="LC_nobreak">'.$name.
                '<span class="LC_fontsize_small" style="font-weight:normal;">'.




More information about the LON-CAPA-cvs mailing list