Mercurial > epgrec.yaz
annotate templates/index.html @ 29:ae5491d72470
modified: templates/recordedTable.html
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Sun, 26 Jul 2009 18:38:44 +0900 |
parents | f3bf1be1a51b |
children | 18df04305501 |
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 | |
12 <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> | |
13 <script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script> | |
14 <link rel="stylesheet" href="start/jquery-ui-1.7.2.custom.css" type="text/css"> | |
15 <script type="text/javascript" src="js/mdabasic.js"></script> | |
16 <script type="text/javascript"> | |
17 function tvtimes_scroll(){ | |
18 var t2max = $('#tvtimes2').position().left; | |
19 var ftmin = $('#float_titles').position().top; | |
20 tvtimes2scrl(); | |
21 $(window).scroll(function () { | |
22 $('#tvtimes').css('left', parseInt($(document ).scrollLeft())); | |
23 var newTop = parseInt($(document ).scrollTop()); | |
24 if(newTop < ftmin) {newTop = ftmin;} | |
25 $('#float_titles').css('top', newTop); | |
26 tvtimes2scrl(); | |
27 $('#float_follows').css('left', parseInt($(document ).scrollLeft())); | |
28 }); | |
29 $(window).resize(function () { tvtimes2scrl();}); | |
30 function tvtimes2scrl(){ | |
31 var inwidth = parseInt($('body').innerWidth()); | |
32 // IE6 | |
33 if ($.browser.msie && $.browser.version == 6){ inwidth = document.documentElement.clientWidth;} | |
34 var newLeft = inwidth - parseInt($('#tvtimes2').width()) + parseInt($( document ).scrollLeft()); | |
35 if(newLeft > t2max ) {newLeft = t2max} | |
36 $('#tvtimes2').css('left', newLeft); | |
37 $('#float_follows').width(inwidth); | |
38 } | |
39 } | |
40 function prg_hover(){ | |
41 function aClick(){ | |
42 var TG = $(this).children('.prg_dummy'); | |
43 var startTime = new Date(TG.children('.prg_start').html()); | |
44 var duration = parseInt(TG.children('.prg_duration').html()); | |
45 var endTime = new Date(startTime.getTime() + duration * 1000); | |
46 var prgID = parseInt(TG.children('.prg_id').html()); | |
47 | |
48 var str = '<div class="prg_title">' + TG.children('.prg_title').html() +'</div>' + | |
49 '<div class="prg_rec_cfg ui-corner-all"><div class="prg_channel"><span class=" labelLeft">チャンネル:</span><span class="bold">' + TG.children('.prg_channel').html() + '</span></div>' + | |
50 '<div class="prg_startTime" style="clear: left"><span class=" labelLeft">日時:</span>' + MDA.Days.time4Disp(startTime) + ' ~ ' + MDA.Days.time4DispH(endTime) + '</div>' + | |
51 '<div class="prg_duration" style="clear: left"><span class=" labelLeft">録画時間:</span><span class="bold">' + parseInt(duration / 60) +'</span>分' + ((duration % 60)>0?'<span class="bold">' + parseInt(duration % 60) + '</span>秒':'') + '</div>' + | |
52 '</div>'; | |
53 if ($(this).hasClass('prg_rec')) { | |
54 str += '<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.cancel(' + prgID + ')" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">予約キャンセル</a></div>'; | |
55 } else { | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
56 str += '<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.rec(' + prgID + ')" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">簡易予約</a> <a href="javascript:PRG.customform(' + prgID + ')" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">予約カスタマイズ</a></div>'; |
1 | 57 } |
58 $('#floatBox4Dialog').html(str); | |
59 $('#floatBox4Dialog').dialog('open', 'center'); | |
60 }; | |
61 $('.prg').hover( | |
62 function(){ | |
63 $('#tv_chs .prg_hover').removeClass('prg_hover'); | |
64 if($(this).hasClass('prg_none')) return ; | |
65 $(this).addClass('prg_hover'); | |
66 var TG = $(this).children('.prg_dummy'); | |
67 var startTime = new Date(TG.children('.prg_start').html()); | |
68 var duration = parseInt(TG.children('.prg_duration').html()); | |
69 var endTime = new Date(startTime.getTime() + duration * 1000); | |
70 var str = '<div class="prg_title">' + TG.children('.prg_title').html() + '</div>' + | |
71 '<div class="prg_desc"><span class="prg_sub">' + TG.children('.prg_channel').html() + ':' + MDA.Days.time4Disp(startTime) + '~' + MDA.Days.time4DispH(endTime) + ' </span>' + TG.children('.prg_desc').html() + '</div>'; | |
72 $('#prg_info').html('<div class="prg_dummy">' + str + '</div>').show(); | |
73 $(this).click(aClick); | |
74 }, | |
75 function(){ | |
76 $(this).removeClass('prg_hover');$('#prg_info').hide(); | |
77 $(this).unbind('click',aClick); | |
78 } | |
79 ); | |
80 } | |
81 var PRG = { | |
82 rec:function(id){ | |
83 $.get(INISet.prgRecordURL, { program_id: id } ,function(data){ | |
84 if(data.match(/^error/i)){ | |
85 alert(data); | |
18
19cd7816b2c1
change: draw main program table too fast.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
86 $('#floatBox4Dialog').dialog('close'); |
1 | 87 }else{ |
88 $('#prgID_' + id).addClass('prg_rec'); | |
89 $('#floatBox4Dialog').dialog('close'); | |
90 } | |
91 }); | |
92 }, | |
93 cancel:function(id){ | |
94 $.get(INISet.prgCancelURL, { program_id: id } ,function(data){ | |
95 if(data.match(/^error/i)){ | |
96 alert(data); | |
18
19cd7816b2c1
change: draw main program table too fast.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
97 $('#floatBox4Dialog').dialog('close'); |
1 | 98 }else{ |
99 $('#prgID_' + id).removeClass('prg_rec'); | |
100 $('#floatBox4Dialog').dialog('close'); | |
101 } | |
102 }); | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
103 }, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
104 customform:function(id) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
105 $('#floatBox4Dialog').dialog('close'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
106 $.get('reservationform.php', { program_id: id }, function(data) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
107 if(data.match(/^error/i)){ |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
108 alert(data); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
109 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
110 else { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
111 var str = data; |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
112 str += '<div style="margin:2em 0 1em 0;text-align:center;"><a href="javascript:PRG.customrec()" class="ui-state-default ui-corner-all ui-dialog-buttonpane button">予約する</a></div>'; |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
113 $('#floatBox4Dialog').html(str); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
114 $('#floatBox4Dialog').dialog('open', 'center'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
115 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
116 }); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
117 }, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
118 customrec:function() { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
119 var id_syear = $('#id_syear').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
120 var id_smonth = $('#id_smonth').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
121 var id_sday = $('#id_sday').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
122 var id_shour = $('#id_shour').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
123 var id_smin = $('#id_smin').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
124 var id_eyear = $('#id_eyear').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
125 var id_emonth = $('#id_emonth').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
126 var id_eday = $('#id_eday').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
127 var id_ehour = $('#id_ehour').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
128 var id_emin = $('#id_emin').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
129 var id_channel_id = $('#id_channel_id').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
130 var id_record_mode = $('#id_record_mode').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
131 var id_title = $('#id_title').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
132 var id_description = $('#id_description').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
133 var id_category_id = $('#id_category_id ').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
134 var id_program_id = $('#id_program_id').val(); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
135 var with_program_id = $('#id_program_id').attr('checked'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
136 |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
137 if( ! with_program_id ) id_program_id = 0; |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
138 |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
139 $.post('customReservation.php', { syear: id_syear, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
140 smonth: id_smonth, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
141 sday: id_sday, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
142 shour: id_shour, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
143 smin: id_smin, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
144 eyear: id_eyear, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
145 emonth: id_emonth, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
146 eday: id_eday, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
147 ehour: id_ehour, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
148 emin: id_emin, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
149 channel_id: id_channel_id, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
150 record_mode: id_record_mode, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
151 title: id_title, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
152 description: id_description, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
153 category_id: id_category_id, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
154 program_id: id_program_id }, function(data) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
155 if(data.match(/^error/i)){ |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
156 $('#floatBox4Dialog').dialog('close'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
157 alert(data); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
158 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
159 else { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
160 var id = parseInt(data); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
161 if( id ) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
162 $('#prgID_' + id).addClass('prg_rec'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
163 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
164 $('#floatBox4Dialog').dialog('close'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
165 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
166 }); |
1 | 167 } |
168 } | |
169 var CTG = { | |
170 CN:'ctg', | |
171 CV:'0.1', | |
172 defaultCk:[], | |
173 INI:function(){ | |
174 var Ck = this.CkGet()[1]; | |
175 if(Ck){ $.each(Ck.split(','), function(){CTG.select(this);})} | |
176 }, | |
177 select:function(ctg){ | |
178 if($('#category_select .ctg-hide.ctg_'+ctg).length){ | |
179 $('#tv_chs .ctg_'+ctg).removeClass('ctg-hide'); | |
180 $('#category_select a.ctg_'+ctg).removeClass('ctg-hide'); | |
181 } else { | |
182 $('#tv_chs .ctg_'+ctg).addClass('ctg-hide'); | |
183 $('#category_select a.ctg_'+ctg).addClass('ctg-hide'); | |
184 } | |
185 this.oCk(); | |
186 }, | |
187 toggle:function (){$('#category_select ul').toggle();}, | |
188 oCk:function(){ | |
189 var T=$('#category_select ul li a.ctg-hide'); | |
190 var X=[]; | |
191 $.each(T.get(), function(){ | |
192 $(this).attr('class').match(/ctg_([^ ]+)/); | |
193 var TMC=RegExp.$1; | |
194 X.push(TMC); | |
195 }); | |
196 this.CkSet([X.join(',')]); | |
197 }, | |
198 CkGet:function (){ | |
199 var Ck = MDA.Cookie.get(this.CN); | |
200 if(!Ck){return this.defaultCk}; | |
201 Ck=Ck.replace(/^([^;]+;)/,''); | |
202 return Ck.split('+'); | |
203 }, | |
204 CkSet:function(V){ | |
205 MDA.Cookie.set(this.CN,'ver='+this.CV+'+'+V.join('+')); | |
206 } | |
207 }; | |
208 var nowBar = { | |
209 defaultID:'tableNowBas', | |
210 startTime:null, | |
211 endTime:null, | |
212 INI:function(){ | |
213 if (INISet.tableStartTime && INISet.tableStartTime && INISet.dotMin) { | |
214 $('#tvtable').append('<div id="' + this.defaultID + '" style="display:none">now</div>'); | |
215 this.startTime = new Date(INISet.tableStartTime); | |
216 this.endTime = new Date(INISet.tableEndTime); | |
217 $('#' + this.defaultID).width($('#float_titles').width()); | |
218 this.ch(); | |
219 } | |
220 }, | |
221 ch:function(){ | |
222 var now = new Date(); | |
223 if(this.startTime){ | |
224 if((now >= this.startTime) && (this.endTime >= now)){ | |
225 // console.log((now - this.startTime) / 60000); | |
226 $('#' + this.defaultID).css({top:(now - this.startTime) / 60000 * INISet.dotMin}).show() | |
227 } else { | |
228 $('#' + this.defaultID).hide() | |
229 } | |
230 } | |
231 } | |
232 } | |
233 | |
234 MDA.SCR = { | |
235 CN:'scr', | |
236 CV:'0.1', | |
237 defaultCk:{md:'',x:0,y:0}, | |
238 jqSel:[{sel:'#jump-time a.jump',md:'x'},{sel:'#jump-day a.jump',md:'xy'},{sel:'#jump-day a.jump-today',md:'x'},{sel:'#jump-broadcast a.jump',md:'y'}], | |
239 INI:function(){ | |
240 // this.defaultCk.y = $('#float_titles').position().top; | |
241 $.each(this.jqSel, function(){ | |
242 var md = this.md; | |
243 $(this.sel).click(function(){MDA.SCR.oCk(md)}) | |
244 }); | |
245 var Ck = this.CkGet(); | |
246 // console.log(Ck); | |
247 var x = (Ck.md.indexOf('x')>-1)?Ck.x:this.defaultCk.x; | |
248 var y = (Ck.md.indexOf('y')>-1)?Ck.y:this.defaultCk.y; | |
249 if (Ck.md) { | |
250 window.scrollBy(x, y); | |
251 } | |
252 this.CkClear(); | |
253 }, | |
254 channel:{ | |
255 save:function(){}, | |
256 load:function(){} | |
257 }, | |
258 time: { | |
259 }, | |
260 oCk:function(xy){ | |
261 this.CkSet(['md=' + ((!xy)?'xy':xy), | |
262 'x=' + $(document ).scrollLeft(), | |
263 'y=' + $(document ).scrollTop()]); | |
264 }, | |
265 CkGet:function (){ | |
266 var Ck = MDA.Cookie.get(this.CN); | |
267 if(!Ck){return this.defaultCk}; | |
268 Ck=Ck.replace(/^([^;]+;)/,'').split('+'); | |
269 var ret = {}; | |
270 $.each(Ck, function(){ | |
271 var str = this.split('=', 2); | |
272 ret[str[0]] = str[1]; | |
273 }) | |
274 return ret; | |
275 }, | |
276 CkSet:function(V){ | |
277 MDA.Cookie.set(this.CN,'ver='+this.CV+'+'+V.join('+')); | |
278 }, | |
279 CkClear:function(){ | |
280 MDA.Cookie.del(this.CN); | |
281 } | |
282 }; | |
283 | |
284 $(document).ready(function () { | |
285 MDA.Cookie.CookieName = 'tvProgmas_'; | |
286 CTG.toggle(); | |
287 tvtimes_scroll(); | |
288 prg_hover(); | |
289 var DG = $('#floatBox4Dialog'); | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
290 DG.dialog({title:'録画予約',width:600}); |
1 | 291 DG.dialog('close'); |
292 nowBar.INI(); | |
293 CTG.INI(); | |
294 MDA.SCR.INI(); // 番組表の位置保存 | |
295 }); | |
296 | |
297 | |
298 </script> | |
299 | |
300 <style type="text/css"> | |
301 <!-- | |
302 body {padding:0;margin:0;font-size:10pt;} | |
303 a {text-decoration:none;} | |
304 | |
305 .bold {font-weight:bold;} | |
306 .small {font-size:75%;} | |
307 | |
308 h2 {padding: 4px} | |
309 | |
310 #float_titles {position:absolute;background-image: url(imgs/trancBG50.png);} | |
311 | |
312 #float_titles div.set.ctg_sel {background-color:#BBB;color:#3CF} | |
313 #float_titles .ctg_sel a{color:#111;} | |
314 | |
315 #float_titles div.set {float:left;background-color:#444;padding:4px;margin:4px;} | |
316 #float_titles span.title {float:left;color:#ACF;} | |
317 #float_titles ul {float:left;padding:0;margin:0;} | |
318 #float_titles ul li {float:left;list-style:none;margin:0 0 0 4px;} | |
319 #float_titles li a{padding:1px 4px;background-color:#555;color:#FFF;} | |
320 #float_titles li.selected a{background-color:#48B;} | |
321 #float_titles li a:hover{background-color:#28D;} | |
322 | |
323 #float_titles, #tvtable {} | |
324 #tvtable {line-height:1.2em;width:100%;position:relative;} | |
325 #tvtimes,#tvtimes2 {position:absolute; background-image: url(imgs/trancBG70.png);} | |
326 #tvtimes,#tvtimes2, .tvtimeDM {width:40px;} | |
327 #tv_chs {padding-left:40px;padding-right:40px;} | |
328 .tvtime { | |
329 height:120px; | |
330 color:#EEE; | |
331 text-align:center; | |
332 font-weight:bold; | |
333 font-size:120%; | |
334 background-image: url(imgs/dot2.gif); | |
335 background-repeat: repeat-x; | |
336 background-position: left bottom; | |
337 } | |
338 #tvtable div.tvtimetop {padding:8px 0px;} | |
339 #tvtable div.ch_set {width:150px;float:left;background-color:#BBB;} | |
340 #tvtable div.ch_title, #tvtable div.prg {margin-right:2px;} | |
341 #tvtable div.ch_title {padding:8px 0px;background-color:#333;color:#DDD;font-weight:bold;text-align:center} | |
342 #tvtable div.prg { | |
343 overflow:hidden; | |
344 color:#444; | |
345 background-image: url(imgs/dot2.gif); | |
346 background-image: url(imgs/prg_bg2.png); | |
347 background-repeat: repeat-x; | |
348 background-position: left bottom; | |
349 -moz-border-radius: 0.6em 0.6em 0.3em 0.3em; | |
350 -webkit-border-radius: 0.6em; | |
351 -webkit-border-bottom-right-radius: 0.3em; | |
352 -webkit-border-bottom-left-radius: 0.3em; | |
353 } | |
354 #tvtable div.prg_none {background-color:#eee;} | |
355 #tvtable div.prg_dummy {margin:3px 6px;} | |
356 #tvtable div.prg_title {color:#111;font-weight:bold;} | |
357 #tvtable div.prg_subtitle {font-size:80%;} | |
358 #tvtable div.prg_desc {font-size:80%;} | |
359 | |
360 #tvtable div.prg_start,#tvtable div.prg_duration,#tvtable div.prg_channel ,#tvtable div.prg_id {display: none;} | |
361 | |
362 #tvtable div.ctg_news, #category_select a.ctg_news {background-color: #FFFFD8;} | |
363 #tvtable div.ctg_etc, #category_select a.ctg_etc {background-color: #FFFFFF;} | |
364 #tvtable div.ctg_information, #category_select a.ctg_information {background-color: #F2D8FF;} | |
365 #tvtable div.ctg_sports, #category_select a.ctg_sports {background-color: #D8FFFF;} | |
366 #tvtable div.ctg_cinema, #category_select a.ctg_cinema {background-color: #FFD8D8;} | |
367 #tvtable div.ctg_music, #category_select a.ctg_music {background-color: #D8D8FF;} | |
368 #tvtable div.ctg_drama, #category_select a.ctg_drama {background-color: #D8FFD8;} | |
369 #tvtable div.ctg_anime, #category_select a.ctg_anime {background-color: #FFE4C8;} | |
370 #tvtable div.ctg_variety, #category_select a.ctg_variety {background-color: #FFD2EB;} | |
371 #tvtable div.ctg_10, #category_select a.ctg_10 {background-color: #E4F4F4;} | |
372 #tvtable div.ctg-hide, #category_select a.ctg-hide {background-color: #F8F8F8;color:#888;} | |
373 #tvtable div.ctg-hide .prg_title, #category_select a.ctg-hide .prg_title{color:#666;} | |
374 #tvtable div.prg_rec {background-color: #F55;color:#FEE} | |
375 #tvtable div.prg_rec .prg_title,#tvtable div.prg_hover .prg_title {color:white;} | |
376 #tvtable div.prg_hover {background-color: #28D;color:#EFF} | |
377 | |
378 #float_titles { z-index:100} | |
379 #float_titles div.ch_title {width:150px;float:left;color:#FFF;font-weight:bold;text-align:center} | |
380 #float_titles div.ch_title div{padding:8px 0px;margin:0 6px 0 4px;background-image: url(imgs/trancBG50.png);} | |
381 | |
382 #float_follows {position:absolute;} | |
383 #prg_info { | |
384 display:none; | |
385 position:absolute; | |
386 top:0;left:0; | |
387 width:100%; | |
388 background-color:#246; | |
389 color:#BDF; | |
390 height:80px; | |
391 } | |
392 #prg_info div.prg_dummy{margin:4px 20px;} | |
393 #prg_info div.prg_title {font-weight:bold;font-size:120%;color:#FFF;} | |
394 #prg_info span.prg_sub {color:#FFF;} | |
395 | |
396 #tableNowBas {position:absolute;background:red;width:100%;top:190px;height:2px;overflow:hidden;} | |
397 | |
398 | |
399 #floatBox4Dialog .prg_title{font-size:120%;font-weight:bold;padding:0.4em 0;text-align:center;} | |
400 #floatBox4Dialog .prg_rec_cfg{background:#EEE;padding:1em 2em;margin:0.4em 0;} | |
401 #floatBox4Dialog .labelLeft {width:8em;float:left;text-align:right;} | |
402 #floatBox4Dialog .button {padding:0.4em 1em;} | |
403 --> | |
404 </style> | |
405 | |
406 | |
407 {/literal} | |
408 | |
409 | |
410 </head> | |
411 | |
412 <body> | |
413 | |
414 <h2>{$sitetitle}</h2> | |
415 | |
416 | |
417 <div id="float_titles" style="width: {math equation="x + 80" x=$chs_width}px;height:120px;"> | |
418 <div id="float_follows"> | |
419 | |
420 <div class="set ctg_sel" id="category_select"> | |
421 <span class="title"><a href="javascript:CTG.toggle()">強調表示</a></span> | |
422 | |
423 <ul> | |
424 {foreach from=$cats item=cat} | |
425 <li><a href="javascript:CTG.select('{$cat.name_en}');" class="ctg_{$cat.name_en}">{$cat.name_jp}</a></li> | |
426 {/foreach} | |
427 </ul> | |
428 </div> | |
429 | |
430 <div id="time_selects"> | |
431 <div class="set" id="jump-broadcast" > | |
432 <span class="title">放送波選択</span> | |
433 <ul> | |
434 {foreach from=$types item=type } | |
435 <li {$type.selected}><a class="jump" href="{$type.link}">{$type.name}</a></li> | |
436 {/foreach} | |
437 </ul><br style="clear:left;" /> | |
438 </div> | |
439 | |
440 <div class="set" id="jump-time"> | |
441 <span class="title">時間</span> | |
442 <ul> | |
443 {foreach from=$toptimes item=top} | |
444 <li><a class="jump" href="{$top.link}">{$top.hour}~</a></li> | |
445 {/foreach} | |
446 </ul><br style="clear:left;" /> | |
447 </div> | |
448 <br style="clear:left;" /> | |
449 | |
450 <div class="set"> | |
451 <ul> | |
452 <li><a href="programTable.php">番組検索</a></li> | |
453 <li><a href="reservationTable.php">録画予約一覧</a></li> | |
454 <li><a href="recordedTable.php">録画済一覧</a></li> | |
455 </ul> | |
456 </div> | |
457 | |
458 <div class="set" id="jump-day" > | |
459 <span class="title">日付</span> | |
460 <ul> | |
461 {foreach from=$days item=day} | |
462 <li {$day.selected}><a {if $day.d eq "現在" } class="jump-today" {else} class="jump" {/if} href="{$day.link}">{$day.d}{$day.ofweek}</a></li> | |
463 {/foreach} | |
464 </ul><br style="clear:left;" /> | |
465 </div> | |
466 | |
467 | |
468 </div> | |
469 <br style="clear:left;" /> | |
470 <div id="prg_info"><div class="dummy">test</div></div> | |
471 </div> | |
472 | |
473 <div style="position:absolute;bottom:0;"> | |
474 <div class="tvtimeDM" style="float:left;"> </div> | |
475 {foreach from=$programs item=program } | |
476 <div class="ch_title"><div>{$program.station_name}</div></div> | |
477 {/foreach} | |
478 </div> | |
479 <br style="clear:left;" /> | |
480 <div id="prg_info"><div class="dummy"> </div></div> | |
481 </div> | |
482 | |
483 <div id="float_titles_dummy" style="width:1410px;height:120px;"> </div> | |
484 | |
485 | |
486 <div id="tvtable"> | |
487 | |
488 <div id="tvtimes"> | |
489 {foreach from=$tvtimes item=time} | |
490 <div class="tvtime">{$time}</div> | |
491 {/foreach} | |
492 </div> | |
493 | |
494 <div id="tv_chs" style="width: {$chs_width}px" > | |
495 {foreach from=$programs item=program } | |
496 <div class="ch_set" style="width: {$ch_set_width}px" > | |
497 <div class="ch_programs"> | |
498 {foreach from=$program.list item=item } | |
499 <div {if $item.id}id="prgID_{$item.id}"{/if} class="prg {if ! $item.id}prg_none {/if} ctg_{$item.category_name}{if $item.rec gt 0 } prg_rec{/if}" style="height:{$item.height}px;"> | |
500 <div class="prg_dummy"> | |
501 <div class="prg_title">{$item.title|escape}</div> | |
502 <div class="prg_subtitle">{$item.starttime}</div> | |
503 <div class="prg_desc">{$item.description|escape}</div> | |
504 <div class="prg_channel">{$item.channel}</div> | |
505 <div class="prg_start">{$item.prg_start}</div> | |
506 <div class="prg_duration">{$item.duration}</div> | |
507 <div class="prg_id">{$item.id}</div> | |
508 </div> | |
509 </div> | |
510 {/foreach} | |
511 </div> | |
512 </div> | |
513 {/foreach} | |
514 </div> | |
515 | |
516 <div id="tvtimes2" style="top : 0px; left: {math equation="x + 40" x=$chs_width}px" > | |
517 {foreach from=$tvtimes item=time} | |
518 <div class="tvtime">{$time}</div> | |
519 {/foreach} | |
520 </div> | |
521 </div> | |
522 | |
523 | |
524 | |
525 <div id="floatBox4Dialog">jQuery UI Dialog</div> | |
526 | |
527 {literal} | |
528 <script type="text/javascript"> | |
529 var INISet = { | |
530 prgRecordURL : 'simpleReservation.php', // 簡易予約 | |
531 prgRecordPlusURL : 'recordp.php', // 詳細予約 | |
532 prgCancelURL : 'cancelReservation.php', // 予約キャンセル | |
533 dotMin : 2, | |
534 tableStartTime : {/literal}'{$top_time}', | |
535 tableEndTime : '{$last_time}'{literal} | |
536 } | |
537 </script> | |
538 {/literal} | |
539 </body> | |
540 </html> |