dont expose ids of empty subtitles, fixes #1333

This commit is contained in:
j 2013-03-02 08:57:39 +00:00
commit 661e005b78
3 changed files with 14 additions and 5 deletions

View file

@ -119,16 +119,18 @@ pandora.ui.clipList = function(videoRatio) {
Ox.print(data.ids[0], '$$$$$', that.value(data.ids[0]))
var id = data.ids[0],
item = !ui.item ? id.split('/')[0] : ui.item,
annotation = that.value(id, 'annotations')[0].id,
points = {
annotation: that.value(id, 'annotations')[0].id.split('/')[1],
annotation: annotation ? annotation.split('/')[1] : '',
'in': that.value(id, 'in'),
out: that.value(id, 'out'),
position: that.value(id, 'in')
},
set;
if (isEmbed) {
// FIXME: This is wrong, see ticket #1333.
window.open('/' + item + '/' + points.annotation, '_blank');
window.open( '/' + item + '/'
+ (annotation ? points.annotation : points['in'] + ',' + points.out),
'_blank');
} else {
set = {
item: item,