Diff for /loncom/interface/londocs.pm between versions 1.337 and 1.341

version 1.337, 2009/02/04 14:45:51 version 1.341, 2009/02/12 15:45:38
Line 1899  END Line 1899  END
     }      }
           
     my $orig_url = $url;      my $orig_url = $url;
       $orig_url=~s{http(:|:)//https(:|:)//}{https$2//};
     my $external = ($url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/});      my $external = ($url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/});
     if ((!$isfolder) && ($residx) && ($folder!~/supplemental/) && (!$ispage)) {      if ((!$isfolder) && ($residx) && ($folder!~/supplemental/) && (!$ispage)) {
  my $symb=&Apache::lonnet::symbclean(   my $symb=&Apache::lonnet::symbclean(
Line 2888  HIDDENFORM Line 2889  HIDDENFORM
     }      }
 # --------------------------------------------------------- Main tab structure  # --------------------------------------------------------- Main tab structure
     my $activeClass = 1;      my $activeClass = 1;
     $r->print('<div class="LC_ContentBoxSpecial"><ul class="LC_TabContent" id="mainnav">');      $r->print('<ul class="LC_TabContentBigger" id="mainnav">');
     if (($standard) && ($allowed) && (!$forcesupplement)) {      if (($standard) && ($allowed) && (!$forcesupplement)) {
  my $active = '';   my $active = '';
         if($activeClass == 1){          if($activeClass == 1){
Line 2905  HIDDENFORM Line 2906  HIDDENFORM
  $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Supplemental Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>');   $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Supplemental Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>');
     }      }
     $r->print('<li onclick="javascript:showPage(this,\'Special Admin Options\',\'mainnav\',\'maincoursedoc\');">'.&mt('Special Admin Options').'</li>');      $r->print('<li onclick="javascript:showPage(this,\'Special Admin Options\',\'mainnav\',\'maincoursedoc\');">'.&mt('Special Admin Options').'</li>');
     $r->print('</ul><div id="maincoursedoc" style="margin:0 0;padding:0 0;">');      $r->print('</ul><div class="LC_ContentBoxSpecial" style="margin:0 0;padding:0 0;"><div id="maincoursedoc" style="margin:0 0;padding:0 0;">');
 # --------------------------------------------------------- Standard documents  # --------------------------------------------------------- Standard documents
     if (($standard) && ($allowed) && (!$forcesupplement)) {      if (($standard) && ($allowed) && (!$forcesupplement)) {
        my $active = 'style="display: none;"';         my $active = 'style="display: none;"';
Line 2928  HIDDENFORM Line 2929  HIDDENFORM
        } else {         } else {
            #$postexec='self.close();';             #$postexec='self.close();';
        }         }
        $hadchanges=0;  #       $hadchanges=0;
        if ($hadchanges) {  # my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
    &mark_hash_old();  #       if ($error) {
        }  #           $r->print('<p><span class="LC_error">'.$error.'</span></p>');
        &changewarning($r,$postexec);  #       }
   #       if ($hadchanges) {
   #   &mark_hash_old();
   #       }
   #
   #       &changewarning($r,$postexec);
        my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.         my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.
                      '.sequence';                       '.sequence';
        my $pageseq = '/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.         my $pageseq = '/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.
Line 3150  my $content='content'; Line 3156  my $content='content';
 my $navigation='navigation';  my $navigation='navigation';
 my $varcd = 'Main Course Documents';  my $varcd = 'Main Course Documents';
 $r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash));   $r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash)); 
 my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);   $hadchanges=0;
           my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
        if ($error) {         if ($error) {
            $r->print('<p><span class="LC_error">'.$error.'</span></p>');             $r->print('<p><span class="LC_error">'.$error.'</span></p>');
        }         }
          if ($hadchanges) {
              &mark_hash_old();
          }
   
          &changewarning($r,'');
 $r->print('</div>');  $r->print('</div>');
       }        }
        if ($env{'form.pagepath'}) {         if ($env{'form.pagepath'}) {
Line 3365  sub generate_edit_table { Line 3377  sub generate_edit_table {
             $form .= '<li onclick="javascript:showPage(this, \''.$tid.$orderhash{$name}.'\', \''.$navigation.$tid.'\',\''.$content.$tid.'\');">'.&mt($orderhash{$name}).'</li>';              $form .= '<li onclick="javascript:showPage(this, \''.$tid.$orderhash{$name}.'\', \''.$navigation.$tid.'\',\''.$content.$tid.'\');">'.&mt($orderhash{$name}).'</li>';
         }          }
     }      }
       $form .= '</ul>';
     $form .= '<div id="'.$content.$tid.'" style="padding: 0 0; margin: 0 0;">';      $form .= '<div id="'.$content.$tid.'" style="padding: 0 0; margin: 0 0;">';
     foreach my $field (keys(%namehash)){      foreach my $field (keys(%namehash)){
         $form .= '<div id="'.$tid.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>';          $form .= '<div id="'.$tid.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>';

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


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