home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
FAQ
/
discus_admin_1357211388
/
template
/
admin
/
fileedit.tmpl
< prev
next >
Wrap
Text File
|
2009-11-06
|
3KB
|
102 lines
# FILE: fileedit.tmpl
# DESCRIPTION: File editor in Appearance Manager
# Copyright (c) 2002, DiscusWare, LLC, all rights reserved
# -------------------------------------------------------------------------------------------
<!--BEGIN-->
<html><head>
<title>File Editor: $general->{filename}</title>
<style>
p.top { font: 14pt verdana,arial,helvetica; text-align: center; margin-bottom: 0pt; }
span.now { font: 9pt verdana,arial,helvetica; text-align: left; }
span.file { font: 11pt courier new; background: #c0c0c0; }
textarea { background: #e7e7e7; }
</style>
<script language="JavaScript">
function toggle_wordwrap () {
if (self.document.editor.text.wrap) {
var g = self.editor.text;
if (g.wrap == 'off') {
g.wrap = 'soft';
} else {
g.wrap = 'off';
}
if (self.document.editor.wrapbutton.style) {
var b = self.document.editor.wrapbutton.style;
if (g.wrap == 'soft') {
b.borderTopColor = '#000000';
b.borderLeftColor = '#000000';
b.borderRightColor = '#ffffff';
b.borderBottomColor = '#ffffff';
} else {
b.borderTopColor = '#ffffff';
b.borderLeftColor = '#ffffff';
b.borderRightColor = '#000000';
b.borderBottomColor = '#000000';
}
self.document.editor.wrapbutton.blur();
}
}
}
function closer () {
if (self.document.editor.changed.value == '0') {
self.close();
} else {
if (confirm('Are you sure you want to close this screen without saving your changes?')) {
self.close();
}
}
}
</script>
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" vlink="#0000FF">
<p class="top">Discus File Editor</p>
<#if $general->{saved} == 1#>
<p style="width: 100%; background-color: #ccffcc; font: 10pt arial"><b>Note: Changes Successfully Saved</b></p>
<#endif#>
<hr>
<#if <#strlength "$editor->{source}"#> > 30000#>
<p>
Sorry, but the file <b>$general->{filename}</b> is too large to be edited using
this file editor. Web browsers limit the number of characters that can fit into
a text edit box to around 32,000. The file you are attempting to edit is longer
than that. Thus, your browser would not handle the file edit correctly.
</p>
<p>
You can still edit this file by transferring it to your computer and opening it
up in a regular text editor.
</p>
<center>
<form>
<input type=button value="Close" onClick="self.close()">
</form>
</center>
<#else#>
<form action="$cgiurl" method="post" name="editor">
<table width=100%>
<tr>
<td>
<span class="now">Now Editing:</span>
<span class="file">$general->{filename}</span>
</td>
<td align=right>
<input type=button name="wrapbutton" value="Word Wrap" onClick="toggle_wordwrap()">
</td>
</tr>
</table>
<hr>
<textarea name="text" rows="$editor->{rows}" cols="$editor->{cols}" wrap="off" onChange="self.document.editor.changed.value = '1';">
<#form escape "$editor->{source}"#>
</textarea>
<hr>
<input type="hidden" name="changed" value="0">
<input type="hidden" name="action" value="appear_ted">
<input type="hidden" name="file" value="$general->{path}">
<input type="hidden" name="username" value="$general->{username}">
<input type="submit" value="Save">
<input type="button" value="Close" onClick="closer()">
</form>
<#endif#>
</body></html>
<!--END-->