only send required keys to addClips, clip might contain more info like title
This commit is contained in:
parent
3f9e50ac8f
commit
5a966577b0
1 changed files with 12 additions and 2 deletions
|
@ -159,7 +159,14 @@ pandora.ui.editPanel = function() {
|
|||
paste: function() {
|
||||
if (Ox.Clipboard.type() == 'clip') {
|
||||
pandora.api.addClips({
|
||||
clips: Ox.Clipboard.paste(),
|
||||
clips: Ox.Clipboard.paste().map(function(clip) {
|
||||
return {
|
||||
annotation: clip.annotation,
|
||||
'in': clip['in'],
|
||||
item: clip.item,
|
||||
out: clip.out
|
||||
};
|
||||
}),
|
||||
edit: ui.edit
|
||||
}, function(result) {
|
||||
Ox.Request.clearCache('getEdit');
|
||||
|
@ -212,7 +219,10 @@ pandora.ui.editPanel = function() {
|
|||
if (key == 'position') {
|
||||
key = 'in';
|
||||
}
|
||||
if (['id', 'index', 'in', 'out', 'duration'].indexOf(key) > -1) {
|
||||
if ([
|
||||
'id', 'index', 'in', 'out', 'duration',
|
||||
'title', 'director', 'year', 'videoRatio'
|
||||
].indexOf(key) > -1) {
|
||||
edit.clips = Ox.sortBy(edit.clips, key);
|
||||
if (data[0].operator == '-') {
|
||||
edit.clips.reverse();
|
||||
|
|
Loading…
Reference in a new issue