Mercurial > epgrec.yaz
diff templates/index.html @ 122:709bc9c69318
mod: チャンネルスキップ引き続き実装中(まだ途中)
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Tue, 16 Mar 2010 23:08:59 +0900 |
parents | ea54c3128da3 |
children | 57ca9a15dfad |
line wrap: on
line diff
--- a/templates/index.html Tue Mar 16 12:46:37 2010 +0900 +++ b/templates/index.html Tue Mar 16 23:08:59 2010 +0900 @@ -79,21 +79,46 @@ ); } var PRG = { - chdialog:function(disc){ + chdialog:function(chash){ $('#channelDialog').dialog('close'); - $.get('channelInfo.php', { channel_disc: disc },function(data) { - if(data.match(/^error/i)){ - alert(data); - } - else { - var str = data; - str += '<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.chupdate()" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">贋</a></div>'; - $('#channelDialog').html(str); - $('#channelDialog').dialog('open', 'center'); - - } - }); + var skip = $('#ch_title_'+chash+' .ch_skip').html(); + var st_name = $('#ch_title_'+chash+' .ch_name').html(); + var sid = $('#ch_title_'+chash+' .ch_sid').html(); + var disc = $('#ch_title_'+chash+' .ch_disc').html(); + var str = '<div class="prg_title">'; + str += st_name; + str += '</div>'; + str += '<form method="post" action="setChannelInfo.php">'; + // 鴻 + str += '<div class="prg_channel"><span class="labelLeft">荀眼鐚</span>'; + if( skip == 1 ) { + str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" checked />'; + } + else { + str += '<input type="checkbox" name="n_skip_name" id="id_ch_skip" value="'+skip+'" />'; + } + str += '</div>'; + // 泣若ID + str += '<div class="prg_channel"><span class="labelLeft">泣若ID鐚</span>'; + str += '<span><input type="text" name="n_sid" size="20" id="id_sid" value="'; + str += sid; + str += '" /></span></div>'; + + str += '<input type="hidden" name="n_channel_disc" id="id_disc" value="'; + str += disc; + str += '" />'; + str += '<input type="hidden" name="n_channel_hash" id="id_hash" value="'; + str += chash; + str += '" />'; + + + str += '</form>'; + + str += '<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.chupdate()" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">贋</a></div>'; + + $('#channelDialog').html(str); + $('#channelDialog').dialog('open', 'center'); }, chupdate:function() { var v_sid = $('#id_sid').val(); @@ -404,6 +429,12 @@ #tvtable div.ch_title {padding:8px 0px;background-color:#333;color:#DDD;font-weight:bold;text-align:center} .ch_title_skip {display: none;} +.ch_disc {display :none;} +.ch_skip {display :none;} +.ch_sid {display :none;} +.ch_name {display :none;} +.ch_hash {display :none;} + #tvtable div.prg { overflow:hidden; color:#444; @@ -558,8 +589,13 @@ <div id="ch_title_bar" style="position:absolute;bottom:0;"> <div class="tvtimeDM" style="float:left;"> </div> {foreach from=$programs item=program } - <div id="ch_title_{$program.channel_disc}" class="ch_title{if $program.skip == 1 } ch_title_skip{/if}" > - <div style="cursor: pointer" onClick="javascript:PRG.chdialog('{$program.channel_disc}')" >{$program.station_name}</div> + <div id="ch_title_{$program.ch_hash}" class="ch_title{if $program.skip == 1 } ch_title_skip{/if}" > + <div class="ch_hash">{$program.ch_hash}</div> + <div class="ch_disc">{$program.channel_disc}</div> + <div class="ch_skip">{$program.skip}</div> + <div class="ch_sid">{$program.sid}</div> + <div class="ch_name">{$program.station_name}</div> + <div style="cursor: pointer" onClick="javascript:PRG.chdialog('{$program.ch_hash}')" >{$program.station_name}</div> </div> {/foreach} </div> @@ -581,7 +617,7 @@ <div id="tv_chs" style="width: {$chs_width}px" > {foreach from=$programs item=program } - <div id="tv_chs_{$program.channel_disc}" class="ch_set{if $program.skip == 1 } ch_set_skip{/if}" > + <div id="tv_chs_{$program.ch_hash}" class="ch_set{if $program.skip == 1 } ch_set_skip{/if}" > <div class="ch_programs" > {foreach from=$program.list item=item } <div {if $item.id}id="prgID_{$item.id}"{/if} class="prg {if ! $item.id}prg_none {/if} ctg_{$item.category_name}{if $item.rec gt 0 } prg_rec{/if}" style="height:{$item.height}px;">