version 1.307, 2012/04/04 10:47:29
|
version 1.311, 2012/05/02 18:01:53
|
Line 103 sub direct_parm_link {
|
Line 103 sub direct_parm_link {
|
############################################## |
############################################## |
############################################## |
############################################## |
|
|
=item confirm_success |
=item &confirm_success() |
|
|
Successful completion of an operation message |
Successful completion of an operation message |
|
|
Line 129 sub confirm_success {
|
Line 129 sub confirm_success {
|
|
|
=pod |
=pod |
|
|
=item dragmath_button |
=item &dragmath_button() |
|
|
Creates a button that launches a dragmath popup-window, in which an |
Creates a button that launches a dragmath popup-window, in which an |
expression can be edited and pasted as LaTeX into a specified textarea. |
expression can be edited and pasted as LaTeX into a specified textarea. |
Line 155 ENDDRAGMATH
|
Line 155 ENDDRAGMATH
|
|
|
=pod |
=pod |
|
|
=item dragmath_js |
=item &dragmath_js() |
|
|
Javascript used to open pop-up window containing dragmath applet which |
Javascript used to open pop-up window containing dragmath applet which |
can be used to paste LaTeX into a textarea. |
can be used to paste LaTeX into a textarea. |
|
|
=cut |
=cut |
|
|
sub dragmath_js { |
sub dragmath_js { |
Line 177 sub dragmath_js {
|
Line 178 sub dragmath_js {
|
ENDDRAGMATHJS |
ENDDRAGMATHJS |
} |
} |
|
|
|
############################################## |
|
############################################## |
|
|
|
=pod |
|
|
|
=item &dependencies_button() |
|
|
|
Creates a button that launches a popup-window, in which dependencies |
|
for the web page in the main window can be added to, replaced or deleted. |
|
|
|
=cut |
|
|
|
sub dependencies_button { |
|
my $buttontext=&mt('Manage Dependencies'); |
|
return <<"END"; |
|
<input type="button" value="$buttontext" onclick="javascript:dependencycheck();" /> |
|
END |
|
} |
|
|
|
############################################## |
|
|
|
=pod |
|
|
|
=item &dependencycheck_js() |
|
|
|
Javascript used to open pop-up window containing interface to manage |
|
dependencies for a web page uploaded diretcly to a course. |
|
|
|
=cut |
|
|
|
sub dependencycheck_js { |
|
my ($symb,$title) = @_; |
|
my $link = '/adm/dependencies?symb='.&HTML::Entities::encode($symb,'<>&"'). |
|
'&title='.&HTML::Entities::encode($title,'<>&"'); |
|
return <<ENDJS; |
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
function dependencycheck() { |
|
depwin = window.open("$link","","width=750,height=500,resizable,scrollbars=yes"); |
|
} |
|
// ]]> |
|
</script> |
|
ENDJS |
|
} |
|
|
############################################## |
############################################## |
############################################## |
############################################## |
|
|
=pod |
=pod |
|
|
=item authorbombs |
=item &authorbombs() |
|
|
=cut |
=cut |
|
|
Line 317 sub get_recent_frozen {
|
Line 362 sub get_recent_frozen {
|
|
|
=pod |
=pod |
|
|
=item textbox |
=item &textbox() |
|
|
=cut |
=cut |
|
|
Line 337 sub textbox {
|
Line 382 sub textbox {
|
|
|
=pod |
=pod |
|
|
=item checkbox |
=item &checkbox() |
|
|
=cut |
=cut |
|
|
Line 359 sub checkbox {
|
Line 404 sub checkbox {
|
|
|
=pod |
=pod |
|
|
=item radiobutton |
=item &radiobutton() |
|
|
=cut |
=cut |
|
|
Line 383 sub radio {
|
Line 428 sub radio {
|
|
|
=pod |
=pod |
|
|
=item &date_setter |
=item &date_setter() |
|
|
&date_setter returns html and javascript for a compact date-setting form. |
&date_setter returns html and javascript for a compact date-setting form. |
To retrieve values from it, use &get_date_from_form(). |
To retrieve values from it, use &get_date_from_form. |
|
|
Inputs |
Inputs |
|
|
Line 636 sub build_url {
|
Line 681 sub build_url {
|
|
|
=pod |
=pod |
|
|
=item &get_date_from_form |
=item &get_date_from_form() |
|
|
get_date_from_form retrieves the date specified in an &date_setter form. |
get_date_from_form retrieves the date specified in an &date_setter form. |
|
|
Line 895 of items completed and an estimate of th
|
Line 940 of items completed and an estimate of th
|
=over 4 |
=over 4 |
|
|
|
|
=item &Create_PrgWin |
=item &Create_PrgWin() |
|
|
Writes javascript to the client to open a progress window and returns a |
Writes javascript to the client to open a progress window and returns a |
data structure used for bookkeeping. |
data structure used for bookkeeping. |
Line 906 Inputs
|
Line 951 Inputs
|
|
|
=item $r Apache request |
=item $r Apache request |
|
|
=item $title The title of the progress window |
|
|
|
=item $heading A description (usually 1 line) of the process being initiated. |
|
|
|
=item $number_to_do The total number of items being processed. |
=item $number_to_do The total number of items being processed. |
|
|
=item $type Either 'popup' or 'inline' (popup is assumed if nothing is |
|
specified) |
|
|
|
=item $width Specify the width in charaters of the input field. |
|
|
|
=item $formname Only useful in the inline case, if a form already exists, this needs to be used and specfiy the name of the form, otherwise the Progress line will be created in a new form of it's own |
|
|
|
=item $inputname Only useful in the inline case, if a form and an input of type text exists, use this to specify the name of the input field |
|
|
|
=back |
=back |
|
|
Returns a hash containing the progress state data structure. |
Returns a hash containing the progress state data structure. |
|
|
|
|
=item &Update_PrgWin |
=item &Update_PrgWin() |
|
|
Updates the text in the progress indicator. Does not increment the count. |
Updates the text in the progress indicator. Does not increment the count. |
See &Increment_PrgWin. |
See &Increment_PrgWin. |
Line 946 Inputs:
|
Line 978 Inputs:
|
Returns: none |
Returns: none |
|
|
|
|
=item Increment_PrgWin |
=item Increment_PrgWin() |
|
|
Increment the count of items completed for the progress window by $step or 1 if no step is provided. |
Increment the count of items completed for the progress window by $step or 1 if no step is provided. |
|
|
Line 968 Inputs:
|
Line 1000 Inputs:
|
Returns: none |
Returns: none |
|
|
|
|
=item Close_PrgWin |
=item &Close_PrgWin() |
|
|
Closes the progress window. |
Closes the progress window. |
|
|
Line 1176 ENDEDITOR
|
Line 1208 ENDEDITOR
|
<script type="text/javascript" src="/adm/jpicker/js/jpicker-1.1.6.min.js" > |
<script type="text/javascript" src="/adm/jpicker/js/jpicker-1.1.6.min.js" > |
</script> |
</script> |
<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" src='/adm/countdown/css/jquery.countdown.css' /> |
<link rel="stylesheet" type="text/css" href="/adm/countdown/css/jquery.countdown.css" /> |
ENDJQUERY |
ENDJQUERY |
return $s; |
return $s; |
} |
} |
Line 1494 clientTime = (new Date()).getTime();
|
Line 1526 clientTime = (new Date()).getTime();
|
|
|
=pod |
=pod |
|
|
=item breadcrumbs |
=item &breadcrumbs() |
|
|
Compiles the previously registered breadcrumbs into an series of links. |
Compiles the previously registered breadcrumbs into an series of links. |
Additionally supports a 'component', which will be displayed on the |
Additionally supports a 'component', which will be displayed on the |
Line 1512 Inputs: $component (the text on the righ
|
Line 1544 Inputs: $component (the text on the righ
|
when including the text on the right. |
when including the text on the right. |
Returns a string containing breadcrumbs for the current page. |
Returns a string containing breadcrumbs for the current page. |
|
|
=item clear_breadcrumbs |
=item &clear_breadcrumbs() |
|
|
Clears the previously stored breadcrumbs. |
Clears the previously stored breadcrumbs. |
|
|
=item add_breadcrumb |
=item &add_breadcrumb() |
|
|
Pushes a breadcrumb on the stack of crumbs. |
Pushes a breadcrumb on the stack of crumbs. |
|
|
Line 1675 returns: nothing
|
Line 1707 returns: nothing
|
push(@Crumbs,@_); |
push(@Crumbs,@_); |
} |
} |
|
|
=item add_breadcrumb_tool($category, $html) |
=item &add_breadcrumb_tool($category, $html) |
|
|
Adds $html to $category of the breadcrumb toolbar container. |
Adds $html to $category of the breadcrumb toolbar container. |
|
|
Line 1718 returns: nothing
|
Line 1750 returns: nothing
|
push @{$tools{$category}}, @html; |
push @{$tools{$category}}, @html; |
} |
} |
|
|
=item clear_breadcrumb_tools() |
=item &clear_breadcrumb_tools() |
|
|
Clears the breadcrumb toolbar container. |
Clears the breadcrumb toolbar container. |
|
|
Line 1730 returns: nothing
|
Line 1762 returns: nothing
|
undef(%tools); |
undef(%tools); |
} |
} |
|
|
=item render_tools(\$breadcrumbs) |
=item &render_tools(\$breadcrumbs) |
|
|
Creates html for breadcrumb tools (categories navigation and tools) and inserts |
Creates html for breadcrumb tools (categories navigation and tools) and inserts |
\$breadcrumbs at the correct position. |
\$breadcrumbs at the correct position. |
Line 1739 input: \$breadcrumbs - a reference to th
|
Line 1771 input: \$breadcrumbs - a reference to th
|
breadcrumbs. |
breadcrumbs. |
|
|
returns: nothing |
returns: nothing |
|
|
=cut |
=cut |
|
|
#TODO might split this in separate functions for each category |
#TODO might split this in separate functions for each category |
Line 1754 returns: nothing
|
Line 1787 returns: nothing
|
{ listattr => { class=>'LC_breadcrumb_tools_outerlist' } }); |
{ listattr => { class=>'LC_breadcrumb_tools_outerlist' } }); |
} |
} |
|
|
=item render_advtools(\$breadcrumbs) |
=pod |
|
|
|
=item &render_advtools(\$breadcrumbs) |
|
|
Creates html for advanced tools (category advtools) and inserts \$breadcrumbs |
Creates html for advanced tools (category advtools) and inserts \$breadcrumbs |
at the correct position. |
at the correct position. |
Line 1763 input: \$breadcrumbs - a reference to th
|
Line 1798 input: \$breadcrumbs - a reference to th
|
breadcrumbs (after render_tools call). |
breadcrumbs (after render_tools call). |
|
|
returns: nothing |
returns: nothing |
|
|
=cut |
=cut |
|
|
sub render_advtools { |
sub render_advtools { |
Line 2763 sub scripttag {
|
Line 2799 sub scripttag {
|
return htmltag('script', $content, {type => 'text/javascript'}); |
return htmltag('script', $content, {type => 'text/javascript'}); |
}; |
}; |
|
|
|
=pod |
|
|
=item list_from_array( \@array, { listattr =>{}, itemattr =>{} } ) |
=item &list_from_array( \@array, { listattr =>{}, itemattr =>{} } ) |
|
|
Constructs a XHTML list from \@array. |
Constructs a XHTML list from \@array. |
|
|
Line 2855 sub generate_menu {
|
Line 2892 sub generate_menu {
|
$$link{alttext} : $$link{linktext}) |
$$link{alttext} : $$link{linktext}) |
}), { |
}), { |
href => $$link{url}, |
href => $$link{url}, |
title => mt($$link{linktitle}) |
title => mt($$link{linktitle}), |
|
class => 'LC_menubuttons_link' |
}). |
}). |
$a->(mt($$link{linktext}), { |
$a->(mt($$link{linktext}), { |
href => $$link{url}, |
href => $$link{url}, |
Line 2889 sub generate_menu {
|
Line 2927 sub generate_menu {
|
|
|
=pod |
=pod |
|
|
=item &start_funclist |
=item &start_funclist() |
|
|
Start list of available functions |
Start list of available functions |
|
|
Line 2929 sub start_funclist {
|
Line 2967 sub start_funclist {
|
|
|
=pod |
=pod |
|
|
=item &add_item_funclist |
=item &add_item_funclist() |
|
|
Adds an item to the list of available functions |
Adds an item to the list of available functions |
|
|
Line 2955 sub add_item_funclist {
|
Line 2993 sub add_item_funclist {
|
|
|
=pod |
=pod |
|
|
=item &end_funclist |
=item &end_funclist() |
|
|
End list of available functions |
End list of available functions |
|
|
Line 2976 sub end_funclist {
|
Line 3014 sub end_funclist {
|
|
|
=pod |
=pod |
|
|
=item funclist_from_array( \@array, {legend => 'text for legend'} ) |
=item &funclist_from_array( \@array, {legend => 'text for legend'} ) |
|
|
Constructs a XHTML list from \@array with the first item being visually |
Constructs a XHTML list from \@array with the first item being visually |
highlighted and set to the value of legend or 'Functions' if legend is |
highlighted and set to the value of legend or 'Functions' if legend is |