Diff for /loncom/homework/edit.pm between versions 1.141 and 1.144

version 1.141, 2012/02/28 22:42:31 version 1.144, 2013/05/06 16:07:29
Line 744  sub js_change_detection { Line 744  sub js_change_detection {
     my $unsaved=&mt("There are unsaved changes");      my $unsaved=&mt("There are unsaved changes");
     return (<<SCRIPT);      return (<<SCRIPT);
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
 var clean = true;  var clean = true;
 var is_submit = false;  var is_submit = false;
 var still_ask = false;  var still_ask = false;
Line 762  function unClean() { Line 763  function unClean() {
      clean=false;       clean=false;
 }  }
 window.onbeforeunload = compareForm;  window.onbeforeunload = compareForm;
   // ]]>
 </script>  </script>
 SCRIPT  SCRIPT
 }  }
Line 826  sub editfield { Line 828  sub editfield {
     if ($cols > 80) { $cols = 80; }      if ($cols > 80) { $cols = 80; }
     if ($cols < $minwidth ) { $cols = $minwidth; }      if ($cols < $minwidth ) { $cols = $minwidth; }
     if ($rows < $minheight) { $rows = $minheight; }      if ($rows < $minheight) { $rows = $minheight; }
     if ($description) { $description=$description."<br />"; }      if ($description) { $description='<br />'.&mt($description).'<br />'; }
   
     # remove typesetting whitespace from between data and the end tag      # remove typesetting whitespace from between data and the end tag
     # to make the edit look prettier      # to make the edit look prettier
Line 838  sub editfield { Line 840  sub editfield {
  $Apache::lonxml::curdepth.'" '.&element_change_detection().   $Apache::lonxml::curdepth.'" '.&element_change_detection().
         $textareaclass.'>'.          $textareaclass.'>'.
  &HTML::Entities::encode($data,'<>&"').'</textarea>'.   &HTML::Entities::encode($data,'<>&"').'</textarea>'.
  ($usehtmlarea?&Apache::lonhtmlcommon::spelllink('lonhomework',          ($usehtmlarea?'<br />'.&Apache::lonhtmlcommon::spelllink('lonhomework',
  'homework_edit_'.$Apache::lonxml::curdepth):'')."\n";                                     'homework_edit_'.$Apache::lonxml::curdepth):'')."\n";
 }  }
   
 sub modifiedfield {  sub modifiedfield {
Line 944  sub checked_arg { Line 946  sub checked_arg {
     $text=$option;      $text=$option;
     $value='value="'.$option.'"';      $value='value="'.$option.'"';
  }   }
  $result.='<span class="LC_nobreak"><label><input type="checkbox" '.$value.' name="'.          $result.=' <span class="LC_edit_opt"><label><input type="checkbox" '.$value.' name="'.
     &html_element_name($name).'"';      &html_element_name($name).'"';
  foreach my $selected (split(/,/,$allselected)) {   foreach my $selected (split(/,/,$allselected)) {
     if ( $selected eq $option ) {      if ( $selected eq $option ) {
Line 968  sub text_arg { Line 970  sub text_arg {
  $result .= 'class="' . $class . '" ';   $result .= 'class="' . $class . '" ';
     }      }
     $result .= &element_change_detection().'/>';      $result .= &element_change_detection().'/>';
     return '<span class="LC_nobreak">'.$result.'</span>';      return ' <span class="LC_edit_opt">'.$result.'</span>';
 }  }
   
 sub select_arg {  sub select_arg {
Line 994  sub select_arg { Line 996  sub select_arg {
     }      }
         }          }
     }      }
     $result.='<span class="LC_nobreak">'.&mt($description).'&nbsp;<select name="'.      $result.=' <span class="LC_edit_opt">'.&mt($description).'&nbsp;<select name="'.
  &html_element_name($name).'" '.&element_change_detection().' >   &html_element_name($name).'" '.&element_change_detection().' >
        '.$optionlist.'         '.$optionlist.'
       </select></span>';        </select></span>';
Line 1045  sub select_or_text_arg { Line 1047  sub select_or_text_arg {
     $description=&mt($description);      $description=&mt($description);
 #  #
     return (<<ENDSELECTORTYPE);      return (<<ENDSELECTORTYPE);
 <span class="LC_nobreak">   <span class="LC_edit_opt">
 $description  $description
 &nbsp;<select name="$selectelement"  &nbsp;<select name="$selectelement"
 onChange="if ($selectedvalue!='TYPEDINVALUE') { $hiddenvalue=$selectedvalue; $typedinvalue=''; }" >  onChange="if ($selectedvalue!='TYPEDINVALUE') { $hiddenvalue=$selectedvalue; $typedinvalue=''; }" >

Removed from v.1.141  
changed lines
  Added in v.1.144


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