--- loncom/interface/loncommon.pm 2011/12/21 18:01:58 1.1042 +++ loncom/interface/loncommon.pm 2011/12/22 00:17:04 1.1045 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1042 2011/12/21 18:01:58 www Exp $ +# $Id: loncommon.pm,v 1.1045 2011/12/22 00:17:04 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -6563,6 +6563,10 @@ a#LC_content_toolbar_changefolder_toggle background-image:url(/res/adm/pages/open-all-folders.gif); } +a#LC_content_toolbar_edittoplevel { + background-image:url(/res/adm/pages/edittoplevel.gif); +} + ul#LC_toolbar li a:hover { background-position: bottom center; } @@ -7142,12 +7146,11 @@ sub end_togglebox { } sub LCprogressbar_script { + my ($id)=@_; return(< // @@ -7177,20 +7182,23 @@ ENDPROGRESSUPDATE } my $LClastpercent; +my $LCidcnt; +my $LCcurrentid; sub LCprogressbar { my ($r)=(@_); $LClastpercent=0; + $LCidcnt++; + $LCcurrentid=$$.'_'.$LCidcnt; my $starting=&mt('Starting'); my $content=(< -
+
$starting

ENDPROGBAR - $r->print($content.&LCprogressbar_script()); - $r->rflush(); + &r_print($r,$content.&LCprogressbar_script($LCcurrentid)); } sub LCprogressbarUpdate { @@ -7207,27 +7215,35 @@ sub LCprogressbarUpdate { $LClastpercent=$val; unless ($text) { $text=$val.'%'; } $text=&js_ready($text); - $r->print(< // ENDUPDATE - $r->rflush(); } sub LCprogressbarClose { my ($r)=@_; $LClastpercent=0; - $r->print(< // ENDCLOSE - $r->rflush(); +} + +sub r_print { + my ($r,$to_print)=@_; + if ($r) { + $r->print($to_print); + $r->rflush(); + } else { + print($to_print); + } } sub html_encode { @@ -7237,6 +7253,7 @@ sub html_encode { return $result; } + sub js_ready { my ($result) = @_;