version 1.1075.2.161.2.8, 2022/07/08 16:01:54
|
version 1.1075.2.161.2.9, 2022/08/30 20:09:21
|
Line 5534 sub get_domainconf {
|
Line 5534 sub get_domainconf {
|
foreach my $host (keys(%{$domconfig{'login'}{$key}})) { |
foreach my $host (keys(%{$domconfig{'login'}{$key}})) { |
if (ref($domconfig{'login'}{$key}{$host}) eq 'HASH') { |
if (ref($domconfig{'login'}{$key}{$host}) eq 'HASH') { |
$designhash{$udom.'.login.'.$key.'_'.$host} = 1; |
$designhash{$udom.'.login.'.$key.'_'.$host} = 1; |
foreach my $item ('text','img','alt','url','title','notsso') { |
foreach my $item ('text','img','alt','url','title','window','notsso') { |
$designhash{$udom.'.login.'.$key.'_'.$item.'_'.$host} = $domconfig{'login'}{$key}{$host}{$item}; |
$designhash{$udom.'.login.'.$key.'_'.$item.'_'.$host} = $domconfig{'login'}{$key}{$host}{$item}; |
} |
} |
} |
} |
Line 6266 sub endbodytag {
|
Line 6266 sub endbodytag {
|
} |
} |
if ( exists( $env{'internal.head.redirect'} ) ) { |
if ( exists( $env{'internal.head.redirect'} ) ) { |
if (!(ref($args) eq 'HASH' && $args->{'noredirectlink'})) { |
if (!(ref($args) eq 'HASH' && $args->{'noredirectlink'})) { |
|
my ($endbodyjs,$idattr); |
|
if ($env{'internal.head.to_opener'}) { |
|
my $linkid = 'LC_continue_link'; |
|
$idattr = ' id="'.$linkid.'"'; |
|
my $redirect_for_js = &js_escape($env{'internal.head.redirect'}); |
|
$endbodyjs=<<ENDJS; |
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
function ebFunction(evt) { |
|
evt.preventDefault(); |
|
var dest = '$redirect_for_js'; |
|
if (window.opener != null && !window.opener.closed) { |
|
window.opener.location.href=dest; |
|
window.close(); |
|
} else { |
|
window.location.href=dest; |
|
} |
|
return false; |
|
} |
|
|
|
\$(document).ready(function () { |
|
if (document.getElementById('$linkid')) { |
|
var clickelem = document.getElementById('$linkid'); |
|
clickelem.addEventListener('click',ebFunction,false); |
|
} |
|
}); |
|
// ]]> |
|
</script> |
|
ENDJS |
|
} |
$endbodytag= |
$endbodytag= |
"<br /><a href=\"$env{'internal.head.redirect'}\">". |
"$endbodyjs<br /><a href=\"$env{'internal.head.redirect'}\"$idattr>". |
&mt('Continue').'</a>'. |
&mt('Continue').'</a>'. |
$endbodytag; |
$endbodytag; |
} |
} |
Line 8325 Inputs: $title - optional title for the
|
Line 8355 Inputs: $title - optional title for the
|
3- whether the side effect should occur |
3- whether the side effect should occur |
(side effect of setting |
(side effect of setting |
$env{'internal.head.redirect'} to the url |
$env{'internal.head.redirect'} to the url |
redirected too) |
redirected to) |
|
4- whether the redirect target should be |
|
the opener of the current (pop-up) |
|
window (side effect of setting |
|
$env{'internal.head.to_opener'} to |
|
1, if true. |
domain -> force to color decorate a page for a specific |
domain -> force to color decorate a page for a specific |
domain |
domain |
function -> force usage of a specific rolish color scheme |
function -> force usage of a specific rolish color scheme |
Line 8388 sub headtag {
|
Line 8423 sub headtag {
|
} |
} |
} |
} |
if (ref($args->{'redirect'})) { |
if (ref($args->{'redirect'})) { |
my ($time,$url,$inhibit_continue) = @{$args->{'redirect'}}; |
my ($time,$url,$inhibit_continue,$to_opener) = @{$args->{'redirect'}}; |
$url = &Apache::lonenc::check_encrypt($url); |
$url = &Apache::lonenc::check_encrypt($url); |
if (!$inhibit_continue) { |
if (!$inhibit_continue) { |
$env{'internal.head.redirect'} = $url; |
$env{'internal.head.redirect'} = $url; |
} |
} |
$result.=<<ADDMETA |
$result.=<<"ADDMETA"; |
<meta http-equiv="pragma" content="no-cache" /> |
<meta http-equiv="pragma" content="no-cache" /> |
|
ADDMETA |
|
if ($to_opener) { |
|
$env{'internal.head.to_opener'} = 1; |
|
my $dest = &js_escape($url); |
|
my $timeout = int($time * 1000); |
|
$result .=<<"ENDJS"; |
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
function LC_To_Opener() { |
|
var dest = '$dest'; |
|
if (dest != '') { |
|
if (window.opener != null && !window.opener.closed) { |
|
window.opener.location.href=dest; |
|
window.close(); |
|
} else { |
|
window.location.href=dest; |
|
} |
|
} |
|
} |
|
\$(document).ready(function () { |
|
setTimeout('LC_To_Opener()',$timeout); |
|
}); |
|
// ]]> |
|
</script> |
|
ENDJS |
|
} else { |
|
$result.=<<"ADDMETA"; |
<meta http-equiv="Refresh" content="$time; url=$url" /> |
<meta http-equiv="Refresh" content="$time; url=$url" /> |
ADDMETA |
ADDMETA |
|
} |
} else { |
} else { |
unless (($args->{'frameset'}) || ($args->{'js_ready'}) || ($args->{'only_body'}) || ($args->{'no_nav_bar'})) { |
unless (($args->{'frameset'}) || ($args->{'js_ready'}) || ($args->{'only_body'}) || ($args->{'no_nav_bar'})) { |
my $requrl = $env{'request.uri'}; |
my $requrl = $env{'request.uri'}; |