Diff for /loncom/interface/loncommon.pm between versions 1.1044 and 1.1045

version 1.1044, 2011/12/21 21:25:40 version 1.1045, 2011/12/22 00:17:04
Line 7146  sub end_togglebox { Line 7146  sub end_togglebox {
 }  }
   
 sub LCprogressbar_script {  sub LCprogressbar_script {
      my ($id)=@_;
    return(<<ENDPROGRESS);     return(<<ENDPROGRESS);
 <script type="text/javascript">  <script type="text/javascript">
 // <![CDATA[  // <![CDATA[
 var LCprogressTxt='---';  \$('#progressbar$id').progressbar({
   
 \$('#progressbar').progressbar({  
   value: 0,    value: 0,
   change: function(event, ui) {    change: function(event, ui) {
     var newVal = \$(this).progressbar('option', 'value');      var newVal = \$(this).progressbar('option', 'value');
Line 7171  sub LCprogressbarUpdate_script { Line 7170  sub LCprogressbarUpdate_script {
 </style>  </style>
 <script type="text/javascript">  <script type="text/javascript">
 // <![CDATA[  // <![CDATA[
 function LCupdateProgress(percent,progresstext) {  var LCprogressTxt='---';
   
   function LCupdateProgress(percent,progresstext,id) {
    LCprogressTxt=progresstext;     LCprogressTxt=progresstext;
    \$('#progressbar').progressbar('value',percent);     \$('#progressbar'+id).progressbar('value',percent);
 }  }
 // ]]>  // ]]>
 </script>  </script>
Line 7181  ENDPROGRESSUPDATE Line 7182  ENDPROGRESSUPDATE
 }  }
   
 my $LClastpercent;  my $LClastpercent;
   my $LCidcnt;
   my $LCcurrentid;
   
 sub LCprogressbar {  sub LCprogressbar {
     my ($r)=(@_);      my ($r)=(@_);
     $LClastpercent=0;      $LClastpercent=0;
       $LCidcnt++;
       $LCcurrentid=$$.'_'.$LCidcnt;
     my $starting=&mt('Starting');      my $starting=&mt('Starting');
     my $content=(<<ENDPROGBAR);      my $content=(<<ENDPROGBAR);
 <p>  <p>
   <div id="progressbar">    <div id="progressbar$LCcurrentid">
     <span class="pblabel">$starting</span>      <span class="pblabel">$starting</span>
   </div>    </div>
 </p>  </p>
 ENDPROGBAR  ENDPROGBAR
     &r_print($r,$content.&LCprogressbar_script());      &r_print($r,$content.&LCprogressbar_script($LCcurrentid));
 }  }
   
 sub LCprogressbarUpdate {  sub LCprogressbarUpdate {
Line 7213  sub LCprogressbarUpdate { Line 7218  sub LCprogressbarUpdate {
     &r_print($r,<<ENDUPDATE);      &r_print($r,<<ENDUPDATE);
 <script type="text/javascript">  <script type="text/javascript">
 // <![CDATA[  // <![CDATA[
 LCupdateProgress($val,'$text');  LCupdateProgress($val,'$text','$LCcurrentid');
 // ]]>  // ]]>
 </script>  </script>
 ENDUPDATE  ENDUPDATE
Line 7225  sub LCprogressbarClose { Line 7230  sub LCprogressbarClose {
     &r_print($r,<<ENDCLOSE);      &r_print($r,<<ENDCLOSE);
 <script type="text/javascript">  <script type="text/javascript">
 // <![CDATA[  // <![CDATA[
 \$("#progressbar").hide('slow');   \$("#progressbar$LCcurrentid").hide('slow'); 
 // ]]>  // ]]>
 </script>  </script>
 ENDCLOSE  ENDCLOSE

Removed from v.1.1044  
changed lines
  Added in v.1.1045


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>