Added directions!

This commit is contained in:
Martin Donnelly 2018-10-12 16:38:32 +01:00
parent d6135ddf0c
commit 595b2be1e3

View File

@ -56,7 +56,7 @@ const GotoCardView = Backbone.View.extend({
console.log(`${eventName } was triggered!`);
});*/
this.model.bind('change:directions', this.doUpdateRender, this);
this.model.bind('change:directions', this.doRender, this);
this.eventBus.on('showDirections', this.showDirectionsPanel, this);
},
@ -100,7 +100,7 @@ const GotoCardView = Backbone.View.extend({
this.model.set('detail', detail);
// if (prevGuid === guid)
this.doRender();
// this.doRender();
},
'events': {
'click .closebutton': 'doClick'
@ -119,17 +119,19 @@ const GotoCardView = Backbone.View.extend({
this.$el.empty();
// this.$el.html(this.template(this.model.get('article')));
this.$el.html(this.template());
},
'doUpdateRender': function() {
// this.$el.empty();
// this.$el.html(this.template(this.model.get('article')));
const html = templates.templateDirections({ 'directions':this.model.get('directions') });
console.log(html);
const $el = this.$el;
$el.find('#gotoDetailsText').html(html);
},
'doUpdateRender': function() {
// this.$el.empty();
// this.$el.html(this.template(this.model.get('article')));
}
});