Diff for /loncom/interface/lonsearchcat.pm between versions 1.99 and 1.100

version 1.99, 2001/08/26 21:49:49 version 1.100, 2001/08/28 12:12:38
Line 335  LASTREVISIONDATEEND Line 335  LASTREVISIONDATEEND
 <font color="#800000" face="helvetica"><b>LIMIT BY SPECIAL METADATA FIELDS:</b>  <font color="#800000" face="helvetica"><b>LIMIT BY SPECIAL METADATA FIELDS:</b>
 </font>  </font>
 For resource-specific metadata, enter in an expression in the form of   For resource-specific metadata, enter in an expression in the form of 
 <i>key</i>=<i>value</i> separated by operators such as AND or OR.<br />  <i>key</i>=<i>value</i> separated by operators such as AND, OR or NOT.<br />
 <b>Example:</b> grandmother=75 OR grandfather=85  <b>Example:</b> grandmother=75 OR grandfather=85
 <br />  <br />
 CUSTOMMETADATA  CUSTOMMETADATA
Line 358  $scrout.=' <i>initial users of this syst Line 358  $scrout.=' <i>initial users of this syst
 <html>  <html>
 <head>  <head>
 <title>The LearningOnline Network with CAPA</title>  <title>The LearningOnline Network with CAPA</title>
   <script type="text/javascript">
       function openhelp(val) {
    openhelpwin=open('/adm/help/searchcat.html','helpscreen',
        'scrollbars=1,width=400,height=300');
    openhelpwin.focus();
       }
   </script>
 </head>  </head>
 <body bgcolor="#FFFFFF">  <body bgcolor="#FFFFFF">
 <img align='right' src='/adm/lonIcons/lonlogos.gif' />  <img align='right' src='/adm/lonIcons/lonlogos.gif' />
Line 368  $hidden Line 375  $hidden
 <h3>Basic Search</h3>  <h3>Basic Search</h3>
 <p>  <p>
 Enter terms or phrases separated by search operators  Enter terms or phrases separated by search operators
 such as AND or OR then press SEARCH below.  Terms should be specific  such as AND, OR, or NOT then press SEARCH below.  Terms should be specific
 to the title, author, subject, notes, or abstract information associated  to the title, author, subject, notes, or abstract information associated
 with a resource.  with a resource.
 <br />  <br />
Line 385  ENDDOCUMENT Line 392  ENDDOCUMENT
 <input type="reset" name="reset" value='RESET' />  <input type="reset" name="reset" value='RESET' />
 $closebutton  $closebutton
 $basicviewselect  $basicviewselect
   <input type="button" value="HELP" onClick="openhelp()" />
 </p>  </p>
 <hr />  <hr />
 <h3>Advanced Search</h3>  <h3>Advanced Search</h3>
Line 394  $scrout Line 402  $scrout
 <input type="reset" name="reset" value='RESET' />  <input type="reset" name="reset" value='RESET' />
 $closebutton  $closebutton
 $advancedviewselect  $advancedviewselect
   <input type="button" value="HELP" onClick="openhelp()" />
 </p>  </p>
 </form>  </form>
 </body>  </body>
