Mercurial > epgrec.yaz
annotate templates/recordedTable.html @ 134:58791b90221b
mod: mb_ereg_replace -> preg_replace
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Sat, 20 Mar 2010 00:49:37 +0900 |
parents | 5096001c4995 |
children | 84220382fea8 |
rev | line source |
---|---|
1 | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
2 "http://www.w3.org/TR/html4/loose.dtd"> | |
3 | |
4 <html> | |
5 <head> | |
6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
7 <title>{$sitetitle}</title> | |
8 <meta http-equiv="Content-Style-Type" content="text/css"> | |
9 | |
10 {literal} | |
11 <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> | |
14
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
12 <script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script> |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
13 <link rel="stylesheet" href="start/jquery-ui-1.7.2.custom.css" type="text/css"> |
1 | 14 <script type="text/javascript"> |
14
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
15 <!-- |
1 | 16 var PRG = { |
14
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
17 |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
18 dialog:function(id, title){ |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
19 $('#floatBox4Dialog').dialog({title:'削除',width:500}); |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
20 var str = '<div class="prg_title">' + title + 'を削除します</div>'; |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
21 str += '<form><div style="text-align:center;">録画ファイルも削除する<input type="checkbox" id="delete_file" name="delete_file" value="1" /></div></form>'; |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
22 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>'; |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
23 $('#floatBox4Dialog').html(str); |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
24 $('#floatBox4Dialog').dialog('open', 'center'); |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
25 }, |
1 | 26 rec:function(id){ |
14
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
27 var df = 0; |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
28 |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
29 if( $('#delete_file').attr('checked') ) { |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
30 df = 1; |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
31 } |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
32 $('#floatBox4Dialog').dialog('close'); |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
33 |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
34 $.get(INISet.prgCancelURL, { reserve_id: id, delete_file: df } ,function(data){ |
1 | 35 |
36 if(data.match(/^error/i)){ | |
37 alert(data); | |
38 } | |
39 else { | |
40 $('#resid_' + id ).hide(); | |
41 } | |
42 }); | |
27
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
43 }, |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
44 editdialog:function(id) { |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
45 $('#floatBox4Dialog').dialog({title:'変更',width:500}); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
46 var str; |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
47 str = '<div class="prg_title">録画ID:' + id + '</div>'; |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
48 str += '<input type="hidden" name="reserve_id" id="id_reserve_id" value="' + id + '" />'; |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
49 str += '<div><span class="labelLeft">タイトル</span><input name="title" id="id_title" size="30" value="'+ $('#tid_' + id ).html() + '" /></div>'; |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
50 str += '<div><span class="labelLeft">概要</span><textarea name="description" id="id_description" cols="30" rows="5" >' + $('#did_' + id ).html() + '</textarea></div>'; |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
51 str += '<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.edit()" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">変更する</a></div>'; |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
52 |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
53 $('#floatBox4Dialog').html(str); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
54 $('#floatBox4Dialog').dialog('open','center'); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
55 }, |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
56 edit:function() { |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
57 var id_reserve_id = $('#id_reserve_id').val(); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
58 var id_title = $('#id_title').val(); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
59 var id_description = $('#id_description').val(); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
60 |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
61 $.post('changeReservation.php', { reserve_id: id_reserve_id, |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
62 title: id_title, |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
63 description: id_description }, function( data ) { |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
64 if(data.match(/^error/i)){ |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
65 alert(data); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
66 $('#floatBox4Dialog').dialog('close'); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
67 |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
68 } |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
69 else { |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
70 $('#tid_' + id_reserve_id ).html( id_title ); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
71 $('#did_' + id_reserve_id ).html( id_description ); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
72 $('#floatBox4Dialog').dialog('close'); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
73 } |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
74 }); |
1 | 75 } |
76 } | |
27
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
77 $(document).ready(function () { |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
78 var DG = $('#floatBox4Dialog'); |
29
ae5491d72470
modified: templates/recordedTable.html
yoneda <epgrec@park.mda.or.jp>
parents:
27
diff
changeset
|
79 DG.dialog({title:'変更',width:500}); |
27
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
80 DG.dialog('close'); |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
81 }); |
14
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
82 --> |
1 | 83 </script> |
84 <style type="text/css"> | |
85 <!-- | |
86 body {padding:4px;margin:0;font-size:10pt;} | |
87 a {text-decoration:none;} | |
88 | |
89 .bold {font-weight:bold;} | |
90 .small {font-size:75%;} | |
91 | |
92 a img {border:none; } | |
93 | |
94 table#reservation_table { | |
95 width: 960px; | |
96 border: 1px #BBB solid; | |
97 border-collapse: collapse; | |
98 border-spacing: 0; | |
99 } | |
100 | |
101 table#reservation_table th { | |
102 padding: 5px; | |
103 border: #E3E3E3 solid; | |
104 border-width: 0 0 1px 1px; | |
105 background: #BBB; | |
106 font-weight: bold; | |
107 line-height: 120%; | |
108 text-align: center; | |
109 } | |
110 table#reservation_table td { | |
111 padding: 5px; | |
112 border: 1px #BBB solid; | |
113 border-width: 0 0 1px 1px; | |
114 text-align: center; | |
115 } | |
116 | |
117 table#reservation_table tr.ctg_news, #category_select a.ctg_news {background-color: #FFFFD8;} | |
118 table#reservation_table tr.ctg_etc, #category_select a.ctg_etc {background-color: #FFFFFF;} | |
119 table#reservation_table tr.ctg_information, #category_select a.ctg_information {background-color: #F2D8FF;} | |
120 table#reservation_table tr.ctg_sports, #category_select a.ctg_sports {background-color: #D8FFFF;} | |
121 table#reservation_table tr.ctg_cinema, #category_select a.ctg_cinema {background-color: #FFD8D8;} | |
122 table#reservation_table tr.ctg_music, #category_select a.ctg_music {background-color: #D8D8FF;} | |
123 table#reservation_table tr.ctg_drama, #category_select a.ctg_drama {background-color: #D8FFD8;} | |
124 table#reservation_table tr.ctg_anime, #category_select a.ctg_anime {background-color: #FFE4C8;} | |
125 table#reservation_table tr.ctg_variety, #category_select a.ctg_variety {background-color: #FFD2EB;} | |
126 table#reservation_table tr.ctg_10, #category_select a.ctg_10 {background-color: #E4F4F4;} | |
127 | |
128 | |
14
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
129 #floatBox4Dialog .prg_title{font-size:120%;font-weight:bold;padding:0.4em 0;text-align:center;} |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
130 #floatBox4Dialog .prg_rec_cfg{background:#EEE;padding:1em 2em;margin:0.4em 0;} |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
131 #floatBox4Dialog .labelLeft {width:8em;float:left;text-align:right;} |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
132 #floatBox4Dialog .button {padding:0.4em 1em;} |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
133 |
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
134 |
1 | 135 --> |
136 </style> | |
137 {/literal} | |
138 | |
139 </head> | |
140 | |
141 <body> | |
142 | |
143 <h2>{$sitetitle}</h2> | |
144 | |
145 <p><a href="index.php">番組表に戻る</a></p> | |
146 | |
147 <div> | |
148 絞り込み: | |
149 <form method="post" action="recordedTable.php" > | |
150 <input type="hidden" name="do_search" value="1" /> | |
151 検索語句<input type="text" size="20" name="search" value="{$search}" /> | |
152 局<select name="station"> | |
153 {foreach from=$stations item=st} | |
154 <option value="{$st.id}" {$st.selected}>{$st.name}</option> | |
155 {/foreach} | |
156 </select> | |
157 カテゴリ<select name="category_id"> | |
158 {foreach from=$cats item=cat} | |
159 <option value="{$cat.id}" {$cat.selected}>{$cat.name}</option> | |
160 {/foreach} | |
161 </select> | |
162 <input type="submit" value="絞り込む" /> | |
163 </form> | |
164 </div> | |
165 | |
166 タイトルや内容をクリックすると視聴できます(ブラウザの設定でASFとVLCを関連付けている必要があります) | |
167 {if count($records)} | |
168 <table id="reservation_table"> | |
169 <tr> | |
170 <th>録画日時</th> | |
171 <th>ch</th> | |
172 <th>モード</th> | |
53 | 173 {if $use_thumbs == 1}<th>サムネール</th>{/if} |
1 | 174 <th>タイトル</th> |
175 <th>内容</th> | |
27
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
176 <th>変更</th> |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
177 <th>削除</th> |
1 | 178 </tr> |
179 | |
180 {foreach from=$records item=rec } | |
181 <tr id="resid_{$rec.id}" class="ctg_{$rec.cat}"> | |
182 <td>{$rec.starttime}</td> | |
183 <td>{$rec.station_name}</td> | |
184 <td>{$rec.mode}</td> | |
53 | 185 {if $use_thumbs == 1}<td><a href="{$rec.asf}">{$rec.thumb}</a></td>{/if} |
27
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
186 <td><a href="{$rec.asf}" id="tid_{$rec.id}">{$rec.title}</a></td> |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
187 <td><a href="{$rec.asf}" id="did_{$rec.id}">{$rec.description}</a></td> |
a34f2ff49097
add: editable title & description
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
188 <td><input type="button" value="変更" onClick="javascript:PRG.editdialog('{$rec.id}')" /></td> |
14
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
189 <td><input type="button" value="削除" onClick="javascript:PRG.dialog('{$rec.id}','{$rec.title}')" /></td> |
1 | 190 </tr> |
191 {/foreach} | |
192 </table> | |
193 | |
194 {else} | |
195 現在、録画済データはありません | |
196 {/if} | |
197 | |
14
bbbc4f1ecf1d
added: remove video with real file.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
198 <div id="floatBox4Dialog">jQuery UI Dialog</div> |
1 | 199 |
200 {literal} | |
201 <script type="text/javascript"> | |
202 var INISet = { | |
203 prgRecordURL : 'record.php', // 簡易予約 | |
204 prgRecordPlusURL : 'recordp.php', // 詳細予約 | |
205 prgCancelURL : 'cancelReservation.php' // 予約キャンセル | |
206 } | |
207 </script> | |
208 {/literal} | |
209 </body> | |
210 </html> |