[mythtv] [PATCH] MythWeb - add filters to Scheduling Recordings page

Eric Stern estern at logisense.com
Thu Oct 30 14:09:11 EST 2003


Just a quick little patch to add filtering to the Scheduled Recordings 
page. Quite handy if you just want to see the conflicts so you can get 
them resolved and go about your business. All the filtering is done 
client-side, you so you don't need a round-trip to the server.

Possible enhancements:
- save the state of the checkboxes (by default they are all on every 
time you load the page)
- possibly "deactivated" and "duplicate" should be off by default

Patch attached. Patch against 0.12.

-------------- next part --------------
--- themes/Default/scheduled_recordings.php.old	2003-10-30 12:04:44.000000000 -0500
+++ themes/Default/scheduled_recordings.php	2003-10-30 12:29:56.000000000 -0500
@@ -17,7 +17,31 @@
 		global $All_Shows;
 ?>
 
-<table width="100%" border="0" cellpadding="4" cellspacing="2" class="list small">
+<script>
+	function changevisible()
+	{
+		for (i=1; i < document.getElementById("listings").rows.length; i++) {
+ 			if (document.getElementById(document.getElementById("listings").rows[i].className).checked) {
+				document.getElementById("listings").rows[i].style.display = "";
+ 			} else {
+				document.getElementById("listings").rows[i].style.display = "none";
+			}
+      	}		
+	}
+</script>
+
+
+<p align=center>
+<table border=0><tr>
+<td>Display:</td>
+<td><input type=checkbox id=scheduled CHECKED onclick="changevisible()"></td><td>Scheduled</td>
+<td><input type=checkbox id=duplicate CHECKED onclick="changevisible()"></td><td>Duplicates</td>
+<td><input type=checkbox id=deactivated CHECKED onclick="changevisible()"></td><td>Deactivated</td>
+<td><input type=checkbox id=conflict CHECKED onclick="changevisible()"></td><td>Conflicts</td>
+</tr></table>
+</p>
+
+<table id=listings width="100%" border="0" cellpadding="4" cellspacing="2" class="list small">
 <tr class="menu">
 	<td><a href="scheduled_recordings.php?sortby=title">show</a></td>
 	<td><a href="scheduled_recordings.php?sortby=channum">station</a></td>
@@ -140,4 +164,4 @@
 
 }
 
-?>
\ No newline at end of file
+?>


More information about the mythtv-dev mailing list