jam-cloud/web/app/assets/javascripts/react-components/UploadAvatarDialog.js.jsx.c...

46 lines
838 B
CoffeeScript
Raw Permalink Normal View History

context = window
@UploadAvatarDialog = React.createClass({
mixins: [Reflux.listenTo(@AppStore, "onAppInit")]
beforeShow: (args) ->
afterHide: () ->
onAppInit: (@app) ->
dialogBindings = {
'beforeShow': @beforeShow,
'afterHide': @afterHide
};
@app.bindDialog('upload-avatar', dialogBindings);
getInitialState: () ->
{}
render: () ->
`<div>
<div className="content-head">
<img className="content-icon" src="/assets/content/icon_add.png" height={19} width={19}/>
<h1>Update Logo</h1>
</div>
<div className="dialog-inner">
<AvatarUploader />
</div>
</div>`
componentDidMount: () ->
$root = $(@getDOMNode())
componentWillUpdate: () ->
$root = $(@getDOMNode())
componentDidUpdate: () ->
$root = $(@getDOMNode())
})