Mercurial > epgrec.yaz
comparison templates/index.html @ 123:57ca9a15dfad
mod: チャンネルスキップ引き続き実装中(まだ動かない)
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Tue, 16 Mar 2010 23:37:25 +0900 |
parents | 709bc9c69318 |
children | aa48eb5f1993 |
comparison
equal
deleted
inserted
replaced
122:709bc9c69318 | 123:57ca9a15dfad |
---|---|
89 var str = '<div class="prg_title">'; | 89 var str = '<div class="prg_title">'; |
90 str += st_name; | 90 str += st_name; |
91 str += '</div>'; | 91 str += '</div>'; |
92 str += '<form method="post" action="setChannelInfo.php">'; | 92 str += '<form method="post" action="setChannelInfo.php">'; |
93 // 鴻 | 93 // 鴻 |
94 str += '<div class="prg_channel"><span class="labelLeft">荀眼鐚</span>'; | 94 str += '<div class="prg_channel"><span class="labelLeft">c潟荀眼鐚</span>'; |
95 if( skip == 1 ) { | 95 if( skip == 1 ) { |
96 str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" checked />'; | 96 str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" checked />'; |
97 } | 97 } |
98 else { | 98 else { |
99 str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" />'; | 99 str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" />'; |
121 $('#channelDialog').dialog('open', 'center'); | 121 $('#channelDialog').dialog('open', 'center'); |
122 }, | 122 }, |
123 chupdate:function() { | 123 chupdate:function() { |
124 var v_sid = $('#id_sid').val(); | 124 var v_sid = $('#id_sid').val(); |
125 var v_channel_disc = $('#id_disc').val(); | 125 var v_channel_disc = $('#id_disc').val(); |
126 $.post('channelSetSID.php', { channel_disc: v_channel_disc, | 126 var v_hash = $('#id_hash').val(); |
127 sid: v_sid }, function(data) { | 127 var v_skip = $('#id_ch_skip').attr('checked'); |
128 | 128 |
129 $.post('setChannelInfo.php', { channel_disc: v_channel_disc, | |
130 sid: v_sid, | |
131 skip: v_skip | |
132 }, function(data) { | |
133 if(data.match(/^error/i)){ | |
134 alert(data); | |
135 } | |
136 else { | |
137 var old_skip = $('#ch_title_'+v_hash+' .ch_skip').html(); | |
138 if( old_skip != v_skip ) { | |
139 if( v_skip ) { | |
140 INISet.num_ch--; | |
141 $('#ch_title_'+v_hash ).addClass('ch_title_skip'); | |
142 $('#tv_chs_'+v_hash ).addClass('ch_title_skip'); | |
143 } | |
144 else { | |
145 INISet.num_ch++; | |
146 $('#ch_title_'+v_hash ).removeClass('ch_title_skip'); | |
147 $('#tv_chs_'+v_hash ).removeClass('ch_title_skip'); | |
148 } | |
149 } | |
150 } | |
129 $('#channelDialog').dialog('close'); | 151 $('#channelDialog').dialog('close'); |
130 }); | 152 }); |
131 }, | 153 }, |
132 rec:function(id){ | 154 rec:function(id){ |
133 $.get(INISet.prgRecordURL, { program_id: id } ,function(data){ | 155 $.get(INISet.prgRecordURL, { program_id: id } ,function(data){ |
213 } | 235 } |
214 $('#floatBox4Dialog').dialog('close'); | 236 $('#floatBox4Dialog').dialog('close'); |
215 } | 237 } |
216 }); | 238 }); |
217 }, | 239 }, |
218 CH_Skip: 1, | 240 F_Skip: 1, |
219 chSkipShow:function() { | 241 chSkipShow:function() { |
220 $('#float_titles').width(INISet.num_all_ch * INISet.ch_width + 80); | 242 $('#float_titles').width(INISet.num_all_ch * INISet.ch_width + 80); |
221 $('#tv_chs').width(INISet.num_all_ch * INISet.ch_width ); | 243 $('#tv_chs').width(INISet.num_all_ch * INISet.ch_width ); |
222 $('#tvtimes2').css( { left: INISet.num_all_ch * INISet.ch_width + 40 } ).show(); | 244 $('#tvtimes2').css( { left: INISet.num_all_ch * INISet.ch_width + 40 } ).show(); |
223 tvtimes_scroll(); | 245 tvtimes_scroll(); |
224 $('#ch_title_bar div.ch_title_skip').show(); | 246 $('#ch_title_bar div.ch_title_skip').show(); |
225 $('#tv_chs div.ch_set_skip').show(); | 247 $('#tv_chs div.ch_set_skip').show(); |
226 this.CH_Skip = 0; | 248 this.F_Skip = 0; |
227 }, | 249 }, |
228 chSkipHide:function() { | 250 chSkipHide:function() { |
229 $('#ch_title_bar div.ch_title_skip').hide(); | 251 $('#ch_title_bar div.ch_title_skip').hide(); |
230 $('#tv_chs div.ch_set_skip').hide(); | 252 $('#tv_chs div.ch_set_skip').hide(); |
231 $('#float_titles').width( INISet.num_ch * INISet.ch_width + 80 ); | 253 $('#float_titles').width( INISet.num_ch * INISet.ch_width + 80 ); |
232 $('#tv_chs').width( INISet.num_ch * INISet.ch_width ); | 254 $('#tv_chs').width( INISet.num_ch * INISet.ch_width ); |
233 $('#tvtimes2').css( { left: INISet.num_ch * INISet.ch_width + 40 }).show(); | 255 $('#tvtimes2').css( { left: INISet.num_ch * INISet.ch_width + 40 }).show(); |
234 tvtimes_scroll(); | 256 tvtimes_scroll(); |
235 this.CH_Skip = 1; | 257 this.F_Skip = 1; |
236 }, | 258 }, |
237 toggle:function() { | 259 toggle:function() { |
238 if( this.CH_Skip ) { | 260 if( this.F_Skip ) { |
239 this.chSkipShow(); | 261 this.chSkipShow(); |
240 } | 262 } |
241 else { | 263 else { |
242 this.chSkipHide(); | 264 this.chSkipHide(); |
243 } | 265 } |