Line 451  sub searchphrasefield { Line 460  sub searchphrasefield {
     my ($title,$name,$value)=@_;      my ($title,$name,$value)=@_;
     my $instruction=<<END;      my $instruction=<<END;
 Enter terms or phrases separated by search operators such  Enter terms or phrases separated by search operators such
 as AND or OR.  as AND, OR, or NOT.
 END  END
     my $uctitle=uc($title);      my $uctitle=uc($title);
     return "\n<p><font color=\"#800000\" face=\"helvetica\"><b>$uctitle:</b>".      return "\n<p><font color=\"#800000\" face=\"helvetica\"><b>$uctitle:</b>".
Line 904  BEGINNING Line 913  BEGINNING
     # conditional output of script functions dependent on the mode in      # conditional output of script functions dependent on the mode in
     # which the search was invoked      # which the search was invoked
         $r->print(<<SCRIPT) if $ENV{'form.catalogmode'} eq 'interactive';          $r->print(<<SCRIPT) if $ENV{'form.catalogmode'} eq 'interactive';
 <script>  <script type="text/javascript">
     function select_data(title,url) {      function select_data(title,url) {
  changeTitle(title);   changeTitle(title);
  changeURL(url);   changeURL(url);
Line 923  BEGINNING Line 932  BEGINNING
 </script>  </script>
 SCRIPT  SCRIPT
         $r->print(<<SCRIPT) if $ENV{'form.catalogmode'} eq 'groupsearch';          $r->print(<<SCRIPT) if $ENV{'form.catalogmode'} eq 'groupsearch';
 <script>  <script type="text/javascript">
     function select_data(title,url) {      function select_data(title,url) {
  alert('DEBUG: Should be storing '+title+' and '+url);   alert('DEBUG: Should be storing '+title+' and '+url);
     }      }
Line 940  SCRIPT Line 949  SCRIPT
     }      }
 </script>  </script>
 SCRIPT  SCRIPT
         $r->print(<<SCRIPT);                                            ;          $r->print(<<SCRIPT);
 <script>  <script type="text/javascript">
     function displayinfo(val) {      function displayinfo(val) {
  popwin.document.forms.popremain.sdetails.value=val;   popwin.document.forms.popremain.sdetails.value=val;
     }      }
       function openhelp(val) {
    openhelpwin=open('/adm/help/searchcat.html','helpscreen',
        'scrollbars=1,width=400,height=300');
    openhelpwin.focus();
       }
 </script>  </script>
 SCRIPT  SCRIPT
     $r->rflush();      $r->rflush();
Line 1019  RESULTS Line 1033  RESULTS
         $sn++;          $sn++;
     }      }
     $r->print(<<ENDPOP);      $r->print(<<ENDPOP);
 <script>  <script type="text/javascript">
     popwin=open('','popwin','scrollbars=1,width=400,height=200');      popwin=open('','popwin','scrollbars=1,width=400,height=200');
     popwin.focus();      popwin.focus();
     popwin.document.writeln('<'+'html>');      popwin.document.writeln('<'+'html>');
Line 1029  RESULTS Line 1043  RESULTS
     popwin.document.writeln('<'+'/script>');      popwin.document.writeln('<'+'/script>');
     popwin.document.writeln('<'+'/head>'+      popwin.document.writeln('<'+'/head>'+
         '<'+'body bgcolor="#FFFFFF">'+          '<'+'body bgcolor="#FFFFFF">'+
  '<'+'image align="right" src="/adm/lonIcons/'+   '<'+'image name="whirly" align="right" src="/adm/lonIcons/'+
  'lonanim.gif" '+   'lonanim.gif" '+
  'alt="animated logo" />'+   'alt="animated logo" />'+
  '<'+'h3>Search Results Progress<'+'/h3>'+   '<'+'h3>Search Results Progress<'+'/h3>'+
Line 1051  RESULTS Line 1065  RESULTS
  '<'+'input type="text" size="25" name="sdetails"'+   '<'+'input type="text" size="25" name="sdetails"'+
  ' value="" />'+   ' value="" />'+
  '<'+'br />'+   '<'+'br />'+
  '<'+'input type="button" name="button"'+  
  ' value="revise search" />'+  
  ' <'+'input type="button" name="button"'+   ' <'+'input type="button" name="button"'+
  ' value="view results" />'+   ' value="abort search and view current results" '+
    ' />'+
  ' <'+'input type="button" name="button"'+   ' <'+'input type="button" name="button"'+
  ' value="help" />'+   ' value="help" onClick="javascript:opener.openhelp()" />'+
  '<'+'/tt>'+   '<'+'/tt>'+
         '<'+'/form>'+          '<'+'/form>'+
         '<'+'/body><'+'/html>');          '<'+'/body><'+'/html>');
