Compare commits

...

3 Commits

Author SHA1 Message Date
Seth Call 0d68a53842 * VRFS-3419 - check better for window opener 2015-08-27 09:44:54 -05:00
Seth Call 377815691f * fix changed path 2015-08-27 08:43:14 -05:00
Seth Call b874a522ed * validate popup VRFS-3419 2015-08-27 08:12:47 -05:00
4 changed files with 29 additions and 3 deletions

View File

@ -7,6 +7,12 @@ mixins = []
# this check ensures we attempt to listen if this component is created in a popup # this check ensures we attempt to listen if this component is created in a popup
reactContext = if window.opener? then window.opener else window 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)
if window.opener?
try
m = window.opener.MixerStore
catch e
reactContext = window
MixerStore = reactContext.MixerStore MixerStore = reactContext.MixerStore
MixerActions = reactContext.MixerActions MixerActions = reactContext.MixerActions

View File

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

View File

@ -2,8 +2,17 @@ context = window
mixins = [] mixins = []
# this check ensures we attempt to listen if this component is created in a popup # make sure this is actually us opening the window, not someone else (by checking for MixerStore)
if 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")) mixins.push(Reflux.listenTo(window.opener.RecordingStore,"onRecordingStateChanged"))
@PopupRecordingStartStop = React.createClass({ @PopupRecordingStartStop = React.createClass({

View File

@ -2,7 +2,7 @@
* *
* *
# comes from the gem 'rails-assets-react-select' # comes from the gem 'rails-assets-react-select'
*= require react-select/dist/default.scss *= require react-select/default.scss
*/ */
@import "client/common.css.scss"; @import "client/common.css.scss";
.Select-control { .Select-control {