FIX: After closing a topic that's set to auto-close, remove the message that it will auto-close. Server was already doing the right thing.

This commit is contained in:
Neil Lalonde 2013-12-27 15:38:57 -05:00
parent ad375e231a
commit eca291c9fc
1 changed files with 3 additions and 0 deletions

View File

@ -146,6 +146,9 @@ Discourse.Topic = Discourse.Model.extend({
toggleStatus: function(property) {
this.toggleProperty(property);
if (property === 'closed' && this.get('closed')) {
this.set('details.auto_close_at', null);
}
return Discourse.ajax(this.get('url') + "/status", {
type: 'PUT',
data: {status: property, enabled: this.get(property) ? 'true' : 'false' }