diff 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
line wrap: on
line diff
--- a/templates/index.html	Wed Mar 17 01:34:26 2010 +0900
+++ b/templates/index.html	Wed Mar 17 18:12:01 2010 +0900
@@ -91,14 +91,15 @@
 			str += '</div>';
 			str += '<form method="post" action="setChannelInfo.php">';
 			// 鴻
-			str += '<div class="prg_channel"><span class="labelLeft">c潟荀眼鐚</span>';
+			str += '<div class="prg_channel"><span class="labelLeft">荀眼鐚</span>';
+			str += '<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>';
+			str += '</span></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="';
@@ -125,17 +126,18 @@
 			var v_channel_disc = $('#id_disc').val();
 			var v_hash = $('#id_hash').val();
 			var v_skip = $('#id_ch_skip').attr('checked');
-			
+			var n_skip = v_skip ? 1 : 0;
+
 			$.post('setChannelInfo.php', { channel_disc: v_channel_disc,
 						      sid: v_sid,
-						      skip: v_skip
+						      skip: n_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( old_skip != n_skip ) {
 						if( v_skip ) {
 							(INISet.num_ch)--;
 							$('#ch_title_'+v_hash ).addClass('ch_title_skip');
@@ -148,6 +150,7 @@
 							$('#tv_chs_'+v_hash ).removeClass('ch_set_skip');
 							$('#ch_title_'+v_hash+' .ch_skip').html('0');
 						}
+						if( PRG.F_Skip == 1 ) PRG.chSkipHide();
 					}
 				}
 				$('#channelDialog').dialog('close');
@@ -247,7 +250,7 @@
 			tvtimes_scroll();
 			$('#ch_title_bar div.ch_title_skip').show();
 			$('#tv_chs div.ch_set_skip').show();
-			this.F_Skip = 0;
+			nowBar.INI();
 		},
 		chSkipHide:function() {
 			$('#ch_title_bar div.ch_title_skip').hide();
@@ -256,14 +259,16 @@
 			$('#tv_chs').width( INISet.num_ch * INISet.ch_width );
 			$('#tvtimes2').css( { left: INISet.num_ch * INISet.ch_width  + 40 }).show();
 			tvtimes_scroll();
-			this.F_Skip = 1;
+			nowBar.INI();
 		},
 		toggle:function() {
 			if( this.F_Skip ) {
 				this.chSkipShow();
+				this.F_Skip = 0;
 			}
 			else {
 				this.chSkipHide();
+				this.F_Skip = 1;
 			}
 		}
 	}
@@ -392,7 +397,7 @@
 		DG.dialog('close');
 
 		var DG2 = $('#channelDialog');
-		DG2.dialog({title:'c潟',width:600});
+		DG2.dialog({title:'c潟',width:480});
 		DG2.dialog('close');
 
 //		PRG.toggle();