mirror of
https://github.com/Ekokumppanit/Lentolaskuri.git
synced 2026-01-26 11:13:58 +00:00
20 lines
392 B
JavaScript
20 lines
392 B
JavaScript
'use strict';
|
|
|
|
define([
|
|
'backbone',
|
|
'Template'
|
|
], function (Backbone, Template) {
|
|
var TotalView = Backbone.View.extend({
|
|
el: '.totalWidget',
|
|
initialize: function () {
|
|
this.render.apply(this);
|
|
this.model.bind('change', this.render, this);
|
|
},
|
|
render: function () {
|
|
this.$el.html(Template.total(this.model.toJSON()));
|
|
}
|
|
});
|
|
|
|
return TotalView;
|
|
});
|