Created
January 3, 2020 22:34
-
-
Save ranic/249158cf08ae1ec1b115df2bec81e00d to your computer and use it in GitHub Desktop.
backbone1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Orchestrator = Backbone.View.extend({ | |
// ... | |
render: function() { | |
// render subviews datePicker, graphSelector, etc. | |
// ... | |
this.listenTo(this.model, 'data-updated', function(data) { | |
this.tableWidget.update(data); | |
}); | |
this.listenTo(this.datePicker, 'daterange-selected', function(dateAttrs) { | |
this.params.update(dateAttrs); | |
this.model.refresh(this.params); | |
}); | |
this.listenTo(this.graphSelector, 'item-selected', function(itemAttrs) { | |
this.params.update(itemAttrs); | |
this.datePicker.reset(); | |
this.model.refresh(this.params); | |
}); | |
}, | |
// ... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment