Skip to content

Instantly share code, notes, and snippets.

@unjust
Last active January 2, 2016 00:38
Show Gist options
  • Save unjust/8224428 to your computer and use it in GitHub Desktop.
Save unjust/8224428 to your computer and use it in GitHub Desktop.
MM.NavBarView = Meetup.Meetbone.View.subclass({
init: function() {
var self = this;
MM.$Events.on("shown.modalView", function(e, view) {
if (view.navbar) {
//TODO:navbar should we clean up navbar_config
//// not sure why this is nested
var newModel = view.navbar["navbar_config"];
// set a title with view's fallback
if (!newModel.title && view.title) {
newModel.title = view.title;
}
newModel.isModal = true;
self.model.set(newModel);
}
});
this.model.on("set.model", this.render, this);
},
model: new Meetup.Meetbone.Model({}),
template: Meetup.MustacheTemplates.mobile.navBarDetail
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment