Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.335 and 1.341

version 1.335, 2012/11/30 11:28:51 version 1.341, 2013/02/05 16:22:27
Line 1396  sub htmlareaselectactive { Line 1396  sub htmlareaselectactive {
     #   is used to determine when the countdown timer turns red to warn the user      #   is used to determine when the countdown timer turns red to warn the user
     #   to think about submitting.      #   to think about submitting.
   
     my $dueDateLayout = &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn} [_1]',"<span id='submitearly'></span>");      my $dueDateLayout = &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn} [_1]',
                               "<span id='submitearly'></span>");
     my $early = '- <b>'.&mt('Submit Early').'</b>';      my $early = '- <b>'.&mt('Submit Early').'</b>';
     my $pastdue = '- <b>'.&mt('Past Due').'</b>';      my $pastdue = '- <b>'.&mt('Past Due').'</b>';
     $output .= <<JAVASCRIPT;      $output .= <<JAVASCRIPT;
Line 1760  returns: nothing Line 1761  returns: nothing
                              .$links                                .$links 
 ;  ;
         }          }
                   my $nav_and_tools = 0;
         &render_tools(\$links);          foreach my $item ('navigation','tools') {
         $links = &htmltag('div', $links,               if (ref($tools{$item}) eq 'ARRAY') {
                         { id => "LC_breadcrumbs" }) unless ($CourseBreadcrumbs) ;                  $nav_and_tools += scalar(@{$tools{$item}})
         &render_advtools(\$links);              }
           }
           if (($links ne '') || ($nav_and_tools)) {
               &render_tools(\$links);
               $links = &htmltag('div', $links, 
                                 { id => "LC_breadcrumbs" }) unless ($CourseBreadcrumbs) ;
           }
           my $adv_tools = 0;
           if (ref($tools{'advtools'}) eq 'ARRAY') {
               $adv_tools = scalar(@{$tools{'advtools'}});
           }
           if (($links ne '') || ($adv_tools)) {
               &render_advtools(\$links);
           }
   
         # Return the @Crumbs stack to what we started with          # Return the @Crumbs stack to what we started with
         push(@Crumbs,$last);          push(@Crumbs,$last);
Line 1895  returns: nothing Line 1909  returns: nothing
 sub docs_breadcrumbs {  sub docs_breadcrumbs {
     my ($allowed,$crstype,$contenteditor,$title,$precleared)=@_;      my ($allowed,$crstype,$contenteditor,$title,$precleared)=@_;
     my ($folderpath,@folders);      my ($folderpath,@folders);
     if ($env{'form.pagepath'}) {      @folders = split('&',$env{'form.folderpath'});
         @folders = split('&',$env{'form.pagepath'});  
     } else {  
         @folders = split('&',$env{'form.folderpath'});  
     }  
     my $plain='';      my $plain='';
       my $container = 'sequence';
     my ($randompick,$isencrypted,$ishidden,$is_random_order) = (-1,0,0,0);      my ($randompick,$isencrypted,$ishidden,$is_random_order) = (-1,0,0,0);
     my @docs_crumbs;      my @docs_crumbs;
     while (@folders) {      while (@folders) {
Line 1916  sub docs_breadcrumbs { Line 1927  sub docs_breadcrumbs {
         }          }
         $url .= &escape($folderpath);          $url .= &escape($folderpath);
         my $name=&unescape($foldername);          my $name=&unescape($foldername);
 # each of randompick number, hidden, encrypted, random order are   # each of randompick number, hidden, encrypted, random order, is_page 
 # appended with ":"s to the foldername  # are appended with ":"s to the foldername
         $name=~s/\:(\d*)\:(\w*)\:(\w*):(\d*)$//;          $name=~s/\:(\d*)\:(\w*)\:(\w*):(\d*)\:?(\d*)$//;
         if ($contenteditor) {           if ($contenteditor) { 
             if ($1 ne '') {              if ($1 ne '') {
                 $randompick=$1;                  $randompick=$1;
Line 1928  sub docs_breadcrumbs { Line 1939  sub docs_breadcrumbs {
             if ($2) { $ishidden=1; }              if ($2) { $ishidden=1; }
             if ($3) { $isencrypted=1; }              if ($3) { $isencrypted=1; }
             if ($4 ne '') { $is_random_order = 1; }              if ($4 ne '') { $is_random_order = 1; }
               if ($5 == 1) {$container = 'page'; }
         }          }
         if ($folder eq 'supplemental') {          if ($folder eq 'supplemental') {
             $name = &mt('Supplemental '.$crstype.' Contents');              $name = &mt('Supplemental '.$crstype.' Contents');
Line 1964  sub docs_breadcrumbs { Line 1976  sub docs_breadcrumbs {
         return (&breadcrumbs(undef,undef,$menulink,'nohelp',undef,undef,          return (&breadcrumbs(undef,undef,$menulink,'nohelp',undef,undef,
                              $contenteditor),                               $contenteditor),
                              $randompick,$ishidden,$isencrypted,$plain,                               $randompick,$ishidden,$isencrypted,$plain,
                              $is_random_order);                               $is_random_order,$container);
     } else {      } else {
         return \@docs_crumbs;          return \@docs_crumbs;
     }      }
Line 2197  sub course_selection { Line 2209  sub course_selection {
   
     my $courseform='<b>'.&Apache::loncommon::selectcourse_link      my $courseform='<b>'.&Apache::loncommon::selectcourse_link
                      ($formname,'pickcourse','pickdomain','coursedesc','',1,$crstype).'</b>';                       ($formname,'pickcourse','pickdomain','coursedesc','',1,$crstype).'</b>';
         $output .= '<input type="radio" name="coursepick" value="all" onclick="coursePick(this.form)" />'.$allcrs.'<br />';          $output .= '<label><input type="radio" name="coursepick" value="all" onclick="coursePick(this.form)" />'.$allcrs.'</label><br />';
     if ($totcodes > 0) {      if ($totcodes > 0) {
         my $numtitles = @$codetitles;          my $numtitles = @$codetitles;
         if ($numtitles > 0) {          if ($numtitles > 0) {
             $output .= '<input type="radio" name="coursepick" value="category" onclick="coursePick(this.form);alert('."'".&mt('Choose categories, from left to right')."'".')" />'.&mt('Pick courses by category:').' <br />';              $output .= '<label><input type="radio" name="coursepick" value="category" onclick="coursePick(this.form);alert('."'".&mt('Choose categories, from left to right')."'".')" />'.&mt('Pick courses by category:').'</label><br />';
             $output .= '<table><tr><td>'.$$codetitles[0].'<br />'."\n".              $output .= '<table><tr><td>'.$$codetitles[0].'<br />'."\n".
                '<select name="'.$standardnames->[0].                 '<select name="'.$standardnames->[0].
                '" onChange="setPick(this.form);courseSet('."'$$codetitles[0]'".')">'."\n".                 '" onChange="setPick(this.form);courseSet('."'$$codetitles[0]'".')">'."\n".
Line 2242  sub course_selection { Line 2254  sub course_selection {
             $output .= '</tr></table><br />';              $output .= '</tr></table><br />';
         }          }
     }      }
     $output .= '<input type="radio" name="coursepick" value="specific" onclick="coursePick(this.form);opencrsbrowser('."'".$formname."','dccourse','dcdomain','coursedesc','','1','$crstype'".')" />'.$pickspec.' '.$courseform.'&nbsp;&nbsp;<input type="text" value="0" size="4" name="coursetotal" /><input type="hidden" name="courselist" value="" />selected.<br />'."\n";      $output .=
           '<label><input type="radio" name="coursepick" value="specific"'
          .' onclick="coursePick(this.form);opencrsbrowser('."'".$formname."','dccourse','dcdomain','coursedesc','','1','$crstype'".')" />'
          .$pickspec.'</label>'
          .' '.$courseform.'&nbsp;&nbsp;'
          .&mt('[_1] selected.',
                   '<input type="text" value="0" size="4" name="coursetotal" readonly="readonly" />'
                  .'<input type="hidden" name="courselist" value="" />')
          .'<br />'."\n";
     return $output;      return $output;
 }  }
   
Line 3027  PARAMSONE Line 3047  PARAMSONE
     }      }
     if ((chkh == 1) || (listwchange)) {      if ((chkh == 1) || (listwchange)) {
         var primaryheight = document.getElementById('LC_nav_bar').offsetHeight;          var primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
         var secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight;          var secondaryheight;
           if (document.getElementById('LC_secondary_menu') != null) { 
               secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight;
           }
         var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;          var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
         var dccidheight = 0;          var dccidheight = 0;
         if (document.getElementById('dccid') != null) {          if (document.getElementById('dccid') != null) {
Line 3118  ENDUTILITY Line 3141  ENDUTILITY
   
 sub jump_to_editres {  sub jump_to_editres {
     my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath,      my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath,
         $title,$idx,$suppurl) = @_;          $title,$idx,$suppurl,$todocs) = @_;
     my $jscall;      my $jscall;
     if ($switchserver) {      if ($switchserver) {
         if ($home) {          if ($home) {
Line 3162  sub jump_to_editres { Line 3185  sub jump_to_editres {
             if ($forcereg) {              if ($forcereg) {
                 $cfile .= (($cfile=~/\?/)?'&amp;':'?').'register=1';                  $cfile .= (($cfile=~/\?/)?'&amp;':'?').'register=1';
             }              }
               if ($todocs) {
                  $cfile .= (($cfile=~/\?/)?'&amp;':'?').'todocs=1';
               }
         }          }
         $jscall = "go('$cfile')";          $jscall = "go('$cfile')";
     }      }

Removed from v.1.335  
changed lines
  Added in v.1.341


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