Compare commits

..

14 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
112 changed files with 3450 additions and 4494 deletions

View File

@@ -1,9 +1,10 @@
Package: webif
Priority: optional
Section: web
Version: 1.0.8
Version: 1.0.9-6
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.8),mongoose(>=3.0-9),jim(>=0.74-4),jim-oo,jim-sqlite3(>=0.74-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
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,7 +37,7 @@ if [ ! -f /mod/webif/.strip-updated ]; then
fi
/mod/webif/lib/bin/diskattrs
/mod/webif/lib/bin/resetnew
#/mod/webif/lib/bin/resetnew
[ -f $tmpf ] && rm -f $tmpf

View File

@@ -10,7 +10,7 @@ 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

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,6 +36,7 @@ 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]
@@ -83,6 +84,7 @@ _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"
@@ -122,13 +124,11 @@ 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/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>
}
@@ -247,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)>

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

View File

@@ -4,25 +4,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 system.class
set irinst [system pkginst ir]
puts {
<link type="text/css" href="/css/xepg.css" rel="Stylesheet" />
<script type=text/javascript src=/js/enadis.js></script>
<script type=text/javascript src=xepg.js></script>
}
set s [settings]
if {[[settings] chanchangenc]} {
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 {
text "Loading EPG Information..."
size "1.2em"
@@ -40,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 }
@@ -139,7 +143,7 @@ foreach e $records {
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>"

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

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

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

@@ -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]
@@ -249,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 "
@@ -308,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

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

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

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

@@ -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,19 +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 {
<style>
button.half { width: 48%; }
</style>
<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>

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

@@ -4,13 +4,9 @@ package require cgi
source /mod/webif/lib/setup
require system.class pretty_size
header
jqplugin easy-pie-chart
puts {
<link href=style.css rel=stylesheet type=text/css />
<script type=text/javascript src=script.js></script>
}
jscss script.js style.css
header
set dustbin [system dustbin 1]
set root [system mediaroot]

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>

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

File diff suppressed because it is too large Load Diff

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,231 +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() {
return;
// 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;
var offset = 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

View File

@@ -1,60 +0,0 @@
/*
|--------------------------------------------------------------------------
| UItoTop jQuery Plugin 1.1
| http://www.mattvarone.com/web-design/uitotop-jquery-plugin/
|--------------------------------------------------------------------------
*/
(function($){
$.fn.UItoTop = function(options) {
var defaults = {
text: 'To Top',
min: 400,
inDelay:600,
outDelay:300,
containerID: 'toTop',
containerHoverID: 'toTopHover',
scrollSpeed: 1000,
easingType: 'linear'
};
var settings = $.extend(defaults, options);
var containerIDhash = '#' + settings.containerID;
var containerHoverIDHash = '#'+settings.containerHoverID;
$('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>');
$(containerIDhash).hide().click(function(){
$('html, body').animate({scrollTop:0}, settings.scrollSpeed, settings.easingType);
$('#'+settings.containerHoverID, this).stop().animate({'opacity': 0 }, settings.inDelay, settings.easingType);
return false;
})
.prepend('<span id="'+settings.containerHoverID+'"></span>')
.hover(function() {
$(containerHoverIDHash, this).stop().animate({
'opacity': 1
}, 300, 'linear');
}, function() {
$(containerHoverIDHash, this).stop().animate({
'opacity': 0
}, 600, 'linear');
});
$(window).scroll(function() {
var sd = $(window).scrollTop();
if(typeof document.body.style.maxHeight === "undefined") {
$(containerIDhash).css({
'position': 'absolute',
'left': 20,
'top': $(window).scrollTop() + $(window).height() - 50
});
}
if ( sd > settings.min )
$(containerIDhash).fadeIn(settings.inDelay);
else
$(containerIDhash).fadeOut(settings.Outdelay);
});
};
})(jQuery);

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

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

View File

@@ -24,14 +24,24 @@ puts {
<link href="/css/EXTRA.css" rel="Stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/lib/jquery.ui/js/jquery-ui.js"></script>
}
if {[info exists _mws_js]} {
foreach js $::_mws_js {
puts "<script type=text/javascript src=\"$js\"></script>"
}
foreach css $::_mws_css {
puts "<link href=\"$css\" rel=stylesheet type=text/css />"
}
}
puts {
</head>
<body>
}
source /mod/webif/html/lib/topbar.jim
puts "<div id=restart_block>"
puts "<center><div id=restart_block>"
source /mod/webif/include/restart.jim
puts "</div>"
puts "</div></center>"
source /mod/webif/include/diskcheck.jim
source /mod/webif/include/notify.jim

View File

@@ -1,142 +0,0 @@
/*!
* jQuery contextMenu - Plugin for simple contextMenu handling
*
* Version: git-master
*
* Authors: Rodney Rehm, Addy Osmani (patches for FF)
* Web: http://medialize.github.com/jQuery-contextMenu/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
* GPL v3 http://opensource.org/licenses/GPL-3.0
*
*/
.context-menu-list {
margin:0;
padding:0;
min-width: 120px;
max-width: 250px;
display: inline-block;
position: absolute;
list-style-type: none;
border: 1px solid #DDD;
background: #EEE;
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
-ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
-o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}
.context-menu-item {
padding: 2px 2px 2px 24px;
background-color: #EEE;
position: relative;
-webkit-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
user-select: none;
}
.context-menu-separator {
padding-bottom:0;
border-bottom: 1px solid #DDD;
}
.context-menu-item > label > input,
.context-menu-item > label > textarea {
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
.context-menu-item.hover {
cursor: pointer;
background-color: #39F;
}
.context-menu-item.disabled {
color: #666;
}
.context-menu-input.hover,
.context-menu-item.disabled.hover {
cursor: default;
background-color: #EEE;
}
.context-menu-submenu:after {
content: ">";
color: #666;
position: absolute;
top: 0;
right: 3px;
z-index: 1;
}
/* icons
#protip:
In case you want to use sprites for icons (which I would suggest you do) have a look at
http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement
.context-menu-item.icon:before {}
*/
.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }
.context-menu-item.icon-edit { background-image: url(images/page_white_edit.png); }
.context-menu-item.icon-cut { background-image: url(images/cut.png); }
.context-menu-item.icon-copy { background-image: url(images/page_white_copy.png); }
.context-menu-item.icon-paste { background-image: url(images/page_white_paste.png); }
.context-menu-item.icon-delete { background-image: url(images/page_white_delete.png); }
.context-menu-item.icon-add { background-image: url(images/page_white_add.png); }
.context-menu-item.icon-quit { background-image: url(images/door.png); }
/* vertically align inside labels */
.context-menu-input > label > * { vertical-align: top; }
/* position checkboxes and radios as icons */
.context-menu-input > label > input[type="checkbox"],
.context-menu-input > label > input[type="radio"] {
margin-left: -17px;
}
.context-menu-input > label > span {
margin-left: 5px;
}
.context-menu-input > label,
.context-menu-input > label > input[type="text"],
.context-menu-input > label > textarea,
.context-menu-input > label > select {
display: block;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
}
.context-menu-input > label > textarea {
height: 100px;
}
.context-menu-item > .context-menu-list {
display: none;
/* re-positioned by js */
right: -5px;
top: 5px;
}
.context-menu-item.hover > .context-menu-list {
display: block;
}
.context-menu-accesskey {
text-decoration: underline;
}

File diff suppressed because it is too large Load Diff

View File

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 648 B

View File

Before

Width:  |  Height:  |  Size: 412 B

After

Width:  |  Height:  |  Size: 412 B

View File

@@ -0,0 +1,142 @@
/*
* 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,130 @@
/* ------------------------------------------------------------------------
Class: freezeHeader
Use:freeze header row in html table
Example 1: $('#tableid').freezeHeader();
Example 2: $("#tableid").freezeHeader({ 'height': '300px' });
Example 3: $("table").freezeHeader();
Example 4: $(".table2").freezeHeader();
Author: Laerte Mercier Junior
Version: 1.0.5
-------------------------------------------------------------------------*/
(function ($) {
var TABLE_ID = 0;
$.fn.freezeHeader = function (params) {
var copiedHeader = false;
function freezeHeader(elem) {
var idObj = elem.attr('id') || ('tbl-' + (++TABLE_ID));
if (elem.length > 0 && elem[0].tagName.toLowerCase() == "table") {
var obj = {
id: idObj,
grid: elem,
container: null,
header: null,
divScroll: null,
openDivScroll: null,
closeDivScroll: null,
scroller: null
};
if (params && params.height !== undefined) {
obj.divScroll = '<div id="hdScroll' + obj.id + '" style="height: ' + params.height + '; overflow-y: scroll">';
obj.closeDivScroll = '</div>';
}
obj.header = obj.grid.find('thead');
if (params && params.height !== undefined) {
if ($('#hdScroll' + obj.id).length == 0) {
obj.grid.wrapAll(obj.divScroll);
}
}
obj.scroller = params && params.height !== undefined
? $('#hdScroll' + obj.id)
: $(window);
obj.scroller.on('scroll', function () {
if ($('#hd' + obj.id).length == 0) {
obj.grid.before('<div id="hd' + obj.id + '"></div>');
}
obj.container = $('#hd' + obj.id);
if (obj.header.offset() != null) {
if (limiteAlcancado(obj, params)) {
if (!copiedHeader) {
cloneHeaderRow(obj);
copiedHeader = true;
}
}
else {
if (($(document).scrollTop() > obj.header.offset().top)) {
obj.container.css("position", "absolute");
obj.container.css("top", (obj.grid.find("tr:last").offset().top - obj.header.height()) + "px");
}
else {
obj.container.css("visibility", "hidden");
obj.container.css("top", "0px");
obj.container.width(0);
}
copiedHeader = false;
}
}
});
}
}
function limiteAlcancado(obj, params) {
if (params && params.height !== undefined) {
return (obj.header.offset().top <= obj.scroller.offset().top);
}
else {
return ($(document).scrollTop() > obj.header.offset().top && $(document).scrollTop() < (obj.grid.height() - obj.header.height() - obj.grid.find("tr:last").height()) + obj.header.offset().top);
}
}
function cloneHeaderRow(obj) {
obj.container.html('');
obj.container.val('');
var tabela = $('<table style="margin: 0 0;"></table>');
var atributos = obj.grid.prop("attributes");
$.each(atributos, function () {
if (this.name != "id") {
tabela.attr(this.name, this.value);
}
});
tabela.append('<thead>' + obj.header.html() + '</thead>');
obj.container.append(tabela);
obj.container.width(obj.header.width());
obj.container.height(obj.header.height);
obj.container.find('th').each(function (index) {
var cellWidth = obj.grid.find('th').eq(index).width();
$(this).css('width', cellWidth);
});
obj.container.css("visibility", "visible");
if (params && params.height !== undefined) {
obj.container.css("top", obj.scroller.offset().top + "px");
obj.container.css("position", "absolute");
} else {
obj.container.css("top", "0px");
obj.container.css("position", "fixed");
}
}
return this.each(function (i, e) {
freezeHeader($(e));
});
};
})(jQuery);

View File

@@ -0,0 +1,44 @@
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,75 @@
.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,231 @@
/*!
// 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() {
return;
// 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;
var offset = 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,7 @@
/**
* Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
* Licensed under MIT
* @author Ariel Flesler
* @version 1.4.11
*/
;(function(a){if(typeof define==='function'&&define.amd){define(['jquery'],a)}else{a(jQuery)}}(function($){var j=$.scrollTo=function(a,b,c){return $(window).scrollTo(a,b,c)};j.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};j.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(f,g,h){if(typeof g=='object'){h=g;g=0}if(typeof h=='function')h={onAfter:h};if(f=='max')f=9e9;h=$.extend({},j.defaults,h);g=g||h.duration;h.queue=h.queue&&h.axis.length>1;if(h.queue)g/=2;h.offset=both(h.offset);h.over=both(h.over);return this._scrollable().each(function(){if(f==null)return;var d=this,$elem=$(d),targ=f,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}var e=$.isFunction(h.offset)&&h.offset(d,targ)||h.offset;$.each(h.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=j.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(h.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=e[pos]||0;if(h.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*h.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(h.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&h.queue){if(old!=attr[key])animate(h.onAfterFirst);delete attr[key]}});animate(h.onAfter);function animate(a){$elem.animate(attr,g,h.easing,a&&function(){a.call(this,targ,h)})}}).end()};j.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return $.isFunction(a)||typeof a=='object'?a:{top:a,left:a}};return j}));

View File

@@ -0,0 +1,60 @@
/*
|--------------------------------------------------------------------------
| UItoTop jQuery Plugin 1.1
| http://www.mattvarone.com/web-design/uitotop-jquery-plugin/
|--------------------------------------------------------------------------
*/
(function($){
$.fn.UItoTop = function(options) {
var defaults = {
text: 'To Top',
min: 400,
inDelay:600,
outDelay:300,
containerID: 'toTop',
containerHoverID: 'toTopHover',
scrollSpeed: 1000,
easingType: 'linear'
};
var settings = $.extend(defaults, options);
var containerIDhash = '#' + settings.containerID;
var containerHoverIDHash = '#'+settings.containerHoverID;
$('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>');
$(containerIDhash).hide().click(function(){
$('html, body').animate({scrollTop:0}, settings.scrollSpeed, settings.easingType);
$('#'+settings.containerHoverID, this).stop().animate({'opacity': 0 }, settings.inDelay, settings.easingType);
return false;
})
.prepend('<span id="'+settings.containerHoverID+'"></span>')
.hover(function() {
$(containerHoverIDHash, this).stop().animate({
'opacity': 1
}, 300, 'linear');
}, function() {
$(containerHoverIDHash, this).stop().animate({
'opacity': 0
}, 600, 'linear');
});
$(window).scroll(function() {
var sd = $(window).scrollTop();
if(typeof document.body.style.maxHeight === "undefined") {
$(containerIDhash).css({
'position': 'absolute',
'left': 20,
'top': $(window).scrollTop() + $(window).height() - 50
});
}
if ( sd > settings.min )
$(containerIDhash).fadeIn(settings.inDelay);
else
$(containerIDhash).fadeOut(settings.Outdelay);
});
};
})(jQuery);

View File

@@ -0,0 +1,30 @@
#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

@@ -24,14 +24,16 @@ puts {
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/lib/jquery.mobile/jquery.mobile.js">
</script>
<script type="text/javascript" src="/js/enadis.js">
</script>
<script type="text/javascript" src="/m/script.js"></script>
<link rel="apple-touch-icon" href="/img/mobile_57.png" />
<link rel="apple-touch-icon" sizes="57x57" href="/img/mobile_57.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/img/mobile_72.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/img/mobile_114.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/img/mobile_144.png" />
}
noheader
jqplugin enadis
puts {
</head>
}

View File

@@ -1,6 +1,12 @@
<!--#include virtual="/lib/header.shtml" -->
#!/mod/bin/jimsh
<link href=style.css rel=stylesheet type=text/css />
source /mod/webif/lib/setup
jqplugin enadis iajax
jscss script.js style.css
header
puts {
<div class=va style="padding: 0 0 1em 0">
<h1 style="display: inline" class=va>
@@ -35,10 +41,6 @@
</div>
</div>
<script type=text/javascript src=/js/enadis.js></script>
<script type=text/javascript src=/js/iajax.js></script>
<script type=text/javascript src=script.js></script>
<div id=pkgtabs>
<ul>
<li>
@@ -56,5 +58,7 @@
</li>
</ul>
</div>
}
footer
<!--#include virtual="/lib/footer.shtml" -->

View File

@@ -30,11 +30,28 @@ proc pkgrow {pkg} {
puts "<td nowrap>[$pkg get latest]</td>"
}
puts "<td>"
if {[dict exists $::pkgmeta $name]} {
puts "<td>$::pkgmeta($name)</td>"
puts "$::pkgmeta($name)"
} else {
puts "<td>[$pkg get descr]</td>"
puts "[$pkg get descr]"
}
if {$::type eq "upgr"} {
$pkg loadraw
set url [$pkg get url]
set changes [$pkg get changes]
if {$changes ne ""} {
puts "<br>&nbsp;&nbsp;-&nbsp;<i>$changes</i>"
}
if {$url ne ""} {
puts "
<br>
<a class=va href=\"$url\" target=_blank style=\"color: darkblue\">
<img class=va height=18 width=18 src=/img/info.png> $url
</a>"
}
}
puts "</td>"
if {![$pkg is installed]} {
set type Install
@@ -82,7 +99,7 @@ if {[llength $pkgs] > 0} {
pkgrow [pkg load $pkg]
}
puts "</table>"
if {$filter} {
if {$type ne "upgr" && $filter} {
puts "<font class=footnote>This is a filtered package list. To show all packages, enable the <i>Show development and advanced packages</i> in the settings screen.</font>"
}
} else {

View File

@@ -4,6 +4,7 @@ $(document).ready(function() {
var busy = false;
var tswitch = false;
var stick = false;
$('#opkgupdate')
.button()
@@ -94,8 +95,9 @@ $(document).ready(function() {
$('#dresults').text(data);
$('#dspinner').hide('slow');
$('#complete').show('slow');
if (status == 'success')
if (status == 'success' && !stick)
$('#dialogue').dialog('close');
stick = false;
}
else
$('#dresults').append(data);
@@ -151,6 +153,7 @@ $(document).ready(function() {
$('a.depends').click(function(e) {
e.preventDefault();
var pkg = $(this).closest('tr').attr('pkg');
stick = true;
execopkg(encodeURIComponent('whatdepends ' + pkg),
false);
});

View File

@@ -28,11 +28,8 @@ puts "
<span id=duration style=\"display: none\">[$ts duration 1]</span>
"
jscss {vlc.js play.js} vlc.css
puts {
<script language=javascript src=vlc.js></script>
<link rel=stylesheet type=text/css href=vlc.css />
<script type=text/javascript src=play.js></script>
<fieldset class=cleft style="margin: 0 1em 1em 1em">
<legend>VLC Player</legend>
}

View File

@@ -15,6 +15,7 @@ puts {
<li class=delete><a href=#delete>Delete</a></li>
<li class=separator><a href=#ar>Enable AR</a></li>
<li class=separator><a href=#folder>Change Folder</a></li>
<li class=separator><a href=#mkfolder>Create Folder</a></li>
</ul>
<div id=padding style="display: none">

View File

@@ -0,0 +1,32 @@
#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
require rsv.class system.class
httpheader
set slot [cgi_get slot 0]
set table [cgi_get table TBL_RESERVATION]
set event [rsv slot $table $slot]
# Humax TV replaces these characters.
# "%*./:<>?\|
set dir "[system mediaroot]/[\
regsub -all {["%*\./:<>?\\|]} [$event folder] "_"]"
if {[file exists $dir]} {
puts "Folder $dir already exists."
} else {
if {[catch {file mkdir $dir} msg]} {
puts "Failed to create $dir ($msg)"
} else {
puts "Created $dir"
}
}
system restartpending

View File

@@ -4,6 +4,8 @@ package require cgi
source /mod/webif/lib/setup
require altrow rsv.class progressbar epg.class system.class
jqplugin tablesorter contextMenu form freezeheader
jscss script.js
header
set svcmap {}
@@ -17,13 +19,7 @@ set svckeys [array names svcmap]
require epg_popup
puts {
<script type=text/javascript src=/js/jquery.tablesorter.js></script>
<link type=text/css href=/css/tsort.css rel=Stylesheet />
<link href=/css/jquery.contextMenu.css rel=stylesheet type=text/css />
<script type=text/javascript src=/js/jquery.contextMenu.js></script>
<script type=text/javascript src=/js/jquery.form.js></script>
<script type=text/javascript src=script.js></script>
<div id=output class=hidden></div>
<div id=sdialogue></div>
}

View File

@@ -30,7 +30,7 @@ $('table.tablesorter').tablesorter({
6: { sorter: false },
7: { sorter: false }
}
});
}).freezeHeader();
$('table.tablesorter thead th').filter('[class!=header]')
.addClass('headerplain');
@@ -147,6 +147,11 @@ function preparemenu(el, menu)
else
$('#optmenu').disableContextMenuItems('#ar');
if ($(el).attr('reckind') == 4)
$('#optmenu').enableContextMenuItems('#mkfolder');
else
$('#optmenu').disableContextMenuItems('#mkfolder');
if ($(el).attr('table') != 'pending' && $(el).attr('reckind') == 4)
$('#optmenu').enableContextMenuItems('#folder');
else
@@ -158,13 +163,13 @@ function menuclick(action, el, pos)
if (!$(el).is("tr"))
el = $(el).closest('tr');
var sid = $(el).attr('sid');
var table = $(el).attr('table');
//if (window.console)
//console.log("Got %s, el: %o, id: %d", action, el, sid);
switch (action)
{
case 'delete':
var table = $(el).attr('table');
if (confirm('Are you sure you want to delete this entry?'))
$.get('cancel.jim?slot=' + sid +
'&table=' + table,
@@ -192,6 +197,18 @@ function menuclick(action, el, pos)
$('#fchange').dialog('open');
break;
case 'mkfolder':
$('#output')
.empty()
.show('slow')
.load('mkdir.jim?slot=' + sid + '&table=' + table,
function() {
$(output)
.css('font-style', 'italic')
.delay(5000).fadeOut('slow');
});
break;
default:
alert('Unhandled menu event, ' + action);
}

View File

@@ -1,7 +1,7 @@
<!--#include virtual="/lib/header.shtml" -->
<link href=/css/iphone-style-checkboxes.css rel=stylesheet type=text/css />
<script type="text/javascript" src="/js/iphone-style-checkboxes.js"></script>
<script type="text/javascript" src="/js/enadis.js"></script>
<link href=/lib/jquery.plugin/iphone-style-checkboxes/iphone-style-checkboxes.css rel=stylesheet type=text/css />
<script type="text/javascript" src="/lib/jquery.plugin/iphone-style-checkboxes/iphone-style-checkboxes.js"></script>
<script type="text/javascript" src="/lib/jquery.plugin/enadis/enadis.js"></script>
<script type="text/javascript">
$(document).ready(function() {

1
var/mongoose/html/test1 Normal file
View File

@@ -0,0 +1 @@
test

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