Diff for /loncom/interface/lonparmset.pm between versions 1.589 and 1.592

version 1.589, 2019/02/18 13:25:49 version 1.592, 2019/04/09 13:45:57
Line 1071  sub plink { Line 1071  sub plink {
     my ($type,$dis,$value,$marker,$return,$call,$recursive,$extra)=@_;      my ($type,$dis,$value,$marker,$return,$call,$recursive,$extra)=@_;
     my $winvalue=$value;      my $winvalue=$value;
     unless ($winvalue) {      unless ($winvalue) {
         if ((&isdateparm($type) || (&is_specialstring($type))) {          if (&isdateparm($type) || (&is_specialstring($type))) {
             $winvalue=$env{'form.recent_'.$type};              $winvalue=$env{'form.recent_'.$type};
           } elsif ($type eq 'string_yesno') {
               if ($env{'form.recent_string'} =~ /^(yes|no)$/i) {
                   $winvalue=$env{'form.recent_string'};
               }
         } else {          } else {
             $winvalue=$env{'form.recent_'.(split(/\_/,$type))[0]};              $winvalue=$env{'form.recent_'.(split(/\_/,$type))[0]};
         }          }
Line 1108  sub page_js { Line 1112  sub page_js {
     $pjump_def      $pjump_def
   
     function psub() {      function psub() {
         var specstring = /^string_/i;          var specstring = /^string_!(yesno|any)/i;
         if (document.parmform.pres_marker.value!='') {          if (document.parmform.pres_marker.value!='') {
             document.parmform.action+='#'+document.parmform.pres_marker.value;              document.parmform.action+='#'+document.parmform.pres_marker.value;
             var typedef=new Array();              var typedef=new Array();
             typedef=document.parmform.pres_type.value.split('_');              typedef=document.parmform.pres_type.value.split('_');
             if (document.parmform.pres_type.value!='') {              if (document.parmform.pres_type.value!='') {
                 if ((typedef[0]=='date') ||                   if ((typedef[0]=='date') || 
                     (specstring.test(document.parmform.pres_type.value) && (typedef[1]!='yesno')))  {                      (specstring.test(document.parmform.pres_type.value)))  {
                     eval('document.parmform.recent_'+                      eval('document.parmform.recent_'+
                         document.parmform.pres_type.value+                          document.parmform.pres_type.value+
                         '.value=document.parmform.pres_value.value;');                          '.value=document.parmform.pres_value.value;');
Line 2069  sub isdateparm { Line 2073  sub isdateparm {
   
 sub is_specialstring {  sub is_specialstring {
     my $type=shift;      my $type=shift;
     return (($type=~/^string_/) && ((!$type ne 'string_yesno')));      return (($type=~/^string_/) && (($type ne 'string_yesno')));
 }  }
   
 # Prints the HTML and Javascript to select parameters, with various shortcuts.  # Prints the HTML and Javascript to select parameters, with various shortcuts.

Removed from v.1.589  
changed lines
  Added in v.1.592


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