Mercurial > epgrec.yaz
comparison templates/index.html @ 125:ef3df87f3c7d
mod: チャンネルスキップの大まかな実装終了
author | Sushi-k <epgrec@park.mda.or.jp> |
---|---|
date | Wed, 17 Mar 2010 18:12:01 +0900 |
parents | aa48eb5f1993 |
children | d6a932ac8d8e |
comparison
equal
deleted
inserted
replaced
124:aa48eb5f1993 | 125:ef3df87f3c7d |
---|---|
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">c潟荀眼鐚</span>'; | 94 str += '<div class="prg_channel"><span class="labelLeft">荀眼鐚</span>'; |
95 str += '<span>'; | |
95 if( skip == 1 ) { | 96 if( skip == 1 ) { |
96 str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" checked />'; | 97 str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" checked />'; |
97 } | 98 } |
98 else { | 99 else { |
99 str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" />'; | 100 str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" />'; |
100 } | 101 } |
101 str += '</div>'; | 102 str += '</span></div>'; |
102 // 泣若ID | 103 // 泣若ID |
103 str += '<div class="prg_channel"><span class="labelLeft">泣若ID鐚</span>'; | 104 str += '<div class="prg_channel"><span class="labelLeft">泣若ID鐚</span>'; |
104 str += '<span><input type="text" name="n_sid" size="20" id="id_sid" value="'; | 105 str += '<span><input type="text" name="n_sid" size="20" id="id_sid" value="'; |
105 str += sid; | 106 str += sid; |
106 str += '" /></span></div>'; | 107 str += '" /></span></div>'; |
123 chupdate:function() { | 124 chupdate:function() { |
124 var v_sid = $('#id_sid').val(); | 125 var v_sid = $('#id_sid').val(); |
125 var v_channel_disc = $('#id_disc').val(); | 126 var v_channel_disc = $('#id_disc').val(); |
126 var v_hash = $('#id_hash').val(); | 127 var v_hash = $('#id_hash').val(); |
127 var v_skip = $('#id_ch_skip').attr('checked'); | 128 var v_skip = $('#id_ch_skip').attr('checked'); |
128 | 129 var n_skip = v_skip ? 1 : 0; |
130 | |
129 $.post('setChannelInfo.php', { channel_disc: v_channel_disc, | 131 $.post('setChannelInfo.php', { channel_disc: v_channel_disc, |
130 sid: v_sid, | 132 sid: v_sid, |
131 skip: v_skip | 133 skip: n_skip |
132 }, function(data) { | 134 }, function(data) { |
133 if(data.match(/^error/i)){ | 135 if(data.match(/^error/i)){ |
134 alert(data); | 136 alert(data); |
135 } | 137 } |
136 else { | 138 else { |
137 var old_skip = $('#ch_title_'+v_hash+' .ch_skip').html(); | 139 var old_skip = $('#ch_title_'+v_hash+' .ch_skip').html(); |
138 if( old_skip != v_skip ) { | 140 if( old_skip != n_skip ) { |
139 if( v_skip ) { | 141 if( v_skip ) { |
140 (INISet.num_ch)--; | 142 (INISet.num_ch)--; |
141 $('#ch_title_'+v_hash ).addClass('ch_title_skip'); | 143 $('#ch_title_'+v_hash ).addClass('ch_title_skip'); |
142 $('#tv_chs_'+v_hash ).addClass('ch_set_skip'); | 144 $('#tv_chs_'+v_hash ).addClass('ch_set_skip'); |
143 $('#ch_title_'+v_hash+' .ch_skip').html('1'); | 145 $('#ch_title_'+v_hash+' .ch_skip').html('1'); |
146 (INISet.num_ch)++; | 148 (INISet.num_ch)++; |
147 $('#ch_title_'+v_hash ).removeClass('ch_title_skip'); | 149 $('#ch_title_'+v_hash ).removeClass('ch_title_skip'); |
148 $('#tv_chs_'+v_hash ).removeClass('ch_set_skip'); | 150 $('#tv_chs_'+v_hash ).removeClass('ch_set_skip'); |
149 $('#ch_title_'+v_hash+' .ch_skip').html('0'); | 151 $('#ch_title_'+v_hash+' .ch_skip').html('0'); |
150 } | 152 } |
153 if( PRG.F_Skip == 1 ) PRG.chSkipHide(); | |
151 } | 154 } |
152 } | 155 } |
153 $('#channelDialog').dialog('close'); | 156 $('#channelDialog').dialog('close'); |
154 }); | 157 }); |
155 }, | 158 }, |
245 $('#tv_chs').width(INISet.num_all_ch * INISet.ch_width ); | 248 $('#tv_chs').width(INISet.num_all_ch * INISet.ch_width ); |
246 $('#tvtimes2').css( { left: INISet.num_all_ch * INISet.ch_width + 40 } ).show(); | 249 $('#tvtimes2').css( { left: INISet.num_all_ch * INISet.ch_width + 40 } ).show(); |
247 tvtimes_scroll(); | 250 tvtimes_scroll(); |
248 $('#ch_title_bar div.ch_title_skip').show(); | 251 $('#ch_title_bar div.ch_title_skip').show(); |
249 $('#tv_chs div.ch_set_skip').show(); | 252 $('#tv_chs div.ch_set_skip').show(); |
250 this.F_Skip = 0; | 253 nowBar.INI(); |
251 }, | 254 }, |
252 chSkipHide:function() { | 255 chSkipHide:function() { |
253 $('#ch_title_bar div.ch_title_skip').hide(); | 256 $('#ch_title_bar div.ch_title_skip').hide(); |
254 $('#tv_chs div.ch_set_skip').hide(); | 257 $('#tv_chs div.ch_set_skip').hide(); |
255 $('#float_titles').width( INISet.num_ch * INISet.ch_width + 80 ); | 258 $('#float_titles').width( INISet.num_ch * INISet.ch_width + 80 ); |
256 $('#tv_chs').width( INISet.num_ch * INISet.ch_width ); | 259 $('#tv_chs').width( INISet.num_ch * INISet.ch_width ); |
257 $('#tvtimes2').css( { left: INISet.num_ch * INISet.ch_width + 40 }).show(); | 260 $('#tvtimes2').css( { left: INISet.num_ch * INISet.ch_width + 40 }).show(); |
258 tvtimes_scroll(); | 261 tvtimes_scroll(); |
259 this.F_Skip = 1; | 262 nowBar.INI(); |
260 }, | 263 }, |
261 toggle:function() { | 264 toggle:function() { |
262 if( this.F_Skip ) { | 265 if( this.F_Skip ) { |
263 this.chSkipShow(); | 266 this.chSkipShow(); |
267 this.F_Skip = 0; | |
264 } | 268 } |
265 else { | 269 else { |
266 this.chSkipHide(); | 270 this.chSkipHide(); |
271 this.F_Skip = 1; | |
267 } | 272 } |
268 } | 273 } |
269 } | 274 } |
270 var CTG = { | 275 var CTG = { |
271 CN:'ctg', | 276 CN:'ctg', |
390 var DG = $('#floatBox4Dialog'); | 395 var DG = $('#floatBox4Dialog'); |
391 DG.dialog({title:'牙私膣',width:600}); | 396 DG.dialog({title:'牙私膣',width:600}); |
392 DG.dialog('close'); | 397 DG.dialog('close'); |
393 | 398 |
394 var DG2 = $('#channelDialog'); | 399 var DG2 = $('#channelDialog'); |
395 DG2.dialog({title:'c潟',width:600}); | 400 DG2.dialog({title:'c潟',width:480}); |
396 DG2.dialog('close'); | 401 DG2.dialog('close'); |
397 | 402 |
398 // PRG.toggle(); | 403 // PRG.toggle(); |
399 | 404 |
400 nowBar.INI(); | 405 nowBar.INI(); |