changeset 121:ea54c3128da3

mod: チャンネルスキップ実装中(番組表の表示方法を変更した)
author Sushi-k <epgrec@park.mda.or.jp>
date Tue, 16 Mar 2010 12:46:37 +0900
parents cb04c9ca1cb0
children 709bc9c69318
files index.php templates/index.html
diffstat 2 files changed, 29 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/index.php	Sun Mar 14 23:49:11 2010 +0900
+++ b/index.php	Tue Mar 16 12:46:37 2010 +0900
@@ -63,6 +63,7 @@
 		$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;
--- a/templates/index.html	Sun Mar 14 23:49:11 2010 +0900
+++ b/templates/index.html	Tue Mar 16 12:46:37 2010 +0900
@@ -190,26 +190,31 @@
 				}
 			});
 		},
-		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();
 			}
 		}
 	}
@@ -341,7 +346,7 @@
 		DG2.dialog({title:'c潟',width:600});
 		DG2.dialog('close');
 
-		PRG.toggle();
+//		PRG.toggle();
 
 		nowBar.INI();
 		CTG.INI();
@@ -392,13 +397,12 @@
 #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 @@
 #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 @@
 <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 @@
 
 <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">