version 1.315.2.2, 2010/08/14 21:38:08
|
version 1.315.2.8, 2011/01/07 22:21:02
|
Line 205 sub prep_menuitem {
|
Line 205 sub prep_menuitem {
|
} else { # textual Link |
} else { # textual Link |
$link = &mt($$menuitem[3]); |
$link = &mt($$menuitem[3]); |
} |
} |
if($$menuitem[4] eq 'newmsg'){ #special style for New Messages |
return '<li><a' |
return '<li><a href="'.$$menuitem[0].'"><span class="LC_new_message">'.$link.'</span></a></li>'; |
# highlighting for new messages |
} |
. ( $$menuitem[4] eq 'newmsg' ? ' class="LC_new_message"' : '') |
return '<li><a href="'.$$menuitem[0].'">'.$link.'</a></li>'; |
. qq| href="$$menuitem[0]" target="_top">$link</a></li>|; |
} |
} |
|
|
# primary_menu() evaluates @primary_menu and returns XHTML for the menu |
# primary_menu() evaluates @primary_menu and returns XHTML for the menu |
Line 245 sub primary_menu {
|
Line 245 sub primary_menu {
|
|
|
|
|
if ($$menuitem[3] eq 'Help') { # special treatment for helplink |
if ($$menuitem[3] eq 'Help') { # special treatment for helplink |
$menu .= '<li>'.&Apache::loncommon::top_nav_help('Help').'</li>'; |
if ($public) { |
|
my $origmail = $Apache::lonnet::perlvar{'lonSupportEMail'}; |
|
my $defdom = &Apache::lonnet::default_login_domain(); |
|
my $to = &Apache::loncommon::build_recipient_list(undef, |
|
'helpdeskmail', |
|
$defdom,$origmail); |
|
if ($to ne '') { |
|
$menu .= &prep_menuitem($menuitem); |
|
} |
|
} else { |
|
$menu .= '<li>'.&Apache::loncommon::top_nav_help('Help').'</li>'; |
|
} |
} else { |
} else { |
my @items = @{$menuitem}; |
$menu .= &prep_menuitem($menuitem); |
$items[0] = 'javascript:'.$menuitem->[0].';'; |
|
$menu .= &prep_menuitem(\@items); |
|
} |
} |
} |
} |
|
|
Line 463 sub innerregister {
|
Line 472 sub innerregister {
|
my @crumbs; |
my @crumbs; |
unless (($forcereg) && ($env{'request.noversionuri'} eq '/adm/navmaps') |
unless (($forcereg) && ($env{'request.noversionuri'} eq '/adm/navmaps') |
&& ($mapurl eq $env{'course.'.$env{'request.course.id'}.'.url'})) { |
&& ($mapurl eq $env{'course.'.$env{'request.course.id'}.'.url'})) { |
|
my $navhref = "javascript:gopost('/adm/navmaps','')"; |
|
if ($env{'environment.remotenavmap'} eq 'on') { |
|
$navhref = "javascript:gonav('/adm/navmaps');"; |
|
} |
@crumbs = ({text => $contentstext, |
@crumbs = ({text => $contentstext, |
href => "Javascript:gopost('/adm/navmaps','')"}); |
href => $navhref}); |
} |
} |
if ($mapurl ne $env{'course.'.$env{'request.course.id'}.'.url'}) { |
if ($mapurl ne $env{'course.'.$env{'request.course.id'}.'.url'}) { |
push(@crumbs, {text => '...', |
push(@crumbs, {text => '...', |
Line 622 sub innerregister {
|
Line 635 sub innerregister {
|
if ($nocrsedit) { |
if ($nocrsedit) { |
$editbutton=&clear(6,1); |
$editbutton=&clear(6,1); |
} else { |
} else { |
|
my $bot = "go('$cfile')"; |
if ($switchserver) { |
if ($switchserver) { |
if ( $env{'request.symb'} && $env{'request.course.id'} ) { |
if ( $env{'request.symb'} && $env{'request.course.id'} ) { |
my ($mapurl,$rid,$resurl) = &Apache::lonnet::decode_symb(&Apache::lonnet::symbread()); |
my ($mapurl,$rid,$resurl) = &Apache::lonnet::decode_symb(&Apache::lonnet::symbread()); |
$cfile = '/adm/switchserver?otherserver='.$home.'&role='.$env{'request.role'}.'&symb='.$env{'request.symb'}.'&origurl='.$resurl; |
$cfile = '/adm/switchserver?otherserver='.$home.'&role='. |
|
&HTML::Entities::encode($env{'request.role'},'"<>&').'&symb='. |
|
&HTML::Entities::encode($env{'request.symb'},'"<>&'); |
|
$bot = "need_switchserver('$cfile');"; |
} |
} |
} |
} |
$editbutton=&switch |
$editbutton=&switch |
('','',6,1,'pcstr.gif','edit[_1]','resource[_2]', |
('','',6,1,'pcstr.gif','edit[_1]','resource[_2]', |
"go('".$cfile."');","Edit this resource"); |
$bot,"Edit this resource"); |
$noeditbutton = 0; |
$noeditbutton = 0; |
} |
} |
} elsif ($editbutton eq '') { |
} elsif ($editbutton eq '') { |
Line 1321 sub rawconfig {
|
Line 1338 sub rawconfig {
|
my ($row,$col,$pro,$prt,$img,$top,$bot,$act,$desc,$cat)=split(/\:/,$line); |
my ($row,$col,$pro,$prt,$img,$top,$bot,$act,$desc,$cat)=split(/\:/,$line); |
$prt=~s/\$uname/$uname/g; |
$prt=~s/\$uname/$uname/g; |
$prt=~s/\$udom/$udom/g; |
$prt=~s/\$udom/$udom/g; |
|
if ($env{'environment.remotenavmap'} eq 'on') { |
|
unless ($env{'environment.remote'} eq 'on') { |
|
if ($img eq 'nav.gif') { |
|
$act = "gonav('/adm/navmaps','')"; |
|
} |
|
} |
|
} |
if ($prt =~ /\$crs/) { |
if ($prt =~ /\$crs/) { |
next unless ($env{'request.course.id'}); |
next unless ($env{'request.course.id'}); |
next if ($crstype eq 'Community'); |
next if ($crstype eq 'Community'); |
Line 1617 sub utilityfunctions {
|
Line 1641 sub utilityfunctions {
|
my $end_page_bookmark = |
my $end_page_bookmark = |
&Apache::loncommon::end_page({'js_ready' => 1}); |
&Apache::loncommon::end_page({'js_ready' => 1}); |
|
|
|
my $confirm_switch = &mt("Editing requires switching to the resource's home server.").'\n'. |
|
&mt('Switch server?'); |
|
|
return (<<ENDUTILITY) |
return (<<ENDUTILITY) |
|
|
var currentURL="$currenturl"; |
var currentURL="$currenturl"; |
Line 1634 function go(url) {
|
Line 1661 function go(url) {
|
} |
} |
} |
} |
|
|
function gotop(url) { |
function need_switchserver(url) { |
if (url!='' && url!= null) { |
if (url!='' && url!= null) { |
top.location.href = url; |
if (confirm("$confirm_switch")) { |
|
go(url); |
|
} |
} |
} |
|
return; |
} |
} |
|
|
function gopost(url,postdata) { |
function gopost(url,postdata) { |
Line 2022 function adhocRole(roleitem) {
|
Line 2052 function adhocRole(roleitem) {
|
secok = 0; |
secok = 0; |
var numrolesec = rolesections[selidx].length; |
var numrolesec = rolesections[selidx].length; |
var msgidx = numsec[selidx] - numrolesec; |
var msgidx = numsec[selidx] - numrolesec; |
secchoice = prompt("$lt{'this'}\\n"+secpick[msgidx]+"\\n$lt{'avai'} "+roleseclist[selidx],""); |
secchoice = prompt("$lt{'this'} "+secpick[msgidx]+"\\n$lt{'avai'} "+roleseclist[selidx],""); |
if (secchoice == '') { |
if (secchoice == '') { |
if (msgidx > 0) { |
if (msgidx > 0) { |
secok = 1; |
secok = 1; |