summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Callaghan <dcallagh@redhat.com>2017-10-23 13:14:42 +1000
committerDan Callaghan <dcallagh@redhat.com>2017-10-23 23:44:57 +0000
commit4fa17fb1758445827301da255cdec0ed7bb077d5 (patch)
tree3a8e991813b2023aab30d78e6177daa41897fce0
parent5b999ca043a41e135c6f876a1f4728ef6926f582 (diff)
more targetted re-rendering for the recipe page header
-rw-r--r--Server/assets/recipe-header.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/Server/assets/recipe-header.js b/Server/assets/recipe-header.js
index f6a8cfa..cb3041b 100644
--- a/Server/assets/recipe-header.js
+++ b/Server/assets/recipe-header.js
@@ -12,7 +12,9 @@ window.RecipePageHeaderView = Backbone.View.extend({
'click .edit': 'edit',
},
initialize: function () {
- this.listenTo(this.model, 'change', this.render);
+ this.listenTo(this.model, 'change:is_deleted change:can_edit', this.render);
+ // This view also updates the page title based on these attributes...
+ this.listenTo(this.model, 'change:whiteboard change:status change:result', this.render);
},
render: function () {
this.$el.html(this.template(this.model.attributes));