Post settings gets published_at

closes #773

- listen for change events on published_at
- change all listeners in views to use this.listenTo
This commit is contained in:
Hannah Wolfe 2013-09-17 10:26:28 +01:00
parent 3971abab9d
commit 357cb9f201
3 changed files with 3 additions and 2 deletions

View File

@ -32,7 +32,7 @@
self.allGhostTags = tagCollection.toJSON();
});
this.model.on('willSave', this.completeCurrentTag, this);
this.listenTo(this.model, 'willSave', this.completeCurrentTag, this);
},
render: function () {

View File

@ -93,7 +93,7 @@
self.updatePost();
});
this.listenTo(this.model, 'change:status', this.render);
this.model.on('change:id', function (m) {
this.listenTo(this.model, 'change:id', function (m) {
Backbone.history.navigate('/editor/' + m.id + '/');
});
},

View File

@ -17,6 +17,7 @@
initialize: function () {
if (this.model) {
this.listenTo(this.model, 'change:status', this.render);
this.listenTo(this.model, 'change:published_at', this.render);
}
},