* VRFS-3419 - check better for window opener

This commit is contained in:
Seth Call 2015-08-27 09:43:40 -05:00
parent 377815691f
commit 0d68a53842
3 changed files with 24 additions and 3 deletions

View File

@ -8,7 +8,11 @@ mixins = []
# this check ensures we attempt to listen if this component is created in a popup
reactContext = if window.opener? then window.opener else window
# make sure this is actually us opening the window, not someone else (by checking for MixerStore)
reactContext = window unless 'MixerStore' in reactContext
if window.opener?
try
m = window.opener.MixerStore
catch e
reactContext = window
MixerStore = reactContext.MixerStore
MixerActions = reactContext.MixerActions

View File

@ -6,7 +6,15 @@ mixins = []
# make sure this is actually us opening the window, not someone else (by checking for MixerStore)
if window.opener? && ('MixerStore' in window.opener)
accessOpener = false
if window.opener?
try
m = window.opener.MixerStore
accessOpener = true
catch e
if accessOpener
SessionActions = window.opener.SessionActions
MediaPlaybackStore = window.opener.MediaPlaybackStore
MixerActions = window.opener.MixerActions

View File

@ -3,7 +3,16 @@ context = window
mixins = []
# make sure this is actually us opening the window, not someone else (by checking for MixerStore)
if window.opener && ('MixerStore' in window.opener)
accessOpener = false
if window.opener?
try
m = window.opener.MixerStore
accessOpener = true
catch e
if accessOpener
mixins.push(Reflux.listenTo(window.opener.RecordingStore,"onRecordingStateChanged"))
@PopupRecordingStartStop = React.createClass({