version 1.561, 2025/02/21 04:29:26
|
version 1.562, 2025/03/25 01:02:59
|
Line 1168 sub innerregister {
|
Line 1168 sub innerregister {
|
$domselector = &Apache::loncommon::select_dom_form($defdom,'vudom','','','', |
$domselector = &Apache::loncommon::select_dom_form($defdom,'vudom','','','', |
\@possdoms,'','','vudom'). |
\@possdoms,'','','vudom'). |
'<span class="LC_visually_hidden"><label for="vudom">'. |
'<span class="LC_visually_hidden"><label for="vudom">'. |
&mt("user's domain").'</label></span>'; |
&mt("user's domain").'</label></span>'; |
} elsif (($possdomstr ne '') && (&Apache::lonnet::domain($possdomstr) ne '')) { |
} elsif (($possdomstr ne '') && (&Apache::lonnet::domain($possdomstr) ne '')) { |
if ($env{'request.user_in_effect'} =~ /^$match_username:($match_domain)$/) { |
if ($env{'request.user_in_effect'} =~ /^$match_username:($match_domain)$/) { |
$defdom = $1; |
$defdom = $1; |
Line 1956 sub switch {
|
Line 1956 sub switch {
|
my ($text,$alttext); |
my ($text,$alttext); |
$text=&mt($top).' '.&mt($bot); |
$text=&mt($top).' '.&mt($bot); |
$text=~s/\s*\-\s*//gs; |
$text=~s/\s*\-\s*//gs; |
if ($top) { |
if ($top && $bot) { |
|
if ($top =~ /\-\[_\d+\]$/) { |
|
$top =~ s/(\-\[_\d+\])//; |
|
$alttext = &mt($top.$bot.' icon'); |
|
} elsif (($top =~ /^\w+\s\w+\[_\d+\]$/) && ($bot =~ /^\w{8}\[_\d+\]$/)) { |
|
$alttext = &mt($top.$bot.' icon'); |
|
} else { |
|
$alttext = &mt("$top $bot icon"); |
|
} |
|
} elsif ($top) { |
$alttext = &mt("$top icon"); |
$alttext = &mt("$top icon"); |
} elsif ($bot) { |
} elsif ($bot) { |
$alttext = &mt("$bot icon"); |
$alttext = &mt("$bot icon"); |
Line 1974 sub switch {
|
Line 1983 sub switch {
|
'" align="'.($nobreak==3?'right':'left').'" class="LC_icon" />'; |
'" align="'.($nobreak==3?'right':'left').'" class="LC_icon" />'; |
if ($env{'browser.interface'} eq 'faketextual') { |
if ($env{'browser.interface'} eq 'faketextual') { |
# Main Menu |
# Main Menu |
if ($nobreak==3) { |
$inlineremote[$idx] = { |
$inlineremote[$idx]="\n". |
linktext => $desc, |
'<th class="LC_menubuttons_text" align="right">'.$text. |
url => 'javascript:'.$act, |
'</th><td align="left">'. |
permission => 'F', |
'<a href="javascript:'.$act.';">'.$pic.'</a></td></tr>'; |
icon => $img, |
} elsif ($nobreak) { |
alttext => $alttext, |
$inlineremote[$idx]="\n<tr>". |
linktitle => '', |
'<th align="left">'. |
}; |
'<a href="javascript:'.$act.';">'.$pic.'</a></th> |
|
<td class="LC_menubuttons_text" align="left"><a class="LC_menubuttons_link" href="javascript:'.$act.';"><span class="LC_menubuttons_inline_text">'.$text.'</span></a></td>'; |
|
} else { |
|
$inlineremote[$idx]="\n<tr>". |
|
'<th align="left">'. |
|
'<a href="javascript:'.$act.';">'.$pic. |
|
'</a></th><td class="LC_menubuttons_text" colspan="3">'. |
|
'<a class="LC_menubuttons_link" href="javascript:'.$act.';"><span class="LC_menubuttons_inline_text">'.$desc.'</span></a></td></tr>'; |
|
} |
|
} else { |
} else { |
# Inline Menu |
# Inline Menu |
my @tools = (93,91,81,82,83); |
my @tools = (93,91,81,82,83); |
Line 2031 sub inlinemenu {
|
Line 2031 sub inlinemenu {
|
undef(%category_members); |
undef(%category_members); |
# calling rawconfig with "1" will evaluate mydesk.tab, even if there is no active remote control |
# calling rawconfig with "1" will evaluate mydesk.tab, even if there is no active remote control |
&rawconfig(1); |
&rawconfig(1); |
my $output='<div class="LC_landmark" role="main">'."\n"; |
my $output; |
for (my $col=1; $col<=2; $col++) { |
for (my $col=1; $col<=2; $col++) { |
$output .= '<div class="LC_mainmenu">'."\n"; |
$output .= '<div class="LC_mainmenu">'."\n"; |
for (my $row=1; $row<=8; $row++) { |
for (my $row=1; $row<=8; $row++) { |
foreach my $cat (keys(%category_members)) { |
foreach my $cat (keys(%category_members)) { |
if ($category_positions{$cat} ne "$col,$row") { next; } |
my @menu = ({ categorytitle=>&mt($category_names{$cat}), |
#$output.='<table><tr><td colspan="4" class="LC_menubuttons_category">'.&mt($category_names{$cat}).'</td></tr>'; |
listclass=>'LC_ListStyleMainMenu', |
$output.='<div class="LC_Box LC_400Box">'; |
boxclass=>'LC_MainMenu_Box', |
$output.='<h2 class="LC_hcell LC_heading_2">'.&mt($category_names{$cat}).'</h2>'; |
items =>[],}); |
$output.='<table>'; |
if ($category_positions{$cat} ne "$col,$row") { next; } |
my %active=(); |
my %active=(); |
foreach my $menu_item (split(/\:/,$category_members{$cat})) { |
foreach my $menu_item (split(/\:/,$category_members{$cat})) { |
if ($inlineremote[$menu_item]) { |
if ($inlineremote[$menu_item]) { |
$active{$menu_item}=1; |
$active{$menu_item}=1; |
} |
} |
} |
} |
foreach my $item (sort(keys(%active))) { |
foreach my $item (sort(keys(%active))) { |
$output.=$inlineremote[$item]; |
push(@{ $menu[0]->{items} }, $inlineremote[$item]); |
} |
} |
$output.='</table>'; |
if (@{$menu[0]->{items}} > 0) { |
$output.='</div>'; |
$output .= &Apache::lonhtmlcommon::generate_menu(@menu); |
|
} |
} |
} |
} |
} |
$output.="</div>"; |
$output.="</div>"; |
} |
} |
$output .= '<div style="clear:both"></div></div>'."\n"; |
$output .= '<div style="clear:both"></div>'."\n"; |
return $output; |
return $output; |
} |
} |
|
|