Diff for /loncom/interface/loncommon.pm between versions 1.1434 and 1.1443

version 1.1434, 2024/09/03 03:36:29 version 1.1443, 2024/10/13 22:14:58
Line 6877  sub bodytag { Line 6877  sub bodytag {
     my $hostname = $args->{'hostname'};      my $hostname = $args->{'hostname'};
   
     $function = &get_users_function() if (!$function);      $function = &get_users_function() if (!$function);
     my $img =    &designparm($function.'.img',$domain);  
     my $font =   &designparm($function.'.font',$domain);      my $font =   &designparm($function.'.font',$domain);
     my $pgbg   = $bgcolor || &designparm($function.'.pgbg',$domain);      my $pgbg   = $bgcolor || &designparm($function.'.pgbg',$domain);
   
Line 7000  sub bodytag { Line 6999  sub bodytag {
         #        $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls          #        $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls
         #    }          #    }
   
         $bodytag .= Apache::lonhtmlcommon::scripttag(          my $need_endlcint;
             Apache::lonmenu::utilityfunctions($httphost), 'start');          unless ($args->{'switchserver'}) {
               $bodytag .= Apache::lonhtmlcommon::scripttag(
                   Apache::lonmenu::utilityfunctions($httphost), 'start');
               $need_endlcint = 1;
           }
   
         my $collapsible;          my $collapsible;
         if ($args->{'collapsible_header'} ne '') {          if ($args->{'collapsible_header'} ne '') {
Line 7037  END Line 7040  END
                 }                  }
                 $bodytag .= qq|<div id="LC_nav_bar">$left $role<br />                  $bodytag .= qq|<div id="LC_nav_bar">$left $role<br />
                                <em>$realm</em> $dc_info</div>|;                                 <em>$realm</em> $dc_info</div>|;
                   if ($need_endlcint) {
                       $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
                   }
                 return $bodytag;                  return $bodytag;
             }              }
   
Line 7054  END Line 7060  END
   
         #if directed to not display the secondary menu, don't.            #if directed to not display the secondary menu, don't.  
         if ($args->{'no_secondary_menu'}) {          if ($args->{'no_secondary_menu'}) {
               if ($need_endlcint) {
                   $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
               }
             return $bodytag;              return $bodytag;
         }          }
         #don't show menus for public users          #don't show menus for public users
Line 7066  END Line 7075  END
                                                             $args->{'links_target'});                                                              $args->{'links_target'});
             }              }
             $bodytag .= Apache::lonmenu::serverform();              $bodytag .= Apache::lonmenu::serverform();
             $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');              if ($need_endlcint) {
                   $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
               }
             if ($env{'request.state'} eq 'construct') {              if ($env{'request.state'} eq 'construct') {
                 $bodytag .= &Apache::lonmenu::innerregister($forcereg,                  $bodytag .= &Apache::lonmenu::innerregister($forcereg,
                                 $args->{'bread_crumbs'},'','',$hostname,                                  $args->{'bread_crumbs'},'','',$hostname,
Line 7082  END Line 7093  END
                                                         $args->{'bread_crumbs'},                                                          $args->{'bread_crumbs'},
                                                         $advtoolsref,'',$hostname);                                                          $advtoolsref,'',$hostname);
             }              }
         }else{          } else {
             # this is to seperate menu from content when there's no secondary              # this is to separate menu from content when there's no secondary
             # menu. Especially needed for public accessible ressources.              # menu. Especially needed for publicly accessible resources.
             $bodytag .= '<hr style="clear:both" />';              $bodytag .= '<hr style="clear:both" />';
             $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');               if ($need_endlcint) {
                   $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
               }
         }          }
         if ($args->{'collapsible_header'} ne '') {          if ($args->{'collapsible_header'} ne '') {
             $bodytag .= $args->{'collapsible_header'}.              $bodytag .= $args->{'collapsible_header'}.
Line 7221  Inputs: (all optional) Line 7234  Inputs: (all optional)
 sub standard_css {  sub standard_css {
     my ($function,$domain,$bgcolor) = @_;      my ($function,$domain,$bgcolor) = @_;
     $function  = &get_users_function() if (!$function);      $function  = &get_users_function() if (!$function);
     my $img    = &designparm($function.'.img',   $domain);  
     my $tabbg  = &designparm($function.'.tabbg', $domain);      my $tabbg  = &designparm($function.'.tabbg', $domain);
     my $font   = &designparm($function.'.font',  $domain);      my $font   = &designparm($function.'.font',  $domain);
     my $fontmenu = &designparm($function.'.fontmenu', $domain);      my $fontmenu = &designparm($function.'.fontmenu', $domain);
Line 7274  body { Line 7286  body {
   line-height:130%;    line-height:130%;
   font-size:0.83em;    font-size:0.83em;
   color:$font;    color:$font;
     background-color: $pgbg_or_bgcolor;
 }  }
   
 a:focus,  a:focus,
Line 7285  form, .inline { Line 7298  form, .inline {
   display: inline;    display: inline;
 }  }
   
   .LC_visually_hidden:not(:focus):not(:active) {
       clip-path: inset(50%);
       height: 1px;
       overflow: hidden;
       position: absolute;
       white-space: nowrap;
       width: 1px;
       display: inline;
   }
   
 .LC_menus_content.shown{  .LC_menus_content.shown{
   display: block;    display: block;
 }  }
Line 9425  sub headtag { Line 9448  sub headtag {
         $inhibitprint = &print_suppression();          $inhibitprint = &print_suppression();
     }      }
   
     if (!$args->{'frameset'}) {      if (!$args->{'frameset'} && !$args->{'switchserver'}) {
  $result .= &Apache::lonhtmlcommon::htmlareaheaders();   $result .= &Apache::lonhtmlcommon::htmlareaheaders();
     }      }
     if ($args->{'force_register'} && $env{'request.noversionuri'} !~ m{^/res/adm/pages/}) {      if ($args->{'force_register'} && $env{'request.noversionuri'} !~ m{^/res/adm/pages/}) {
Line 9433  sub headtag { Line 9456  sub headtag {
     }      }
     if (!$args->{'no_nav_bar'}       if (!$args->{'no_nav_bar'} 
  && !$args->{'only_body'}   && !$args->{'only_body'}
  && !$args->{'frameset'}) {   && !$args->{'frameset'}
    && !$args->{'switchserver'}) {
  $result .= &help_menu_js($httphost);   $result .= &help_menu_js($httphost);
         $result.=&modal_window();          $result.=&modal_window();
         $result.=&togglebox_script();          $result.=&togglebox_script();
Line 9649  OFFLOAD Line 9673  OFFLOAD
     }      }
     if ($clientmobile) {      if ($clientmobile) {
         $result .= '          $result .= '
 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <meta name="apple-mobile-web-app-capable" content="yes" />';  <meta name="apple-mobile-web-app-capable" content="yes" />';
     }      }
     $result .= '<meta name="google" content="notranslate" />'."\n";      $result .= '<meta name="google" content="notranslate" />'."\n";
Line 9833  $args - additional optional args support Line 9857  $args - additional optional args support
              no_auto_mt_title -> prevent &mt()ing the title arg               no_auto_mt_title -> prevent &mt()ing the title arg
              bread_crumbs ->             Array containing breadcrumbs               bread_crumbs ->             Array containing breadcrumbs
              bread_crumbs_component ->  if exists show it as headline else show only the 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               bread_crumbs_nomenu -> if true will pass false as the value of $menulink
                                     to lonhtmlcommon::breadcrumbs                                      to lonhtmlcommon::breadcrumbs
              group          -> includes the current group, if page is for a                group          -> includes the current group, if page is for a 
Line 10001  sub start_page { Line 10030  sub start_page {
                 }                  }
  #if bread_crumbs_component exists show it as headline else show only the breadcrumbs   #if bread_crumbs_component exists show it as headline else show only the breadcrumbs
  if(exists($args->{'bread_crumbs_component'})){   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 {                  } else {
  $result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink);   $result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink,'',
                                                                          $args->{'bread_crumbs_style'});
  }   }
         }          }
     }      }

Removed from v.1.1434  
changed lines
  Added in v.1.1443


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>