context = window rest = context.JK.Rest() logger = context.JK.logger AvatarStore = context.AvatarStore @AvatarEditLink = React.createClass({ mixins: [ Reflux.listenTo(AvatarStore, "onAvatarUpdate"), ] onAvatarUpdate: (avatar) -> @setState({avatar: avatar}) getInitialState: () -> { avatar: null, imageLoadedFpfile: null } componentWillMount: () -> componentDidMount: () -> @root = $(@getDOMNode()) startUpdate: () -> AvatarActions.start(this.props.target, this.props.target_type) render: () -> if this.props.target?.photo_url? target_type = this.props.target_type testStudentUrl = "/#{target_type}/#{this.props.target.id}/student?preview=true" testTeacherUrl = "/#{target_type}/#{this.props.target.id}/teacher?preview=true" if target_type == 'school' previewArea = `
See how it will look to  students and  teachers
` else previewArea = `
See how it will look to  teachers
` `

change/update logo
{previewArea}
` else `
No logo graphic uploaded
change/update logo
` })