[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm /interface loncommon.pm lonhtmlcommon.pm

raeburn raeburn at source.lon-capa.org
Tue Sep 17 09:06:50 EDT 2024


raeburn		Tue Sep 17 13:06:50 2024 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonhtmlcommon.pm 
    /loncom/auth	lonroles.pm 
  Log:
  - On Roles/Courses page for mobile users, div containing breadcrumbs needs 
    a style of "overflow: visible" to override CSS for #LC_breadcrumbs id,
    so all options in "Roles options" drop-down (activated on hover) are seen.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1436 loncom/interface/loncommon.pm:1.1437
--- loncom/interface/loncommon.pm:1.1436	Wed Sep 11 00:40:07 2024
+++ loncom/interface/loncommon.pm	Tue Sep 17 13:06:49 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1436 2024/09/11 00:40:07 raeburn Exp $
+# $Id: loncommon.pm,v 1.1437 2024/09/17 13:06:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -9834,6 +9834,11 @@
              no_auto_mt_title -> prevent &mt()ing the title arg
              bread_crumbs ->             Array containing breadcrumbs
              bread_crumbs_component ->  if exists show it as headline else show only the breadcrumbs
+             bread_crumbs_style -> breadcrumbs are contained within <div id="LC_breadcrumbs">,
+                                   and &standard_css() contains CSS for #LC_breadcrumbs, if you want
+                                   to override those values, or add to them, specify the value to
+                                   include in the style attribute to include in the div tag by using
+                                   bread_crumbs_style (e.g., overflow: visible)
              bread_crumbs_nomenu -> if true will pass false as the value of $menulink
                                     to lonhtmlcommon::breadcrumbs
              group          -> includes the current group, if page is for a 
@@ -10002,9 +10007,12 @@
                 }
 		#if bread_crumbs_component exists show it as headline else show only the breadcrumbs
 		if(exists($args->{'bread_crumbs_component'})){
-			$result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'},'',$menulink);
+			$result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'},
+                                                                       '',$menulink,'',
+                                                                       $args->{'bread_crumbs_style'});
                 } else {
-			$result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink);
+			$result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink,'',
+                                                                       $args->{'bread_crumbs_style'});
 		}
         }
     }
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.413 loncom/interface/lonhtmlcommon.pm:1.414
--- loncom/interface/lonhtmlcommon.pm:1.413	Mon Jun  3 20:41:06 2024
+++ loncom/interface/lonhtmlcommon.pm	Tue Sep 17 13:06:49 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.413 2024/06/03 20:41:06 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.414 2024/09/17 13:06:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1915,9 +1915,10 @@
 
 if 'nohelp' don't include the orange help link
 
-=item $css_class
+=item $crumbs_style
 
-optional name for the class to apply to the table for CSS
+optional style attribute for div containing breadcrumbs
+unless called from docs_breadcrumbs
 
 =item $no_mt 
 
@@ -1975,11 +1976,9 @@
     my %tools = ();
     
     sub breadcrumbs {
-        my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt, 
+        my ($component,$component_help,$menulink,$helplink,$crumbs_style,$no_mt, 
             $CourseBreadcrumbs,$topic_help,$topic_help_text,$links_target) = @_;
         #
-        $css_class ||= 'LC_breadcrumbs';
-
         # Make the faq and bug data cascade
         my $faq  = '';
         my $bug  = '';
@@ -2133,8 +2132,13 @@
         }
         if (($links ne '') || ($nav_and_tools)) {
             &render_tools(\$links);
-            $links = &htmltag('div', $links, 
-                              { id => "LC_breadcrumbs" }) unless ($CourseBreadcrumbs) ;
+            unless ($CourseBreadcrumbs) {
+                my $args = { id => 'LC_breadcrumbs' };
+                if ($crumbs_style ne '') {
+                    $args->{'style'} = $crumbs_style;
+                }
+                $links = &htmltag('div', $links, $args);
+            }
         }
         my $adv_tools = 0;
         if (ref($tools{'advtools'}) eq 'ARRAY') {
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.373 loncom/auth/lonroles.pm:1.374
--- loncom/auth/lonroles.pm:1.373	Wed Sep  4 20:49:39 2024
+++ loncom/auth/lonroles.pm	Tue Sep 17 13:06:49 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.373 2024/09/04 20:49:39 raeburn Exp $
+# $Id: lonroles.pm,v 1.374 2024/09/17 13:06:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1237,16 +1237,18 @@
         $start_page=&Apache::loncommon::start_page($pagetitle,undef,
                                                   {bread_crumbs=>$brcrum,crstype=>'Placement'});
     } else {
-        my $crumbsright;
+        my ($crumbsright,$crumbs_style);
         unless (($norolelist) && ((split(/:/,$env{'user.error.msg'}))[2])) {
             $funcs = &get_roles_functions($showcount,$cattype,$domdefs{'userapprovals'});
             if ($env{'browser.mobile'}) {
                 $crumbsright = $funcs;
                 undef($funcs);
+                $crumbs_style = 'overflow: visible;';
             }
         }
         $start_page=&Apache::loncommon::start_page($pagetitle,undef,{bread_crumbs=>$brcrum,
-                                                                     bread_crumbs_component=>$crumbsright});
+                                                                     bread_crumbs_component=>$crumbsright,
+                                                                     bread_crumbs_style=>$crumbs_style,});
     }
     &js_escape(\$standby);
     my $noscript='<br /><span class="LC_error">'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'<br />'.&mt('As this is not the case, most functionality in the system will be unavailable.').'</span><br />';




More information about the LON-CAPA-cvs mailing list