Diff for /loncom/interface/londocs.pm between versions 1.542 and 1.550

version 1.542, 2013/04/02 20:33:41 version 1.550, 2013/05/21 19:30:11
Line 340  sub group_import { Line 340  sub group_import {
                 }                  }
                 my $initialtext = &mt('Replace with your own content.');                  my $initialtext = &mt('Replace with your own content.');
                 my $newhtml = <<END;                  my $newhtml = <<END;
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  <html>
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">  
 <head>  <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
 <title>$name</title>  <title>$name</title>
 </head>  </head>
 <body bgcolor="#ffffff">  <body bgcolor="#ffffff">
Line 490  sub docs_change_log { Line 488  sub docs_change_log {
     }      }
     my $folderpath=$env{'form.folderpath'};      my $folderpath=$env{'form.folderpath'};
     if ($folderpath eq '') {      if ($folderpath eq '') {
         $folderpath = 'default&'.&escape(&mt('Main '.$crstype.' Content').':::::');          $folderpath = 'default&'.&escape(&mt('Main Content').':::::');
     }      }
     $pathitem = '<input type="hidden" name="folderpath" value="'.      $pathitem = '<input type="hidden" name="folderpath" value="'.
                 &HTML::Entities::encode($folderpath,'<>&"').'" />';                  &HTML::Entities::encode($folderpath,'<>&"').'" />';
