now you can add a timer from the epg and edit it at the same time.
[vuplus_dvbapp-plugin] / webinterface / src / web-data / templates.js
1 // EPG Templates
2 var tplUpdateStreamReaderIE = '<iframe id="UpdateStreamReaderIEFixIFrame" src="%(url_updates)" height="0" width="0" scrolling="none" frameborder="0">no iframe support!</iframe>';
3 var tplEPGListHeader = '<table width="100%" border="0" cellspacing="1" cellpadding="0">';
4
5 var tplEPGListItem  = '<tr style="background-color: #DDDDDD;">';
6         tplEPGListItem += '<td width="10%">%(date)</td>';
7         tplEPGListItem += '<td width="30%">%(servicename)</td>';
8         tplEPGListItem += '<td>%(title)</td>';
9         tplEPGListItem += '</tr>';
10         
11         tplEPGListItem += '<tr style="background-color: #DDDDDD;">';
12         tplEPGListItem += '<td>%(starttime)</td>';
13         tplEPGListItem += '<td>%(duration) min.</td>';
14         tplEPGListItem += '<td>%(description)</td>';
15         tplEPGListItem += '</tr>';
16         
17         tplEPGListItem += '<tr style="background-color: #DDDDDD;">';
18         tplEPGListItem += '<td valign="top">%(endtime)</td>';
19         tplEPGListItem += '<td colspan="2"rowspan="2" id="extdescription%(number)">%(extdescriptionSmall)</td>';
20         tplEPGListItem += '</tr>';
21         
22         tplEPGListItem +='<tr style="background-color: #DDDDDD;"><td>';
23         tplEPGListItem +='<a target="_blank" ><img src="/webdata/gfx/timer.png" title="add to Timers" border="0" onclick="addTimerByID(\'%(servicereference)\',\'%(eventid)\',\'False\');"></a>&nbsp;&nbsp;';
24         tplEPGListItem +='<a target="_blank" ><img src="/webdata/gfx/zap.png" title="add zap to Timers" border="0" onclick="addTimerByID(\'%(servicereference)\',\'%(eventid)\',\'True\');"></a>&nbsp;&nbsp;';
25         tplEPGListItem +='<a target="_blank" ><img src="/webdata/gfx/edit.gif" title="edit and add timer" border="0" onclick="loadTimerFormSeconds(0,\'%(start)\',\'%(end)\',0,\'%(servicereference)\',\'%(title)\',\'%(description)\',\'0\',0);"></a><br/>';
26         tplEPGListItem +='<a target="_blank" href="/web/epgsearch.rss?search=%(title)" ><img src="/webdata/gfx/feed.png" title="RSS-Feed for this Title" border="0"></a><br/>';
27         tplEPGListItem +='<a target="_blank" href="http://www.imdb.com/find?s=all&amp;q=%(titleESC)" ><img src="/webdata/gfx/world.png" title="search IMDb" border="0"></a><br/>';
28         tplEPGListItem +='</td></tr>';
29         
30         tplEPGListItem += '<tr style="background-color: #AAAAAA;">';
31         tplEPGListItem += '<td colspan="3">&nbsp;</td>';
32         tplEPGListItem += '</tr>';
33
34 var tplEPGListItemExtend  = '%(shortTxt) ...<a href="#" onclick="setComplete(\'extdescription%(number)\',\'%(txt)\');">more</a>';
35         
36 var tplEPGListFooter = "</table>";
37         
38 // ServiceList Templates
39 var tplServiceListHeader  = '<table border="0" cellpadding="0" cellspacing="0" class="BodyContentChannellist">\n';
40         tplServiceListHeader += '<thead class="fixedHeader">\n';
41         tplServiceListHeader += '<tr>\n';
42         tplServiceListHeader += '<th><div class="sListHeader" style="color: #FFFFFF;">ServiceList</div>\n';
43         tplServiceListHeader += '<div class="sListSearch">';
44         tplServiceListHeader += '<form onSubmit="loadEPGBySearchString(document.getElementById(\'searchText\').value); return false;">';
45         tplServiceListHeader += '<input type="text" id="searchText" onfocus="this.value=\'\'" value="Search EPG"/>';
46         tplServiceListHeader += '<input style="vertical-align:middle" type="image" src="/webdata/gfx/search.png" alt="search...">';
47         tplServiceListHeader += '</form></div></th>';
48         tplServiceListHeader += '</tr>\n';
49         tplServiceListHeader += '</thead>\n';
50         tplServiceListHeader += '<tbody class="scrollContent">\n';
51         tplServiceListHeader += '<input type="hidden" id="mainServiceRef" name="mainServiceRef" value="%(mainServiceRef)">\n';
52
53 var tplServiceListItem  = '<tr id="%(servicereference)extend">\n';
54         tplServiceListItem += '<td style="border-top: 2px solid #AAA;" ><div class="sListSName"><a id="%(servicereference)" onclick="zap(this.id);" class="sListSLink">%(servicename)</a></div>';
55         tplServiceListItem += '<div class="sListExt"><a onclick="loadEPGByServiceReference(this.id)" id="%(servicereference)"><img src="/webdata/gfx/epg.png" border="0"/></a>\n';
56         tplServiceListItem += '<a target="_blank" href="/web/stream.m3u?ref=%(servicereference)"><img src="/webdata/gfx/screen.png" title="stream Service" border="0"></a></div>\n';
57         tplServiceListItem += '</tr>\n';
58     tplServiceListItem += '<tr>\n';
59         tplServiceListItem += '<td colspan="2"><div id="%(servicereference)EPGNOW"></div></td>\n';
60         tplServiceListItem += '</tr>\n';
61         
62 var tplServiceListFooter = "</tbody></table>\n";
63 //
64
65 var     tplServiceListEPGItem  = '<div class="sListEPGTime">%(starttime)</div>\n';
66         tplServiceListEPGItem += '<div class="sListEPGTitle">%(title)</div>\n';
67         tplServiceListEPGItem += '<div class="sListEPGDuration">%(length) Min.</div>\n';
68
69 // MovieList Templates
70 var tplMovieListHeader  = '<table border="0" cellpadding="0" cellspacing="0" class="BodyContentChannellist">\n';
71         tplMovieListHeader += '<thead class="fixedHeader">\n';
72         tplMovieListHeader += '<tr>\n';
73         tplMovieListHeader += '<th><div class="sListHeader" style="color: #FFFFFF;">MovieList</div>\n';
74         tplMovieListHeader += '<div class="sListSearch">';
75         tplMovieListHeader += '<form onSubmit="loadEPGBySearchString(document.getElementById(\'searchText\').value); return false;">';
76         tplMovieListHeader += '<input type="text" id="searchText" onfocus="this.value=\'\'" value="Search EPG"/>';
77         tplMovieListHeader += '<input style="vertical-align:middle" type="image" src="/webdata/gfx/search.png" alt="search...">';
78         tplMovieListHeader += '</form></div></th>';
79         tplMovieListHeader += '</tr>\n';
80         tplMovieListHeader += '</thead>\n';
81         tplMovieListHeader += '<tbody class="scrollContent">\n';
82
83 var tplMovieListItem  = '<tr>\n';
84         tplMovieListItem += '<td><div class="sListSName" title="%(description), %(descriptionextended)">%(title) (%(servicename))</div>';
85         tplMovieListItem += '<div class="sListExt">\n';
86         tplMovieListItem += '%(tags)\n';
87         tplMovieListItem += '</div>\n';
88         tplMovieListItem += '</tr>\n';
89         
90 var tplMovieListFooter = "</tbody></table>\n";
91
92 // TimerList Templates
93 var tplTimerListHeader  = '<table border="0" cellpadding="0" cellspacing="0" class="BodyContentChannellist">\n';
94         tplTimerListHeader += '<thead class="fixedHeader">\n';
95         tplTimerListHeader += '<tr>\n';
96         tplTimerListHeader += '<th><div class="sListHeader" style="color: #FFFFFF;">TimerList</div>\n';
97         tplTimerListHeader += '<div class="sListSearch">';
98         tplTimerListHeader += '<form onSubmit="loadEPGBySearchString(document.getElementById(\'searchText\').value); return false;">';
99         tplTimerListHeader += '<input type="text" id="searchText" onfocus="this.value=\'\'" value="Search EPG"/>';
100         tplTimerListHeader += '<input style="vertical-align:middle" type="image" src="/webdata/gfx/search.png" alt="search...">';
101         tplTimerListHeader += '</form></div></th>';
102         tplTimerListHeader += '</tr>\n';
103         tplTimerListHeader += '</thead>\n';
104         tplTimerListHeader += '<tbody class="scrollContent">\n';
105         tplTimerListHeader += '<tr><td><font color="#000011"><b>Channel</b></font></td><td><font color="#000011"><b>Name</b></font></td><td><font color="#000011"><b>Description</b></font></td><td><font color="#000011"><b>Repeated</b></font></td><td><font color="#000011"><b>Time running</b></font></td><td><font color="#000011"><b>Start time</b></font></td><td><font color="#000011"><b>End time</b></font></td><td><font color="#000011"><b>After event</b></font></td><td align="center"><font color="#000011"><b>Options</b></font></td></tr>\n';
106
107 var tplTimerListItem  = '';
108     tplTimerListItem += '<tr>\n';
109 /*      tplTimerListItem += '<td><div style="color: #%(color);" class="sListSName" title="%(description), %(descriptionextended)">%(title) (%(servicename))</div>';
110         tplTimerListItem += '<div class="sListExt" style="color: #%(color);">\n';
111         tplTimerListItem += '%(duration)&nbsp;Min\n';
112         tplTimerListItem += '<a target="_blank" ><img src="/webdata/gfx/trash.gif" title="delete timer entry" border="0" onclick="delTimer(\'%(servicereference)\',\'%(begin)\',\'%(end)\');"></a>';
113         tplTimerListItem += '<a target="_blank" ><img src="/webdata/gfx/edit.gif" title="edit timer entry" border="0" onclick="loadTimerFormSeconds(\'%(justplay)\',\'%(begin)\',\'%(end)\',\'%(repeated)\',\'%(servicereference)\',\'%(title)\',\'%(description)\',\'%(afterevent)\',1);"></a><br/>';
114         tplTimerListItem += '</div>\n';
115         tplTimerListItem += '</tr>\n';*/
116         // i'm not getting this div stuff. until Reichi gets it nices done, i will insert this :) :
117         tplTimerListItem += '<td><font color="#%(color)">%(servicename)</font></td>\n';
118         tplTimerListItem += '<td><font color="#%(color)">%(title)</font></td>\n';
119         tplTimerListItem += '<td><font color="#%(color)">%(description)</font></td>\n';
120         tplTimerListItem += '<td><font color="#%(color)">%(repeatedReadable)</font></td>\n';
121         tplTimerListItem += '<td><font color="#%(color)">%(duration)</font></td>\n';
122         tplTimerListItem += '<td><font color="#%(color)">%(beginDate)</font></td>\n';
123         tplTimerListItem += '<td><font color="#%(color)">%(endDate)</font></td>\n';
124         tplTimerListItem += '<td><font color="#%(color)">%(aftereventReadable),%(justplayReadable)</font></td>\n';
125         tplTimerListItem += '<td><a target="_blank" ><img src="/webdata/gfx/trash.gif" title="delete timer entry" border="0" onclick="delTimer(\'%(servicereference)\',\'%(begin)\',\'%(end)\');"></a>\n';
126         tplTimerListItem += '<a target="_blank" ><img src="/webdata/gfx/%(onOff).png" title="toggle On/Off" border="0" onclick="sendToggleTimerDisable(\'%(justplay)\',\'%(begin)\',\'%(end)\',\'%(repeated)\',\'%(servicereference)\',\'%(title)\',\'%(description)\',\'%(afterevent)\',\'%(disabled)\' );"></a>\n';
127         tplTimerListItem += '<a target="_blank" ><img src="/webdata/gfx/edit.gif" title="edit timer entry" border="0" onclick="loadTimerFormSeconds(\'%(justplay)\',\'%(begin)\',\'%(end)\',\'%(repeated)\',\'%(servicereference)\',\'%(title)\',\'%(description)\',\'%(afterevent)\',1);"></a></td>\n';
128         tplTimerListItem += '</tr>\n';
129         
130 var tplTimerListFooter = "</tbody></table>\n";
131
132 // Bouquetlist Template
133 var tplBouquetListHeader = '<table id="BouquetList" width="100%" border="0" cellspacing="1" cellpadding="0" border="0">';
134
135 var tplBouquetListItem  = '<tr>\n';
136         tplBouquetListItem += '<td><div class="navMenuItem" id="%(servicereference)" onclick="loadBouquet(this.id);">%(bouquetname)</div></td>';
137         tplBouquetListItem += '</tr>\n';
138
139 var tplBouquetListFooter = "</table>";
140
141 //Volume Template
142 var tplVolumePanel  = "<img onclick='volumeUp()' src='/webdata/gfx/arrow_up.png'>"; 
143         tplVolumePanel += "<img onclick='volumeDown()' src='/webdata/gfx/arrow_down.png'>"; 
144         tplVolumePanel += "<img id='volume1' onclick='volumeSet(10)' src='/webdata/gfx/led_off.png'>"; 
145         tplVolumePanel += "<img id='volume2' onclick='volumeSet(20)' src='/webdata/gfx/led_off.png'>"; 
146         tplVolumePanel += "<img id='volume3' onclick='volumeSet(30)' src='/webdata/gfx/led_off.png'>"; 
147         tplVolumePanel += "<img id='volume4' onclick='volumeSet(40)' src='/webdata/gfx/led_off.png'>"; 
148         tplVolumePanel += "<img id='volume5' onclick='volumeSet(50)' src='/webdata/gfx/led_off.png'>"; 
149         tplVolumePanel += "<img id='volume6' onclick='volumeSet(60)' src='/webdata/gfx/led_off.png'>"; 
150         tplVolumePanel += "<img id='volume7' onclick='volumeSet(70)' src='/webdata/gfx/led_off.png'>"; 
151         tplVolumePanel += "<img id='volume8' onclick='volumeSet(80)' src='/webdata/gfx/led_off.png'>"; 
152         tplVolumePanel += "<img id='volume9' onclick='volumeSet(90)' src='/webdata/gfx/led_off.png'>"; 
153         tplVolumePanel += "<img id='volume10' onclick='volumeSet(100)' src='/webdata/gfx/led_off.png'>"; 
154         tplVolumePanel += "<img id='speaker' onclick='volumeMute()' src='/webdata/gfx/speak_on.png'>";
155         
156 //Signal Template
157 var tplSignalPanel  = '<table width="100%" id="SignalPanelTable">';
158         tplSignalPanel += '<tr><td style="background-color: #DDDDDD;">SNR</td><td width="50" style="background-color: #DDDDDD;"><div id="SNR">N/A</div></td></tr>';
159         tplSignalPanel += '<tr><td style="background-color: #DDDDDD;">AGC</td><td width="50" style="background-color: #DDDDDD;"><div id="AGC">N/A</div></td></tr>';
160         tplSignalPanel += '<tr><td style="background-color: #DDDDDD;">BER</td><td width="50" style="background-color: #DDDDDD;"><div id="BER">N/A</div></td></tr>';
161         tplSignalPanel += '</table>';
162         
163 var tplSignalPanelButton = '<img src="/webdata/gfx/signal.png" title="show SignalInfoPanel" onclick="openSignalDialog();" title="view Signal Info">';
164
165 // Message send
166 var tplMessageSendForm = ""
167         tplMessageSendForm += '<table id="MessageSendForm" width="100%" border="0" cellspacing="1" cellpadding="0" border="0">';
168         tplMessageSendForm += '<tr><td>Text</td><td><input type="text" id="MessageSendFormText" value=""></td></tr>\n';
169         tplMessageSendForm += '<tr><td>Timeout</td><td><input type="text" id="MessageSendFormTimeout" value=""></td></tr>\n';
170         tplMessageSendForm += '<tr><td>Typ</td><td><select id="MessageSendFormType">';
171         tplMessageSendForm += '<option value="1">Info</option>';
172         tplMessageSendForm += '<option value="0">YesNo</option>';
173         tplMessageSendForm += '<option value="2">Warning</option>';
174         tplMessageSendForm += '<option value="3">Error</option>';
175         tplMessageSendForm += '</select></td></tr>\n';
176         tplMessageSendForm += '<tr><td colspan="2"><button onclick="sendMessage()">send Message</button></td></tr>\n';
177         tplMessageSendForm += "</table></form>\n";
178
179 //var tplPasswordSendForm = ""
180 //      tplPasswordSendForm += '<table id="PasswordSendForm" width="100%" border="0" cellspacing="1" cellpadding="0" border="0">';
181 //      tplPasswordSendForm += '<tr><td>Old password</td><td><input type="password" id="PasswordSendFormOldPassword" value=""></td></tr>\n';
182 //      tplPasswordSendForm += '<tr><td>New password</td><td><input type="password" id="PasswordSendFormNewPassword" value=""></td></tr>\n';
183 //      tplPasswordSendForm += '<tr><td>Repeat new password</td><td><input type="password" id="PasswordSendFormNewPasswordSecond" value=""></td></tr>\n';
184 //      tplPasswordSendForm += '<tr><td colspan="2"><button onclick="sendPasswords()">change password for user dreambox</button></td></tr>\n';
185 //      tplPasswordSendForm += "</table></form>\n";
186 var tplPowerStateSendForm = '';
187     tplPowerStateSendForm += '<p><center><button onclick="sendPowerState(1)">deepstandby Dreambox</button></center></p>';
188     tplPowerStateSendForm += '<p><center><button onclick="sendPowerState(2)">reboot Dreambox</button></center></p>';
189     tplPowerStateSendForm += '<hr>';
190     tplPowerStateSendForm += '<p><center><button onclick="sendPowerState(3)">restart Enigma2</button></center></p>';
191 //Something is not working here, so I will do a quickhack
192 //    tplPowerStateSendForm += '<p><center><button onclick="sendPowerState(4)">standby Enigma2</button></center></p>';
193         tplPowerStateSendForm += '<p><center><button onclick="sendRemoteControlRequest(116)">toggle standby Enigma2</button></center></p>';
194
195 // Template for the RemoteControl Window
196 var tplRemoteControlForm = '';
197         tplRemoteControlForm += '<map name="remotecontrol">';
198         tplRemoteControlForm += '<area shape="circle" coords="129, 54, 10" href="#" onclick="sendRemoteControlRequest(116)" alt="Power">';
199 //      tplRemoteControlForm += '<area shape="circle" coords="72, 95, 15" href="#" alt="Dream message">';
200 //      tplRemoteControlForm += '<area shape="circle" coords="130, 95, 15" href="#" alt="TV Screenshot">';
201         tplRemoteControlForm += '<area shape="circle" coords="63, 123, 10" href="#" onclick="sendRemoteControlRequest(2)" alt="1">';
202         tplRemoteControlForm += '<area shape="circle" coords="109, 123, 10" href="#" onclick="sendRemoteControlRequest(3)" alt="2">';
203         tplRemoteControlForm += '<area shape="circle" coords="153, 123, 10" href="#" onclick="sendRemoteControlRequest(4)" alt="3">';
204         tplRemoteControlForm += '<area shape="circle" coords="63, 148, 10" href="#" onclick="sendRemoteControlRequest(5)" alt="4">';
205         tplRemoteControlForm += '<area shape="circle" coords="109, 148, 10" href="#" onclick="sendRemoteControlRequest(6)" alt="5">';
206         tplRemoteControlForm += '<area shape="circle" coords="153, 148, 10" href="#" onclick="sendRemoteControlRequest(7)" alt="6">';
207         tplRemoteControlForm += '<area shape="circle" coords="63, 173, 10" href="#" onclick="sendRemoteControlRequest(8)" alt="7">';
208         tplRemoteControlForm += '<area shape="circle" coords="109, 173, 10" href="#" onclick="sendRemoteControlRequest(9)" alt="8">';
209         tplRemoteControlForm += '<area shape="circle" coords="153, 173, 10" href="#" onclick="sendRemoteControlRequest(10)" alt="9">';
210         tplRemoteControlForm += '<area shape="circle" coords="63, 197, 10" href="#" onclick="sendRemoteControlRequest(412)" alt="previous">';
211         tplRemoteControlForm += '<area shape="circle" coords="109, 197, 10" href="#" onclick="sendRemoteControlRequest(11)" alt="0">';
212         tplRemoteControlForm += '<area shape="circle" coords="153, 197, 10" href="#" onclick="sendRemoteControlRequest(407)" alt="next">';
213         tplRemoteControlForm += '<area shape="circle" coords="54, 243, 15" href="#" onclick="sendRemoteControlRequest(115)" alt="volume up">';
214         tplRemoteControlForm += '<area shape="circle" coords="107, 233, 10" href="#" onclick="sendRemoteControlRequest(113)" alt="mute">';
215         tplRemoteControlForm += '<area shape="circle" coords="159, 243, 15" href="#" onclick="sendRemoteControlRequest(402)" alt="bouquet up">';
216         tplRemoteControlForm += '<area shape="circle" coords="66, 274, 15" href="#" onclick="sendRemoteControlRequest(114)" alt="volume down">';
217         tplRemoteControlForm += '<area shape="circle" coords="107, 258, 10" href="#" onclick="sendRemoteControlRequest(174)" alt="lame">';
218         tplRemoteControlForm += '<area shape="circle" coords="147, 274, 15" href="#" onclick="sendRemoteControlRequest(403)" alt="bouquet down">';
219         tplRemoteControlForm += '<area shape="circle" coords="48, 306, 10" href="#" onclick="sendRemoteControlRequest(358)" alt="info">';
220         tplRemoteControlForm += '<area shape="circle" coords="106, 310, 15" href="#" onclick="sendRemoteControlRequest(103)" alt="up">';
221         tplRemoteControlForm += '<area shape="circle" coords="167, 306, 10" href="#" onclick="sendRemoteControlRequest(139)" alt="menu">';
222         tplRemoteControlForm += '<area shape="circle" coords="70, 343, 15" href="#" onclick="sendRemoteControlRequest(105)" alt="left">';
223     tplRemoteControlForm += '<area shape="circle" coords="108, 340, 15" href="#" onclick="sendRemoteControlRequest(352)" alt="OK">';
224         tplRemoteControlForm += '<area shape="circle" coords="146, 343, 15" href="#" onclick="sendRemoteControlRequest(106)" alt="right">';
225         tplRemoteControlForm += '<area shape="circle" coords="53, 381, 10" href="#" onclick="sendRemoteControlRequest(392)" alt="audio">';
226         tplRemoteControlForm += '<area shape="circle" coords="106, 374, 15" href="#" onclick="sendRemoteControlRequest(108)" alt="down">';
227         tplRemoteControlForm += '<area shape="circle" coords="162, 381, 10" href="#" onclick="sendRemoteControlRequest(393)" alt="video">';
228         tplRemoteControlForm += '<area shape="circle" coords="56, 421, 10" href="#" onclick="sendRemoteControlRequest(398)" alt="red">';
229         tplRemoteControlForm += '<area shape="circle" coords="90, 422, 10" href="#" onclick="sendRemoteControlRequest(399)" alt="green">';
230         tplRemoteControlForm += '<area shape="circle" coords="123, 422, 10" href="#" onclick="sendRemoteControlRequest(400)" alt="yellow">';
231         tplRemoteControlForm += '<area shape="circle" coords="158, 421, 10" href="#" onclick="sendRemoteControlRequest(401)" alt="blue">';
232         tplRemoteControlForm += '<area shape="circle" coords="61, 460, 10" href="#" onclick="sendRemoteControlRequest(377)" alt="tv">';
233         tplRemoteControlForm += '<area shape="circle" coords="90, 461, 10" href="#" onclick="sendRemoteControlRequest(385)" alt="radio">';
234         tplRemoteControlForm += '<area shape="circle" coords="123, 461, 10" href="#" onclick="sendRemoteControlRequest(388)" alt="text">';
235         tplRemoteControlForm += '<area shape="circle" coords="153, 460, 10" href="#" onclick="sendRemoteControlRequest(138)" alt="help">';
236     tplRemoteControlForm += '</map>';
237         tplRemoteControlForm += '<img src="/webdata/gfx/remotecontrol.jpg" height="607" width="220" border="0)" alt="Remote Control" usemap="#remotecontrol">';
238         
239 var tplAddTimerForm = '';
240         tplAddTimerForm += '<table border=0 cellpadding=0 cellspacing=10>';
241         tplAddTimerForm += '<tr><td colspan="3">Action:</td>';
242         tplAddTimerForm += '<td colspan="3">';
243         tplAddTimerForm += '<select name="justplay" id="justplay" size="1">';
244         tplAddTimerForm += '%(justplay)';
245         tplAddTimerForm += '</select></td></tr>';
246         tplAddTimerForm += '<tr><td colspan="3">&nbsp;</td>';
247         tplAddTimerForm += '<td colspan="3">Note: For recurring events start/end day/month are not required.</td></tr>';
248         tplAddTimerForm += '<tr><td colspan="3">Start:</td>';
249         tplAddTimerForm += '<td colspan="3"><select name="syear" size="1" id="syear" onchange="javascript:addTimerFormChangeTime(\'syear\');">%(syear)</select>.';
250         tplAddTimerForm += '<select name="smonth" id="smonth" size="1" onchange="javascript:addTimerFormChangeTime(\'smonth\');">%(smonth)</select>.';
251         tplAddTimerForm += '<select name="sday" id="sday" size="1" onchange="javascript:addTimerFormChangeTime(\'sday\');">%(sday)</select>';
252         tplAddTimerForm += '&nbsp;-&nbsp;<select name="shour" id="shour" size="1" onchange="javascript:addTimerFormChangeTime(\'shour\');">%(shour)</select>';
253         tplAddTimerForm += ':<select name="smin" id="smin" size="1" onchange="javascript:addTimerFormChangeTime(\'smin\');">%(smin)</select></td></tr>';
254         tplAddTimerForm += '<tr><td colspan="3">End:</td>';
255         tplAddTimerForm += '<td colspan="3"><select name="eyear" id="eyear" size="1" onchange="javascript:addTimerFormChangeTime(\'eyear\');">%(eyear)</select>.';
256         tplAddTimerForm += '<select name="emonth" id="emonth" size="1" onchange="javascript:addTimerFormChangeTime(\'emonth\');">%(emonth)</select>.';
257         tplAddTimerForm += '<select name="eday" id="eday" size="1" onchange="javascript:addTimerFormChangeTime(\'eday\');">%(eday)</select>';
258         tplAddTimerForm += '&nbsp;-&nbsp;<select name="ehour" id="ehour" size="1" onchange="javascript:addTimerFormChangeTime(\'ehour\');">%(ehour)</select>';
259         tplAddTimerForm += ':<select name="emin" id="emin" size="1" onchange="javascript:addTimerFormChangeTime(\'emin\');">%(emin)</select></td></tr>';
260         tplAddTimerForm += '<tr><td colspan="3">&nbsp;</td><td colspan="3">Note: For one-time events the "days" field doesn\'t have to be specified.</td></tr>';
261         tplAddTimerForm += '<tr><td colspan="3">Days:</td><td colspan="3">%(repeated)';
262         tplAddTimerForm += '<tr><td colspan="3">Channel:</td><td>';
263         tplAddTimerForm += '<p><input type="radio" id="tvradio" name="tvradio" value="tv" checked onchange="javascript:addTimerFormChangeType();"">TV</p>';
264         tplAddTimerForm += '<p><input type="radio" name="tvradio" value="radio" onchange="javascript:addTimerFormChangeType();">Radio</p><td>';
265         tplAddTimerForm += '<p>Channel:</p>';
266         tplAddTimerForm += '<select name="channel" id="channel" size="1">%(channel)</select></td></tr>';
267         tplAddTimerForm += '<tr><td colspan="3">Name:</td>';
268         tplAddTimerForm += '<td colspan="3"><input name="name" id="name" type="text" size="100" maxlength="100" style="color: #000000;" value="%(name)"></td></tr>';
269         tplAddTimerForm += '<tr><td colspan="3">Description:</td>';
270         tplAddTimerForm += '<td colspan="3"><input name="descr" id="descr" type="text" size="100" maxlength="100" style="color: #000000;" value="%(description)"></td></tr>';
271         tplAddTimerForm += '<tr><td colspan="3">After event do:</td>';
272         tplAddTimerForm += '<td colspan="3"><select id="after_event" name="after_event" size="1">%(afterEvent)</select></td></tr>';
273         tplAddTimerForm += '<tr>&nbsp;&nbsp;</tr>';
274         tplAddTimerForm += '<tr><td colspan="3">&nbsp;</td><td colspan="3">';
275         tplAddTimerForm += '<input name="deleteOldOnSave" id="deleteOldOnSave" type="hidden" value="%(deleteOldOnSave)">';
276         tplAddTimerForm += '<input name="channelOld" id="channelOld" type="hidden" value="%(channelOld)">';
277         tplAddTimerForm += '<input name="beginOld" id="beginOld" type="hidden" value="%(beginOld)">';
278         tplAddTimerForm += '<input name="endOld" id="endOld" type="hidden" value="%(endOld)">';
279         tplAddTimerForm +=      '<button onclick="sendAddTimer()">Add/Save</button></td></tr></table>';
280
281 var tplAddTimerFormOptions = '';
282         tplAddTimerFormOptions += '<option value="%(value)" %(selected)>%(txt)</option>';
283         
284 var tplAddTimerFormCheckbox = '';
285         tplAddTimerFormCheckbox += '<input type="checkbox" id="%(id)" name="%(name)" value="%(value)" %(checked)>&nbsp;%(txt)&nbsp;&nbsp;';
286
287 //      <input type="checkbox" id="'+ Repeated[String(list[i])] +'" name="'+ Repeated[String(list[i])] +'" value="'+ list[i] +'" checked>&nbsp;'+ txt +'&nbsp;&nbsp;' + html2;