Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiepg: use toplevel service list to switch service #656

Closed
rdamas opened this issue Sep 14, 2017 · 6 comments
Closed

Multiepg: use toplevel service list to switch service #656

rdamas opened this issue Sep 14, 2017 · 6 comments
Assignees

Comments

@rdamas
Copy link
Contributor

rdamas commented Sep 14, 2017

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?

@jbleyel
Copy link
Contributor

jbleyel commented Sep 16, 2017

kein Problem, aber bitte den Link für Zap nicht im HTML code einbauen, sondern unten als jquery, sonst wird die Seite zu groß.

jbleyel added a commit that referenced this issue Sep 16, 2017
@jbleyel
Copy link
Contributor

jbleyel commented Sep 16, 2017

Für mode 1 hab ichs mal eingebaut.

@rdamas
Copy link
Contributor Author

rdamas commented Sep 16, 2017

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>

@jbleyel
Copy link
Contributor

jbleyel commented Sep 16, 2017

Deins sieht besser aus. ;-)

@jbleyel
Copy link
Contributor

jbleyel commented Dec 6, 2021

Hi @rdamas , can we close this issue?

@rdamas
Copy link
Contributor Author

rdamas commented Dec 7, 2021

Yes, of course.

@rdamas rdamas closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants