--- loncom/interface/loncommon.pm 2021/10/18 22:29:20 1.1368
+++ loncom/interface/loncommon.pm 2021/11/15 22:36:37 1.1369
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1368 2021/10/18 22:29:20 raeburn Exp $
+# $Id: loncommon.pm,v 1.1369 2021/11/15 22:36:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1416,7 +1416,7 @@ sub help_open_menu {
}
sub top_nav_help {
- my ($text) = @_;
+ my ($text,$linkattr) = @_;
$text = &mt($text);
my $stay_on_page = 1;
@@ -1430,7 +1430,7 @@ sub top_nav_help {
if ($link) {
return <<"END";
$banner_link
-$text
+$text
END
} else {
return ' '.$text.' ';
@@ -6266,7 +6266,8 @@ sub bodytag {
Apache::lonmenu::utilityfunctions($httphost), 'start');
unless ($args->{'no_primary_menu'}) {
- my ($left,$right) = Apache::lonmenu::primary_menu($crstype,$ltimenu,$menucoll,$menuref);
+ my ($left,$right) = Apache::lonmenu::primary_menu($crstype,$ltimenu,$menucoll,$menuref,
+ $args->{'links_disabled'});
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {
if ($dc_info) {
@@ -6298,7 +6299,8 @@ sub bodytag {
unless ($args->{'no_inline_menu'}) {
$bodytag .= Apache::lonmenu::secondary_menu($httphost,$ltiscope,$ltimenu,
$args->{'no_primary_menu'},
- $menucoll,$menuref);
+ $menucoll,$menuref,
+ $args->{'links_disabled'});
}
$bodytag .= Apache::lonmenu::serverform();
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
@@ -8375,6 +8377,18 @@ ul.LC_funclist li {
cursor:pointer;
}
+.LCisDisabled {
+ cursor: not-allowed;
+ opacity: 0.5;
+}
+
+a[aria-disabled="true"] {
+ color: currentColor;
+ display: inline-block; /* For IE11/ MS Edge bug */
+ pointer-events: none;
+ text-decoration: none;
+}
+
pre.LC_wordwrap {
white-space: pre-wrap;
white-space: -moz-pre-wrap;
@@ -8963,6 +8977,9 @@ $args - additional optional args support
will contain https:// if server uses
https (as per hosts.tab), but request is for http
hostname -> hostname, originally from $r->hostname(), (optional).
+ links_disabled -> Links in primary and secondary menus are disabled
+ (Can enable them once page has loaded - see lonroles.pm
+ for an example).
=back