Closed rdamas closed 2 years ago
kein Problem, aber bitte den Link für Zap nicht im HTML code einbauen, sondern unten als jquery, sonst wird die Seite zu groß.
Für mode 1 hab ichs mal eingebaut.
Könnte ein Kopie sein von dem was ich vorbereitet habe :-) Ich habe den zweiten Parameter von zapChannel() noch mit $(this).text() befüllt.
diff --git a/plugin/controllers/views/ajax/multiepg.tmpl b/plugin/controllers/views/ajax/multiepg.tmpl
index e4610c3..ae116b6 100644
--- a/plugin/controllers/views/ajax/multiepg.tmpl
+++ b/plugin/controllers/views/ajax/multiepg.tmpl
@@ -105,7 +105,12 @@
<thead>
<tr>
#for $sname, $eventlist in $events.iteritems()
- <td class="border"><div class="service ui-widget-header"><img src="$(picons[$sname])" /> $sname</div></td>
+ #set $sref = ""
+ #set $ev = $eventlist[0]
+ #if len($ev)
+ #set $sref = $ev[0].ref
+ #end if
+ <td class="border"><div class="service ui-widget-header" data-ref="$sref"><img src="$(picons[$sname])" /> $sname</div></td>
#end for
</tr>
</thead>
@@ -127,7 +132,12 @@
<tfoot>
<tr>
#for $sname, $eventlist in $events.iteritems()
- <td class="border"><div class="service ui-widget-header"><img src="$(picons[$sname])" /> $sname</div></td>
+ #set $sref = ""
+ #set $ev = $eventlist[0]
+ #if len($ev)
+ #set $sref = $ev[0].ref
+ #end if
+ <td class="border"><div class="service ui-widget-header" data-ref="$sref"><img src="$(picons[$sname])" /> $sname</div></td>
#end for
</tr>
</tfoot>
@@ -168,10 +178,15 @@
</ol>
#for $sname, $eventlist in $events.iteritems()
+ #set $sref = ""
+ #set $ev = $eventlist[0]
+ #if len($ev)
+ #set $sref = $ev[0].ref
+ #end if
<ol class="channel-listing">
<li>
<span class="ui-widget-header">
- <div>
+ <div class="tl-service" data-ref="$sref">
<h2 class="picon" ><img src="$(picons[$sname])" title="$sname" /></h2>
<span>$sname</span>
</div>
@@ -377,4 +392,12 @@ if(mepgdirect==1) {
});
#end if
+#raw
+$('.service, .tl-service').click(function() {
+ var ref = $(this).data("ref");
+ if (ref != "") {
+ zapChannel(ref, $(this).text());
+ }
+});
+#end raw
</script>
Deins sieht besser aus. ;-)
Hi @rdamas , can we close this issue?
Yes, of course.
Is there anything against using the toplevel (and bottom level) service list elements (the div with class="service") to switch the service? Like in multiepg timer editor?