home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / FAQ / cgi-bin / discus4_00 / source / fileedit.tmpl < prev    next >
Text File  |  2009-11-06  |  3KB  |  102 lines

  1. # FILE: fileedit.tmpl
  2. # DESCRIPTION: File editor in Appearance Manager
  3. # Copyright (c) 2002, DiscusWare, LLC, all rights reserved
  4. # -------------------------------------------------------------------------------------------
  5.  
  6. <!--BEGIN-->
  7. <html><head>
  8. <title>File Editor: $general->{filename}</title>
  9. <style>
  10. p.top { font: 14pt verdana,arial,helvetica; text-align: center; margin-bottom: 0pt; }
  11. span.now { font: 9pt verdana,arial,helvetica; text-align: left; }
  12. span.file { font: 11pt courier new; background: #c0c0c0; }
  13. textarea { background: #e7e7e7; }
  14. </style>
  15. <script language="JavaScript">
  16. function toggle_wordwrap () {
  17.     if (self.document.editor.text.wrap) {
  18.         var g = self.editor.text;
  19.         if (g.wrap == 'off') {
  20.             g.wrap = 'soft';
  21.         } else {
  22.             g.wrap = 'off';
  23.         }
  24.         if (self.document.editor.wrapbutton.style) {
  25.             var b = self.document.editor.wrapbutton.style;
  26.             if (g.wrap == 'soft') {
  27.                 b.borderTopColor = '#000000';
  28.                 b.borderLeftColor = '#000000';
  29.                 b.borderRightColor = '#ffffff';
  30.                 b.borderBottomColor = '#ffffff';
  31.             } else {
  32.                 b.borderTopColor = '#ffffff';
  33.                 b.borderLeftColor = '#ffffff';
  34.                 b.borderRightColor = '#000000';
  35.                 b.borderBottomColor = '#000000';
  36.             }
  37.             self.document.editor.wrapbutton.blur();    
  38.         }    
  39.     }
  40. }
  41. function closer () {
  42.     if (self.document.editor.changed.value == '0') {
  43.         self.close();
  44.     } else {
  45.         if (confirm('Are you sure you want to close this screen without saving your changes?')) {
  46.             self.close();
  47.         }
  48.     }
  49. }
  50. </script>
  51. </head>
  52. <body bgcolor="#ffffff" text="#000000" link="#0000FF" vlink="#0000FF">
  53. <p class="top">Discus File Editor</p>
  54. <#if $general->{saved} == 1#>
  55.     <p style="width: 100%; background-color: #ccffcc; font: 10pt arial"><b>Note: Changes Successfully Saved</b></p>
  56. <#endif#>
  57. <hr>
  58. <#if <#strlength "$editor->{source}"#> > 30000#>
  59.     <p>
  60.     Sorry, but the file <b>$general->{filename}</b> is too large to be edited using
  61.     this file editor.  Web browsers limit the number of characters that can fit into
  62.     a text edit box to around 32,000.  The file you are attempting to edit is longer
  63.     than that.  Thus, your browser would not handle the file edit correctly.
  64.     </p>
  65.     <p>
  66.     You can still edit this file by transferring it to your computer and opening it
  67.     up in a regular text editor.
  68.     </p>
  69.     <center>
  70.     <form>
  71.     <input type=button value="Close" onClick="self.close()">
  72.     </form>
  73.     </center>
  74. <#else#>
  75.     <form action="$cgiurl" method="post" name="editor">
  76.     <table width=100%>
  77.     <tr>
  78.     <td>
  79.     <span class="now">Now Editing:</span>
  80.     <span class="file">$general->{filename}</span>
  81.     </td>
  82.     <td align=right>
  83.     <input type=button name="wrapbutton" value="Word Wrap" onClick="toggle_wordwrap()">
  84.     </td>
  85.     </tr>
  86.     </table>
  87.     <hr>
  88.     <textarea name="text" rows="$editor->{rows}" cols="$editor->{cols}" wrap="off" onChange="self.document.editor.changed.value = '1';">
  89.     <#form escape "$editor->{source}"#>
  90.     </textarea>
  91.     <hr>
  92.     <input type="hidden" name="changed" value="0">
  93.     <input type="hidden" name="action" value="appear_ted">
  94.     <input type="hidden" name="file" value="$general->{path}">
  95.     <input type="hidden" name="username" value="$general->{username}">
  96.     <input type="submit" value="Save">
  97.     <input type="button" value="Close" onClick="closer()">
  98.     </form>
  99. <#endif#>
  100. </body></html>
  101. <!--END-->
  102.