Compare commits

..

47 Commits

Author SHA1 Message Date
hummypkg
ceccfd9c1d update to Jim 0.75
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1811 2a923420-c742-0410-a762-8d5b09965624
2014-03-02 18:44:41 +00:00
hummypkg
c948926cc2 fix typo
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1806 2a923420-c742-0410-a762-8d5b09965624
2014-02-24 19:46:44 +00:00
hummypkg
a087581573 fix scroll position
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1805 2a923420-c742-0410-a762-8d5b09965624
2014-02-23 22:47:01 +00:00
hummypkg
3416d4e9e2 fixes
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1804 2a923420-c742-0410-a762-8d5b09965624
2014-02-23 22:22:07 +00:00
hummypkg
b4af9b62fc fix URL
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1802 2a923420-c742-0410-a762-8d5b09965624
2014-02-21 23:22:19 +00:00
hummypkg
68fdfcc4d5 1.0.9
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1800 2a923420-c742-0410-a762-8d5b09965624
2014-02-21 23:09:19 +00:00
hummypkg
7c181557a1 re-adding synlinks
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1790 2a923420-c742-0410-a762-8d5b09965624
2014-02-21 21:27:03 +00:00
hummypkg
0f1bbed6b9 migrating
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1789 2a923420-c742-0410-a762-8d5b09965624
2014-02-21 21:25:33 +00:00
hummypkg
8c4449ee36 new service screen
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1788 2a923420-c742-0410-a762-8d5b09965624
2014-02-20 00:51:02 +00:00
hummypkg
23cc31a02a foreign characters
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1786 2a923420-c742-0410-a762-8d5b09965624
2014-02-18 21:34:44 +00:00
hummypkg
98c4182a1f fix mkdir
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1785 2a923420-c742-0410-a762-8d5b09965624
2014-02-10 23:21:26 +00:00
hummypkg
1984d7151b restructure restartpending, create folder, cancel restartpending once nothing pending
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1784 2a923420-c742-0410-a762-8d5b09965624
2014-02-10 23:03:36 +00:00
hummypkg
97289969f1 more package management tweaks
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1781 2a923420-c742-0410-a762-8d5b09965624
2014-02-03 23:06:38 +00:00
hummypkg
0cfc8f233a package management improvements
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1778 2a923420-c742-0410-a762-8d5b09965624
2014-02-03 21:42:20 +00:00
hummypkg
ea2f231ad8 fix duplicate check
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1775 2a923420-c742-0410-a762-8d5b09965624
2014-02-02 23:37:50 +00:00
hummypkg
13af77c1e4 various updates
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1768 2a923420-c742-0410-a762-8d5b09965624
2014-01-22 21:18:12 +00:00
hummypkg
d08475daaa pkg management updates
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1760 2a923420-c742-0410-a762-8d5b09965624
2014-01-18 00:26:33 +00:00
hummypkg
26981ebb2d fix mux display
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1741 2a923420-c742-0410-a762-8d5b09965624
2013-12-11 00:16:01 +00:00
hummypkg
fe7de23c67 fix service restore
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1733 2a923420-c742-0410-a762-8d5b09965624
2013-12-04 20:16:48 +00:00
hummypkg
fbd469ffec restore to LCN if channel name not found
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1726 2a923420-c742-0410-a762-8d5b09965624
2013-11-26 22:53:35 +00:00
hummypkg
2c62699f00 update hexdump and fix dict merge problem
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1723 2a923420-c742-0410-a762-8d5b09965624
2013-11-26 21:47:58 +00:00
hummypkg
2a4ec43ef6 work around missing event IDs in the future
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1716 2a923420-c742-0410-a762-8d5b09965624
2013-11-06 22:13:25 +00:00
hummypkg
7080242ff8 update depends, pgrep -n
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1715 2a923420-c742-0410-a762-8d5b09965624
2013-11-05 17:39:48 +00:00
hummypkg
e2c099668e add decrypted file touch
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1713 2a923420-c742-0410-a762-8d5b09965624
2013-10-29 20:51:10 +00:00
hummypkg
d801e71bf3 update version
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1711 2a923420-c742-0410-a762-8d5b09965624
2013-10-29 20:05:27 +00:00
hummypkg
66a7fcec9c fix hostname setting
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1710 2a923420-c742-0410-a762-8d5b09965624
2013-10-29 20:05:15 +00:00
hummypkg
8dc232646b modularise schedule/backup restore. Fix bug in reset new
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1709 2a923420-c742-0410-a762-8d5b09965624
2013-10-26 11:05:47 +00:00
hummypkg
a505022d39 tweaks
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1708 2a923420-c742-0410-a762-8d5b09965624
2013-10-23 20:38:25 +00:00
hummypkg
4fc05273e1 fix hostname in settings screen
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1704 2a923420-c742-0410-a762-8d5b09965624
2013-10-13 15:23:15 +00:00
hummypkg
d81037aa5f update to 1.0.7
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1700 2a923420-c742-0410-a762-8d5b09965624
2013-10-07 20:18:42 +00:00
hummypkg
abc7d0655e add schedule cleanup button
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1699 2a923420-c742-0410-a762-8d5b09965624
2013-10-07 20:17:22 +00:00
hummypkg
f7ab52698d allow customisation of the fav icons
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1698 2a923420-c742-0410-a762-8d5b09965624
2013-10-07 19:45:09 +00:00
hummypkg
f5ff9cbf67 update jquery.mobile
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1697 2a923420-c742-0410-a762-8d5b09965624
2013-09-25 22:41:40 +00:00
hummypkg
009eb100b6 update
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1695 2a923420-c742-0410-a762-8d5b09965624
2013-09-21 20:50:58 +00:00
hummypkg
e6366df3c8 update
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1692 2a923420-c742-0410-a762-8d5b09965624
2013-09-18 17:54:33 +00:00
hummypkg
7a767e5443 update
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1691 2a923420-c742-0410-a762-8d5b09965624
2013-09-18 17:38:08 +00:00
hummypkg
0e2bc599a5 updates
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1665 2a923420-c742-0410-a762-8d5b09965624
2013-09-09 19:38:56 +00:00
hummypkg
10e9ef191e update version
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1664 2a923420-c742-0410-a762-8d5b09965624
2013-09-08 20:47:40 +00:00
hummypkg
9b826e8f95 resetnew on delete
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1663 2a923420-c742-0410-a762-8d5b09965624
2013-09-08 20:46:11 +00:00
hummypkg
8a802e5c1d Upgrade JQuery, JQuery UI. Accordian on settings screen
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1662 2a923420-c742-0410-a762-8d5b09965624
2013-09-08 20:41:01 +00:00
hummypkg
61a8b537e6 upgrading jquery
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1661 2a923420-c742-0410-a762-8d5b09965624
2013-09-08 19:48:26 +00:00
hummypkg
f7de940e51 fix EPG calendar. Leave Now ungrayed.
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1660 2a923420-c742-0410-a762-8d5b09965624
2013-09-08 19:15:54 +00:00
hummypkg
27c7818da8 updates for 1.0.6
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1658 2a923420-c742-0410-a762-8d5b09965624
2013-09-07 22:13:03 +00:00
hummypkg
9fb84443cd add rmdir_if_empty
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1654 2a923420-c742-0410-a762-8d5b09965624
2013-09-05 18:52:13 +00:00
hummypkg
0ae9a07cce update
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1651 2a923420-c742-0410-a762-8d5b09965624
2013-09-04 23:52:40 +00:00
hummypkg
ed20eec408 update
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1646 2a923420-c742-0410-a762-8d5b09965624
2013-08-30 21:22:30 +00:00
hummypkg
c095cc7913 1.0.5
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1632 2a923420-c742-0410-a762-8d5b09965624
2013-07-30 20:07:13 +00:00
232 changed files with 3158 additions and 3910 deletions

6
CONTROL/conffiles Normal file
View File

@@ -0,0 +1,6 @@
var/mongoose/html/css/EXTRA.css
var/mongoose/html/favicon.ico
var/mongoose/html/img/fav/57.png
var/mongoose/html/img/fav/72.png
var/mongoose/html/img/fav/114.png
var/mongoose/html/img/fav/144.png

View File

@@ -1,9 +1,10 @@
Package: webif
Priority: optional
Section: web
Version: 1.0.4
Version: 1.0.9-6
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.0),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.1),smartmontools,tmenu(>=1.05),ffmpeg,id3v2
Depends: webif-channelicons(>=1.1.9),mongoose(>=3.0.11),jim(>=0.75),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),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.5-3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
Suggests:
Description: An evolving web interface for the Humax.
Tags: http://hummy.tv/forum/threads/4659/

View File

@@ -37,6 +37,7 @@ if [ ! -f /mod/webif/.strip-updated ]; then
fi
/mod/webif/lib/bin/diskattrs
#/mod/webif/lib/bin/resetnew
[ -f $tmpf ] && rm -f $tmpf

View File

@@ -5,7 +5,7 @@ source /mod/webif/lib/setup
require rsv.class
set dir /mod/var/backup
set dir "/mod/var/backup"
httpheader
@@ -26,58 +26,12 @@ if {[string match {auto-*} $file]} {
}
}
set ffile "/$dir/$file.rbk"
set ffile "$dir/$file.rbk"
if {[file exists $ffile]} {
puts "Backup file <i>$file</i> already exists."
exit
}
if {[catch { set fd [open $ffile w] } msg]} {
puts "Error creating backup file. - $msg"
exit
}
puts "Backing up scheduled recordings and events..."
set events [rsv list]
set fields [lsort [[rsv] vars]]
#puts $fd "# [join $fields "\t"]"
foreach event $events {
puts " Backing up scheduled event '[$event name]'"
puts -nonewline $fd "event\t"
foreach f $fields {
if {$f eq "aulEventToRecordInfo"} { continue }
puts -nonewline $fd "[$event get $f]\t"
}
puts $fd ""
}
puts "Done."
puts "Backing up channel favourites..."
set grp 0
foreach res [$rsvdb query {
select eFavGroup,
TBL_FAV.eSvcType,
substr(szSvcName, 2) as szSvcName,
favIdx
from TBL_FAV join TBL_SVC using (hSvc)
order by eFavGroup, favIdx
}] {
if {$res(eFavGroup) != $grp} {
set grp $res(eFavGroup)
puts " Group $grp"
}
puts " $res(szSvcName)"
puts $fd "fav\t$res(eFavGroup)\t$res(eSvcType)\t$res(szSvcName)\t$res(favIdx)"
}
puts "Done."
close $fd
rsv cleanup
rsv backup $ffile

View File

