--- loncom/interface/lonhtmlcommon.pm 2012/01/03 00:28:29 1.300 +++ 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.300 2012/01/03 00:28:29 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.306 2012/03/26 10:24:08 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1072,6 +1072,8 @@ sub Close_PrgWin { sub crumbs { my ($uri,$target,$prefix,$form,$skiplast)=@_; +# You cannot crumbnify uploaded or adm resources + if ($uri=~/^\/*(uploaded|adm)\//) { return &mt('(Internal Course/Group Content)'); } if ($target) { $target = ' target="'. &Apache::loncommon::escape_single($target).'"'; @@ -1109,6 +1111,7 @@ sub crumbs { if ($uri !~ m|/$|) { $output=~s|/$||; } $output.=''; + return $output; } @@ -1170,6 +1173,11 @@ ENDEDITOR + + + + ENDJQUERY return $s; } @@ -1298,8 +1306,33 @@ sub htmlareaselectactive { $(this).before("
Rich formatting »
"); $("#LC_rt_"+id).click(editorHandler); }); + $.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'})); @@ -1513,6 +1582,7 @@ returns: nothing $faq,$bug); } # + unless ($CourseBreadcrumbs) { @@ -1521,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); @@ -1537,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"; }