[mythtv] [PATCH] Mythweb scheduled recordings display bugs

Cedric Tefft cedric at phreaker.net
Sat Aug 28 00:55:14 EDT 2004


This patch fixes two bugs in mythweb.

1)  Under certain conditions, deselecting certain display attributes can 
result in the wrong date header being displayed in some list separators 
(mentioned here: 
http://www.gossamer-threads.com/lists/mythtv/users/81338?search_string=mythweb;#81338 
and further documented in bugzilla here: 
http://www.mythtv.org/bugs/show_bug.cgi?id=60)

2) Programs which had been forcably turned "off" or "on", contrary to 
how myth would otherwise have scheduled them were sometimes showing up 
as the wrong color/class because they were inheriting their class 
assignment from the previous program rather than being assigned one 
explicitly.  I know this is a bad explanation; the patch itself will 
probably make this clearer.

- Cedric

-------------- next part --------------
Index: scheduled_recordings.php
===================================================================
RCS file: /var/lib/mythcvs/mythweb/themes/Default/scheduled_recordings.php,v
retrieving revision 1.34
diff -u -r1.34 scheduled_recordings.php
--- scheduled_recordings.php	23 Jun 2004 06:27:20 -0000	1.34
+++ scheduled_recordings.php	28 Aug 2004 04:28:23 -0000
@@ -21,14 +21,15 @@
 <!--
     function changevisible() {
         var prev_visible_class = "no_padding";
+        var prev_separator_index = 0;
 
         for (var i=1; i < document.getElementById("listings").rows.length; i++) {
             if (document.getElementById("listings").rows[i].className == "list_separator") {
                 if (prev_visible_class == "list_separator")
-                    document.getElementById("listings").rows[i].style.display = "none";
-                else
-                    document.getElementById("listings").rows[i].style.display = "";
+                    document.getElementById("listings").rows[prev_separator_index].style.display = "none";
+                document.getElementById("listings").rows[i].style.display = "";
                 prev_visible_class = "list_separator";
+                prev_separator_index = i;
             }
             else {
                 if (document.getElementById(document.getElementById("listings").rows[i].className).checked) {
@@ -39,6 +40,8 @@
                     document.getElementById("listings").rows[i].style.display = "none";
             }
         }
+	if(prev_visible_class == "list_separator")
+        	document.getElementById("listings").rows[prev_separator_index].style.display = "none";
     }
 // -->
 </script>
@@ -110,10 +113,12 @@
                 $commands[] = '<a href="scheduled_recordings.php?never_record=yes&'.$urlstr.'">'._LANG_NEVER_RECORD.'</a>';
         }
         elseif ($show->recstatus == 'ForceRecord') {
+            $class = 'scheduled';
             $commands[] = '<a href="scheduled_recordings.php?suppress=yes&'.$urlstr.'">'._LANG_DONT_RECORD.'</a>';
             $commands[] = '<a href="scheduled_recordings.php?default=yes&'.$urlstr.'">'._LANG_DEFAULT.'</a>';
         }
         elseif ($show->recstatus == 'ManualOverride' || $show->recstatus == 'Cancelled') {
+            $class   = 'deactivated';
             $commands[] = '<a href="scheduled_recordings.php?record=yes&'.$urlstr.'">'._LANG_ACTIVATE.'</a>';
             $commands[] = '<a href="scheduled_recordings.php?default=yes&'.$urlstr.'">'._LANG_DEFAULT.'</a>';
         }


More information about the mythtv-dev mailing list