some more fixes

This commit is contained in:
rolux 2011-08-19 17:45:16 +00:00
parent 524052790c
commit a815b3119e

View file

@ -206,6 +206,16 @@ pandora.ui.item = function() {
.bindEvent('resize', function() { .bindEvent('resize', function() {
pandora.$ui.map.resizeMap(); pandora.$ui.map.resizeMap();
})); }));
} else if (pandora.user.ui.itemView == 'statistics') {
var stats = Ox.Container();
Ox.TreeList({
data: result.data,
width: pandora.$ui.mainPanel.size(1) - Ox.UI.SCROLLBAR_SIZE
}).appendTo(stats);
pandora.$ui.contentPanel.replaceElement(1, stats);
} else if (pandora.user.ui.itemView == 'player') { } else if (pandora.user.ui.itemView == 'player') {
// fixme: duplicated // fixme: duplicated
var layers = [], var layers = [],
@ -223,7 +233,7 @@ pandora.ui.item = function() {
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.player = Ox.VideoPanelPlayer({ pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.player = Ox.VideoPanelPlayer({
annotationsSize: pandora.user.ui.annotationsSize, annotationsSize: pandora.user.ui.annotationsSize,
cuts: result.data.cuts || [], cuts: result.data.cuts || [],
duration: video.duration, duration: result.data.duration,
getTimelineImageURL: function(i) { getTimelineImageURL: function(i) {
return '/' + pandora.user.ui.item + '/timeline64p' + i + '.png'; return '/' + pandora.user.ui.item + '/timeline64p' + i + '.png';
}, },
@ -260,18 +270,9 @@ pandora.ui.item = function() {
pandora.UI.set('volume', data.volume); pandora.UI.set('volume', data.volume);
}, },
})); }));
} else if (pandora.user.ui.itemView == 'statistics') {
var stats = Ox.Container();
Ox.TreeList({
data: result.data,
width: pandora.$ui.mainPanel.size(1) - Ox.UI.SCROLLBAR_SIZE
}).appendTo(stats);
pandora.$ui.contentPanel.replaceElement(1, stats);
} else if (pandora.user.ui.itemView == 'timeline') { } else if (pandora.user.ui.itemView == 'timeline') {
var layers = [], var layers = [],
video = result.data.stream; video = {};
$.each(pandora.site.layers, function(i, layer) { $.each(pandora.site.layers, function(i, layer) {
layers[i] = $.extend({}, layer, {items: result.data.layers[layer.id]}); layers[i] = $.extend({}, layer, {items: result.data.layers[layer.id]});
}); });
@ -284,7 +285,7 @@ pandora.ui.item = function() {
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.editor = Ox.VideoEditor({ pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.editor = Ox.VideoEditor({
annotationsSize: pandora.user.ui.annotationsSize, annotationsSize: pandora.user.ui.annotationsSize,
cuts: result.data.cuts || [], cuts: result.data.cuts || [],
duration: video.duration, duration: result.data.duration,
find: '', find: '',
getFrameURL: function(position) { getFrameURL: function(position) {
return '/' + pandora.user.ui.item + '/' + Ox.last(pandora.site.video.resolutions) + 'p' + position + '.jpg'; return '/' + pandora.user.ui.item + '/' + Ox.last(pandora.site.video.resolutions) + 'p' + position + '.jpg';