handle copy and points events

This commit is contained in:
rolux 2013-07-14 16:38:15 +00:00
parent b6955d743e
commit c547b6e877
2 changed files with 22 additions and 4 deletions

View file

@ -108,13 +108,13 @@ pandora.ui.editor = function(data) {
censored: function() {
pandora.URL.push(pandora.site.cantPlay.link);
},
copy: function(clips) {
Ox.Clipboard.copy(clips.map(function(clip) {
copy: function(data) {
Ox.Clipboard.copy(data.map(function(clip) {
return Ox.extend(clip, {item: ui.item});
}), 'clip');
},
copyadd: function(clip) {
Ox.Clipboard.add(clips.map(function(clip) {
copyadd: function(data) {
Ox.Clipboard.add(data.map(function(clip) {
return Ox.extend(clip, {item: ui.item});
}), 'clip');
},

View file

@ -70,6 +70,16 @@ pandora.ui.player = function(data) {
});
pandora.URL.push(pandora.site.cantPlay.link);
},
copy: function(data) {
Ox.Clipboard.copy(data.map(function(clip) {
return Ox.extend(clip, {item: ui.item});
}), 'clip');
},
copyadd: function(data) {
Ox.Clipboard.add(data.map(function(clip) {
return Ox.extend(clip, {item: ui.item});
}), 'clip');
},
downloadvideo: function(data) {
document.location.href = '/' + ui.item + '/torrent/';
},
@ -90,6 +100,14 @@ pandora.ui.player = function(data) {
data.position
);
},
points: function(data) {
pandora.UI.set('videoPoints.' + ui.item, {
annotation: ui.videoPoints[ui.item].annotation,
'in': data['in'],
out: data.out,
position: data.position
});
},
position: function(data) {
pandora.UI.set(
'videoPoints.' + ui.item + '.position',