--- loncom/interface/lonhtmlcommon.pm 2008/07/07 11:02:05 1.176
+++ loncom/interface/lonhtmlcommon.pm 2008/09/05 22:12:47 1.180
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.176 2008/07/07 11:02:05 foxr Exp $
+# $Id: lonhtmlcommon.pm,v 1.180 2008/09/05 22:12:47 riegler Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -68,33 +68,50 @@ use LONCAPA;
=pod
-=item dragmath
+=item dragmath_button
-Creates a button that will allow dragmath to edit an equation into
-a specified textbox.
+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.
- textarea - Name of the text area to edit.
=cut
-##############################################
-# TODO: Figure out a way to only emit the mathedit function once.
-# per html output document.
-#
+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 <$help_text
+ENDDRAGMATH
+}
+
##############################################
-sub dragmath {
- my ($textarea) = @_;
+=pod
- return <
+=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 {
+ return <
function mathedit(textarea, doc) {
targetEntry = textarea;
- targetDoc = doc;
+ targetDoc = doc;
newwin = window.open("/adm/dragmath/applet/EditMathPopup.html","","width=565,height=500,resizable");
}
-
-ENDDRAGMATH
+
+ENDDRAGMATHJS
}
##############################################
@@ -1293,6 +1310,8 @@ returns: nothing
my $faq = '';
my $bug = '';
my $help='';
+ # Crumb Symbol
+ my $crumbsymbol = ' ▶ ';
# The last breadcrumb does not have a link, so handle it separately.
my $last = pop(@Crumbs);
#
@@ -1316,7 +1335,7 @@ returns: nothing
});
}
my $links .=
- join('->',
+ join($crumbsymbol,
map {
$faq = $_->{'faq'} if (exists($_->{'faq'}));
$bug = $_->{'bug'} if (exists($_->{'bug'}));
@@ -1335,7 +1354,7 @@ returns: nothing
$result;
} @Crumbs
);
- $links .= '->' if ($links ne '');
+ $links .= $crumbsymbol if ($links ne '');
if ($last->{'no_mt'}) {
$links .= ''.$last->{'text'}.'';
} else {
@@ -1710,6 +1729,25 @@ 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 '
+