Mercurial > epgrec.yaz
comparison templates/index.html @ 1:f5a9f0eb4858
deleted: LICENSE.ja
author | Sushi-k <epgrec@park.mda.or.jp> |
---|---|
date | Wed, 08 Jul 2009 11:44:50 +0900 |
parents | |
children | 19cd7816b2c1 |
comparison
equal
deleted
inserted
replaced
0:96312e6ab8d4 | 1:f5a9f0eb4858 |
---|---|
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 { | |
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="reservation.php?program_id=' + prgID + '" style="color:red;">予約カスタマイズ</a></div>'; | |
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 = { | |
82 rec:function(id){ | |
83 $.get(INISet.prgRecordURL, { program_id: id } ,function(data){ | |
84 if(data.match(/^error/i)){ | |
85 alert(data); | |
86 }else{ | |
87 $('#prgID_' + id).addClass('prg_rec'); | |
88 $('#floatBox4Dialog').dialog('close'); | |
89 } | |
90 }); | |
91 }, | |
92 cancel:function(id){ | |
93 $.get(INISet.prgCancelURL, { program_id: id } ,function(data){ | |
94 if(data.match(/^error/i)){ | |
95 alert(data); | |
96 }else{ | |
97 $('#prgID_' + id).removeClass('prg_rec'); | |
98 $('#floatBox4Dialog').dialog('close'); | |
99 } | |
100 }); | |
101 } | |
102 } | |
103 var CTG = { | |
104 CN:'ctg', | |
105 CV:'0.1', | |
106 defaultCk:[], | |
107 INI:function(){ | |
108 var Ck = this.CkGet()[1]; | |
109 if(Ck){ $.each(Ck.split(','), function(){CTG.select(this);})} | |
110 }, | |
111 select:function(ctg){ | |
112 if($('#category_select .ctg-hide.ctg_'+ctg).length){ | |
113 $('#tv_chs .ctg_'+ctg).removeClass('ctg-hide'); | |
114 $('#category_select a.ctg_'+ctg).removeClass('ctg-hide'); | |
115 } else { | |
116 $('#tv_chs .ctg_'+ctg).addClass('ctg-hide'); | |
117 $('#category_select a.ctg_'+ctg).addClass('ctg-hide'); | |
118 } | |
119 this.oCk(); | |
120 }, | |
121 toggle:function (){$('#category_select ul').toggle();}, | |
122 oCk:function(){ | |
123 var T=$('#category_select ul li a.ctg-hide'); | |
124 var X=[]; | |
125 $.each(T.get(), function(){ | |
126 $(this).attr('class').match(/ctg_([^ ]+)/); | |
127 var TMC=RegExp.$1; | |
128 X.push(TMC); | |
129 }); | |
130 this.CkSet([X.join(',')]); | |
131 }, | |
132 CkGet:function (){ | |
133 var Ck = MDA.Cookie.get(this.CN); | |
134 if(!Ck){return this.defaultCk}; | |
135 Ck=Ck.replace(/^([^;]+;)/,''); | |
136 return Ck.split('+'); | |
137 }, | |
138 CkSet:function(V){ | |
139 MDA.Cookie.set(this.CN,'ver='+this.CV+'+'+V.join('+')); | |
140 } | |
141 }; | |
142 var nowBar = { | |
143 defaultID:'tableNowBas', | |
144 startTime:null, | |
145 endTime:null, | |
146 INI:function(){ | |
147 if (INISet.tableStartTime && INISet.tableStartTime && INISet.dotMin) { | |
148 $('#tvtable').append('<div id="' + this.defaultID + '" style="display:none">now</div>'); | |
149 this.startTime = new Date(INISet.tableStartTime); | |
150 this.endTime = new Date(INISet.tableEndTime); | |
151 $('#' + this.defaultID).width($('#float_titles').width()); | |
152 this.ch(); | |
153 } | |
154 }, | |
155 ch:function(){ | |
156 var now = new Date(); | |
157 if(this.startTime){ | |
158 if((now >= this.startTime) && (this.endTime >= now)){ | |
159 // console.log((now - this.startTime) / 60000); | |
160 $('#' + this.defaultID).css({top:(now - this.startTime) / 60000 * INISet.dotMin}).show() | |
161 } else { | |
162 $('#' + this.defaultID).hide() | |
163 } | |
164 } | |
165 } | |
166 } | |
167 | |
168 MDA.SCR = { | |
169 CN:'scr', | |
170 CV:'0.1', | |
171 defaultCk:{md:'',x:0,y:0}, | |
172 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'}], | |
173 INI:function(){ | |
174 // this.defaultCk.y = $('#float_titles').position().top; | |
175 $.each(this.jqSel, function(){ | |
176 var md = this.md; | |
177 $(this.sel).click(function(){MDA.SCR.oCk(md)}) | |
178 }); | |
179 var Ck = this.CkGet(); | |
180 // console.log(Ck); | |
181 var x = (Ck.md.indexOf('x')>-1)?Ck.x:this.defaultCk.x; | |
182 var y = (Ck.md.indexOf('y')>-1)?Ck.y:this.defaultCk.y; | |
183 if (Ck.md) { | |
184 window.scrollBy(x, y); | |
185 } | |
186 this.CkClear(); | |
187 }, | |
188 channel:{ | |
189 save:function(){}, | |
190 load:function(){} | |
191 }, | |
192 time: { | |
193 }, | |
194 oCk:function(xy){ | |
195 this.CkSet(['md=' + ((!xy)?'xy':xy), | |
196 'x=' + $(document ).scrollLeft(), | |
197 'y=' + $(document ).scrollTop()]); | |
198 }, | |
199 CkGet:function (){ | |
200 var Ck = MDA.Cookie.get(this.CN); | |
201 if(!Ck){return this.defaultCk}; | |
202 Ck=Ck.replace(/^([^;]+;)/,'').split('+'); | |
203 var ret = {}; | |
204 $.each(Ck, function(){ | |
205 var str = this.split('=', 2); | |
206 ret[str[0]] = str[1]; | |
207 }) | |
208 return ret; | |
209 }, | |
210 CkSet:function(V){ | |
211 MDA.Cookie.set(this.CN,'ver='+this.CV+'+'+V.join('+')); | |
212 }, | |
213 CkClear:function(){ | |
214 MDA.Cookie.del(this.CN); | |
215 } | |
216 }; | |
217 | |
218 $(document).ready(function () { | |
219 MDA.Cookie.CookieName = 'tvProgmas_'; | |
220 CTG.toggle(); | |
221 tvtimes_scroll(); | |
222 prg_hover(); | |
223 var DG = $('#floatBox4Dialog'); | |
224 DG.dialog({title:'録画予約',width:500}); | |
225 DG.dialog('close'); | |
226 nowBar.INI(); | |
227 CTG.INI(); | |
228 MDA.SCR.INI(); // 番組表の位置保存 | |
229 }); | |
230 | |
231 | |
232 </script> | |
233 | |
234 <style type="text/css"> | |
235 <!-- | |
236 body {padding:0;margin:0;font-size:10pt;} | |
237 a {text-decoration:none;} | |
238 | |
239 .bold {font-weight:bold;} | |
240 .small {font-size:75%;} | |
241 | |
242 h2 {padding: 4px} | |
243 | |
244 #float_titles {position:absolute;background-image: url(imgs/trancBG50.png);} | |
245 | |
246 #float_titles div.set.ctg_sel {background-color:#BBB;color:#3CF} | |
247 #float_titles .ctg_sel a{color:#111;} | |
248 | |
249 #float_titles div.set {float:left;background-color:#444;padding:4px;margin:4px;} | |
250 #float_titles span.title {float:left;color:#ACF;} | |
251 #float_titles ul {float:left;padding:0;margin:0;} | |
252 #float_titles ul li {float:left;list-style:none;margin:0 0 0 4px;} | |
253 #float_titles li a{padding:1px 4px;background-color:#555;color:#FFF;} | |
254 #float_titles li.selected a{background-color:#48B;} | |
255 #float_titles li a:hover{background-color:#28D;} | |
256 | |
257 #float_titles, #tvtable {} | |
258 #tvtable {line-height:1.2em;width:100%;position:relative;} | |
259 #tvtimes,#tvtimes2 {position:absolute; background-image: url(imgs/trancBG70.png);} | |
260 #tvtimes,#tvtimes2, .tvtimeDM {width:40px;} | |
261 #tv_chs {padding-left:40px;padding-right:40px;} | |
262 .tvtime { | |
263 height:120px; | |
264 color:#EEE; | |
265 text-align:center; | |
266 font-weight:bold; | |
267 font-size:120%; | |
268 background-image: url(imgs/dot2.gif); | |
269 background-repeat: repeat-x; | |
270 background-position: left bottom; | |
271 } | |
272 #tvtable div.tvtimetop {padding:8px 0px;} | |
273 #tvtable div.ch_set {width:150px;float:left;background-color:#BBB;} | |
274 #tvtable div.ch_title, #tvtable div.prg {margin-right:2px;} | |
275 #tvtable div.ch_title {padding:8px 0px;background-color:#333;color:#DDD;font-weight:bold;text-align:center} | |
276 #tvtable div.prg { | |
277 overflow:hidden; | |
278 color:#444; | |
279 background-image: url(imgs/dot2.gif); | |
280 background-image: url(imgs/prg_bg2.png); | |
281 background-repeat: repeat-x; | |
282 background-position: left bottom; | |
283 -moz-border-radius: 0.6em 0.6em 0.3em 0.3em; | |
284 -webkit-border-radius: 0.6em; | |
285 -webkit-border-bottom-right-radius: 0.3em; | |
286 -webkit-border-bottom-left-radius: 0.3em; | |
287 } | |
288 #tvtable div.prg_none {background-color:#eee;} | |
289 #tvtable div.prg_dummy {margin:3px 6px;} | |
290 #tvtable div.prg_title {color:#111;font-weight:bold;} | |
291 #tvtable div.prg_subtitle {font-size:80%;} | |
292 #tvtable div.prg_desc {font-size:80%;} | |
293 | |
294 #tvtable div.prg_start,#tvtable div.prg_duration,#tvtable div.prg_channel ,#tvtable div.prg_id {display: none;} | |
295 | |
296 #tvtable div.ctg_news, #category_select a.ctg_news {background-color: #FFFFD8;} | |
297 #tvtable div.ctg_etc, #category_select a.ctg_etc {background-color: #FFFFFF;} | |
298 #tvtable div.ctg_information, #category_select a.ctg_information {background-color: #F2D8FF;} | |
299 #tvtable div.ctg_sports, #category_select a.ctg_sports {background-color: #D8FFFF;} | |
300 #tvtable div.ctg_cinema, #category_select a.ctg_cinema {background-color: #FFD8D8;} | |
301 #tvtable div.ctg_music, #category_select a.ctg_music {background-color: #D8D8FF;} | |
302 #tvtable div.ctg_drama, #category_select a.ctg_drama {background-color: #D8FFD8;} | |
303 #tvtable div.ctg_anime, #category_select a.ctg_anime {background-color: #FFE4C8;} | |
304 #tvtable div.ctg_variety, #category_select a.ctg_variety {background-color: #FFD2EB;} | |
305 #tvtable div.ctg_10, #category_select a.ctg_10 {background-color: #E4F4F4;} | |
306 #tvtable div.ctg-hide, #category_select a.ctg-hide {background-color: #F8F8F8;color:#888;} | |
307 #tvtable div.ctg-hide .prg_title, #category_select a.ctg-hide .prg_title{color:#666;} | |
308 #tvtable div.prg_rec {background-color: #F55;color:#FEE} | |
309 #tvtable div.prg_rec .prg_title,#tvtable div.prg_hover .prg_title {color:white;} | |
310 #tvtable div.prg_hover {background-color: #28D;color:#EFF} | |
311 | |
312 #float_titles { z-index:100} | |
313 #float_titles div.ch_title {width:150px;float:left;color:#FFF;font-weight:bold;text-align:center} | |
314 #float_titles div.ch_title div{padding:8px 0px;margin:0 6px 0 4px;background-image: url(imgs/trancBG50.png);} | |
315 | |
316 #float_follows {position:absolute;} | |
317 #prg_info { | |
318 display:none; | |
319 position:absolute; | |
320 top:0;left:0; | |
321 width:100%; | |
322 background-color:#246; | |
323 color:#BDF; | |
324 height:80px; | |
325 } | |
326 #prg_info div.prg_dummy{margin:4px 20px;} | |
327 #prg_info div.prg_title {font-weight:bold;font-size:120%;color:#FFF;} | |
328 #prg_info span.prg_sub {color:#FFF;} | |
329 | |
330 #tableNowBas {position:absolute;background:red;width:100%;top:190px;height:2px;overflow:hidden;} | |
331 | |
332 | |
333 #floatBox4Dialog .prg_title{font-size:120%;font-weight:bold;padding:0.4em 0;text-align:center;} | |
334 #floatBox4Dialog .prg_rec_cfg{background:#EEE;padding:1em 2em;margin:0.4em 0;} | |
335 #floatBox4Dialog .labelLeft {width:8em;float:left;text-align:right;} | |
336 #floatBox4Dialog .button {padding:0.4em 1em;} | |
337 --> | |
338 </style> | |
339 | |
340 | |
341 {/literal} | |
342 | |
343 | |
344 </head> | |
345 | |
346 <body> | |
347 | |
348 <h2>{$sitetitle}</h2> | |
349 | |
350 | |
351 <div id="float_titles" style="width: {math equation="x + 80" x=$chs_width}px;height:120px;"> | |
352 <div id="float_follows"> | |
353 | |
354 <div class="set ctg_sel" id="category_select"> | |
355 <span class="title"><a href="javascript:CTG.toggle()">強調表示</a></span> | |
356 | |
357 <ul> | |
358 {foreach from=$cats item=cat} | |
359 <li><a href="javascript:CTG.select('{$cat.name_en}');" class="ctg_{$cat.name_en}">{$cat.name_jp}</a></li> | |
360 {/foreach} | |
361 </ul> | |
362 </div> | |
363 | |
364 <div id="time_selects"> | |
365 <div class="set" id="jump-broadcast" > | |
366 <span class="title">放送波選択</span> | |
367 <ul> | |
368 {foreach from=$types item=type } | |
369 <li {$type.selected}><a class="jump" href="{$type.link}">{$type.name}</a></li> | |
370 {/foreach} | |
371 </ul><br style="clear:left;" /> | |
372 </div> | |
373 | |
374 <div class="set" id="jump-time"> | |
375 <span class="title">時間</span> | |
376 <ul> | |
377 {foreach from=$toptimes item=top} | |
378 <li><a class="jump" href="{$top.link}">{$top.hour}~</a></li> | |
379 {/foreach} | |
380 </ul><br style="clear:left;" /> | |
381 </div> | |
382 <br style="clear:left;" /> | |
383 | |
384 <div class="set"> | |
385 <ul> | |
386 <li><a href="programTable.php">番組検索</a></li> | |
387 <li><a href="reservationTable.php">録画予約一覧</a></li> | |
388 <li><a href="recordedTable.php">録画済一覧</a></li> | |
389 </ul> | |
390 </div> | |
391 | |
392 <div class="set" id="jump-day" > | |
393 <span class="title">日付</span> | |
394 <ul> | |
395 {foreach from=$days item=day} | |
396 <li {$day.selected}><a {if $day.d eq "現在" } class="jump-today" {else} class="jump" {/if} href="{$day.link}">{$day.d}{$day.ofweek}</a></li> | |
397 {/foreach} | |
398 </ul><br style="clear:left;" /> | |
399 </div> | |
400 | |
401 | |
402 </div> | |
403 <br style="clear:left;" /> | |
404 <div id="prg_info"><div class="dummy">test</div></div> | |
405 </div> | |
406 | |
407 <div style="position:absolute;bottom:0;"> | |
408 <div class="tvtimeDM" style="float:left;"> </div> | |
409 {foreach from=$programs item=program } | |
410 <div class="ch_title"><div>{$program.station_name}</div></div> | |
411 {/foreach} | |
412 </div> | |
413 <br style="clear:left;" /> | |
414 <div id="prg_info"><div class="dummy"> </div></div> | |
415 </div> | |
416 | |
417 <div id="float_titles_dummy" style="width:1410px;height:120px;"> </div> | |
418 | |
419 | |
420 <div id="tvtable"> | |
421 | |
422 <div id="tvtimes"> | |
423 {foreach from=$tvtimes item=time} | |
424 <div class="tvtime">{$time}</div> | |
425 {/foreach} | |
426 </div> | |
427 | |
428 <div id="tv_chs" style="width: {$chs_width}px" > | |
429 {foreach from=$programs item=program } | |
430 <div class="ch_set" style="width: {$ch_set_width}px" > | |
431 <div class="ch_programs"> | |
432 {foreach from=$program.list item=item } | |
433 <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;"> | |
434 <div class="prg_dummy"> | |
435 <div class="prg_title">{$item.title|escape}</div> | |
436 <div class="prg_subtitle">{$item.starttime}</div> | |
437 <div class="prg_desc">{$item.description|escape}</div> | |
438 <div class="prg_channel">{$item.channel}</div> | |
439 <div class="prg_start">{$item.prg_start}</div> | |
440 <div class="prg_duration">{$item.duration}</div> | |
441 <div class="prg_id">{$item.id}</div> | |
442 </div> | |
443 </div> | |
444 {/foreach} | |
445 </div> | |
446 </div> | |
447 {/foreach} | |
448 </div> | |
449 | |
450 <div id="tvtimes2" style="top : 0px; left: {math equation="x + 40" x=$chs_width}px" > | |
451 {foreach from=$tvtimes item=time} | |
452 <div class="tvtime">{$time}</div> | |
453 {/foreach} | |
454 </div> | |
455 </div> | |
456 | |
457 | |
458 | |
459 <div id="floatBox4Dialog">jQuery UI Dialog</div> | |
460 | |
461 {literal} | |
462 <script type="text/javascript"> | |
463 var INISet = { | |
464 prgRecordURL : 'simpleReservation.php', // 簡易予約 | |
465 prgRecordPlusURL : 'recordp.php', // 詳細予約 | |
466 prgCancelURL : 'cancelReservation.php', // 予約キャンセル | |
467 dotMin : 2, | |
468 tableStartTime : {/literal}'{$top_time}', | |
469 tableEndTime : '{$last_time}'{literal} | |
470 } | |
471 </script> | |
472 {/literal} | |
473 </body> | |
474 </html> |