From d18bda9d680486bc5a77101aa41772912f19336a Mon Sep 17 00:00:00 2001 From: yoneda Date: Tue, 16 Mar 2010 23:37:25 +0900 Subject: [PATCH] =?utf8?q?mod:=20=E3=83=81=E3=83=A3=E3=83=B3=E3=83=8D?= =?utf8?q?=E3=83=AB=E3=82=B9=E3=82=AD=E3=83=83=E3=83=97=E5=BC=95=E3=81=8D?= =?utf8?q?=E7=B6=9A=E3=81=8D=E5=AE=9F=E8=A3=85=E4=B8=AD=EF=BC=88=E3=81=BE?= =?utf8?q?=E3=81=A0=E5=8B=95=E3=81=8B=E3=81=AA=E3=81=84=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- templates/index.html | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/templates/index.html b/templates/index.html index 7730ad5..7e9b7e9 100755 --- a/templates/index.html +++ b/templates/index.html @@ -91,7 +91,7 @@ str += ''; str += '
'; // スキップ - str += '
視聴しない:'; + str += '
このチャンネルを視聴しない:'; if( skip == 1 ) { str += ''; } @@ -123,9 +123,31 @@ chupdate:function() { var v_sid = $('#id_sid').val(); var v_channel_disc = $('#id_disc').val(); - $.post('channelSetSID.php', { channel_disc: v_channel_disc, - sid: v_sid }, function(data) { - + var v_hash = $('#id_hash').val(); + var v_skip = $('#id_ch_skip').attr('checked'); + + $.post('setChannelInfo.php', { channel_disc: v_channel_disc, + sid: v_sid, + skip: v_skip + }, function(data) { + if(data.match(/^error/i)){ + alert(data); + } + else { + var old_skip = $('#ch_title_'+v_hash+' .ch_skip').html(); + if( old_skip != v_skip ) { + if( v_skip ) { + INISet.num_ch--; + $('#ch_title_'+v_hash ).addClass('ch_title_skip'); + $('#tv_chs_'+v_hash ).addClass('ch_title_skip'); + } + else { + INISet.num_ch++; + $('#ch_title_'+v_hash ).removeClass('ch_title_skip'); + $('#tv_chs_'+v_hash ).removeClass('ch_title_skip'); + } + } + } $('#channelDialog').dialog('close'); }); }, @@ -215,7 +237,7 @@ } }); }, - CH_Skip: 1, + F_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 ); @@ -223,7 +245,7 @@ tvtimes_scroll(); $('#ch_title_bar div.ch_title_skip').show(); $('#tv_chs div.ch_set_skip').show(); - this.CH_Skip = 0; + this.F_Skip = 0; }, chSkipHide:function() { $('#ch_title_bar div.ch_title_skip').hide(); @@ -232,10 +254,10 @@ $('#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.F_Skip = 1; }, toggle:function() { - if( this.CH_Skip ) { + if( this.F_Skip ) { this.chSkipShow(); } else { -- 2.11.0