--- loncom/interface/loncommon.pm 2025/01/26 07:17:02 1.1447 +++ loncom/interface/loncommon.pm 2025/02/17 18:48:06 1.1456 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1447 2025/01/26 07:17:02 raeburn Exp $ +# $Id: loncommon.pm,v 1.1456 2025/02/17 18:48:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1174,7 +1174,8 @@ sub linked_select_forms { $menuorder, $onchangefirst, $onchangesecond, - $suffix + $suffix, + $haslabel ) = @_; my $second = "document.$formname.$secondselectname"; my $first = "document.$formname.$firstselectname"; @@ -1240,13 +1241,18 @@ END $result.=">".&mt($hashref->{$value}->{'text'})."\n"; } $result .= "\n"; + if ($haslabel) { + $result .= ''; + } my %select2; if (ref($hashref->{$firstdefault}) eq 'HASH') { if (ref($hashref->{$firstdefault}->{'select2'}) eq 'HASH') { %select2 = %{$hashref->{$firstdefault}->{'select2'}}; } } - $result .= $middletext; + if ($middletext ne '') { + $result .= ''.$middletext; + } $result .= "".&mt($select2{$value})."\n"; } $result .= "\n"; + if ($middletext ne '') { + $result .= ''; + } # return $debug; return $result; } # end of sub linked_select_forms { @@ -2300,7 +2309,7 @@ sub import_crsauthor_form { dire => 'Directory', se => 'Select', ); - $output = $lt{'dire'}.': '. + $output = ''.$lt{'dire'}.': '. ''. ''.$lt{'se'}.''; @@ -2311,10 +2320,10 @@ sub import_crsauthor_form { next if ($key eq '/'); $output .= ''.$key.''."\n"; } - $output .= ''."\n". + $output .= ''."\n". $lt{'fnam'}.': '."\n". ''."\n". - ''."\n". + ''."\n". ''; return ($numdirs,$output); } @@ -3066,7 +3075,7 @@ sub select_level_form { =pod -=item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled) +=item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled,$id) Returns a string containing a form to allow a user to select the domain to preform an operation in. @@ -3085,17 +3094,22 @@ The optional $excdoms is a reference to The optional $disabled argument, if true, adds the disabled attribute to the select tag. +The option $id argument is the value (if any) to set as the (unique) id attribute for the select tag. + =cut #------------------------------------------- sub select_dom_form { - my ($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled) = @_; + my ($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled,$id) = @_; if ($onchange) { $onchange = ' onchange="'.$onchange.'"'; } if ($disabled) { $disabled = ' disabled="disabled"'; } + if ($id ne '') { + $id = ' id="'.$id.'"'; + } my (@domains,%exclude); if (ref($incdoms) eq 'ARRAY') { @domains = sort {lc($a) cmp lc($b)} (@{$incdoms}); @@ -3106,7 +3120,7 @@ sub select_dom_form { if (ref($excdoms) eq 'ARRAY') { map { $exclude{$_} = 1; } @{$excdoms}; } - my $selectdomain = "\n"; + my $selectdomain = "\n"; foreach my $dom (@domains) { next if ($exclude{$dom}); $selectdomain.="{'coursetitle'}) { - $realm=' '; $showcrstitle = 0; } } @@ -6968,7 +6979,6 @@ sub bodytag { undef($role); } unless ($menuref->{'crs'}) { - $realm=' '; $showcrstitle = 0; } } @@ -7036,29 +7046,34 @@ END $args->{'links_disabled'}, $args->{'links_target'}, $collapsible); - + my $labeltext = &HTML::Entities::encode(&mt('Primary links')); if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { if ($dc_info) { $dc_info = qq|$dc_info|; } - $bodytag .= qq|$left $role - $realm $dc_info|; + $bodytag .= qq|$left $role|; + unless (($realm eq '') && ($dc_info eq '')) { + $bodytag .= qq|$realm $dc_info|; + } if ($need_endlcint) { $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); } return $bodytag; } + $bodytag .= ''; unless ($env{'request.symb'} =~ m/\.page___\d+___/) { $bodytag .= qq|$left $role|; } - $bodytag .= $right; + $bodytag .= $right.''; if ($dc_info) { $dc_info = &dc_courseid_toggle($dc_info); } - $bodytag .= qq|$realm $dc_info|; + unless (($realm eq '') && ($dc_info eq '')) { + $bodytag .= qq|$realm $dc_info|; + } } #if directed to not display the secondary menu, don't. @@ -7301,6 +7316,12 @@ form, .inline { display: inline; } +.LC_landmark { + margin: 0; + padding: 0; + border: none; +} + .LC_visually_hidden:not(:focus):not(:active) { clip-path: inset(50%); height: 1px; @@ -7311,6 +7332,10 @@ form, .inline { display: inline; } +.LC_heading_2 { + font-size: 1.17em; +} + .LC_menus_content.shown{ display: block; } @@ -7323,6 +7348,10 @@ form, .inline { text-align:right; } +.LC_center { + text-align:center; +} + .LC_middle { vertical-align:middle; } @@ -7975,29 +8004,58 @@ table#LC_helpmenu fieldset legend { font-size: larger; } -table#LC_helpmenu_links { - width: 100%; - border: 1px solid black; +.LC_helpdesk_headbox { + border: 2px groove threedface; + padding: 1em; +} + +h1.LC_helpdesk_legend { + float: left; + margin: -1.7em 0 0; + padding: 0 .5em; background: $pgbg; + font-size: 1em; + font-weight: bold; +} + +h1.LC_helpdesk_title { + display: inline; + font-size: 1em; + line-height: 2.5em; + margin: 0; padding: 0; - border-spacing: 1px; + vertical-align: bottom; } -table#LC_helpmenu_links tr td { - padding: 1px; +.LC_helpdesk_links { + border: 1px solid black; + padding: 3px; background: $tabbg; text-align: center; font-weight: bold; + display: inline; + margin-right: -6px; } -table#LC_helpmenu_links a:link, -table#LC_helpmenu_links a:visited, -table#LC_helpmenu_links a:active { +.LC_helpdesk_img, +.LC_helpdesk_text { + padding: 0; + margin: 0; + border: 0; + display: inline; +} + +.LC_helpdesk_img a:link, +.LC_helpdesk_img a:visited, +.LC_helpdesk_img a:active, +.LC_helpdesk_text a:link, +.LC_helpdesk_text a:visited, +.LC_helpdesk_text a:active { text-decoration: none; color: $font; } -table#LC_helpmenu_links a:hover { +div.LC_helpdesk_text a:hover { text-decoration: underline; color: $vlink; } @@ -8024,7 +8082,7 @@ table.LC_pick_box { border-spacing: 1px; } -table.LC_pick_box td.LC_pick_box_title { +table.LC_pick_box th.LC_pick_box_title { background: $sidebg; font-weight: bold; text-align: left; @@ -8235,6 +8293,21 @@ table.LC_prior_tries td { padding-right: 5px; } +.LC_mail_actions { + float: left; + padding: 0; + margin: 6px; +} + +.LC_vertical_line { + width: 1px; + background-color: black; + height: 4em; + float: left; + margin: 0; + padding: 0; +} + span.LC_prior_numerical, span.LC_prior_string, span.LC_prior_custom, @@ -9125,7 +9198,7 @@ ul#LC_toolbar { padding: 0; margin: 2px; list-style:none; - position:relative; + display:inline; background-color:white; overflow: auto; } @@ -9153,6 +9226,13 @@ a.LC_toolbarItem { background-color:transparent; } +.LC_navtools { + display: inline-block; + padding: 0; + margin: 2px; + vertical-align: middle; +} + ul.LC_funclist { margin: 0; padding: 0.5em 1em 0.5em 0; @@ -9687,7 +9767,11 @@ OFFLOAD '; } - $result .= ''."\n"; + $result .= '{'frameset'}) { + $result .= ' /'; + } + $result .= '>'."\n"; return $result.''; } @@ -19028,8 +19112,8 @@ sub needs_coursereinit { $update = 'supp'; } } - return ($update); } + return ($update); } return (); } @@ -19560,9 +19644,9 @@ sub create_captcha { if (-e $Apache::lonnet::perlvar{'lonCaptchaDir'}.'/'.$md5sum.'.png') { $output = ''."\n". ''. - &mt('Type in the letters/numbers shown below').' '. + ''.&mt('Type in the letters/numbers shown below').' '. ''. - ''. + ''. ''; last; }