From f521b54f5a85cec4f025bb624c17b9b0a7f89fe1 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 13 Jul 2013 22:59:51 +0000 Subject: [PATCH] clipList: handle copy event --- static/js/pandora/clipList.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/static/js/pandora/clipList.js b/static/js/pandora/clipList.js index da2bf496..1ec0cb1c 100644 --- a/static/js/pandora/clipList.js +++ b/static/js/pandora/clipList.js @@ -113,6 +113,19 @@ pandora.ui.clipList = function(videoRatio) { }) .addClass('OxMedia') .bindEvent({ + copy: function(data) { + var items = data.ids.map(function(id) { + var item = !ui.item ? id.split('/')[0] : ui.item, + annotation = that.value(id, 'annotations')[0].id; + return { + annotation: annotation, + 'in': that.value(id, 'in'), + item: item, + out: that.value(id, 'out') + } + }) + Ox.Clipboard.copy(items, 'clip'); + }, init: function(data) { if (!ui.item && ui.listView == 'clip'/* && pandora.$ui.statusbar*/) { pandora.$ui.statusbar.set('total', data);