version 1.1420, 2023/11/18 21:50:06
|
version 1.1425, 2023/12/31 23:03:40
|
Line 1372 sub helpLatexCheatsheet {
|
Line 1372 sub helpLatexCheatsheet {
|
$out .= '<span>' |
$out .= '<span>' |
.&help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),$stayOnPage,undef,600) |
.&help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),$stayOnPage,undef,600) |
.'</span> <span>' |
.'</span> <span>' |
.&help_open_topic('Authoring_Multilingual_Problems',&mt('How to create problems in different languages'),$stayOnPage,undef,600) |
.&help_open_topic('Authoring_Multilingual_Problems',&mt('Languages'),$stayOnPage,undef,600) |
.'</span>'; |
.'</span>'; |
} |
} |
$out .= '</span>'; # End cheatsheet |
$out .= '</span>'; # End cheatsheet |
Line 1764 the id of the element to resize, second
|
Line 1764 the id of the element to resize, second
|
surrounds everything that comes after the textarea, this routine needs |
surrounds everything that comes after the textarea, this routine needs |
to be attached to the <body> for the onload and onresize events. |
to be attached to the <body> for the onload and onresize events. |
|
|
=back |
|
|
|
=cut |
=cut |
|
|
sub resize_textarea_js { |
sub resize_textarea_js { |
Line 2443 END
|
Line 2441 END
|
|
|
=item * &iframe_wrapper_headjs() |
=item * &iframe_wrapper_headjs() |
|
|
|
emits javascript containing two global vars to facilitate handling of resizing |
|
by code in iframe_wrapper_resizejs() used when an iframe is present in a page |
|
with standard LON-CAPA menus. |
|
|
|
=cut |
|
|
# |
# |
# Where iframe is in use, if window.onload() executes before the custom resize function |
# Where iframe is in use, if window.onload() executes before the custom resize function |
# has been defined (jQuery), two global javascript vars (LCnotready and LCresizedef) |
# has been defined (jQuery), two global javascript vars (LCnotready and LCresizedef) |
Line 2450 END
|
Line 2454 END
|
# do not obscure the Functions menu. |
# do not obscure the Functions menu. |
# |
# |
|
|
=back |
|
|
|
=cut |
|
|
|
|
|
sub iframe_wrapper_headjs { |
sub iframe_wrapper_headjs { |
return <<"ENDJS"; |
return <<"ENDJS"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
Line 2472 ENDJS
|
Line 2471 ENDJS
|
|
|
=item * &iframe_wrapper_resizejs() |
=item * &iframe_wrapper_resizejs() |
|
|
|
emits javascript used to handle resizing for a page containing |
|
an iframe, to ensure that the iframe does not obscure any |
|
standard LON-CAPA menu items. |
|
|
|
=back |
|
|
|
=cut |
|
|
# |
# |
# jQuery to use when iframe is in use and a page resize occurs. |
# jQuery to use when iframe is in use and a page resize occurs. |
# This script will ensure that the iframe does not obscure any |
# This script will ensure that the iframe does not obscure any |
Line 2481 ENDJS
|
Line 2488 ENDJS
|
# e.g., by inclusion in second arg passed to &start_page(). |
# e.g., by inclusion in second arg passed to &start_page(). |
# |
# |
|
|
=back |
|
|
|
=cut |
|
|
|
sub iframe_wrapper_resizejs { |
sub iframe_wrapper_resizejs { |
my $offset = 5; |
my $offset = 5; |
&get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); |
&get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); |
Line 2498 sub iframe_wrapper_resizejs {
|
Line 2501 sub iframe_wrapper_resizejs {
|
var offset = $offset; |
var offset = $offset; |
var height = 0; |
var height = 0; |
var hdrtop = 0; |
var hdrtop = 0; |
if (\$('div.LC_head_subbox:first').length) { |
if (\$('div.LC_menus_content:first').length) { |
|
if (\$('div.LC_menus_content:first').hasClass ("shown")) { |
|
header = \$('div.LC_menus_content:first'); |
|
offset = 12; |
|
} |
|
} else if (\$('div.LC_head_subbox:first').length) { |
header = \$('div.LC_head_subbox:first'); |
header = \$('div.LC_head_subbox:first'); |
offset = 9; |
offset = 9; |
} else { |
} else { |
Line 6585 sub nocodemirror {
|
Line 6593 sub nocodemirror {
|
|
|
=item * &permitted_editors() |
=item * &permitted_editors() |
|
|
Input: None |
Input: $uri (optional) |
|
|
Returns: %editors hash in which keys are editors |
Returns: %editors hash in which keys are editors |
permitted in current Authoring Space. |
permitted in current Authoring Space. |
Line 6600 Returns: %editors hash in which keys are
|
Line 6608 Returns: %editors hash in which keys are
|
=cut |
=cut |
|
|
sub permitted_editors { |
sub permitted_editors { |
|
my ($uri) = @_; |
my ($is_author,$is_coauthor,$auname,$audom,%editors); |
my ($is_author,$is_coauthor,$auname,$audom,%editors); |
if ($env{'request.role'} =~ m{^au\./}) { |
if ($env{'request.role'} =~ m{^au\./}) { |
$is_author = 1; |
$is_author = 1; |
Line 6618 sub permitted_editors {
|
Line 6627 sub permitted_editors {
|
($audom,$auname) = ($1,$2); |
($audom,$auname) = ($1,$2); |
} elsif ($env{'request.uri'} =~ m{^/priv/($match_domain)/($match_username)/}) { |
} elsif ($env{'request.uri'} =~ m{^/priv/($match_domain)/($match_username)/}) { |
($audom,$auname) = ($1,$2); |
($audom,$auname) = ($1,$2); |
|
} elsif (($uri eq '/daxesave') && |
|
($env{'form.path'} =~ m{^/daxeopen/priv/($match_domain)/($match_username)/})) { |
|
($audom,$auname) = ($1,$2); |
} |
} |
if (($audom ne '') && ($auname ne '')) { |
if (($audom ne '') && ($auname ne '')) { |
if (($env{'user.domain'} eq $audom) && |
if (($env{'user.domain'} eq $audom) && |
Line 6878 sub bodytag {
|
Line 6890 sub bodytag {
|
$bodytag .= Apache::lonhtmlcommon::scripttag( |
$bodytag .= Apache::lonhtmlcommon::scripttag( |
Apache::lonmenu::utilityfunctions($httphost), 'start'); |
Apache::lonmenu::utilityfunctions($httphost), 'start'); |
|
|
|
if ($args->{'collapsible_header'} ne '') { |
|
my $alttext = &mt('menu state: collapsed'); |
|
my $tooltip = &mt('display standard menus'); |
|
$bodytag .= <<"END"; |
|
<div id="LC_expandingContainer" style="display:inline;"> |
|
<div id="LC_collapsible" class="LC_collapse_trigger" style="position: absolute;top: -5px;left: 0px; z-index:101; display:inline;"> |
|
<a href="#" style="text-decoration:none;"><img class="LC_collapsible_indicator" alt="$alttext" title="$tooltip" src="/res/adm/pages/collapsed.png" style="border:0;margin:0;padding:0;max-width:100%;height:auto" /></a></div> |
|
<div class="LC_menus_content hidden"> |
|
END |
|
} |
unless ($args->{'no_primary_menu'}) { |
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'}, |
$args->{'links_disabled'}, |
$args->{'links_target'}); |
$args->{'links_target'}, |
|
$args->{'collapsible_header'}); |
|
|
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { |
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { |
if ($dc_info) { |
if ($dc_info) { |
Line 6940 sub bodytag {
|
Line 6963 sub bodytag {
|
$bodytag .= '<hr style="clear:both" />'; |
$bodytag .= '<hr style="clear:both" />'; |
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); |
} |
} |
|
if ($args->{'collapsible_header'} ne '') { |
|
$bodytag .= $args->{'collapsible_header'}. |
|
'<div id="LC_collapsible_separator"></div>'. |
|
'</div></div>'; |
|
} |
return $bodytag; |
return $bodytag; |
} |
} |
|
|
Line 7133 form, .inline {
|
Line 7160 form, .inline {
|
display: inline; |
display: inline; |
} |
} |
|
|
|
.LC_menus_content.shown{ |
|
display: inline; |
|
} |
|
|
|
.LC_menus_content.hidden { |
|
display: none; |
|
} |
|
|
.LC_right { |
.LC_right { |
text-align:right; |
text-align:right; |
} |
} |
Line 7153 form, .inline {
|
Line 7188 form, .inline {
|
width:400px; |
width:400px; |
} |
} |
|
|
|
#LC_collapsible_separator { |
|
border: 1px solid black; |
|
width: 99.9%; |
|
height: 0px; |
|
} |
|
|
.LC_iframecontainer { |
.LC_iframecontainer { |
width: 98%; |
width: 98%; |
margin: 0; |
margin: 0; |