Added directions!
This commit is contained in:
parent
d6135ddf0c
commit
595b2be1e3
@ -56,7 +56,7 @@ const GotoCardView = Backbone.View.extend({
|
|||||||
console.log(`${eventName } was triggered!`);
|
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);
|
this.eventBus.on('showDirections', this.showDirectionsPanel, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ const GotoCardView = Backbone.View.extend({
|
|||||||
|
|
||||||
this.model.set('detail', detail);
|
this.model.set('detail', detail);
|
||||||
// if (prevGuid === guid)
|
// if (prevGuid === guid)
|
||||||
this.doRender();
|
// this.doRender();
|
||||||
},
|
},
|
||||||
'events': {
|
'events': {
|
||||||
'click .closebutton': 'doClick'
|
'click .closebutton': 'doClick'
|
||||||
@ -119,17 +119,19 @@ const GotoCardView = Backbone.View.extend({
|
|||||||
this.$el.empty();
|
this.$el.empty();
|
||||||
// this.$el.html(this.template(this.model.get('article')));
|
// this.$el.html(this.template(this.model.get('article')));
|
||||||
this.$el.html(this.template());
|
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') });
|
const html = templates.templateDirections({ 'directions':this.model.get('directions') });
|
||||||
console.log(html);
|
console.log(html);
|
||||||
const $el = this.$el;
|
const $el = this.$el;
|
||||||
|
|
||||||
$el.find('#gotoDetailsText').html(html);
|
$el.find('#gotoDetailsText').html(html);
|
||||||
|
},
|
||||||
|
'doUpdateRender': function() {
|
||||||
|
// this.$el.empty();
|
||||||
|
// this.$el.html(this.template(this.model.get('article')));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user