Diff for /loncom/interface/londocs.pm between versions 1.484.2.44 and 1.484.2.49

version 1.484.2.44, 2013/12/19 14:51:21 version 1.484.2.49, 2014/01/12 23:13:50
Line 1087  sub update_paste_buffer { Line 1087  sub update_paste_buffer {
     }      }
     &Apache::lonnet::appenv(\%addtoenv);      &Apache::lonnet::appenv(\%addtoenv);
     delete($env{'form.markcopy'});      delete($env{'form.markcopy'});
       return;
 }  }
   
 sub recurse_uploaded_maps {  sub recurse_uploaded_maps {
Line 1124  sub print_paste_buffer { Line 1125  sub print_paste_buffer {
   
     my @currpaste = split(/,/,$env{'docs.markedcopies'});      my @currpaste = split(/,/,$env{'docs.markedcopies'});
     my ($pasteitems,@pasteable);      my ($pasteitems,@pasteable);
       my $clipboardcount = 0;
   
 # Construct identifiers for current contents of user's paste buffer  # Construct identifiers for current contents of user's paste buffer
     foreach my $suffix (@currpaste) {      foreach my $suffix (@currpaste) {
Line 1132  sub print_paste_buffer { Line 1134  sub print_paste_buffer {
         my $url = $env{'docs.markedcopy_url_'.$suffix};          my $url = $env{'docs.markedcopy_url_'.$suffix};
         if (($cid =~ /^$match_domain\_$match_courseid$/) &&          if (($cid =~ /^$match_domain\_$match_courseid$/) &&
             ($url ne '')) {              ($url ne '')) {
               $clipboardcount ++;
             my ($is_external,$othercourse,$fromsupp,$is_uploaded_map,$parent,              my ($is_external,$othercourse,$fromsupp,$is_uploaded_map,$parent,
                 $canpaste,$nopaste,$othercrs,$areachange);                  $canpaste,$nopaste,$othercrs,$areachange);
             my $extension = (split(/\./,$env{'docs.markedcopy_url_'.$suffix}))[-1];              my $extension = (split(/\./,$env{'docs.markedcopy_url_'.$suffix}))[-1];
Line 1225  sub print_paste_buffer { Line 1228  sub print_paste_buffer {
         $pasteitems .= '<div style="padding:0;clear:both;margin:0;border:0"></div>';          $pasteitems .= '<div style="padding:0;clear:both;margin:0;border:0"></div>';
         $form_start = '<form name="pasteform" action="/adm/coursedocs" method="post" onsubmit="return validateClipboard();">';          $form_start = '<form name="pasteform" action="/adm/coursedocs" method="post" onsubmit="return validateClipboard();">';
         if (@pasteable) {          if (@pasteable) {
             $buttons = '<input type="submit" name="pastemarked" value="'.&mt('Paste selected').'" />'.('&nbsp;'x2);              my $value = &mt('Paste to current folder');
               if ($container eq 'page') {
                   $value = &mt('Paste to current page');
               }
               $buttons = '<input type="submit" name="pastemarked" value="'.$value.'" />'.('&nbsp;'x2);
           }
           $buttons .= '<input type="submit" name="clearmarked" value="'.&mt('Clear selected').'" />'.('&nbsp;'x2);
           if ($clipboardcount > 1) {
               $buttons .=
                   '<span style="text-decoration:line-through">'.('&nbsp;'x20).'</span>'.('&nbsp;'x2).
                   '<input type="button" name="checkallclip" value="'.&mt('Check all').'" style="height:20px;" onclick="checkClipboard();" />'.
                   ('&nbsp;'x2).
                   '<input type="button" name="uncheckallclip" value="'.&mt('Uncheck all').'" style="height:20px;" onclick="uncheckClipboard();" />'.
                   ('&nbsp;'x2);
         }          }
         $buttons .= '<input type="submit" name="clearmarked" value="'.&mt('Clear selected').'" />'.          $form_end = '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />'.
                     '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />';                      '</form>';
         $form_end = '</form>';  
     } else {      } else {
         $pasteitems = &mt('Clipboard is empty');          $pasteitems = &mt('Clipboard is empty');
     }      }
Line 1383  function validateClipboard() { Line 1398  function validateClipboard() {
     }      }
 }  }
   
   function checkClipboard() {
       if (document.pasteform.pasting.length > 1) {
           for (var i=0; i<document.pasteform.pasting.length; i++) {
               document.pasteform.pasting[i].checked = true;
           }
       }
       return;
   }
   
   function uncheckClipboard() {
       if (document.pasteform.pasting.length >1) {
           for (var i=0; i<document.pasteform.pasting.length; i++) {
               document.pasteform.pasting[i].checked = false;
           }
       }
       return;
   }
   
 END  END
   
 }  }
Line 3143  sub process_file_upload { Line 3176  sub process_file_upload {
         $quotatype = 'community';          $quotatype = 'community';
     } elsif ($env{'course.'.$coursedom.'_'.$coursenum.'.internal.instcode'}) {      } elsif ($env{'course.'.$coursedom.'_'.$coursenum.'.internal.instcode'}) {
         $quotatype = 'official';          $quotatype = 'official';
       } elsif ($env{'course.'.$coursedom.'_'.$coursenum.'.internal.textbook'}) {
           $quotatype = 'textbook';
     }      }
     if (&Apache::loncommon::get_user_quota($coursenum,$coursedom,'course',$quotatype)) {      if (&Apache::loncommon::get_user_quota($coursenum,$coursedom,'course',$quotatype)) {
         $filesize = int($filesize/1000); #expressed in kb          $filesize = int($filesize/1000); #expressed in kb
Line 3320  sub entryline { Line 3355  sub entryline {
   
     $renametitle=~s/\\/\\\\/g;      $renametitle=~s/\\/\\\\/g;
     $renametitle=~s/\&quot\;/\\\"/g;      $renametitle=~s/\&quot\;/\\\"/g;
       $renametitle=~s/\&#39\;/\\\'/g;
     $renametitle=~s/ /%20/g;      $renametitle=~s/ /%20/g;
     my $line=&Apache::loncommon::start_data_table_row();      my $line=&Apache::loncommon::start_data_table_row();
     my ($form_start,$form_end,$form_common,$form_param);      my ($form_start,$form_end,$form_common,$form_param);
Line 6651  ENDINJECT Line 6687  ENDINJECT
 sub dump_switchserver_js {  sub dump_switchserver_js {
     my @hosts = @_;      my @hosts = @_;
     my %lt = &Apache::lonlocal::texthash(      my %lt = &Apache::lonlocal::texthash(
         dump => 'Copying Content to Authoring Space requires switching server.',          dump => 'Copying content to Authoring Space requires switching server.',
         swit => 'Switch server?',          swit => 'Switch server?',
         duco => 'Copying Content to Authoring Space',          duco => 'Copying Content to Authoring Space',
         yone => 'You need to switch to a server housing an Authoring Space for which you are author or co-author.',          yone => 'You need to switch to a server housing an Authoring Space for which you are author or co-author.',

Removed from v.1.484.2.44  
changed lines
  Added in v.1.484.2.49


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