hookup annotation state to video player view

This commit is contained in:
j 2012-02-01 07:13:46 +00:00
parent 82c83c1309
commit 03124c5116
2 changed files with 23 additions and 5 deletions

View file

@ -121,7 +121,9 @@ pandora.ui.item = function() {
} else if (pandora.user.ui.itemView == 'video') { } else if (pandora.user.ui.itemView == 'video') {
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.player = Ox.VideoPanel({ pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.player = Ox.VideoPanel({
annotationsCalendarSize: pandora.user.ui.annotationsCalendarSize,
annotationsFont: pandora.user.ui.annotationsFont, annotationsFont: pandora.user.ui.annotationsFont,
annotationsMapSize: pandora.user.ui.annotationsMapSize,
annotationsRange: pandora.user.ui.annotationsRange, annotationsRange: pandora.user.ui.annotationsRange,
annotationsSize: pandora.user.ui.annotationsSize, annotationsSize: pandora.user.ui.annotationsSize,
annotationsSort: pandora.user.ui.annotationsSort, annotationsSort: pandora.user.ui.annotationsSort,
@ -144,7 +146,10 @@ pandora.ui.item = function() {
resolution: pandora.user.ui.videoResolution, resolution: pandora.user.ui.videoResolution,
scaleToFill: pandora.user.ui.videoScale == 'fill', scaleToFill: pandora.user.ui.videoScale == 'fill',
showAnnotations: pandora.user.ui.showAnnotations, showAnnotations: pandora.user.ui.showAnnotations,
showAnnotationsCalendar: pandora.user.ui.showAnnotationsCalendar,
showAnnotationsMap: pandora.user.ui.showAnnotationsMap,
showLayers: pandora.user.ui.showLayers, showLayers: pandora.user.ui.showLayers,
showUsers: pandora.site.annotations.showUsers,
showTimeline: pandora.user.ui.showTimeline, showTimeline: pandora.user.ui.showTimeline,
showUsers: pandora.site.annotations.showUsers, showUsers: pandora.site.annotations.showUsers,
subtitles: videoOptions.subtitles, subtitles: videoOptions.subtitles,
@ -184,6 +189,12 @@ pandora.ui.item = function() {
resizeannotations: function(data) { resizeannotations: function(data) {
pandora.UI.set('annotationsSize', data.annotationsSize); pandora.UI.set('annotationsSize', data.annotationsSize);
}, },
resizecalendar: function(data) {
pandora.UI.set('annotationsCalendarSize', data.size);
},
resizemap: function(data) {
pandora.UI.set('annotationsMapSize', data.size);
},
resolution: function(data) { resolution: function(data) {
pandora.UI.set('videoResolution', data.resolution); pandora.UI.set('videoResolution', data.resolution);
}, },
@ -193,6 +204,12 @@ pandora.ui.item = function() {
subtitles: function(data) { subtitles: function(data) {
pandora.UI.set('videoSubtitles', data.subtitles); pandora.UI.set('videoSubtitles', data.subtitles);
}, },
togglemap: function(data) {
pandora.UI.set('showAnnotationsMap', !data.collapsed);
},
togglesize: function(data) {
pandora.UI.set({videoSize: data.size});
},
toggleannotations: function(data) { toggleannotations: function(data) {
pandora.UI.set('showAnnotations', data.showAnnotations); pandora.UI.set('showAnnotations', data.showAnnotations);
}, },
@ -299,10 +316,10 @@ pandora.ui.item = function() {
pandora.$ui.placesDialog && pandora.$ui.placesDialog.remove(); pandora.$ui.placesDialog && pandora.$ui.placesDialog.remove();
pandora.$ui.placesDialog = pandora.ui.placesDialog(data).open(); pandora.$ui.placesDialog = pandora.ui.placesDialog(data).open();
}, },
downloadVideo: function(data) { downloadvideo: function(data) {
document.location.href = '/' + pandora.user.ui.item + '/torrent/'; document.location.href = '/' + pandora.user.ui.item + '/torrent/';
}, },
downloadSelection: function(data) { downloadselection: function(data) {
document.location.href = [ document.location.href = [
'/', '/',
pandora.user.ui.item, pandora.user.ui.item,
@ -337,7 +354,7 @@ pandora.ui.item = function() {
}, callback); }, callback);
} }
}, },
embedSelection: function(data) { embedselection: function(data) {
pandora.$ui.embedDialog && pandora.$ui.embedDialog.remove(); pandora.$ui.embedDialog && pandora.$ui.embedDialog.remove();
pandora.$ui.embedDialog = pandora.ui.embedDialog(data).open(); pandora.$ui.embedDialog = pandora.ui.embedDialog(data).open();
}, },

View file

@ -175,7 +175,8 @@ pandora.changeListStatus = function(id, status, callback) {
}; };
pandora.clickLink = function(e) { pandora.clickLink = function(e) {
if (e.target.hostname == document.location.hostname) { if (e.target.hostname == document.location.hostname
&& !Ox.starts(e.target.pathname, '/static')) {
pandora.URL.push(e.target.pathname); pandora.URL.push(e.target.pathname);
} else { } else {
window.open('/url=' + encodeURIComponent(e.target.href), '_blank'); window.open('/url=' + encodeURIComponent(e.target.href), '_blank');