Mercurial > epgrec.yaz
annotate templates/reservationTable.html @ 66:3d6e7c606896
testing: auto record with mode
author | yoneda <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Tue, 03 Nov 2009 14:51:44 +0900 |
parents | 03107333d942 |
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> | |
25
03107333d942
add: editable reserve program's title & description
yoneda <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> |
03107333d942
add: editable reserve program's title & description
yoneda <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"> |
15 var PRG = { | |
16 rec:function(id){ | |
17 $.get(INISet.prgCancelURL, { reserve_id: id } ,function(data){ | |
18 | |
19 if(data.match(/^error/i)){ | |
20 alert(data); | |
21 } | |
22 else { | |
23 $('#resid_' + id ).hide(); | |
24 } | |
25 }); | |
25
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
26 }, |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
27 editdialog:function(id) { |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
28 var str; |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
29 str = '<div class="prg_title">予約ID:' + id + '</div>'; |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
30 str += '<input type="hidden" name="reserve_id" id="id_reserve_id" value="' + id + '" />'; |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
31 str += '<div><span class="labelLeft">タイトル</span><input name="title" id="id_title" size="30" value="'+ $('#tid_' + id ).html() + '" /></div>'; |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
32 str += '<div><span class="labelLeft">概要</span><textarea name="description" id="id_description" cols="30" rows="5" >' + $('#did_' + id ).html() + '</textarea></div>'; |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
33 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>'; |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
34 |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
35 $('#floatBox4Dialog').html(str); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
36 $('#floatBox4Dialog').dialog('open','center'); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
37 }, |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
38 edit:function() { |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
39 var id_reserve_id = $('#id_reserve_id').val(); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
40 var id_title = $('#id_title').val(); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
41 var id_description = $('#id_description').val(); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
42 |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
43 $.post('changeReservation.php', { reserve_id: id_reserve_id, |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
44 title: id_title, |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
45 description: id_description }, function( data ) { |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
46 if(data.match(/^error/i)){ |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
47 alert(data); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
48 $('#floatBox4Dialog').dialog('close'); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
49 |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
50 } |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
51 else { |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
52 $('#tid_' + id_reserve_id ).html( id_title ); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
53 $('#did_' + id_reserve_id ).html( id_description ); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
54 $('#floatBox4Dialog').dialog('close'); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
55 } |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
56 }); |
1 | 57 } |
58 } | |
25
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
59 $(document).ready(function () { |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
60 var DG = $('#floatBox4Dialog'); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
61 DG.dialog({title:'予約編集',width:500}); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
62 DG.dialog('close'); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
63 }); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
64 |
1 | 65 </script> |
66 <style type="text/css"> | |
67 <!-- | |
68 body {padding:4px;margin:0;font-size:10pt;} | |
69 a {text-decoration:none;} | |
70 | |
71 table#reservation_table { | |
72 width: 800px; | |
73 border: 1px #BBB solid; | |
74 border-collapse: collapse; | |
75 border-spacing: 0; | |
76 } | |
77 | |
78 table#reservation_table th { | |
79 padding: 5px; | |
80 border: #E3E3E3 solid; | |
81 border-width: 0 0 1px 1px; | |
82 background: #BBB; | |
83 font-weight: bold; | |
84 line-height: 120%; | |
85 text-align: center; | |
86 } | |
87 table#reservation_table td { | |
88 padding: 5px; | |
89 border: 1px #BBB solid; | |
90 border-width: 0 0 1px 1px; | |
91 text-align: center; | |
92 } | |
93 | |
94 table#reservation_table tr.ctg_news, #category_select a.ctg_news {background-color: #FFFFD8;} | |
95 table#reservation_table tr.ctg_etc, #category_select a.ctg_etc {background-color: #FFFFFF;} | |
96 table#reservation_table tr.ctg_information, #category_select a.ctg_information {background-color: #F2D8FF;} | |
97 table#reservation_table tr.ctg_sports, #category_select a.ctg_sports {background-color: #D8FFFF;} | |
98 table#reservation_table tr.ctg_cinema, #category_select a.ctg_cinema {background-color: #FFD8D8;} | |
99 table#reservation_table tr.ctg_music, #category_select a.ctg_music {background-color: #D8D8FF;} | |
100 table#reservation_table tr.ctg_drama, #category_select a.ctg_drama {background-color: #D8FFD8;} | |
101 table#reservation_table tr.ctg_anime, #category_select a.ctg_anime {background-color: #FFE4C8;} | |
102 table#reservation_table tr.ctg_variety, #category_select a.ctg_variety {background-color: #FFD2EB;} | |
103 table#reservation_table tr.ctg_10, #category_select a.ctg_10 {background-color: #E4F4F4;} | |
104 | |
25
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
105 #floatBox4Dialog .prg_title{font-size:120%;font-weight:bold;padding:0.4em 0;text-align:center;} |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
106 #floatBox4Dialog .prg_rec_cfg{background:#EEE;padding:1em 2em;margin:0.4em 0;} |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
107 #floatBox4Dialog .labelLeft {width:8em;float:left;text-align:right;} |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
108 #floatBox4Dialog .button {padding:0.4em 1em;} |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
109 |
1 | 110 |
111 --> | |
112 </style> | |
113 {/literal} | |
114 | |
115 </head> | |
116 | |
117 <body> | |
118 | |
119 <h2>{$sitetitle}</h2> | |
120 | |
121 <div><a href="index.php">番組表に戻る</a></div> | |
122 | |
123 {if count($reservations)} | |
124 <table id="reservation_table"> | |
125 <tr> | |
126 <th>id</th> | |
127 <th>種別</th> | |
128 <th>ch</th> | |
129 <th>開始</th> | |
130 <th>終了</th> | |
131 <th>モード</th> | |
132 <th>タイトル</th> | |
133 <th>内容</th> | |
134 <th><a href="keywordTable.php">自動ID</a></th> | |
135 <th>削除</th> | |
136 </tr> | |
137 | |
138 {foreach from=$reservations item=reserve} | |
139 <tr id="resid_{$reserve.id}" class="ctg_{$reserve.cat}"> | |
140 <td>{$reserve.id}</td> | |
141 <td>{$reserve.type}</td> | |
25
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
142 <td id="chid_{$reserve.id}">{$reserve.channel}</td> |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
143 <td id="stid_{$reserve.id}">{$reserve.starttime}</td> |
1 | 144 <td>{$reserve.endtime}</td> |
145 <td>{$reserve.mode}</td> | |
25
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
146 <td style="cursor: pointer" id="tid_{$reserve.id}" onClick="javascript:PRG.editdialog('{$reserve.id}')">{$reserve.title|escape}</td> |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
147 <td style="cursor: pointer" id="did_{$reserve.id}" onClick="javascript:PRG.editdialog('{$reserve.id}')">{$reserve.description|escape}</td> |
1 | 148 <td>{if $reserve.autorec}{$reserve.autorec}{/if}</td> |
149 <td><input type="button" value="削除" onClick="javascript:PRG.rec('{$reserve.id}')" /></td> | |
150 </tr> | |
151 {/foreach} | |
152 </table> | |
153 {else} | |
154 現在、予約はありません | |
155 {/if} | |
156 | |
25
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
157 <div id="floatBox4Dialog">jQuery UI Dialog</div> |
1 | 158 |
159 | |
160 {literal} | |
161 <script type="text/javascript"> | |
162 var INISet = { | |
163 prgRecordURL : 'record.php', // 簡易予約 | |
164 prgRecordPlusURL : 'recordp.php', // 詳細予約 | |
165 prgCancelURL : 'cancelReservation.php' // 予約キャンセル | |
166 } | |
167 </script> | |
168 {/literal} | |
169 </body> | |
170 </html> |