@@ -3,9 +3,9 @@
package require cgi
source /mod/webif/lib/setup
require rsv.class findhsvc system.class
require rsv.class
set dir /mod/var/backup
set dir "/mod/var/backup"
httpheader
@@ -15,121 +15,7 @@ if {$file == 0} {
exit
}
set ffile "/$dir/$file.rbk"
set ffile "$dir/$file.rbk"
if {![file exists $ffile]} {
puts "Backup file <i>$file</i> does not exist."
exit
}
if {[catch { set fd [open $ffile r] } msg]} {
puts "Error opening <i>$file</i> - $msg"
exit
}
puts "Restoring scheduled events from <i>$file</i>..."
$rsvdb query {begin transaction;}
$rsvdb query {delete from TBL_RESERVATION;}
set fields [lsort [[rsv] vars]]
set data [split [read $fd] "\n"]
foreach line $data {
set vals [split $line "\t"]
if {[lindex $vals 0] ne "event"} { continue }
set vars {}
set i 0
foreach f $fields {
if {$f eq "aulEventToRecordInfo"} { continue }
incr i
lappend vars $f [lindex $vals $i]
}
# Don't restore DSO events.
if {$vars(ersvtype) == 11} { continue }
set rsv [rsv new $vars]
# Need to fix up channel and CRID mappings in case something has
# changed during a channel scan.
puts " Restoring [$rsv name]"
set bad 0
# First, the service number
set ohsvc [$rsv get hsvc]
if {$ohsvc > 0} {
set hsvc [$rsv fix_hsvc]
if {$hsvc == 0} {
puts " Cannot find channel, restore failed."
set bad 1
} elseif {$hsvc != $ohsvc} {
puts -nonewline " Service number has "
puts "changed $ohsvc -> $hsvc, fixing."
} else {
puts " No change in channel service."
}
}
if {!$bad} {
if {[catch {$rsv insert pending 1} msg]} {
puts " Error inserting event, $msg"
}
}
}
$rsvdb query {commit transaction;}
puts "Restoring favourite channels..."
$rsvdb query {begin transaction;}
$rsvdb query {delete from channel.TBL_FAV}
$rsvdb query {drop table if exists pending.fav}
$rsvdb query {create table pending.fav (
favIdx integer primary key autoincrement unique,
hSvc integer(4),
eFavGroup integer(4),
[eSvcType] integer(4)
)}
set grp 0
foreach line $data {
set vals [split $line "\t"]
if {[lindex $vals 0] ne "fav"} { continue }
set group [lindex $vals 1]
set type [lindex $vals 2]
set chan [lindex $vals 3]
set idx [lindex $vals 4]
if {$idx eq ""} { set idx 0 }
set hsvc [get_channel_attr $chan]
if {$grp != $group} {
set grp $group
puts " Group $grp"
}
puts " $chan"
if {$hsvc eq ""} {
puts " Cannot map channel name to service."
continue
}
set query "
insert into pending.fav(favIdx, hSvc, eFavGroup, eSvcType)
values($idx, $hsvc, $group, $type);
"
$rsvdb query $query
}
$rsvdb query {commit transaction;}
system restartpending
close $fd
rsv cleanup
rsv restore $ffile

View File