Line 2269  sub update_parameter { Line 2267  sub update_parameter {
   
 sub handle_edit_cmd {  sub handle_edit_cmd {
     my ($coursenum,$coursedom) =@_;      my ($coursenum,$coursedom) =@_;
     return if ($env{'form.cmd'} eq '');      if ($env{'form.cmd'} eq '') {
           return 0;
       }
     my ($cmd,$idx)=split('_',$env{'form.cmd'});      my ($cmd,$idx)=split('_',$env{'form.cmd'});
   
     my $ratstr = $LONCAPA::map::resources[$LONCAPA::map::order[$idx]];      my $ratstr = $LONCAPA::map::resources[$LONCAPA::map::order[$idx]];
Line 2330  sub editor { Line 2330  sub editor {
     my $jumpto;      my $jumpto;
   
     unless ($supplementalflag) {      unless ($supplementalflag) {
         $jumpto = "'uploaded/$coursedom/$coursenum/$folder.$container'";          $jumpto = "uploaded/$coursedom/$coursenum/$folder.$container";
     }      }
   
     unless ($allowed) {      unless ($allowed) {
Line 2597  sub editor { Line 2597  sub editor {
   
     my ($to_show,$output,@allidx,@allmapidx,%filters,%lists,%curr_groups);      my ($to_show,$output,@allidx,@allmapidx,%filters,%lists,%curr_groups);
     %filters =  (      %filters =  (
                   canremove => [],                    canremove      => [],
                   cancut    => [],                    cancut         => [],
                   cancopy   => [],                    cancopy        => [],
                     hiddenresource => [],
                     encrypturl     => [],
                     randomorder    => [],
                     randompick     => [],
                 );                  );
     %curr_groups = &Apache::longroup::coursegroups();      %curr_groups = &Apache::longroup::coursegroups();
     &Apache::loncommon::start_data_table_count(); #setup a row counter       &Apache::loncommon::start_data_table_count(); #setup a row counter 
Line 2624  sub editor { Line 2628  sub editor {
   
     my $need_save;      my $need_save;
     if (($allowed) || ($supplementalflag && $folder eq 'supplemental')) {      if (($allowed) || ($supplementalflag && $folder eq 'supplemental')) {
         my $toolslink = '<table><tr><td>'          my $toolslink;
           if ($allowed || &Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
               $toolslink = '<table><tr><td>'
                        .&Apache::loncommon::help_open_menu('Navigation Screen',                         .&Apache::loncommon::help_open_menu('Navigation Screen',
                                                            'Navigation_Screen',undef,'RAT')                                                             'Navigation_Screen',undef,'RAT')
                        .'</td><td class="LC_middle">'.&mt('Tools:').'</td>'                         .'</td><td class="LC_middle">'.&mt('Tools:').'</td>'
Line 2634  sub editor { Line 2640  sub editor {
                        .'class="LC_toolbarItem" '                         .'class="LC_toolbarItem" '
                        .'title="'.&mt('Supplemental Content Editor').'">'                         .'title="'.&mt('Supplemental Content Editor').'">'
                        .'</a></li></ul></td></tr></table><br />';                         .'</a></li></ul></td></tr></table><br />';
           }
         if ($shown) {          if ($shown) {
             if ($allowed) {              if ($allowed) {
                 $to_show = &Apache::loncommon::start_scrollbox('900px','880px','400px','contentscroll')                  $to_show = &Apache::loncommon::start_scrollbox('900px','880px','400px','contentscroll')
Line 2649  sub editor { Line 2656  sub editor {
                 if ($folder !~ /^supplemental/) {                  if ($folder !~ /^supplemental/) {
                     $lists{'canhide'} = join(',',@allidx);                      $lists{'canhide'} = join(',',@allidx);
                     $lists{'canrandomlyorder'} = join(',',@allmapidx);                      $lists{'canrandomlyorder'} = join(',',@allmapidx);
                     foreach my $item ('canremove','cancut','cancopy') {                      my @possfilters = ('canremove','cancut','cancopy','hiddenresource','encrypturl',
                                          'randomorder','randompick');
                       foreach my $item (@possfilters) {
                         if (ref($filters{$item}) eq 'ARRAY') {                          if (ref($filters{$item}) eq 'ARRAY') {
                             $lists{$item} = join(',',@{$filters{$item}});                               if (@{$filters{$item}} > 0) {
                                   $lists{$item} = join(',',@{$filters{$item}});
                               }
                         }                          }
                     }                      }
                     if (@allidx > 0) {                      if (@allidx > 0) {
Line 2693  sub editor { Line 2704  sub editor {
             }              }
             $to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll')              $to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll')
                        .'<div class="LC_info" id="contentlist">'                         .'<div class="LC_info" id="contentlist">'
                        .&mt('Currently no documents.')                         .&mt('Currently empty')
                        .'</div>'                         .'</div>'
                        .&Apache::loncommon::end_scrollbox();                         .&Apache::loncommon::end_scrollbox();
         }          }
Line 2706  sub editor { Line 2717  sub editor {
                       .'</div>';                        .'</div>';
         } else {          } else {
             $to_show = '<div class="LC_info" id="contentlist">'              $to_show = '<div class="LC_info" id="contentlist">'
                       .&mt('Currently no documents.')                        .&mt('Currently empty')
                       .'</div>'                        .'</div>'
         }          }
     }      }
Line 2773  sub multiple_check_form { Line 2784  sub multiple_check_form {
         '<input type="hidden" name="allidx" value="'.$listsref->{'canhide'}.'" />';          '<input type="hidden" name="allidx" value="'.$listsref->{'canhide'}.'" />';
     if ($caller eq 'settings') {      if ($caller eq 'settings') {
         $output .=           $output .= 
         '<input type="hidden" name="allmapidx" value="'.$listsref->{'canrandomlyorder'}.'" />';          '<input type="hidden" name="allmapidx" value="'.$listsref->{'canrandomlyorder'}.'" />'."\n".
           '<input type="hidden" name="currhiddenresource" value="'.$listsref->{'hiddenresource'}.'" />'."\n".
           '<input type="hidden" name="currencrypturl" value="'.$listsref->{'encrypturl'}.'" />'."\n".
           '<input type="hidden" name="currrandomorder" value="'.$listsref->{'randomorder'}.'" />'."\n".
           '<input type="hidden" name="currrandompick" value="'.$listsref->{'randompick'}.'" />'."\n";
     } elsif ($caller eq 'actions') {      } elsif ($caller eq 'actions') {
         $output .=          $output .=
         '<input type="hidden" name="allremoveidx" id="allremoveidx" value="'.$listsref->{'canremove'}.'" />'.          '<input type="hidden" name="allremoveidx" id="allremoveidx" value="'.$listsref->{'canremove'}.'" />'.
Line 3056  END Line 3071  END
  }   }
   
  if ($denied{'copy'}) {   if ($denied{'copy'}) {
             $copylink=(<<ENDCOPY);              $copylink=(<<ENDCOPY)
 <span style="visibility: hidden;">$lt{'cp'}</span>  <span style="visibility: hidden;">$lt{'cp'}</span>
 ENDCOPY  ENDCOPY
         } else {          } else {
Line 3223  END Line 3238  END
             my $rpckchk;              my $rpckchk;
             if ($rpicknum) {              if ($rpicknum) {
                 $rpckchk = ' checked="checked"';                  $rpckchk = ' checked="checked"';
                   if (($ishash) && (ref($filtersref->{'randompick'}) eq 'ARRAY')) {
                       push(@{$filtersref->{'randompick'}},$orderidx.':'.$rpicknum);
                   }
             }              }
             my $formname = 'edit_randompick_'.$orderidx;              my $formname = 'edit_randompick_'.$orderidx;
     $rand_pick_text =       $rand_pick_text = 
Line 3235  $form_common."\n". Line 3253  $form_common."\n".
             }              }
             $rand_pick_text .= '</span></span>'.              $rand_pick_text .= '</span></span>'.
                                $form_end;                                 $form_end;
        my $ro_set=              my $ro_set;
         ((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i?' checked="checked"':'');              if ((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i) {
                   $ro_set = 'checked="checked"';
                   if (($ishash) && (ref($filtersref->{'randomorder'}) eq 'ARRAY')) {
                       push(@{$filtersref->{'randomorder'}},$orderidx);
                   }
               }
             my $formname = 'edit_rorder_'.$orderidx;              my $formname = 'edit_rorder_'.$orderidx;
     $rand_order_text =       $rand_order_text = 
 '<form action="/adm/coursedocs" method="post" name="'.$formname.'">'."\n".  '<form action="/adm/coursedocs" method="post" name="'.$formname.'">'."\n".
Line 3313  $form_end; Line 3336  $form_end;
   my %lt=&Apache::lonlocal::texthash(    my %lt=&Apache::lonlocal::texthash(
        'hd' => 'Hidden',         'hd' => 'Hidden',
        'ec' => 'URL hidden');         'ec' => 'URL hidden');
  my $enctext=          my ($enctext,$hidtext);
     ((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i?' checked="checked"':'');          if ((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i) {
  my $hidtext=              $enctext = ' checked="checked"';
     ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i?' checked="checked"':'');              if (($ishash) && (ref($filtersref->{'encrypturl'}) eq 'ARRAY')) {
                   push(@{$filtersref->{'encrypturl'}},$orderidx);
               }
           }
           if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) {
               $hidtext = ' checked="checked"';
               if (($ishash) && (ref($filtersref->{'randomorder'}) eq 'ARRAY')) {
                   push(@{$filtersref->{'hiddenresource'}},$orderidx);
               }
           }
         my $formhidden = 'edit_hiddenresource_'.$orderidx;          my $formhidden = 'edit_hiddenresource_'.$orderidx;
         my $formurlhidden = 'edit_encrypturl_'.$orderidx;          my $formurlhidden = 'edit_encrypturl_'.$orderidx;
  $line.=(<<ENDPARMS);   $line.=(<<ENDPARMS);
Line 3619  sub list_symbs { Line 3651  sub list_symbs {
 sub verifycontent {  sub verifycontent {
     my ($r) = @_;      my ($r) = @_;
     my $crstype = &Apache::loncommon::course_type();      my $crstype = &Apache::loncommon::course_type();
     $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Documents'));      $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Content'));
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Documents'));      $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Content'));
     $r->print(&startContentScreen('tools'));      $r->print(&startContentScreen('tools'));
     $r->print('<h4 class="LC_info">'.&mt($crstype.' content verification').'</h4>');       $r->print('<h4 class="LC_info">'.&mt($crstype.' content verification').'</h4>'); 
    $hashtied=0;     $hashtied=0;
Line 3722  sub checkversions { Line 3754  sub checkversions {
     &changewarning($r,'');      &changewarning($r,'');
     if ($env{'form.timerange'} eq 'all') {      if ($env{'form.timerange'} eq 'all') {
 # show all documents  # show all documents
  $header=&mt('All Documents in '.$crstype);   $header=&mt('All content in '.$crstype);
  $allsel=' selected="selected"';   $allsel=' selected="selected"';
  foreach my $key (keys(%hash)) {   foreach my $key (keys(%hash)) {
     if ($key=~/^ids\_(\/res\/.+)$/) {      if ($key=~/^ids\_(\/res\/.+)$/) {
Line 4000  sub startContentScreen { Line 4032  sub startContentScreen {
         $output .= '<li'.(($mode eq 'courseindex')?' class="active"':'').'><a href="/adm/indexcourse"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Index').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";          $output .= '<li'.(($mode eq 'courseindex')?' class="active"':'').'><a href="/adm/indexcourse"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Index').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";
         $output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/supplemental"><b>'.&mt('Supplemental Content').'</b></a></li>';          $output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/supplemental"><b>'.&mt('Supplemental Content').'</b></a></li>';
     } else {      } else {
         $output .= '<li '.(($mode eq 'docs')?' class="active"':'').' id="tabbededitor"><a href="/adm/coursedocs?forcestandard=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Editor').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";          $output .= '<li '.(($mode eq 'docs')?' class="active"':'').' id="tabbededitor"><a href="/adm/coursedocs?forcestandard=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Main Content Editor').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";
         $output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/coursedocs?forcesupplement=1"><b>'.&mt('Supplemental Content Editor').'</b></a></li>'."\n";          $output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/coursedocs?forcesupplement=1"><b>'.&mt('Supplemental Content Editor').'</b></a></li>'."\n";
         $output .= '<li '.(($mode eq 'tools')?' class="active"':'').'><a href="/adm/coursedocs?tools=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Utilities').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";          $output .= '<li '.(($mode eq 'tools')?' class="active"':'').'><a href="/adm/coursedocs?tools=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Utilities').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";
                    '><a href="/adm/coursedocs?tools=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Utilities').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>';                     '><a href="/adm/coursedocs?tools=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Utilities').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>';
Line 4021  sub endContentScreen { Line 4053  sub endContentScreen {
 }  }
   
 sub supplemental_base {  sub supplemental_base {
     return 'supplemental&'.&escape(&mt('Supplemental '.&Apache::loncommon::course_type().' Content'));      return 'supplemental&'.&escape(&mt('Supplemental Content'));
 }  }
   
 sub handler {  sub handler {
Line 4154  sub handler { Line 4186  sub handler {
        }         }
    } elsif ($env{'form.command'} eq 'editdocs') {     } elsif ($env{'form.command'} eq 'editdocs') {
        $env{'form.folderpath'} = 'default&'.         $env{'form.folderpath'} = 'default&'.
                                  &escape(&mt('Main '.$crstype.' Content').':::::');                                   &escape(&mt('Main Content').':::::');
        &Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}});         &Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}});
    } elsif ($env{'form.command'} eq 'editsupp') {     } elsif ($env{'form.command'} eq 'editsupp') {
        $env{'form.folderpath'} = 'supplemental&'.         $env{'form.folderpath'} = 'supplemental&'.
Line 4199  sub handler { Line 4231  sub handler {
        if ($supplementalflag) {         if ($supplementalflag) {
           $env{'form.folderpath'}=&supplemental_base();            $env{'form.folderpath'}=&supplemental_base();
        } else {         } else {
           $env{'form.folderpath'}='default'.&escape(&mt('Main '.$crstype.' Content').            $env{'form.folderpath'}='default&'.&escape(&mt('Main Content').
                                   ':::::');                                    ':::::');
        }         }
     }      }
Line 4225  sub handler { Line 4257  sub handler {
             if ($env{'form.folder'} eq '' ||              if ($env{'form.folder'} eq '' ||
                 $env{'form.folder'} eq 'supplemental') {                  $env{'form.folder'} eq 'supplemental') {
                 $folderpath='default&'.                  $folderpath='default&'.
                             &escape(&mt('Main '.$crstype.' Content').':::::');                              &escape(&mt('Main Content').':::::');
             }              }
         }          }
         $containertag = '<input type="hidden" name="folderpath" value="" />';          $containertag = '<input type="hidden" name="folderpath" value="" />';
Line 4550  HIDDENFORM Line 4582  HIDDENFORM
        if ($folder eq '' || $supplementalflag) {         if ($folder eq '' || $supplementalflag) {
            $folder='default';             $folder='default';
    $savefolderpath = $env{'form.folderpath'};     $savefolderpath = $env{'form.folderpath'};
    $env{'form.folderpath'}='default&'.&escape(&mt('Content'));     $env{'form.folderpath'}='default&'.&escape(&mt('Main Content'));
            $pathitem = '<input type="hidden" name="folderpath" value="'.             $pathitem = '<input type="hidden" name="folderpath" value="'.
        &HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />';         &HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />';
        }         }
Line 5203  sub generate_edit_table { Line 5235  sub generate_edit_table {
     $form = '<div class="LC_Box" style="margin:0;">'.      $form = '<div class="LC_Box" style="margin:0;">'.
             '<ul id="navigation'.$tid.'" class="LC_TabContent">'."\n".              '<ul id="navigation'.$tid.'" class="LC_TabContent">'."\n".
             '<li class="goback">'.              '<li class="goback">'.
             '<a href="javascript:toContents('.$jumpto.');">'.              '<a href="javascript:toContents('."'$jumpto'".');">'.
             '<img src="'.$backicon.'" class="LC_icon" style="border: none; vertical-align: top;"'.              '<img src="'.$backicon.'" class="LC_icon" style="border: none; vertical-align: top;"'.
             '  alt="'.$backtext.'" />'.$backtext.'</a></li>'."\n".              '  alt="'.$backtext.'" />'.$backtext.'</a></li>'."\n".
             '<li>'.              '<li>'.
Line 5322  sub editing_js { Line 5354  sub editing_js {
                                           titbl   => 'Title is blank',                                            titbl   => 'Title is blank',
                                           more    => '(More ...)',                                            more    => '(More ...)',
                                           less    => '(Less ...)',                                            less    => '(Less ...)',
                                             noor    => 'No actions selected or changes to settings specified.',
                                             noch    => 'No changes to settings specified.',
                                             noac    => 'No actions selected.',
                                         );                                          );
   
     my $crstype = &Apache::loncommon::course_type();      my $crstype = &Apache::loncommon::course_type();
Line 5331  sub editing_js { Line 5366  sub editing_js {
         $main_container_page = 1;          $main_container_page = 1;
     }      }
     my $toplevelmain =       my $toplevelmain = 
         &escape(&mt('Main '.$crstype.' Content').':::::');          &escape(&mt('Main Content').':::::');
     my $toplevelsupp = &supplemental_base();      my $toplevelsupp = &supplemental_base();
   
     my $backtourl;      my $backtourl;
Line 5345  sub editing_js { Line 5380  sub editing_js {
             if (&Apache::lonnet::is_on_map($res)) {              if (&Apache::lonnet::is_on_map($res)) {
                 $backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($res),'<>&"').'?symb='.                  $backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($res),'<>&"').'?symb='.
                              &HTML::Entities::encode($caller,'<>&"');                               &HTML::Entities::encode($caller,'<>&"');
               } else {
                   $backtourl = '/adm/navmaps';
             }              }
         }          }
     } elsif ($env{'docs.exit.'.$env{'request.course.id'}} eq '/adm/menu') {      } elsif ($env{'docs.exit.'.$env{'request.course.id'}} eq '/adm/menu') {
Line 6009  function checkSubmits() { Line 6046  function checkSubmits() {
         }          }
     }      }
     var dosettings = multiSettings();      var dosettings = multiSettings();
       var haschanges = 0;
     if (dosettings == 1) {      if (dosettings == 1) {
         form.allencrypturl.value = '';          form.allencrypturl.value = '';
         form.allhiddenresource.value = '';          form.allhiddenresource.value = '';
         form.changeparms.value = 'all';           form.changeparms.value = 'all';
           var patt=new RegExp(",\$");
         var allidxlist = document.cumulativesettings.allidx.value;          var allidxlist = document.cumulativesettings.allidx.value;
         if ((allidxlist != '') && (allidxlist != null)) {          if ((allidxlist != '') && (allidxlist != null)) {
             var allidxs = allidxlist.split(',');              var allidxs = allidxlist.split(',');
Line 6029  function checkSubmits() { Line 6068  function checkSubmits() {
                         }                          }
                     }                      }
                 }                  }
                   form.allhiddenresource.value = form.allhiddenresource.value.replace(patt,"");
                   form.allencrypturl.value = form.allencrypturl.value.replace(patt,"");
             }              }
         }          }
         form.allrandompick.value = '';          form.allrandompick.value = '';
Line 6047  function checkSubmits() { Line 6088  function checkSubmits() {
                     form.allrandomorder.value += allmapidxs[i]+',';                      form.allrandomorder.value += allmapidxs[i]+',';
                 }                  }
             }              }
               form.allrandompick.value = form.allrandompick.value.replace(patt,"");
               form.allrandomorder.value = form.allrandomorder.value.replace(patt,"");
           }
           if (document.cumulativesettings.currhiddenresource.value != form.allhiddenresource.value) {
               haschanges = 1;
           }
           if (document.cumulativesettings.currencrypturl.value != form.allencrypturl.value) {
               haschanges = 1;
           }
           if (document.cumulativesettings.currrandomorder.value != form.allrandomorder.value) {
               haschanges = 1;
           }
           if (document.cumulativesettings.currrandompick.value != form.allrandompick.value) {
               haschanges = 1;
         }          }
     }      }
     if ((numchanges > 0) || (dosettings == 1)) {      if (doactions == 1) {
         if (numchanges > 0) {          if (numchanges > 0) {
             if ((cutwarnings > 0) || (remwarnings > 0)) {              if ((cutwarnings > 0) || (remwarnings > 0)) {
                 if (remwarnings > 0) {                  if (remwarnings > 0) {
Line 6065  function checkSubmits() { Line 6120  function checkSubmits() {
             }              }
             form.submit();              form.submit();
             return true;              return true;
         } else {          }
       }
       if (dosettings == 1) {
           if (haschanges == 1) {
             form.submit();              form.submit();
             return true;              return true;
         }          }
     }       }
       if ((dosettings == 1) && (doactions == 1)) {
           alert("$lt{'noor'}");
       } else {
           if (dosettings == 1) {
               alert("$lt{'noch'}");
           } else {
               alert("$lt{'noac'}");
           }
       }
     return false;      return false;
 }  }
   

Removed from v.1.542  
changed lines
  Added in v.1.550


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