Set template cue to dismiss welcome panel

This commit is contained in:
Ray Schamp 2015-10-22 17:17:27 -04:00
parent 58d3ed4ecb
commit af415e1bf3
2 changed files with 11 additions and 2 deletions

View file

@ -7,5 +7,6 @@
"/login_retry/",
"/media/",
"/session/",
"/site-api",
"/static/"
]

View file

@ -88,8 +88,16 @@ var Splash = injectIntl(React.createClass({
if (!err) this.setState({projectCount: body.count});
}.bind(this));
},
handleDismiss: function (flag) {
// TODO: Call flag setting xhr
handleDismiss: function (cue) {
this.api({
host: '',
uri: '/site-api/users/set-template-cue/',
method: 'post',
useCsrf: true,
json: {cue: cue, value: false}
}, function (err) {
if (!err) window.refreshSession();
});
},
renderHomepageRows: function () {
var formatMessage = this.props.intl.formatMessage;