version 1.175, 2008/06/01 00:04:39
|
version 1.182, 2008/10/07 10:13:58
|
Line 62 use Apache::lonlocal;
|
Line 62 use Apache::lonlocal;
|
use Apache::lonnet; |
use Apache::lonnet; |
use LONCAPA; |
use LONCAPA; |
|
|
|
|
|
############################################## |
|
############################################## |
|
|
|
=pod |
|
|
|
=item dragmath_button |
|
|
|
Creates a button that launches a dragmath popup-window, in which an |
|
expression can be edited and pasted as LaTeX into a specified textarea. |
|
|
|
textarea - Name of the textarea to edit. |
|
helpicon - If true, show a help icon to the right of the button. |
|
|
|
=cut |
|
|
|
sub dragmath_button { |
|
my ($textarea,$helpicon) = @_; |
|
my $help_text; |
|
if ($helpicon) { |
|
$help_text = &Apache::loncommon::help_open_topic('Authoring_Math_Editor'); |
|
} |
|
my $buttontext=&mt('Edit Math'); |
|
return <<ENDDRAGMATH; |
|
<input type="button" value="$buttontext", onclick="javascript:mathedit('$textarea',document)" />$help_text |
|
ENDDRAGMATH |
|
} |
|
|
|
############################################## |
|
|
|
=pod |
|
|
|
=item dragmath_js |
|
|
|
Javascript used to open pop-up window containing dragmath applet which |
|
can be used to paste LaTeX into a textarea. |
|
|
|
=cut |
|
|
|
sub dragmath_js { |
|
my ($popup) = @_; |
|
return <<ENDDRAGMATHJS; |
|
<script type="text/javascript"> |
|
function mathedit(textarea, doc) { |
|
targetEntry = textarea; |
|
targetDoc = doc; |
|
newwin = window.open("/adm/dragmath/applet/$popup.html","","width=565,height=500,resizable"); |
|
} |
|
</script> |
|
|
|
ENDDRAGMATHJS |
|
} |
|
|
|
|
############################################## |
############################################## |
############################################## |
############################################## |
|
|
Line 1258 returns: nothing
|
Line 1312 returns: nothing
|
my $faq = ''; |
my $faq = ''; |
my $bug = ''; |
my $bug = ''; |
my $help=''; |
my $help=''; |
|
# Crumb Symbol |
|
my $crumbsymbol = ' ▶ '; |
# The last breadcrumb does not have a link, so handle it separately. |
# The last breadcrumb does not have a link, so handle it separately. |
my $last = pop(@Crumbs); |
my $last = pop(@Crumbs); |
# |
# |
Line 1281 returns: nothing
|
Line 1337 returns: nothing
|
}); |
}); |
} |
} |
my $links .= |
my $links .= |
join('->', |
join($crumbsymbol, |
map { |
map { |
$faq = $_->{'faq'} if (exists($_->{'faq'})); |
$faq = $_->{'faq'} if (exists($_->{'faq'})); |
$bug = $_->{'bug'} if (exists($_->{'bug'})); |
$bug = $_->{'bug'} if (exists($_->{'bug'})); |
Line 1300 returns: nothing
|
Line 1356 returns: nothing
|
$result; |
$result; |
} @Crumbs |
} @Crumbs |
); |
); |
$links .= '->' if ($links ne ''); |
$links .= $crumbsymbol if ($links ne ''); |
if ($last->{'no_mt'}) { |
if ($last->{'no_mt'}) { |
$links .= '<b>'.$last->{'text'}.'</b>'; |
$links .= '<b>'.$last->{'text'}.'</b>'; |
} else { |
} else { |
Line 1429 END
|
Line 1485 END
|
return $output; |
return $output; |
} |
} |
|
|
|
sub row_headline { |
|
my $output = <<"END"; |
|
<tr><td colspan="2"> |
|
END |
|
return $output; |
|
} |
|
|
sub row_title { |
sub row_title { |
my ($title,$css_title_class,$css_value_class) = @_; |
my ($title,$css_title_class,$css_value_class) = @_; |
$css_title_class ||= 'LC_pick_box_title'; |
$css_title_class ||= 'LC_pick_box_title'; |
Line 1675 sub course_custom_roles {
|
Line 1738 sub course_custom_roles {
|
|
|
############################################## |
############################################## |
############################################## |
############################################## |
|
|
|
# topic_bar |
|
# |
|
# Generates a div containing a numbered (static image) followed by a title |
|
# with a background color defined in the corresponding CSS: LC_topic_bar |
|
# |
|
sub topic_bar { |
|
my ($imgnum,$title) = @_; |
|
return ' |
|
<div class="LC_topic_bar"> |
|
<img alt="'.&mt('Step [_1]',$imgnum). |
|
'"src="/res/adm/pages/bl_step'.$imgnum.'.gif" /> |
|
<span>'.$title.'</span> |
|
</div> |
|
'; |
|
} |
|
|
|
############################################## |
|
############################################## |
|
|
# echo_form_input |
# echo_form_input |
# |
# |
Line 1922 END
|
Line 2004 END
|
return $scripttag; |
return $scripttag; |
} |
} |
|
|
|
|
|
|
1; |
1; |
|
|
__END__ |
__END__ |