diff templates/index.html @ 87:36ac7c416bd7

merged with upstream
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 01 Mar 2010 20:51:36 +0900
parents cb7da56c4198
children cb04c9ca1cb0
line wrap: on
line diff
--- a/templates/index.html	Sun Feb 14 17:01:02 2010 +0900
+++ b/templates/index.html	Mon Mar 01 20:51:36 2010 +0900
@@ -79,6 +79,31 @@
 		);
 	}
 	var PRG = {
+		chdialog:function(disc){
+			$('#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');
+					
+				}
+			});
+
+		},
+		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) {
+				
+				$('#channelDialog').dialog('close');
+			});
+		},
 		rec:function(id){
 			$.get(INISet.prgRecordURL, { program_id: id } ,function(data){
 				if(data.match(/^error/i)){
@@ -289,6 +314,11 @@
 		var DG = $('#floatBox4Dialog');
 		DG.dialog({title:'録画予約',width:600});
 		DG.dialog('close');
+
+		var DG2 = $('#channelDialog');
+		DG2.dialog({title:'チャンネル情報',width:600});
+		DG2.dialog('close');
+
 		nowBar.INI();
 		CTG.INI();
 		MDA.SCR.INI();	// 番組表の位置保存
@@ -403,6 +433,12 @@
 #floatBox4Dialog .prg_rec_cfg{background:#EEE;padding:1em 2em;margin:0.4em 0;}
 #floatBox4Dialog .labelLeft {width:8em;float:left;text-align:right;}
 #floatBox4Dialog .button {padding:0.4em 1em;}
+
+#channelDialog .prg_title{font-size:120%;font-weight:bold;padding:0.4em 0;text-align:center;}
+#channelDialog .prg_rec_cfg{background:#EEE;padding:1em 2em;margin:0.4em 0;}
+#channelDialog .labelLeft {width:8em;float:left;text-align:right;}
+#channelDialog .button {padding:0.4em 1em;}
+
 -->
 </style>
 
@@ -482,7 +518,7 @@
 <div style="position:absolute;bottom:0;">
   <div class="tvtimeDM" style="float:left;">&nbsp;</div>
   {foreach from=$programs item=program }
-  <div class="ch_title"><div>{$program.station_name}</div></div>
+  <div class="ch_title" ><div style="cursor: pointer" onClick="javascript:PRG.chdialog('{$program.channel_disc}')" >{$program.station_name}</div></div>
   {/foreach}
 </div>
 <br style="clear:left;" />
@@ -532,6 +568,7 @@
 
 
 <div id="floatBox4Dialog">jQuery UI Dialog</div>
+<div id="channelDialog">jQuery UI Dialog</div>
 
 {literal}
 <script type="text/javascript">