From 5a966577b011ce5f947f579c7fd9e1e5e6ef46f1 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 15 Jul 2013 12:14:50 +0000 Subject: [PATCH] only send required keys to addClips, clip might contain more info like title --- static/js/pandora/editPanel.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/static/js/pandora/editPanel.js b/static/js/pandora/editPanel.js index 23c4e2bbd..94983d241 100644 --- a/static/js/pandora/editPanel.js +++ b/static/js/pandora/editPanel.js @@ -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();