2012-02-22 19:09:46 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
2012-05-21 20:23:41 +00:00
|
|
|
source /mod/webif/lib/setup
|
2012-11-09 21:56:36 +00:00
|
|
|
require plugin
|
2012-02-22 19:09:46 +00:00
|
|
|
|
2014-02-21 21:25:33 +00:00
|
|
|
jqplugin enadis tabsupport filetree
|
|
|
|
jscss script.js style.css
|
2012-02-22 19:09:46 +00:00
|
|
|
header
|
|
|
|
|
|
|
|
set file [cgi_get file "/tmp/hosts"]
|
|
|
|
|
|
|
|
puts {
|
|
|
|
|
|
|
|
<fieldset class=cleft>
|
|
|
|
<legend>File Editor</legend>
|
|
|
|
|
|
|
|
<div id=msg class=blood style="padding-bottom: 0.7em">
|
|
|
|
Use the <i>Open</i> button below to begin.
|
|
|
|
</div>
|
|
|
|
|
2013-08-30 21:22:30 +00:00
|
|
|
<textarea cols=120 rows=20 id=editor
|
2013-07-11 22:13:36 +00:00
|
|
|
class="ui-widget ui-corner-all"></textarea>
|
2012-02-22 19:09:46 +00:00
|
|
|
|
|
|
|
<br>
|
|
|
|
<button class=xeditactive id=open>Open</button>
|
|
|
|
<button class=editactive id=save>Save</button>
|
|
|
|
<button class=editactive id=revert>Revert</button>
|
2012-05-21 20:23:41 +00:00
|
|
|
<button class=xeditactive id=create>Create File</button>
|
2012-02-22 19:09:46 +00:00
|
|
|
|
|
|
|
<div id=result class="blood hidden" />
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<div class=cleft>
|
|
|
|
<button id=back>Back to diagnostics</button>
|
|
|
|
</div>
|
|
|
|
|
2012-10-15 21:32:25 +00:00
|
|
|
<div class=cleft style="margin-top: 1em">
|
|
|
|
<fieldset>
|
|
|
|
<legend> Commonly edited files </legend>
|
|
|
|
<ul>
|
|
|
|
<li><a href=# class=qfile>/mod/etc/anacrontab</a></li>
|
|
|
|
<li><a href=# class=qfile>/mod/var/spool/cron/crontabs/root</a></li>
|
2013-09-09 19:38:56 +00:00
|
|
|
<li><a href=# class=qfile>/mod/webif/html/css/EXTRA.css</a></li>
|
2012-11-09 21:56:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proc quickedit {file} {
|
|
|
|
puts "<li><a href=# class=qfile>$file</a></li>"
|
|
|
|
}
|
|
|
|
|
|
|
|
eval_plugins quickedit
|
|
|
|
|
|
|
|
puts {
|
2012-10-15 21:32:25 +00:00
|
|
|
</ul>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
2012-02-22 19:09:46 +00:00
|
|
|
<div id=chooserd>
|
|
|
|
<i>Humax Filesystem</i>
|
|
|
|
<div id=chooser></div>
|
|
|
|
</div>
|
|
|
|
|
2012-05-21 20:23:41 +00:00
|
|
|
<div id=createf title="Create new file" style="display: none">
|
|
|
|
<form id=createf_form>
|
|
|
|
<table border=0>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
<label for="createf_name">
|
|
|
|
<b>Filename</b>
|
|
|
|
</label>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<input type=text name="createf_name"
|
|
|
|
id="createf_name"
|
|
|
|
value="/mod/" size=70 maxlength=255
|
|
|
|
class="text ui-widget-content ui-corner-all">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2012-02-22 19:09:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
footer
|
|
|
|
|