diff --git a/var/mongoose/cgi-bin/epg/info.jim b/var/mongoose/cgi-bin/epg/info.jim index b4e4a09..3f0bb65 100755 --- a/var/mongoose/cgi-bin/epg/info.jim +++ b/var/mongoose/cgi-bin/epg/info.jim @@ -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 { } +} else { + jqplugin confirmAction + puts { } +} puts " - diff --git a/var/mongoose/cgi-bin/settings.jim b/var/mongoose/cgi-bin/settings.jim index c7ab6b8..01ad89a 100755 --- a/var/mongoose/cgi-bin/settings.jim +++ b/var/mongoose/cgi-bin/settings.jim @@ -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 " diff --git a/var/mongoose/cgi-bin/xepg.jim b/var/mongoose/cgi-bin/xepg.jim index 9b6f8f0..39b678f 100755 --- a/var/mongoose/cgi-bin/xepg.jim +++ b/var/mongoose/cgi-bin/xepg.jim @@ -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 { - +} + +if {[[settings] chanchangenc]} { + puts { } +} else { + jqplugin confirmAction + puts { } } [spinner new { diff --git a/var/mongoose/html/css/xepg.css b/var/mongoose/html/css/xepg.css index a4ba45d..787b4c7 100644 --- a/var/mongoose/html/css/xepg.css +++ b/var/mongoose/html/css/xepg.css @@ -113,6 +113,6 @@ button#later .jcaquestion { - margin-left: 0px; + margin-left: 0px !important; } diff --git a/var/mongoose/html/js/chanchangenc.js b/var/mongoose/html/js/chanchangenc.js new file mode 100644 index 0000000..cf28ce2 --- /dev/null +++ b/var/mongoose/html/js/chanchangenc.js @@ -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); +}); + +}); + diff --git a/var/mongoose/include/epg.jim b/var/mongoose/include/epg.jim index 55f333c..f864f31 100755 --- a/var/mongoose/include/epg.jim +++ b/var/mongoose/include/epg.jim @@ -31,10 +31,14 @@ if {$::qepg} { } set got [clock milliseconds] -jqplugin confirmAction +if {[[settings] chanchangenc]} { + puts { } +} else { + jqplugin confirmAction + puts { } +} puts { -
Programme