--- loncom/interface/lonhtmlcommon.pm 2012/03/20 13:36:19 1.303 +++ loncom/interface/lonhtmlcommon.pm 2012/03/26 10:24:08 1.306 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.303 2012/03/20 13:36:19 www Exp $ +# $Id: lonhtmlcommon.pm,v 1.306 2012/03/26 10:24:08 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1111,6 +1111,7 @@ sub crumbs { if ($uri !~ m|/$|) { $output=~s|/$||; } $output.=''; + return $output; } @@ -1175,6 +1176,8 @@ ENDEDITOR + + ENDJQUERY return $s; } @@ -1306,8 +1309,30 @@ sub htmlareaselectactive { $.fn.jPicker.defaults.images.clientPath="/adm/jpicker/images/"; $(".colorchooser").jPicker(); + }); '; + # Code to put a due date countdown in 'duedatecountdown' span. + # This is currently located in the breadcrumb headers. + # note that the dueDateLayout is internatinoalized below. + # Here document is used to support the substitution into the javascript below. + # ..which unfortunately necessitates escaping the $'s in the javascript. + + my $dueDateLayout = '' . &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn}') . ''; + $output .= < $lasttext}); + $links .= '
  • '; + my $icons = ''; $faq = $last->{'faq'} if (exists($last->{'faq'})); $bug = $last->{'bug'} if (exists($last->{'bug'})); @@ -1521,6 +1582,7 @@ returns: nothing $faq,$bug); } # + unless ($CourseBreadcrumbs) { @@ -1529,12 +1591,14 @@ returns: nothing $links = &htmltag('ul', $links, { class => "LC_CourseBreadcrumbs" }); } + if ($component) { $links = &htmltag('span', ( $no_mt ? $component : mt($component) ). ( $icons ? $icons : '' ), { class => 'LC_breadcrumbs_component' } ) - .$links; + .$links +; } &render_tools(\$links); @@ -1545,7 +1609,12 @@ returns: nothing # Return the @Crumbs stack to what we started with push(@Crumbs,$last); shift(@Crumbs); + + # Return the breadcrumb's line + + + return "$links"; }