Mercurial > epgrec.yaz
comparison templates/index.html @ 137:a18df712fc7e
merged with upstream
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sun, 21 Mar 2010 03:15:00 +0900 |
parents | 1e93ea03ebd9 |
children |
comparison
equal
deleted
inserted
replaced
119:b172a0b1ea48 | 137:a18df712fc7e |
---|---|
77 $(this).unbind('click',aClick); | 77 $(this).unbind('click',aClick); |
78 } | 78 } |
79 ); | 79 ); |
80 } | 80 } |
81 var PRG = { | 81 var PRG = { |
82 chdialog:function(disc){ | 82 chdialog:function(chash){ |
83 $('#channelDialog').dialog('close'); | 83 $('#channelDialog').dialog('close'); |
84 $.get('channelInfo.php', { channel_disc: disc },function(data) { | 84 var skip = $('#ch_title_'+chash+' .ch_skip').html(); |
85 if(data.match(/^error/i)){ | 85 var st_name = $('#ch_title_'+chash+' .ch_name').html(); |
86 alert(data); | 86 var sid = $('#ch_title_'+chash+' .ch_sid').html(); |
87 } | 87 var disc = $('#ch_title_'+chash+' .ch_disc').html(); |
88 else { | 88 |
89 var str = data; | 89 var str = '<div class="prg_title">'; |
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>'; | 90 str += st_name; |
91 $('#channelDialog').html(str); | 91 str += '</div>'; |
92 $('#channelDialog').dialog('open', 'center'); | 92 str += '<form method="post" action="setChannelInfo.php">'; |
93 | 93 // スキップ |
94 } | 94 str += '<div class="prg_channel"><span class="labelLeft">視聴しない:</span>'; |
95 }); | 95 str += '<span>'; |
96 | 96 if( skip == 1 ) { |
97 str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" checked />'; | |
98 } | |
99 else { | |
100 str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" />'; | |
101 } | |
102 str += '</span></div>'; | |
103 // サービスID | |
104 str += '<div class="prg_channel"><span class="labelLeft">サービスID:</span>'; | |
105 str += '<span><input type="text" name="n_sid" size="20" id="id_sid" value="'; | |
106 str += sid; | |
107 str += '" /></span></div>'; | |
108 | |
109 str += '<input type="hidden" name="n_channel_disc" id="id_disc" value="'; | |
110 str += disc; | |
111 str += '" />'; | |
112 str += '<input type="hidden" name="n_channel_hash" id="id_hash" value="'; | |
113 str += chash; | |
114 str += '" />'; | |
115 | |
116 | |
117 str += '</form>'; | |
118 | |
119 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>'; | |
120 | |
121 $('#channelDialog').html(str); | |
122 $('#channelDialog').dialog('open', 'center'); | |
97 }, | 123 }, |
98 chupdate:function() { | 124 chupdate:function() { |
99 var v_sid = $('#id_sid').val(); | 125 var v_sid = $('#id_sid').val(); |
100 var v_channel_disc = $('#id_disc').val(); | 126 var v_channel_disc = $('#id_disc').val(); |
101 $.post('channelSetSID.php', { channel_disc: v_channel_disc, | 127 var v_hash = $('#id_hash').val(); |
102 sid: v_sid }, function(data) { | 128 var v_skip = $('#id_ch_skip').attr('checked'); |
103 | 129 var n_skip = v_skip ? 1 : 0; |
130 | |
131 $.post('setChannelInfo.php', { channel_disc: v_channel_disc, | |
132 sid: v_sid, | |
133 skip: n_skip | |
134 }, function(data) { | |
135 if(data.match(/^error/i)){ | |
136 alert(data); | |
137 } | |
138 else { | |
139 var old_skip = $('#ch_title_'+v_hash+' .ch_skip').html(); | |
140 if( old_skip != n_skip ) { | |
141 if( v_skip ) { | |
142 (INISet.num_ch)--; | |
143 $('#ch_title_'+v_hash ).addClass('ch_title_skip'); | |
144 $('#tv_chs_'+v_hash ).addClass('ch_set_skip'); | |
145 $('#ch_title_str_'+v_hash ).addClass('ch_skip_color'); | |
146 $('#ch_title_'+v_hash+' .ch_skip').html('1'); | |
147 } | |
148 else { | |
149 (INISet.num_ch)++; | |
150 $('#ch_title_'+v_hash ).removeClass('ch_title_skip'); | |
151 $('#tv_chs_'+v_hash ).removeClass('ch_set_skip'); | |
152 $('#ch_title_str_'+v_hash ).removeClass('ch_skip_color'); | |
153 $('#ch_title_'+v_hash+' .ch_skip').html('0'); | |
154 } | |
155 if( PRG.F_Skip == 1 ) { | |
156 PRG.chSkipHide(); | |
157 } | |
158 else { | |
159 $('#ch_title_bar div.ch_title_skip').show(); | |
160 $('#tv_chs div.ch_set_skip').show(); | |
161 } | |
162 } | |
163 } | |
104 $('#channelDialog').dialog('close'); | 164 $('#channelDialog').dialog('close'); |
105 }); | 165 }); |
106 }, | 166 }, |
107 rec:function(id){ | 167 rec:function(id){ |
108 $.get(INISet.prgRecordURL, { program_id: id } ,function(data){ | 168 $.get(INISet.prgRecordURL, { program_id: id } ,function(data){ |
187 $('#prgID_' + id).addClass('prg_rec'); | 247 $('#prgID_' + id).addClass('prg_rec'); |
188 } | 248 } |
189 $('#floatBox4Dialog').dialog('close'); | 249 $('#floatBox4Dialog').dialog('close'); |
190 } | 250 } |
191 }); | 251 }); |
252 }, | |
253 F_Skip: 1, | |
254 chSkipShow:function() { | |
255 $('#float_titles').width(INISet.num_all_ch * INISet.ch_width + 80); | |
256 $('#tv_chs').width(INISet.num_all_ch * INISet.ch_width ); | |
257 $('#tvtimes2').css( { left: INISet.num_all_ch * INISet.ch_width + 40 } ).show(); | |
258 tvtimes_scroll(); | |
259 $('#ch_title_bar div.ch_title_skip').show(); | |
260 $('#tv_chs div.ch_set_skip').show(); | |
261 nowBar.INI(); | |
262 }, | |
263 chSkipHide:function() { | |
264 $('#ch_title_bar div.ch_title_skip').hide(); | |
265 $('#tv_chs div.ch_set_skip').hide(); | |
266 $('#float_titles').width( INISet.num_ch * INISet.ch_width + 80 ); | |
267 $('#tv_chs').width( INISet.num_ch * INISet.ch_width ); | |
268 $('#tvtimes2').css( { left: INISet.num_ch * INISet.ch_width + 40 }).show(); | |
269 tvtimes_scroll(); | |
270 nowBar.INI(); | |
271 }, | |
272 toggle:function() { | |
273 if( this.F_Skip ) { | |
274 this.chSkipShow(); | |
275 this.F_Skip = 0; | |
276 } | |
277 else { | |
278 this.chSkipHide(); | |
279 this.F_Skip = 1; | |
280 } | |
192 } | 281 } |
193 } | 282 } |
194 var CTG = { | 283 var CTG = { |
195 CN:'ctg', | 284 CN:'ctg', |
196 CV:'0.1', | 285 CV:'0.1', |
314 var DG = $('#floatBox4Dialog'); | 403 var DG = $('#floatBox4Dialog'); |
315 DG.dialog({title:'録画予約',width:600}); | 404 DG.dialog({title:'録画予約',width:600}); |
316 DG.dialog('close'); | 405 DG.dialog('close'); |
317 | 406 |
318 var DG2 = $('#channelDialog'); | 407 var DG2 = $('#channelDialog'); |
319 DG2.dialog({title:'チャンネル情報',width:600}); | 408 DG2.dialog({title:'チャンネル情報',width:480}); |
320 DG2.dialog('close'); | 409 DG2.dialog('close'); |
410 | |
411 // PRG.toggle(); | |
321 | 412 |
322 nowBar.INI(); | 413 nowBar.INI(); |
323 CTG.INI(); | 414 CTG.INI(); |
324 MDA.SCR.INI(); // 番組表の位置保存 | 415 MDA.SCR.INI(); // 番組表の位置保存 |
325 }); | 416 }); |
366 background-position: left bottom; | 457 background-position: left bottom; |
367 } | 458 } |
368 #tvtable div.tvtimetop {padding:8px 0px;} | 459 #tvtable div.tvtimetop {padding:8px 0px;} |
369 | 460 |
370 #tvtable div.ch_set {width:{/literal}{$ch_set_width}{literal}px;float:left;background-color:#BBB;} | 461 #tvtable div.ch_set {width:{/literal}{$ch_set_width}{literal}px;float:left;background-color:#BBB;} |
462 .ch_set_skip { display: none; } | |
371 | 463 |
372 | 464 |
373 #tvtable div.ch_title, #tvtable div.prg {margin-right:2px;} | 465 #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} | 466 #tvtable div.ch_title {padding:8px 0px;background-color:#333;color:#DDD;font-weight:bold;text-align:center} |
467 .ch_title_skip { display: none;} | |
468 .ch_skip_color { color: red;} | |
469 | |
470 .ch_disc {display :none;} | |
471 .ch_skip {display :none;} | |
472 .ch_sid {display :none;} | |
473 .ch_name {display :none;} | |
474 .ch_hash {display :none;} | |
475 | |
375 #tvtable div.prg { | 476 #tvtable div.prg { |
376 overflow:hidden; | 477 overflow:hidden; |
377 color:#444; | 478 color:#444; |
378 background-image: url(imgs/dot2.gif); | 479 background-image: url(imgs/dot2.gif); |
379 background-image: url(imgs/prg_bg2.png); | 480 background-image: url(imgs/prg_bg2.png); |
410 | 511 |
411 #float_titles { z-index:100} | 512 #float_titles { z-index:100} |
412 #float_titles div.ch_title {width:{/literal}{$ch_set_width}{literal}px;float:left;color:#FFF;font-weight:bold;text-align:center} | 513 #float_titles div.ch_title {width:{/literal}{$ch_set_width}{literal}px;float:left;color:#FFF;font-weight:bold;text-align:center} |
413 #float_titles div.ch_title div{padding:8px 0px;margin:0 6px 0 4px;background-image: url(imgs/trancBG50.png);} | 514 #float_titles div.ch_title div{padding:8px 0px;margin:0 6px 0 4px;background-image: url(imgs/trancBG50.png);} |
414 | 515 |
516 | |
415 #float_follows {position:absolute;} | 517 #float_follows {position:absolute;} |
416 #prg_info { | 518 #prg_info { |
417 display:none; | 519 display:none; |
418 position:absolute; | 520 position:absolute; |
419 top:0;left:0; | 521 top:0;left:0; |
451 <body> | 553 <body> |
452 | 554 |
453 <h2>{$sitetitle}</h2> | 555 <h2>{$sitetitle}</h2> |
454 | 556 |
455 | 557 |
456 <div id="float_titles" style="width: {math equation="x + 80" x=$chs_width}px;height:120px;"> | 558 <div id="float_titles" style="width: {math equation="x + 80" x=$chs_width }px;height:120px;"> |
457 <div id="float_follows"> | 559 <div id="float_follows"> |
458 | 560 |
459 <div class="set"> | 561 <div class="set"> |
460 <ul> | 562 <ul> |
461 <li><a href="envSetting.php">環境設定</a></li> | 563 <li><a href="envSetting.php">環境設定</a></li> |
488 {foreach from=$toptimes item=top} | 590 {foreach from=$toptimes item=top} |
489 <li><a class="jump" href="{$top.link}">{$top.hour}~</a></li> | 591 <li><a class="jump" href="{$top.link}">{$top.hour}~</a></li> |
490 {/foreach} | 592 {/foreach} |
491 </ul><br style="clear:left;" /> | 593 </ul><br style="clear:left;" /> |
492 </div> | 594 </div> |
595 | |
596 <div class="set"> | |
597 <ul><li><a class="jump" href="javascript:PRG.toggle()">チャンネル表示</a></li></ul> | |
598 </div> | |
599 | |
493 <br style="clear:left;" /> | 600 <br style="clear:left;" /> |
494 | 601 |
495 <div class="set"> | 602 <div class="set"> |
496 <ul> | 603 <ul> |
497 <li><a href="programTable.php">番組検索</a></li> | 604 <li><a href="programTable.php">番組検索</a></li> |
513 </div> | 620 </div> |
514 <br style="clear:left;" /> | 621 <br style="clear:left;" /> |
515 <div id="prg_info"><div class="dummy">test</div></div> | 622 <div id="prg_info"><div class="dummy">test</div></div> |
516 </div> | 623 </div> |
517 | 624 |
518 <div style="position:absolute;bottom:0;"> | 625 |
626 <!-- チャンネル局名 --> | |
627 <div id="ch_title_bar" style="position:absolute;bottom:0;"> | |
519 <div class="tvtimeDM" style="float:left;"> </div> | 628 <div class="tvtimeDM" style="float:left;"> </div> |
520 {foreach from=$programs item=program } | 629 {foreach from=$programs item=program } |
521 <div class="ch_title" ><div style="cursor: pointer" onClick="javascript:PRG.chdialog('{$program.channel_disc}')" >{$program.station_name}</div></div> | 630 <div id="ch_title_{$program.ch_hash}" class="ch_title{if $program.skip == 1 } ch_title_skip{/if}" > |
631 <div class="ch_hash">{$program.ch_hash}</div> | |
632 <div class="ch_disc">{$program.channel_disc}</div> | |
633 <div class="ch_skip">{$program.skip}</div> | |
634 <div class="ch_sid">{$program.sid}</div> | |
635 <div class="ch_name">{$program.station_name}</div> | |
636 <div id="ch_title_str_{$program.ch_hash}" {if $program.skip == 1 }class="ch_skip_color" {/if} style="cursor: pointer;" onClick="javascript:PRG.chdialog('{$program.ch_hash}')" >{$program.station_name}</div> | |
637 </div> | |
522 {/foreach} | 638 {/foreach} |
523 </div> | 639 </div> |
640 | |
524 <br style="clear:left;" /> | 641 <br style="clear:left;" /> |
525 <div id="prg_info"><div class="dummy"> </div></div> | 642 <div id="prg_info"><div class="dummy"> </div></div> |
526 </div> | 643 </div> |
527 | 644 |
528 <div id="float_titles_dummy" style="width:1410px;height:120px;"> </div> | 645 <div id="float_titles_dummy" style="width:1410px;height:120px;"> </div> |
536 {/foreach} | 653 {/foreach} |
537 </div> | 654 </div> |
538 | 655 |
539 <div id="tv_chs" style="width: {$chs_width}px" > | 656 <div id="tv_chs" style="width: {$chs_width}px" > |
540 {foreach from=$programs item=program } | 657 {foreach from=$programs item=program } |
541 <div class="ch_set" style="width: {$ch_set_width}px" > | 658 <div id="tv_chs_{$program.ch_hash}" class="ch_set{if $program.skip == 1 } ch_set_skip{/if}" > |
542 <div class="ch_programs"> | 659 <div class="ch_programs" > |
543 {foreach from=$program.list item=item } | 660 {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;"> | 661 <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"> | 662 <div class="prg_dummy"> |
546 <div class="prg_title">{$item.title|escape}</div> | 663 <div class="prg_title">{$item.title|escape}</div> |
547 <div class="prg_subtitle">{$item.starttime}</div> | 664 <div class="prg_subtitle">{$item.starttime}</div> |
571 <div id="channelDialog">jQuery UI Dialog</div> | 688 <div id="channelDialog">jQuery UI Dialog</div> |
572 | 689 |
573 {literal} | 690 {literal} |
574 <script type="text/javascript"> | 691 <script type="text/javascript"> |
575 var INISet = { | 692 var INISet = { |
693 {/literal} | |
576 prgRecordURL : 'simpleReservation.php', // 簡易予約 | 694 prgRecordURL : 'simpleReservation.php', // 簡易予約 |
577 prgRecordPlusURL : 'recordp.php', // 詳細予約 | 695 prgRecordPlusURL : 'recordp.php', // 詳細予約 |
578 prgCancelURL : 'cancelReservation.php', // 予約キャンセル | 696 prgCancelURL : 'cancelReservation.php', // 予約キャンセル |
579 dotMin : {/literal}{$height_per_min}{literal}, | 697 dotMin : {$height_per_min}, |
580 tableStartTime : {/literal}'{$top_time}', | 698 tableStartTime : '{$top_time}', |
581 tableEndTime : '{$last_time}'{literal} | 699 tableEndTime : '{$last_time}', |
700 ch_width : {$ch_set_width}, | |
701 num_ch : {$num_ch}, | |
702 num_all_ch : {$num_all_ch} | |
703 {literal} | |
582 } | 704 } |
583 </script> | 705 </script> |
584 {/literal} | 706 {/literal} |
585 </body> | 707 </body> |
586 </html> | 708 </html> |