diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2011-03-04 17:48:29 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2011-03-04 17:48:29 +0000 |
| commit | 4cb940d3c8150e2c5b3693464be98ffd1bc65761 (patch) | |
| tree | e314dd0717efb4ad1d844367e3a0e30390b32b44 | |
| parent | 5c75d0d889c5016eebfef7462552a9604d345732 (diff) | |
| download | xxv-4cb940d3c8150e2c5b3693464be98ffd1bc65761.tar.gz xxv-4cb940d3c8150e2c5b3693464be98ffd1bc65761.tar.bz2 | |
Improve epg handling
jason: support content description
| -rw-r--r-- | skins/deltab/program.tmpl | 5 | ||||
| -rw-r--r-- | skins/deltab/schema.tmpl | 30 | ||||
| -rw-r--r-- | skins/deltab/search.tmpl | 9 | ||||
| -rw-r--r-- | skins/jason/epg.js | 137 | ||||
| -rw-r--r-- | skins/jason/files.lst | 1 | ||||
| -rw-r--r-- | skins/jason/index.tmpl | 10 | ||||
| -rw-r--r-- | skins/jason/jason.css | 607 | ||||
| -rw-r--r-- | skins/jason/locale/lang-de.js | 6 | ||||
| -rw-r--r-- | skins/jason/locale/lang-en.js | 6 | ||||
| -rw-r--r-- | skins/jason/locale/lang-it.js | 4 | ||||
| -rw-r--r-- | skins/jason/main.js | 3 | ||||
| -rw-r--r-- | skins/jason/now.js | 59 | ||||
| -rw-r--r-- | skins/jason/program.js | 67 | ||||
| -rw-r--r-- | skins/jason/search.js | 61 | ||||
| -rw-r--r-- | skins/jason/timers.js | 64 | ||||
| -rw-r--r-- | skins/stone/program.tmpl | 3 | ||||
| -rw-r--r-- | skins/stone/schema.tmpl | 30 | ||||
| -rw-r--r-- | skins/stone/search.tmpl | 9 | ||||
| -rw-r--r-- | skins/stone_flat/program.tmpl | 3 | ||||
| -rw-r--r-- | skins/stone_flat/search.tmpl | 9 | ||||
| -rw-r--r-- | skins/xstyle/bloecke/event_links.tmpl | 13 | ||||
| -rw-r--r-- | skins/xstyle/schema.tmpl | 10 | ||||
| -rw-r--r-- | skins/xstyle/search.tmpl | 15 |
23 files changed, 577 insertions, 584 deletions
diff --git a/skins/deltab/program.tmpl b/skins/deltab/program.tmpl index eddafbe..4b1a396 100644 --- a/skins/deltab/program.tmpl +++ b/skins/deltab/program.tmpl @@ -78,8 +78,7 @@ <?% FOREACH zeile = data %?> <?% IF verbose;"<!-- Item: ";FOREACH x = zeile;loop.count - 1;":";x.replace("-"," ");"|";END;"-->";END %?> <?% id=zeile.0;title=zeile.1;subtitle=zeile.2;start=zeile.3;stop=zeile.4; - description=zeile.6;video=zeile.7;audio=zeile.8;pdc=zeile.9; - timerid=zeile.10;recording=zeile.11;running=zeile.12; + description=zeile.6;pdc=zeile.7;timerid=zeile.8;recording=zeile.9;running=zeile.10; day = zeile.5 %?> <?% IF old.defined && day != old %?> <tr> @@ -143,7 +142,7 @@ <p class="section"><?% gettext("Search on Channel",15) %?> (<?% chop(channel,10) %?>)</p> <form method="post" action="?cmd=search"> <p> - <input type="hidden" name="__channel" value="<?% channelpos %?>" />
+ <input type="hidden" name="__channel" value="<?% channelpos %?>" /> <input type="text" name="data" size='18' /> </p> </form> diff --git a/skins/deltab/schema.tmpl b/skins/deltab/schema.tmpl index ae34c7c..253c4a5 100644 --- a/skins/deltab/schema.tmpl +++ b/skins/deltab/schema.tmpl @@ -100,23 +100,21 @@ <td class="schema" colspan="<?% colspan %?>" style="white-space:nowrap;"> <?%- ges = 0; oldend = param.zeitvon -%?> <?%- FOREACH event = data.$cpos; - id = event.0;
- title = event.1;
- subtitle = event.2;
- sender = event.3;
- channel = event.4;
- start = event.5;
- stop = event.6;
+ id = event.0; + title = event.1; + subtitle = event.2; + sender = event.3; + channel = event.4; + start = event.5; + stop = event.6; percent100 = event.7; - description = event.8;
- second_start = event.9;
- second_stop = event.10;
- video = event.11;
- audio = event.12;
- image = event.13; - timerid = event.14; - recording = event.15; - running = event.16; + description = event.8; + second_start = event.9; + second_stop = event.10; + image = event.11; + timerid = event.12; + recording = event.13; + running = event.14; IF second_start > oldend; laenge = second_start - oldend; percent = (laenge / Duration) * width; diff --git a/skins/deltab/search.tmpl b/skins/deltab/search.tmpl index 89ff729..878a3f9 100644 --- a/skins/deltab/search.tmpl +++ b/skins/deltab/search.tmpl @@ -108,15 +108,6 @@ <input style="width:auto;" type="radio" name="__Where" value="title" <?% IF cgi.param('__Where') == 'title' %?>checked="checked"<?% END %?> /><?% gettext('Only in title') %?> <input style="width:auto;" type="radio" name="__Where" value="titlesubtitle" <?% IF cgi.param('__Where') == 'titlesubtitle' %?>checked="checked"<?% END %?> /><?% gettext('Only in title and subtitle') %?> <br /><br /> - <?% gettext('Video format',30) %?><br /> - <input style="width:auto;" type="radio" name="__VideoFormat" value="all" <?% IF ! cgi.param('__VideoFormat') || cgi.param('__VideoFormat') == 'all' %?>checked="checked"<?% END %?> /><?% gettext('All') %?> - <input style="width:auto;" type="radio" name="__VideoFormat" value="widescreen" <?% IF cgi.param('__VideoFormat') == 'widescreen' %?>checked="checked"<?% END %?> /><?% gettext('16:9 Wide screen') %?> - <br /><br /> - <?% gettext('Audio format',30) %?><br /> - <input style="width:auto;" type="radio" name="__AudioFormat" value="all" <?% IF ! cgi.param('__AudioFormat') || cgi.param('__AudioFormat') == 'all' %?>checked="checked"<?% END %?> /><?% gettext('All') %?> - <input style="width:auto;" type="radio" name="__AudioFormat" value="dts" <?% IF cgi.param('__AudioFormat') == 'dts' %?>checked="checked"<?% END %?> /><?% gettext('Dolby Digital') %?> - <input style="width:auto;" type="radio" name="__AudioFormat" value="stereo" <?% IF cgi.param('__AudioFormat') == 'stereo' %?>checked="checked"<?% END %?> /><?% gettext('Stereo') %?> - <br /><br /> <?% gettext('Minimum length (in minutes)',30) %?><br /> <input type="text" name="__MinLength" value="<?% cgi.param('__MinLength') %?>"/> <br /><br /> diff --git a/skins/jason/epg.js b/skins/jason/epg.js new file mode 100644 index 0000000..ab6305b --- /dev/null +++ b/skins/jason/epg.js @@ -0,0 +1,137 @@ +/* + * jason - Javascript based skin for xxv + * Copyright(c) 2011, anbr + * + * http://xxv.berlios.de/ + * + * $Id$ + */ + +Ext.xxv.EPGPreview = function(viewer,store, config) { + this.viewer = viewer; + this.store = store; + Ext.xxv.EPGPreview.superclass.constructor.call(this, config); +}; + +Ext.extend(Ext.xxv.EPGPreview, Ext.Panel, { + select : function(record){ + var data = record.data; + data.footer = ""; + if(data.contents) { + var c = data.contents.split(" "); + for(var i = 0; i < c.length; i++){ + if(data.footer.length) { data.footer += ' '; } + var s = contentText[parseInt(c[i],16)]; + if(!s) + s = contentText[(parseInt(c[i],16) & 0xF0)>>8 ]; + if(s) + data.footer += s; + } + } + if(this.body) + XXV.getTemplate().overwrite(this.body, data); + + if(this.lookup) + highlightText(this.body.dom,this.lookup,'x-highlight',1); + + var hasAutotimer = (data.autotimerid && data.autotimerid <= 0) ? 0 : 1; + var hasTimer = (data.timerid || this.id == 'preview-timer') ? 1 : 0; + + // Enable all toolbar buttons + if(this.topToolbar.items) { + this.topToolbar.items.eachKey(function(key, f) { + if(f.id == 'tn') { if(hasTimer) f.hide(); else f.show(); } + else if(f.id == 'te') { if(hasTimer) f.show(); else f.hide(); } + else if(f.id == 'td') { if(hasTimer) f.show(); else f.hide(); } + else if(f.id == 'ae') { if(hasAutotimer) f.show(); else f.hide(); } + if(XXV.help.cmdAllowed(key)) f.enable(); + },this.topToolbar.items); + } + } + ,clear: function(){ + this.lookup = null; + if(this.body) + this.body.update(''); + // Disable all items + if(this.topToolbar.items) + { this.topToolbar.items.eachKey(function(key, f){f.disable();},this.topToolbar.items); } + } + ,showDetails : function(record, eventid, lookup){ + this.lookup = lookup; + this.select(record); + this.DetailsItem(record, eventid); + } + /******************************************************************************/ + ,onDetailsSuccess : function( response,options ) + { + var iSel = this.store.indexOfId(options.query); + if(iSel === -1) + return; + + var o = eval("("+response.responseText+")"); + + if(o && o.data && typeof(o.data) == 'object') { + + var a = o.data[0]; + + if(this.store.data.items[iSel].data.eventid) { + if(this.store.data.items[iSel].data.eventid != a[0]) + return; + } else { + if(this.store.data.items[iSel].id != a[0]) + return; + } + + this.store.data.items[iSel].data.description = a[6]; + this.store.data.items[iSel].data.video = a[7]; + this.store.data.items[iSel].data.audio = a[8]; + this.store.data.items[iSel].data.image = a[13]; + this.store.data.items[iSel].data.contents = a[17] ? a[17] : '0'; + + var record = this.store.getById(options.query); + this.select(record); + + } else { + this.store.data.items[iSel].data.contents = '0'; + var msg = ''; + if(o && o.data && typeof(o.data) == 'string') { + msg = o.data; + } + new Ext.xxv.MessageBox().msgFailure(this.szDetailsFailure, msg); + } + } + ,onDetailsFailure : function( response,options ) + { + var iSel = this.store.indexOfId(options.query); + if(iSel === -1) + return; + this.store.data.items[iSel].data.contents = '0'; + + var msg = ''; + if(response && response.statusText && typeof(response.statusText) == 'string') { + msg = response.statusText; + } + new Ext.xxv.MessageBox().msgFailure(this.szDetailsFailure, msg); + } + ,DetailsItem : function(record, eventid) { + if(record.data.contents) { //use cached data + this.select(record); + return; + } + if(!eventid) { + return; + } + if(this.DetailsTransaction) + Ext.Ajax.abort(this.DetailsTransaction); + this.DetailsTransaction = Ext.Ajax.request({ + scope: this + ,url: XXV.help.cmdAJAX('d') + ,timeout: 15000 + ,success: this.onDetailsSuccess + ,failure: this.onDetailsFailure + ,params:{ data: eventid } + ,query: record.data.id + }); + } +}); + diff --git a/skins/jason/files.lst b/skins/jason/files.lst index aa85700..5813737 100644 --- a/skins/jason/files.lst +++ b/skins/jason/files.lst @@ -20,6 +20,7 @@ monitor.js \ remote.js \ channels.js \ timers.js \ +epg.js \ now.js \ program.js \ search.js \ diff --git a/skins/jason/index.tmpl b/skins/jason/index.tmpl index 87b2b10..f6308d8 100644 --- a/skins/jason/index.tmpl +++ b/skins/jason/index.tmpl @@ -22,6 +22,15 @@ ,streamWidget : "<?% getModule('STREAM').widget %?>" ,pageSize : 100 }; + var contentText = { + <?% h = 1;WHILE h < 16;c = h | format "%x";ct = getModule('EPG').content(c) %?> + <?% IF ct;IF h>1 %?> + ,<?% END %?>0x<?% c %?> : "<?% ct %?>" + <?% l = 0;WHILE l < 16;c = ((16 * h) + l) | format "%x" ; ct = getModule('EPG').content(c) %?> + <?% IF ct %?> + ,0x<?% c %?>: "<?% ct %?>" + <?% END;l = l + 1;END;END;h = h + 1;END %?> + }; </script> <meta name="generator" content="XXV System - Version: <?% version %?>" /> <meta http-equiv="content-type" content="text/html; charset=<?% charset %?>" /> @@ -81,6 +90,7 @@ <div class="preview-channel">{content:this.getChannel}</div><div class="preview-date">{day:date} {start} - {stop}</div> </div> <div class="preview-body">{content:this.getBody}</div> + <div class="preview-footer">{content:this.getFooter}</div> </div> </body> </html> diff --git a/skins/jason/jason.css b/skins/jason/jason.css index 979048e..8d182d4 100644 --- a/skins/jason/jason.css +++ b/skins/jason/jason.css @@ -2,9 +2,9 @@ * jason - Javascript based skin for xxv
* Copyright(c) 2008-2009, anbr
*
- * http://xxv.berlios.de/ - * - * $Id$ + * http://xxv.berlios.de/
+ *
+ * $Id$
*/
html, body {
@@ -14,7 +14,7 @@ padding: 0; border: 0 none;
overflow: hidden;
height: 100%;
-} +}
.ext-el-mask {
background:#dadadb;
@@ -42,7 +42,7 @@ text-decoration:none; .x-grid3-td-title a:hover {
text-decoration:underline;
}
- +
.x-grid3-row-body p {
margin:5px 20px 10px 25px !important;
color:#555;
@@ -52,7 +52,7 @@ color:#555; .x-tree {
background:#fff !important;
}
- +
.x-tree-node div.channels-node{
background:#eee url(pic/bg.png) repeat-x;
margin-top:1px;
@@ -75,133 +75,133 @@ margin:3px; .channel .x-tree-ec-icon {
display:none;
}
- -/* -.xxv-icon { -width:16px; -height:16px; -background-image:url(pic/xxv-icon.png) !important; -background-repeat:no-repeat; -} - -.xxv-icon-xxv { background-position:0 0;} -.xxv-icon-record { background-position:-16px 0;} -.xxv-icon-backward { background-position:-32px 0;} -.xxv-icon-forward { background-position:-48px 0;} -.xxv-icon-pause { background-position:-64px 0;} -.xxv-icon-playback { background-position:-72px 0;} -.xxv-icon-stream { background-position:-88px 0;} - -.xxv-icon-remote-blue{ background-position:0 -16px;} -.xxv-icon-remote-green{ background-position:-16px -16px;} -.xxv-icon-remote-red{ background-position:-32px -16px;} -.xxv-icon-remote-yellow{ background-position:-48px -16px;} -.xxv-icon-remote-play { background-position:-64px -16px;} -.xxv-icon-remote{ background-position:-72px -16px;} -.xxv-icon-channel{ background-position:-88px -16px;} - -.xxv-icon-preview { background-position:0 -32px;} -.xxv-icon-preview-bottom { background-position:-16px -32px;} -.xxv-icon-preview-right { background-position:-32px -32px;} -.xxv-icon-remote-menu { background-position:-48px -32px;} -.xxv-icon-monitor { background-position:-64px -32px;} -.xxv-icon-recordings { background-position:-72px -32px;} -.xxv-icon-remote-back { background-position:-88px -32px;} - -.xxv-icon-movetimer { background-position:0 -32px;} -.xxv-icon-chronicle { background-position:-16px -32px;} -.xxv-icon-edit { background-position:-32px -32px;} -.xxv-icon-setup { background-position:-48px -32px;} -.xxv-icon-upgrade { background-position:-64px -32px;} -.xxv-icon-users { background-position:-72px -32px;} -.xxv-icon-vdr { background-position:-88px -32px;} -.xxv-icon-logout { background-position:-104px -32px;} - -.xxv-icon-autotimer { background-position:0 -48px;} -.xxv-icon-find { background-position:-16px -48px;} -.xxv-icon-timer { background-position:-32px -48px;} -.xxv-icon-timer-toggle { background-position:-48px -48px;} -.xxv-icon-new { background-position:-64px -48px;} -.xxv-icon-unviewed { background-position:-72px -48px;} -.xxv-icon-cut { background-position:-88px -48px;} -.xxv-icon-recover { background-position:-104px -48px;} -.xxv-icon-delete { background-position:-120px -48px;} -.xxv-timer-icon-delete { background-position:-120px -48px;} - -.xxv-icon-playing-music { background-position:0 -64px;} -.xxv-icon-music { background-position:-16px -64px;} -.xxv-icon-remote-loud { background-position:-32px -64px;} -.xxv-icon-remote-quiet { background-position:-48px -64px;} -.xxv-icon-remote-up { background-position:-64px -64px;} -.xxv-icon-remote-down { background-position:-72px -64px;} -.xxv-icon-remote-left { background-position:-88px -64px;} -.xxv-icon-remote-right { background-position:-104px -64px;} -*/ -
-.refresh-icon { background-image:url(pic/refresh.png) !important; } -.autotimer-icon { background-image:url(pic/autotimer.png) !important; } +
+/*
+.xxv-icon {
+width:16px;
+height:16px;
+background-image:url(pic/xxv-icon.png) !important;
+background-repeat:no-repeat;
+}
+
+.xxv-icon-xxv { background-position:0 0;}
+.xxv-icon-record { background-position:-16px 0;}
+.xxv-icon-backward { background-position:-32px 0;}
+.xxv-icon-forward { background-position:-48px 0;}
+.xxv-icon-pause { background-position:-64px 0;}
+.xxv-icon-playback { background-position:-72px 0;}
+.xxv-icon-stream { background-position:-88px 0;}
+
+.xxv-icon-remote-blue{ background-position:0 -16px;}
+.xxv-icon-remote-green{ background-position:-16px -16px;}
+.xxv-icon-remote-red{ background-position:-32px -16px;}
+.xxv-icon-remote-yellow{ background-position:-48px -16px;}
+.xxv-icon-remote-play { background-position:-64px -16px;}
+.xxv-icon-remote{ background-position:-72px -16px;}
+.xxv-icon-channel{ background-position:-88px -16px;}
+
+.xxv-icon-preview { background-position:0 -32px;}
+.xxv-icon-preview-bottom { background-position:-16px -32px;}
+.xxv-icon-preview-right { background-position:-32px -32px;}
+.xxv-icon-remote-menu { background-position:-48px -32px;}
+.xxv-icon-monitor { background-position:-64px -32px;}
+.xxv-icon-recordings { background-position:-72px -32px;}
+.xxv-icon-remote-back { background-position:-88px -32px;}
+
+.xxv-icon-movetimer { background-position:0 -32px;}
+.xxv-icon-chronicle { background-position:-16px -32px;}
+.xxv-icon-edit { background-position:-32px -32px;}
+.xxv-icon-setup { background-position:-48px -32px;}
+.xxv-icon-upgrade { background-position:-64px -32px;}
+.xxv-icon-users { background-position:-72px -32px;}
+.xxv-icon-vdr { background-position:-88px -32px;}
+.xxv-icon-logout { background-position:-104px -32px;}
+
+.xxv-icon-autotimer { background-position:0 -48px;}
+.xxv-icon-find { background-position:-16px -48px;}
+.xxv-icon-timer { background-position:-32px -48px;}
+.xxv-icon-timer-toggle { background-position:-48px -48px;}
+.xxv-icon-new { background-position:-64px -48px;}
+.xxv-icon-unviewed { background-position:-72px -48px;}
+.xxv-icon-cut { background-position:-88px -48px;}
+.xxv-icon-recover { background-position:-104px -48px;}
+.xxv-icon-delete { background-position:-120px -48px;}
+.xxv-timer-icon-delete { background-position:-120px -48px;}
+
+.xxv-icon-playing-music { background-position:0 -64px;}
+.xxv-icon-music { background-position:-16px -64px;}
+.xxv-icon-remote-loud { background-position:-32px -64px;}
+.xxv-icon-remote-quiet { background-position:-48px -64px;}
+.xxv-icon-remote-up { background-position:-64px -64px;}
+.xxv-icon-remote-down { background-position:-72px -64px;}
+.xxv-icon-remote-left { background-position:-88px -64px;}
+.xxv-icon-remote-right { background-position:-104px -64px;}
+*/
+
+.refresh-icon { background-image:url(pic/refresh.png) !important; }
+.autotimer-icon { background-image:url(pic/autotimer.png) !important; }
.find-icon { background-image:url(pic/search.png) !important; }
-.channel-icon { background-image:url(pic/channel.png) !important; } -.recordings-icon { background-image:url(pic/video.png) !important; } -.timer-icon { background-image:url(pic/timer.png) !important; } -.timer-new-icon { background-image:url(pic/timer.png) !important; } -.timer-edit-icon { background-image:url(pic/edit.png) !important; } -.timer-toggle-icon { background-image:url(pic/timer-toggle.png) !important; } -.select-channel-icon { background-image:url(pic/channel-select.png) !important; } -.stream-icon { background-image:url(pic/web-playback.png) !important; } -.switch-icon { background-image:url(pic/remote-playback.png) !important; } -.teletext-icon { background-image:url(pic/menu.png) !important; } -.xxv-icon { background-image:url(pic/xxv.png) !important; } -.program-icon { background-image:url(pic/channel.png) !important; } -.media-icon { background-image:url(pic/video.png) !important; } -.logout-icon { background-image:url(pic/logout.png) !important; } -.audio-icon { background-image:url(pic/audio.png) !important; } -.delete-icon { background-image:url(pic/delete.png) !important; } -.timer-delete-icon { background-image:url(pic/delete.png) !important; } -.play-icon { background-image:url(pic/remote-playback.png) !important; } -.record-icon { background-image:url(pic/record.png) !important; } -.recover-icon { background-image:url(pic/recover.png) !important; } -.new-icon { background-image:url(pic/new.png) !important; } -.edit-icon { background-image:url(pic/edit.png) !important; } -.cut-icon { background-image:url(pic/cut.png) !important; } -.convert-icon { background-image:url(pic/convert.png) !important; } +.channel-icon { background-image:url(pic/channel.png) !important; }
+.recordings-icon { background-image:url(pic/video.png) !important; }
+.timer-icon { background-image:url(pic/timer.png) !important; }
+.timer-new-icon { background-image:url(pic/timer.png) !important; }
+.timer-edit-icon { background-image:url(pic/edit.png) !important; }
+.timer-toggle-icon { background-image:url(pic/timer-toggle.png) !important; }
+.select-channel-icon { background-image:url(pic/channel-select.png) !important; }
+.stream-icon { background-image:url(pic/web-playback.png) !important; }
+.switch-icon { background-image:url(pic/remote-playback.png) !important; }
+.teletext-icon { background-image:url(pic/menu.png) !important; }
+.xxv-icon { background-image:url(pic/xxv.png) !important; }
+.program-icon { background-image:url(pic/channel.png) !important; }
+.media-icon { background-image:url(pic/video.png) !important; }
+.logout-icon { background-image:url(pic/logout.png) !important; }
+.audio-icon { background-image:url(pic/audio.png) !important; }
+.delete-icon { background-image:url(pic/delete.png) !important; }
+.timer-delete-icon { background-image:url(pic/delete.png) !important; }
+.play-icon { background-image:url(pic/remote-playback.png) !important; }
+.record-icon { background-image:url(pic/record.png) !important; }
+.recover-icon { background-image:url(pic/recover.png) !important; }
+.new-icon { background-image:url(pic/new.png) !important; }
+.edit-icon { background-image:url(pic/edit.png) !important; }
+.cut-icon { background-image:url(pic/cut.png) !important; }
+.convert-icon { background-image:url(pic/convert.png) !important; }
.chronicle-icon { background-image:url(pic/chronicle.png) !important; }
-.remote-icon { background-image:url(pic/remote.png) !important; } -.monitor-icon { background-image:url(pic/monitor.png) !important; } -.setup-icon { background-image:url(pic/setup.png) !important; } -.movetimers-icon { background-image:url(pic/movetimers.png) !important; } -.vdr-icon { background-image:url(pic/vdr-logo.png) !important; } -.upgrade-icon { background-image:url(pic/upgrade.png) !important; } -.users-icon { background-image:url(pic/users.png) !important; } -.view-icon { background-image:url(pic/preview.png) !important; } -.preview-icon { background-image:url(pic/preview.png) !important; } +.remote-icon { background-image:url(pic/remote.png) !important; }
+.monitor-icon { background-image:url(pic/monitor.png) !important; }
+.setup-icon { background-image:url(pic/setup.png) !important; }
+.movetimers-icon { background-image:url(pic/movetimers.png) !important; }
+.vdr-icon { background-image:url(pic/vdr-logo.png) !important; }
+.upgrade-icon { background-image:url(pic/upgrade.png) !important; }
+.users-icon { background-image:url(pic/users.png) !important; }
+.view-icon { background-image:url(pic/preview.png) !important; }
+.preview-icon { background-image:url(pic/preview.png) !important; }
.preview-bottom { background-image:url(pic/preview-bottom.png) !important; }
.preview-right { background-image:url(pic/preview-right.png) !important; }
-.preview-hide { background-image:url(pic/preview.png) !important; } -.music-icon { background-image:url(pic/audio.png) !important; } -.playing-music-icon { background-image:url(pic/audio-playback.png) !important; } - - -.remote-logout-icon { background-image:url(pic/logout.png) !important; } -.remote-up-icon { background-image:url(pic/up.png) !important; } -.remote-left-icon { background-image:url(pic/left.png) !important; } -.remote-right-icon { background-image:url(pic/right.png) !important; } -.remote-menu-icon { background-image:url(pic/menu.png) !important; } -.remote-down-icon { background-image:url(pic/down.png) !important; } -.remote-back-icon { background-image:url(pic/back.png) !important; } -.remote-red-icon { background-image:url(pic/red.png) !important; } -.remote-green-icon { background-image:url(pic/green.png) !important; } -.remote-yellow-icon { background-image:url(pic/yellow.png) !important; } -.remote-blue-icon { background-image:url(pic/blue.png) !important; } -.remote-record-icon { background-image:url(pic/record.png) !important; } -.remote-playback-icon { background-image:url(pic/playback.png) !important; } -.remote-pause-icon { background-image:url(pic/pause.png) !important; } -.remote-stop-icon { background-image:url(pic/stop.png) !important; } -.remote-backward-icon { background-image:url(pic/backward.png) !important; } -.remote-quiet-icon { background-image:url(pic/quiet.png) !important; } -.remote-loud-icon { background-image:url(pic/loud.png) !important; } -.remote-forward-icon { background-image:url(pic/forward.png) !important; } - +.preview-hide { background-image:url(pic/preview.png) !important; }
+.music-icon { background-image:url(pic/audio.png) !important; }
+.playing-music-icon { background-image:url(pic/audio-playback.png) !important; }
+
+
+.remote-logout-icon { background-image:url(pic/logout.png) !important; }
+.remote-up-icon { background-image:url(pic/up.png) !important; }
+.remote-left-icon { background-image:url(pic/left.png) !important; }
+.remote-right-icon { background-image:url(pic/right.png) !important; }
+.remote-menu-icon { background-image:url(pic/menu.png) !important; }
+.remote-down-icon { background-image:url(pic/down.png) !important; }
+.remote-back-icon { background-image:url(pic/back.png) !important; }
+.remote-red-icon { background-image:url(pic/red.png) !important; }
+.remote-green-icon { background-image:url(pic/green.png) !important; }
+.remote-yellow-icon { background-image:url(pic/yellow.png) !important; }
+.remote-blue-icon { background-image:url(pic/blue.png) !important; }
+.remote-record-icon { background-image:url(pic/record.png) !important; }
+.remote-playback-icon { background-image:url(pic/playback.png) !important; }
+.remote-pause-icon { background-image:url(pic/pause.png) !important; }
+.remote-stop-icon { background-image:url(pic/stop.png) !important; }
+.remote-backward-icon { background-image:url(pic/backward.png) !important; }
+.remote-quiet-icon { background-image:url(pic/quiet.png) !important; }
+.remote-loud-icon { background-image:url(pic/loud.png) !important; }
+.remote-forward-icon { background-image:url(pic/forward.png) !important; }
+
.x-tree-selected {
border:1px dotted #a3bae9;
background:#DFE8F6;
@@ -245,47 +245,47 @@ list-style-position:outside !important; list-style-type:disc !important;
margin-left:18px;
}
- +
.preview .x-panel-body .preview-topic {
-overflow:hidden; -clear:left; -white-space:nowrap; +overflow:hidden;
+clear:left;
+white-space:nowrap;
height:1.2em;
-} - +}
+
.preview .x-panel-body h3.preview-title {
-text-align:left; +text-align:left;
font-weight:bold;
-font-size:1.1em; +font-size:1.1em;
color:#000;
font-size:1em;
float:left;
-} +}
.preview .x-panel-body h4.preview-shorttitle {
-text-align:left; +text-align:left;
font-weight:bold;
color:#555;
-font-size:1.0em; -/*clear:left;*/ -} - +font-size:1.0em;
+/*clear:left;*/
+}
+
.preview .x-panel-body div.preview-date {
font-weight:normal;
color:#555;
text-align:right;
-font-size:1.0em; -width:100%; -} - +font-size:1.0em;
+width:100%;
+}
+
.preview .x-panel-body div.preview-channel {
font-weight:normal;
color:#555;
text-align:left;
-font-size:1.0em; +font-size:1.0em;
float:left;
-} - +}
+
.preview .x-panel-body {
font-weight:normal;
color:#555;
@@ -295,13 +295,20 @@ font-size:0.9em; .preview .x-panel-body div.preview-header {
background:#f1f2f4;
padding:5px;
-border-bottom:1px solid #dadadb; +border-bottom:1px solid #dadadb;
}
.preview .x-panel-body div.preview-body {
-padding:10px; +padding:10px;
+overflow: auto;
+}
+
+.preview .x-panel-body div.preview-footer {
+padding:10px;
overflow: auto;
+bottom: 10px;
+position: fixed;
}
- +
.reading-menu .x-menu-item-checked {
border:1px dotted #a3bae9 !important;
background:#DFE8F6;
@@ -344,38 +351,38 @@ float:left; .x-node-ctx {
background:#eee !important;
border:1px solid #ccc !important;
-} - -#msg-div { -width: 500px; -z-index: 20000; -} - -/* rlist */ +}
+
+#msg-div {
+width: 500px;
+z-index: 20000;
+}
+
+/* rlist */
#rl .x-panel-body{
background: white;
}
#rl .thumb{
background: #dddddd;
-padding: 3px; +padding: 3px;
height: 6em;
-width: 8em; +width: 8em;
overflow: hidden;
}
#rl .thumb img{
height: 6em;
width: 8em;
-} - -#rl .thumb div.unviewed { +}
+
+#rl .thumb div.unviewed {
position:relative;
-overflow:hidden; +overflow:hidden;
top:-5.75em;
-left:6.25em; +left:6.25em;
height: 16px;
-width: 16px; +width: 16px;
background-image:url(pic/unviewed.png) !important;
-} +}
#rl .thumb-wrap{
float: left;
@@ -387,7 +394,7 @@ padding: 5px; display: block;
overflow: hidden;
text-align: center;
-font-size:0.8em; +font-size:0.8em;
font-weight:bold;
}
@@ -413,152 +420,152 @@ background-repeat: no-repeat; background-position: left;
padding-left:20px;
margin:10px;
-} - +}
+
.x-slide-inner {
position:relative;
overflow:hidden;
-} - +}
+
.x-slide-images-wrap {
- position:absolute; - padding:10px; -} - + position:absolute;
+ padding:10px;
+}
+
.x-slide-images {
white-space:nowrap;
-position:absolute; -float:left; -} - -#slider { - padding-left:16px; - padding-right:16px; -} - -.x-slide-zone-horizontal { - height: 40px; - background-repeat: repeat-x; - background-image: url('pic/slider-bg.png'); - z-index: 1; - -} - -.x-thumb-slider-horizontal { +position:absolute;
+float:left;
+}
+
+#slider {
+ padding-left:16px;
+ padding-right:16px;
+}
+
+.x-slide-zone-horizontal {
+ height: 40px;
+ background-repeat: repeat-x;
+ background-image: url('pic/slider-bg.png');
+ z-index: 1;
+
+}
+
+.x-thumb-slider-horizontal {
width:16px;
height:24px;
- top: 5px; - background:transparent url('pic/thumb.png') no-repeat 0 0px; - z-index: 10; -} - -.x-range-slider-horizontal { - top: 10px; - height: 4px; - background: url('pic/slider-range.png') repeat-x; -} - -.x-slide-zone-top { - position:relative; -/* top: 0px;*/ -} - -.x-slide-zone-bottom { - position:relative; - top: 16px -} - -#loading-mask{ -position:absolute; -left:0; -top:0; -width:100%; -height:100%; -z-index:20000; -background-color:white; -} -#loading{ -position:absolute; -left:45%; -top:40%; -padding:2px; -z-index:20001; -height:auto; -} -#loading img { -margin-bottom:5px; -} -#loading .loading-indicator{ -background:white; -color:#555; -font-size:1em; -font-weight:normal; -padding:10px; -margin:0; -text-align:center; -height:auto; -}
- -.deactive { -color:#AAA; -} - -.running { -color:#2020b4; -} - -.active { -color:#202060; -} - -.problem { -color:#b03e28; -} - -.error { -color:red; -} - -.x-cloud-list { - padding:10px; -} + top: 5px;
+ background:transparent url('pic/thumb.png') no-repeat 0 0px;
+ z-index: 10;
+}
+
+.x-range-slider-horizontal {
+ top: 10px;
+ height: 4px;
+ background: url('pic/slider-range.png') repeat-x;
+}
+
+.x-slide-zone-top {
+ position:relative;
+/* top: 0px;*/
+}
+
+.x-slide-zone-bottom {
+ position:relative;
+ top: 16px
+}
+
+#loading-mask{
+position:absolute;
+left:0;
+top:0;
+width:100%;
+height:100%;
+z-index:20000;
+background-color:white;
+}
+#loading{
+position:absolute;
+left:45%;
+top:40%;
+padding:2px;
+z-index:20001;
+height:auto;
+}
+#loading img {
+margin-bottom:5px;
+}
+#loading .loading-indicator{
+background:white;
+color:#555;
+font-size:1em;
+font-weight:normal;
+padding:10px;
+margin:0;
+text-align:center;
+height:auto;
+}
+
+.deactive {
+color:#AAA;
+}
+
+.running {
+color:#2020b4;
+}
+
+.active {
+color:#202060;
+}
+
+.problem {
+color:#b03e28;
+}
+
+.error {
+color:red;
+}
+
+.x-cloud-list {
+ padding:10px;
+}
.x-cloud-item {
- display:inline; - padding-right:5px; + display:inline;
+ padding-right:5px;
}
.x-cloud-item a {
- text-decoration:none; + text-decoration:none;
color:#555555;
-} - +}
+
.x-cloud-item a:hover {
- color:#002a85; + color:#002a85;
text-decoration:none;
-} +}
-.x-cloud-item.smallest { font-size: 0.7em; } +.x-cloud-item.smallest { font-size: 0.7em; }
.x-cloud-item.smaller { font-size: 0.8em; }
.x-cloud-item.small { font-size: 0.9em; }
.x-cloud-item.medium { font-size: 1.0em; }
-.x-cloud-item.large { font-size: 1.1em; } +.x-cloud-item.large { font-size: 1.1em; }
.x-cloud-item.larger { font-size: 1.1em; }
-.x-cloud-item.largest { font-size: 1.3em; } - - -.x-form-check-group .x-panel-body {background-color: transparent;} -.x-form-check-wrap { height:auto; } - -div#audio-player { text-align:center; } -object#audio-player { display:inline; } - -.x-highlight{ - background:repeat-x bottom; - background-image:url(extjs/resources/images/default/grid/invalid_line.gif); -} - -.coverimage { - text-align:right; - height:200px; - width:200px; -} +.x-cloud-item.largest { font-size: 1.3em; }
+
+
+.x-form-check-group .x-panel-body {background-color: transparent;}
+.x-form-check-wrap { height:auto; }
+
+div#audio-player { text-align:center; }
+object#audio-player { display:inline; }
+
+.x-highlight{
+ background:repeat-x bottom;
+ background-image:url(extjs/resources/images/default/grid/invalid_line.gif);
+}
+
+.coverimage {
+ text-align:right;
+ height:200px;
+ width:200px;
+}
diff --git a/skins/jason/locale/lang-de.js b/skins/jason/locale/lang-de.js index e302af0..ebf8f64 100644 --- a/skins/jason/locale/lang-de.js +++ b/skins/jason/locale/lang-de.js @@ -1,6 +1,6 @@ /* * jason - Javascript based skin for xxv - * Copyright(c) 2008-2009, anbr + * Copyright(c) 2008-2011, anbr * * http://xxv.berlios.de/ * @@ -193,10 +193,6 @@ Ext.xxv.timerGrid.prototype.szDeleteFailure = "Konnte Timer nicht löschen!\r\n{ Ext.xxv.timerGrid.prototype.szToggleSuccess = "Timer erfolgreich umgeschaltet.\r\n{0}"; Ext.xxv.timerGrid.prototype.szToggleFailure = "Konnte Timer nicht umgeschalten!\r\n{0}"; -Ext.xxv.timerPreview.prototype.szFindReRun = "Suche Wiederholung"; -Ext.xxv.timerPreview.prototype.szEdit = "Bearbeiten"; -Ext.xxv.timerPreview.prototype.szDelete = "Löschen"; - /* movetimers.js */ Ext.xxv.movetimersGrid.prototype.szTitle = "Regeln zum Verschieben von Timern"; Ext.xxv.movetimersGrid.prototype.szNew = "Neu"; diff --git a/skins/jason/locale/lang-en.js b/skins/jason/locale/lang-en.js index 098bce2..17acb83 100644 --- a/skins/jason/locale/lang-en.js +++ b/skins/jason/locale/lang-en.js @@ -1,6 +1,6 @@ /* * jason - Javascript based skin for xxv - * Copyright(c) 2009, anbr + * Copyright(c) 2009-2011, anbr * * http://xxv.berlios.de/ * @@ -194,10 +194,6 @@ Ext.xxv.timerGrid.prototype.szDeleteFailure = "Couldn't delete timer!\r\n{0}"; Ext.xxv.timerGrid.prototype.szToggleSuccess = "Timer toggled successful.\r\n{0}"; Ext.xxv.timerGrid.prototype.szToggleFailure = "Couldn't toggle timer!\r\n{0}"; -Ext.xxv.timerPreview.prototype.szFindReRun = "Find rerun"; -Ext.xxv.timerPreview.prototype.szEdit = "Edit"; -Ext.xxv.timerPreview.prototype.szDelete = "Delete"; - /* movetimers.js */ Ext.xxv.movetimersGrid.prototype.szTitle = "Rules to move timers"; Ext.xxv.movetimersGrid.prototype.szNew = "New"; diff --git a/skins/jason/locale/lang-it.js b/skins/jason/locale/lang-it.js index 7116525..f74b0c1 100644 --- a/skins/jason/locale/lang-it.js +++ b/skins/jason/locale/lang-it.js @@ -194,10 +194,6 @@ Ext.xxv.timerGrid.prototype.szDeleteFailure = "Impossibile eliminare timer!\r\n{ Ext.xxv.timerGrid.prototype.szToggleSuccess = "Attivazione timer riuscita.\r\n{0}"; Ext.xxv.timerGrid.prototype.szToggleFailure = "Impossibile attivare timer!\r\n{0}"; -Ext.xxv.timerPreview.prototype.szFindReRun = "Cerca repliche"; -Ext.xxv.timerPreview.prototype.szEdit = "Modifica"; -Ext.xxv.timerPreview.prototype.szDelete = "Elimina"; - /* movetimers.js */ Ext.xxv.movetimersGrid.prototype.szTitle = "Regole per spostamento timer"; Ext.xxv.movetimersGrid.prototype.szNew = "Nuova"; diff --git a/skins/jason/main.js b/skins/jason/main.js index 33a10e3..5495ead 100644 --- a/skins/jason/main.js +++ b/skins/jason/main.js @@ -58,6 +58,9 @@ Ext.onReady(function(){ ,getBody : function(v, all){ return Ext.util.Format.stripScripts(v || all.description).replace(/\r\n/g, '<br />'); } + ,getFooter : function(v, all){ + return Ext.util.Format.stripScripts(v || all.footer || "").replace(/\r\n/g, '<br />'); + } }); XXV.getTemplate = function(){ return tpl; diff --git a/skins/jason/now.js b/skins/jason/now.js index 3e68395..f93880f 100644 --- a/skins/jason/now.js +++ b/skins/jason/now.js @@ -1,6 +1,6 @@ /* * jason - Javascript based skin for xxv - * Copyright(c) 2008-2010, anbr + * Copyright(c) 2008-2011, anbr * * http://xxv.berlios.de/ * @@ -29,6 +29,11 @@ Ext.xxv.NowStore = function() { ,{name: 'vps', type: 'string'} //type:'date', dateFormat:'timestamp'} ,{name: 'level', type: 'int'} ,{name: 'order', type: 'int'} //dummy field created after onload + //*** filled later by display *** + ,{name: 'image', type: 'string'} + ,{name: 'audio', type: 'string'} + ,{name: 'video', type: 'string'} + ,{name: 'contents', type: 'string'} ] }) ,proxy : new Ext.data.HttpProxy({ @@ -47,11 +52,11 @@ Ext.xxv.NowStore = function() { Ext.xxv.NowGrid = function(viewer) { this.viewer = viewer; - this.preview = new Ext.xxv.NowPreview(viewer); - // create the data store this.store = new Ext.xxv.NowStore(); + this.preview = new Ext.xxv.NowPreview(viewer, this.store); + var range = new Array(); range.push([this.szPresent,0]); range.push([this.szFollowing,this.szFollowing]); @@ -154,7 +159,7 @@ Ext.xxv.NowGrid = function(viewer) { }); this.on('rowcontextmenu', this.onContextClick, this); - this.getSelectionModel().on('rowselect', this.preview.select, this.preview, {buffer:50}); + this.getSelectionModel().on('rowselect', this.showDetails, this, {buffer:50}); this.on('rowdblclick', this.onSelectProgram, this); }; @@ -179,9 +184,17 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, { ,szRecordFailure : "Couldn't create timer!\r\n{0}" ,szDeleteSuccess : "Timer deleted successful.\r\n{0}" ,szDeleteFailure : "Couldn't delete timer!\r\n{0}" + ,szDetailsFailure : "Couldn't update details of event!\r\n{0}" ,onLoadException : function( scope, o, arg, e) { - new Ext.xxv.MessageBox().msgFailure(this.szLoadException, e.message); + var msg = ''; + if(e && e.message && typeof(e.message) == 'string') { + msg = e.message; + } + else if(o && o.data && typeof(o.data) == 'string') { + msg = o.data; + } + new Ext.xxv.MessageBox().msgFailure(this.szLoadException, msg); } ,onBeforeLoad : function( store, opt ) { this.preview.clear(); @@ -204,6 +217,9 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, { else this.ownerCt.SetPanelTitle(this.szPresent + " - " + new Date().dateFormat('H:i')); } + ,showDetails : function(sm, index, record){ + this.preview.showDetails(record, record.data.id, null); + } ,onSpecialkey : function(f, e) { if(e.getKey() == e.ENTER){ this.reload(); @@ -219,6 +235,7 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, { var data = {'id':record.data.chid,'name':record.data.channel}; this.viewer.openProgram(data); } +/******************************************************************************/ ,onContextClick : function(grid, index, e){ if(!this.menu){ // create context menu on first right click @@ -499,9 +516,8 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, { } }); -Ext.xxv.NowPreview = function(viewer) { - this.viewer = viewer; - Ext.xxv.NowPreview.superclass.constructor.call(this, { +Ext.xxv.NowPreview = function(viewer,store) { + return new Ext.xxv.EPGPreview(viewer,store, { id: 'now-preview', region: 'south', cls:'preview', @@ -543,33 +559,6 @@ Ext.xxv.NowPreview = function(viewer) { }); }; -Ext.extend(Ext.xxv.NowPreview, Ext.Panel, { - select : function(sm, index, record){ - if(this.body) - XXV.getTemplate().overwrite(this.body, record.data); - - // Enable all toolbar buttons - var items = this.topToolbar.items; - if(items) { - items.eachKey(function(key, f) { - if(f.id == 'tn') { if(record.data.timerid) f.hide(); else f.show(); } - else if(f.id == 'te') { if(record.data.timerid) f.show(); else f.hide(); } - else if(f.id == 'td') { if(record.data.timerid) f.show(); else f.hide(); } - if(XXV.help.cmdAllowed(key)) f.enable(); - },items); - } - } - ,clear: function(){ - if(this) { - if(this.body) - this.body.update(''); - // Disable all items - var items = this.topToolbar.items; - if(items) { items.eachKey(function(key, f){f.disable();},items); } - } - } -}); - function createNowView(viewer,id) { viewer.gridNow = new Ext.xxv.NowGrid(viewer); diff --git a/skins/jason/program.js b/skins/jason/program.js index 16defc7..669ca80 100644 --- a/skins/jason/program.js +++ b/skins/jason/program.js @@ -1,6 +1,6 @@ /* * jason - Javascript based skin for xxv - * Copyright(c) 2008-2010, anbr + * Copyright(c) 2008-2011, anbr * * http://xxv.berlios.de/ * @@ -21,13 +21,16 @@ Ext.xxv.programStore = function(data) { ,{name: 'stop', type: 'string' } ,{name: 'day', type:'date', dateFormat:'timestamp'} ,{name: 'description', type: 'string'} - ,{name: 'video', type: 'string'} - ,{name: 'audio', type: 'string'} ,{name: 'vps', type:'date', dateFormat:'timestamp'} ,{name: 'timerid', type: 'string'} ,{name: 'timeractiv', type: 'string'} ,{name: 'running', type: 'string'} ,{name: 'level', type: 'int'} + //*** filled later by display *** + ,{name: 'image', type: 'string'} + ,{name: 'audio', type: 'string'} + ,{name: 'video', type: 'string'} + ,{name: 'contents', type: 'string'} ] }), proxy : new Ext.data.HttpProxy({ @@ -41,11 +44,12 @@ Ext.xxv.programStore = function(data) { Ext.xxv.programGrid = function(viewer, record) { this.viewer = viewer; - this.preview = new Ext.xxv.programPreview(viewer); - //Ext.apply(this, config); // create the data store this.store = new Ext.xxv.programStore(record); + + this.preview = new Ext.xxv.programPreview(viewer, this.store); + this.store.setDefaultSort('day', "ASC"); this.columns = [{ @@ -114,7 +118,7 @@ Ext.xxv.programGrid = function(viewer, record) { ,scope:this }); this.on('rowcontextmenu', this.onContextClick, this); - this.getSelectionModel().on('rowselect', this.select, this, {buffer:50}); + this.getSelectionModel().on('rowselect', this.showDetails, this, {buffer:50}); }; Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, { @@ -145,6 +149,9 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, { this.ownerCt.SetPanelTitle(store.title); } + ,showDetails : function(sm, index, record){ + this.preview.showDetails(record, record.data.id, this.filter.getValue()); + } ,onContextClick : function(grid, index, e){ if(!this.menu){ // create context menu on first right click this.menu = new Ext.menu.Menu({ @@ -278,14 +285,10 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, { } this.viewer.gridNow.DeleteTimerId(items, this.store); } - ,select : function(sm, index, record){ - this.preview.select(record, this.filter.getValue()); - } }); -Ext.xxv.programPreview = function(viewer) { - this.viewer = viewer; - Ext.xxv.programPreview.superclass.constructor.call(this, { +Ext.xxv.programPreview = function(viewer,store) { + return new Ext.xxv.EPGPreview(viewer,store, { id: 'program-preview', region: 'south', cls:'preview', @@ -296,18 +299,18 @@ Ext.xxv.programPreview = function(viewer) { tooltip: Ext.xxv.NowGrid.prototype.szFindReRun, iconCls: 'find-icon', disabled:true, - scope: this.viewer, + scope: viewer, handler: function(){ this.searchTab(this.gridProgram.getSelectionModel().getSelected()); } } ,{ id:'tn', - tooltip: this.viewer.gridNow.szRecord, + tooltip: Ext.xxv.NowGrid.prototype.szRecord, iconCls: 'record-icon', disabled:true, - scope: this.viewer, + scope: viewer, handler: function(){ this.Record(this.gridProgram.getSelectionModel().getSelected()); } },{ id:'te', - tooltip: this.viewer.gridNow.szEditTimer, + tooltip: Ext.xxv.NowGrid.prototype.szEditTimer, iconCls: 'timer-edit-icon', disabled:true, scope: viewer, @@ -316,7 +319,7 @@ Ext.xxv.programPreview = function(viewer) { } },{ id:'td', - tooltip: this.viewer.gridNow.szDeleteTimer, + tooltip: Ext.xxv.NowGrid.prototype.szDeleteTimer, iconCls: 'timer-delete-icon', disabled:true, scope: viewer, @@ -327,36 +330,6 @@ Ext.xxv.programPreview = function(viewer) { }); }; -Ext.extend(Ext.xxv.programPreview, Ext.Panel, { - - select : function(record, lookup){ - if(this.body) - XXV.getTemplate().overwrite(this.body, record.data); - if(lookup) - highlightText(this.body.dom,lookup,'x-highlight',1); - - // Enable all toolbar buttons - var items = this.topToolbar.items; - if(items) { - items.eachKey(function(key, f) { - if(f.id == 'tn') { if(record.data.timerid) f.hide(); else f.show(); } - else if(f.id == 'te') { if(record.data.timerid) f.show(); else f.hide(); } - else if(f.id == 'td') { if(record.data.timerid) f.show(); else f.hide(); } - if(XXV.help.cmdAllowed(key)) f.enable(); - },items); - } - } - ,clear: function(){ - if(this) { - if(this.body) - this.body.update(''); - // Disable all items - var items = this.topToolbar.items; - if(items) { items.eachKey(function(key, f){f.disable();},items); } - } - } -}); - function createProgramView(viewer,id, record) { viewer.gridProgram = new Ext.xxv.programGrid(viewer, record); diff --git a/skins/jason/search.js b/skins/jason/search.js index ce1f458..cb637cc 100644 --- a/skins/jason/search.js +++ b/skins/jason/search.js @@ -1,6 +1,6 @@ /* * jason - Javascript based skin for xxv - * Copyright(c) 2008-2010, anbr + * Copyright(c) 2008-2011, anbr * * http://xxv.berlios.de/ * @@ -26,9 +26,12 @@ Ext.xxv.searchStore = function(lookup) { ,{name: 'timerid', type: 'string'} ,{name: 'timeractiv', type: 'string'} ,{name: 'running', type: 'string'} - ,{name: 'video', type: 'string'} - ,{name: 'audio', type: 'string'} ,{name: 'level', type: 'int'} + //*** filled later by display *** + ,{name: 'image', type: 'string'} + ,{name: 'audio', type: 'string'} + ,{name: 'video', type: 'string'} + ,{name: 'contents', type: 'string'} ] }) ,proxy : new Ext.data.HttpProxy({ @@ -43,11 +46,12 @@ Ext.xxv.searchStore = function(lookup) { Ext.xxv.searchGrid = function(viewer, lookup) { this.viewer = viewer; - this.preview = new Ext.xxv.searchPreview(viewer); - //Ext.apply(this, config); // create the data store this.store = new Ext.xxv.searchStore(lookup); + + this.preview = new Ext.xxv.searchPreview(viewer, this.store); + this.store.setDefaultSort('day', "ASC"); this.columns = [{ @@ -103,7 +107,7 @@ Ext.xxv.searchGrid = function(viewer, lookup) { ,scope:this }); this.on('rowcontextmenu', this.onContextClick, this); - this.getSelectionModel().on('rowselect', this.select, this, {buffer:50}); + this.getSelectionModel().on('rowselect', this.showDetails, this, {buffer:50}); }; Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, { @@ -135,7 +139,9 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, { this.ownerCt.SetPanelTitle(store.baseParams.data); } - + ,showDetails : function(sm, index, record){ + this.preview.showDetails(record, record.data.id, this.store.baseParams.data); + } ,onContextClick : function(grid, index, e){ if(!this.menu){ // create context menu on first right click this.menu = new Ext.menu.Menu({ @@ -265,14 +271,10 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, { } this.viewer.gridNow.DeleteTimerId(items, this.store); } - ,select : function(sm, index, record){ - this.preview.select(record,this.store.baseParams.data); - } }); -Ext.xxv.searchPreview = function(viewer) { - this.viewer = viewer; - Ext.xxv.searchPreview.superclass.constructor.call(this, { +Ext.xxv.searchPreview = function(viewer,store) { + return new Ext.xxv.EPGPreview(viewer,store, { id: 'preview-Search', region: 'south', cls:'preview', @@ -287,14 +289,14 @@ Ext.xxv.searchPreview = function(viewer) { handler: function(){ this.searchTab(this.gridSearch.getSelectionModel().getSelected()); } } ,{ id:'tn', - tooltip: this.viewer.gridNow.szRecord, + tooltip: Ext.xxv.NowGrid.prototype.szRecord, iconCls: 'record-icon', disabled:true, scope: viewer, handler: function(){ this.Record(this.gridSearch.getSelectionModel().getSelected()); } },{ id:'te', - tooltip: this.viewer.gridNow.szEditTimer, + tooltip: Ext.xxv.NowGrid.prototype.szEditTimer, iconCls: 'timer-edit-icon', disabled:true, scope: viewer, @@ -303,7 +305,7 @@ Ext.xxv.searchPreview = function(viewer) { } },{ id:'td', - tooltip: this.viewer.gridNow.szDeleteTimer, + tooltip: Ext.xxv.NowGrid.prototype.szDeleteTimer, iconCls: 'timer-delete-icon', disabled:true, scope: viewer, @@ -313,33 +315,6 @@ Ext.xxv.searchPreview = function(viewer) { } ] }); }; -Ext.extend(Ext.xxv.searchPreview, Ext.Panel, { - select : function(record, lookup){ - if(this.body) - XXV.getTemplate().overwrite(this.body, record.data); - if(lookup) - highlightText(this.body.dom,lookup,'x-highlight',1); - // Enable all toolbar buttons - var items = this.topToolbar.items; - if(items) { - items.eachKey(function(key, f) { - if(f.id == 'tn') { if(record.data.timerid) f.hide(); else f.show(); } - else if(f.id == 'te') { if(record.data.timerid) f.show(); else f.hide(); } - else if(f.id == 'td') { if(record.data.timerid) f.show(); else f.hide(); } - if(XXV.help.cmdAllowed(key)) f.enable(); - },items); - } - } - ,clear: function(){ - if(this) { - if(this.body) - this.body.update(''); - // Disable all items - var items = this.topToolbar.items; - if(items) { items.eachKey(function(key, f){f.disable();},items); } - } - } -}); function createSearchView(viewer,id,lookup) { diff --git a/skins/jason/timers.js b/skins/jason/timers.js index a7bf85f..e6e51a4 100644 --- a/skins/jason/timers.js +++ b/skins/jason/timers.js @@ -1,6 +1,6 @@ /* * jason - Javascript based skin for xxv - * Copyright(c) 2008-2010, anbr + * Copyright(c) 2008-2011, anbr * * http://xxv.berlios.de/ * @@ -25,12 +25,17 @@ Ext.xxv.timerStore = function() { ,{name: 'title', type: 'string'} ,{name: 'priority', type: 'int'} ,{name: 'collision', type: 'string'} - ,{name: 'eventid', type: 'int'} + ,{name: 'eventid', type: 'string'} ,{name: 'autotimerid', type: 'int'} ,{name: 'duration', type: 'int'} ,{name: 'description', type: 'string'} ,{name: 'running', type: 'bool'} ,{name: 'host', type: 'string'} + //*** filled later by display *** + ,{name: 'image', type: 'string'} + ,{name: 'audio', type: 'string'} + ,{name: 'video', type: 'string'} + ,{name: 'contents', type: 'string'} ] }) ,proxy : new Ext.data.HttpProxy({ @@ -45,10 +50,11 @@ Ext.xxv.timerStore = function() { Ext.xxv.timerGrid = function(viewer) { this.viewer = viewer; - this.preview = new Ext.xxv.timerPreview(viewer); - // create primary data store this.store = new Ext.xxv.timerStore(); + + this.preview = new Ext.xxv.timerPreview(viewer, this.store); + this.store.setDefaultSort('day', "ASC"); // create the channels store @@ -192,7 +198,7 @@ Ext.xxv.timerGrid = function(viewer) { }); this.on('rowcontextmenu', this.onContextClick, this); this.on('rowdblclick', this.onEditItem, this); - this.getSelectionModel().on('rowselect', this.select, this, {buffer:50}); + this.getSelectionModel().on('rowselect', this.showDetails, this, {buffer:50}); }; Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel @@ -239,6 +245,9 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel this.ownerCt.SetPanelTitle(this.szTitle); } + ,showDetails : function(sm, index, record){ + this.preview.showDetails(record, record.data.eventid, this.filter.getValue()); + } ,refreshPanel : function(panel){ if(this.dataDirty) this.store.reload(); @@ -551,14 +560,10 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel } this.viewer.formwin = new Ext.xxv.Question(item, this.updateTimer, this); } - ,select : function(sm, index, record){ - this.preview.select(record, this.filter.getValue()); - } }); -Ext.xxv.timerPreview = function(viewer) { - this.viewer = viewer; - Ext.xxv.timerPreview.superclass.constructor.call(this, { +Ext.xxv.timerPreview = function(viewer,store) { + return new Ext.xxv.EPGPreview(viewer,store, { id: 'preview-timer', region: 'south', cls:'preview', @@ -568,14 +573,14 @@ Ext.xxv.timerPreview = function(viewer) { { id:'s' ,iconCls: 'find-icon' - ,tooltip: this.szFindReRun + ,tooltip: Ext.xxv.timerGrid.prototype.szFindReRun ,scope: viewer ,disabled:true ,handler: function(){ this.searchTab(this.gridTimer.getSelectionModel().getSelected()); } },{ id:'te' ,iconCls: 'edit-icon' - ,tooltip: this.szEdit + ,tooltip: Ext.xxv.timerGrid.prototype.szEdit ,scope: viewer ,disabled:true ,handler: function(){ this.gridTimer.EditItem(this.gridTimer.getSelectionModel().getSelected()); } @@ -589,7 +594,7 @@ Ext.xxv.timerPreview = function(viewer) { },{ id:'td' ,iconCls: 'timer-delete-icon' - ,tooltip: this.szDelete + ,tooltip: Ext.xxv.timerGrid.prototype.szDelete ,scope: viewer ,disabled:true ,handler: function(){ this.gridTimer.DeleteItem(this.gridTimer.getSelectionModel().getSelected()); } @@ -597,37 +602,6 @@ Ext.xxv.timerPreview = function(viewer) { }); }; -Ext.extend(Ext.xxv.timerPreview, Ext.Panel, { - szFindReRun : "Find rerun" - ,szEdit : "Edit" - ,szDelete : "Delete" - ,select : function(record, lookup){ - if(this.body) - XXV.getTemplate().overwrite(this.body, record.data); - if(lookup) - highlightText(this.body.dom,lookup,'x-highlight',1); - - var hasAutotimer = (record.data.autotimerid <= 0) ? 0 : 1; - // Enable all toolbar buttons - var items = this.topToolbar.items; - if(items) { - items.eachKey(function(key, f) { - if(f.id == 'ae') { if(hasAutotimer) f.show(); else f.hide(); } - if(XXV.help.cmdAllowed(key)) f.enable(); - },items); - } - } - ,clear: function(){ - if(this) { - if(this.body) - this.body.update(''); - // Disable all items - var items = this.topToolbar.items; - if(items) { items.eachKey(function(key, f){f.disable();},items); } - } - } -}); - function createTimerView(viewer,id) { viewer.gridTimer = new Ext.xxv.timerGrid(viewer); diff --git a/skins/stone/program.tmpl b/skins/stone/program.tmpl index 7afd584..6fb942f 100644 --- a/skins/stone/program.tmpl +++ b/skins/stone/program.tmpl @@ -119,8 +119,7 @@ <?% FOREACH zeile = data %?> <?% IF verbose;"<!-- Item: ";FOREACH x = zeile;loop.count - 1;":";x.replace("-"," ");"|";END;"-->";END %?> <?% id=zeile.0;title=zeile.1;subtitle=zeile.2;start=zeile.3;stop=zeile.4; - description=zeile.6;video=zeile.7;audio=zeile.8;pdc=zeile.9; - timerid=zeile.10;recording=zeile.11;running=zeile.12; + description=zeile.6;pdc=zeile.7;timerid=zeile.8;recording=zeile.9;running=zeile.10; day = zeile.5 %?> <?% IF old.defined && day != old %?> <div class="areaclose"></div> diff --git a/skins/stone/schema.tmpl b/skins/stone/schema.tmpl index f4681a6..eb1ba46 100644 --- a/skins/stone/schema.tmpl +++ b/skins/stone/schema.tmpl @@ -117,23 +117,21 @@ <td colspan="<?% colspan %?>" style="white-space: nowrap;"> <?%- ges = 0; oldend = param.zeitvon -%?> <?%- FOREACH event = data.$cpos; - id = event.0;
- title = event.1;
- subtitle = event.2;
- sender = event.3;
- channel = event.4;
- start = event.5;
- stop = event.6;
+ id = event.0; + title = event.1; + subtitle = event.2; + sender = event.3; + channel = event.4; + start = event.5; + stop = event.6; percent100 = event.7; - description = event.8;
- second_start = event.9;
- second_stop = event.10;
- video = event.11;
- audio = event.12;
- image = event.13; - timerid = event.14; - recording = event.15; - running = event.16; + description = event.8; + second_start = event.9; + second_stop = event.10; + image = event.11; + timerid = event.12; + recording = event.13; + running = event.14; IF second_start > oldend; laenge = second_start - oldend; percent = (laenge / Duration) * width; diff --git a/skins/stone/search.tmpl b/skins/stone/search.tmpl index 2892687..39f235e 100644 --- a/skins/stone/search.tmpl +++ b/skins/stone/search.tmpl @@ -139,15 +139,6 @@ <input style="width:auto;" type="radio" name="__Where" value="title" <?% IF cgi.param('__Where') == 'title' %?>checked="checked"<?% END %?> /><?% gettext('Only in title') %?><br /> <input style="width:auto;" type="radio" name="__Where" value="titlesubtitle" <?% IF cgi.param('__Where') == 'titlesubtitle' %?>checked="checked"<?% END %?> /><?% gettext('Only in title and subtitle') %?><br /> <br /> - <?% gettext('Video format',30) %?><br /> - <input style="width:auto;" type="radio" name="__VideoFormat" value="all" <?% IF ! cgi.param('__VideoFormat') || cgi.param('__VideoFormat') == 'all' %?>checked="checked"<?% END %?> /><?% gettext('All') %?><br /> - <input style="width:auto;" type="radio" name="__VideoFormat" value="widescreen" <?% IF cgi.param('__VideoFormat') == 'widescreen' %?>checked="checked"<?% END %?> /><?% gettext('16:9 Wide screen') %?><br /> - <br /> - <?% gettext('Audio format',30) %?><br /> - <input style="width:auto;" type="radio" name="__AudioFormat" value="all" <?% IF ! cgi.param('__AudioFormat') || cgi.param('__AudioFormat') == 'all' %?>checked="checked"<?% END %?> /><?% gettext('All') %?><br /> - <input style="width:auto;" type="radio" name="__AudioFormat" value="dts" <?% IF cgi.param('__AudioFormat') == 'dts' %?>checked="checked"<?% END %?> /><?% gettext('Dolby Digital') %?><br /> - <input style="width:auto;" type="radio" name="__AudioFormat" value="stereo" <?% IF cgi.param('__AudioFormat') == 'stereo' %?>checked="checked"<?% END %?> /><?% gettext('Stereo') %?><br /> - <br /> <?% gettext('Minimum length (in minutes)',30) %?><br /> <input type="text" name="__MinLength" value="<?% cgi.param('__MinLength') %?>" /> <br /><br /> diff --git a/skins/stone_flat/program.tmpl b/skins/stone_flat/program.tmpl index 5372dd2..7f1d733 100644 --- a/skins/stone_flat/program.tmpl +++ b/skins/stone_flat/program.tmpl @@ -94,8 +94,7 @@ <?% FOREACH zeile = data %?> <?% IF verbose;"<!-- Item: ";FOREACH x = zeile;loop.count - 1;":";x.replace("-"," ");"|";END;"-->";END %?> <?% id=zeile.0;title=zeile.1;subtitle=zeile.2;start=zeile.3;stop=zeile.4; - description=zeile.6;video=zeile.7;audio=zeile.8;pdc=zeile.9; - timerid=zeile.10;recording=zeile.11;running=zeile.12; + description=zeile.6;pdc=zeile.7;timerid=zeile.8;recording=zeile.9;running=zeile.10; day = zeile.5 %?> <?% IF !old.defined || day != old %?> <?% IF old.defined %?> diff --git a/skins/stone_flat/search.tmpl b/skins/stone_flat/search.tmpl index b45565d..9f21b97 100644 --- a/skins/stone_flat/search.tmpl +++ b/skins/stone_flat/search.tmpl @@ -129,15 +129,6 @@ <input style="width:auto;" type="radio" name="__Where" value="title" <?% IF cgi.param('__Where') == 'title' %?>checked<?% END %?> /><?% gettext('Only in title') %?><br /> <input style="width:auto;" type="radio" name="__Where" value="titlesubtitle" <?% IF cgi.param('__Where') == 'titlesubtitle' %?>checked<?% END %?> /><?% gettext('Only in title and subtitle') %?><br /> <br /> - <?% gettext('Video format',30) %?><br /> - <input style="width:auto;" type="radio" name="__VideoFormat" value="all" <?% IF ! cgi.param('__VideoFormat') || cgi.param('__VideoFormat') == 'all' %?>checked<?% END %?> /><?% gettext('All') %?><br /> - <input style="width:auto;" type="radio" name="__VideoFormat" value="widescreen" <?% IF cgi.param('__VideoFormat') == 'widescreen' %?>checked<?% END %?> /><?% gettext('16:9 Wide screen') %?><br /> - <br /> - <?% gettext('Audio format',30) %?><br /> - <input style="width:auto;" type="radio" name="__AudioFormat" value="all" <?% IF ! cgi.param('__AudioFormat') || cgi.param('__AudioFormat') == 'all' %?>checked<?% END %?> /><?% gettext('All') %?><br /> - <input style="width:auto;" type="radio" name="__AudioFormat" value="dts" <?% IF cgi.param('__AudioFormat') == 'dts' %?>checked<?% END %?> /><?% gettext('Dolby Digital') %?><br /> - <input style="width:auto;" type="radio" name="__AudioFormat" value="stereo" <?% IF cgi.param('__AudioFormat') == 'stereo' %?>checked<?% END %?> /><?% gettext('Stereo') %?><br /> - <br /> <?% gettext('Minimum length (in minutes)',30) %?><br /> <input type="text" name="__MinLength" value="<?% cgi.param('__MinLength') %?>" /> <br /><br /> diff --git a/skins/xstyle/bloecke/event_links.tmpl b/skins/xstyle/bloecke/event_links.tmpl index 1cd30de..f8fd1bd 100644 --- a/skins/xstyle/bloecke/event_links.tmpl +++ b/skins/xstyle/bloecke/event_links.tmpl @@ -12,17 +12,4 @@ <a href="?cmd=switch&data=<?% url(data.4) %?>"><img src="images/switch.png" title="<?% gettext("Switch to channel") %?> <?% data.3 %?>" /></a><?% umbruch %?> <?% END %?> <?% INCLUDE 'bloecke/stars.tmpl' eventid=data.0 %?> -<?% IF data.7; - vid = data.7.split(' '); - video = (vid.3 == '16:9' ? '16_9Screen.png' : '4_3Screen.png'); - videotext = (vid.3 == '16:9' ? '16:9' : '4:3') %?> - <img src="images/<?% video %?>" title="<?% gettext("Video format") %?> : <?% videotext %?>" /><?% umbruch %?> -<?% END %?> -<?% IF data.8; - aud = data.8.split("\n"); - audio = (aud.size > 2 ? 'Dolby' : 'Stereo') %?> - <?% IF audio == 'Dolby' %?> - <img src="images/dolby.png" title="<?% gettext("Audio format") %?> : <?% audio %?>" /><?% umbruch %?> - <?% END %?> -<?% END %?> </div> diff --git a/skins/xstyle/schema.tmpl b/skins/xstyle/schema.tmpl index c147791..ca463a0 100644 --- a/skins/xstyle/schema.tmpl +++ b/skins/xstyle/schema.tmpl @@ -96,12 +96,10 @@ sec_height = 0.1; epgDesc = e.8; second_start= e.9; second_stop = e.10; - video = e.11; - audio = e.12; - image = e.13; - timerid = e.14; - recording = e.15; - running = e.16; + image = e.11; + timerid = e.12; + recording = e.13; + running = e.14; # Schon früher angefangende Sendung ... IF second_start < param.zeitvon; diff --git a/skins/xstyle/search.tmpl b/skins/xstyle/search.tmpl index 086d841..5378a2f 100644 --- a/skins/xstyle/search.tmpl +++ b/skins/xstyle/search.tmpl @@ -31,21 +31,6 @@ </td> </tr> <tr> - <td><?% gettext('Video format') %?>:</td> - <td> - <input type="radio" name="__VideoFormat" value="all" <?% IF ! cgi.param('__VideoFormat') || cgi.param('__VideoFormat') == 'all' %?>checked<?% END %?>><?% gettext('All') %?> - <input type="radio" name="__VideoFormat" value="widescreen" <?% IF cgi.param('__VideoFormat') == 'widescreen' %?>checked<?% END %?>><?% gettext('16:9 Wide screen') %?> - </td> -</tr> -<tr> - <td><?% gettext('Audio format') %?>:</td> - <td> - <input type="radio" name="__AudioFormat" value="all" <?% IF ! cgi.param('__AudioFormat') || cgi.param('__AudioFormat') == 'all' %?>checked<?% END %?>><?% gettext('All') %?> - <input type="radio" name="__AudioFormat" value="dts" <?% IF cgi.param('__AudioFormat') == 'dts' %?>checked<?% END %?>><?% gettext('Dolby Digital') %?> - <input type="radio" name="__AudioFormat" value="stereo" <?% IF cgi.param('__AudioFormat') == 'stereo' %?>checked<?% END %?>><?% gettext('Stereo') %?> - </td> -</tr> -<tr> <td><?% gettext('Minimum length (in minutes)') %?>:</td> <td> <input type="text" name="__MinLength" value="<?% cgi.param('__MinLength') %?>"> |
