forked from 0x2620/pandora
only listen to main videopoints.id event
This commit is contained in:
parent
a1163b5f2e
commit
dcaa9d0817
1 changed files with 19 additions and 16 deletions
|
@ -7,7 +7,8 @@ pandora.ui.item = function() {
|
||||||
'timeline', 'player', 'editor'
|
'timeline', 'player', 'editor'
|
||||||
].indexOf(pandora.user.ui.itemView) > -1,
|
].indexOf(pandora.user.ui.itemView) > -1,
|
||||||
item = pandora.user.ui.item,
|
item = pandora.user.ui.item,
|
||||||
that = Ox.Element();
|
that = Ox.Element(),
|
||||||
|
videopointsEvent = 'pandora_videopoints.' + item.toLowerCase();
|
||||||
|
|
||||||
pandora.api.get({
|
pandora.api.get({
|
||||||
id: pandora.user.ui.item,
|
id: pandora.user.ui.item,
|
||||||
|
@ -135,11 +136,12 @@ pandora.ui.item = function() {
|
||||||
if (isVideoView && result.data.rendered) {
|
if (isVideoView && result.data.rendered) {
|
||||||
// handle links in annotations
|
// handle links in annotations
|
||||||
pandora.$ui[pandora.user.ui.itemView].bindEvent(
|
pandora.$ui[pandora.user.ui.itemView].bindEvent(
|
||||||
'pandora_videopoints.' + pandora.user.ui.item.toLowerCase(),
|
videopointsEvent,
|
||||||
function(data) {
|
function(data, event, element) {
|
||||||
//Ox.print('DATA.VALUE', JSON.stringify(data.value));
|
|
||||||
var options = {};
|
var options = {};
|
||||||
if (data.value.annotation) {
|
if (event == videopointsEvent) {
|
||||||
|
//Ox.print('DATA.VALUE', JSON.stringify(data.value));
|
||||||
|
if (data && data.value && data.value.annotation) {
|
||||||
options.selected = pandora.user.ui.item + '/' + data.value.annotation;
|
options.selected = pandora.user.ui.item + '/' + data.value.annotation;
|
||||||
} else {
|
} else {
|
||||||
// if annotation got set to something other than '',
|
// if annotation got set to something other than '',
|
||||||
|
@ -153,6 +155,7 @@ pandora.ui.item = function() {
|
||||||
}
|
}
|
||||||
pandora.$ui[pandora.user.ui.itemView].options(options);
|
pandora.$ui[pandora.user.ui.itemView].options(options);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue