git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1692 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2013-09-18 17:54:33 +00:00
parent 7a767e5443
commit e6366df3c8
7 changed files with 57 additions and 8 deletions

View File

@ -2,7 +2,7 @@
package require cgi
source /mod/webif/lib/setup
require epg.class system.class
require epg.class system.class settings.class
set irinst [system pkginst ir]
@ -16,10 +16,14 @@ set record [lindex [epg fetch dump -service $service -event $event] 0]
$record get_channel_info
set others [$record othertimes]
jqplugin confirmAction
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 "
<script type=text/javascript src=/js/chanchange.js></script>
<table class=keyval>
<tr>
<th>Programme</th>

View File

@ -41,6 +41,7 @@ set notoolbar [$settings notoolbar]
set nomobile [$settings nomobile]
set nohelplinks [$settings nohelplinks]
set nounwatchedcount [$settings nounwatchedcount]
set chanchangenc [$settings chanchangenc]
set xepghours [$settings xepghours]
if {$xepghours == 0} { set xepghours 4 }
set genrededup [$settings genrededup]
@ -85,6 +86,8 @@ 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 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"
@ -174,6 +177,10 @@ 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 "Unwatched count on folders?" "nounwatchedcount" $(!$nounwatchedcount) 1
if {[system pkginst ir]} {
setting_toggle "Disable channel change confirmation?" \
"chanchangenc" $chanchangenc 0
}
puts -nonewline "
<tr>

View File

@ -2,9 +2,9 @@
package require cgi
source /mod/webif/lib/setup
require settings.class
header
jqplugin confirmAction
require epg.class spinner.class altrow epg_search totop system.class
@ -14,7 +14,13 @@ puts {
<link type="text/css" href="/css/xepg.css" rel="Stylesheet" />
<script type=text/javascript src=/js/enadis.js></script>
<script type=text/javascript src=xepg.js></script>
<script type=text/javascript src=/js/chanchange.js></script>
}
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> }
}
[spinner new {

View File

@ -113,6 +113,6 @@ button#later
.jcaquestion
{
margin-left: 0px;
margin-left: 0px !important;
}

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

@ -31,10 +31,14 @@ if {$::qepg} {
}
set got [clock milliseconds]
jqplugin confirmAction
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 {
<script type=text/javascript src=/js/chanchange.js></script>
<small><button id=switch>Switch to grid-style Now/Next</button></small>
<script type=text/javascript>
$('#switch').button().click(function() {

View File

@ -29,6 +29,7 @@ class settings {
xepghours 4
genrededup 0
autolog 0
changechangenc 0
}
settings method hostname {{name ""}} {
@ -170,6 +171,10 @@ settings method nounwatchedcount {{val -1}} {
return [$self _nval_setting nounwatchedcount $val]
}
settings method chanchangenc {{val -1}} {
return [$self _nval_setting chanchangenc $val]
}
settings method sortorder {{val -1}} {
return [$self _nval_setting sortorder $val]
}