version 1.181, 2008/09/25 17:44:11
|
version 1.191, 2008/12/03 19:34:01
|
Line 102 can be used to paste LaTeX into a textar
|
Line 102 can be used to paste LaTeX into a textar
|
=cut |
=cut |
|
|
sub dragmath_js { |
sub dragmath_js { |
|
my ($popup) = @_; |
return <<ENDDRAGMATHJS; |
return <<ENDDRAGMATHJS; |
<script type="text/javascript"> |
<script type="text/javascript"> |
function mathedit(textarea, doc) { |
function mathedit(textarea, doc) { |
targetEntry = textarea; |
targetEntry = textarea; |
targetDoc = doc; |
targetDoc = doc; |
newwin = window.open("/adm/dragmath/applet/EditMathPopup.html","","width=565,height=500,resizable"); |
newwin = window.open("/adm/dragmath/applet/$popup.html","","width=565,height=500,resizable"); |
} |
} |
</script> |
</script> |
|
|
ENDDRAGMATHJS |
ENDDRAGMATHJS |
} |
} |
|
|
|
|
############################################## |
############################################## |
############################################## |
############################################## |
|
|
Line 1706 sub email_default_row {
|
Line 1708 sub email_default_row {
|
|
|
sub submit_row { |
sub submit_row { |
my ($title,$cmd,$submit_text,$css_class) = @_; |
my ($title,$cmd,$submit_text,$css_class) = @_; |
|
$submit_text = &mt($submit_text); |
my $output = &row_title($title,$css_class,'LC_pick_box_submit'); |
my $output = &row_title($title,$css_class,'LC_pick_box_submit'); |
$output .= qq| |
$output .= qq| |
<br /> |
<br /> |
Line 2002 END
|
Line 2005 END
|
return $scripttag; |
return $scripttag; |
} |
} |
|
|
|
############################################## |
|
############################################## |
|
|
|
# generate_menu |
|
# |
|
# Generates html markup for a menu. |
|
# |
|
# Inputs: |
|
# An array of following structure: |
|
# ({ categorytitle => 'Categorytitle', |
|
# items => [ |
|
# { linktext => 'Text to be displayed', |
|
# url => 'URL the link is pointing to, i.e. /adm/site?action=dosomething', |
|
# permission => 'Contains permissions as returned from lonnet::allowed(), |
|
# must evaluate to true in order to activate the link', |
|
# icon => 'icon filename', |
|
# alttext => 'alt text for the icon', |
|
# help => 'Name of the corresponding helpfile', |
|
# linktitle => 'Description of the link (used for title tag)' |
|
# }, |
|
# ... |
|
# ] |
|
# }, |
|
# ... |
|
# ) |
|
# |
|
# Outputs: A scalar containing the html markup for the menu. |
|
|
|
# ---- Remove when done ---- |
|
# This routine is part of the redesign of LON-CAPA and it's |
|
# subject to change during this project. |
|
# Don't rely on its current functionality as it might be |
|
# changed or removed. |
|
# TODO: |
|
# check for empty values |
|
# -------------------------- |
|
|
|
sub generate_menu { |
|
my @menu = @_; |
|
my $menu_html = qq|<div class="columnSection">|; |
|
|
|
foreach my $category (@menu) { #FIXME: insert appropriate classnames for styles when they're finished. |
|
$menu_html .='<div class="ContentBoxSpecial"> |
|
<h3 class="hcell">'.mt($category->{'categorytitle'}).'</h3> |
|
<ul class="ListStyleNormal">'; |
|
foreach my $item ( @{ $category->{items} } ) { |
|
next unless $item->{'permission'}; |
|
$menu_html .= qq|<li class="LC_menubuttons_inline_text"><a href="$item->{'url'}" title="|.mt($item->{'linktitle'}).'">'; |
|
if($item->{'icon'}){ |
|
$menu_html .= qq|<img class ="noBorder middle" src="/res/adm/pages/$item->{'icon'}" alt="|; |
|
if($item->{'alttext'}){ |
|
$menu_html .= $item->{'alttext'}.'"/></a>'; |
|
} else { #use linktext as alt text for the icon |
|
$menu_html .= qq|$item->{'linktext'}"/></a>|; |
|
} |
|
} |
|
$menu_html .= qq|<a href="$item->{'url'}" title="|.mt($item->{'linktitle'}).'">'; |
|
$menu_html .= mt($item->{'linktext'}).'</a>'; |
|
if (exists($item->{'help'})) { |
|
$menu_html .= Apache::loncommon::help_open_topic($item->{'help'}); |
|
} |
|
$menu_html .= '</li>'; |
|
} |
|
$menu_html .= '</div>'; |
|
} |
|
$menu_html .= qq|</div>|; |
|
return $menu_html; |
|
} |
|
|
|
|
1; |
1; |