javascriptを利用してepgrecの見た目、使い勝手を改善します
リビジョン | 405127b42afcdafa9b28c640968137f0a05056a5 (tree) |
---|---|
日時 | 2012-04-08 09:22:01 |
作者 | trumphouse <trumphouse@user...> |
コミッター | trumphouse |
過去の番組で予約ボタンを表示しないよう修正
Signed-off-by: trumphouse <trumphouse@users.sourceforge.jp>
@@ -1,8 +1,8 @@ | ||
1 | 1 | /* |
2 | 2 | * epgrec assist |
3 | 3 | * |
4 | - * version 0.1.1 | |
5 | - * 1:32 2012/04/04 | |
4 | + * version 0.1.1.2 | |
5 | + * 9:10 2012/04/08 | |
6 | 6 | * |
7 | 7 | * Auther : osamu / atelier TRUMPHOUSE |
8 | 8 | * Twitter : trumphouse |
@@ -130,7 +130,7 @@ ER_sub.rePRG = { | ||
130 | 130 | |
131 | 131 | ER_sub.INDEX = { |
132 | 132 | style : 'body {background:#666;} #float_follows{position:relative;} #float_titles{position:fixed;top:0;} #ch_title_bar {letter-spacing:1px;} #tvtable div.ch_set {background:#888;position:relative;} #tvtable div.prg{position:relative;background-image: url(assist/imgs/prg_bg3.png);cursor:pointer;box-shadow:inset 0 1px 3px hsla(0,0%,100%,0.6);} #tvtable div.ctg_etc, #category_select a.ctg_etc, .ctg_BOX.ctg_etc {color:#666;background-color: #FFFFFF;} #tvtable div.ctg_news, #category_select a.ctg_news, .ctg_BOX.ctg_news {color:#6F6F48;background-color: #FFFFD8;} #tvtable div.ctg_information, #category_select a.ctg_information, .ctg_BOX.ctg_information {color:#644876;background-color: #F2D8FF;} #tvtable div.ctg_sports, #category_select a.ctg_sports, .ctg_BOX.ctg_sports {color:#486F6F;background-color: #D8FFFF;} #tvtable div.ctg_cinema, #category_select a.ctg_cinema, .ctg_BOX.ctg_cinema {color:#6F4848;background-color: #FFD6D0;} #tvtable div.ctg_music, #category_select a.ctg_music, .ctg_BOX.ctg_music {color:#4F537B;background-color: #D4DFFF;} #tvtable div.ctg_drama, #category_select a.ctg_drama, .ctg_BOX.ctg_drama {color:#4F6F46;background-color: #E2FFD4;} #tvtable div.ctg_anime, #category_select a.ctg_anime, .ctg_BOX.ctg_anime {color:#6F5238;background-color: #FFEFCF;} #tvtable div.ctg_variety, #category_select a.ctg_variety, .ctg_BOX.ctg_variety {color:#764264;background-color: #FFD2EB;} #tvtable div.ctg_hide, #category_select a.ctg_hide {background-color: #F4F4F4;color:#AAA;} #tvtable div.prg_none {background-color:#AAA;cursor:default;} #tvtable div.prg_rec {background-color: #F55;color:#FEE} #tvtable div.prg_rec.prg_pass {background-color: #977;color:#FCC} #tvtable div.ctg_hide .prg_title, #category_select a.ctg_hide .prg_title{color:#777;} #tvtable div.prg_hover .prg_title {color:white;} #tvtable div.prg.prg_hover {background-color: #28D;color:#EFF;} #tvtable div.prg_pass {color:#666;background-color:#BBB;}#tvtable div.prg_pass,#tvtable div.prg_none{box-shadow:inset 0 1px 3px hsla(0,0%,100%,0.4);}#tvtable div.prg_pass.prg_hover {background-color: #678;color:#EEE}#float_titles .set2 {display:inline-block;padding:0.8em 0.2em;margin:0.4em 0.2em; background-color:#333;font-family: arial,helvetica;} #ch_title_bar .no_epg {color:#888;font-style:italic;cursor:default;}'+ |
133 | - '#tvtable .rectoggle{display:none;position:absolute; top:0;right:0;background:#06B;padding:0.2em 0.6em;border-bottom-left-radius:8px;}#tvtable .prg_hover .rectoggle {display:block;}#tvtable .rectoggle:hover{background:#F40}#tvtable .rectoggle a{color:#EEE;}#tvtable .rectoggle a:hover{text-decoration:underline;}'+ | |
133 | + '#tvtable .rectoggle{display:none;position:absolute; top:0;right:0;background:#06B;border-bottom-left-radius:8px;}#tvtable .prg_hover .rectoggle {display:block;}#tvtable .rectoggle:hover{background:#F40}#tvtable .rectoggle a{padding:0.2em 0.6em;color:#EEE;}#tvtable .rectoggle a:hover{text-decoration:underline;}'+ | |
134 | 134 | '.IErnd10l {width:10px;height:10px;position:absolute;top:0;left:0;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="assist/imgs/ie_r10_l.png");}.IErnd10r {width:10px;height:10px;position:absolute;top:0;right:0;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="assist/imgs/ie_r10_r.png");}', |
135 | 135 | fix_bug_style : '#floatBox4Dialog > form >div {clear:left;}', |
136 | 136 | ini : function() { |
@@ -173,13 +173,14 @@ ER_sub.INDEX = { | ||
173 | 173 | } |
174 | 174 | } |
175 | 175 | ER_sub.rePRG.add(function($tg){ |
176 | + if ($tg.hasClass('prg_pass')) { return; } | |
176 | 177 | var txt, Id = $tg.find('.prg_id').text(); |
177 | 178 | if ($tg.hasClass('prg_rec')) { |
178 | 179 | txt = 'キャンセル'; |
179 | 180 | } else { |
180 | 181 | txt = '予約'; |
181 | 182 | } |
182 | - $tg.append('<div class="rectoggle"><a href="javascript:ER_sub.TBLprg.toggleRec(\''+Id+'\')">'+txt+'</a></div>'); | |
183 | + $tg.append('<div class="rectoggle"><a href="javascript:ER_sub.TBLprg.toggleRec(\''+Id+'\')" data-Id="'+Id+'">'+txt+'</a></div>'); | |
183 | 184 | }); |
184 | 185 | |
185 | 186 | // 番組再設定 |
@@ -574,9 +575,8 @@ ER_sub.TBLprg = { | ||
574 | 575 | $tg.removeClass('prg_hover'); |
575 | 576 | that.hideInfo(); |
576 | 577 | |
577 | - }); | |
578 | - $('#tv_chs .prg').find('.prg_dummy').click(function(ev){ | |
579 | - $tg = $(this).parent(); | |
578 | + }).click(function(ev){ | |
579 | + $tg = $(this); | |
580 | 580 | if($tg.hasClass('prg_none')) {return;} |
581 | 581 | if (!$('#tv_chs .prg_hover').length) {return;} |
582 | 582 | if ( that._selected ) { |
@@ -585,6 +585,9 @@ ER_sub.TBLprg = { | ||
585 | 585 | that._makeInfo($tg); |
586 | 586 | } |
587 | 587 | that.select($tg); |
588 | + }).find('.rectoggle a').click(function(ev){ | |
589 | + that.toggleRec($(this).attr('data-Id')); | |
590 | + return false; | |
588 | 591 | }); |
589 | 592 | }, |
590 | 593 | select : function($tg, effect) { |
@@ -732,10 +735,8 @@ ER_sub.TBLprg = { | ||
732 | 735 | var $tg = $('#prgID_'+Id); |
733 | 736 | this._selected = $tg; |
734 | 737 | if ($tg.hasClass('prg_rec')){ |
735 | - console.log(Id,'cancel'); | |
736 | 738 | this.doCancel(Id); |
737 | 739 | } else { |
738 | - console.log(Id,'rec'); | |
739 | 740 | this.doRec(Id); |
740 | 741 | } |
741 | 742 | return false; |
@@ -1,8 +1,8 @@ | ||
1 | 1 | /* |
2 | 2 | * epgrec assist |
3 | 3 | * |
4 | - * version 0.1.1.1 | |
5 | - * 8:17 2012/04/08 | |
4 | + * version 0.1.1.2 | |
5 | + * 9:10 2012/04/08 | |
6 | 6 | * |
7 | 7 | * Auther : osamu / atelier TRUMPHOUSE |
8 | 8 | * Twitter : trumphouse |