@@ -29,20 +29,23 @@ puts "
<th>Signal Quality</th>
<th>Network</th>
<th>Mux</th>
<th>Type</th>
<th>Channels</th>
<th>&gt;799</th>
</tr>
"
foreach tw [$db query {
select tsIdx, szNetName, usTsID, ulFrequency, ucLevel, ucQuality
select tsIdx, szNetName, usTsID, ulFrequency, ucLevel,
ucQuality, eTransMode
from TBL_TS join TBL_NET using (netIdx)
order by ulFrequency
}] {
lassign $tw \
x tsIdx x netName x usTsID x ulFrequency x ucLevel x ucQuality
x tsIdx x netName x usTsID x ulFrequency x ucLevel x ucQuality \
x eTransMode
altrow
puts "
<tr class=odd>
<td>[f2c $ulFrequency]</td>
<td>[expr $ulFrequency / 1000.0] MHz</td>
"
@@ -64,17 +67,23 @@ foreach tw [$db query {
set name [string range $name 1 end]
if {$lcn >= 800} { incr ehs }
switch $name {
"BBC ONE" { set mux "PSB1/BBC A" }
"BBC THREE" { set mux "PSB1/BBC A" }
"ITV1" { set mux "PSB2/D3&amp;4" }
"ITV" { set mux "PSB2/D3&amp;4" }
"BBC ONE HD" { set mux "PSB3/BBC B (HD)" }
"BBC ONE HD" { set mux "PSB3/BBC B" }
"ITV3" { set mux "COM4/SDN" }
"Dave" { set mux "COM5/ARQ A" }
"Film4" { set mux "COM6/ARQ B" }
"Film4+1" { set mux "COM6/ARQ B" }
"BBC NEWS HD" { set mux "COM7/ARQ C" }
"Movies4Men" { set mux "Local" }
}
}
puts "<td>$mux</td>"
if {$eTransMode == 2} {
puts "<td>DVB-T (SD)</td>"
} else {
puts "<td class=blood>DVB-T2 (HD)</td>"
}
puts "<td>[llength $channels]
<a class=mchan ts=$tsIdx href=#>
@@ -92,6 +101,7 @@ foreach tw [$db query {
<th>Provider</th>
<th>Authority</th>
</tr>"
altrow reset
foreach chan $channels {
lassign $chan x lcn x name x prv x auth
set name [string range $name 1 end]

View File

@@ -2,18 +2,27 @@
package require cgi
source /mod/webif/lib/setup
require epg.class
require epg.class system.class settings.class
set irinst [system pkginst ir]
httpheader
set service [cgi_get service 0]
set event [cgi_get event 0]
if {![cgi_exists bare]} header
if {![cgi_exists bare]} header else noheader
set record [lindex [epg fetch dump -service $service -event $event] 0]
$record get_channel_info
set others [$record othertimes]
if {[[settings] chanchangenc]} {
puts { <script type=text/javascript src=/js/chanchangenc.js></script> }
} else {
jqplugin confirmAction
puts { <script type=text/javascript src=/js/chanchange.js></script> }
}
puts "
<table class=keyval>
<tr>
@@ -116,7 +125,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] "&nbsp;"]
</td>
</tr>

View File

@@ -4,12 +4,11 @@ package require cgi
source /mod/webif/lib/setup
require epg.class spinner.class altrow settings.class
jqplugin highlight
header
require totop
puts "<script type=text/javascript src=/js/jquery.highlight.js></script>"
set ct [cgi_get ct 0]
set crid [cgi_get crid ""]
set scrid [cgi_get scrid ""]
@@ -56,6 +55,12 @@ if {$ct > 0 } {
}
set favlist [epg favlist]
set s [settings]
if {[$s service_style] eq "standard"} {
set surl xservice
} else {
set surl service
}
if {[llength $records] > 0} {
puts {
@@ -83,8 +88,10 @@ proc rsort {v1 v2} {
set seen {}
set i 0
foreach record [lsort -command rsort $records] {
set ename [$record get name]
if {$ename eq ""} continue
if {$dedup} {
set ename [$record get name]
if {$ename in $seen} continue
lappend seen $ename
}
@@ -105,7 +112,7 @@ foreach record [lsort -command rsort $records] {
puts "<td>[$record get channel_num]</td>"
puts "<td>[$record channel_icon 50]</td>"
puts "<td nowrap>
<a href=/cgi-bin/epg/service.jim?service=[$record get service_id]>
<a href=/epg/$surl.jim?service=[$record get service_id]>
[$record get channel_name]
</a></td>"
puts [$record cell]

View File

@@ -7,7 +7,7 @@ require rsv.class system.class
httpheader
if {[cgi_get act] eq "cancel"} {
file delete /tmp/.restartpending
system restartpending 0
exit
}
@@ -18,7 +18,8 @@ if {[cgi_get now] eq "yes"} {
exit
}
file delete /tmp/.restartpending
system restartpending 0
jqplugin progressbar
header
# Commit pending reservations on older mod versions.
@@ -27,8 +28,6 @@ if {![file exists /sbin/rsvsync] && ![file exists /mod/boot/rsvsync]} {
}
puts {
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
<script type="text/javascript" src="/js/jquery.progressbar.js"></script>
<script type=text/javascript>
var handle = 0;

View File

@@ -36,10 +36,14 @@ set hostname [$settings hostname]
set smtp_server [$settings smtp_server]
set channel_group [$settings channel_group]
set epg_style [$settings epg_style]
set service_style [$settings service_style]
set pkgdev [$settings pkgdev]
set notoolbar [$settings notoolbar]
set nomobile [$settings nomobile]
set nohelplinks [$settings nohelplinks]
set notwitfeed [$settings notwitfeed]
set nounwatchedcount [$settings nounwatchedcount]
set chanchangenc [$settings chanchangenc]
set xepghours [$settings xepghours]
if {$xepghours == 0} { set xepghours 4 }
set genrededup [$settings genrededup]
@@ -80,10 +84,15 @@ _handle_update ascii smtp_server $smtp_server "SMTP Server"
handle_int_update channel_group $channel_group "Channel Group"
handle_int_update xepghours $xepghours "Grid EPG Hours"
handle_str_update epg_style $epg_style "EPG Type"
handle_str_update service_style $service_style "EPG Channel 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 notwitfeed $notwitfeed "Disable twitter feed ticker"
handle_int_update chanchangenc $chanchangenc \
"Disable channel change confirmation"
handle_int_update nounwatchedcount $nounwatchedcount "Disable unwatched count"
handle_int_update genrededup $genrededup "Genre search dedup"
handle_int_update autolog $autolog "Auto-processing log level"
@@ -115,15 +124,12 @@ if {$aclact ne "-" && $acluser ne "-"} {
exit
}
jqplugin form iphone-style-checkboxes
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 />
<script type="text/javascript" src="settings.js"></script>
<div id=accordion>
}
proc setting_toggle {name attr checked {invert 0} {val 0}} {
@@ -143,7 +149,8 @@ proc setting_toggle {name attr checked {invert 0} {val 0}} {
}
puts "
<fieldset style=\"display: inline\">
<h4>General Settings</h4>
<div><fieldset style=\"display: inline\">
<legend>
General Settings
</legend>
@@ -171,6 +178,12 @@ setting_toggle "HTTPS web server?" "https" \
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
setting_toggle "Twitter feed ticker on main page?" "notwitfeed" $(!$notwitfeed) 1
setting_toggle "Unwatched count on folders?" "nounwatchedcount" $(!$nounwatchedcount) 1
if {[system pkginst ir]} {
setting_toggle "Disable channel change confirmation?" \
"chanchangenc" $chanchangenc 0
}
puts -nonewline "
<tr>
@@ -200,9 +213,10 @@ puts "
"
puts "
</table></fieldset>
<br><br>
<fieldset style=\"display: inline\">
</table></fieldset></div>
<h4>EPG Settings</h4>
<div><fieldset style=\"display: inline\">
<legend>
EPG Settings
</legend>
@@ -233,6 +247,30 @@ puts "
</tr>
"
puts "
<tr>
<form class=auto id=service_style method=get action=$env(REQUEST_URI)>
<th class=key>Default Single-channel style</th>
<td><select id=service_style name=service_style
class=\"text ui-widget-content ui-corner-all\">
"
puts "<option value=standard"
if {$service_style eq "standard"} { puts " selected" }
puts ">Standard\n"
puts "<option value=grid"
if {$service_style ne "standard"} { puts " selected" }
puts ">Grid\n"
puts "
</select>
<small>
<input name=service_style value=\"set\" type=submit>
</small>
<div id=service_style_output></div>
</td>
</form>
</tr>
"
puts "
<tr>
<form class=auto id=channel_group method=get action=$env(REQUEST_URI)>
@@ -294,8 +332,7 @@ setting_toggle "De-duplicate genre search results?" genrededup $genrededup
puts "
</table>
</fieldset>
<br><br>
</fieldset></div>
"
#puts "
@@ -327,6 +364,8 @@ puts "
#"
puts "
<h4>Web Interface User Access Control</h4>
<div>
<fieldset style=\"display: inline\">
<legend> Web Interface User Access Control </legend>
<table>
@@ -381,6 +420,7 @@ puts "
</table>
<div id=aclnewuser_output></div>
</fieldset>
</div>
"
puts {
@@ -417,7 +457,8 @@ $('button.pwchange').click(function(el) {
}
puts -nonewline "
<br><br>
<h4>Advanced Settings</h4>
<div>
<fieldset style=\"display: inline\">
<legend> Advanced Settings </legend>
<table>
@@ -432,9 +473,20 @@ if {[system modversion 1] >= 214} {
puts "
</table>
</fieldset>
</div>
"
eval_plugins settings
set hook settings
foreach plugin [lsort [glob -nocomplain /mod/webif/plugin/*]] {
if {[file isfile "$plugin/$hook.hook"]} {
puts "<h4>Settings for <i>[file tail $plugin]</i> package</h4>"
puts "<div class=pluginsettings>"
catch {source "$plugin/$hook.hook"}
puts "</div>"
}
}
puts "</div>"
footer

View File

@@ -72,5 +72,15 @@ $(document).ready(function () {
.delay(2000).fadeOut('slow');
});
});
$('#accordion').accordion({
header: 'h4',
collapsible: true,
active: 0,
heightStyle: 'content'
});
// For now - until plugins are updated.
$('div.pluginsettings').find('br + br').remove();
});

View File

@@ -8,7 +8,7 @@ set runmode cli
if {[string match {*jim} $argv0]} { set runmode cgi }
set schedtime 1200
case $runmode {
switch $runmode {
cgi {
set type [cgi_get type "full"]
httpheader
@@ -19,7 +19,7 @@ case $runmode {
}
}
if {[catch {set pid [exec pgrep humaxtv]}]} {
if {[catch {set pid [exec pgrep -n humaxtv]}]} {
puts "Cannot find humaxtv process."
exit
}

View File

@@ -2,14 +2,29 @@
package require cgi
source /mod/webif/lib/setup
require settings.class
jqplugin enadis
jscss xepg.js /css/xepg.css
header
require epg.class spinner.class altrow epg_search totop
require epg.class spinner.class altrow epg_search totop system.class
puts {
<link type="text/css" href="/css/xepg.css" rel="Stylesheet" />
<script type=text/javascript src=/js/enadis.js></script>
set irinst [system pkginst ir]
set s [settings]
if {[$s chanchangenc]} {
puts { <script type=text/javascript src=/js/chanchangenc.js></script> }
} else {
jqplugin confirmAction
puts { <script type=text/javascript src=/js/chanchange.js></script> }
}
if {[$s service_style] eq "standard"} {
set surl xservice
} else {
set surl service
}
[spinner new {
@@ -29,7 +44,7 @@ if {$stt <= $now} {
set current 0
}
set favgroup [[settings] channel_group]
set favgroup [$s channel_group]
set hours [expr 1.0 * [[settings] xepghours]]
if {$hours == 0} { set hours 4.0 }
@@ -82,7 +97,8 @@ but "&lt&lt; -1 Week" $($stt - 3600 * 24 * 7) \
$($stt - $now + 3600 >= 3600 * 24 * 7)
but "&lt&lt; -1 Day" $($stt - 3600 * 24) $($stt - $now >= 3600 * 23)
but "&lt;&lt; Earlier", $($stt - 3600 * 4) $($stt > $now)
but "&lt; Now &gt;" $now $($current == 0)
#but "&lt; Now &gt;" $now $($current == 0)
but "&lt; Now &gt;" $now
but "&gt;&gt; Later" $ett;
but "&gt;&gt; +1 Day" $($stt + 3600 * 24) $($stt < $now + 8 * 3600 * 24)
but "&gt;&gt; +1 Week" $($stt + 3600 * 24 * 7) $($stt < $now + 8 * 3600 * 24)
@@ -121,9 +137,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]&nbsp;"
if {$irinst} { puts "</a>" }
puts "$chnum
<a href=\"/cgi-bin/epg/service.jim?service=[$e get service_id]\"
<a href=\"/epg/$surl.jim?service=[$e get service_id]\"
title=\"[$e get channel_name]\">
[$e get channel_name]
</a></div>"
@@ -200,48 +220,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 +235,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>

View 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: 0,
maxDate: 8,
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'); }
);
});

View File

@@ -209,7 +209,10 @@ puts {
<div id=savestreamform title="Save streamed content"
style="display: none">
<div class=pre id=savestream_detail></div>
<form id=savestream_form>
<div id=savestream_retrieving>
<img src=/img/loading.gif> Retrieving details...
</div>
<form id=savestream_form class=hidden>
}
puts "<input type=hidden name=dir value=\"$dir\">"
puts {
@@ -217,7 +220,7 @@ puts {
<tr>
<th>
<label for="savestream_name">
<b>Filename</b>
<b>Enter Filename</b>
</label>
</th>
<td>
@@ -225,7 +228,9 @@ puts {
id="savestream_name"
value="" size=70 maxlength=255
class="text ui-widget-content ui-corner-all">
<img id=savestream_spin src=/img/loading.gif>
<span id=savestream_spin>
<img src=/img/loading.gif> Saving...
</span>
</td>
</tr>
</table>

View File

@@ -5,6 +5,8 @@ package require cgi
source /mod/webif/lib/setup
require ts.class system.class
jqplugin progressbar
jscss audio.js
header
set rfile [cgi_get file]
@@ -12,10 +14,8 @@ set ts [ts fetch $rfile]
set dir [file dirname $rfile]
set len [$ts duration 1]
puts "
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
<script type=text/javascript src=/js/jquery.progressbar.js></script>
<script type=text/javascript src=audio.js></script>
<fieldset class=cleft>
<legend>Audio Extraction</legend>

View File

@@ -4,6 +4,8 @@ package require cgi
source /mod/webif/lib/setup
require ts.class pretty_size
jqplugin progressbar
jscss chunk.js chunk.css
header
set rfile [cgi_get file]
@@ -19,10 +21,6 @@ set esttime $(int($len * 0.025))
if {[$ts get definition] eq "HD"} { set esttime $($esttime * 4) }
puts "
<script type=text/javascript src=/js/jquery.progressbar.js></script>
<script type=text/javascript src=chunk.js></script>
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
<link href=chunk.css rel=stylesheet type=text/css />
<fieldset class=cleft>
<legend>Split recording into 45 minute segments</legend>

View File

@@ -113,6 +113,7 @@ switch $action {
"$dir/[file tail $path]"}
}
}
ts resetnew $dir
}
$cb clear
$cb save

View File

@@ -4,6 +4,8 @@ package require cgi
source /mod/webif/lib/setup
require ts.class pretty_size
jqplugin progressbar
jscss crop.js
header
set rfile [cgi_get file]
@@ -13,10 +15,6 @@ set dir [file dirname $rfile]
set len [$ts duration 1]
puts "
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
<script type=text/javascript src=/js/jquery.progressbar.js></script>
<script type=text/javascript src=crop.js></script>
<fieldset class=cleft>
<legend>Crop recording</legend>

View File

@@ -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"

View File

@@ -7,7 +7,7 @@ require ts.class
httpheader
set perc [cgi_get perc 100]
set tsfile [file normalize [cgi_get file]]
set tsfile [cgi_get file]
set origfile "[file dirname $tsfile]/_original/[file tail $tsfile]"
set newfile [file rootname $tsfile]

View File

@@ -5,6 +5,8 @@ package require cgi
source /mod/webif/lib/setup
require ts.class
jqplugin progressbar
jscss decrypt.js
header
set rfile [cgi_get file]
@@ -14,9 +16,6 @@ set len [$ts duration 1]
lassign [$ts dlnaloc "127.0.0.1"] url
puts "
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
<script type=text/javascript src=/js/jquery.progressbar.js></script>
<script type=text/javascript src=decrypt.js></script>
<fieldset class=cleft>
<legend>Decrypt in-place</legend>

View File

@@ -2,7 +2,7 @@
package require cgi
source /mod/webif/lib/setup
require safe_delete
require safe_delete ts.class
httpheader
@@ -31,3 +31,5 @@ foreach file [cgi_get files] {
}
puts "</ul>"
ts resetnew $dir

View File

@@ -4,6 +4,8 @@ package require cgi
source /mod/webif/lib/setup
require ts.class pretty_size system.class settings.class escape browse.class
jqplugin contextMenu bar enadis
jscss script.js style.css
header
set nicesplice [system pkginst nicesplice]
@@ -20,13 +22,17 @@ if {![dict exists $env REQUEST_URI]} {
if {![dict exists $env QUERY_STRING]} { set env(QUERY_STRING) "root" }
set config [settings new]
set order [cgi_get order -]
if {$order eq "-"} {
set order [[settings new] sortorder]
set order [$config sortorder]
} else {
[settings new] sortorder $order
$config sortorder $order
}
set nofcount [$config nounwatchedcount]
set model [system model]
set dustbin [system dustbin 1]
@@ -39,10 +45,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>"
if {!$::nofcount} { 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]\"
@@ -172,9 +179,9 @@ proc entry {file} {{i 0}} {
}
lassign $ret txt img
if {$img eq "Unclassified"} {
icon "/images/173_3_26_G3_$img.png" $txt
icon "/images/173_3_26_G3_$img.png" $txt "" "va genre"
} else {
icon "/images/173_3_00_G3_$img.png" $txt
icon "/images/173_3_00_G3_$img.png" $txt "" "va genre"
}
# HD / SD
@@ -244,16 +251,6 @@ set dir [cgi_get dir $mroot]
######################################################################
# Render web page
puts {
<link href=/css/jquery.contextMenu.css rel=stylesheet type=text/css />
<script type=text/javascript src=/js/jquery.contextMenu.js></script>
<link href=/css/jquery.bar.css rel=stylesheet type=text/css />
<script type=text/javascript src=/js/jquery.bar.js></script>
<script type=text/javascript src=/js/enadis.js></script>
<script type=text/javascript src=script.js></script>
<link type=text/css rel=stylesheet href=style.css />
}
source assets.jim
puts "
@@ -303,9 +300,9 @@ proc s_time {a b} {
}
if {[catch {file stat $a l}]} { return 0}
set at $l(ctime)
set at $l(mtime)
if {[catch {file stat $b l}]} { return 0}
set bt $l(ctime)
set bt $l(mtime)
if {$at < $bt} { return -1 }
if {$at > $bt} { return 1 }

View File

@@ -4,18 +4,14 @@ package require cgi
source /mod/webif/lib/setup
require ts.class pretty_size
jqplugin progressbar touchbridge
jscss join.js join.css
header
cgi_input 1
#cgi_dump
puts "
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
<link href=join.css rel=stylesheet type=text/css />
<script type=text/javascript src=/js/jquery.progressbar.js></script>
<script type=text/javascript src=/js/touchbridge.js></script>
<script type/text/javascript src=join.js></script>
<p><b>
Drag the files below into order, enter a name for the resulting file and then
click the <i>Join</i> button.</b>

View File

@@ -5,6 +5,8 @@ package require cgi
source /mod/webif/lib/setup
require ts.class system.class
jqplugin progressbar
jscss mpg.js
header
set rfile [cgi_get file]
@@ -13,9 +15,6 @@ set dir [file dirname $rfile]
set len [$ts duration 1]
puts "
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
<script type=text/javascript src=/js/jquery.progressbar.js></script>
<script type=text/javascript src=mpg.js></script>
<fieldset class=cleft>
<legend>Extract to MPG</legend>

View File

@@ -14,6 +14,7 @@ if {[set ts [ts fetch $file]] != 0} {
if {[$ts set_$action]} {
puts "Successfully marked $file as $action."
ts resetnew [file dirname $file]
} else {
puts "Problem marking $file as $action,
[$ts get error]"

View File

@@ -15,10 +15,11 @@ 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)
if {$diff != 0} {
if {$diff > 0} {
set node [lindex [split $dir /] end]
puts "\"$node\": $diff,"
}

View File

@@ -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)
@@ -225,6 +231,7 @@ function savestream_submit()
{
var s = $('#savestream_form').serialize();
var sf = $('#save_stream').attr('file');
$('#savestream_name').disable();
$('#savestream_spin').show();
$.get('/browse/savestream.jim?sfile=' +
encodeURIComponent(sf) + '&' + s,
@@ -785,6 +792,11 @@ var dmenuclick = function(action, el, pos)
close: function() { $('#savestream_name').val(''); }
});
$('#savestream_name').keyup(function(e) {
if (e.keyCode == $.ui.keyCode.ENTER)
savestream_submit();
});
$('#bmpdialogue').dialog({
autoOpen: false,
height: 'auto', width: 'auto',
@@ -831,11 +843,20 @@ var dmenuclick = function(action, el, pos)
});
$('#save_stream').button().click(function() {
$('#savestream_retrieving').show();
$('#savestream_detail').text('').hide();
$('#savestream_spin').hide();
$('#savestream_name').val('').enable();
$('#savestreamform').dialog('open');
$('#savestream_detail').load(
'/browse/ffmpeg.jim?file=' +
encodeURIComponent($('#save_stream').attr('file')));
encodeURIComponent($('#save_stream').attr('file')),
function() {
$('#savestream_retrieving').hide();
$('#savestream_detail').show();
$('#savestream_form').show();
});
});
$('#selectall').click(function(e) {

View File

@@ -4,6 +4,8 @@ package require cgi
source /mod/webif/lib/setup
require ts.class pretty_size
jqplugin progressbar
jscss strip.js
header
set rfile [cgi_get file]
@@ -15,10 +17,6 @@ set len [$ts duration 1]
set esttime $([$ts size] / 5700000)
puts "
<link href=/css/jquery.progressbar.css rel=stylesheet type=text/css />
<script type=text/javascript src=/js/jquery.progressbar.js></script>
<script type=text/javascript src=strip.js></script>
<fieldset class=cleft>
<legend>Make recordings smaller by removing unecessary frames</legend>

View File

@@ -4,6 +4,8 @@ package require cgi
source /mod/webif/lib/setup
require ts.class pretty_size
jqplugin enadis
jscss script.js
header
set rfile [cgi_get file]
@@ -20,8 +22,6 @@ set pos $($pos + 0)
if {$pos < 0} { set pos 0 }
puts "
<script type=text/javascript src=script.js></script>
<script type=text/javascript src=/js/enadis.js></script>
<fieldset class=cleft>
<legend>Replace Thumbnail</legend>

View File

@@ -0,0 +1,5 @@
/* This style sheet can be customised to change the look and feel of some
* web interface elements.
* It will not be overwritten on webif updates.
*/

View File

@@ -1,75 +0,0 @@
.iPhoneCheckContainer {
position: relative;
height: 27px;
cursor: pointer;
overflow: hidden; }
.iPhoneCheckContainer input {
position: absolute;
top: 5px;
left: 30px;
opacity: 0;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); }
.iPhoneCheckContainer label {
white-space: nowrap;
font-size: 17px;
line-height: 17px;
font-weight: bold;
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
text-transform: uppercase;
cursor: pointer;
display: block;
height: 27px;
position: absolute;
width: auto;
top: 0;
padding-top: 5px;
overflow: hidden; }
.iPhoneCheckContainer, .iPhoneCheckContainer label {
user-select: none;
-moz-user-select: none;
-khtml-user-select: none; }
.iPhoneCheckDisabled {
opacity: 0.5;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); }
label.iPhoneCheckLabelOn {
color: white;
background: url('/img/iphone-style-checkboxes/on.png?1282083753') no-repeat;
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
left: 0;
padding-top: 5px; }
label.iPhoneCheckLabelOn span {
padding-left: 8px; }
label.iPhoneCheckLabelOff {
color: #8b8b8b;
background: url('/img/iphone-style-checkboxes/off.png?1282083753') no-repeat right 0;
text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.6);
text-align: right;
right: 0; }
label.iPhoneCheckLabelOff span {
padding-right: 8px; }
.iPhoneCheckHandle {
display: block;
height: 27px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 0;
background: url('/img/iphone-style-checkboxes/slider_left.png?1282083753') no-repeat;
padding-left: 3px; }
.iPhoneCheckHandleRight {
height: 100%;
width: 100%;
padding-right: 3px;
background: url('/img/iphone-style-checkboxes/slider_right.png?1282083753') no-repeat right 0; }
.iPhoneCheckHandleCenter {
height: 100%;
width: 100%;
background: url('/img/iphone-style-checkboxes/slider_center.png?1282083753'); }

View File

@@ -0,0 +1 @@
../lib/jquery.iphone-style-checkboxes/iphone-style-checkboxes.css

View File

@@ -427,7 +427,16 @@ button.red
div#restart_block
{
text-align: center;
z-index: 31;
float: right;
width: 60%;
position: absolute;
top: 10px;
left: 100px;
background-color: #f8f8f8;
opacity: 0.9;
filter:alpha(opacity=90);
}
img.bmp, img.doublebmp
@@ -445,3 +454,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;
}

View File

@@ -1,30 +0,0 @@
#toTop {
background: url("/img//ui.totop.png") no-repeat scroll left top transparent;
border: medium none;
bottom: 110px;
display: none;
height: 51px;
margin-left: 50px;
overflow: hidden;
position: fixed;
text-decoration: none;
text-indent: -999px;
width: 77px;
z-index: 2000;
}
#toTopHover {
background: url("/img/ui.totop.png") no-repeat scroll left -51px transparent;
display: block;
float: left;
height: 51px;
opacity: 0;
overflow: hidden;
width: 77px;
}
#toTop:active, #toTop:focus {
outline: medium none;
}

View File

@@ -0,0 +1 @@
../lib/jquery.plugin/ui.totop/ui.totop.css

View File

@@ -111,3 +111,8 @@ button#later
margin-left: 2em;
}
.jcaquestion
{
margin-left: 0px !important;
}

View File

@@ -12,7 +12,7 @@ source process.jim
set dir [cgi_get dir "/media/My Video"]
set doit [cgi_get doit 0]
puts "<script type=text/javascript src=script.js></script>"
jscss script.js
puts "<fieldset style=\"display: inline\">
<legend>De-duplicate <span id=dir>$dir</span></legend>

View File

@@ -4,16 +4,16 @@ package require cgi
source /mod/webif/lib/setup
require pretty_size system.class pkg.class
jqplugin enadis
jscss script.js style.css
header
pkg loaddiagmeta
set smv [system modversion 1]
puts {
<script type=text/javascript src=/js/enadis.js></script>
<script type=text/javascript src=script.js></script>
puts {
<fieldset class=cleft>
<legend>Utilities</legend>
<table>
@@ -54,8 +54,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 +63,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>

View File

@@ -4,6 +4,7 @@ package require cgi
source /mod/webif/lib/setup
require system.class settings.class
jqplugin enadis
header
set device [system disk]
@@ -20,7 +21,6 @@ if {$line ne ""} {
}
puts "
<script type=text/javascript src=/js/enadis.js></script>
<h3 class=va>
<img class=va width=100 src=/img/disc.png>
SMART data read from device $device

View File

@@ -9,7 +9,7 @@ set settings [settings]
foreach attr {realloc pending offline} {
set val [$settings _nval_setting "SMART_$attr"]
if {$val <= 0} continue
if {$val < 0} continue
$settings _nval_setting "SMART_ack_$attr" $val
}

View File

@@ -0,0 +1,92 @@
#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
require system.class pretty_size
jqplugin easy-pie-chart
jscss script.js style.css
header
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

View 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'
});
});

View File

@@ -0,0 +1 @@
div.closed { display: none; }

View File

@@ -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?'))

View File

@@ -0,0 +1 @@
button.half { width: 48%; }

View File

@@ -42,8 +42,8 @@ if {[system is_listening 9000]} {
set img "745_1_11_Video_1REC.png"
}
jscss script.js
puts "
<script type=text/javascript src=script.js></script>
<fieldset class=cleft>
<legend>DLNA Server Information</legend>

View File

@@ -4,17 +4,13 @@ package require cgi
source /mod/webif/lib/setup
require plugin
jqplugin enadis tabsupport filetree
jscss script.js style.css
header
set file [cgi_get file "/tmp/hosts"]
puts {
<script type=text/javascript src=/js/enadis.js></script>
<script type=text/javascript src=/js/tabsupport.js></script>
<script type=text/javascript src=/js/jqueryFileTree.js></script>
<link rel=stylesheet type=text/css href=/css/jqueryFileTree.css />
<script type=text/javascript src=script.js></script>
<link rel=stylesheet href=style.css type=text/css />
<fieldset class=cleft>
<legend>File Editor</legend>
@@ -23,7 +19,7 @@ puts {
Use the <i>Open</i> button below to begin.
</div>
<textarea cols=80 rows=20 id=editor
<textarea cols=120 rows=20 id=editor
class="ui-widget ui-corner-all"></textarea>
<br>
@@ -46,6 +42,7 @@ class="ui-widget ui-corner-all"></textarea>
<ul>
<li><a href=# class=qfile>/mod/etc/anacrontab</a></li>
<li><a href=# class=qfile>/mod/var/spool/cron/crontabs/root</a></li>
<li><a href=# class=qfile>/mod/webif/html/css/EXTRA.css</a></li>
}
proc quickedit {file} {

View File

@@ -2,6 +2,7 @@ textarea
{
background: white;
color: black;
font-family: Consolas, "Courier New", "Lucida Console", Monaco, "Courier", monospace !important;
}
#filename

View File

@@ -0,0 +1,79 @@
table.weekview
{
width: 100%;
border: 1px solid red;
}
th.day, th.hour, td.dayhour
{
border: solid 1px #d3d3d3;
}
th.day, th.hour
{
background: #ccff99;
color: black;
}
th.day
{
text-align: center;
font-size: 1.2em;
width: 13%;
}
th.hour
{
vertical-align: top;
text-align: center;
font-size: 1.3em;
padding: 8px 0;
}
td.dayhour
{
vertical-align: top;
background: #ffffcc;
}
td.sdayhour
{
vertical-align: middle;
background: #ffffcc;
}
div.prog
{
margin: 5px;
}
div.progp
{
padding-top: 1em;
}
div.time
{
font-size: 1.3em;
opacity: 0.6;
margin-bottom: 0.4em;
}
div.title
{
font-size: 1.1em;
text-weight: bold;
margin-bottom: 0.4em;
}
div.synopsis
{
font-size: 0.9em;
}
img.cimg
{
width: 100%;
}

257
var/mongoose/html/epg/service.jim Executable file
View File

@@ -0,0 +1,257 @@
#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
require epg.class spinner.class altrow
jqplugin iphone-style-checkboxes freezeheader scrollto
jscss service.js service.css
header
require totop
[spinner new {
text "Loading EPG Data..."
size "1.2em"
style "margin: 1em;"
}] start
require epg_popup
set service [cgi_get service 4170]
set records [epg dbfetch dump \
-service $service \
-sort "strftime('%%H%%J', start, 'unixepoch'), strftime('%%M', start, 'unixepoch')" \
-debug 0
]
if {[llength $records] == 0} {
puts "No data for service.."
exit
}
set nowhour [clock format [clock seconds] -format "%H"]
# Load the channel information from the first entry
set tr [lindex $records 0]
$tr get_channel_info
set channel_num [$tr get channel_num]
set channel_name [$tr get channel_name]
puts "
<div style=\"margin: 0 1em 1em 1em\">
<table class=va><tr><td class=va>
[$tr channel_icon 40 {vertical-align:middle}]
</td><td>
$channel_num - $channel_name
</td><td style=\"width: 50px\">&nbsp;</td><td>
<button id=jumptonow hour=$nowhour>Jump to Now</button>
</td><td style=\"width: 50px\">&nbsp;</td><td>
Show synopsis?
</td><td>
<input type=checkbox id=synopsis value=1 checked />
</td><td style=\"width: 50px\">&nbsp;</td><td>
<button id=listview service=$service>List View</button>
</td></tr></table>
</div>
"
puts {
<script type=text/javascript>
$('button').button();
$('#synopsis').iphoneStyle({checkedLabel: 'YES', uncheckedLabel: 'NO'});
</script>
}
puts "
<div class=weekview>
<table class=weekview>
<thead>
<tr>
<th class=hour></th>
"
set t [clock seconds]
set firstday [clock format $t -format {%Y%m%d}]
set daymap {}
loop i 0 8 {
puts "<th class=\"day day-$i\">[clock format $t -format {%a}]<br>"
puts "[clock format $t -format {%e %b}]</th>"
set day [clock format $t -format {%Y%m%d}]
set daymap($day) $i
set dayrmap($i) $day
incr t 86400
}
puts "
</tr>
</thead>
<tbody>
"
set contprog {}
proc slink {e} {
global service
if {[$e get series_crid] ne ""} {
set ro 2
} else {
set ro 1
}
set st [$e scheduled]
return "<a class=event href=# xs=$service xe=[$e get event_id] sch=$st rec=$ro>"
}
proc prog {e {cont 0} {hour 99}} {
global service day contprog
set start [$e get start]
set end [$e end]
set class "prog"
if {$cont} { set class "prog progp" }
puts "
<div class=\"$class\">
<div class=time>
[clock format $start -format {%H:%M}]-[clock format $end -format {%H:%M}]
</div>
<div class=title>
[slink $e]
[$e get name]
</a>
</div>
<div class=synopsis>[$e get text] [join [$e icon_set 14] ""]</div>
</div>
"
# Programmes which cross the hour boundary
if {[clock format $end -format "%H%M"] > "$($hour + 1)00"} {
puts "<div class=cont><img class=cimg src=/img/contt.png></div>"
set contprog($day) $e
}
}
proc cprog {} {
global service day contprog hour
set e $contprog($day)
set end [$e end]
if {[clock format $end -format "%H%M"] eq "${hour}00"} {
dict unset contprog $day
return 0
}
set start [$e get start]
puts "
<div class=cont><img class=cimg src=/img/contb.png></div>
<div class=prog>
<div class=time>
...... -[clock format $end -format {%H:%M}]
</div>
<div class=title>
[slink $e]
[$e get name]
</a>
</div>
</div>
"
if {[clock format $end -format "%H"] > $hour} {
puts "<div class=cont><img class=cimg src=/img/contt.png></div>"
} else {
dict unset contprog $day
}
return 1
}
proc jcprog {day} {
global contprog
set e $contprog($day)
set start [$e get start]
set end [$e end]
puts "
<div class=cont><img class=cimg src=/img/contb.png></div>
<div class=prog>
<div class=time>
[clock format $start -format {%H:%M}]-[clock format $end -format {%H:%M}]
</div>
<div class=title>
[slink $e]
[$e get name]
</a>
</div>
</div>
<div class=cont><img class=cimg src=/img/contt.png></div>
"
}
proc skiptoday {day} {
global daymap dayrmap currday contprog oldcell
if {!$oldcell && [dict exists $contprog $currday]} {
jcprog $currday
}
#puts "Skiptoday: $day ($daymap($currday))<br>"
if {$daymap($currday) eq $day} return
puts "</td><td class=dayhour>"
incr day -1
loop i $daymap($currday) $day {
set j $($i + 1)
if {[dict exists $contprog $dayrmap($j)]} {
jcprog $dayrmap($j)
}
puts "</td><td class=dayhour>"
}
}
set currhour -1
set currday -1
set oldcell 0
foreach e $records {
set start [$e get start]
set day [clock format $start -format "%Y%m%d"]
if {$day ni $daymap} continue
set hour [clock format $start -format "%H"]
if {$hour != $currhour} {
if {$currhour ne "-1"} {
if {$daymap($currday) < 7} {
skiptoday 7
if {[dict exists $contprog $dayrmap(7)]} {
jcprog $dayrmap(7)
}
}
puts -nonewline "</td></tr>"
}
puts "
<tr class=hour id=hour_$hour>
<th class=hour>$hour:00</th>
<td class=dayhour>
"
set currhour $hour
set currday $firstday
set oldcell 0
}
if {$day ne $currday} {
skiptoday $daymap($day)
set currday $day
set oldcell 0
}
# Continuations from previous hour...
if {!$oldcell && [dict exists $contprog $day]} {
if {[cprog]} { set oldcell 1 }
}
prog $e $oldcell $hour
set oldcell 1
}
puts "
</td>
</tr>
</tbody>
</table>
</div>
"
epg cleanup
footer

View File

@@ -0,0 +1,31 @@
$(function() {
$('button').button();
$('#synopsis').iphoneStyle({
checkedLabel: 'YES',
uncheckedLabel: 'NO'
}).bind('change', function() {
if ($(this).attr('checked'))
$('.synopsis').show();
else
$('.synopsis').hide();
});
$('#listview').bind('click', function() {
var service = $(this).attr('service');
window.location.href = '/epg/xservice.jim?service=' + service;
});
$('table.weekview').freezeHeader();
$('#jumptonow').bind('click', function() {
var hour = $(this).attr('hour');
$('body').scrollTo('#hour_' + hour, 500, {
offset: {top: -50, left: 0}
});
});
});

View File

@@ -26,14 +26,28 @@ set channel_name [$tr get channel_name]
puts "
<div style=\"margin: 0 1em 1em 1em\">
[$tr channel_icon 80 {vertical-align:middle}]
<span style=\"vertical-align: middle\">
<table class=va><tr><td class=va>
[$tr channel_icon 40 {vertical-align:middle}]
</td><td>
$channel_num - $channel_name
</span>
</td><td style=\"width: 50px\">&nbsp;</td><td>
<button id=gridview>
Grid View
</button>
</td></tr></table>
</div>
"
puts "
<script type=text/javascript>
\$('button').button();
\$('#gridview').button().bind('click', function() {
document.location.href = '/epg/service.jim?service=$service';
});
</script>
"
puts {
<div id=list>
<table class=borders>
<tr>
<th></th>
@@ -61,7 +75,7 @@ foreach record $records {
puts "<td>[$record get warning]</td>"
puts "</tr>"
}
puts "</table>"
puts "</table></div>"
epg cleanup
footer

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

View 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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

View File

@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.5" />
<meta name="generator" content="AsciiDoc 8.6.6" />
<title>Jim Tcl(n)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -179,7 +179,7 @@ div.quoteblock, div.verseblock {
margin-left: 1.0em;
margin-right: 10%;
border-left: 5px solid #f0f0f0;
color: #777777;
color: #888;
}
div.quoteblock > div.attribution {
@@ -514,24 +514,29 @@ th.tableblock.valign-middle, td.tableblock.valign-middle {
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
vertical-align: bottom;
}
/* Overrides for manpage documents */
h1 {
/*
* manpage specific
*
* */
body.manpage h1 {
padding-top: 0.5em;
padding-bottom: 0.5em;
border-top: 2px solid silver;
border-bottom: 2px solid silver;
}
h2 {
body.manpage h2 {
border-style: none;
}
div.sectionbody {
body.manpage div.sectionbody {
margin-left: 3em;
}
@media print {
div#toc { display: none; }
body.manpage div#toc { display: none; }
}
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -605,7 +610,7 @@ toc: function (toclevels) {
var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
if (entry.nodeName == 'DIV'
if (entry.nodeName == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -651,7 +656,7 @@ footnotes: function () {
var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
if (entry.nodeName == 'DIV' && entry.getAttribute("class") == "footnote")
if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -735,7 +740,7 @@ Jim Tcl(n) Manual Page
</h1>
<h2>NAME</h2>
<div class="sectionbody">
<p>Jim Tcl v0.73 -
<p>Jim Tcl v0.75 -
reference manual for the Jim Tcl scripting language
</p>
</div>
@@ -875,6 +880,86 @@ Support for UDP, IPv6, Unix-Domain sockets in addition to TCP sockets
<h2 id="_recent_changes">RECENT CHANGES</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_changes_between_0_74_and_0_75">Changes between 0.74 and 0.75</h3>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
<a href="#_binary"><strong><tt>binary</tt></strong></a>, <a href="#cmd_3"><strong><tt>pack</tt></strong></a> and <a href="#cmd_3"><strong><tt>unpack</tt></strong></a> now support floating point
</p>
</li>
<li>
<p>
<a href="#_file"><strong><tt>file</tt></strong></a> <tt>copy</tt> <em>-force</em> handles source and target as the same file
</p>
</li>
<li>
<p>
<a href="#_format"><strong><tt>format</tt></strong></a> now supports <tt>%b</tt> for binary conversion
</p>
</li>
<li>
<p>
<a href="#_lsort"><strong><tt>lsort</tt></strong></a> now supports <em>-unique</em> and <em>-real</em>
</p>
</li>
<li>
<p>
Add support for half-close with <a href="#_aio"><strong><tt>aio</tt></strong></a> <tt>close</tt> ?r|w?
</p>
</li>
<li>
<p>
Add <a href="#_socket"><strong><tt>socket</tt></strong></a> <tt>pair</tt> for a bidirectional pipe
</p>
</li>
<li>
<p>
Add --random-hash to randomise hash tables for greater security
</p>
</li>
<li>
<p>
<a href="#_dict"><strong><tt>dict</tt></strong></a> now supports <em>for</em>, <em>values</em>, <em>incr</em>, <em>append</em>, <em>lappend</em>, <em>update</em>, <em>info</em> and <em>replace</em>
</p>
</li>
<li>
<p>
<a href="#_file"><strong><tt>file</tt></strong></a> <tt>stat</tt> no longer requires the variable name
</p>
</li>
</ol></div>
</div>
<div class="sect2">
<h3 id="_changes_between_0_73_and_0_74">Changes between 0.73 and 0.74</h3>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
Numbers with leading zeros are treated as decimal, not octal
</p>
</li>
<li>
<p>
Add <a href="#_aio"><strong><tt>aio</tt></strong></a> <tt>isatty</tt>
</p>
</li>
<li>
<p>
Add LFS (64 bit) support for <a href="#_aio"><strong><tt>aio</tt></strong></a> <tt>seek</tt>, <a href="#_aio"><strong><tt>aio</tt></strong></a> <tt>tell</tt>, <a href="#_aio"><strong><tt>aio</tt></strong></a> <tt>copyto</tt>, <a href="#_file"><strong><tt>file</tt></strong></a> <tt>copy</tt>
</p>
</li>
<li>
<p>
<a href="#_string"><strong><tt>string</tt></strong></a> <tt>compare</tt> and <a href="#_string"><strong><tt>string</tt></strong></a> <tt>equal</tt> now support <em>-length</em>
</p>
</li>
<li>
<p>
<a href="#_glob"><strong><tt>glob</tt></strong></a> now supports <em>-directory</em>
</p>
</li>
</ol></div>
</div>
<div class="sect2">
<h3 id="_changes_between_0_72_and_0_73">Changes between 0.72 and 0.73</h3>
<div class="olist arabic"><ol class="arabic">
<li>
@@ -1064,66 +1149,6 @@ Built-in regexp now support non-greedy repetition (*?, +?, ??)
</li>
</ol></div>
</div>
<div class="sect2">
<h3 id="_changes_between_0_63_and_0_70">Changes between 0.63 and 0.70</h3>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
<tt>platform_tcl()</tt> settings are now automatically determined
</p>
</li>
<li>
<p>
Add aio <tt>$handle filename</tt>
</p>
</li>
<li>
<p>
Add <a href="#_info"><strong><tt>info</tt></strong></a> <tt>channels</tt>
</p>
</li>
<li>
<p>
The <em>bio</em> extension is gone. Now <a href="#_aio"><strong><tt>aio</tt></strong></a> supports <em>copyto</em>.
</p>
</li>
<li>
<p>
Add <a href="#_exists"><strong><tt>exists</tt></strong></a> command
</p>
</li>
<li>
<p>
Add the pure-Tcl <em>oo</em> extension
</p>
</li>
<li>
<p>
The <a href="#_exec"><strong><tt>exec</tt></strong></a> command now only uses vfork(), not fork()
</p>
</li>
<li>
<p>
Unit test framework is less verbose and more Tcl-compatible
</p>
</li>
<li>
<p>
Optional UTF-8 support
</p>
</li>
<li>
<p>
Optional built-in regexp engine for better Tcl compatibility and UTF-8 support
</p>
</li>
<li>
<p>
Command line editing in interactive mode, e.g. <em>jimsh</em>
</p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="sect1">
@@ -1856,9 +1881,9 @@ and parentheses.</p></div>
<div class="paragraph"><p>White space may be used between the operands and operators and
parentheses; it is ignored by the expression processor.
Where possible, operands are interpreted as integer values.</p></div>
<div class="paragraph"><p>Integer values may be specified in decimal (the normal case), in octal (if the
first character of the operand is <em>0</em>), or in hexadecimal (if the first
two characters of the operand are <em>0x</em>).</p></div>
<div class="paragraph"><p>Integer values may be specified in decimal (the normal case) or in
hexadecimal (if the first two characters of the operand are <em>0x</em>).
Note that Jim Tcl does <strong>not</strong> treat numbers with leading zeros as octal.</p></div>
<div class="paragraph"><p>If an operand does not have one of the integer formats given
above, then it is treated as a floating-point number if that is
possible. Floating-point numbers may be specified in any of the
@@ -3678,6 +3703,7 @@ command. The legal <tt><em>options</em></tt> are:</p></div>
</p>
</dd>
</dl></div>
<div class="paragraph"><p><tt><strong>dict for, values, incr, append, lappend, update, info, replace</strong></tt> to be documented&#8230;</p></div>
</div>
<div class="sect2">
<h3 id="_env">env</h3>
@@ -4193,15 +4219,12 @@ abbreviation for <tt><em>option</em></tt> is acceptable. The valid options are:
</p>
</dd>
<dt class="hdlist1">
<tt><strong>file stat</strong> <em>name varName</em></tt>
<tt><strong>file stat</strong> <em>name ?varName?</em></tt>
</dt>
<dd>
<p>
Invoke the <em>stat</em> kernel call on <tt><em>name</em></tt>, and use the
variable given by <tt><em>varName</em></tt> to hold information returned from
the kernel call.
<tt><em>varName</em></tt> is treated as an array variable,
and the following elements of that variable are set: <em>atime</em>,
Invoke the <em>stat</em> kernel call on <tt><em>name</em></tt>, and return the result
as a dictionary with the following keys: <em>atime</em>,
<em>ctime</em>, <em>dev</em>, <em>gid</em>, <em>ino</em>, <em>mode</em>, <em>mtime</em>,
<em>nlink</em>, <em>size</em>, <em>type</em>, <em>uid</em>.
Each element except <em>type</em> is a decimal string with the value of
@@ -4209,7 +4232,8 @@ abbreviation for <tt><em>option</em></tt> is acceptable. The valid options are:
manual entry for <em>stat</em> for details on the meanings of the values.
The <em>type</em> element gives the type of the file in the same form
returned by the command <a href="#_file"><strong><tt>file</tt></strong></a> <tt>type</tt>.
This command returns an empty string.
If <tt><em>varName</em></tt> is specified, it is taken to be the name of an array
variable and the values are also stored into the array.
</p>
</dd>
<dt class="hdlist1">
@@ -4340,7 +4364,8 @@ converts each argument to the correct type (floating, integer, etc.)
before passing it to <em>sprintf</em> for formatting.</p></div>
<div class="paragraph"><p>The only unusual conversion is for <tt>%c</tt>; in this case the argument
must be a decimal string, which will then be converted to the corresponding
ASCII character value.</p></div>
ASCII (or UTF-8) character value.</p></div>
<div class="paragraph"><p>In addition, Jim Tcl provides basic support for conversion to binary with <tt>%b</tt>.</p></div>
<div class="paragraph"><p><a href="#_format"><strong><tt>format</tt></strong></a> does backslash substitution on its <tt><em>formatString</em></tt>
argument, so backslash sequences in <tt><em>formatString</em></tt> will be handled
correctly even if the argument is in braces.</p></div>
@@ -4380,13 +4405,17 @@ for reading.</p></div>
</div>
<div class="sect2">
<h3 id="_glob">glob</h3>
<div class="paragraph"><p><tt><strong>glob</strong> ?<strong>-nocomplain</strong>? <em>pattern ?pattern ...?</em></tt></p></div>
<div class="paragraph"><p><tt><strong>glob</strong> ?<strong>-nocomplain</strong>? ?<strong>-directory</strong> <em>dir</em>? ?<strong>--</strong>? <em>pattern ?pattern ...?</em></tt></p></div>
<div class="paragraph"><p>This command performs filename globbing, using csh rules. The returned
value from <a href="#_glob"><strong><tt>glob</tt></strong></a> is the list of expanded filenames.</p></div>
<div class="paragraph"><p>If <tt>-nocomplain</tt> is specified as the first argument then an empty
list may be returned; otherwise an error is returned if the expanded
list is empty. The <tt>-nocomplain</tt> argument must be provided
exactly: an abbreviation will not be accepted.</p></div>
<div class="paragraph"><p>If <tt>-directory</tt> is given, the <tt><em>dir</em></tt> is understood to contain a
directory name to search in. This allows globbing inside directories
whose names may contain glob-sensitive characters. The returned names
are specified relative to this directory.</p></div>
</div>
<div class="sect2">
<h3 id="_global">global</h3>
@@ -5121,10 +5150,12 @@ the list are to be matched against pattern and must have one of the values below
</div>
<div class="sect2">
<h3 id="_lsort">lsort</h3>
<div class="paragraph"><p><tt><strong>lsort</strong> ?<strong>-index</strong> <em>listindex</em>? ?<strong>-integer</strong>|<strong>-command</strong> <em>cmdname</em>? ?<strong>-decreasing</strong>|<strong>-increasing</strong>? <em>list</em></tt></p></div>
<div class="paragraph"><p><tt><strong>lsort</strong> ?<strong>-index</strong> <em>listindex</em>? ?<strong>-nocase!-integer|-real|-command</strong> <em>cmdname</em>? ?<strong>-unique</strong>? ?<strong>-decreasing</strong>|<strong>-increasing</strong>? <em>list</em></tt></p></div>
<div class="paragraph"><p>Sort the elements of <tt><em>list</em></tt>, returning a new list in sorted order.
By default, ASCII sorting is used, with the result in increasing order.</p></div>
By default, ASCII (or UTF-8) sorting is used, with the result in increasing order.</p></div>
<div class="paragraph"><p>If <tt>-nocase</tt> is specified, comparisons are case-insenstive.</p></div>
<div class="paragraph"><p>If <tt>-integer</tt> is specified, numeric sorting is used.</p></div>
<div class="paragraph"><p>If <tt>-real</tt> is specified, floating point number sorting is used.</p></div>
<div class="paragraph"><p>If <tt>-command <em>cmdname</em></tt> is specified, <tt><em>cmdname</em></tt> is treated as a command
name. For each comparison, <tt><em>cmdname $value1 $value2</tt></em> is called which
should compare the values and return an integer less than, equal
@@ -5132,9 +5163,9 @@ to, or greater than zero if the <tt><em>$value1</em></tt> is to be considered le
than, equal to, or greater than <tt><em>$value2</em></tt>, respectively.</p></div>
<div class="paragraph"><p>If <tt>-decreasing</tt> is specified, the resulting list is in the opposite
order to what it would be otherwise. <tt>-increasing</tt> is the default.</p></div>
<div class="paragraph"><p>If <tt>-index <em>listindex</em></tt> is specified, each element of the list is treated as a list and
the given index is extracted from the list for comparison. The list index may
be any valid list index, such as <tt>1</tt>, <tt>end</tt> or <tt>end-2</tt>.</p></div>
<div class="paragraph"><p>If <tt>-unique</tt> is specified, then only the last set of duplicate elements found in the list will be retained.
Note that duplicates are determined relative to the comparison used in the sort. Thus if <tt>-index 0</tt> is used,
<tt>{1 a}</tt> and <tt>{1 b}</tt> would be considered duplicates and only the second element, <tt>{1 b}</tt>, would be retained.</p></div>
<div class="paragraph"><p>If <tt>-index <em>listindex</em></tt> is specified, each element of the list is treated as a list and
the given index is extracted from the list for comparison. The list index may
be any valid list index, such as <tt>1</tt>, <tt>end</tt> or <tt>end-2</tt>.</p></div>
@@ -5845,23 +5876,27 @@ The legal options (which may be abbreviated) are:</p></div>
</p>
</dd>
<dt class="hdlist1">
<tt><strong>string compare ?-nocase?</strong> <em>string1 string2</em></tt>
<tt><strong>string compare ?-nocase?</strong> ?<strong>-length</strong> <em>len? string1 string2</em></tt>
</dt>
<dd>
<p>
Perform a character-by-character comparison of strings <tt><em>string1</em></tt> and
<tt><em>string2</em></tt> in the same way as the C <em>strcmp</em> procedure. Return
-1, 0, or 1, depending on whether <tt><em>string1</em></tt> is lexicographically
less than, equal to, or greater than <tt><em>string2</em></tt>.
less than, equal to, or greater than <tt><em>string2</em></tt>. If <tt>-length</tt>
is specified, then only the first <tt><em>len</em></tt> characters are used
in the comparison. If <tt><em>len</em></tt> is negative, it is ignored.
Performs a case-insensitive comparison if <tt>-nocase</tt> is specified.
</p>
</dd>
<dt class="hdlist1">
<tt><strong>string equal ?-nocase?</strong> <em>string1 string2</em></tt>
<tt><strong>string equal ?-nocase?</strong> <em>?<strong>-length</strong> len?</em> <em>string1 string2</em></tt>
</dt>
<dd>
<p>
Returns 1 if the strings are equal, or 0 otherwise.
Returns 1 if the strings are equal, or 0 otherwise. If <tt>-length</tt>
is specified, then only the first <tt><em>len</em></tt> characters are used
in the comparison. If <tt><em>len</em></tt> is negative, it is ignored.
Performs a case-insensitive comparison if <tt>-nocase</tt> is specified.
</p>
</dd>
@@ -6771,27 +6806,28 @@ uid 1000 euid 1000 gid 100 egid 100</tt></pre>
<h3 id="_aio">aio</h3>
<div class="dlist"><dl>
<dt class="hdlist1">
<tt>$handle <strong>read ?-nonewline?</strong> <em>?len?</em></tt>
<tt>$handle <strong>accept</strong></tt>
</dt>
<dd>
<p>
Read and return bytes from the stream. To eof if no len.
Server socket only: Accept a connection and return stream
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>gets</strong> <em>?var?</em></tt>
<tt>$handle <strong>buffering none|line|full</strong></tt>
</dt>
<dd>
<p>
Read one line and return it or store it in the var
Sets the buffering mode of the stream.
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>puts ?-nonewline?</strong> <em>str</em></tt>
<tt>$handle <strong>close</strong> ?r(ead)|w(rite)?</tt>
</dt>
<dd>
<p>
Write the string, with newline unless -nonewline
Closes the stream.
The two-argument form is a "half-close" on a socket. See the <tt>shutdown(2)</tt> man page.
</p>
</dd>
<dt class="hdlist1">
@@ -6805,11 +6841,11 @@ uid 1000 euid 1000 gid 100 egid 100</tt></pre>
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>flush</strong></tt>
<tt>$handle <strong>eof</strong></tt>
</dt>
<dd>
<p>
Flush the stream
Returns 1 if stream is at eof
</p>
</dd>
<dt class="hdlist1">
@@ -6822,45 +6858,27 @@ uid 1000 euid 1000 gid 100 egid 100</tt></pre>
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>eof</strong></tt>
<tt>$handle <strong>flush</strong></tt>
</dt>
<dd>
<p>
Returns 1 if stream is at eof
Flush the stream
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>close</strong></tt>
<tt>$handle <strong>gets</strong> <em>?var?</em></tt>
</dt>
<dd>
<p>
Closes the stream
Read one line and return it or store it in the var
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>seek</strong> <em>offset</em> <strong>?start|current|end?</strong></tt>
<tt>$handle <strong>isatty</strong></tt>
</dt>
<dd>
<p>
Seeks in the stream (default <em>current</em>)
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>tell</strong></tt>
</dt>
<dd>
<p>
Returns the current seek position
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>filename</strong></tt>
</dt>
<dd>
<p>
Returns the original filename used when opening the file.
If the handle was returned from <a href="#_socket"><strong><tt>socket</tt></strong></a>, the type of the
handle is returned instead.
Returns 1 if the stream is a tty device.
</p>
</dd>
<dt class="hdlist1">
@@ -6874,30 +6892,19 @@ uid 1000 euid 1000 gid 100 egid 100</tt></pre>
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>buffering none|line|full</strong></tt>
<tt>$handle <strong>puts ?-nonewline?</strong> <em>str</em></tt>
</dt>
<dd>
<p>
Sets the buffering mode of the stream.
Write the string, with newline unless -nonewline
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>accept</strong></tt>
<tt>$handle <strong>read ?-nonewline?</strong> <em>?len?</em></tt>
</dt>
<dd>
<p>
Server socket only: Accept a connection and return stream
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>sendto</strong> <em>str ?hostname:?port</em></tt>
</dt>
<dd>
<p>
Sends the string, <tt><em>str</em></tt>, to the given address via the socket using sendto(2).
This is intended for udp sockets and may give an error or behave in unintended
ways for other handle types.
Returns the number of bytes written.
Read and return bytes from the stream. To eof if no len.
</p>
</dd>
<dt class="hdlist1">
@@ -6911,6 +6918,33 @@ uid 1000 euid 1000 gid 100 egid 100</tt></pre>
the named variable in the form <em>addr:port</em>. See <a href="#_socket"><strong><tt>socket</tt></strong></a> for details.
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>seek</strong> <em>offset</em> <strong>?start|current|end?</strong></tt>
</dt>
<dd>
<p>
Seeks in the stream (default <em>current</em>)
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>sendto</strong> <em>str ?addr:?port</em></tt>
</dt>
<dd>
<p>
Sends the string, <tt><em>str</em></tt>, to the given address via the socket using sendto(2).
This is intended for udp/dgram sockets and may give an error or behave in unintended
ways for other handle types.
Returns the number of bytes written.
</p>
</dd>
<dt class="hdlist1">
<tt>$handle <strong>tell</strong></tt>
</dt>
<dd>
<p>
Returns the current seek position
</p>
</dd>
</dl></div>
</div>
<div class="sect2">
@@ -7058,16 +7092,18 @@ handler is removed.</p></div>
</dl></div>
<div class="paragraph"><p>Scripts are executed at the global scope. If an error occurs during a handler script,
an attempt is made to call (the user-defined command) <tt>bgerror</tt> with the details of the error.
If the <tt>bgerror</tt> commands does not exist, it is printed to stderr instead.</p></div>
If the <tt>bgerror</tt> command does not exist, the error message details are printed to stderr instead.</p></div>
<div class="paragraph"><p>If a file event handler script generates an error, the handler is automatically removed
to prevent infinite errors. (A time event handler is always removed after execution).</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
<tt><strong>bgerror</strong> <em>error</em></tt>
<tt><strong>bgerror</strong> <em>msg</em></tt>
</dt>
<dd>
<p>
Called when an event handler script generates an error.
Called when an event handler script generates an error. Note that the normal command resolution
rules are used for bgerror. First the name is resolved in the current namespace, then in the
global scope.
</p>
</dd>
</dl></div>
@@ -7097,7 +7133,7 @@ to prevent infinite errors. (A time event handler is always removed after execut
</dt>
<dd>
<p>
A TCP socket client.
A TCP socket client. (See the forms for <tt><em>addr</em></tt> below)
</p>
</dd>
<dt class="hdlist1">
@@ -7135,6 +7171,15 @@ to prevent infinite errors. (A time event handler is always removed after execut
a list of two channels: {read write}
</p>
</dd>
<dt class="hdlist1">
<tt><strong>socket pair</strong></tt>
</dt>
<dd>
<p>
A socketpair (see socketpair(2)). Like <a href="#_socket"><strong><tt>socket</tt></strong></a> <tt>pipe</tt>, this command returns
a list of two channels: {s1 s2}. These channels are both readable and writable.
</p>
</dd>
</dl></div>
<div class="paragraph"><p>This command creates a socket connected (client) or bound (server) to the given
address.</p></div>
@@ -7256,29 +7301,30 @@ uucp, local0-local7</tt></pre>
<div class="paragraph"><p>The optional <em>pack</em> extension provides commands to encode and decode binary strings.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
<tt><strong>pack</strong> <em>varName value</em> <strong>-intle|-intbe|-str</strong> <em>bitwidth ?bitoffset?</em></tt>
<tt><strong>pack</strong> <em>varName value</em> <strong>-intle|-intbe|-floatle|-floatbe|-str</strong> <em>bitwidth ?bitoffset?</em></tt>
</dt>
<dd>
<p>
Packs the binary representation of <tt><em>value</em></tt> into the variable
<tt><em>varName</em></tt>. The value is packed according to the given type
(integer/string, big-endian/little-endian), width and bit offset.
(integer/floating point/string, big-endian/little-endian), width and bit offset.
The variable is created if necessary (like <a href="#_append"><strong><tt>append</tt></strong></a>).
Ihe variable is expanded if necessary.
</p>
</dd>
<dt class="hdlist1">
<tt><strong>unpack</strong> <em>binvalue</em> <strong>-intbe|-intle|-uintbe|-uintle|-str</strong> <em>bitpos bitwidth</em></tt>
<tt><strong>unpack</strong> <em>binvalue</em> <strong>-intbe|-intle|-uintbe|-uintle|-floatbe|-floatle|-str</strong> <em>bitpos bitwidth</em></tt>
</dt>
<dd>
<p>
Unpacks bits from <tt><em>binvalue</em></tt> at bit position <tt><em>bitpos</em></tt> and with <tt><em>bitwidth</em></tt>.
Interprets the value according to the type (integer/string, big-endian/little-endian
Interprets the value according to the type (integer/floating point/string, big-endian/little-endian
and signed/unsigned) and returns it. For integer types, <tt><em>bitwidth</em></tt>
may be up to the size of a Jim Tcl integer (typically 64 bits). For the string type,
both the width and the offset must be on a byte boundary (multiple of 8). Attempting to
access outside the length of the value will return 0 for integer types or the empty string
for the string type.
may be up to the size of a Jim Tcl integer (typically 64 bits). For floating point types,
<tt><em>bitwidth</em></tt> may be 32 bits (for single precision numbers) or 64 bits (for double precision).
For the string type, both the width and the offset must be on a byte boundary (multiple of 8). Attempting to
access outside the length of the value will return 0 for integer types, 0.0 for floating point types
or the empty string for the string type.
</p>
</dd>
</dl></div>
@@ -7288,7 +7334,8 @@ uucp, local0-local7</tt></pre>
<div class="paragraph"><p>The optional, pure-Tcl <em>binary</em> extension provides the Tcl-compatible <a href="#_binary"><strong><tt>binary</tt></strong></a> <tt>scan</tt> and <a href="#_binary"><strong><tt>binary</tt></strong></a> <tt>format</tt>
commands based on the low-level <a href="#cmd_3"><strong><tt>pack</tt></strong></a> and <a href="#cmd_3"><strong><tt>unpack</tt></strong></a> commands.</p></div>
<div class="paragraph"><p>See the Tcl documentation at: <a href="http://www.tcl.tk/man/tcl8.5/TclCmd/binary.htm">http://www.tcl.tk/man/tcl8.5/TclCmd/binary.htm</a></p></div>
<div class="paragraph"><p>Note that packing and unpacking of floating point values is not supported.</p></div>
<div class="paragraph"><p>Note that <em>binary format</em> with f/r/R specifiers (single-precision float) uses the value of Infinity
in case of overflow.</p></div>
</div>
<div class="sect2">
<h3 id="cmd_4">oo: class, super</h3>
@@ -7486,34 +7533,27 @@ of possible values (typically commands or options).</p></div>
exactly one element, the matched element is returned. If not, the
result depends on the <tt>-error</tt> option.
</p>
</dd>
<dt class="hdlist1">
<tt>-exact</tt>
</dt>
<dd>
<div class="ulist"><ul>
<li>
<p>
Accept only exact matches.
<tt><strong>-exact</strong></tt> Accept only exact matches.
</p>
</dd>
<dt class="hdlist1">
<tt>-message <em>string</em></tt>
</dt>
<dd>
</li>
<li>
<p>
Use <tt><em>string</em></tt> in the error message at a mismatch. Default is "option".
<tt><strong>-message</strong> <em>string</em></tt> Use <tt><em>string</em></tt> in the error message at a mismatch. Default is "option".
</p>
</dd>
<dt class="hdlist1">
<tt>-error <em>options</em></tt>
</dt>
<dd>
</li>
<li>
<p>
The options are used when no match is found. If <tt><em>options</em></tt> is
empty, no error is generated and an empty string is returned.
Otherwise the options are used as return options when
generating the error message. The default corresponds to
setting <tt>-level 0</tt>.
<tt><strong>-error</strong> <em>options</em></tt> The options are used when no match is found. If <tt><em>options</em></tt> is
empty, no error is generated and an empty string is returned.
Otherwise the options are used as return options when
generating the error message. The default corresponds to
setting <tt>-level 0</tt>.
</p>
</li>
</ul></div>
</dd>
</dl></div>
</div>
@@ -7616,7 +7656,7 @@ the remaining subcommands do nothing.</p></div>
</p>
</dd>
<dt class="hdlist1">
+<strong>namespace parent</strong> ?namespace?
<tt><strong>namespace parent</strong> ?namespace?</tt>
</dt>
<dd>
<p>
@@ -7794,6 +7834,66 @@ tcl_platform(pathSeparator) = :</tt></pre>
<h2 id="_changes_in_previous_releases">CHANGES IN PREVIOUS RELEASES</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_in_v0_70">In v0.70</h3>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
<tt>platform_tcl()</tt> settings are now automatically determined
</p>
</li>
<li>
<p>
Add aio <tt>$handle filename</tt>
</p>
</li>
<li>
<p>
Add <a href="#_info"><strong><tt>info</tt></strong></a> <tt>channels</tt>
</p>
</li>
<li>
<p>
The <em>bio</em> extension is gone. Now <a href="#_aio"><strong><tt>aio</tt></strong></a> supports <em>copyto</em>.
</p>
</li>
<li>
<p>
Add <a href="#_exists"><strong><tt>exists</tt></strong></a> command
</p>
</li>
<li>
<p>
Add the pure-Tcl <em>oo</em> extension
</p>
</li>
<li>
<p>
The <a href="#_exec"><strong><tt>exec</tt></strong></a> command now only uses vfork(), not fork()
</p>
</li>
<li>
<p>
Unit test framework is less verbose and more Tcl-compatible
</p>
</li>
<li>
<p>
Optional UTF-8 support
</p>
</li>
<li>
<p>
Optional built-in regexp engine for better Tcl compatibility and UTF-8 support
</p>
</li>
<li>
<p>
Command line editing in interactive mode, e.g. <em>jimsh</em>
</p>
</li>
</ol></div>
</div>
<div class="sect2">
<h3 id="_in_v0_63">In v0.63</h3>
<div class="olist arabic"><ol class="arabic">
<li>
@@ -8063,7 +8163,7 @@ official policies, either expressed or implied, of the Jim Tcl Project.</tt></pr
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated 2011-12-14 07:33:13 EST
Last updated 2014-01-22 10:17:31 EST
</div>
</div>
</body>

View 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);
});
});

View File

@@ -0,0 +1,23 @@
$(function() {
var signalarray = ['ZERO', 'ONE', 'TWO', 'THREE', 'FOUR',
'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE'];
$('a.chanchange').on('click', function(el) {
el.preventDefault();
var lcn = $(this).attr('chan');
var cmd = '';
for (i = 0; i < lcn.length; i++)
{
if (i > 0)
cmd += '+';
cmd += signalarray[lcn.charAt(i)];
}
if (lcn < 1000)
cmd += '+OK';
$.get('/plugin/ir/send.jim?code=' + cmd);
});
});

View File

@@ -1,142 +0,0 @@
/*
* jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php
*
* Uses the built In easIng capabilities added In jQuery 1.1
* to offer multiple easIng options
*
* Copyright (c) 2007 George Smith
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.extend( jQuery.easing,
{
easeInQuad: function (x, t, b, c, d) {
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d) {
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d) {
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d) {
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d) {
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d) {
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
easeOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
easeInOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d) {
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d) {
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
},
easeInOutBounce: function (x, t, b, c, d) {
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}
});

View File

@@ -0,0 +1 @@
../lib/jquery.plugin/easing/easing.js

View File

@@ -0,0 +1,72 @@
$(function() {
function doschedule(type)
{
$('#epginfo_extra').load('/cgi-bin/epg/schedule.jim?' +
'service=' +
encodeURIComponent($('#dialogue').attr('xs')) +
'&event=' +
encodeURIComponent($('#dialogue').attr('xe')) +
'&type=' + type, function() {
$('#restart_block')
.load('/cgi-bin/restartblock.jim');
});
$(":button:contains('Record')").fadeOut('slow');
$(":button:contains('Reminder')").fadeOut('slow');
}
var $buttons1 = {
"Close" : function() {$(this).dialog('close');}
};
var $buttons2 = $.extend(
{"Record Programme": function() { doschedule(1) }},
{"Set Reminder": function() { doschedule(3) }},
$buttons1);
var $buttons3 = $.extend(
{"Record Series": function() { doschedule(2) }},
$buttons2);
var $dialog = $('#dialogue').dialog({
title: "Programme Details",
modal: false, autoOpen: false,
height: 500, width: 700,
show: 'scale', hide: 'fade',
draggable: true, resizable: true,
buttons: $buttons1,
close: function(e,u) { $('#dialogue').empty().html(
'<img src="/img/loading.gif" alt="loading">'); }
});
function epgpopup(e, o)
{
e.preventDefault();
var sch = o.attr('sch');
var rec = o.attr('rec');
if (sch != 0)
$dialog.dialog("option", "buttons", $buttons1);
else if (rec == 2)
$dialog.dialog("option", "buttons", $buttons3);
else if (rec == 1)
$dialog.dialog("option", "buttons", $buttons2);
else
$dialog.dialog("option", "buttons", $buttons1);
var url = '/cgi-bin/epg/info.jim?service=' +
o.attr('xs') + '&event=' +
o.attr('xe') + '&bare=1';
$('#dialogue')
.html('<img src=/img/loading.gif> Loading details...' +
' Please wait...')
.load(url, function() {
$('#dialogue a.event').click(function(e) {
epgpopup(e, $(this));
});
});
$('#dialogue')
.attr('xs', o.attr('xs'))
.attr('xe', o.attr('xe'));
$dialog.dialog('open');
}
$('a.event').click(function(e) {
e.preventDefault();
epgpopup(e, $(this))
});
});

View File

@@ -1,44 +0,0 @@
jQuery.ajaxPrefilter(function(options, _, jqXHR) {
if (jQuery.isFunction(options.progress))
{
var xhrFactory = options.xhr;
var interval;
options.xhr = function() {
var xhr = xhrFactory.apply(this, arguments);
var partial = "";
var prevcount = 1;
interval = setInterval(function() {
var responseText;
var jQueryPartial;
try {
responseText = xhr.responseText;
if (responseText &&
responseText.length > partial.length)
{
options.progress(
responseText.substring(
partial.length));
partial = responseText;
}
} catch(e) {
if (window.console)
console.log(e);
}
}, options.progressInterval);
return xhr;
};
function stop()
{
if (interval)
clearInterval(interval);
}
jqXHR.then(stop, stop);
}
});

View File

@@ -0,0 +1 @@
../lib/jquery.plugin/iajax/iajax.js

View File

@@ -1,229 +0,0 @@
/*!
// iPhone-style Checkboxes jQuery plugin
// Copyright Thomas Reynolds, licensed GPL & MIT
*/
;(function($, iphoneStyle) {
// Constructor
$[iphoneStyle] = function(elem, options) {
this.$elem = $(elem);
// Import options into instance variables
var obj = this;
$.each(options, function(key, value) {
obj[key] = value;
});
// Initialize the control
this.wrapCheckboxWithDivs();
this.attachEvents();
this.disableTextSelection();
if (this.resizeHandle) { this.optionallyResize('handle'); }
if (this.resizeContainer) { this.optionallyResize('container'); }
this.initialPosition();
};
$.extend($[iphoneStyle].prototype, {
// Wrap the existing input[type=checkbox] with divs for styling and grab DOM references to the created nodes
wrapCheckboxWithDivs: function() {
this.$elem.wrap('<div class="' + this.containerClass + '" />');
this.container = this.$elem.parent();
this.offLabel = $('<label class="'+ this.labelOffClass +'">' +
'<span>'+ this.uncheckedLabel +'</span>' +
'</label>').appendTo(this.container);
this.offSpan = this.offLabel.children('span');
this.onLabel = $('<label class="'+ this.labelOnClass +'">' +
'<span>'+ this.checkedLabel +'</span>' +
'</label>').appendTo(this.container);
this.onSpan = this.onLabel.children('span');
this.handle = $('<div class="' + this.handleClass + '">' +
'<div class="' + this.handleRightClass + '">' +
'<div class="' + this.handleCenterClass + '" />' +
'</div>' +
'</div>').appendTo(this.container);
},
// Disable IE text selection, other browsers are handled in CSS
disableTextSelection: function() {
if (!$.browser.msie) { return; }
// Elements containing text should be unselectable
$.each([this.handle, this.offLabel, this.onLabel, this.container], function() {
$(this).attr("unselectable", "on");
});
},
// Automatically resize the handle or container
optionallyResize: function(mode) {
var onLabelWidth = this.onLabel.width(),
offLabelWidth = this.offLabel.width();
if (mode == 'container') {
var newWidth = (onLabelWidth > offLabelWidth) ? onLabelWidth : offLabelWidth;
newWidth += this.handle.width() + 15;
} else {
var newWidth = (onLabelWidth < offLabelWidth) ? onLabelWidth : offLabelWidth;
}
this[mode].css({ width: newWidth });
},
attachEvents: function() {
var obj = this;
// A mousedown anywhere in the control will start tracking for dragging
this.container
.bind('mousedown touchstart', function(event) {
event.preventDefault();
if (obj.$elem.is(':disabled')) { return; }
var x = event.pageX || event.originalEvent.changedTouches[0].pageX;
$[iphoneStyle].currentlyClicking = obj.handle;
$[iphoneStyle].dragStartPosition = x;
$[iphoneStyle].handleLeftOffset = parseInt(obj.handle.css('left'), 10) || 0;
$[iphoneStyle].dragStartedOn = obj.$elem;
})
// Utilize event bubbling to handle drag on any element beneath the container
.bind('iPhoneDrag', function(event, x) {
event.preventDefault();
if (obj.$elem.is(':disabled')) { return; }
if (obj.$elem != $[iphoneStyle].dragStartedOn) { return; }
var p = (x + $[iphoneStyle].handleLeftOffset - $[iphoneStyle].dragStartPosition) / obj.rightSide;
if (p < 0) { p = 0; }
if (p > 1) { p = 1; }
obj.handle.css({ left: p * obj.rightSide });
obj.onLabel.css({ width: p * obj.rightSide + 4 });
obj.offSpan.css({ marginRight: -p * obj.rightSide });
obj.onSpan.css({ marginLeft: -(1 - p) * obj.rightSide });
})
// Utilize event bubbling to handle drag end on any element beneath the container
.bind('iPhoneDragEnd', function(event, x) {
if (obj.$elem.is(':disabled')) { return; }
var checked;
if ($[iphoneStyle].dragging) {
var p = (x - $[iphoneStyle].dragStartPosition) / obj.rightSide;
checked = (p < 0) ? Math.abs(p) < 0.5 : p >= 0.5;
} else {
checked = !obj.$elem.attr('checked');
}
obj.$elem.attr('checked', checked);
$[iphoneStyle].currentlyClicking = null;
$[iphoneStyle].dragging = null;
obj.$elem.change();
});
// Animate when we get a change event
this.$elem.change(function() {
if (obj.$elem.is(':disabled')) {
obj.container.addClass(obj.disabledClass);
return false;
} else {
obj.container.removeClass(obj.disabledClass);
}
var new_left = obj.$elem.attr('checked') ? obj.rightSide : 0;
obj.handle.animate({ left: new_left }, obj.duration);
obj.onLabel.animate({ width: new_left + 4 }, obj.duration);
obj.offSpan.animate({ marginRight: -new_left }, obj.duration);
obj.onSpan.animate({ marginLeft: new_left - obj.rightSide }, obj.duration);
});
},
// Setup the control's inital position
initialPosition: function() {
this.offLabel.css({ width: this.container.width() - 5 });
var offset = ($.browser.msie && $.browser.version < 7) ? 3 : 6;
this.rightSide = this.container.width() - this.handle.width() - offset;
if (this.$elem.is(':checked')) {
this.handle.css({ left: this.rightSide });
this.onLabel.css({ width: this.rightSide + 4 });
this.offSpan.css({ marginRight: -this.rightSide });
} else {
this.onLabel.css({ width: 0 });
this.onSpan.css({ marginLeft: -this.rightSide });
}
if (this.$elem.is(':disabled')) {
this.container.addClass(this.disabledClass);
}
}
});
// jQuery-specific code
$.fn[iphoneStyle] = function(options) {
var checkboxes = this.filter(':checkbox');
// Fail early if we don't have any checkboxes passed in
if (!checkboxes.length) { return this; }
// Merge options passed in with global defaults
var opt = $.extend({}, $[iphoneStyle].defaults, options);
checkboxes.each(function() {
$(this).data(iphoneStyle, new $[iphoneStyle](this, opt));
});
if (!$[iphoneStyle].initComplete) {
// As the mouse moves on the page, animate if we are in a drag state
$(document)
.bind('mousemove touchmove', function(event) {
if (!$[iphoneStyle].currentlyClicking) { return; }
event.preventDefault();
var x = event.pageX || event.originalEvent.changedTouches[0].pageX;
if (!$[iphoneStyle].dragging &&
(Math.abs($[iphoneStyle].dragStartPosition - x) > opt.dragThreshold)) {
$[iphoneStyle].dragging = true;
}
$(event.target).trigger('iPhoneDrag', [x]);
})
// When the mouse comes up, leave drag state
.bind('mouseup touchend', function(event) {
if (!$[iphoneStyle].currentlyClicking) { return; }
event.preventDefault();
var x = event.pageX || event.originalEvent.changedTouches[0].pageX;
$($[iphoneStyle].currentlyClicking).trigger('iPhoneDragEnd', [x]);
});
$[iphoneStyle].initComplete = true;
}
return this;
}; // End of $.fn[iphoneStyle]
$[iphoneStyle].defaults = {
duration: 200, // Time spent during slide animation
checkedLabel: 'ON', // Text content of "on" state
uncheckedLabel: 'OFF', // Text content of "off" state
resizeHandle: true, // Automatically resize the handle to cover either label
resizeContainer: true, // Automatically resize the widget to contain the labels
disabledClass: 'iPhoneCheckDisabled',
containerClass: 'iPhoneCheckContainer',
labelOnClass: 'iPhoneCheckLabelOn',
labelOffClass: 'iPhoneCheckLabelOff',
handleClass: 'iPhoneCheckHandle',
handleCenterClass: 'iPhoneCheckHandleCenter',
handleRightClass: 'iPhoneCheckHandleRight',
dragThreshold: 5 // Pixels that must be dragged for a click to be ignored
};
})(jQuery, 'iphoneStyle');

View File

@@ -0,0 +1 @@
../lib/jquery.iphone-style-checkboxes/iphone-style-checkboxes.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
var/mongoose/html/js/jquery.js vendored Symbolic link
View File

@@ -0,0 +1 @@
jquery-1.10.2.min.js

Some files were not shown because too many files have changed in this diff Show More