# HG changeset patch # User yoneda # Date 1268750245 -32400 # Node ID 57ca9a15dfad2a685d9ac68efa7b4e4a9e936ee5 # Parent 709bc9c69318b86970a25236dc4c250fe415a2b0 mod: チャンネルスキップ引き続き実装中(まだ動かない) diff -r 709bc9c69318 -r 57ca9a15dfad templates/index.html --- a/templates/index.html Tue Mar 16 23:08:59 2010 +0900 +++ b/templates/index.html Tue Mar 16 23:37:25 2010 +0900 @@ -91,7 +91,7 @@ str += ''; str += '
'; // 鴻 - str += '
荀眼鐚'; + str += '
c潟荀眼鐚'; 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 {