Mercurial > epgrec.yaz
annotate templates/index.html @ 92:e2c37cc736db
merged with upstream
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 02 Mar 2010 23:20:06 +0900 |
parents | cb7da56c4198 |
children | cb04c9ca1cb0 |
rev | line source |
---|---|
1 | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
2 "http://www.w3.org/TR/html4/loose.dtd"> | |
3 | |
4 <html> | |
5 <head> | |
6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
7 <title>{$sitetitle}</title> | |
8 <meta http-equiv="Content-Style-Type" content="text/css"> | |
9 | |
10 {literal} | |
11 | |
12 <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> | |
13 <script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script> | |
14 <link rel="stylesheet" href="start/jquery-ui-1.7.2.custom.css" type="text/css"> | |
15 <script type="text/javascript" src="js/mdabasic.js"></script> | |
16 <script type="text/javascript"> | |
17 function tvtimes_scroll(){ | |
18 var t2max = $('#tvtimes2').position().left; | |
19 var ftmin = $('#float_titles').position().top; | |
20 tvtimes2scrl(); | |
21 $(window).scroll(function () { | |
22 $('#tvtimes').css('left', parseInt($(document ).scrollLeft())); | |
23 var newTop = parseInt($(document ).scrollTop()); | |
24 if(newTop < ftmin) {newTop = ftmin;} | |
25 $('#float_titles').css('top', newTop); | |
26 tvtimes2scrl(); | |
27 $('#float_follows').css('left', parseInt($(document ).scrollLeft())); | |
28 }); | |
29 $(window).resize(function () { tvtimes2scrl();}); | |
30 function tvtimes2scrl(){ | |
31 var inwidth = parseInt($('body').innerWidth()); | |
32 // IE6 | |
33 if ($.browser.msie && $.browser.version == 6){ inwidth = document.documentElement.clientWidth;} | |
34 var newLeft = inwidth - parseInt($('#tvtimes2').width()) + parseInt($( document ).scrollLeft()); | |
35 if(newLeft > t2max ) {newLeft = t2max} | |
36 $('#tvtimes2').css('left', newLeft); | |
37 $('#float_follows').width(inwidth); | |
38 } | |
39 } | |
40 function prg_hover(){ | |
41 function aClick(){ | |
42 var TG = $(this).children('.prg_dummy'); | |
43 var startTime = new Date(TG.children('.prg_start').html()); | |
44 var duration = parseInt(TG.children('.prg_duration').html()); | |
45 var endTime = new Date(startTime.getTime() + duration * 1000); | |
46 var prgID = parseInt(TG.children('.prg_id').html()); | |
47 | |
48 var str = '<div class="prg_title">' + TG.children('.prg_title').html() +'</div>' + | |
49 '<div class="prg_rec_cfg ui-corner-all"><div class="prg_channel"><span class=" labelLeft">チャンネル:</span><span class="bold">' + TG.children('.prg_channel').html() + '</span></div>' + | |
50 '<div class="prg_startTime" style="clear: left"><span class=" labelLeft">日時:</span>' + MDA.Days.time4Disp(startTime) + ' ~ ' + MDA.Days.time4DispH(endTime) + '</div>' + | |
51 '<div class="prg_duration" style="clear: left"><span class=" labelLeft">録画時間:</span><span class="bold">' + parseInt(duration / 60) +'</span>分' + ((duration % 60)>0?'<span class="bold">' + parseInt(duration % 60) + '</span>秒':'') + '</div>' + | |
52 '</div>'; | |
53 if ($(this).hasClass('prg_rec')) { | |
54 str += '<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.cancel(' + prgID + ')" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">予約キャンセル</a></div>'; | |
55 } else { | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
56 str += '<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.rec(' + prgID + ')" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">簡易予約</a> <a href="javascript:PRG.customform(' + prgID + ')" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">予約カスタマイズ</a></div>'; |
1 | 57 } |
58 $('#floatBox4Dialog').html(str); | |
59 $('#floatBox4Dialog').dialog('open', 'center'); | |
60 }; | |
61 $('.prg').hover( | |
62 function(){ | |
63 $('#tv_chs .prg_hover').removeClass('prg_hover'); | |
64 if($(this).hasClass('prg_none')) return ; | |
65 $(this).addClass('prg_hover'); | |
66 var TG = $(this).children('.prg_dummy'); | |
67 var startTime = new Date(TG.children('.prg_start').html()); | |
68 var duration = parseInt(TG.children('.prg_duration').html()); | |
69 var endTime = new Date(startTime.getTime() + duration * 1000); | |
70 var str = '<div class="prg_title">' + TG.children('.prg_title').html() + '</div>' + | |
71 '<div class="prg_desc"><span class="prg_sub">' + TG.children('.prg_channel').html() + ':' + MDA.Days.time4Disp(startTime) + '~' + MDA.Days.time4DispH(endTime) + ' </span>' + TG.children('.prg_desc').html() + '</div>'; | |
72 $('#prg_info').html('<div class="prg_dummy">' + str + '</div>').show(); | |
73 $(this).click(aClick); | |
74 }, | |
75 function(){ | |
76 $(this).removeClass('prg_hover');$('#prg_info').hide(); | |
77 $(this).unbind('click',aClick); | |
78 } | |
79 ); | |
80 } | |
81 var PRG = { | |
77 | 82 chdialog:function(disc){ |
83 $('#channelDialog').dialog('close'); | |
84 $.get('channelInfo.php', { channel_disc: disc },function(data) { | |
85 if(data.match(/^error/i)){ | |
86 alert(data); | |
87 } | |
88 else { | |
89 var str = data; | |
90 str += '<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.chupdate()" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">更新</a></div>'; | |
91 $('#channelDialog').html(str); | |
92 $('#channelDialog').dialog('open', 'center'); | |
93 | |
94 } | |
95 }); | |
96 | |
97 }, | |
98 chupdate:function() { | |
99 var v_sid = $('#id_sid').val(); | |
100 var v_channel_disc = $('#id_disc').val(); | |
101 $.post('channelSetSID.php', { channel_disc: v_channel_disc, | |
102 sid: v_sid }, function(data) { | |
103 | |
104 $('#channelDialog').dialog('close'); | |
105 }); | |
106 }, | |
1 | 107 rec:function(id){ |
108 $.get(INISet.prgRecordURL, { program_id: id } ,function(data){ | |
109 if(data.match(/^error/i)){ | |
110 alert(data); | |
18
19cd7816b2c1
change: draw main program table too fast.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
111 $('#floatBox4Dialog').dialog('close'); |
1 | 112 }else{ |
113 $('#prgID_' + id).addClass('prg_rec'); | |
114 $('#floatBox4Dialog').dialog('close'); | |
115 } | |
116 }); | |
117 }, | |
118 cancel:function(id){ | |
119 $.get(INISet.prgCancelURL, { program_id: id } ,function(data){ | |
120 if(data.match(/^error/i)){ | |
121 alert(data); | |
18
19cd7816b2c1
change: draw main program table too fast.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
122 $('#floatBox4Dialog').dialog('close'); |
1 | 123 }else{ |
124 $('#prgID_' + id).removeClass('prg_rec'); | |
125 $('#floatBox4Dialog').dialog('close'); | |
126 } | |
127 }); | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
128 }, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
129 customform:function(id) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
130 $('#floatBox4Dialog').dialog('close'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
131 $.get('reservationform.php', { program_id: id }, function(data) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
132 if(data.match(/^error/i)){ |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
133 alert(data); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
134 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
135 else { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
136 var str = data; |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
137 str += '<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.customrec()" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">予約する</a></div>'; |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
138 $('#floatBox4Dialog').html(str); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
139 $('#floatBox4Dialog').dialog('open', 'center'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
140 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
141 }); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
142 }, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
143 customrec:function() { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
144 var id_syear = $('#id_syear').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
145 var id_smonth = $('#id_smonth').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
146 var id_sday = $('#id_sday').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
147 var id_shour = $('#id_shour').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
148 var id_smin = $('#id_smin').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
149 var id_eyear = $('#id_eyear').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
150 var id_emonth = $('#id_emonth').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
151 var id_eday = $('#id_eday').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
152 var id_ehour = $('#id_ehour').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
153 var id_emin = $('#id_emin').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
154 var id_channel_id = $('#id_channel_id').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
155 var id_record_mode = $('#id_record_mode').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
156 var id_title = $('#id_title').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
157 var id_description = $('#id_description').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
158 var id_category_id = $('#id_category_id ').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
159 var id_program_id = $('#id_program_id').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
160 var with_program_id = $('#id_program_id').attr('checked'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
161 |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
162 if( ! with_program_id ) id_program_id = 0; |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
163 |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
164 $.post('customReservation.php', { syear: id_syear, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
165 smonth: id_smonth, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
166 sday: id_sday, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
167 shour: id_shour, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
168 smin: id_smin, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
169 eyear: id_eyear, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
170 emonth: id_emonth, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
171 eday: id_eday, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
172 ehour: id_ehour, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
173 emin: id_emin, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
174 channel_id: id_channel_id, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
175 record_mode: id_record_mode, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
176 title: id_title, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
177 description: id_description, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
178 category_id: id_category_id, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
179 program_id: id_program_id }, function(data) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
180 if(data.match(/^error/i)){ |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
181 $('#floatBox4Dialog').dialog('close'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
182 alert(data); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
183 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
184 else { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
185 var id = parseInt(data); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
186 if( id ) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
187 $('#prgID_' + id).addClass('prg_rec'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
188 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
189 $('#floatBox4Dialog').dialog('close'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
190 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
191 }); |
1 | 192 } |
193 } | |
194 var CTG = { | |
195 CN:'ctg', | |
196 CV:'0.1', | |
197 defaultCk:[], | |
198 INI:function(){ | |
199 var Ck = this.CkGet()[1]; | |
200 if(Ck){ $.each(Ck.split(','), function(){CTG.select(this);})} | |
201 }, | |
202 select:function(ctg){ | |
203 if($('#category_select .ctg-hide.ctg_'+ctg).length){ | |
204 $('#tv_chs .ctg_'+ctg).removeClass('ctg-hide'); | |
205 $('#category_select a.ctg_'+ctg).removeClass('ctg-hide'); | |
206 } else { | |
207 $('#tv_chs .ctg_'+ctg).addClass('ctg-hide'); | |
208 $('#category_select a.ctg_'+ctg).addClass('ctg-hide'); | |
209 } | |
210 this.oCk(); | |
211 }, | |
212 toggle:function (){$('#category_select ul').toggle();}, | |
213 oCk:function(){ | |
214 var T=$('#category_select ul li a.ctg-hide'); | |
215 var X=[]; | |
216 $.each(T.get(), function(){ | |
217 $(this).attr('class').match(/ctg_([^ ]+)/); | |
218 var TMC=RegExp.$1; | |
219 X.push(TMC); | |
220 }); | |
221 this.CkSet([X.join(',')]); | |
222 }, | |
223 CkGet:function (){ | |
224 var Ck = MDA.Cookie.get(this.CN); | |
225 if(!Ck){return this.defaultCk}; | |
226 Ck=Ck.replace(/^([^;]+;)/,''); | |
227 return Ck.split('+'); | |
228 }, | |
229 CkSet:function(V){ | |
230 MDA.Cookie.set(this.CN,'ver='+this.CV+'+'+V.join('+')); | |
231 } | |
232 }; | |
233 var nowBar = { | |
234 defaultID:'tableNowBas', | |
235 startTime:null, | |
236 endTime:null, | |
237 INI:function(){ | |
238 if (INISet.tableStartTime && INISet.tableStartTime && INISet.dotMin) { | |
239 $('#tvtable').append('<div id="' + this.defaultID + '" style="display:none">now</div>'); | |
240 this.startTime = new Date(INISet.tableStartTime); | |
241 this.endTime = new Date(INISet.tableEndTime); | |
242 $('#' + this.defaultID).width($('#float_titles').width()); | |
243 this.ch(); | |
244 } | |
245 }, | |
246 ch:function(){ | |
247 var now = new Date(); | |
248 if(this.startTime){ | |
249 if((now >= this.startTime) && (this.endTime >= now)){ | |
250 // console.log((now - this.startTime) / 60000); | |
251 $('#' + this.defaultID).css({top:(now - this.startTime) / 60000 * INISet.dotMin}).show() | |
252 } else { | |
253 $('#' + this.defaultID).hide() | |
254 } | |
255 } | |
256 } | |
257 } | |
258 | |
259 MDA.SCR = { | |
260 CN:'scr', | |
261 CV:'0.1', | |
262 defaultCk:{md:'',x:0,y:0}, | |
263 jqSel:[{sel:'#jump-time a.jump',md:'x'},{sel:'#jump-day a.jump',md:'xy'},{sel:'#jump-day a.jump-today',md:'x'},{sel:'#jump-broadcast a.jump',md:'y'}], | |
264 INI:function(){ | |
265 // this.defaultCk.y = $('#float_titles').position().top; | |
266 $.each(this.jqSel, function(){ | |
267 var md = this.md; | |
268 $(this.sel).click(function(){MDA.SCR.oCk(md)}) | |
269 }); | |
270 var Ck = this.CkGet(); | |
271 // console.log(Ck); | |
272 var x = (Ck.md.indexOf('x')>-1)?Ck.x:this.defaultCk.x; | |
273 var y = (Ck.md.indexOf('y')>-1)?Ck.y:this.defaultCk.y; | |
274 if (Ck.md) { | |
275 window.scrollBy(x, y); | |
276 } | |
277 this.CkClear(); | |
278 }, | |
279 channel:{ | |
280 save:function(){}, | |
281 load:function(){} | |
282 }, | |
283 time: { | |
284 }, | |
285 oCk:function(xy){ | |
286 this.CkSet(['md=' + ((!xy)?'xy':xy), | |
287 'x=' + $(document ).scrollLeft(), | |
288 'y=' + $(document ).scrollTop()]); | |
289 }, | |
290 CkGet:function (){ | |
291 var Ck = MDA.Cookie.get(this.CN); | |
292 if(!Ck){return this.defaultCk}; | |
293 Ck=Ck.replace(/^([^;]+;)/,'').split('+'); | |
294 var ret = {}; | |
295 $.each(Ck, function(){ | |
296 var str = this.split('=', 2); | |
297 ret[str[0]] = str[1]; | |
298 }) | |
299 return ret; | |
300 }, | |
301 CkSet:function(V){ | |
302 MDA.Cookie.set(this.CN,'ver='+this.CV+'+'+V.join('+')); | |
303 }, | |
304 CkClear:function(){ | |
305 MDA.Cookie.del(this.CN); | |
306 } | |
307 }; | |
308 | |
309 $(document).ready(function () { | |
310 MDA.Cookie.CookieName = 'tvProgmas_'; | |
311 CTG.toggle(); | |
312 tvtimes_scroll(); | |
313 prg_hover(); | |
314 var DG = $('#floatBox4Dialog'); | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
315 DG.dialog({title:'録画予約',width:600}); |
1 | 316 DG.dialog('close'); |
77 | 317 |
318 var DG2 = $('#channelDialog'); | |
319 DG2.dialog({title:'チャンネル情報',width:600}); | |
320 DG2.dialog('close'); | |
321 | |
1 | 322 nowBar.INI(); |
323 CTG.INI(); | |
324 MDA.SCR.INI(); // 番組表の位置保存 | |
325 }); | |
326 | |
327 | |
328 </script> | |
329 | |
330 <style type="text/css"> | |
331 <!-- | |
332 body {padding:0;margin:0;font-size:10pt;} | |
333 a {text-decoration:none;} | |
334 | |
335 .bold {font-weight:bold;} | |
336 .small {font-size:75%;} | |
337 | |
338 h2 {padding: 4px} | |
339 | |
340 #float_titles {position:absolute;background-image: url(imgs/trancBG50.png);} | |
341 | |
342 #float_titles div.set.ctg_sel {background-color:#BBB;color:#3CF} | |
343 #float_titles .ctg_sel a{color:#111;} | |
344 | |
345 #float_titles div.set {float:left;background-color:#444;padding:4px;margin:4px;} | |
346 #float_titles span.title {float:left;color:#ACF;} | |
347 #float_titles ul {float:left;padding:0;margin:0;} | |
348 #float_titles ul li {float:left;list-style:none;margin:0 0 0 4px;} | |
349 #float_titles li a{padding:1px 4px;background-color:#555;color:#FFF;} | |
350 #float_titles li.selected a{background-color:#48B;} | |
351 #float_titles li a:hover{background-color:#28D;} | |
352 | |
353 #float_titles, #tvtable {} | |
354 #tvtable {line-height:1.2em;width:100%;position:relative;} | |
355 #tvtimes,#tvtimes2 {position:absolute; background-image: url(imgs/trancBG70.png);} | |
356 #tvtimes,#tvtimes2, .tvtimeDM {width:40px;} | |
357 #tv_chs {padding-left:40px;padding-right:40px;} | |
358 .tvtime { | |
34 | 359 height:{/literal}{$height_per_hour}{literal}px; |
1 | 360 color:#EEE; |
361 text-align:center; | |
362 font-weight:bold; | |
363 font-size:120%; | |
364 background-image: url(imgs/dot2.gif); | |
365 background-repeat: repeat-x; | |
366 background-position: left bottom; | |
367 } | |
368 #tvtable div.tvtimetop {padding:8px 0px;} | |
34 | 369 |
370 #tvtable div.ch_set {width:{/literal}{$ch_set_width}{literal}px;float:left;background-color:#BBB;} | |
371 | |
372 | |
1 | 373 #tvtable div.ch_title, #tvtable div.prg {margin-right:2px;} |
374 #tvtable div.ch_title {padding:8px 0px;background-color:#333;color:#DDD;font-weight:bold;text-align:center} | |
375 #tvtable div.prg { | |
376 overflow:hidden; | |
377 color:#444; | |
378 background-image: url(imgs/dot2.gif); | |
379 background-image: url(imgs/prg_bg2.png); | |
380 background-repeat: repeat-x; | |
381 background-position: left bottom; | |
382 -moz-border-radius: 0.6em 0.6em 0.3em 0.3em; | |
383 -webkit-border-radius: 0.6em; | |
384 -webkit-border-bottom-right-radius: 0.3em; | |
385 -webkit-border-bottom-left-radius: 0.3em; | |
386 } | |
387 #tvtable div.prg_none {background-color:#eee;} | |
388 #tvtable div.prg_dummy {margin:3px 6px;} | |
389 #tvtable div.prg_title {color:#111;font-weight:bold;} | |
390 #tvtable div.prg_subtitle {font-size:80%;} | |
391 #tvtable div.prg_desc {font-size:80%;} | |
392 | |
393 #tvtable div.prg_start,#tvtable div.prg_duration,#tvtable div.prg_channel ,#tvtable div.prg_id {display: none;} | |
394 | |
395 #tvtable div.ctg_news, #category_select a.ctg_news {background-color: #FFFFD8;} | |
396 #tvtable div.ctg_etc, #category_select a.ctg_etc {background-color: #FFFFFF;} | |
397 #tvtable div.ctg_information, #category_select a.ctg_information {background-color: #F2D8FF;} | |
398 #tvtable div.ctg_sports, #category_select a.ctg_sports {background-color: #D8FFFF;} | |
399 #tvtable div.ctg_cinema, #category_select a.ctg_cinema {background-color: #FFD8D8;} | |
400 #tvtable div.ctg_music, #category_select a.ctg_music {background-color: #D8D8FF;} | |
401 #tvtable div.ctg_drama, #category_select a.ctg_drama {background-color: #D8FFD8;} | |
402 #tvtable div.ctg_anime, #category_select a.ctg_anime {background-color: #FFE4C8;} | |
403 #tvtable div.ctg_variety, #category_select a.ctg_variety {background-color: #FFD2EB;} | |
404 #tvtable div.ctg_10, #category_select a.ctg_10 {background-color: #E4F4F4;} | |
405 #tvtable div.ctg-hide, #category_select a.ctg-hide {background-color: #F8F8F8;color:#888;} | |
406 #tvtable div.ctg-hide .prg_title, #category_select a.ctg-hide .prg_title{color:#666;} | |
407 #tvtable div.prg_rec {background-color: #F55;color:#FEE} | |
408 #tvtable div.prg_rec .prg_title,#tvtable div.prg_hover .prg_title {color:white;} | |
409 #tvtable div.prg_hover {background-color: #28D;color:#EFF} | |
410 | |
411 #float_titles { z-index:100} | |
34 | 412 #float_titles div.ch_title {width:{/literal}{$ch_set_width}{literal}px;float:left;color:#FFF;font-weight:bold;text-align:center} |
1 | 413 #float_titles div.ch_title div{padding:8px 0px;margin:0 6px 0 4px;background-image: url(imgs/trancBG50.png);} |
414 | |
415 #float_follows {position:absolute;} | |
416 #prg_info { | |
417 display:none; | |
418 position:absolute; | |
419 top:0;left:0; | |
420 width:100%; | |
421 background-color:#246; | |
422 color:#BDF; | |
423 height:80px; | |
424 } | |
425 #prg_info div.prg_dummy{margin:4px 20px;} | |
426 #prg_info div.prg_title {font-weight:bold;font-size:120%;color:#FFF;} | |
427 #prg_info span.prg_sub {color:#FFF;} | |
428 | |
429 #tableNowBas {position:absolute;background:red;width:100%;top:190px;height:2px;overflow:hidden;} | |
430 | |
431 | |
432 #floatBox4Dialog .prg_title{font-size:120%;font-weight:bold;padding:0.4em 0;text-align:center;} | |
433 #floatBox4Dialog .prg_rec_cfg{background:#EEE;padding:1em 2em;margin:0.4em 0;} | |
434 #floatBox4Dialog .labelLeft {width:8em;float:left;text-align:right;} | |
435 #floatBox4Dialog .button {padding:0.4em 1em;} | |
77 | 436 |
437 #channelDialog .prg_title{font-size:120%;font-weight:bold;padding:0.4em 0;text-align:center;} | |
438 #channelDialog .prg_rec_cfg{background:#EEE;padding:1em 2em;margin:0.4em 0;} | |
439 #channelDialog .labelLeft {width:8em;float:left;text-align:right;} | |
440 #channelDialog .button {padding:0.4em 1em;} | |
441 | |
1 | 442 --> |
443 </style> | |
444 | |
445 | |
446 {/literal} | |
447 | |
448 | |
449 </head> | |
450 | |
451 <body> | |
452 | |
453 <h2>{$sitetitle}</h2> | |
454 | |
455 | |
456 <div id="float_titles" style="width: {math equation="x + 80" x=$chs_width}px;height:120px;"> | |
457 <div id="float_follows"> | |
458 | |
41 | 459 <div class="set"> |
460 <ul> | |
461 <li><a href="envSetting.php">環境設定</a></li> | |
462 </ul> | |
463 </div> | |
464 | |
1 | 465 <div class="set ctg_sel" id="category_select"> |
466 <span class="title"><a href="javascript:CTG.toggle()">強調表示</a></span> | |
467 | |
468 <ul> | |
469 {foreach from=$cats item=cat} | |
470 <li><a href="javascript:CTG.select('{$cat.name_en}');" class="ctg_{$cat.name_en}">{$cat.name_jp}</a></li> | |
471 {/foreach} | |
472 </ul> | |
473 </div> | |
474 | |
475 <div id="time_selects"> | |
476 <div class="set" id="jump-broadcast" > | |
477 <span class="title">放送波選択</span> | |
478 <ul> | |
479 {foreach from=$types item=type } | |
480 <li {$type.selected}><a class="jump" href="{$type.link}">{$type.name}</a></li> | |
481 {/foreach} | |
482 </ul><br style="clear:left;" /> | |
483 </div> | |
484 | |
485 <div class="set" id="jump-time"> | |
486 <span class="title">時間</span> | |
487 <ul> | |
488 {foreach from=$toptimes item=top} | |
489 <li><a class="jump" href="{$top.link}">{$top.hour}~</a></li> | |
490 {/foreach} | |
491 </ul><br style="clear:left;" /> | |
492 </div> | |
493 <br style="clear:left;" /> | |
494 | |
495 <div class="set"> | |
496 <ul> | |
497 <li><a href="programTable.php">番組検索</a></li> | |
498 <li><a href="reservationTable.php">録画予約一覧</a></li> | |
499 <li><a href="recordedTable.php">録画済一覧</a></li> | |
500 </ul> | |
501 </div> | |
502 | |
503 <div class="set" id="jump-day" > | |
504 <span class="title">日付</span> | |
505 <ul> | |
506 {foreach from=$days item=day} | |
507 <li {$day.selected}><a {if $day.d eq "現在" } class="jump-today" {else} class="jump" {/if} href="{$day.link}">{$day.d}{$day.ofweek}</a></li> | |
508 {/foreach} | |
509 </ul><br style="clear:left;" /> | |
510 </div> | |
511 | |
512 | |
513 </div> | |
514 <br style="clear:left;" /> | |
515 <div id="prg_info"><div class="dummy">test</div></div> | |
516 </div> | |
517 | |
518 <div style="position:absolute;bottom:0;"> | |
519 <div class="tvtimeDM" style="float:left;"> </div> | |
520 {foreach from=$programs item=program } | |
77 | 521 <div class="ch_title" ><div style="cursor: pointer" onClick="javascript:PRG.chdialog('{$program.channel_disc}')" >{$program.station_name}</div></div> |
1 | 522 {/foreach} |
523 </div> | |
524 <br style="clear:left;" /> | |
525 <div id="prg_info"><div class="dummy"> </div></div> | |
526 </div> | |
527 | |
528 <div id="float_titles_dummy" style="width:1410px;height:120px;"> </div> | |
529 | |
530 | |
531 <div id="tvtable"> | |
532 | |
533 <div id="tvtimes"> | |
534 {foreach from=$tvtimes item=time} | |
535 <div class="tvtime">{$time}</div> | |
536 {/foreach} | |
537 </div> | |
538 | |
539 <div id="tv_chs" style="width: {$chs_width}px" > | |
540 {foreach from=$programs item=program } | |
541 <div class="ch_set" style="width: {$ch_set_width}px" > | |
542 <div class="ch_programs"> | |
543 {foreach from=$program.list item=item } | |
544 <div {if $item.id}id="prgID_{$item.id}"{/if} class="prg {if ! $item.id}prg_none {/if} ctg_{$item.category_name}{if $item.rec gt 0 } prg_rec{/if}" style="height:{$item.height}px;"> | |
545 <div class="prg_dummy"> | |
546 <div class="prg_title">{$item.title|escape}</div> | |
547 <div class="prg_subtitle">{$item.starttime}</div> | |
548 <div class="prg_desc">{$item.description|escape}</div> | |
549 <div class="prg_channel">{$item.channel}</div> | |
550 <div class="prg_start">{$item.prg_start}</div> | |
551 <div class="prg_duration">{$item.duration}</div> | |
552 <div class="prg_id">{$item.id}</div> | |
553 </div> | |
554 </div> | |
555 {/foreach} | |
556 </div> | |
557 </div> | |
558 {/foreach} | |
559 </div> | |
560 | |
561 <div id="tvtimes2" style="top : 0px; left: {math equation="x + 40" x=$chs_width}px" > | |
562 {foreach from=$tvtimes item=time} | |
563 <div class="tvtime">{$time}</div> | |
564 {/foreach} | |
565 </div> | |
566 </div> | |
567 | |
568 | |
569 | |
570 <div id="floatBox4Dialog">jQuery UI Dialog</div> | |
77 | 571 <div id="channelDialog">jQuery UI Dialog</div> |
1 | 572 |
573 {literal} | |
574 <script type="text/javascript"> | |
575 var INISet = { | |
576 prgRecordURL : 'simpleReservation.php', // 簡易予約 | |
577 prgRecordPlusURL : 'recordp.php', // 詳細予約 | |
578 prgCancelURL : 'cancelReservation.php', // 予約キャンセル | |
58
80dc62c94185
add: height_per_minite at index.html
Sushi-k <epgrec@park.mda.or.jp>
parents:
41
diff
changeset
|
579 dotMin : {/literal}{$height_per_min}{literal}, |
1 | 580 tableStartTime : {/literal}'{$top_time}', |
581 tableEndTime : '{$last_time}'{literal} | |
582 } | |
583 </script> | |
584 {/literal} | |
585 </body> | |
586 </html> |