mirror of
https://github.com/Ekokumppanit/Lentolaskuri.git
synced 2026-02-15 19:47:37 +00:00
Initial commit
This commit is contained in:
19
app/scripts/views/total.js
Normal file
19
app/scripts/views/total.js
Normal file
@@ -0,0 +1,19 @@
|
||||
'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;
|
||||
});
|
||||
Reference in New Issue
Block a user