Compare commits
13 Commits
1.0.0@1522
...
1.0.6@2148
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27c7818da8 | ||
|
|
9fb84443cd | ||
|
|
0ae9a07cce | ||
|
|
ed20eec408 | ||
|
|
c095cc7913 | ||
|
|
b379bb64dc | ||
|
|
e82d303c95 | ||
|
|
84a03f49bf | ||
|
|
e0fea797bb | ||
|
|
102ae13acb | ||
|
|
0bca853384 | ||
|
|
38a079b0ba | ||
|
|
cf0a6b5028 |
@@ -1,9 +1,9 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 1.0.0
|
||||
Version: 1.0.6
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif-channelicons(>=1.0.5),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.13),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.05),ffmpeg,id3v2
|
||||
Depends: webif-channelicons(>=1.1.4),mongoose(>=3.0-9),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
|
||||
Suggests:
|
||||
Description: An evolving web interface for the Humax.
|
||||
|
||||
@@ -6,25 +6,22 @@ export tmpf=/tmp/cronf.$$
|
||||
|
||||
# Add cron jobs
|
||||
|
||||
crond=$PKG_ROOT/var/spool/cron/crontabs
|
||||
[ -d $crond ] || exit 1
|
||||
|
||||
cronf=$crond/root
|
||||
grep -v webif/lib/bin/auto $cronf > $tmpf
|
||||
(
|
||||
cat $tmpf
|
||||
echo '*/10 * * * * /mod/webif/lib/bin/auto >/dev/null 2>&1'
|
||||
) > $cronf
|
||||
crontab=$PKG_ROOT/bin/crontab
|
||||
if [ -x $crontab ]; then
|
||||
$crontab -l | grep -v webif/lib/bin/auto > $tmpf
|
||||
cat $tmpf - << EOM | $crontab -
|
||||
*/10 * * * * /mod/webif/lib/bin/auto >/dev/null 2>&1
|
||||
EOM
|
||||
fi
|
||||
|
||||
# Add anacron jobs
|
||||
|
||||
ana=$PKG_ROOT/etc/anacrontab
|
||||
egrep -v 'backup/backup.jim|diskattrs' $ana > $tmpf
|
||||
(
|
||||
cat $tmpf
|
||||
echo "1 8 sched_backup /mod/var/mongoose/cgi-bin/backup/backup.jim"
|
||||
echo "1 5 diskattrs /mod/webif/lib/bin/diskattrs"
|
||||
) > $ana
|
||||
egrep -v 'backup/backup.jim|bin/diskattrs' $ana > $tmpf
|
||||
cat $tmpf - << EOM > $ana
|
||||
1 8 sched_backup /mod/webif/cgi-bin/backup/backup.jim
|
||||
1 5 diskattrs /mod/webif/lib/bin/diskattrs
|
||||
EOM
|
||||
|
||||
$PKG_ROOT/etc/init.d/S02anacron start < /dev/null > /dev/null 2>&1 &
|
||||
|
||||
@@ -39,5 +36,9 @@ if [ ! -f /mod/webif/.strip-updated ]; then
|
||||
touch /mod/webif/.strip-updated
|
||||
fi
|
||||
|
||||
/mod/webif/lib/bin/diskattrs
|
||||
|
||||
[ -f $tmpf ] && rm -f $tmpf
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
@@ -2,16 +2,17 @@
|
||||
|
||||
export tmpf=/tmp/cronf.$$
|
||||
|
||||
cronf=$PKG_ROOT/var/spool/cron/crontabs/root
|
||||
if [ -f $cronf ]; then
|
||||
grep -v webif/lib/bin/auto $cronf > $tmpf
|
||||
cp $tmpf $cronf
|
||||
[ -s $cronf ] || rm -f $cronf
|
||||
crontab=$PKG_ROOT/bin/crontab
|
||||
if [ -x $crontab ]; then
|
||||
$crontab -l | grep -v webif/lib/bin/auto > $tmpf
|
||||
[ -s $tmpf ] && $crontab $tmpf || $crontab -r
|
||||
fi
|
||||
|
||||
ana=/mod/etc/anacrontab
|
||||
egrep -v 'backup/backup.jim|diskattrs' $ana > $tmpf
|
||||
egrep -v 'backup/backup.jim|bin/diskattrs' $ana > $tmpf
|
||||
cp $tmpf $ana
|
||||
|
||||
[ -f $tmpf ] && rm -f $tmpf
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ foreach tw [$db query {
|
||||
"BBC ONE" { set mux "PSB1/BBC A" }
|
||||
"ITV1" { set mux "PSB2/D3&4" }
|
||||
"ITV" { set mux "PSB2/D3&4" }
|
||||
"BBC One HD" { set mux "PSB3/BBC B (HD)" }
|
||||
"BBC ONE HD" { set mux "PSB3/BBC B (HD)" }
|
||||
"ITV3" { set mux "COM4/SDN" }
|
||||
"Dave" { set mux "COM5/ARQ A" }
|
||||
"Film4" { set mux "COM6/ARQ B" }
|
||||
|
||||
@@ -6,6 +6,7 @@ source /mod/webif/lib/setup
|
||||
require altrow
|
||||
|
||||
set databases [glob /var/lib/humaxtv/*.db]
|
||||
lappend databases {*}[glob /mod/etc/*.db]
|
||||
lappend databases "/mnt/hd2/dms_cds.db"
|
||||
|
||||
header
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require epg.class
|
||||
require epg.class system.class
|
||||
|
||||
set irinst [system pkginst ir]
|
||||
|
||||
httpheader
|
||||
|
||||
@@ -14,7 +16,10 @@ set record [lindex [epg fetch dump -service $service -event $event] 0]
|
||||
$record get_channel_info
|
||||
set others [$record othertimes]
|
||||
|
||||
jqplugin confirmAction
|
||||
|
||||
puts "
|
||||
<script type=text/javascript src=/js/chanchange.js></script>
|
||||
<table class=keyval>
|
||||
<tr>
|
||||
<th>Programme</th>
|
||||
@@ -116,7 +121,14 @@ if {[$record get rec_crid] != ""} {
|
||||
puts "
|
||||
<tr>
|
||||
<td colspan=2 valign=top>
|
||||
[$record channel_icon 70]
|
||||
"
|
||||
if {$irinst} {
|
||||
puts "<a class=chanchange chan=[$record get channel_num] href=#>"
|
||||
}
|
||||
puts [$record channel_icon 70]
|
||||
if {$irinst} { puts "</a>" }
|
||||
|
||||
puts "
|
||||
[join [$record icon_set] " "]
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -7,7 +7,8 @@ require settings.class plugin system.class
|
||||
httpheader
|
||||
|
||||
if {[cgi_get act] eq "https"} {
|
||||
if {[cgi_get val off] eq "off"} {
|
||||
set val [cgi_get val off]
|
||||
if {$val in {0 off}} {
|
||||
file delete /mod/etc/mongoose.cert
|
||||
puts "HTTPS Server will be disabled after next reboot."
|
||||
} else {
|
||||
@@ -18,7 +19,8 @@ if {[cgi_get act] eq "https"} {
|
||||
}
|
||||
|
||||
if {[cgi_get act] eq "xtelnet"} {
|
||||
if {[cgi_get val off] eq "off"} {
|
||||
set val [cgi_get val off]
|
||||
if {$val in {0 off}} {
|
||||
file delete /mod/boot/xtelnet
|
||||
puts "Telnet server expert mode will be disabled after next reboot."
|
||||
} else {
|
||||
@@ -37,6 +39,7 @@ set epg_style [$settings epg_style]
|
||||
set pkgdev [$settings pkgdev]
|
||||
set notoolbar [$settings notoolbar]
|
||||
set nomobile [$settings nomobile]
|
||||
set nohelplinks [$settings nohelplinks]
|
||||
set xepghours [$settings xepghours]
|
||||
if {$xepghours == 0} { set xepghours 4 }
|
||||
set genrededup [$settings genrededup]
|
||||
@@ -80,6 +83,7 @@ handle_str_update epg_style $epg_style "EPG Type"
|
||||
handle_int_update pkgdev $pkgdev "Development Package Display"
|
||||
handle_int_update notoolbar $notoolbar "Disable toolbar"
|
||||
handle_int_update nomobile $nomobile "Disable mobile link"
|
||||
handle_int_update nohelplinks $nohelplinks "Disable help links"
|
||||
handle_int_update genrededup $genrededup "Genre search dedup"
|
||||
handle_int_update autolog $autolog "Auto-processing log level"
|
||||
|
||||
@@ -116,12 +120,26 @@ header
|
||||
puts {
|
||||
<script type="text/javascript" src="/cgi-bin/settings.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery.form.js"></script>
|
||||
<script type="text/javascript" src="/js/jconfirmaction.jquery.js"></script>
|
||||
<link href=/css/jconfirmaction.jquery.css rel=stylesheet type=text/css />
|
||||
<script type="text/javascript" src="/js/iphone-style-checkboxes.js"></script>
|
||||
<link href=/css/iphone-style-checkboxes.css rel=stylesheet type=text/css />
|
||||
}
|
||||
|
||||
proc setting_toggle {name attr checked {invert 0} {val 0}} {
|
||||
puts -nonewline "
|
||||
<tr>
|
||||
<th class=key>$name</th>
|
||||
<td><input class=setting_toggle type=checkbox value=yes"
|
||||
if {$checked} { puts -nonewline " checked" }
|
||||
puts -nonewline " attr=$attr"
|
||||
if {$invert} { puts -nonewline " invert=1" }
|
||||
if {$val} { puts -nonewline " useval=1" }
|
||||
puts -nonewline ">
|
||||
<div id=${attr}_output></div>
|
||||
</td>
|
||||
</tr>
|
||||
"
|
||||
}
|
||||
|
||||
puts "
|
||||
<fieldset style=\"display: inline\">
|
||||
<legend>
|
||||
@@ -146,40 +164,14 @@ puts "
|
||||
</tr>
|
||||
"
|
||||
|
||||
puts -nonewline "
|
||||
<tr>
|
||||
<th class=key>HTTPS web server?</th>
|
||||
<td><input id=https_toggle name=https type=checkbox value=yes"
|
||||
if {[file exists /mod/etc/mongoose.cert]} { puts -nonewline " checked" }
|
||||
puts ">
|
||||
<div id=https_output></div>
|
||||
</td>
|
||||
</tr>
|
||||
"
|
||||
setting_toggle "HTTPS web server?" "https" \
|
||||
[file exists /mod/etc/mongoose.cert] 0 1
|
||||
setting_toggle "Slide-down toolbar?" "notoolbar" $(!$notoolbar) 1
|
||||
setting_toggle "Mobile link on main page?" "nomobile" $(!$nomobile) 1
|
||||
setting_toggle "Help links on main page?" "nohelplinks" $(!$nohelplinks) 1
|
||||
|
||||
puts -nonewline "
|
||||
<tr>
|
||||
<th class=key>Slide-down toolbar?</th>
|
||||
<td><input id=toolbar_toggle name=toolbar type=checkbox value=yes"
|
||||
if {$notoolbar == 0} { puts -nonewline " checked" }
|
||||
puts ">
|
||||
<div id=toolbar_output></div>
|
||||
</td>
|
||||
</tr>
|
||||
"
|
||||
|
||||
puts -nonewline "
|
||||
<tr>
|
||||
<th class=key>Mobile link on main page?</th>
|
||||
<td><input id=mobile_toggle name=mobile type=checkbox value=yes"
|
||||
if {$nomobile == 0} { puts -nonewline " checked" }
|
||||
puts ">
|
||||
<div id=mobile_output></div>
|
||||
</td>
|
||||
</tr>
|
||||
"
|
||||
|
||||
puts -nonewline "
|
||||
<form class=auto id=autolog method=get action=$env(REQUEST_URI)>
|
||||
<th class=key>Auto-processing log level</th>
|
||||
<td><select id=autolog name=autolog
|
||||
@@ -202,6 +194,7 @@ puts "
|
||||
<div id=autolog_output></div>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
"
|
||||
|
||||
puts "
|
||||
@@ -295,49 +288,43 @@ puts "
|
||||
</tr>
|
||||
"
|
||||
|
||||
puts -nonewline "
|
||||
<tr>
|
||||
<th class=key>De-duplicate genre search results?</th>
|
||||
<td><input id=genrededup_toggle name=genrededup type=checkbox value=yes"
|
||||
if {$genrededup == 1} { puts -nonewline " checked" }
|
||||
puts ">
|
||||
<div id=genrededup_output></div>
|
||||
</td>
|
||||
</tr>
|
||||
"
|
||||
setting_toggle "De-duplicate genre search results?" genrededup $genrededup
|
||||
|
||||
puts "
|
||||
</table>
|
||||
</fieldset>
|
||||
<br><br>
|
||||
<fieldset style=\"display: inline\">
|
||||
<legend> Email Settings </legend>
|
||||
<table>
|
||||
"
|
||||
|
||||
puts "
|
||||
<tr>
|
||||
<form class=auto id=smtp_server method=get action=$env(REQUEST_URI)>
|
||||
<th class=key>SMTP Server for outbound email</th>
|
||||
<td><input name=smtp_server value=\"$smtp_server\"
|
||||
class=\"text ui-widget-content ui-corner-all\"
|
||||
length=20 maxlength=50>
|
||||
<small>
|
||||
<input id=smtp_server_submit value=\"change\" type=submit>
|
||||
</small>
|
||||
<div id=smtp_server_output></div>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
"
|
||||
#puts "
|
||||
# <fieldset style=\"display: inline\">
|
||||
# <legend> Email Settings </legend>
|
||||
# <table>
|
||||
#"
|
||||
#
|
||||
#puts "
|
||||
# <tr>
|
||||
# <form class=auto id=smtp_server method=get action=$env(REQUEST_URI)>
|
||||
# <th class=key>SMTP Server for outbound email</th>
|
||||
# <td><input name=smtp_server value=\"$smtp_server\"
|
||||
# class=\"text ui-widget-content ui-corner-all\"
|
||||
# length=20 maxlength=50>
|
||||
# <small>
|
||||
# <input id=smtp_server_submit value=\"change\" type=submit>
|
||||
# </small>
|
||||
# <div id=smtp_server_output></div>
|
||||
# </td>
|
||||
# </form>
|
||||
# </tr>
|
||||
#"
|
||||
#
|
||||
#puts "
|
||||
# </table>
|
||||
# </fieldset>
|
||||
# <br><br>
|
||||
#"
|
||||
|
||||
puts "
|
||||
</table>
|
||||
</fieldset>
|
||||
"
|
||||
|
||||
puts "
|
||||
<br><br>
|
||||
<fieldset style=\"display: inline\">
|
||||
<legend> Web Interface User Access Control </legend>
|
||||
<table>
|
||||
@@ -432,34 +419,16 @@ puts -nonewline "
|
||||
<fieldset style=\"display: inline\">
|
||||
<legend> Advanced Settings </legend>
|
||||
<table>
|
||||
<tr>
|
||||
<th class=key>Show development and advanced packages?</th>
|
||||
<td><input name=pkgdev id=pkgdev value=1 type=checkbox
|
||||
"
|
||||
if {$pkgdev} { puts -nonewline " checked" }
|
||||
puts ">
|
||||
</td>
|
||||
</tr>
|
||||
"
|
||||
setting_toggle "Show development and advanced packages?" "pkgdev" $pkgdev
|
||||
|
||||
if {[system modversion 1] >= 214} {
|
||||
|
||||
puts -nonewline "
|
||||
<tr>
|
||||
<th class=key>Expert mode telnet server?</th>
|
||||
<td><input id=xtelnet_toggle name=xtelnet type=checkbox value=yes"
|
||||
if {[file exists /mod/boot/xtelnet]} { puts -nonewline " checked" }
|
||||
puts ">
|
||||
<div id=xtelnet_output></div>
|
||||
</td>
|
||||
</tr>
|
||||
"
|
||||
|
||||
setting_toggle "Expert mode telnet server?" "xtelnet" \
|
||||
[file exists /mod/boot/xtelnet] 0 1
|
||||
}
|
||||
|
||||
puts "
|
||||
</table>
|
||||
<div id=pkgdev_output></div>
|
||||
</fieldset>
|
||||
"
|
||||
|
||||
|
||||
@@ -41,117 +41,33 @@ $(document).ready(function () {
|
||||
});
|
||||
});
|
||||
|
||||
$('#pkgdev').change(function() {
|
||||
$('.setting_toggle').change(function() {
|
||||
var arg = '0';
|
||||
var urlargs;
|
||||
if ($(this).attr('checked'))
|
||||
arg = '1';
|
||||
|
||||
$(this).disable();
|
||||
if ($(this).attr('invert'))
|
||||
arg = arg == "0" ? "1" : "0";
|
||||
|
||||
$('#pkgdev_output')
|
||||
.empty()
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?pkgdev=' + arg,
|
||||
function() {
|
||||
$('#pkgdev').enable();
|
||||
$('#pkgdev_output')
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
});
|
||||
var el = $(this);
|
||||
var attr = $(this).attr('attr');
|
||||
var output = '#' + attr + '_output';
|
||||
|
||||
$('#https_toggle').change(function() {
|
||||
var arg = 'off';
|
||||
if ($(this).attr('checked'))
|
||||
arg = 'on';
|
||||
if ($(this).attr('useval'))
|
||||
urlargs = 'act=' + attr + '&val=' + arg;
|
||||
else
|
||||
urlargs = attr + '=' + arg;
|
||||
|
||||
$(this).disable();
|
||||
|
||||
$('#https_output')
|
||||
.empty()
|
||||
.html('<img src=/img/loading.gif>Please Wait...')
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?act=https&val=' + arg,
|
||||
function() {
|
||||
$('#https_toggle').enable();
|
||||
$('#https_output')
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
});
|
||||
|
||||
$('#xtelnet_toggle').change(function() {
|
||||
var arg = 'off';
|
||||
if ($(this).attr('checked'))
|
||||
arg = 'on';
|
||||
|
||||
$(this).disable();
|
||||
|
||||
$('#xtelnet_output')
|
||||
.empty()
|
||||
.html('<img src=/img/loading.gif>Please Wait...')
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?act=xtelnet&val=' + arg,
|
||||
function() {
|
||||
$('#xtelnet_toggle').enable();
|
||||
$('#xtelnet_output')
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
});
|
||||
|
||||
$('#toolbar_toggle').change(function() {
|
||||
var arg = '1';
|
||||
if ($(this).attr('checked'))
|
||||
arg = '0';
|
||||
|
||||
$(this).disable();
|
||||
|
||||
$('#toolbar_output')
|
||||
$(output)
|
||||
.empty()
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?notoolbar=' + arg,
|
||||
.load('/cgi-bin/settings.jim?' + urlargs,
|
||||
function() {
|
||||
$('#toolbar_toggle').enable();
|
||||
$('#toolbar_output')
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
});
|
||||
|
||||
$('#mobile_toggle').change(function() {
|
||||
var arg = '1';
|
||||
if ($(this).attr('checked'))
|
||||
arg = '0';
|
||||
|
||||
$(this).disable();
|
||||
|
||||
$('#mobile_output')
|
||||
.empty()
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?nomobile=' + arg,
|
||||
function() {
|
||||
$('#mobile_toggle').enable();
|
||||
$('#mobile_output')
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
});
|
||||
|
||||
$('#genrededup_toggle').change(function() {
|
||||
var arg = '0';
|
||||
if ($(this).attr('checked'))
|
||||
arg = '1';
|
||||
|
||||
$(this).disable();
|
||||
|
||||
$('#genrededup_output')
|
||||
.empty()
|
||||
.show('slow')
|
||||
.load('/cgi-bin/settings.jim?genrededup=' + arg,
|
||||
function() {
|
||||
$('#genrededup_toggle').enable();
|
||||
$('#genrededup_output')
|
||||
$(el).enable();
|
||||
$(output)
|
||||
.css('font-style', 'italic')
|
||||
.delay(2000).fadeOut('slow');
|
||||
});
|
||||
|
||||
@@ -4,12 +4,17 @@ package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
|
||||
header
|
||||
jqplugin confirmAction
|
||||
|
||||
require epg.class spinner.class altrow epg_search totop
|
||||
require epg.class spinner.class altrow epg_search totop system.class
|
||||
|
||||
set irinst [system pkginst ir]
|
||||
|
||||
puts {
|
||||
<link type="text/css" href="/css/xepg.css" rel="Stylesheet" />
|
||||
<script type=text/javascript src=/js/enadis.js></script>
|
||||
<script type=text/javascript src=xepg.js></script>
|
||||
<script type=text/javascript src=/js/chanchange.js></script>
|
||||
}
|
||||
|
||||
[spinner new {
|
||||
@@ -121,9 +126,13 @@ foreach e $records {
|
||||
if {$chnum != $lcn} {
|
||||
puts "<div class=xechan style=\"width: ${chanpx}px;\">"
|
||||
|
||||
if {$irinst} {
|
||||
puts "<a class=chanchange chan=$chnum href=#>"
|
||||
}
|
||||
puts "[$e channel_icon 30] "
|
||||
if {$irinst} { puts "</a>" }
|
||||
puts "$chnum
|
||||
<a href=/cgi-bin/epg/service.jim?service=[$e get service_id]
|
||||
<a href=\"/cgi-bin/epg/service.jim?service=[$e get service_id]\"
|
||||
title=\"[$e get channel_name]\">
|
||||
[$e get channel_name]
|
||||
</a></div>"
|
||||
@@ -200,48 +209,11 @@ puts "
|
||||
</div>
|
||||
"
|
||||
|
||||
puts "
|
||||
|
||||
<script type=text/javascript>
|
||||
\$(document).ready(function() {
|
||||
|
||||
\$('#epgswitch').button().click(function() {
|
||||
window.location = '/epg.shtml';
|
||||
});
|
||||
|
||||
\$('button.nav').click(function() {
|
||||
window.location = '/cgi-bin/xepg.jim?stt=' + \$(this).attr('tt') +
|
||||
'&pos=' + \$('#xegrid').scrollTop();
|
||||
});
|
||||
|
||||
\$('#xepg_dp').datepicker({
|
||||
buttonImage: '/img/cal.gif',
|
||||
buttonImageOnly: true,
|
||||
showOn: 'button',
|
||||
dateFormat: '@',
|
||||
minDate: '[expr $now * 1000]',
|
||||
maxDate: '[expr ($now + 7 * 86400) * 1000]',
|
||||
onSelect: function(val, sel) {
|
||||
var stt = \$(this).attr('stt');
|
||||
// Extract date part
|
||||
dval = Math.round(val / 86400000.0);
|
||||
// Extract current time part
|
||||
var tm = ~~(stt % 86400);
|
||||
|
||||
var ret = dval * 86400 + tm;
|
||||
|
||||
window.location = '/cgi-bin/xepg.jim?stt=' + ret;
|
||||
}
|
||||
});
|
||||
|
||||
\$('img.ui-datepicker-trigger').hover(
|
||||
function() { \$(this).css('cursor', 'pointer'); },
|
||||
function() { \$(this).css('cursor', 'auto'); }
|
||||
);
|
||||
|
||||
"
|
||||
|
||||
if {$current} {
|
||||
puts "
|
||||
<script type=text/javascript>
|
||||
\$(function() {
|
||||
"
|
||||
puts {
|
||||
|
||||
var kt = $('#xe0');
|
||||
@@ -252,20 +224,18 @@ var height = $('#keypos').position().top - ktpos.top;
|
||||
}
|
||||
puts "var nowpos = ktpos.left + (kt.width() * $offset);"
|
||||
puts {
|
||||
if (window.console)
|
||||
console.log('NOWPOS: %d', nowpos);
|
||||
$('#xepgnow')
|
||||
.css('left', nowpos + 'px')
|
||||
.css('top', ktpos.top)
|
||||
.height(height)
|
||||
.show('slow');
|
||||
}
|
||||
}
|
||||
|
||||
puts "
|
||||
});
|
||||
</script>
|
||||
"
|
||||
puts "
|
||||
});
|
||||
</script>
|
||||
"
|
||||
}
|
||||
|
||||
puts "
|
||||
<a href=/cgi-bin/settings.jim>
|
||||
|
||||
38
var/mongoose/cgi-bin/xepg.js
Normal file
@@ -0,0 +1,38 @@
|
||||
$(function() {
|
||||
|
||||
$('#epgswitch').button().click(function() {
|
||||
window.location = '/epg.shtml';
|
||||
});
|
||||
|
||||
$('button.nav').click(function() {
|
||||
window.location = '/cgi-bin/xepg.jim?stt=' + $(this).attr('tt') +
|
||||
'&pos=' + $('#xegrid').scrollTop();
|
||||
});
|
||||
|
||||
$('#xepg_dp').datepicker({
|
||||
buttonImage: '/img/cal.gif',
|
||||
buttonImageOnly: true,
|
||||
showOn: 'button',
|
||||
dateFormat: '@',
|
||||
minDate: '[expr $now * 1000]',
|
||||
maxDate: '[expr ($now + 7 * 86400) * 1000]',
|
||||
onSelect: function(val, sel) {
|
||||
var stt = $(this).attr('stt');
|
||||
// Extract date part
|
||||
dval = Math.round(val / 86400000.0);
|
||||
// Extract current time part
|
||||
var tm = ~~(stt % 86400);
|
||||
|
||||
var ret = dval * 86400 + tm;
|
||||
|
||||
window.location = '/cgi-bin/xepg.jim?stt=' + ret;
|
||||
}
|
||||
});
|
||||
|
||||
$('img.ui-datepicker-trigger').hover(
|
||||
function() { $(this).css('cursor', 'pointer'); },
|
||||
function() { $(this).css('cursor', 'auto'); }
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
@@ -268,7 +268,7 @@ puts {
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type=text name="aexpiry_days" id="aexpiry_days"
|
||||
<input name="aexpiry_days" id="aexpiry_days"
|
||||
type=number value=0 size=5 maxlength=3
|
||||
class="text ui-widget-content ui-corner-all">
|
||||
</td>
|
||||
|
||||
@@ -113,6 +113,7 @@ switch $action {
|
||||
"$dir/[file tail $path]"}
|
||||
}
|
||||
}
|
||||
ts resetnew $dir
|
||||
}
|
||||
$cb clear
|
||||
$cb save
|
||||
|
||||
@@ -49,6 +49,8 @@ set newname "$shname-[clock seconds]"
|
||||
puts "Renaming file group to $newname"
|
||||
ts renamegroup "$dir/$shname.ts" $newname
|
||||
exec /mod/bin/hmt "+setfilename=$newname" "$dir/$newname.hmt"
|
||||
# New nicesplice shrinks whilst cropping.
|
||||
exec /mod/bin/hmt "+shrunk" "$dir/$newname.hmt"
|
||||
|
||||
set croptime [expr [expr [clock milliseconds] - $cropstart] / 1000.0]
|
||||
puts "Time taken: $croptime"
|
||||
|
||||
@@ -39,10 +39,11 @@ proc icon {img {hover ""} {extra ""} {class "va"}} {
|
||||
}
|
||||
|
||||
proc directory {file bfile tbfile} {
|
||||
puts "<div class=va>"
|
||||
puts "<div class=\"va relative\">"
|
||||
set img "/images/711_1_09_Media_Folder.png"
|
||||
if {$bfile eq $::dustbin} { set img "/img/Dustbin_Folder.png" }
|
||||
puts "<img border=0 class=va id=\"img$tbfile\" src=$img>"
|
||||
puts "<span class=foldernum></span>"
|
||||
puts "<input class=\"fs fsdir\" type=checkbox>"
|
||||
puts "<a class=dbf
|
||||
href=\"$::env(REQUEST_URI)?dir=[cgi_quote_url $file]\"
|
||||
@@ -77,13 +78,19 @@ proc directory {file bfile tbfile} {
|
||||
puts "</div>"
|
||||
}
|
||||
|
||||
set dircount 0
|
||||
set filecount 0
|
||||
|
||||
proc entry {file} {{i 0}} {
|
||||
global dircount filecount
|
||||
|
||||
set bfile [file tail $file]
|
||||
regsub -all " +" $bfile "" tbfile
|
||||
if {[string index $bfile 0] == "\025"} {
|
||||
set bfile [string range $bfile 1 end]
|
||||
}
|
||||
if [file isdirectory "$file"] {
|
||||
incr dircount
|
||||
directory $file $bfile $tbfile
|
||||
return
|
||||
}
|
||||
@@ -116,6 +123,7 @@ proc entry {file} {{i 0}} {
|
||||
set img Video_Other
|
||||
set omenu oopt
|
||||
}
|
||||
incr filecount
|
||||
|
||||
set new 0
|
||||
if {$type eq "ts"} {
|
||||
@@ -261,7 +269,7 @@ set stub ""
|
||||
foreach part [split $dir /] {
|
||||
if {$stub eq "/"} { set name $part } else { set name "/$part" }
|
||||
append stub $name
|
||||
puts "<a href=$env(REQUEST_URI)?dir=[cgi_quote_url $stub]>$name</a>
|
||||
puts "<a href=\"$env(REQUEST_URI)?dir=[cgi_quote_url $stub]\">$name</a>
|
||||
}
|
||||
puts "<span class=filesize id=dirsize></span>"
|
||||
puts "</legend>"
|
||||
@@ -271,7 +279,7 @@ set parent [join [lrange [split $dir /] 0 end-1] /]
|
||||
if {$parent ne ""} {
|
||||
puts "
|
||||
<div class=va>
|
||||
<a href=$env(REQUEST_URI)?dir=[cgi_quote_url $parent]>
|
||||
<a href=\"$env(REQUEST_URI)?dir=[cgi_quote_url $parent]\">
|
||||
<img border=0 src=/images/711_3_09_Media_Folder_UP.png class=va>
|
||||
\[parent directory\]</a>
|
||||
</div>
|
||||
@@ -313,7 +321,11 @@ switch $order {
|
||||
|
||||
foreach file $files { entry "$dir/$file" }
|
||||
|
||||
puts "<a href=# id=selectall>Select all</a> | <a href=# id=deselectall>none</a>"
|
||||
puts "
|
||||
<a href=# id=selectall>Select all</a> | <a href=# id=deselectall>none</a>
|
||||
|
||||
Directories: $dircount, Files: $filecount
|
||||
"
|
||||
|
||||
# Sort icons
|
||||
puts "<div id=sortdiv>"
|
||||
@@ -326,7 +338,7 @@ foreach sl $sortlist {
|
||||
set tag "Currently sorting"
|
||||
if {$order != $index} {
|
||||
puts "
|
||||
<a href=$env(REQUEST_URI)?$env(QUERY_STRING)&order=$index>"
|
||||
<a href=\"$env(REQUEST_URI)?$env(QUERY_STRING)&order=$index\">"
|
||||
set tag "Sort"
|
||||
}
|
||||
puts "<img class=va border=0 src=/img/$img.gif> $tag by $descr"
|
||||
|
||||
@@ -15,6 +15,7 @@ foreach dir [glob -nocomplain "$root"] {
|
||||
if {[file exists "$dir/.series"]} {
|
||||
set fd [open "$dir/.series"]
|
||||
set bytes [read $fd 8]
|
||||
$fd close
|
||||
set recs [unpack $bytes -uintle 0 32]
|
||||
set plays [unpack $bytes -uintle 32 32]
|
||||
set diff $($recs - $plays)
|
||||
|
||||
@@ -1,45 +1,12 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
package require pack
|
||||
source /mod/webif/lib/setup
|
||||
require ts.class hexdump
|
||||
require ts.class
|
||||
|
||||
httpheader
|
||||
|
||||
set dir [cgi_get dir]
|
||||
if {![file isdirectory $dir]} { exit }
|
||||
if {![file exists "$dir/.series"]} { exit }
|
||||
|
||||
set tot 0
|
||||
set watched 0
|
||||
foreach file [readdir -nocomplain $dir] {
|
||||
if {![string match {*.ts} $file]} { continue }
|
||||
#puts "FILE: $file"
|
||||
incr tot
|
||||
if {[set ts [ts fetch "$dir/$file"]] != 0} {
|
||||
if {![$ts flag "New"]} { incr watched }
|
||||
}
|
||||
}
|
||||
|
||||
set fd [open "$dir/.series"]
|
||||
set bytes [read $fd]
|
||||
close $fd
|
||||
set recs [unpack $bytes -uintle 0 32]
|
||||
set played [unpack $bytes -uintle 32 32]
|
||||
|
||||
puts "Current: $played/$recs"
|
||||
|
||||
#hexdump $bytes
|
||||
|
||||
puts "Calculated: $watched/$tot"
|
||||
|
||||
pack bytes $tot -intle 32 0
|
||||
pack bytes $watched -intle 32 32
|
||||
|
||||
#hexdump $bytes
|
||||
|
||||
set fd [open "$dir/.series" "w"]
|
||||
puts -nonewline $fd $bytes
|
||||
close $fd
|
||||
ts resetnew $dir
|
||||
|
||||
|
||||
@@ -115,7 +115,13 @@ function set_folder_new(folder, cnt)
|
||||
folder = folder.replace(/ /g, '');
|
||||
folder = folder.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g, '\\$1');
|
||||
//console.log("Folder: (%s) = (%s)", folder, cnt);
|
||||
$('#img' + folder).attr('src', '/img/Folder_New.png');
|
||||
left = cnt > 99 ? 11 : (cnt > 9 ? 14 : 17);
|
||||
$('#img' + folder)
|
||||
.attr('src', '/img/Folder_New.png')
|
||||
.next('span.foldernum')
|
||||
.css('left', left + 'px')
|
||||
.text(cnt)
|
||||
.show();
|
||||
}
|
||||
|
||||
function new_folder_callback(data, status, xhr)
|
||||
|
||||
@@ -445,3 +445,31 @@ img.doublebmp
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
.relative
|
||||
{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
span.foldernum
|
||||
{
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 14px;
|
||||
top: 9px;
|
||||
color: white;
|
||||
height: 15px;
|
||||
line-height: 16px;
|
||||
background-color: #CC0000;
|
||||
background: linear-gradient(#FF0000, #CC0000) repeat scroll 0 0 #EEEEEE;
|
||||
font-size: 10px;
|
||||
border: 1px solid #660000;
|
||||
padding: 0 2px 0 2px;
|
||||
border-radius: 1em 1em 1em 1em;
|
||||
-moz-border-radius: 1em;
|
||||
-webkit-border-radius: 1em;
|
||||
border-top-right-radius: 1em;
|
||||
border-top-left-radius: 1em;
|
||||
border-bottom-right-radius: 1em;
|
||||
border-bottom-left-radius: 1em;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,3 +111,8 @@ button#later
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.jcaquestion
|
||||
{
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ puts "<fieldset style=\"display: inline\">
|
||||
"
|
||||
|
||||
loadseries $dir
|
||||
set recalc 0
|
||||
foreach file [readdir $dir] {
|
||||
set file "$dir/$file"
|
||||
if {[file extension $file] ne ".hmt"} { continue }
|
||||
@@ -52,6 +53,7 @@ foreach file [readdir $dir] {
|
||||
}
|
||||
ts renamegroup $file "_duplicates/$fn"
|
||||
puts -nonewline " - Renamed to _duplicates/$fn"
|
||||
incr recalc
|
||||
}
|
||||
}
|
||||
error {
|
||||
@@ -78,6 +80,8 @@ foreach file [readdir $dir] {
|
||||
puts "</tr>"
|
||||
}
|
||||
|
||||
if {$recalc} { ts resetnew $dir }
|
||||
|
||||
puts {
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@@ -11,6 +11,9 @@ pkg loaddiagmeta
|
||||
set smv [system modversion 1]
|
||||
|
||||
puts {
|
||||
<style>
|
||||
button.half { width: 48%; }
|
||||
</style>
|
||||
<script type=text/javascript src=/js/enadis.js></script>
|
||||
<script type=text/javascript src=script.js></script>
|
||||
|
||||
@@ -54,8 +57,8 @@ puts {
|
||||
|
||||
<tr>
|
||||
<td colspan=2 align=center>
|
||||
<button id=runedit style="width: 48%">File Editor</button>
|
||||
<button id=dbinfo style="width: 48%">Database Browser</button>
|
||||
<button id=runedit class=half>File Editor</button>
|
||||
<button id=dbinfo class=half>Database Browser</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -63,26 +66,25 @@ puts {
|
||||
<td colspan=2 align=center>
|
||||
}
|
||||
if {[system model] eq "HDR"} {
|
||||
puts { <button id=diskdiag style="width: 48%">Hard Disk</button> }
|
||||
puts { <button id=diskdiag class=half>Hard Disk</button> }
|
||||
}
|
||||
puts {
|
||||
<button id=channelinfo style="width: 48%">Channel Information</button>
|
||||
<button id=channelinfo class=half>Channel Information</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan=2 align=center>
|
||||
<button id=dspace class=half>Disk Space</button>
|
||||
}
|
||||
|
||||
if {[system model] eq "HDR"} {
|
||||
puts {
|
||||
<tr>
|
||||
<td colspan=2 align=center>
|
||||
<button id=dlna style="width: 48%">DLNA Server</button>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
puts { <button id=dlna class=half>DLNA Server</button> }
|
||||
}
|
||||
|
||||
puts {
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan=2 style="height: 10px"></td></tr>
|
||||
|
||||
|
||||
@@ -105,6 +105,10 @@ foreach line [split [exec /mod/bin/smartctl -A $device] "\n"] {
|
||||
$settings _nval_setting "SMART_realloc" $rval
|
||||
if {$rval > 0} { set class orangeshade }
|
||||
}
|
||||
10 {
|
||||
$settings _nval_setting "SMART_spinretry" $rval
|
||||
if {$rval > 0} { set class orangeshade }
|
||||
}
|
||||
197 {
|
||||
$settings _nval_setting "SMART_pending" $rval
|
||||
if {$rval > 0} { set class redshade }
|
||||
|
||||
96
var/mongoose/html/diag/dspace/index.jim
Executable file
@@ -0,0 +1,96 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require system.class pretty_size
|
||||
|
||||
header
|
||||
jqplugin easy-pie-chart
|
||||
|
||||
puts {
|
||||
<link href=style.css rel=stylesheet type=text/css />
|
||||
<script type=text/javascript src=script.js></script>
|
||||
}
|
||||
|
||||
set dustbin [system dustbin 1]
|
||||
set root [system mediaroot]
|
||||
set lroot [string length $root]
|
||||
|
||||
proc hasnew {dir} {
|
||||
if {![file exists "$dir/.series"]} { return 0 }
|
||||
if {[catch {set fd [open "$dir/.series"]}]} { return 0 }
|
||||
set bytes [read $fd 8]
|
||||
$fd close
|
||||
set recs [unpack $bytes -uintle 0 32]
|
||||
set plays [unpack $bytes -uintle 32 32]
|
||||
set diff $($recs - $plays)
|
||||
if {$diff != 0} { return 1 }
|
||||
return 0
|
||||
}
|
||||
|
||||
set rsize 0
|
||||
|
||||
proc gen {dir ddir {depth 0} {expand 0}} {
|
||||
global root lroot rsize
|
||||
|
||||
if {[catch {set dsize [exec /mod/bin/busybox/du -s "$dir/"]} msg]} {
|
||||
puts "Error, $dir, $msg"
|
||||
return
|
||||
}
|
||||
lassign $dsize dsize
|
||||
if {!$rsize} { set rsize $dsize }
|
||||
|
||||
set dlist {}
|
||||
foreach entry [lsort [readdir -nocomplain $dir]] {
|
||||
if {[string index $entry 0] eq "."} continue
|
||||
if {![file isdirectory "$dir/$entry"]} continue
|
||||
lappend dlist $entry
|
||||
}
|
||||
|
||||
set img "/images/711_1_09_Media_Folder.png"
|
||||
if {[hasnew $dir]} { set img "/img/Folder_New.png" }
|
||||
if {[string first "/$::dustbin" $dir] > -1} {
|
||||
set img "/img/Dustbin_Folder.png"
|
||||
}
|
||||
|
||||
if {$expand > 0} { set class "open" } else { set class "closed" }
|
||||
if {$expand > 1} { set timg "minus" } else { set timg "plus" }
|
||||
if {![llength $dlist]} { set timg "join" }
|
||||
|
||||
set perc $($dsize * 100 / $rsize)
|
||||
|
||||
puts -nonewline "
|
||||
<div class=\"va $class\" style=\"padding-left: ${depth}em\">
|
||||
<img border=0 class=\"va tlink\" src=/img/tree/$timg.png>
|
||||
<span class=\"va fileperc\" data-percent=$perc>
|
||||
<img border=0 class=va src=\"$img\"></span>
|
||||
<span class=filesize>
|
||||
([pretty_size $($dsize * 1024)] - $perc%)
|
||||
</span>
|
||||
<span class=path>
|
||||
<a target=dspace_drill
|
||||
href=\"/browse/index.jim?dir=[cgi_quote_url $dir]\">$ddir</a>
|
||||
</span>
|
||||
"
|
||||
|
||||
incr depth 2
|
||||
incr expand -1
|
||||
|
||||
foreach subd $dlist { gen "$dir/$subd" $subd $depth $expand }
|
||||
|
||||
puts {</div>}
|
||||
}
|
||||
|
||||
puts {
|
||||
<fieldset style="display: inline">
|
||||
<legend> Disk Utilisation </legend>
|
||||
}
|
||||
|
||||
gen $root "/" 0 2
|
||||
|
||||
puts {
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
footer
|
||||
|
||||
40
var/mongoose/html/diag/dspace/script.js
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
$(function() {
|
||||
|
||||
|
||||
$('img.tlink').hover(
|
||||
function() { $(this).css('cursor', 'pointer'); },
|
||||
function() { $(this).css('cursor', 'auto'); }
|
||||
).on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if ($(this).attr('src') == '/img/tree/plus.png')
|
||||
{
|
||||
$(this).attr('src', '/img/tree/minus.png');
|
||||
$(this).parent().children('div')
|
||||
.slideDown('slow')
|
||||
.addClass('open')
|
||||
.removeClass('closed');
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).attr('src', '/img/tree/plus.png');
|
||||
$(this).parent().children('div')
|
||||
.slideUp('slow')
|
||||
.addClass('closed')
|
||||
.removeClass('open');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('span.fileperc').easyPieChart({
|
||||
size: 20,
|
||||
barColor: '#00ff00',
|
||||
trackColor: '#A3A3C2',
|
||||
lineWidth: 4,
|
||||
scaleColor: false,
|
||||
lineCap: 'butt'
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
1
var/mongoose/html/diag/dspace/style.css
Normal file
@@ -0,0 +1 @@
|
||||
div.closed { display: none; }
|
||||
@@ -78,6 +78,11 @@ $('#dlna').click(function(e) {
|
||||
window.location = '/dlna/dlna.jim';
|
||||
});
|
||||
|
||||
$('#dspace').click(function(e) {
|
||||
e.preventDefault();
|
||||
window.location = 'dspace/index.jim';
|
||||
});
|
||||
|
||||
$('#reboot').click(function(e) {
|
||||
e.preventDefault();
|
||||
if (confirm('Are you sure you wish to perform a reboot now?'))
|
||||
|
||||
@@ -23,7 +23,8 @@ puts {
|
||||
Use the <i>Open</i> button below to begin.
|
||||
</div>
|
||||
|
||||
<textarea cols=80 rows=20 id=editor></textarea>
|
||||
<textarea cols=120 rows=20 id=editor
|
||||
class="ui-widget ui-corner-all"></textarea>
|
||||
|
||||
<br>
|
||||
<button class=xeditactive id=open>Open</button>
|
||||
|
||||
@@ -2,6 +2,7 @@ textarea
|
||||
{
|
||||
background: white;
|
||||
color: black;
|
||||
font-family: Consolas, "Courier New", "Lucida Console", Monaco, "Courier", monospace !important;
|
||||
}
|
||||
|
||||
#filename
|
||||
|
||||
1
var/mongoose/html/favicon.ico
Symbolic link
@@ -0,0 +1 @@
|
||||
img/fav/favicon.ico
|
||||
BIN
var/mongoose/html/img/fav/114.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
var/mongoose/html/img/fav/144.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
var/mongoose/html/img/fav/16.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
var/mongoose/html/img/fav/32-x.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
var/mongoose/html/img/fav/32.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
var/mongoose/html/img/fav/57.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
var/mongoose/html/img/fav/64.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
var/mongoose/html/img/fav/72.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
var/mongoose/html/img/fav/favicon.ico
Normal file
|
After Width: | Height: | Size: 10 KiB |
6
var/mongoose/html/img/fav/notes.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
<link rel="icon" href="/favicon.ico" sizes="16x16 32x32 64x64" type=image/vnd.microsoft.icon />
|
||||
<link rel="apple-touch-icon" href="/img/fav/57.png" />
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/img/fav/57.png" />
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/img/fav/72.png" />
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/img/fav/114.png" />
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/img/fav/144.png" />
|
||||
BIN
var/mongoose/html/img/tree/blank.png
Normal file
|
After Width: | Height: | Size: 178 B |
BIN
var/mongoose/html/img/tree/folder.png
Normal file
|
After Width: | Height: | Size: 696 B |
BIN
var/mongoose/html/img/tree/folderopen.png
Normal file
|
After Width: | Height: | Size: 749 B |
32
var/mongoose/html/img/tree/index.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<img src=blank.png>blank.png<br>
|
||||
<img src=folder.png>folder.png<br>
|
||||
<img src=folderopen.png>folderopen.png<br>
|
||||
<img src=index.html>index.html<br>
|
||||
<img src=join.png>join.png<br>
|
||||
<img src=joinbottom-down.png>joinbottom-down.png<br>
|
||||
<img src=joinbottom.png>joinbottom.png<br>
|
||||
<img src=leaf.png>leaf.png<br>
|
||||
<img src=line.png>line.png<br>
|
||||
<img src=minus.png>minus.png<br>
|
||||
<img src=minusbottom.png>minusbottom.png<br>
|
||||
<img src=minusonly.png>minusonly.png<br>
|
||||
<img src=minustop.png>minustop.png<br>
|
||||
<img src=nullonly.png>nullonly.png<br>
|
||||
<img src=plus.png>plus.png<br>
|
||||
<img src=plusbottom.png>plusbottom.png<br>
|
||||
<img src=plusonly.png>plusonly.png<br>
|
||||
<img src=plustop.png>plustop.png<br>
|
||||
<img src=rev-join.png>rev-join.png<br>
|
||||
<img src=rev-joinbottom-down.png>rev-joinbottom-down.png<br>
|
||||
<img src=rev-joinbottom.png>rev-joinbottom.png<br>
|
||||
<img src=rev-leaf.png>rev-leaf.png<br>
|
||||
<img src=rev-line.png>rev-line.png<br>
|
||||
<img src=rev-minus.png>rev-minus.png<br>
|
||||
<img src=rev-minusbottom.png>rev-minusbottom.png<br>
|
||||
<img src=rev-minusonly.png>rev-minusonly.png<br>
|
||||
<img src=rev-minustop.png>rev-minustop.png<br>
|
||||
<img src=rev-nullonly.png>rev-nullonly.png<br>
|
||||
<img src=rev-plus.png>rev-plus.png<br>
|
||||
<img src=rev-plusbottom.png>rev-plusbottom.png<br>
|
||||
<img src=rev-plusonly.png>rev-plusonly.png<br>
|
||||
<img src=rev-plustop.png>rev-plustop.png<br>
|
||||
BIN
var/mongoose/html/img/tree/join.png
Normal file
|
After Width: | Height: | Size: 197 B |
BIN
var/mongoose/html/img/tree/joinbottom-down.png
Normal file
|
After Width: | Height: | Size: 200 B |
BIN
var/mongoose/html/img/tree/joinbottom.png
Normal file
|
After Width: | Height: | Size: 195 B |
BIN
var/mongoose/html/img/tree/leaf.png
Normal file
|
After Width: | Height: | Size: 216 B |
BIN
var/mongoose/html/img/tree/line.png
Normal file
|
After Width: | Height: | Size: 193 B |
BIN
var/mongoose/html/img/tree/minus.png
Normal file
|
After Width: | Height: | Size: 241 B |
BIN
var/mongoose/html/img/tree/minusbottom.png
Normal file
|
After Width: | Height: | Size: 236 B |
BIN
var/mongoose/html/img/tree/minusonly.png
Normal file
|
After Width: | Height: | Size: 230 B |
BIN
var/mongoose/html/img/tree/nullonly.png
Normal file
|
After Width: | Height: | Size: 228 B |
BIN
var/mongoose/html/img/tree/plus.png
Normal file
|
After Width: | Height: | Size: 247 B |
BIN
var/mongoose/html/img/tree/plusbottom.png
Normal file
|
After Width: | Height: | Size: 244 B |
BIN
var/mongoose/html/img/tree/plustop.png
Normal file
|
After Width: | Height: | Size: 245 B |
BIN
var/mongoose/html/img/tree/rev-join.png
Normal file
|
After Width: | Height: | Size: 524 B |
BIN
var/mongoose/html/img/tree/rev-joinbottom-down.png
Normal file
|
After Width: | Height: | Size: 532 B |
BIN
var/mongoose/html/img/tree/rev-joinbottom.png
Normal file
|
After Width: | Height: | Size: 524 B |
BIN
var/mongoose/html/img/tree/rev-leaf.png
Normal file
|
After Width: | Height: | Size: 215 B |
BIN
var/mongoose/html/img/tree/rev-line.png
Normal file
|
After Width: | Height: | Size: 524 B |
BIN
var/mongoose/html/img/tree/rev-minus.png
Normal file
|
After Width: | Height: | Size: 528 B |
BIN
var/mongoose/html/img/tree/rev-minusbottom.png
Normal file
|
After Width: | Height: | Size: 528 B |
BIN
var/mongoose/html/img/tree/rev-minusonly.png
Normal file
|
After Width: | Height: | Size: 528 B |
BIN
var/mongoose/html/img/tree/rev-minustop.png
Normal file
|
After Width: | Height: | Size: 528 B |
BIN
var/mongoose/html/img/tree/rev-nullonly.png
Normal file
|
After Width: | Height: | Size: 528 B |
BIN
var/mongoose/html/img/tree/rev-plus.png
Normal file
|
After Width: | Height: | Size: 528 B |
BIN
var/mongoose/html/img/tree/rev-plusbottom.png
Normal file
|
After Width: | Height: | Size: 528 B |
BIN
var/mongoose/html/img/tree/rev-plusonly.png
Normal file
|
After Width: | Height: | Size: 528 B |
BIN
var/mongoose/html/img/tree/rev-plustop.png
Normal file
|
After Width: | Height: | Size: 528 B |
28
var/mongoose/html/js/chanchange.js
Normal file
@@ -0,0 +1,28 @@
|
||||
$(function() {
|
||||
|
||||
var signalarray = ['ZERO', 'ONE', 'TWO', 'THREE', 'FOUR',
|
||||
'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE'];
|
||||
|
||||
$('a.chanchange').jConfirmAction({
|
||||
question: "Change channel?"
|
||||
}, function(el) {
|
||||
var lcn = $(el).attr('chan');
|
||||
|
||||
$('.jcaquestion').fadeOut(300,function(){$(this).remove();});
|
||||
|
||||
var cmd = '';
|
||||
for (i = 0; i < lcn.length; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
cmd += '+';
|
||||
cmd += signalarray[lcn.charAt(i)];
|
||||
}
|
||||
if (lcn < 1000)
|
||||
cmd += '+OK';
|
||||
//console.log('LCN: %O', lcn);
|
||||
//console.log('CMD: %O', cmd);
|
||||
$.get('/plugin/ir/send.jim?code=' + cmd);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
//
|
||||
// For details, visit http://creativecommons.org/licenses/by/3.0/us/
|
||||
|
||||
// Modified by Andy Fiddaman to support left click and
|
||||
// support modification of menu items.
|
||||
// Modified by af123 to support left click, modification of menu items and
|
||||
// utilise jQuery.ui.position for smart element positioning.
|
||||
|
||||
if (jQuery) (function() {
|
||||
$.extend($.fn, {
|
||||
@@ -53,31 +53,17 @@ if (jQuery) (function() {
|
||||
|
||||
if (o.beforeShow) o.beforeShow(el, menu);
|
||||
|
||||
// Detect mouse position
|
||||
var d = {}, x, y;
|
||||
if (self.innerHeight) {
|
||||
d.pageYOffset = self.pageYOffset;
|
||||
d.pageXOffset = self.pageXOffset;
|
||||
d.innerHeight = self.innerHeight;
|
||||
d.innerWidth = self.innerWidth;
|
||||
} else if (document.documentElement &&
|
||||
document.documentElement.clientHeight) {
|
||||
d.pageYOffset = document.documentElement.scrollTop;
|
||||
d.pageXOffset = document.documentElement.scrollLeft;
|
||||
d.innerHeight = document.documentElement.clientHeight;
|
||||
d.innerWidth = document.documentElement.clientWidth;
|
||||
} else if (document.body) {
|
||||
d.pageYOffset = document.body.scrollTop;
|
||||
d.pageXOffset = document.body.scrollLeft;
|
||||
d.innerHeight = document.body.clientHeight;
|
||||
d.innerWidth = document.body.clientWidth;
|
||||
}
|
||||
(e.pageX) ? x = e.pageX : x = e.clientX + d.scrollLeft;
|
||||
(e.pageY) ? y = e.pageY : x = e.clientY + d.scrollTop;
|
||||
|
||||
// Show the menu
|
||||
$(document).unbind('click');
|
||||
$(menu).css({ top: y, left: x }).fadeIn(o.inSpeed);
|
||||
// $(menu).css({ top: y, left: x }).fadeIn(o.inSpeed);
|
||||
$(menu).css('display', 'block').position({
|
||||
my: "left top",
|
||||
at: "right bottom",
|
||||
of: this,
|
||||
offset: "0 5",
|
||||
collision: "fit"
|
||||
}).css('display', 'none').fadeIn(o.inSpeed);
|
||||
|
||||
// Hover events
|
||||
$(menu).find('A').mouseover(function() {
|
||||
$(menu).find('LI.hover').removeClass('hover');
|
||||
@@ -120,7 +106,8 @@ if (jQuery) (function() {
|
||||
$(document).unbind('click').unbind('keypress');
|
||||
$(".contextMenu").hide();
|
||||
// Callback
|
||||
if (callback) callback($(this).attr('href').substr(1), $(srcElement), { x: x - offset.left, y: y - offset.top, docX: x, docY: y });
|
||||
//if (callback) callback($(this).attr('href').substr(1), $(srcElement), { x: x - offset.left, y: y - offset.top, docX: x, docY: y });
|
||||
if (callback) callback($(this).attr('href').substr(1), $(srcElement));
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
@@ -10,8 +10,14 @@ puts {
|
||||
source /mod/webif/include/model.jim
|
||||
puts {
|
||||
</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
|
||||
<link rel="shortcut icon" href=/img/favicon.ico />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<link rel="icon" href="/favicon.ico" sizes="16x16 32x32 64x64"
|
||||
type="image/vnd.microsoft.icon" />
|
||||
<link rel="apple-touch-icon" href="/img/fav/57.png" />
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/img/fav/57.png" />
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/img/fav/72.png" />
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/img/fav/114.png" />
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/img/fav/144.png" />
|
||||
<link type="text/css" href="/lib/jquery.ui/css/custom-theme/jquery-ui.css"
|
||||
rel="Stylesheet" />
|
||||
<link href="/css/style.css" rel="Stylesheet" type="text/css" />
|
||||
|
||||
21
var/mongoose/html/lib/jquery.contextMenu/extra.css
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
.context-menu-item.icon-pwedit { background-image: url(/img/context/page_white_edit.png); }
|
||||
.context-menu-item.icon-pwcopy { background-image: url(/img/context/page_white_copy.png); }
|
||||
.context-menu-item.icon-pwpaste { background-image: url(/img/context/page_white_paste.png); }
|
||||
.context-menu-item.icon-pwdelete { background-image: url(/img/context/page_white_delete.png); }
|
||||
.context-menu-item.icon-edit { background-image: url(/img/context/edit.png); }
|
||||
.context-menu-item.icon-copy { background-image: url(/img/context/copy.png); }
|
||||
.context-menu-item.icon-paste { background-image: url(/img/context/paste.png); }
|
||||
.context-menu-item.icon-delete { background-image: url(/img/context/delete.png); }
|
||||
.context-menu-item.icon-cut { background-image: url(/img/context/cut.png); }
|
||||
.context-menu-item.icon-quit { background-image: url(/img/context/door.png); }
|
||||
.context-menu-item.icon-compress { background-image: url(/img/context/compress.png); }
|
||||
.context-menu-item.icon-compressr { background-image: url(/img/context/compressr.png); }
|
||||
.context-menu-item.icon-dedup { background-image: url(/img/context/dedup.png); }
|
||||
.context-menu-item.icon-decrypt { background-image: url(/img/context/decrypt.png); }
|
||||
.context-menu-item.icon-decryptr { background-image: url(/img/context/decryptr.png); }
|
||||
.context-menu-item.icon-mpg { background-image: url(/img/context/mpg.png); }
|
||||
.context-menu-item.icon-mp3 { background-image: url(/img/context/mp3.png); }
|
||||
.context-menu-item.icon-clock { background-image: url(/img/context/clock.png); }
|
||||
.context-menu-item.icon-thm { background-image: url(/img/context/thumb.png); }
|
||||
|
||||
BIN
var/mongoose/html/lib/jquery.contextMenu/images/cut.png
Normal file
|
After Width: | Height: | Size: 648 B |
BIN
var/mongoose/html/lib/jquery.contextMenu/images/door.png
Normal file
|
After Width: | Height: | Size: 412 B |
|
After Width: | Height: | Size: 442 B |
|
After Width: | Height: | Size: 309 B |
|
After Width: | Height: | Size: 536 B |
|
After Width: | Height: | Size: 618 B |
|
After Width: | Height: | Size: 620 B |
142
var/mongoose/html/lib/jquery.contextMenu/jquery.contextMenu.css
Normal file
@@ -0,0 +1,142 @@
|
||||
/*!
|
||||
* jQuery contextMenu - Plugin for simple contextMenu handling
|
||||
*
|
||||
* Version: git-master
|
||||
*
|
||||
* Authors: Rodney Rehm, Addy Osmani (patches for FF)
|
||||
* Web: http://medialize.github.com/jQuery-contextMenu/
|
||||
*
|
||||
* Licensed under
|
||||
* MIT License http://www.opensource.org/licenses/mit-license
|
||||
* GPL v3 http://opensource.org/licenses/GPL-3.0
|
||||
*
|
||||
*/
|
||||
|
||||
.context-menu-list {
|
||||
margin:0;
|
||||
padding:0;
|
||||
|
||||
min-width: 120px;
|
||||
max-width: 250px;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
list-style-type: none;
|
||||
|
||||
border: 1px solid #DDD;
|
||||
background: #EEE;
|
||||
|
||||
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.context-menu-item {
|
||||
padding: 2px 2px 2px 24px;
|
||||
background-color: #EEE;
|
||||
position: relative;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: -moz-none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.context-menu-separator {
|
||||
padding-bottom:0;
|
||||
border-bottom: 1px solid #DDD;
|
||||
}
|
||||
|
||||
.context-menu-item > label > input,
|
||||
.context-menu-item > label > textarea {
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.context-menu-item.hover {
|
||||
cursor: pointer;
|
||||
background-color: #39F;
|
||||
}
|
||||
|
||||
.context-menu-item.disabled {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.context-menu-input.hover,
|
||||
.context-menu-item.disabled.hover {
|
||||
cursor: default;
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
.context-menu-submenu:after {
|
||||
content: ">";
|
||||
color: #666;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 3px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* icons
|
||||
#protip:
|
||||
In case you want to use sprites for icons (which I would suggest you do) have a look at
|
||||
http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement
|
||||
.context-menu-item.icon:before {}
|
||||
*/
|
||||
.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }
|
||||
.context-menu-item.icon-edit { background-image: url(images/page_white_edit.png); }
|
||||
.context-menu-item.icon-cut { background-image: url(images/cut.png); }
|
||||
.context-menu-item.icon-copy { background-image: url(images/page_white_copy.png); }
|
||||
.context-menu-item.icon-paste { background-image: url(images/page_white_paste.png); }
|
||||
.context-menu-item.icon-delete { background-image: url(images/page_white_delete.png); }
|
||||
.context-menu-item.icon-add { background-image: url(images/page_white_add.png); }
|
||||
.context-menu-item.icon-quit { background-image: url(images/door.png); }
|
||||
|
||||
/* vertically align inside labels */
|
||||
.context-menu-input > label > * { vertical-align: top; }
|
||||
|
||||
/* position checkboxes and radios as icons */
|
||||
.context-menu-input > label > input[type="checkbox"],
|
||||
.context-menu-input > label > input[type="radio"] {
|
||||
margin-left: -17px;
|
||||
}
|
||||
.context-menu-input > label > span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.context-menu-input > label,
|
||||
.context-menu-input > label > input[type="text"],
|
||||
.context-menu-input > label > textarea,
|
||||
.context-menu-input > label > select {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.context-menu-input > label > textarea {
|
||||
height: 100px;
|
||||
}
|
||||
.context-menu-item > .context-menu-list {
|
||||
display: none;
|
||||
/* re-positioned by js */
|
||||
right: -5px;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.context-menu-item.hover > .context-menu-list {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.context-menu-accesskey {
|
||||
text-decoration: underline;
|
||||
}
|
||||
1686
var/mongoose/html/lib/jquery.contextMenu/jquery.contextMenu.js
Normal file
@@ -0,0 +1,10 @@
|
||||
.easyPieChart {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.easyPieChart canvas {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 10px;
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
// Generated by CoffeeScript 1.6.3
|
||||
/*
|
||||
Easy pie chart is a jquery plugin to display simple animated pie charts for only one value
|
||||
|
||||
Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
|
||||
Built on top of the jQuery library (http://jquery.com)
|
||||
|
||||
@source: http://github.com/rendro/easy-pie-chart/
|
||||
@autor: Robert Fleischmann
|
||||
@version: 1.2.3
|
||||
|
||||
Inspired by: http://dribbble.com/shots/631074-Simple-Pie-Charts-II?list=popular&offset=210
|
||||
Thanks to Philip Thrasher for the jquery plugin boilerplate for coffee script
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
$.easyPieChart = function(el, options) {
|
||||
var addScaleLine, animateLine, drawLine, easeInOutQuad, rAF, renderBackground, renderScale, renderTrack,
|
||||
_this = this;
|
||||
this.el = el;
|
||||
this.$el = $(el);
|
||||
this.$el.data("easyPieChart", this);
|
||||
this.init = function() {
|
||||
var percent, scaleBy;
|
||||
_this.options = $.extend({}, $.easyPieChart.defaultOptions, options);
|
||||
percent = parseInt(_this.$el.data('percent'), 10);
|
||||
_this.percentage = 0;
|
||||
_this.canvas = $("<canvas width='" + _this.options.size + "' height='" + _this.options.size + "'></canvas>").get(0);
|
||||
_this.$el.append(_this.canvas);
|
||||
if (typeof G_vmlCanvasManager !== "undefined" && G_vmlCanvasManager !== null) {
|
||||
G_vmlCanvasManager.initElement(_this.canvas);
|
||||
}
|
||||
_this.ctx = _this.canvas.getContext('2d');
|
||||
if (window.devicePixelRatio > 1) {
|
||||
scaleBy = window.devicePixelRatio;
|
||||
$(_this.canvas).css({
|
||||
width: _this.options.size,
|
||||
height: _this.options.size
|
||||
});
|
||||
_this.canvas.width *= scaleBy;
|
||||
_this.canvas.height *= scaleBy;
|
||||
_this.ctx.scale(scaleBy, scaleBy);
|
||||
}
|
||||
_this.ctx.translate(_this.options.size / 2, _this.options.size / 2);
|
||||
_this.ctx.rotate(_this.options.rotate * Math.PI / 180);
|
||||
_this.$el.addClass('easyPieChart');
|
||||
_this.$el.css({
|
||||
width: _this.options.size,
|
||||
height: _this.options.size,
|
||||
lineHeight: "" + _this.options.size + "px"
|
||||
});
|
||||
_this.update(percent);
|
||||
return _this;
|
||||
};
|
||||
this.update = function(percent) {
|
||||
percent = parseFloat(percent) || 0;
|
||||
if (_this.options.animate === false) {
|
||||
drawLine(percent);
|
||||
} else {
|
||||
animateLine(_this.percentage, percent);
|
||||
}
|
||||
return _this;
|
||||
};
|
||||
renderScale = function() {
|
||||
var i, _i, _results;
|
||||
_this.ctx.fillStyle = _this.options.scaleColor;
|
||||
_this.ctx.lineWidth = 1;
|
||||
_results = [];
|
||||
for (i = _i = 0; _i <= 24; i = ++_i) {
|
||||
_results.push(addScaleLine(i));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
addScaleLine = function(i) {
|
||||
var offset;
|
||||
offset = i % 6 === 0 ? 0 : _this.options.size * 0.017;
|
||||
_this.ctx.save();
|
||||
_this.ctx.rotate(i * Math.PI / 12);
|
||||
_this.ctx.fillRect(_this.options.size / 2 - offset, 0, -_this.options.size * 0.05 + offset, 1);
|
||||
_this.ctx.restore();
|
||||
};
|
||||
renderTrack = function() {
|
||||
var offset;
|
||||
offset = _this.options.size / 2 - _this.options.lineWidth / 2;
|
||||
if (_this.options.scaleColor !== false) {
|
||||
offset -= _this.options.size * 0.08;
|
||||
}
|
||||
_this.ctx.beginPath();
|
||||
_this.ctx.arc(0, 0, offset, 0, Math.PI * 2, true);
|
||||
_this.ctx.closePath();
|
||||
_this.ctx.strokeStyle = _this.options.trackColor;
|
||||
_this.ctx.lineWidth = _this.options.lineWidth;
|
||||
_this.ctx.stroke();
|
||||
};
|
||||
renderBackground = function() {
|
||||
if (_this.options.scaleColor !== false) {
|
||||
renderScale();
|
||||
}
|
||||
if (_this.options.trackColor !== false) {
|
||||
renderTrack();
|
||||
}
|
||||
};
|
||||
drawLine = function(percent) {
|
||||
var offset;
|
||||
renderBackground();
|
||||
_this.ctx.strokeStyle = $.isFunction(_this.options.barColor) ? _this.options.barColor(percent) : _this.options.barColor;
|
||||
_this.ctx.lineCap = _this.options.lineCap;
|
||||
_this.ctx.lineWidth = _this.options.lineWidth;
|
||||
offset = _this.options.size / 2 - _this.options.lineWidth / 2;
|
||||
if (_this.options.scaleColor !== false) {
|
||||
offset -= _this.options.size * 0.08;
|
||||
}
|
||||
_this.ctx.save();
|
||||
_this.ctx.rotate(-Math.PI / 2);
|
||||
_this.ctx.beginPath();
|
||||
_this.ctx.arc(0, 0, offset, 0, Math.PI * 2 * percent / 100, false);
|
||||
_this.ctx.stroke();
|
||||
_this.ctx.restore();
|
||||
};
|
||||
rAF = (function() {
|
||||
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) {
|
||||
return window.setTimeout(callback, 1000 / 60);
|
||||
};
|
||||
})();
|
||||
animateLine = function(from, to) {
|
||||
var anim, startTime;
|
||||
_this.options.onStart.call(_this);
|
||||
_this.percentage = to;
|
||||
Date.now || (Date.now = function() {
|
||||
return +(new Date);
|
||||
});
|
||||
startTime = Date.now();
|
||||
anim = function() {
|
||||
var currentValue, process;
|
||||
process = Date.now() - startTime;
|
||||
if (process < _this.options.animate) {
|
||||
rAF(anim);
|
||||
}
|
||||
_this.ctx.clearRect(-_this.options.size / 2, -_this.options.size / 2, _this.options.size, _this.options.size);
|
||||
renderBackground.call(_this);
|
||||
currentValue = [easeInOutQuad(process, from, to - from, _this.options.animate)];
|
||||
_this.options.onStep.call(_this, currentValue);
|
||||
drawLine.call(_this, currentValue);
|
||||
if (process >= _this.options.animate) {
|
||||
return _this.options.onStop.call(_this, currentValue, to);
|
||||
}
|
||||
};
|
||||
rAF(anim);
|
||||
};
|
||||
easeInOutQuad = function(t, b, c, d) {
|
||||
var easeIn, easing;
|
||||
easeIn = function(t) {
|
||||
return Math.pow(t, 2);
|
||||
};
|
||||
easing = function(t) {
|
||||
if (t < 1) {
|
||||
return easeIn(t);
|
||||
} else {
|
||||
return 2 - easeIn((t / 2) * -2 + 2);
|
||||
}
|
||||
};
|
||||
t /= d / 2;
|
||||
return c / 2 * easing(t) + b;
|
||||
};
|
||||
return this.init();
|
||||
};
|
||||
$.easyPieChart.defaultOptions = {
|
||||
barColor: '#ef1e25',
|
||||
trackColor: '#f2f2f2',
|
||||
scaleColor: '#dfe0e0',
|
||||
lineCap: 'round',
|
||||
rotate: 0,
|
||||
size: 110,
|
||||
lineWidth: 3,
|
||||
animate: false,
|
||||
onStart: $.noop,
|
||||
onStop: $.noop,
|
||||
onStep: $.noop
|
||||
};
|
||||
$.fn.easyPieChart = function(options) {
|
||||
return $.each(this, function(i, el) {
|
||||
var $el, instanceOptions;
|
||||
$el = $(el);
|
||||
if (!$el.data('easyPieChart')) {
|
||||
instanceOptions = $.extend({}, options, $el.data());
|
||||
return $el.data('easyPieChart', new $.easyPieChart(el, instanceOptions));
|
||||
}
|
||||
});
|
||||
};
|
||||
return void 0;
|
||||
})(jQuery);
|
||||
@@ -30,6 +30,9 @@ $('#topbar').hover(
|
||||
function() { $(this).css('cursor', 'pointer'); },
|
||||
function() { $(this).css('cursor', 'auto'); }
|
||||
);
|
||||
$('#topbar a').on('click', function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- end of topbar -->
|
||||
|
||||
@@ -42,15 +42,15 @@
|
||||
<div id=pkgtabs>
|
||||
<ul>
|
||||
<li>
|
||||
<a class=tablink href=pkg.jim?type=inst>
|
||||
<a class=tablink href="pkg.jim?type=inst">
|
||||
<span>Installed</span>
|
||||
</a>
|
||||
</li><li>
|
||||
<a class=tablink href=pkg.jim?type=avail>
|
||||
<a class=tablink href="pkg.jim?type=avail">
|
||||
<span>Available</span>
|
||||
</a>
|
||||
</li><li>
|
||||
<a class=tablink href=pkg.jim?type=upgr>
|
||||
<a class=tablink href="pkg.jim?type=upgr">
|
||||
<span>Upgrades</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -147,8 +147,7 @@ function preparemenu(el, menu)
|
||||
else
|
||||
$('#optmenu').disableContextMenuItems('#ar');
|
||||
|
||||
if ($(el).attr('table') != 'pending' && (
|
||||
$(el).attr('reckind') == 4 || $(el).attr('reckind') == 1))
|
||||
if ($(el).attr('table') != 'pending' && $(el).attr('reckind') == 4)
|
||||
$('#optmenu').enableContextMenuItems('#folder');
|
||||
else
|
||||
$('#optmenu').disableContextMenuItems('#folder');
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/webif/lib/setup
|
||||
require system.class
|
||||
|
||||
if {[system model] eq "HDR"} {
|
||||
|
||||
require settings.class
|
||||
|
||||
set smartattrs {realloc pending offline}
|
||||
set smartattrs {realloc pending offline spinretry}
|
||||
|
||||
set smartattribs(SMART_status) "Unknown"
|
||||
foreach sa $smartattrs {
|
||||
@@ -58,8 +62,11 @@ this device.
|
||||
} else {
|
||||
puts "
|
||||
<br>
|
||||
Don't panic; for help and assistance, visit
|
||||
<a target=_blank href=http://hummy.tv/>hummy.tv</a>
|
||||
Don't panic; for help, visit
|
||||
<a target=_blank
|
||||
href=http://wiki.hummy.tv/wiki/Disk_Problem>
|
||||
wiki.hummy.tv
|
||||
</a>
|
||||
"
|
||||
}
|
||||
puts "
|
||||
@@ -67,3 +74,5 @@ this device.
|
||||
"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,11 +17,12 @@ if {[file exists /opt/share/images/blue/345_2_14_ST_HDD_01.png]} {
|
||||
}
|
||||
|
||||
puts "
|
||||
|
||||
<span style=\"float: right;
|
||||
background:url('/images/345_1_27_ST_USB_BG.png')
|
||||
no-repeat\">
|
||||
<img src=/images/${prefix}_$dsfile.png>
|
||||
<a href=/diag/dspace/index.jim>
|
||||
<img border=0 src=/images/${prefix}_$dsfile.png>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<span style=\"float: right\">
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
package require cgi
|
||||
source /mod/webif/lib/setup
|
||||
require epg.class spinner.class altrow epg_search totop
|
||||
require epg.class spinner.class altrow epg_search totop system.class
|
||||
|
||||
set irinst [system pkginst ir]
|
||||
|
||||
[spinner new {
|
||||
text "Loading Now/Next Information..."
|
||||
@@ -29,8 +31,10 @@ if {$::qepg} {
|
||||
}
|
||||
set got [clock milliseconds]
|
||||
|
||||
jqplugin confirmAction
|
||||
|
||||
puts {
|
||||
<script type=text/javascript src=/js/chanchange.js></script>
|
||||
<small><button id=switch>Switch to grid-style Now/Next</button></small>
|
||||
<script type=text/javascript>
|
||||
$('#switch').button().click(function() {
|
||||
@@ -55,9 +59,16 @@ foreach record $records {
|
||||
if {$lcn > 0} { puts "</tr>" }
|
||||
altrow
|
||||
puts "<td>$chnum</td>"
|
||||
puts "<td>[$record channel_icon 50]</td>
|
||||
puts "<td>"
|
||||
if {$irinst} {
|
||||
puts "<a class=chanchange chan=$chnum href=#>"
|
||||
}
|
||||
puts "[$record channel_icon 50]"
|
||||
if {$irinst} { puts "</a>" }
|
||||
puts "</td>
|
||||
<td>
|
||||
<a href=/cgi-bin/epg/service.jim?service=[$record get service_id]>
|
||||
<a href=\"/cgi-bin/epg/service.jim?service=[\
|
||||
$record get service_id]\">
|
||||
[$record get channel_name]
|
||||
</a></td>"
|
||||
set lcn $chnum
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
source /mod/webif/lib/setup
|
||||
require settings.class plugin
|
||||
require system.class settings.class plugin
|
||||
|
||||
proc menuitem {title icon link {width 217} {height 0} {extra ""}} {{num 0}} {
|
||||
if {$title eq "-reset"} {
|
||||
@@ -34,7 +34,9 @@ proc menuitem {title icon link {width 217} {height 0} {extra ""}} {{num 0}} {
|
||||
"
|
||||
}
|
||||
|
||||
if {[[settings] epg_style] eq "grid"} {
|
||||
set settings [settings]
|
||||
|
||||
if {[$settings epg_style] eq "grid"} {
|
||||
set epglink "/cgi-bin/xepg.jim"
|
||||
} else {
|
||||
set epglink "/epg.shtml"
|
||||
@@ -69,6 +71,8 @@ menuitem "Diagnostics" "/img/diagnostics.png" \
|
||||
|
||||
eval_plugins menu
|
||||
|
||||
if {[$settings nohelplinks] == 0} {
|
||||
|
||||
menuitem "-reset" "" ""
|
||||
puts {</div><div style="clear: both; padding-top: 3em">}
|
||||
|
||||
@@ -85,4 +89,5 @@ menuitem "Twitter<br>Feed" "/img/silver-twitter-bird-button.png" \
|
||||
"http://twitter.com/HummyPkg target=_blank" 0 100 \
|
||||
"style=\"padding: 1em\""
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
source /mod/webif/lib/setup
|
||||
require lock system.class ts.class tdelete pretty_size browse.class \
|
||||
safe_delete settings.class
|
||||
safe_delete settings.class plugin
|
||||
|
||||
set loglevel [[settings] autolog]
|
||||
|
||||
@@ -41,6 +41,37 @@ proc endclock {size} {
|
||||
return "[pretty_size $size] in $el seconds - [pretty_size $rate]/s"
|
||||
}
|
||||
|
||||
set modules {decrypt dedup shrink mpg mp3 expire}
|
||||
|
||||
foreach mod $modules {
|
||||
set "hook_pre${mod}scan" {}
|
||||
set "hook_pre$mod" {}
|
||||
set "hook_post$mod" {}
|
||||
set "hook_post${mod}scan" {}
|
||||
}
|
||||
|
||||
proc register {type fn} {
|
||||
global "hook_$type"
|
||||
if {[info exists "hook_$type"]} {
|
||||
lappend "hook_$type" $fn
|
||||
log "Registered $fn for $type hook." 1
|
||||
} else {
|
||||
log "Unknown hook hook_$type" 0
|
||||
}
|
||||
}
|
||||
|
||||
proc runplugin {name {ts 0}} {
|
||||
set var "hook_$name"
|
||||
global $var
|
||||
foreach p [subst $$var] {
|
||||
if {[catch {$p $ts} msg]} {
|
||||
log "Plugin error: $msg" 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eval_plugins auto
|
||||
|
||||
set scanstart [clock milliseconds]
|
||||
log "-------------------------------------------------------"
|
||||
|
||||
@@ -96,6 +127,15 @@ if {[system pkginst undelete]} {
|
||||
|
||||
log "Dustbin: $dustbin" 2
|
||||
|
||||
set recalc 0
|
||||
|
||||
proc dorecalc {dir} {
|
||||
global recalc
|
||||
if {!$recalc} return
|
||||
ts resetnew $dir
|
||||
set recalc 0
|
||||
}
|
||||
|
||||
proc dedup {dir} {
|
||||
log "DEDUP: \[$dir]" 2
|
||||
loop i 0 1 {
|
||||
@@ -120,9 +160,12 @@ proc do_expire {ts} {
|
||||
log " In use."
|
||||
return
|
||||
}
|
||||
runplugin preexpire $ts
|
||||
if {[safe_delete $file]} {
|
||||
log " EXPIRE: $file ($age > $ax_days)" 0
|
||||
log " Deleted." 0
|
||||
runplugin postexpire $ts
|
||||
incr ::recalc
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,6 +205,7 @@ proc do_shrink {ts} {
|
||||
}
|
||||
set size [$ts size]
|
||||
dsc $size
|
||||
runplugin preshrink $ts
|
||||
startclock
|
||||
log " SHRINK: $file" 0
|
||||
log " Estimate $perc% saving." 0
|
||||
@@ -201,6 +245,7 @@ proc do_shrink {ts} {
|
||||
}
|
||||
$ts set_shrunk
|
||||
log "Done... [endclock $size]" 0
|
||||
runplugin postshrink $ts
|
||||
}
|
||||
|
||||
proc do_decrypt {ts} {
|
||||
@@ -243,6 +288,7 @@ proc do_decrypt {ts} {
|
||||
# Perform the decryption by requesting the file from the DLNA server.
|
||||
set size [$ts size]
|
||||
dsc $size
|
||||
runplugin predecrypt $ts
|
||||
set flagfile "$tmp/decrypting.$bfile"
|
||||
exec /mod/bin/busybox/touch $flagfile
|
||||
startclock
|
||||
@@ -309,6 +355,7 @@ proc do_decrypt {ts} {
|
||||
}
|
||||
log "Done... [endclock $size]" 0
|
||||
file delete $flagfile
|
||||
runplugin postdecrypt $ts
|
||||
}
|
||||
|
||||
proc do_mpg {ts} {
|
||||
@@ -335,6 +382,7 @@ proc do_mpg {ts} {
|
||||
log " $file - In use."
|
||||
return
|
||||
}
|
||||
runplugin prempg $ts
|
||||
dsc [$ts size]
|
||||
|
||||
log " MPG: $file" 0
|
||||
@@ -355,6 +403,7 @@ proc do_mpg {ts} {
|
||||
|
||||
# Move the MPG into the local directory
|
||||
file rename $tmp/mpg.mpg $file.mpg
|
||||
runplugin postmpg $ts
|
||||
}
|
||||
|
||||
proc do_mp3 {ts} {
|
||||
@@ -382,6 +431,7 @@ proc do_mp3 {ts} {
|
||||
log " $file - In use."
|
||||
return
|
||||
}
|
||||
runplugin premp3 $ts
|
||||
dsc [$ts size]
|
||||
|
||||
log " MP3: $file" 0
|
||||
@@ -410,6 +460,7 @@ proc do_mp3 {ts} {
|
||||
|
||||
# Move the MP3 into the local directory
|
||||
file rename $tmp/mp3.mp3 $file.mp3
|
||||
runplugin postmp3 $ts
|
||||
}
|
||||
|
||||
proc entries {dir callback} {
|
||||
@@ -490,6 +541,8 @@ proc scan {dir attr {force 0}} {{indent 0}} {
|
||||
}
|
||||
}
|
||||
|
||||
dorecalc $dir
|
||||
|
||||
incr indent -2
|
||||
}
|
||||
|
||||
@@ -502,9 +555,11 @@ if {[llength $argv] > 0} {
|
||||
set loglevel 2
|
||||
foreach arg $argv { scan $root $arg }
|
||||
} else {
|
||||
foreach arg {dedup decrypt shrink mpg mp3 expire} {
|
||||
foreach arg $modules {
|
||||
set st [clock milliseconds]
|
||||
runplugin "pre${arg}scan"
|
||||
scan $root $arg
|
||||
runplugin "post${arg}scan"
|
||||
log "$arg scan completed in [elapsed $st] seconds."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,23 +29,19 @@ foreach line [split [exec /mod/bin/smartctl -A -f brief $disk] "\n"] {
|
||||
|
||||
#puts "Attrs: ($attrs)"
|
||||
puts "SMART: ($smart)"
|
||||
puts "Reallocated: $attrs(5)"
|
||||
puts "Pending: $attrs(197)"
|
||||
puts "Offline: $attrs(198)"
|
||||
|
||||
if {[dict exists $attrs 5]} {
|
||||
$settings _nval_setting "SMART_realloc" $attrs(5)
|
||||
}
|
||||
if {[dict exists $attrs 197]} {
|
||||
$settings _nval_setting "SMART_pending" $attrs(197)
|
||||
if {$attrs(197) < [$settings _nval_setting "SMART_ack_pending"]} {
|
||||
$settings _nval_setting "SMART_ack_pending" $attrs(197)
|
||||
}
|
||||
}
|
||||
if {[dict exists $attrs 198]} {
|
||||
$settings _nval_setting "SMART_offline" $attrs(198)
|
||||
if {$attrs(198) < [$settings _nval_setting "SMART_ack_offline"]} {
|
||||
$settings _nval_setting "SMART_ack_offline" $attrs(198)
|
||||
foreach a {
|
||||
{5 "realloc"}
|
||||
{10 "spinretry"}
|
||||
{197 "pending"}
|
||||
{198 "offline"}
|
||||
} {
|
||||
lassign $a id attr
|
||||
if {![dict exists $attrs $id]} continue
|
||||
puts "$attr: $attrs($id)"
|
||||
$settings _nval_setting "SMART_$attr" $attrs($id)
|
||||
if {$attrs($id) < [$settings _nval_setting "SMART_ack_$attr"]} {
|
||||
$settings _nval_setting "SMART_ack_$attr" $attrs($id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ epg method type_icon {} {
|
||||
}
|
||||
|
||||
proc {epg channelicon} {name {width 0} {style ""}} {
|
||||
set str "<img src=\"/img/channels/$name.png\"";
|
||||
set str "<img src=\"/img/channels/out/$name.png\"";
|
||||
if {$width > 0} { append str " width=$width" }
|
||||
if {$style ne ""} { append str " style=\"$style\" }
|
||||
append str " alt=\"\">"
|
||||
@@ -127,7 +127,7 @@ proc {epg channelicon} {name {width 0} {style ""}} {
|
||||
}
|
||||
|
||||
epg method channel_icon {{width 0} {style ""}} {
|
||||
set str "<img src=\"/img/channels/$channel_name.png\"";
|
||||
set str "<img src=\"/img/channels/out/$channel_name.png\"";
|
||||
if {$width > 0} { append str " width=$width" }
|
||||
if {$style ne ""} { append str " style=\"$style\" }
|
||||
append str " alt=\"\">"
|
||||
@@ -197,6 +197,7 @@ epg method scheduled {} {
|
||||
#puts "Check key ($key)"
|
||||
if {[dict exists $rsvlookup $key]} {
|
||||
set p $rsvlookup($key)
|
||||
#puts "FOUND ($p)"
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -207,6 +208,8 @@ epg method scheduled {} {
|
||||
default { set sched_type 0 }
|
||||
}
|
||||
|
||||
#puts "SCHED_TYPE: ($sched_type)"
|
||||
|
||||
return $sched_type
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ puts ">
|
||||
"
|
||||
|
||||
proc cts {type img text} {
|
||||
puts "<a href=/cgi-bin/epg/search.jim?ct=$type>
|
||||
puts "<a href=\"/cgi-bin/epg/search.jim?ct=$type\">
|
||||
<img height=18 border=0 src=/images/173_3_00_G3_$img.png>
|
||||
$text</a>";
|
||||
}
|
||||
@@ -96,7 +96,8 @@ if {[llength $res] > 0} {
|
||||
set kw [string range [lindex $keyword 1] 1 end]
|
||||
# Clean the keyword string.
|
||||
regexp -nocase {^(\w+)} $kw kw
|
||||
puts "<td><a href=/cgi-bin/epg/search.jim?term=[cgi_quote_url $kw]>$kw
|
||||
puts "<td><a href=\"/cgi-bin/epg/search.jim?term=[\
|
||||
cgi_quote_url $kw]\">$kw
|
||||
</a></td>"
|
||||
}
|
||||
puts "
|
||||
|
||||
@@ -24,6 +24,7 @@ class settings {
|
||||
pkgdev 0
|
||||
notoolbar 0
|
||||
nomobile 0
|
||||
nohelplinks 0
|
||||
xepghours 4
|
||||
genrededup 0
|
||||
autolog 0
|
||||
@@ -160,6 +161,10 @@ settings method nomobile {{val -1}} {
|
||||
return [$self _nval_setting nomobile $val]
|
||||
}
|
||||
|
||||
settings method nohelplinks {{val -1}} {
|
||||
return [$self _nval_setting nohelplinks $val]
|
||||
}
|
||||
|
||||
settings method sortorder {{val -1}} {
|
||||
return [$self _nval_setting sortorder $val]
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ if {![exists -proc require]} {
|
||||
foreach file $args {
|
||||
if {$file ni $done} {
|
||||
uplevel source "/mod/webif/lib/$file"
|
||||
lappend $done $file
|
||||
lappend done $file
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,9 +17,9 @@ if {![exists -proc require]} {
|
||||
puts -nonewline "Pragma: no-cache\r\n"
|
||||
puts -nonewline "Cache-Control: no-cache\r\n"
|
||||
} else {
|
||||
puts "Content-Type: $type; charset=\"UTF-8\"\r\n"
|
||||
puts -nonewline "Content-Type: $type; charset=\"UTF-8\"\r\n"
|
||||
}
|
||||
puts -nonewline $extra
|
||||
if {$extra ne ""} { puts -nonewline "$extra" }
|
||||
puts -nonewline "\r\n"
|
||||
set done 1
|
||||
}
|
||||
@@ -41,6 +41,19 @@ if {![exists -proc require]} {
|
||||
uplevel source /mod/webif/html/m/lib/footer.jim
|
||||
}
|
||||
|
||||
proc jqplugin {name} {{done {}}} {
|
||||
if {$name in $done} return
|
||||
lappend done $name
|
||||
foreach file [glob "/mod/webif/html/lib/jquery.$name/*.js"] {
|
||||
set file [join [lrange [split $file /] 4 end] /]
|
||||
puts "<script type=text/javascript src=/$file></script>"
|
||||
}
|
||||
foreach file [glob "/mod/webif/html/lib/jquery.$name/*.css"] {
|
||||
set file [join [lrange [split $file /] 4 end] /]
|
||||
puts "<link href=/$file rel=stylesheet type=text/css />"
|
||||
}
|
||||
}
|
||||
|
||||
require fileops
|
||||
}
|
||||
|
||||
|
||||