From 654b7d26f0a63709bbc1a7c74791b940eeaa2f8b Mon Sep 17 00:00:00 2001 From: sanj Date: Sat, 1 Jan 2011 19:44:42 +0530 Subject: [PATCH] deal with links to layers --- padmaTexts/static/js/views/sidebar.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/padmaTexts/static/js/views/sidebar.js b/padmaTexts/static/js/views/sidebar.js index 7e51c06..9372823 100644 --- a/padmaTexts/static/js/views/sidebar.js +++ b/padmaTexts/static/js/views/sidebar.js @@ -18,7 +18,7 @@ function setupPadmaLink(videoObj, data) { // $a.data("isDisplayed", false); //FIXME: tc is WRONG!!! - if (!$.inArray(data.linkData.type, ["info", "editor", "tc", "tcRange"])) { + if (!$.inArray(data.linkData.type, ["info", "editor", "tc", "tcRange", "layer"])) { return false; } // console.log(data.linkData); @@ -28,6 +28,13 @@ function setupPadmaLink(videoObj, data) { data.linkData.type = "tcRange"; } + if (data.linkData.type == 'layer') { + var layer = videoObj.getLayerById(data.linkData.layerId); + data.linkData.tcIn = ms2npt(layer.time_in); + data.linkData.tcOut = ms2npt(layer.time_out); + data.linkData.type = "tcRange"; + } + var linkData = data.linkData; //FIXME: put this as a variable, option somewhere? var $container = padmaContainer;