only send required keys to addClips, clip might contain more info like title

This commit is contained in:
j 2013-07-15 12:14:50 +00:00
parent 3f9e50ac8f
commit 5a966577b0

View file

@ -159,7 +159,14 @@ pandora.ui.editPanel = function() {
paste: function() { paste: function() {
if (Ox.Clipboard.type() == 'clip') { if (Ox.Clipboard.type() == 'clip') {
pandora.api.addClips({ 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 edit: ui.edit
}, function(result) { }, function(result) {
Ox.Request.clearCache('getEdit'); Ox.Request.clearCache('getEdit');
@ -212,7 +219,10 @@ pandora.ui.editPanel = function() {
if (key == 'position') { if (key == 'position') {
key = 'in'; 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); edit.clips = Ox.sortBy(edit.clips, key);
if (data[0].operator == '-') { if (data[0].operator == '-') {
edit.clips.reverse(); edit.clips.reverse();