1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.0//EN'
>
4 Copyright (C) 2006-2010 Jonathan Zarate
5 http://www.polarcloud.com/tomato/
7 For use with Tomato Firmware only.
8 No part of this file may be used without permission.
12 <meta http-equiv='content-type' content='text/html;charset=utf-
8'
>
13 <meta name='robots' content='noindex,nofollow'
>
14 <title>[<%
ident(); %>] Admin: JFFS
</title>
15 <link rel='stylesheet' type='text/css' href='tomato.css'
>
16 <link rel='stylesheet' type='text/css' href='color.css'
>
17 <script type='text/javascript' src='tomato.js'
></script>
21 <script type='text/javascript' src='debug.js'
></script>
23 <script type='text/javascript'
>
25 // <% nvram("jffs2_on,jffs2_exec,t_fix1"); %>
27 fmtwait
= (nvram
.t_fix1
== 'RT-N16' ? 120 : 60);
29 function verifyFields(focused
, quiet
)
31 var b
= !E('_f_jffs2_on').checked
;
32 E('format').disabled
= b
;
33 E('_jffs2_exec').disabled
= b
;
37 function formatClicked()
39 if (!verifyFields(null, 0)) return;
40 if (!confirm("Format the JFFS partition?")) return;
44 function formatClock()
47 E('fclock').innerHTML
= 'a few more seconds';
50 E('fclock').innerHTML
= ((ftime
> 0) ? 'about ' : '') + ftime
+ ' second' + ((ftime
== 1) ? '' : 's');
52 if (--ftime
>= 0) setTimeout(formatClock
, 1000);
57 if (!verifyFields(null, 0)) return;
59 E('format').disabled
= 1;
60 if (format
) E('fmsg').style
.visibility
= 'visible';
63 var on
= E('_f_jffs2_on').checked
? 1 : 0;
64 fom
.jffs2_on
.value
= on
;
66 fom
.jffs2_format
.value
= 1;
67 fom
._commit
.value
= 0;
68 fom
._nextwait
.value
= fmtwait
;
71 fom
.jffs2_format
.value
= 0;
72 fom
._commit
.value
= 1;
73 fom
._nextwait
.value
= on
? 15 : 3;
83 function submit_complete()
91 <form id='_fom' method='post' action='tomato.cgi'
>
92 <table id='container' cellspacing=
0>
93 <tr><td colspan=
2 id='header'
>
94 <div class='title'
>Tomato
</div>
95 <div class='version'
>Version <%
version(); %></div>
97 <tr id='body'
><td id='navi'
><script type='text/javascript'
>navi()</script></td>
99 <div id='ident'
><%
ident(); %></div>
103 <input type='hidden' name='_nextpage' value='admin-jffs2.asp'
>
104 <input type='hidden' name='_nextwait' value='
10'
>
105 <input type='hidden' name='_service' value='jffs2-restart'
>
106 <input type='hidden' name='_commit' value='
1'
>
108 <input type='hidden' name='jffs2_on'
>
109 <input type='hidden' name='jffs2_format' value='
0'
>
111 <div class='section-title'
>JFFS
</div>
112 <div class='section'
>
113 <script type='text/javascript'
>
114 // <% statfs("/jffs", "jffs2"); %>
116 jfon
= (nvram
.jffs2_on
== 1);
117 createFieldTable('', [
118 { title
: 'Enable', name
: 'f_jffs2_on', type
: 'checkbox', value
: jfon
},
119 { title
: 'Execute When Mounted', name
: 'jffs2_exec', type
: 'text', maxlen
: 64, size
: 34, value
: nvram
.jffs2_exec
},
121 { title
: 'Total / Free Size', text
: (((jffs2
.mnt
) || (jffs2
.size
> 0)) ? scaleSize(jffs2
.size
) : '') + ((jffs2
.mnt
) ? ' / ' + scaleSize(jffs2
.free
) : ' (not mounted)') },
123 { title
: '', custom
: '<input type="button" value="Format / Erase..." onclick="formatClicked()" id="format"><br><br>' +
124 '<span style="background:#b55;color:#fff;padding:1px 8px;visibility:hidden" id="fmsg">Please wait for <span id="fclock">about 60 seconds</span>...</span>' }
129 <script type='text/javascript'
>show_notice1('<% notice("jffs"); %>');</script>
134 <tr><td id='footer' colspan=
2>
135 <span id='footer-msg'
></span>
136 <input type='button' value='Save' id='save-button' onclick='save()'
>
137 <input type='button' value='Cancel' id='cancel-button' onclick='javascript:reloadPage();'
>
141 <script type='text/javascript'
>verifyFields(null, 1);</script>