[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonhtmlcommon.pm
raeburn
raeburn at source.lon-capa.org
Sun Sep 9 17:16:35 EDT 2018
raeburn Sun Sep 9 21:16:35 2018 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonhtmlcommon.pm
Log:
- For 2.11
Backport 1.389, 1.390
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.358.2.13 loncom/interface/lonhtmlcommon.pm:1.358.2.14
--- loncom/interface/lonhtmlcommon.pm:1.358.2.13 Mon Sep 3 20:37:00 2018
+++ loncom/interface/lonhtmlcommon.pm Sun Sep 9 21:16:34 2018
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.358.2.13 2018/09/03 20:37:00 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.358.2.14 2018/09/09 21:16:34 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1009,10 +1009,13 @@
=item $number_to_do The total number of items being processed.
+=item $preamble Optional HTML to display before the progress bar.
+
=back
Returns a hash containing the progress state data structure.
-
+If $number_to_do is zero or null, an indeterminate progress bar will
+be used.
=item &Update_PrgWin()
@@ -1082,20 +1085,20 @@
# Create progress
sub Create_PrgWin {
- my ($r,$number_to_do)=@_;
+ my ($r,$number_to_do,$preamble)=@_;
my %prog_state;
$prog_state{'done'}=0;
$prog_state{'firststart'}=&Time::HiRes::time();
$prog_state{'laststart'}=&Time::HiRes::time();
$prog_state{'max'}=$number_to_do;
- &Apache::loncommon::LCprogressbar($r);
+ &Apache::loncommon::LCprogressbar($r,$prog_state{'max'},$preamble);
return %prog_state;
}
# update progress
sub Update_PrgWin {
my ($r,$prog_state,$displayString)=@_;
- &Apache::loncommon::LCprogressbarUpdate($r,undef,$displayString);
+ &Apache::loncommon::LCprogressbarUpdate($r,undef,$displayString,$$prog_state{'max'});
$$prog_state{'laststart'}=&Time::HiRes::time();
}
@@ -1145,7 +1148,7 @@
if ($$prog_state{'max'}) {
$percent=int(100.*$current/$$prog_state{'max'});
}
- &Apache::loncommon::LCprogressbarUpdate($r,$percent,$timeinfo);
+ &Apache::loncommon::LCprogressbarUpdate($r,$percent,$timeinfo,$$prog_state{'max'});
$$prog_state{'laststart'}=&Time::HiRes::time();
}
@@ -1265,9 +1268,9 @@
ENDEDITOR
}
$s.=(<<ENDJQUERY);
-<script type="text/javascript" src="/adm/jQuery/js/jquery-1.11.3.min.js"></script>
-<script type="text/javascript" src="/adm/jQuery/js/jquery-ui-1.11.4.custom.min.js"></script>
-<link rel="stylesheet" type="text/css" href="/adm/jQuery/css/smoothness/jquery-ui-1.11.4.custom.css" />
+<script type="text/javascript" src="/adm/jQuery/js/jquery-3.2.1.min.js"></script>
+<script type="text/javascript" src="/adm/jQuery/js/jquery-ui-1.12.1.custom.min.js"></script>
+<link rel="stylesheet" type="text/css" href="/adm/jQuery/css/smoothness/jquery-ui-1.12.1.custom.min.css" />
<script type="text/javascript" src="/adm/jpicker/js/jpicker-1.1.6.min.js" >
</script>
<link rel="stylesheet" type="text/css" href="/adm/jpicker/css/jPicker-1.1.6.min.css" />
More information about the LON-CAPA-cvs
mailing list