Diff for /loncom/xml/lonxml.pm between versions 1.320 and 1.321

version 1.320, 2004/06/03 14:28:39 version 1.321, 2004/06/04 14:03:57
Line 1094  sub storefile { Line 1094  sub storefile {
 }  }
   
 sub createnewhtml {  sub createnewhtml {
   my $filecontents=(<<SIMPLECONTENT);      my $title=&mt('Title of document goes here');
       my $body=&mt('Body of document goes here');
       my $filecontents=(<<SIMPLECONTENT);
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml/11/DTD/xhtml11.dtd">
 <html>  <html>
 <head>  <head>
 <title>  <title>$title</title>
                            Title of Document Goes Here  
 </title>  
 </head>  </head>
 <body bgcolor="#FFFFFF">  <body bgcolor="#FFFFFF">
   $body
                            Body of Document Goes Here  
   
 </body>  </body>
 </html>  </html>
 SIMPLECONTENT  SIMPLECONTENT
   return $filecontents;      return $filecontents;
 }  }
   
 sub createnewsty {  sub createnewsty {
Line 1129  sub inserteditinfo { Line 1128  sub inserteditinfo {
       $filecontents = &HTML::Entities::encode($filecontents,'<>&"');        $filecontents = &HTML::Entities::encode($filecontents,'<>&"');
 #      my $editheader='<a href="#editsection">Edit below</a><hr />';  #      my $editheader='<a href="#editsection">Edit below</a><hr />';
       my $xml_help = '';        my $xml_help = '';
         my $activate='';
         my $initialize='';
       if ($filetype eq 'html') {        if ($filetype eq 'html') {
   $xml_help=Apache::loncommon::helpLatexCheatsheet();    $initialize=&Apache::lonhtmlcommon::htmlareaheaders().(<<FULLPAGE);
   <script type="text/javascript">
       HTMLArea.loadPlugin("FullPage");
   
       function initDocument() {
    var editor=new HTMLArea("editor");
    editor.registerPlugin(FullPage);
    editor.generate();
       }
   </script>
   FULLPAGE
             $result=~s/\<body([^\>]*)\>/\<body onload="initDocument()" $1\>/i;
     $xml_help=&Apache::loncommon::helpLatexCheatsheet();
   #FIXME: need to install FullPage plugin during install
   #  $activate=&Apache::lonhtmlcommon::htmlareaactive();
       }        }
       my $cleanbut = '';        my $cleanbut = '';
       if ($filetype eq 'html') {        if ($filetype eq 'html') {
Line 1147  $cleanbut Line 1162  $cleanbut
 <input type="submit" name="viewmode" accesskey="v" value="$lt{'vi'}" />  <input type="submit" name="viewmode" accesskey="v" value="$lt{'vi'}" />
 BUTTONS  BUTTONS
       my $editfooter=(<<ENDFOOTER);        my $editfooter=(<<ENDFOOTER);
   $initialize
 <hr />  <hr />
 <a name="editsection" />  <a name="editsection" />
 <form method="post">  <form method="post">
 $xml_help  $xml_help
 <input type="hidden" name="editmode" value="$lt{'ed'}" />  <input type="hidden" name="editmode" value="$lt{'ed'}" />
 $buttons<br />  $buttons<br />
 <textarea cols="80" rows="40" name="filecont">$filecontents</textarea>  <textarea cols="80" rows="44" name="filecont" id="filecont">$filecontents</textarea>
 <br />$buttons  <br />$buttons
 <br />  <br />
 </form>  </form>
 $titledisplay  $titledisplay
   $activate
   </body>
 ENDFOOTER  ENDFOOTER
 #      $result=~s/(\<body[^\>]*\>)/$1$editheader/is;  #      $result=~s/(\<body[^\>]*\>)/$1$editheader/is;
       $result=~s/(\<\/body\>)/$editfooter/is;        $result=~s/(\<\/body\>)/$editfooter/is;

Removed from v.1.320  
changed lines
  Added in v.1.321


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