Line 1080  ENDPOP Line 1093  ENDPOP
  my $replyfile='';   my $replyfile='';
   
  if ($reply eq 'con_lost') {   if ($reply eq 'con_lost') {
     $r->print('<script>popwin.document.img'.$sn.'.'.      $r->print('<script type="text/javascript">popwin.document.img'.
         $sn.'.'.
       'src="/adm/lonIcons/srvbad.gif";</script>'.        'src="/adm/lonIcons/srvbad.gif";</script>'.
       "\n");        "\n");
     $r->rflush();      $r->rflush();
Line 1093  ENDPOP Line 1107  ENDPOP
  my $temp=0;   my $temp=0;
       WLOOP: while (1) {        WLOOP: while (1) {
   if (-e $replyfile && $tflag) {    if (-e $replyfile && $tflag) {
       $r->print('<script>popwin.document.img'.$sn.'.'.        $r->print('<script type="text/javascript">'.
    'popwin.document.img'.$sn.'.'.
  'src="/adm/lonIcons/srvhalf.gif";</script>'.   'src="/adm/lonIcons/srvhalf.gif";</script>'.
  "\n");   "\n");
       $r->rflush();        $r->rflush();
       $r->print('<script>popwin.hc["'.$rkey.'"]='.        $r->print('<script type="text/javascript">'.
    'popwin.hc["'.$rkey.'"]='.
  '"still transferring..."'.';</script>'.   '"still transferring..."'.';</script>'.
  "\n");   "\n");
       $r->rflush();        $r->rflush();
Line 1106  ENDPOP Line 1122  ENDPOP
   last WLOOP if $temp>5;    last WLOOP if $temp>5;
   if (-e "$replyfile.end") {    if (-e "$replyfile.end") {
       if (-s $replyfile) {        if (-s $replyfile) {
   $r->print('<script>popwin.document.img'.$sn.'.'.    $r->print('<script type="text/javascript">'.
  'src="/adm/lonIcons/srvgood.gif";</script>'.      'popwin.document.img'.$sn.'.'.
  "\n");      'src="/adm/lonIcons/srvgood.gif";'.
       '</script>'."\n");
   $r->rflush();    $r->rflush();
   my $fh=Apache::File->new($replyfile) or     my $fh=Apache::File->new($replyfile) or 
       ($r->print('ERROR: file '.        ($r->print('ERROR: file '.
Line 1116  ENDPOP Line 1133  ENDPOP
        return OK);         return OK);
   @results=<$fh> if $fh;    @results=<$fh> if $fh;
   $hitcount{$rkey}=@results+0;    $hitcount{$rkey}=@results+0;
   $r->print('<script>popwin.hc["'.$rkey.'"]='.    $r->print('<script type="text/javascript">'.
       'popwin.hc["'.$rkey.'"]='.
     $hitcount{$rkey}.';</script>'.      $hitcount{$rkey}.';</script>'.
     "\n");      "\n");
   $r->rflush();    $r->rflush();
   $hitcountsum+=$hitcount{$rkey};    $hitcountsum+=$hitcount{$rkey};
   $r->print('<script>popwin.document.forms.popremain.'.    $r->print('<script type="text/javascript">'.
       'popwin.document.forms.popremain.'.
     'numhits.value='.$hitcountsum.      'numhits.value='.$hitcountsum.
     ';</script>'.      ';</script>'.
     "\n");      "\n");
   $r->rflush();    $r->rflush();
       }        }
       else {        else {
   $r->print('<script>popwin.document.img'.$sn.'.'.    $r->print('<script type="text/javascript">'.
  'src="/adm/lonIcons/srvempty.gif";</script>'.      'popwin.document.img'.$sn.'.'.
  "\n");      'src="/adm/lonIcons/srvempty.gif";'.
       '</script>'.
       "\n");
   $r->rflush();    $r->rflush();
   $r->print('<script>popwin.hc["'.$rkey.'"]=0'.    $r->print('<script type="text/javascript">'.
       'popwin.hc["'.$rkey.'"]=0'.
     ';</script>'.      ';</script>'.
     "\n");      "\n");
   $r->rflush();    $r->rflush();
Line 1143  ENDPOP Line 1165  ENDPOP
   sleep 1;    sleep 1;
   $timeremain--;    $timeremain--;
   $elapsetime++;    $elapsetime++;
   $r->print('<script>popwin.document.popremain.elapsetime.'.    $r->print('<script type="text/javascript">'.
       'popwin.document.popremain.elapsetime.'.
     'value="'.$elapsetime.'";</script>'."\n");      'value="'.$elapsetime.'";</script>'."\n");
   $r->rflush();    $r->rflush();
   $temp++;    $temp++;
       }        }
     }      }
       $r->print('<script type="text/javascript">'.
         'popwin.document.whirly.'.
         'src="'.'/adm/lonIcons/lonanimend.gif'.
         '";</script>'."\n");
       $r->rflush();
  }   }
  my $customshow='';   my $customshow='';
  my $extrashow='';   my $extrashow='';
Line 1260  RESULTS Line 1288  RESULTS
     unless ($resultflag) {      unless ($resultflag) {
         $r->print("\nThere were no results that matched your query\n");          $r->print("\nThere were no results that matched your query\n");
     }      }
 #    $r->print('<script>popwin.close()</script>'."\n"); $r->rflush();   #    $r->print('<script type="text/javascript">'.'popwin.close()</script>'."\n"); $r->rflush(); 
     $r->print(<<RESULTS);      $r->print(<<RESULTS);
 </body>  </body>
 </html>  </html>

Removed from v.1.99  
changed lines
  Added in v.1.100


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