Mercurial > epgrec.yaz
changeset 123:57ca9a15dfad
mod: チャンネルスキップ引き続き実装中(まだ動かない)
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Tue, 16 Mar 2010 23:37:25 +0900 |
parents | 709bc9c69318 |
children | aa48eb5f1993 |
files | templates/index.html |
diffstat | 1 files changed, 30 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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 += '</div>'; str += '<form method="post" action="setChannelInfo.php">'; // 鴻 - str += '<div class="prg_channel"><span class="labelLeft">荀眼鐚</span>'; + str += '<div class="prg_channel"><span class="labelLeft">c潟荀眼鐚</span>'; if( skip == 1 ) { str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" checked />'; } @@ -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 {