From de30bf5a44f21f103ebbf603e9fcd0d3fc145575 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 20 Feb 2013 11:04:33 +0000 Subject: [PATCH] dont resize embed, hook up open on site event --- static/js/pandora.js | 4 +++- static/js/pandora/embedPanel.js | 14 +++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/static/js/pandora.js b/static/js/pandora.js index c36113f2..f355d2b0 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -221,7 +221,9 @@ appPanel .on({ beforeunload: pandora.beforeunloadWindow, resize: function() { - pandora.resizeWindow(); + if (!isEmbed) { + pandora.resizeWindow(); + } }, unload: pandora.unloadWindow }) diff --git a/static/js/pandora/embedPanel.js b/static/js/pandora/embedPanel.js index 359f0b70..1200207c 100644 --- a/static/js/pandora/embedPanel.js +++ b/static/js/pandora/embedPanel.js @@ -109,6 +109,17 @@ pandora.ui.embedPanel = function() { out: options.out } : {})) .bindEvent({ + fullscreen: function(data) { + Ox.Fullscreen.toggle(); + }, + open: function() { + $player.options({paused: true}); + var url = document.location.protocol + '//' + + document.location.hostname + '/' + + options.item + '/' + + Ox.formatDuration($player.options('position')); + window.open(url, '_blank'); + }, playing: function(data) { setPosition(data.position, true); }, @@ -119,9 +130,6 @@ pandora.ui.embedPanel = function() { $timeline.options({ subtitles: data.subtitles ? video.subtitles : [] }); - }, - fullscreen: function(data) { - Ox.Fullscreen.toggle(); } });