context = window var broadcastActions = window.JK.Actions.Broadcast; var rest = window.JK.Rest(); var Broadcast = React.createClass({ displayName: 'Broadcast Notification', handleNavigate: function (e) { var href = $(e.currentTarget).attr('href') if (href.indexOf('http') == 0) { e.preventDefault() window.JK.popExternalLink(href) } broadcastActions.hide.trigger() }, notNow: function (e) { e.preventDefault(); rest.quietBroadcastNotification({broadcast_id: this.props.notification.id}) broadcastActions.hide.trigger() }, createMarkup: function() { return {__html: this.props.notification.message}; }, render: function () { return
{this.props.notification.button_label}
not now, thanks
} }); // each file will export exactly one component context.JK.Components.Broadcast = Broadcast context.Broadcast = Broadcast