This commit is contained in:
j 2011-02-04 18:54:34 +05:30
commit 7dd47d1544

View file

@ -1720,24 +1720,8 @@
} else if (app.user.ui.itemView == 'player') {
that = new Ox.Element('div');
} else if (app.user.ui.itemView == 'timeline') {
that = new Ox.SplitPanel({
elements: [
{
element: new Ox.Element('div'),
},
{
collapsed: !app.user.ui.showAnnotations,
collapsible: true,
element: new Ox.Element('div'),
resizable: true,
resize: [256, 384],
size: app.user.ui.annotationsSize
that = new Ox.Element('div');
}
]
})
}
getItem();
function getItem() {
pandora.api.getItem(app.user.ui.item, function(result) {
if (app.user.ui.itemView == 'info') {
//Ox.print('result.data.item', result.data.item)
@ -1795,7 +1779,8 @@
video.height = video.profiles[0]
video.width = parseInt(video.height * video.aspectRatio / 2) * 2;
video.url = video.baseUrl + '/' + video.height + 'p.' + ($.support.video.webm ? 'webm' : 'mp4');
that.replace(0, app.$ui.editor = new Ox.VideoEditor({
app.$ui.contentPanel.replace(1, app.$ui.editor = new Ox.VideoEditor({
annotationsSize: app.user.ui.annotationsSize,
cuts: cuts,
duration: video.duration,
find: '',
@ -1805,29 +1790,31 @@
height: app.$ui.contentPanel.size(1),
id: 'editor',
largeTimeline: true,
layers: app.config.layers,
matches: [],
points: [0, 0],
position: app.user.ui.videoPosition[app.user.ui.item] || 0,
posterFrame: parseInt(video.duration / 2),
showAnnotations: app.user.ui.showAnnotations,
subtitles: subtitles,
videoHeight: video.height,
videoId: app.user.ui.item,
videoWidth: video.width,
videoSize: app.user.ui.videoSize,
videoURL: video.url,
width: app.$ui.document.width() - app.$ui.mainPanel.size(0) - 1 -
(app.user.ui.showAnnotations * app.user.ui.annotationsSize) - 1
width: app.$ui.document.width() - app.$ui.mainPanel.size(0) - 1
}).bindEvent({
/*
resize: function(event, data) {
app.$ui.editor.options({
width: data
});
},
*/
togglesize: function(event, data) {
UI.set({videoSize: data.size});
}
}));
that.replace(1, app.$ui.annotations = ui.annotations());
that.bindEvent('resize', function(event, data) {
//Ox.print('resize item', data)
app.$ui.editor.options({
@ -1851,23 +1838,6 @@
}
app.$ui.total.html(result.data.item.title + ' (' + result.data.item.director.join(', ') + ')')
});
}
/*
that.display = function() {
app.$ui.contentPanel.replaceElements([
{
collapsible: true,
element: app.$ui.browser = ui.browser(),
resizable: false,
size: 112 + app.ui.scrollbarSize
},
{
element: new Ox.Element('div')
}
]);
getItem(); // fixme: can the asynchronicity be moved within the video editor?
}
*/
return that;
},
leftPanel: function() {
@ -2966,7 +2936,7 @@
width: data
});
app.user.ui.itemView == 'timeline' && app.$ui.editor.options({
width: data - (app.user.ui.showAnnotations * app.user.ui.annotationsSize) - 1
width: data
});
}
}
@ -3137,10 +3107,10 @@
}) : $.map(app.config.itemViews, function(view) {
return $.extend($.extend({}, view), {
checked: app.user.ui.itemView == view.id,
title: view.title
title: 'View: ' + view.title
});
}),
width: !app.user.ui.item ? 144 : 96
width: !app.user.ui.item ? 144 : 128
})
.css({
float: 'left',
@ -3412,8 +3382,7 @@
app.user.ui.itemView == 'timeline' && app.$ui.editor.options({
// fixme: duplicated
height: app.$ui.contentPanel.size(1),
width: app.$ui.document.width() - app.$ui.mainPanel.size(0) - 1 -
(app.user.ui.showAnnotations * app.user.ui.annotationsSize) - 1
width: app.$ui.document.width() - app.$ui.mainPanel.size(0) - 1
});
}
}