version 1.318, 2012/06/04 16:59:00
|
version 1.341, 2013/02/05 16:22:27
|
Line 61 use Time::HiRes;
|
Line 61 use Time::HiRes;
|
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonnet; |
use Apache::lonnet; |
use HTML::Entities(); |
use HTML::Entities(); |
use LONCAPA; |
use LONCAPA qw(:DEFAULT :match); |
|
|
sub java_not_enabled { |
sub java_not_enabled { |
return "\n".'<span class="LC_error">'. |
return "\n".'<span class="LC_error">'. |
Line 209 dependencies for a web page uploaded dir
|
Line 209 dependencies for a web page uploaded dir
|
=cut |
=cut |
|
|
sub dependencycheck_js { |
sub dependencycheck_js { |
my ($symb,$title) = @_; |
my ($symb,$title,$url,$folderpath,$uri) = @_; |
my $link = '/adm/dependencies?symb='.&HTML::Entities::encode($symb,'<>&"'). |
my $link; |
'&title='.&HTML::Entities::encode($title,'<>&"'); |
if ($symb) { |
|
$link = '/adm/dependencies?symb='.&HTML::Entities::encode($symb,'<>&"'); |
|
} elsif ($folderpath) { |
|
$link = '/adm/dependencies?folderpath='.&HTML::Entities::encode($folderpath,'<>&"'); |
|
$url = $uri; |
|
} |
|
$link .= (($link=~/\?/)?'&':'?').'title='. |
|
&HTML::Entities::encode($title,'<>&"'); |
|
if ($url) { |
|
$link .= '&url='.&HTML::Entities::encode($url,'<>&"'); |
|
} |
return <<ENDJS; |
return <<ENDJS; |
<script type="text/javascript"> |
<script type="text/javascript"> |
// <![CDATA[ |
// <![CDATA[ |
Line 1100 sub Close_PrgWin {
|
Line 1110 sub Close_PrgWin {
|
undef(%$prog_state); |
undef(%$prog_state); |
} |
} |
|
|
|
|
# ------------------------------------------------------- Puts directory header |
# ------------------------------------------------------- Puts directory header |
|
|
sub crumbs { |
sub crumbs { |
Line 1210 ENDEDITOR
|
Line 1221 ENDEDITOR
|
<link rel="stylesheet" type="text/css" href="/adm/jpicker/css/jPicker-1.1.6.min.css" /> |
<link rel="stylesheet" type="text/css" href="/adm/jpicker/css/jPicker-1.1.6.min.css" /> |
<script type="text/javascript" src="/adm/countdown/js/jquery.countdown.js"></script> |
<script type="text/javascript" src="/adm/countdown/js/jquery.countdown.js"></script> |
<link rel="stylesheet" type="text/css" href="/adm/countdown/css/jquery.countdown.css" /> |
<link rel="stylesheet" type="text/css" href="/adm/countdown/css/jquery.countdown.css" /> |
|
|
|
<script type="text/javascript" src="/adm/spellchecker/js/jquery.spellchecker.min.js"></script> |
|
<link rel="stylesheet" type="text/css" href="/adm/spellchecker/css/spellchecker.css" /> |
|
|
ENDJQUERY |
ENDJQUERY |
return $s; |
return $s; |
} |
} |
Line 1225 sub htmlarea_lang {
|
Line 1240 sub htmlarea_lang {
|
return $lang; |
return $lang; |
} |
} |
|
|
|
# return javacsript to activate elements of .colorchooser with jpicker: |
|
# Caller is responsible for enclosing this in <script> tags: |
|
# |
|
sub color_picker { |
|
return ' |
|
$(document).ready(function(){ |
|
$.fn.jPicker.defaults.images.clientPath="/adm/jpicker/images/"; |
|
$(".colorchooser").jPicker({window: { position: {x: "screenCenter", y: "bottom"}}}); |
|
});'; |
|
} |
|
|
# ----------------------------------------- Script to activate only some fields |
# ----------------------------------------- Script to activate only some fields |
|
|
sub htmlareaselectactive { |
sub htmlareaselectactive { |
Line 1338 sub htmlareaselectactive {
|
Line 1364 sub htmlareaselectactive {
|
$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Enable rich text formatting (bold, italic, etc.)\" class=\"LC_enable_rt\"><b>Rich formatting »</b></a></div>"); |
$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Enable rich text formatting (bold, italic, etc.)\" class=\"LC_enable_rt\"><b>Rich formatting »</b></a></div>"); |
$("#LC_rt_"+id).click(editorHandler); |
$("#LC_rt_"+id).click(editorHandler); |
}); |
}); |
$.fn.jPicker.defaults.images.clientPath="/adm/jpicker/images/"; |
|
$(".colorchooser").jPicker(); |
|
|
|
|
|
}); |
}); |
'; |
'; |
|
$output .= &color_picker; |
|
|
# Code to put a due date countdown in 'duedatecountdown' span. |
# Code to put a due date countdown in 'duedatecountdown' span. |
# This is currently located in the breadcrumb headers. |
# This is currently located in the breadcrumb headers. |
# note that the dueDateLayout is internatinoalized below. |
# note that the dueDateLayout is internatinoalized below. |
Line 1370 sub htmlareaselectactive {
|
Line 1396 sub htmlareaselectactive {
|
# is used to determine when the countdown timer turns red to warn the user |
# is used to determine when the countdown timer turns red to warn the user |
# to think about submitting. |
# to think about submitting. |
|
|
my $dueDateLayout = &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn} [_1]',"<span id='submitearly'></span>"); |
my $dueDateLayout = &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn} [_1]', |
|
"<span id='submitearly'></span>"); |
my $early = '- <b>'.&mt('Submit Early').'</b>'; |
my $early = '- <b>'.&mt('Submit Early').'</b>'; |
my $pastdue = '- <b>'.&mt('Past Due').'</b>'; |
my $pastdue = '- <b>'.&mt('Past Due').'</b>'; |
$output .= <<JAVASCRIPT; |
$output .= <<JAVASCRIPT; |
Line 1397 sub htmlareaselectactive {
|
Line 1424 sub htmlareaselectactive {
|
}); |
}); |
} |
} |
}); |
}); |
|
|
|
/* This code describes the spellcheck options that will be used for |
|
items with class 'spellchecked'. It is necessary for those objects' |
|
to explicitly request checking (e.g. onblur is a nice event for that). |
|
*/ |
|
\$(document).ready(function() { |
|
\$(".spellchecked").spellchecker({ |
|
url: "/ajax/spellcheck", |
|
lang: "en", |
|
engine: "pspell", |
|
suggestionBoxPosition: "below", |
|
innerDocument: true |
|
}); |
|
\$("textarea.spellchecked").spellchecker({ |
|
url: "/ajax/spellcheck", |
|
lang: "en", |
|
engine: "pspell", |
|
suggestionBoxPosition: "below", |
|
innerDocument: true |
|
}); |
|
|
|
}); |
|
|
|
/* the muli colored editor can generate spellcheck with language 'none' |
|
to disable spellcheck as well |
|
*/ |
|
function doSpellcheck(element, lang) { |
|
if (lang != 'none') { |
|
\$(element).spellchecker('option', {lang: lang}); |
|
\$(element).spellchecker('check'); |
|
} |
|
} |
|
|
|
|
JAVASCRIPT |
JAVASCRIPT |
if ($dragmath_prefix ne '') { |
if ($dragmath_prefix ne '') { |
$output .= ' |
$output .= ' |
Line 1454 sub show_return_link {
|
Line 1515 sub show_return_link {
|
unless ($env{'request.course.id'}) { return 0; } |
unless ($env{'request.course.id'}) { return 0; } |
if ($env{'request.noversionuri'}=~m{^/priv/} || |
if ($env{'request.noversionuri'}=~m{^/priv/} || |
$env{'request.uri'}=~m{^/priv/}) { return 1; } |
$env{'request.uri'}=~m{^/priv/}) { return 1; } |
|
return if ($env{'request.noversionuri'} eq '/adm/supplemental'); |
|
|
if (($env{'request.noversionuri'} =~ m{^/adm/(viewclasslist|navmaps)($|\?)}) |
if (($env{'request.noversionuri'} =~ m{^/adm/(viewclasslist|navmaps)($|\?)}) |
|| ($env{'request.noversionuri'} =~ m{^/adm/.*/aboutme($|\?)})) { |
|| ($env{'request.noversionuri'} =~ m{^/adm/.*/aboutme($|\?)})) { |
Line 1600 returns: nothing
|
Line 1662 returns: nothing
|
$description = |
$description = |
$env{'course.'.$env{'request.course.id'}.'.description'}; |
$env{'course.'.$env{'request.course.id'}.'.description'}; |
$no_mt_descr = 1; |
$no_mt_descr = 1; |
|
if ($env{'request.noversionuri'} =~ |
|
m{^/public/($match_domain)/($match_courseid)/syllabus$}) { |
|
unless (($env{'course.'.$env{'request.course.id'}.'.domain'} eq $1) && |
|
($env{'course.'.$env{'request.course.id'}.'.num'} eq $2)) { |
|
$description = 'Menu'; |
|
$no_mt_descr = 0; |
|
} |
|
} |
} |
} |
$menulink = { href =>'/adm/menu', |
$menulink = { href =>'/adm/menu', |
title =>'Go to main menu', |
title =>'Go to main menu', |
Line 1615 returns: nothing
|
Line 1685 returns: nothing
|
} |
} |
} |
} |
my $links; |
my $links; |
if ((&show_return_link) && (!$CourseBreadcrumbs)) { |
if ((&show_return_link) && (!$CourseBreadcrumbs) && (ref($last) eq 'HASH')) { |
my $alttext = &mt('Go Back'); |
my $alttext = &mt('Go Back'); |
$links=&htmltag( 'a','<img src="/res/adm/pages/tolastloc.png" alt="'.$alttext.'" class="LC_icon" />', |
$links=&htmltag( 'a','<img src="/res/adm/pages/tolastloc.png" alt="'.$alttext.'" class="LC_icon" />', |
{ href => '/adm/flip?postdata=return:', |
{ href => '/adm/flip?postdata=return:', |
Line 1650 returns: nothing
|
Line 1720 returns: nothing
|
# last breadcrumb is the first order heading of a page |
# last breadcrumb is the first order heading of a page |
# for course breadcrumbs it's just bold |
# for course breadcrumbs it's just bold |
|
|
$links .= &htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1', |
if ($lasttext ne '') { |
$lasttext), {title => $lasttext}); |
$links .= &htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1', |
|
$lasttext), {title => $lasttext}); |
|
} |
|
|
my $icons = ''; |
my $icons = ''; |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
Line 1672 returns: nothing
|
Line 1744 returns: nothing
|
# |
# |
|
|
|
|
|
if ($links ne '') { |
unless ($CourseBreadcrumbs) { |
unless ($CourseBreadcrumbs) { |
$links = &htmltag('ol', $links, { id => "LC_MenuBreadcrumbs" }); |
$links = &htmltag('ol', $links, { id => "LC_MenuBreadcrumbs" }); |
} else { |
} else { |
$links = &htmltag('ul', $links, { class => "LC_CourseBreadcrumbs" }); |
$links = &htmltag('ul', $links, { class => "LC_CourseBreadcrumbs" }); |
|
} |
} |
} |
|
|
|
|
Line 1688 returns: nothing
|
Line 1761 returns: nothing
|
.$links |
.$links |
; |
; |
} |
} |
|
my $nav_and_tools = 0; |
&render_tools(\$links); |
foreach my $item ('navigation','tools') { |
$links = &htmltag('div', $links, |
if (ref($tools{$item}) eq 'ARRAY') { |
{ id => "LC_breadcrumbs" }) unless ($CourseBreadcrumbs) ; |
$nav_and_tools += scalar(@{$tools{$item}}) |
&render_advtools(\$links); |
} |
|
} |
|
if (($links ne '') || ($nav_and_tools)) { |
|
&render_tools(\$links); |
|
$links = &htmltag('div', $links, |
|
{ id => "LC_breadcrumbs" }) unless ($CourseBreadcrumbs) ; |
|
} |
|
my $adv_tools = 0; |
|
if (ref($tools{'advtools'}) eq 'ARRAY') { |
|
$adv_tools = scalar(@{$tools{'advtools'}}); |
|
} |
|
if (($links ne '') || ($adv_tools)) { |
|
&render_advtools(\$links); |
|
} |
|
|
# Return the @Crumbs stack to what we started with |
# Return the @Crumbs stack to what we started with |
push(@Crumbs,$last); |
push(@Crumbs,$last); |
Line 1820 returns: nothing
|
Line 1906 returns: nothing
|
|
|
} # End of scope for @Crumbs |
} # End of scope for @Crumbs |
|
|
|
sub docs_breadcrumbs { |
|
my ($allowed,$crstype,$contenteditor,$title,$precleared)=@_; |
|
my ($folderpath,@folders); |
|
@folders = split('&',$env{'form.folderpath'}); |
|
my $plain=''; |
|
my $container = 'sequence'; |
|
my ($randompick,$isencrypted,$ishidden,$is_random_order) = (-1,0,0,0); |
|
my @docs_crumbs; |
|
while (@folders) { |
|
my $folder=shift(@folders); |
|
my $foldername=shift(@folders); |
|
if ($folderpath) {$folderpath.='&';} |
|
$folderpath.=$folder.'&'.$foldername; |
|
my $url; |
|
if ($allowed) { |
|
$url = '/adm/coursedocs?folderpath='; |
|
} else { |
|
$url = '/adm/supplemental?folderpath='; |
|
} |
|
$url .= &escape($folderpath); |
|
my $name=&unescape($foldername); |
|
# each of randompick number, hidden, encrypted, random order, is_page |
|
# are appended with ":"s to the foldername |
|
$name=~s/\:(\d*)\:(\w*)\:(\w*):(\d*)\:?(\d*)$//; |
|
if ($contenteditor) { |
|
if ($1 ne '') { |
|
$randompick=$1; |
|
} else { |
|
$randompick=-1; |
|
} |
|
if ($2) { $ishidden=1; } |
|
if ($3) { $isencrypted=1; } |
|
if ($4 ne '') { $is_random_order = 1; } |
|
if ($5 == 1) {$container = 'page'; } |
|
} |
|
if ($folder eq 'supplemental') { |
|
$name = &mt('Supplemental '.$crstype.' Contents'); |
|
} |
|
if ($contenteditor) { |
|
$plain.=$name.' > '; |
|
} |
|
push(@docs_crumbs, |
|
{'href' => $url, |
|
'title' => $name, |
|
'text' => $name, |
|
'no_mt' => 1, |
|
}); |
|
} |
|
if ($title) { |
|
push(@docs_crumbs, |
|
{'title' => $title, |
|
'text' => $title, |
|
'no_mt' => 1,} |
|
); |
|
} |
|
if (wantarray) { |
|
unless ($precleared) { |
|
&clear_breadcrumbs(); |
|
} |
|
&add_breadcrumb(@docs_crumbs); |
|
if ($contenteditor) { |
|
$plain=~s/\>\;\s*$//; |
|
} |
|
my $menulink = 0; |
|
if (!$allowed && !$contenteditor) { |
|
$menulink = 1; |
|
} |
|
return (&breadcrumbs(undef,undef,$menulink,'nohelp',undef,undef, |
|
$contenteditor), |
|
$randompick,$ishidden,$isencrypted,$plain, |
|
$is_random_order,$container); |
|
} else { |
|
return \@docs_crumbs; |
|
} |
|
} |
|
|
############################################################ |
############################################################ |
############################################################ |
############################################################ |
|
|
Line 2047 sub course_selection {
|
Line 2209 sub course_selection {
|
|
|
my $courseform='<b>'.&Apache::loncommon::selectcourse_link |
my $courseform='<b>'.&Apache::loncommon::selectcourse_link |
($formname,'pickcourse','pickdomain','coursedesc','',1,$crstype).'</b>'; |
($formname,'pickcourse','pickdomain','coursedesc','',1,$crstype).'</b>'; |
$output .= '<input type="radio" name="coursepick" value="all" onclick="coursePick(this.form)" />'.$allcrs.'<br />'; |
$output .= '<label><input type="radio" name="coursepick" value="all" onclick="coursePick(this.form)" />'.$allcrs.'</label><br />'; |
if ($totcodes > 0) { |
if ($totcodes > 0) { |
my $numtitles = @$codetitles; |
my $numtitles = @$codetitles; |
if ($numtitles > 0) { |
if ($numtitles > 0) { |
$output .= '<input type="radio" name="coursepick" value="category" onclick="coursePick(this.form);alert('."'".&mt('Choose categories, from left to right')."'".')" />'.&mt('Pick courses by category:').' <br />'; |
$output .= '<label><input type="radio" name="coursepick" value="category" onclick="coursePick(this.form);alert('."'".&mt('Choose categories, from left to right')."'".')" />'.&mt('Pick courses by category:').'</label><br />'; |
$output .= '<table><tr><td>'.$$codetitles[0].'<br />'."\n". |
$output .= '<table><tr><td>'.$$codetitles[0].'<br />'."\n". |
'<select name="'.$standardnames->[0]. |
'<select name="'.$standardnames->[0]. |
'" onChange="setPick(this.form);courseSet('."'$$codetitles[0]'".')">'."\n". |
'" onChange="setPick(this.form);courseSet('."'$$codetitles[0]'".')">'."\n". |
Line 2092 sub course_selection {
|
Line 2254 sub course_selection {
|
$output .= '</tr></table><br />'; |
$output .= '</tr></table><br />'; |
} |
} |
} |
} |
$output .= '<input type="radio" name="coursepick" value="specific" onclick="coursePick(this.form);opencrsbrowser('."'".$formname."','dccourse','dcdomain','coursedesc','','1','$crstype'".')" />'.$pickspec.' '.$courseform.' <input type="text" value="0" size="4" name="coursetotal" /><input type="hidden" name="courselist" value="" />selected.<br />'."\n"; |
$output .= |
|
'<label><input type="radio" name="coursepick" value="specific"' |
|
.' onclick="coursePick(this.form);opencrsbrowser('."'".$formname."','dccourse','dcdomain','coursedesc','','1','$crstype'".')" />' |
|
.$pickspec.'</label>' |
|
.' '.$courseform.' ' |
|
.&mt('[_1] selected.', |
|
'<input type="text" value="0" size="4" name="coursetotal" readonly="readonly" />' |
|
.'<input type="hidden" name="courselist" value="" />') |
|
.'<br />'."\n"; |
return $output; |
return $output; |
} |
} |
|
|
Line 2874 PARAMSONE
|
Line 3044 PARAMSONE
|
if (itemid.offsetWidth != itemwstart) { |
if (itemid.offsetWidth != itemwstart) { |
listwchange = 1; |
listwchange = 1; |
} |
} |
THIRD |
|
if ($context eq 'docs') { |
|
$output .= <<"DOCSTWO"; |
|
if (activeTab == 'cc1') { |
|
if (document.getElementById('cc_hrule') != null) { |
|
document.getElementById('cc_hrule').style.width=actabw+"px"; |
|
} |
|
} else { |
|
if (activeTab == 'bb1') { |
|
if (document.getElementById('bb_hrule') != null) { |
|
document.getElementById('bb_hrule').style.width=actabw+"px"; |
|
} |
|
} else { |
|
if (activeTab == 'ee2') { |
|
if (document.getElementById('ee_hrule') != null) { |
|
document.getElementById('ee_hrule').style.width=actabw+"px"; |
|
} |
|
} |
|
} |
|
} |
|
DOCSTWO |
|
} |
|
$output .= <<"FOURTH"; |
|
} |
} |
if ((chkh == 1) || (listwchange)) { |
if ((chkh == 1) || (listwchange)) { |
var primaryheight = document.getElementById('LC_nav_bar').offsetHeight; |
var primaryheight = document.getElementById('LC_nav_bar').offsetHeight; |
var secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight; |
var secondaryheight; |
|
if (document.getElementById('LC_secondary_menu') != null) { |
|
secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight; |
|
} |
var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight; |
var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight; |
var dccidheight = 0; |
var dccidheight = 0; |
if (document.getElementById('dccid') != null) { |
if (document.getElementById('dccid') != null) { |
Line 2956 function callResize() {
|
Line 3106 function callResize() {
|
timer=setTimeout('resize_scrollbox("$names{'scroll'}","1","1")',500); |
timer=setTimeout('resize_scrollbox("$names{'scroll'}","1","1")',500); |
} |
} |
|
|
FOURTH |
THIRD |
return $output; |
return $output; |
} |
} |
|
|
|
############################################## |
|
############################################## |
|
|
|
sub javascript_jumpto_resource { |
|
my $confirm_switch = &mt("Editing requires switching to the resource's home server.").'\n'. |
|
&mt('Switch server?'); |
|
return (<<ENDUTILITY) |
|
|
|
function go(url) { |
|
if (url!='' && url!= null) { |
|
currentURL = null; |
|
currentSymb= null; |
|
window.location.href=url; |
|
} |
|
} |
|
|
|
function need_switchserver(url) { |
|
if (url!='' && url!= null) { |
|
if (confirm("$confirm_switch")) { |
|
go(url); |
|
} |
|
} |
|
return; |
|
} |
|
|
|
ENDUTILITY |
|
|
|
} |
|
|
|
sub jump_to_editres { |
|
my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath, |
|
$title,$idx,$suppurl,$todocs) = @_; |
|
my $jscall; |
|
if ($switchserver) { |
|
if ($home) { |
|
$cfile = '/adm/switchserver?otherserver='.$home.'&role='. |
|
&HTML::Entities::encode($env{'request.role'},'"<>&'); |
|
if ($symb) { |
|
$cfile .= '&symb='.&HTML::Entities::encode($symb,'"<>&'); |
|
} elsif ($folderpath) { |
|
$cfile .= '&folderpath='.&HTML::Entities::encode($folderpath,'"<>&'); |
|
} |
|
if ($forceedit) { |
|
$cfile .= '&forceedit=1'; |
|
} |
|
if ($forcereg) { |
|
$cfile .= '&register=1'; |
|
} |
|
$jscall = "need_switchserver('$cfile');"; |
|
} |
|
} else { |
|
unless ($cfile =~ m{^/priv/}) { |
|
if ($symb) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?')."symb=$symb"; |
|
} elsif ($folderpath) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?'). |
|
'folderpath='.&HTML::Entities::encode(&escape($folderpath),'"<>&'); |
|
if ($title) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?'). |
|
'title='.&HTML::Entities::encode(&escape($title),'"<>&'); |
|
} |
|
if ($idx) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?').'idx='.$idx; |
|
} |
|
if ($suppurl) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?'). |
|
'suppurl='.&HTML::Entities::encode(&escape($suppurl)); |
|
} |
|
} |
|
if ($forceedit) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?').'forceedit=1'; |
|
} |
|
if ($forcereg) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?').'register=1'; |
|
} |
|
if ($todocs) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?').'todocs=1'; |
|
} |
|
} |
|
$jscall = "go('$cfile')"; |
|
} |
|
return $jscall; |
|
} |
|
|
############################################## |
############################################## |
############################################## |
############################################## |
Line 3327 sub funclist_from_array {
|
Line 3560 sub funclist_from_array {
|
{ listattr => {class => 'LC_funclist'} }); |
{ listattr => {class => 'LC_funclist'} }); |
} |
} |
|
|
|
=pod |
|
|
|
=item &actionbox( \@array ) |
|
|
|
Constructs a XHTML list from \@array with the first item being visually |
|
highlighted and set to the value 'Actions'. The list is wrapped in a division. |
|
|
|
The actionlist is used to offer contextual actions, mostly at the bottom |
|
of a page, on which the outcome of an processed action is shown, |
|
e.g. a file operation in Construction Space. |
|
|
|
=over |
|
|
|
=item \@array |
|
|
|
A reference to the array containing text. Details: sub funclist_from_array |
|
|
|
=back |
|
|
|
Returns: XHTML div as string. |
|
|
|
=back |
|
|
|
=cut |
|
|
|
sub actionbox { |
|
my ($items) = @_; |
|
return unless(ref($items) eq 'ARRAY'); |
|
return |
|
'<div class="LC_actionbox">' |
|
.&funclist_from_array($items, {legend => &mt('Actions')}) |
|
.'</div>'; |
|
} |
|
|
1; |
1; |
|
|
__END__ |
__END__ |