Ticket #5197: mythweb-dblclick.txt

File mythweb-dblclick.txt, 1.6 KB (added by anonymous, 16 years ago)
Line 
1diff -r d33b05ae8653 modules/tv/tmpl/default/detail.php
2--- a/modules/tv/tmpl/default/detail.php        Sun Apr 13 10:44:27 2008 +1000
3+++ b/modules/tv/tmpl/default/detail.php        Sun Apr 13 13:10:48 2008 +1000
4@@ -80,6 +80,28 @@
5                                 : '');
6         }
7     }
8+       
9+       function dblclick_schedopt(e) {
10+               var radioButton;
11+               if (e.target)
12+                       radioButton = e.target.previousSibling.previousSibling;
13+               else if (e.srcElement)
14+                       radioButton = e.srcElement.previousSibling.previousSibling;
15+               else
16+                       throw "Can't find event source element";
17+                       
18+               if (radioButton == null || radioButton.tagName != 'INPUT' || radioButton.type != 'radio')
19+                       throw "Couldn't find input radiobutton";
20+                       
21+               radioButton.checked = true;
22+               var hiddenSubmit = document.createElement('input');
23+               hiddenSubmit.type = "hidden";
24+               hiddenSubmit.name = "save";
25+               hiddenSubmit.value = "<?php echo t('Update Recording Settings') ?>";
26+               document.forms["program_detail"].appendChild(hiddenSubmit);
27+               document.forms["program_detail"].submit()
28+       }
29+       
30 
31 // -->
32 </script>
33@@ -415,7 +437,7 @@
34 <?php   if (!$schedule || $schedule->type != rectype_override && $schedule->type != rectype_dontrec) { ?>
35         <div class="x-options">
36             <h3><?php echo t('Schedule Options') ?>:</h3>
37-            <ul>
38+            <ul ondblclick="dblclick_schedopt(event)">
39                 <li><input type="radio" class="radio" name="record" value="0" id="record_never"<?php
40                         if (!$schedule->recordid || $schedule->search) echo ' CHECKED' ?> />
41                     <label for="record_never"><?php