OSDN Git Service

mod: チャンネルスキップ実装中(番組表の表示方法を変更した)
authorSushi-k <epgrec@park.mda.or.jp>
Tue, 16 Mar 2010 03:46:37 +0000 (12:46 +0900)
committerSushi-k <epgrec@park.mda.or.jp>
Tue, 16 Mar 2010 03:46:37 +0000 (12:46 +0900)
index.php
templates/index.html

index 7210283..dfd5c4d 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -63,6 +63,7 @@ foreach( $channel_map as $channel_disc => $channel ) {
                $crec = new DBRecord( CHANNEL_TBL, "channel_disc", $channel_disc );
                $programs[$st]["skip"] = $crec->skip;
                if( $crec->skip == 0 ) $num_ch++;
+               $programs[$st]["channel_disc"] = $channel_disc;
                
                $programs[$st]["station_name"]  = $crec->name;
                $programs[$st]["channel_disc"]  = $crec->channel_disc;
index dfd3540..854792d 100755 (executable)
                                }
                        });
                },
-               CH_Skip: 0,
+               CH_Skip: 1,
+               chSkipShow:function() {
+                       $('#float_titles').width(INISet.num_all_ch * INISet.ch_width + 80);
+                       $('#tv_chs').width(INISet.num_all_ch * INISet.ch_width );
+                       $('#tvtimes2').css( { left: INISet.num_all_ch * INISet.ch_width  + 40 } ).show();
+                       tvtimes_scroll();
+                       $('#ch_title_bar div.ch_title_skip').show();
+                       $('#tv_chs div.ch_set_skip').show();
+                       this.CH_Skip = 0;
+               },
+               chSkipHide:function() {
+                       $('#ch_title_bar div.ch_title_skip').hide();
+                       $('#tv_chs div.ch_set_skip').hide();
+                       $('#float_titles').width( INISet.num_ch * INISet.ch_width + 80 );
+                       $('#tv_chs').width( INISet.num_ch * INISet.ch_width );
+                       $('#tvtimes2').css( { left: INISet.num_ch * INISet.ch_width  + 40 }).show();
+                       tvtimes_scroll();
+                       this.CH_Skip = 1;
+               },
                toggle:function() {
                        if( this.CH_Skip ) {
-                               $('#float_titles').width(INISet.num_all_ch * INISet.ch_width + 80);
-                               $('#tv_chs').width(INISet.num_all_ch * INISet.ch_width );
-                               $('#tvtimes2').css( { left: INISet.num_all_ch * INISet.ch_width  + 40 } ).show();
-                               tvtimes_scroll();
-                               $('#ch_title_bar div.ch_title_skip').show();
-                               $('#tv_chs div.ch_set_skip').show();
-
-                               this.CH_Skip = 0;
+                               this.chSkipShow();
                        }
                        else {
-                               $('#tv_chs div.ch_set_skip').hide();
-                               $('#ch_title_bar div.ch_title_skip').hide();
-                               $('#float_titles').width( INISet.num_ch * INISet.ch_width + 80 );
-                               $('#tv_chs').width( INISet.num_ch * INISet.ch_width );
-                               $('#tvtimes2').css( { left: INISet.num_ch * INISet.ch_width  + 40 }).show();
-                               tvtimes_scroll();
-                               this.CH_Skip = 1;
+                               this.chSkipHide();
                        }
                }
        }
                DG2.dialog({title:'チャンネル情報',width:600});
                DG2.dialog('close');
 
-               PRG.toggle();
+//             PRG.toggle();
 
                nowBar.INI();
                CTG.INI();
@@ -392,13 +397,12 @@ h2 {padding: 4px}
 #tvtable div.tvtimetop {padding:8px 0px;}
 
 #tvtable div.ch_set {width:{/literal}{$ch_set_width}{literal}px;float:left;background-color:#BBB;}
-#tvtable div.ch_set_skip {width:{/literal}{$ch_set_width}{literal}px;float:left;background-color:#BBB; }
+.ch_set_skip { display: none; }
 
 
 #tvtable div.ch_title, #tvtable div.prg {margin-right:2px;}
 #tvtable div.ch_title {padding:8px 0px;background-color:#333;color:#DDD;font-weight:bold;text-align:center}
-#tvtable div.ch_title_skip, #tvtable div.prg {margin-right:2px;}
-#tvtable div.ch_title_skip {padding:8px 0px;background-color:#333;color:#DDD;font-weight:bold;text-align:center; }
+.ch_title_skip {display: none;}
 
 #tvtable div.prg {
        overflow:hidden;
@@ -440,8 +444,6 @@ h2 {padding: 4px}
 #float_titles div.ch_title {width:{/literal}{$ch_set_width}{literal}px;float:left;color:#FFF;font-weight:bold;text-align:center}
 #float_titles div.ch_title div{padding:8px 0px;margin:0 6px 0 4px;background-image: url(imgs/trancBG50.png);}
 
-#float_titles div.ch_title_skip {width:{/literal}{$ch_set_width}{literal}px;float:left;color:#FFF;font-weight:bold;text-align:center; }
-#float_titles div.ch_title_skip div{padding:8px 0px;margin:0 6px 0 4px;background-image: url(imgs/trancBG50.png); }
 
 #float_follows {position:absolute;}
 #prg_info {
@@ -556,8 +558,8 @@ h2 {padding: 4px}
 <div id="ch_title_bar" style="position:absolute;bottom:0;">
   <div class="tvtimeDM" style="float:left;">&nbsp;</div>
   {foreach from=$programs item=program }
-  <div {if $program.skip == 1 } class="ch_title_skip" {else} class="ch_title" {/if} >
-    <div {if $program.skip == 1 } class="ch_title_skip" {/if} style="cursor: pointer" onClick="javascript:PRG.chdialog('{$program.channel_disc}')" >{$program.station_name}</div>
+  <div id="ch_title_{$program.channel_disc}"  class="ch_title{if $program.skip == 1 } ch_title_skip{/if}" >
+    <div style="cursor: pointer" onClick="javascript:PRG.chdialog('{$program.channel_disc}')" >{$program.station_name}</div>
   </div>
   {/foreach}
 </div>
@@ -579,8 +581,8 @@ h2 {padding: 4px}
 
 <div id="tv_chs" style="width: {$chs_width}px" >
    {foreach from=$programs item=program }
-   <div {if $program.skip == 1 } class="ch_set_skip" {else} class="ch_set" {/if} style="width: {$ch_set_width}px" >
-    <div class="ch_programs">
+   <div id="tv_chs_{$program.channel_disc}" class="ch_set{if $program.skip == 1 } ch_set_skip{/if}" >
+    <div class="ch_programs" >
     {foreach from=$program.list item=item }
       <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;">
         <div class="prg_dummy">