Mercurial > epgrec.yaz
annotate templates/index.html @ 120:cb04c9ca1cb0
add: チャンネルスキップの追加途中(改造中)
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Sun, 14 Mar 2010 23:49:11 +0900 |
parents | cb7da56c4198 |
children | ea54c3128da3 |
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">c潟鐚</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">篋膣c潟祉</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 = { | |
77 | 82 chdialog:function(disc){ |
83 $('#channelDialog').dialog('close'); | |
84 $.get('channelInfo.php', { channel_disc: disc },function(data) { | |
85 if(data.match(/^error/i)){ | |
86 alert(data); | |
87 } | |
88 else { | |
89 var str = data; | |
90 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>'; | |
91 $('#channelDialog').html(str); | |
92 $('#channelDialog').dialog('open', 'center'); | |
93 | |
94 } | |
95 }); | |
96 | |
97 }, | |
98 chupdate:function() { | |
99 var v_sid = $('#id_sid').val(); | |
100 var v_channel_disc = $('#id_disc').val(); | |
101 $.post('channelSetSID.php', { channel_disc: v_channel_disc, | |
102 sid: v_sid }, function(data) { | |
103 | |
104 $('#channelDialog').dialog('close'); | |
105 }); | |
106 }, | |
1 | 107 rec:function(id){ |
108 $.get(INISet.prgRecordURL, { program_id: id } ,function(data){ | |
109 if(data.match(/^error/i)){ | |
110 alert(data); | |
18
19cd7816b2c1
change: draw main program table too fast.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
111 $('#floatBox4Dialog').dialog('close'); |
1 | 112 }else{ |
113 $('#prgID_' + id).addClass('prg_rec'); | |
114 $('#floatBox4Dialog').dialog('close'); | |
115 } | |
116 }); | |
117 }, | |
118 cancel:function(id){ | |
119 $.get(INISet.prgCancelURL, { program_id: id } ,function(data){ | |
120 if(data.match(/^error/i)){ | |
121 alert(data); | |
18
19cd7816b2c1
change: draw main program table too fast.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
122 $('#floatBox4Dialog').dialog('close'); |
1 | 123 }else{ |
124 $('#prgID_' + id).removeClass('prg_rec'); | |
125 $('#floatBox4Dialog').dialog('close'); | |
126 } | |
127 }); | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
128 }, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
129 customform:function(id) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
130 $('#floatBox4Dialog').dialog('close'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
131 $.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
|
132 if(data.match(/^error/i)){ |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
133 alert(data); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
134 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
135 else { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
136 var str = data; |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
137 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
|
138 $('#floatBox4Dialog').html(str); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
139 $('#floatBox4Dialog').dialog('open', 'center'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
140 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
141 }); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
142 }, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
143 customrec:function() { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
144 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
|
145 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
|
146 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
|
147 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
|
148 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
|
149 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
|
150 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
|
151 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
|
152 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
|
153 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
|
154 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
|
155 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
|
156 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
|
157 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
|
158 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
|
159 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
|
160 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
|
161 |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
162 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
|
163 |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
164 $.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
|
165 smonth: id_smonth, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
166 sday: id_sday, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
167 shour: id_shour, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
168 smin: id_smin, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
169 eyear: id_eyear, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
170 emonth: id_emonth, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
171 eday: id_eday, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
172 ehour: id_ehour, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
173 emin: id_emin, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
174 channel_id: id_channel_id, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
175 record_mode: id_record_mode, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
176 title: id_title, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
177 description: id_description, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
178 category_id: id_category_id, |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
179 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
|
180 if(data.match(/^error/i)){ |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
181 $('#floatBox4Dialog').dialog('close'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
182 alert(data); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
183 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
184 else { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
185 var id = parseInt(data); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
186 if( id ) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
187 $('#prgID_' + id).addClass('prg_rec'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
188 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
189 $('#floatBox4Dialog').dialog('close'); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
190 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
191 }); |
120 | 192 }, |
193 CH_Skip: 0, | |
194 toggle:function() { | |
195 if( this.CH_Skip ) { | |
196 $('#float_titles').width(INISet.num_all_ch * INISet.ch_width + 80); | |
197 $('#tv_chs').width(INISet.num_all_ch * INISet.ch_width ); | |
198 $('#tvtimes2').css( { left: INISet.num_all_ch * INISet.ch_width + 40 } ).show(); | |
199 tvtimes_scroll(); | |
200 $('#ch_title_bar div.ch_title_skip').show(); | |
201 $('#tv_chs div.ch_set_skip').show(); | |
202 | |
203 this.CH_Skip = 0; | |
204 } | |
205 else { | |
206 $('#tv_chs div.ch_set_skip').hide(); | |
207 $('#ch_title_bar div.ch_title_skip').hide(); | |
208 $('#float_titles').width( INISet.num_ch * INISet.ch_width + 80 ); | |
209 $('#tv_chs').width( INISet.num_ch * INISet.ch_width ); | |
210 $('#tvtimes2').css( { left: INISet.num_ch * INISet.ch_width + 40 }).show(); | |
211 tvtimes_scroll(); | |
212 this.CH_Skip = 1; | |
213 } | |
1 | 214 } |
215 } | |
216 var CTG = { | |
217 CN:'ctg', | |
218 CV:'0.1', | |
219 defaultCk:[], | |
220 INI:function(){ | |
221 var Ck = this.CkGet()[1]; | |
222 if(Ck){ $.each(Ck.split(','), function(){CTG.select(this);})} | |
223 }, | |
224 select:function(ctg){ | |
225 if($('#category_select .ctg-hide.ctg_'+ctg).length){ | |
226 $('#tv_chs .ctg_'+ctg).removeClass('ctg-hide'); | |
227 $('#category_select a.ctg_'+ctg).removeClass('ctg-hide'); | |
228 } else { | |
229 $('#tv_chs .ctg_'+ctg).addClass('ctg-hide'); | |
230 $('#category_select a.ctg_'+ctg).addClass('ctg-hide'); | |
231 } | |
232 this.oCk(); | |
233 }, | |
234 toggle:function (){$('#category_select ul').toggle();}, | |
235 oCk:function(){ | |
236 var T=$('#category_select ul li a.ctg-hide'); | |
237 var X=[]; | |
238 $.each(T.get(), function(){ | |
239 $(this).attr('class').match(/ctg_([^ ]+)/); | |
240 var TMC=RegExp.$1; | |
241 X.push(TMC); | |
242 }); | |
243 this.CkSet([X.join(',')]); | |
244 }, | |
245 CkGet:function (){ | |
246 var Ck = MDA.Cookie.get(this.CN); | |
247 if(!Ck){return this.defaultCk}; | |
248 Ck=Ck.replace(/^([^;]+;)/,''); | |
249 return Ck.split('+'); | |
250 }, | |
251 CkSet:function(V){ | |
252 MDA.Cookie.set(this.CN,'ver='+this.CV+'+'+V.join('+')); | |
253 } | |
254 }; | |
255 var nowBar = { | |
256 defaultID:'tableNowBas', | |
257 startTime:null, | |
258 endTime:null, | |
259 INI:function(){ | |
260 if (INISet.tableStartTime && INISet.tableStartTime && INISet.dotMin) { | |
261 $('#tvtable').append('<div id="' + this.defaultID + '" style="display:none">now</div>'); | |
262 this.startTime = new Date(INISet.tableStartTime); | |
263 this.endTime = new Date(INISet.tableEndTime); | |
264 $('#' + this.defaultID).width($('#float_titles').width()); | |
265 this.ch(); | |
266 } | |
267 }, | |
268 ch:function(){ | |
269 var now = new Date(); | |
270 if(this.startTime){ | |
271 if((now >= this.startTime) && (this.endTime >= now)){ | |
272 // console.log((now - this.startTime) / 60000); | |
273 $('#' + this.defaultID).css({top:(now - this.startTime) / 60000 * INISet.dotMin}).show() | |
274 } else { | |
275 $('#' + this.defaultID).hide() | |
276 } | |
277 } | |
278 } | |
279 } | |
280 | |
281 MDA.SCR = { | |
282 CN:'scr', | |
283 CV:'0.1', | |
284 defaultCk:{md:'',x:0,y:0}, | |
285 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'}], | |
286 INI:function(){ | |
287 // this.defaultCk.y = $('#float_titles').position().top; | |
288 $.each(this.jqSel, function(){ | |
289 var md = this.md; | |
290 $(this.sel).click(function(){MDA.SCR.oCk(md)}) | |
291 }); | |
292 var Ck = this.CkGet(); | |
293 // console.log(Ck); | |
294 var x = (Ck.md.indexOf('x')>-1)?Ck.x:this.defaultCk.x; | |
295 var y = (Ck.md.indexOf('y')>-1)?Ck.y:this.defaultCk.y; | |
296 if (Ck.md) { | |
297 window.scrollBy(x, y); | |
298 } | |
299 this.CkClear(); | |
300 }, | |
301 channel:{ | |
302 save:function(){}, | |
303 load:function(){} | |
304 }, | |
305 time: { | |
306 }, | |
307 oCk:function(xy){ | |
308 this.CkSet(['md=' + ((!xy)?'xy':xy), | |
309 'x=' + $(document ).scrollLeft(), | |
310 'y=' + $(document ).scrollTop()]); | |
311 }, | |
312 CkGet:function (){ | |
313 var Ck = MDA.Cookie.get(this.CN); | |
314 if(!Ck){return this.defaultCk}; | |
315 Ck=Ck.replace(/^([^;]+;)/,'').split('+'); | |
316 var ret = {}; | |
317 $.each(Ck, function(){ | |
318 var str = this.split('=', 2); | |
319 ret[str[0]] = str[1]; | |
320 }) | |
321 return ret; | |
322 }, | |
323 CkSet:function(V){ | |
324 MDA.Cookie.set(this.CN,'ver='+this.CV+'+'+V.join('+')); | |
325 }, | |
326 CkClear:function(){ | |
327 MDA.Cookie.del(this.CN); | |
328 } | |
329 }; | |
330 | |
331 $(document).ready(function () { | |
332 MDA.Cookie.CookieName = 'tvProgmas_'; | |
333 CTG.toggle(); | |
334 tvtimes_scroll(); | |
335 prg_hover(); | |
336 var DG = $('#floatBox4Dialog'); | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
18
diff
changeset
|
337 DG.dialog({title:'牙私膣',width:600}); |
1 | 338 DG.dialog('close'); |
77 | 339 |
340 var DG2 = $('#channelDialog'); | |
341 DG2.dialog({title:'c潟',width:600}); | |
342 DG2.dialog('close'); | |
343 | |
120 | 344 PRG.toggle(); |
345 | |
1 | 346 nowBar.INI(); |
347 CTG.INI(); | |
348 MDA.SCR.INI(); // 腟茵篏臀篆絖 | |
349 }); | |
350 | |
351 | |
352 </script> | |
353 | |
354 <style type="text/css"> | |
355 <!-- | |
356 body {padding:0;margin:0;font-size:10pt;} | |
357 a {text-decoration:none;} | |
358 | |
359 .bold {font-weight:bold;} | |
360 .small {font-size:75%;} | |
361 | |
362 h2 {padding: 4px} | |
363 | |
364 #float_titles {position:absolute;background-image: url(imgs/trancBG50.png);} | |
365 | |
366 #float_titles div.set.ctg_sel {background-color:#BBB;color:#3CF} | |
367 #float_titles .ctg_sel a{color:#111;} | |
368 | |
369 #float_titles div.set {float:left;background-color:#444;padding:4px;margin:4px;} | |
370 #float_titles span.title {float:left;color:#ACF;} | |
371 #float_titles ul {float:left;padding:0;margin:0;} | |
372 #float_titles ul li {float:left;list-style:none;margin:0 0 0 4px;} | |
373 #float_titles li a{padding:1px 4px;background-color:#555;color:#FFF;} | |
374 #float_titles li.selected a{background-color:#48B;} | |
375 #float_titles li a:hover{background-color:#28D;} | |
376 | |
377 #float_titles, #tvtable {} | |
378 #tvtable {line-height:1.2em;width:100%;position:relative;} | |
379 #tvtimes,#tvtimes2 {position:absolute; background-image: url(imgs/trancBG70.png);} | |
380 #tvtimes,#tvtimes2, .tvtimeDM {width:40px;} | |
381 #tv_chs {padding-left:40px;padding-right:40px;} | |
382 .tvtime { | |
34 | 383 height:{/literal}{$height_per_hour}{literal}px; |
1 | 384 color:#EEE; |
385 text-align:center; | |
386 font-weight:bold; | |
387 font-size:120%; | |
388 background-image: url(imgs/dot2.gif); | |
389 background-repeat: repeat-x; | |
390 background-position: left bottom; | |
391 } | |
392 #tvtable div.tvtimetop {padding:8px 0px;} | |
34 | 393 |
394 #tvtable div.ch_set {width:{/literal}{$ch_set_width}{literal}px;float:left;background-color:#BBB;} | |
120 | 395 #tvtable div.ch_set_skip {width:{/literal}{$ch_set_width}{literal}px;float:left;background-color:#BBB; } |
34 | 396 |
397 | |
1 | 398 #tvtable div.ch_title, #tvtable div.prg {margin-right:2px;} |
399 #tvtable div.ch_title {padding:8px 0px;background-color:#333;color:#DDD;font-weight:bold;text-align:center} | |
120 | 400 #tvtable div.ch_title_skip, #tvtable div.prg {margin-right:2px;} |
401 #tvtable div.ch_title_skip {padding:8px 0px;background-color:#333;color:#DDD;font-weight:bold;text-align:center; } | |
402 | |
1 | 403 #tvtable div.prg { |
404 overflow:hidden; | |
405 color:#444; | |
406 background-image: url(imgs/dot2.gif); | |
407 background-image: url(imgs/prg_bg2.png); | |
408 background-repeat: repeat-x; | |
409 background-position: left bottom; | |
410 -moz-border-radius: 0.6em 0.6em 0.3em 0.3em; | |
411 -webkit-border-radius: 0.6em; | |
412 -webkit-border-bottom-right-radius: 0.3em; | |
413 -webkit-border-bottom-left-radius: 0.3em; | |
414 } | |
415 #tvtable div.prg_none {background-color:#eee;} | |
416 #tvtable div.prg_dummy {margin:3px 6px;} | |
417 #tvtable div.prg_title {color:#111;font-weight:bold;} | |
418 #tvtable div.prg_subtitle {font-size:80%;} | |
419 #tvtable div.prg_desc {font-size:80%;} | |
420 | |
421 #tvtable div.prg_start,#tvtable div.prg_duration,#tvtable div.prg_channel ,#tvtable div.prg_id {display: none;} | |
422 | |
423 #tvtable div.ctg_news, #category_select a.ctg_news {background-color: #FFFFD8;} | |
424 #tvtable div.ctg_etc, #category_select a.ctg_etc {background-color: #FFFFFF;} | |
425 #tvtable div.ctg_information, #category_select a.ctg_information {background-color: #F2D8FF;} | |
426 #tvtable div.ctg_sports, #category_select a.ctg_sports {background-color: #D8FFFF;} | |
427 #tvtable div.ctg_cinema, #category_select a.ctg_cinema {background-color: #FFD8D8;} | |
428 #tvtable div.ctg_music, #category_select a.ctg_music {background-color: #D8D8FF;} | |
429 #tvtable div.ctg_drama, #category_select a.ctg_drama {background-color: #D8FFD8;} | |
430 #tvtable div.ctg_anime, #category_select a.ctg_anime {background-color: #FFE4C8;} | |
431 #tvtable div.ctg_variety, #category_select a.ctg_variety {background-color: #FFD2EB;} | |
432 #tvtable div.ctg_10, #category_select a.ctg_10 {background-color: #E4F4F4;} | |
433 #tvtable div.ctg-hide, #category_select a.ctg-hide {background-color: #F8F8F8;color:#888;} | |
434 #tvtable div.ctg-hide .prg_title, #category_select a.ctg-hide .prg_title{color:#666;} | |
435 #tvtable div.prg_rec {background-color: #F55;color:#FEE} | |
436 #tvtable div.prg_rec .prg_title,#tvtable div.prg_hover .prg_title {color:white;} | |
437 #tvtable div.prg_hover {background-color: #28D;color:#EFF} | |
438 | |
439 #float_titles { z-index:100} | |
34 | 440 #float_titles div.ch_title {width:{/literal}{$ch_set_width}{literal}px;float:left;color:#FFF;font-weight:bold;text-align:center} |
1 | 441 #float_titles div.ch_title div{padding:8px 0px;margin:0 6px 0 4px;background-image: url(imgs/trancBG50.png);} |
442 | |
120 | 443 #float_titles div.ch_title_skip {width:{/literal}{$ch_set_width}{literal}px;float:left;color:#FFF;font-weight:bold;text-align:center; } |
444 #float_titles div.ch_title_skip div{padding:8px 0px;margin:0 6px 0 4px;background-image: url(imgs/trancBG50.png); } | |
445 | |
1 | 446 #float_follows {position:absolute;} |
447 #prg_info { | |
448 display:none; | |
449 position:absolute; | |
450 top:0;left:0; | |
451 width:100%; | |
452 background-color:#246; | |
453 color:#BDF; | |
454 height:80px; | |
455 } | |
456 #prg_info div.prg_dummy{margin:4px 20px;} | |
457 #prg_info div.prg_title {font-weight:bold;font-size:120%;color:#FFF;} | |
458 #prg_info span.prg_sub {color:#FFF;} | |
459 | |
460 #tableNowBas {position:absolute;background:red;width:100%;top:190px;height:2px;overflow:hidden;} | |
461 | |
462 | |
463 #floatBox4Dialog .prg_title{font-size:120%;font-weight:bold;padding:0.4em 0;text-align:center;} | |
464 #floatBox4Dialog .prg_rec_cfg{background:#EEE;padding:1em 2em;margin:0.4em 0;} | |
465 #floatBox4Dialog .labelLeft {width:8em;float:left;text-align:right;} | |
466 #floatBox4Dialog .button {padding:0.4em 1em;} | |
77 | 467 |
468 #channelDialog .prg_title{font-size:120%;font-weight:bold;padding:0.4em 0;text-align:center;} | |
469 #channelDialog .prg_rec_cfg{background:#EEE;padding:1em 2em;margin:0.4em 0;} | |
470 #channelDialog .labelLeft {width:8em;float:left;text-align:right;} | |
471 #channelDialog .button {padding:0.4em 1em;} | |
472 | |
1 | 473 --> |
474 </style> | |
475 | |
476 | |
477 {/literal} | |
478 | |
479 | |
480 </head> | |
481 | |
482 <body> | |
483 | |
484 <h2>{$sitetitle}</h2> | |
485 | |
486 | |
120 | 487 <div id="float_titles" style="width: {math equation="x + 80" x=$chs_width }px;height:120px;"> |
1 | 488 <div id="float_follows"> |
489 | |
41 | 490 <div class="set"> |
491 <ul> | |
492 <li><a href="envSetting.php">医荐絎</a></li> | |
493 </ul> | |
494 </div> | |
495 | |
1 | 496 <div class="set ctg_sel" id="category_select"> |
497 <span class="title"><a href="javascript:CTG.toggle()">綣決粋;腓</a></span> | |
498 | |
499 <ul> | |
500 {foreach from=$cats item=cat} | |
501 <li><a href="javascript:CTG.select('{$cat.name_en}');" class="ctg_{$cat.name_en}">{$cat.name_jp}</a></li> | |
502 {/foreach} | |
503 </ul> | |
504 </div> | |
505 | |
506 <div id="time_selects"> | |
507 <div class="set" id="jump-broadcast" > | |
508 <span class="title">冗羈∫御</span> | |
509 <ul> | |
510 {foreach from=$types item=type } | |
511 <li {$type.selected}><a class="jump" href="{$type.link}">{$type.name}</a></li> | |
512 {/foreach} | |
513 </ul><br style="clear:left;" /> | |
514 </div> | |
515 | |
516 <div class="set" id="jump-time"> | |
517 <span class="title"></span> | |
518 <ul> | |
519 {foreach from=$toptimes item=top} | |
520 <li><a class="jump" href="{$top.link}">{$top.hour}鐔</a></li> | |
521 {/foreach} | |
522 </ul><br style="clear:left;" /> | |
523 </div> | |
120 | 524 |
525 <div class="set"> | |
526 <ul><li><a class="jump" href="javascript:PRG.toggle()">c潟茵腓</a></li></ul> | |
527 </div> | |
528 | |
1 | 529 <br style="clear:left;" /> |
530 | |
531 <div class="set"> | |
532 <ul> | |
533 <li><a href="programTable.php">腟罎膣</a></li> | |
534 <li><a href="reservationTable.php">牙私膣筝荀</a></li> | |
535 <li><a href="recordedTable.php">牙紙筝荀</a></li> | |
536 </ul> | |
537 </div> | |
538 | |
539 <div class="set" id="jump-day" > | |
540 <span class="title">ヤ</span> | |
541 <ul> | |
542 {foreach from=$days item=day} | |
543 <li {$day.selected}><a {if $day.d eq "憜" } class="jump-today" {else} class="jump" {/if} href="{$day.link}">{$day.d}{$day.ofweek}</a></li> | |
544 {/foreach} | |
545 </ul><br style="clear:left;" /> | |
546 </div> | |
547 | |
548 | |
549 </div> | |
550 <br style="clear:left;" /> | |
551 <div id="prg_info"><div class="dummy">test</div></div> | |
552 </div> | |
553 | |
120 | 554 |
555 <!-- c潟絮 --> | |
556 <div id="ch_title_bar" style="position:absolute;bottom:0;"> | |
1 | 557 <div class="tvtimeDM" style="float:left;"> </div> |
558 {foreach from=$programs item=program } | |
120 | 559 <div {if $program.skip == 1 } class="ch_title_skip" {else} class="ch_title" {/if} > |
560 <div {if $program.skip == 1 } class="ch_title_skip" {/if} style="cursor: pointer" onClick="javascript:PRG.chdialog('{$program.channel_disc}')" >{$program.station_name}</div> | |
561 </div> | |
1 | 562 {/foreach} |
563 </div> | |
120 | 564 |
1 | 565 <br style="clear:left;" /> |
566 <div id="prg_info"><div class="dummy"> </div></div> | |
567 </div> | |
568 | |
569 <div id="float_titles_dummy" style="width:1410px;height:120px;"> </div> | |
570 | |
571 | |
572 <div id="tvtable"> | |
573 | |
574 <div id="tvtimes"> | |
575 {foreach from=$tvtimes item=time} | |
576 <div class="tvtime">{$time}</div> | |
577 {/foreach} | |
578 </div> | |
579 | |
580 <div id="tv_chs" style="width: {$chs_width}px" > | |
581 {foreach from=$programs item=program } | |
120 | 582 <div {if $program.skip == 1 } class="ch_set_skip" {else} class="ch_set" {/if} style="width: {$ch_set_width}px" > |
1 | 583 <div class="ch_programs"> |
584 {foreach from=$program.list item=item } | |
585 <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;"> | |
586 <div class="prg_dummy"> | |
587 <div class="prg_title">{$item.title|escape}</div> | |
588 <div class="prg_subtitle">{$item.starttime}</div> | |
589 <div class="prg_desc">{$item.description|escape}</div> | |
590 <div class="prg_channel">{$item.channel}</div> | |
591 <div class="prg_start">{$item.prg_start}</div> | |
592 <div class="prg_duration">{$item.duration}</div> | |
593 <div class="prg_id">{$item.id}</div> | |
594 </div> | |
595 </div> | |
596 {/foreach} | |
597 </div> | |
598 </div> | |
599 {/foreach} | |
600 </div> | |
601 | |
602 <div id="tvtimes2" style="top : 0px; left: {math equation="x + 40" x=$chs_width}px" > | |
603 {foreach from=$tvtimes item=time} | |
604 <div class="tvtime">{$time}</div> | |
605 {/foreach} | |
606 </div> | |
607 </div> | |
608 | |
609 | |
610 | |
611 <div id="floatBox4Dialog">jQuery UI Dialog</div> | |
77 | 612 <div id="channelDialog">jQuery UI Dialog</div> |
1 | 613 |
614 {literal} | |
615 <script type="text/javascript"> | |
616 var INISet = { | |
120 | 617 {/literal} |
1 | 618 prgRecordURL : 'simpleReservation.php', // 膂≧篋膣 |
619 prgRecordPlusURL : 'recordp.php', // 荅括完篋膣 | |
620 prgCancelURL : 'cancelReservation.php', // 篋膣c潟祉 | |
120 | 621 dotMin : {$height_per_min}, |
622 tableStartTime : '{$top_time}', | |
623 tableEndTime : '{$last_time}', | |
624 ch_width : {$ch_set_width}, | |
625 num_ch : {$num_ch}, | |
626 num_all_ch : {$num_all_ch} | |
627 {literal} | |
1 | 628 } |
629 </script> | |
630 {/literal} | |
631 </body> | |
632 </html> |