From c0bb1da71877bbd9842511042b13f44c47734aa8 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 20 Oct 2011 11:21:11 +0200 Subject: [PATCH] only load layers for video/timeline view --- static/js/pandora/ui/item.js | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/static/js/pandora/ui/item.js b/static/js/pandora/ui/item.js index 98d96962..477336a8 100644 --- a/static/js/pandora/ui/item.js +++ b/static/js/pandora/ui/item.js @@ -102,10 +102,10 @@ pandora.ui.item = function() { ); } else if (pandora.user.ui.itemView == 'video') { - // fixme: duplicated - var layers = [], - video = {}; pandora.api.get({id: pandora.user.ui.item, keys: ['layers']}, function(r) { + // fixme: duplicated + var layers = [], + video = {}; pandora.site.layers.forEach(function(layer, i) { layers[i] = Ox.extend({}, layer, {items: r.data.layers[layer.id]}); }); @@ -169,9 +169,9 @@ pandora.ui.item = function() { }); } else if (pandora.user.ui.itemView == 'timeline') { - var layers = [], - video = {}; pandora.api.get({id: pandora.user.ui.item, keys: ['layers']}, function(r) { + var layers = [], + video = {}; pandora.site.layers.forEach(function(layer) { layers.push(Ox.extend({items: r.data.layers[layer.id]}, layer)); }); @@ -272,17 +272,15 @@ pandora.ui.item = function() { height: data.size }); }); - }); - /* - pandora.$ui.rightPanel.bindEvent('resize', function(data) { - Ox.print('... rightPanel resize', data, pandora.$ui.timelinePanel.size(1)) - pandora.$ui.editor.options({ - width: data - pandora.$ui.timelinePanel.size(1) - 1 + /* + pandora.$ui.rightPanel.bindEvent('resize', function(data) { + Ox.print('... rightPanel resize', data, pandora.$ui.timelinePanel.size(1)) + pandora.$ui.editor.options({ + width: data - pandora.$ui.timelinePanel.size(1) - 1 + }); }); + */ }); - */ - - } else if (pandora.user.ui.itemView == 'map') { pandora.$ui.contentPanel.replaceElement(1, pandora.ui.navigationView('map', result.data.videoRatio));