Diff for /loncom/interface/lonindexer.pm between versions 1.77 and 1.79

version 1.77, 2003/09/26 00:23:09 version 1.79, 2003/10/24 21:09:24
Line 118  sub handler { Line 118  sub handler {
     # Get the parameters from the query string      # Get the parameters from the query string
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
      ['catalogmode','launch','acts','mode','form','element',       ['catalogmode','launch','acts','mode','form','element',
               'only','omit']);                'only','omit','titleelement']);
     #-------------------------------------------------------------------      #-------------------------------------------------------------------
     my $closebutton='';      my $closebutton='';
     my $groupimportbutton='';      my $groupimportbutton='';
Line 179  END Line 179  END
  # $element is the name of the element in $formname which receives   # $element is the name of the element in $formname which receives
  #       the URL.   #       the URL.
  # &Apache::lonxml::debug('Checking mode, form, element');   # &Apache::lonxml::debug('Checking mode, form, element');
  &setvalues(\%hash,'form.mode'   ,\%ENV,'form.mode'   );   &setvalues(\%hash,'form.mode'        ,\%ENV,'form.mode'   );
  &setvalues(\%hash,'form.form'   ,\%ENV,'form.form'   );   &setvalues(\%hash,'form.form'        ,\%ENV,'form.form'   );
  &setvalues(\%hash,'form.element',\%ENV,'form.element');   &setvalues(\%hash,'form.element'     ,\%ENV,'form.element');
  &setvalues(\%hash,'form.only'   ,\%ENV,'form.only'   );   &setvalues(\%hash,'form.titleelement',\%ENV,'form.titleelement');
  &setvalues(\%hash,'form.omit'   ,\%ENV,'form.omit'   );   &setvalues(\%hash,'form.only'        ,\%ENV,'form.only'   );
    &setvalues(\%hash,'form.omit'        ,\%ENV,'form.omit'   );
   
         # Deal with 'omit' and 'only'           # Deal with 'omit' and 'only' 
         if (exists $ENV{'form.omit'}) {          if (exists $ENV{'form.omit'}) {
Line 194  END Line 195  END
         }          }
                   
  my $mode = $ENV{'form.mode'};   my $mode = $ENV{'form.mode'};
  my ($form,$element);   my ($form,$element,$titleelement);
  if ($mode eq 'edit' || $mode eq 'parmset') {   if ($mode eq 'edit' || $mode eq 'parmset') {
     $form    = $ENV{'form.form'};      $form         = $ENV{'form.form'};
     $element = $ENV{'form.element'};      $element      = $ENV{'form.element'};
       $titleelement = $ENV{'form.titleelement'};
  }   }
  &Apache::lonxml::debug("mode=$mode form=$form element=$element");   &Apache::lonxml::debug("mode=$mode form=$form element=$element
                                   titleelement=$titleelement");
 # ------ set catalogmodefunctions to have extra needed javascript functionality  # ------ set catalogmodefunctions to have extra needed javascript functionality
  my $catalogmodefunctions='';   my $catalogmodefunctions='';
  if ($ENV{'form.catalogmode'} eq 'interactive' or   if ($ENV{'form.catalogmode'} eq 'interactive' or
Line 248  END Line 251  END
 // mode = $mode  // mode = $mode
 function select_data(title,url) {  function select_data(title,url) {
     changeURL(url);      changeURL(url);
       changeTitle(title);
     self.close();      self.close();
 }  }
   
Line 262  function changeURL(val) { Line 266  function changeURL(val) {
     alert("The file you selected is: "+val);      alert("The file you selected is: "+val);
     }      }
 }  }
   
 END  END
                   if (!$titleelement) {
       $catalogmodefunctions.='function changeTitle(val) {}';
    } else {
       $catalogmodefunctions.=<<END;
   function changeTitle(val) {
       if (window.opener.document) {
       window.opener.document.forms["$form"].elements["$titleelement"].value=val;
       } else {
       alert("The title of the file you selected is: "+val);
       }
   }
   END
                   }
             } elsif ($mode eq 'parmset') {              } elsif ($mode eq 'parmset') {
                 my $location = "/adm/groupsort?catalogmode=interactive&";                  my $location = "/adm/groupsort?catalogmode=interactive&";
                 $location .= "form=$form&element=$element&mode=parmset&acts=";                  $location .= "form=$form&element=$element&mode=parmset&acts=";
Line 411  $r->print(&Apache::loncommon::bodytag('B Line 427  $r->print(&Apache::loncommon::bodytag('B
    'st' => 'Statistics',     'st' => 'Statistics',
    'au' => 'Author',     'au' => 'Author',
    'kw' => 'Keywords',     'kw' => 'Keywords',
    'la' => 'Language',     'ln' => 'Language',
    'sr' => 'Show resource',     'sr' => 'Show resource',
    'av' => 'All versions',     'av' => 'All versions',
    'ud' => 'Update Display'     'ud' => 'Update Display'
Line 429  $r->print(&Apache::loncommon::bodytag('B Line 445  $r->print(&Apache::loncommon::bodytag('B
 </tr><tr>  </tr><tr>
 <td><input type="checkbox" name="attr4" value="1" $attrchk[4] /> $lt{'au'}</td>  <td><input type="checkbox" name="attr4" value="1" $attrchk[4] /> $lt{'au'}</td>
 <td><input type="checkbox" name="attr5" value="1" $attrchk[5] /> $lt{'kw'}</td>  <td><input type="checkbox" name="attr5" value="1" $attrchk[5] /> $lt{'kw'}</td>
 <td><input type="checkbox" name="attr6" value="1" $attrchk[6] /> $lt{'la'}</td>  <td><input type="checkbox" name="attr6" value="1" $attrchk[6] /> $lt{'ln'}</td>
 <td><input type="checkbox" name="attr7" value="1" $attrchk[7] /> $lt{'sr'}</td>  <td><input type="checkbox" name="attr7" value="1" $attrchk[7] /> $lt{'sr'}</td>
 <td><input type="checkbox" name="attr9" value="1" $attrchk[9] /> $lt{'av'}</td>  <td><input type="checkbox" name="attr9" value="1" $attrchk[9] /> $lt{'av'}</td>
 <td>&nbsp;</td>  <td>&nbsp;</td>

Removed from v.1.77  
changed lines
  Added in v.1.79


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