diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2009-12-21 21:23:52 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2009-12-21 21:23:52 +0000 |
| commit | 50ef3da000689beb9146291ebe052a9a1a0bd2e4 (patch) | |
| tree | 8baf8362afbed6fbe2dc36e8b855e202efec986a | |
| parent | 6d3e88d05d3d104bec6f882d2a0205cd4d6f2ae7 (diff) | |
| download | xxv-50ef3da000689beb9146291ebe052a9a1a0bd2e4.tar.gz xxv-50ef3da000689beb9146291ebe052a9a1a0bd2e4.tar.bz2 | |
* jason: recordings - failback to default image if none preview image present
| -rw-r--r-- | skins/jason/recordings.js | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/skins/jason/recordings.js b/skins/jason/recordings.js index 7d80a9b..d17f7d7 100644 --- a/skins/jason/recordings.js +++ b/skins/jason/recordings.js @@ -1264,11 +1264,11 @@ function createRecordingsView(viewer,id) { this.tplimg = new Ext.Template('{day:date} - {start} ({period})'); this.tplimg.compile(); } + + this.remove(1); + var pic = new Array(); - var frames = record.data.preview.split(","); - if(frames && frames.length > 0) { - this.remove(1); - var pic = new Array(); + if(record.data.preview && record.data.preview.length > 0) { var frames = record.data.preview.split(","); Ext.each(frames, function(frame){ var u = "?cmd=ri&data="+record.data.id+"_"+frame; @@ -1285,20 +1285,31 @@ function createRecordingsView(viewer,id) { ,html: "<img width='160px' src='"+ u + "' 'ext:qtip='" + q + "'>" }); },this); + } else if(record.data.type == 'RADIO'){ + pic.push({ + frame: 0 + ,width: 160 + ,html: "<img width='160px' src='pic/radio.png'>" + }); + } else { + pic.push({ + frame: 0 + ,width: 160 + ,html: "<img width='160px' src='pic/movie.png'>" + }); + } + this.insert(1,new Ext.Container( { + id: 'preview-recordings-images' + ,height: 130 + ,layoutConfig: { + scrollButtonPosition:'split', + marginScrollButtons: 1, + pagedScroll: false + } + ,layout: 'carousel' + ,items: pic + })); - this.insert(1,new Ext.Container( { - id: 'preview-recordings-images' - ,height: 130 - ,layoutConfig: { - scrollButtonPosition:'split', - marginScrollButtons: 1, - pagedScroll: false - } - ,layout: 'carousel' - ,items: pic - })); - - } this.get(2).get(0).setvalue(record.data.marks,record.data.duration); // Keywords |
