diff templates/recordedTable.html @ 14:bbbc4f1ecf1d

added: remove video with real file.
author Sushi-k <epgrec@park.mda.or.jp>
date Tue, 14 Jul 2009 20:11:42 +0900
parents f5a9f0eb4858
children a34f2ff49097
line wrap: on
line diff
--- a/templates/recordedTable.html	Tue Jul 14 00:19:55 2009 +0900
+++ b/templates/recordedTable.html	Tue Jul 14 20:11:42 2009 +0900
@@ -9,10 +9,29 @@
 
 {literal}
 <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
+<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>
+<link rel="stylesheet" href="start/jquery-ui-1.7.2.custom.css" type="text/css">
 <script type="text/javascript">
+<!--
 	var PRG = {
+		
+		dialog:function(id, title){
+			$('#floatBox4Dialog').dialog({title:'削除',width:500});
+			var str = '<div class="prg_title">' + title + 'を削除します</div>';
+			str += '<form><div style="text-align:center;">録画ファイルも削除する<input type="checkbox" id="delete_file" name="delete_file" value="1" /></div></form>';
+			str +='<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.rec(' + id + ')" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">この録画を本当に削除する</a></div>';
+			$('#floatBox4Dialog').html(str);
+			$('#floatBox4Dialog').dialog('open', 'center');
+		},
 		rec:function(id){
-			$.get(INISet.prgCancelURL, { reserve_id: id } ,function(data){
+			var df = 0;
+
+			if( $('#delete_file').attr('checked') ) {
+				df = 1;
+			}
+			$('#floatBox4Dialog').dialog('close');
+			
+			$.get(INISet.prgCancelURL, { reserve_id: id, delete_file: df } ,function(data){
 				
 				if(data.match(/^error/i)){
 					alert(data);
@@ -23,6 +42,7 @@
 			});
 		}
 	}
+-->
 </script>
 <style type="text/css">
 <!--
@@ -69,6 +89,12 @@
 table#reservation_table tr.ctg_10, #category_select a.ctg_10 {background-color: #E4F4F4;}
 
 
+#floatBox4Dialog .prg_title{font-size:120%;font-weight:bold;padding:0.4em 0;text-align:center;}
+#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;}
+
+
 -->
 </style>
 {/literal}
@@ -118,10 +144,10 @@
   <td>{$rec.starttime}</td>
   <td>{$rec.station_name}</td>
   <td>{$rec.mode}</td>
-  {if $use_thumbs}<td>{$rec.thumb}</td>{/if}
-  <td>{$rec.title}</td>
-  <td>{$rec.description}</td>
-  <td><input type="button" value="削除" onClick="javascript:PRG.rec('{$rec.id}')" /></td>
+  {if $use_thumbs}<td><a href="{$rec.asf}">{$rec.thumb}</a></td>{/if}
+  <td><a href="{$rec.asf}">{$rec.title}</a></td>
+  <td><a href="{$rec.asf}">{$rec.description}</a></td>
+  <td><input type="button" value="削除" onClick="javascript:PRG.dialog('{$rec.id}','{$rec.title}')" /></td>
  </tr>
 {/foreach}
 </table>
@@ -130,7 +156,7 @@
   現在、録画済データはありません
 {/if}
 
-
+<div id="floatBox4Dialog">jQuery UI Dialog</div>
 
 {literal}
 <script type="text/javascript">